Ticket #746: diff.txt

File diff.txt, 1.8 KB (added by anonymous, 15 years ago)
Line 
1Index: htmlarea.js
2===================================================================
3--- htmlarea.js (old)
4+++ htmlarea.js (new)
5@@ -62,6 +62,14 @@
6   _editor_lang = "en";
7 }
8 
9+
10+if ( typeof _editor_plugins_path != "string" )
11+       _editor_plugins_path = "plugins/"
12+
13+if ( typeof _editor_lang_path != "string" )
14+       _editor_lang_path = "lang/"
15+
16+
17 // skin stylesheet to load
18 if ( typeof _editor_skin !== "string" )
19 {
20@@ -2432,7 +2440,7 @@
21 // _has_ that language, otherwise shit might happen ;-)
22 HTMLArea.getPluginDir = function(pluginName)
23 {
24-  return _editor_url + "plugins/" + pluginName;
25+  return _editor_url + _editor_plugins_path + pluginName;
26 };
27 
28 HTMLArea.loadPlugin = function(pluginName, callback)
29@@ -2569,7 +2577,7 @@
30   var url = _editor_url || '';
31   if ( typeof plugin != "undefined" )
32   {
33-    url += "plugins/" + plugin + "/";
34+    url += _editor_plugins_path + plugin + "/";
35   }
36   url += style;
37   // @todo: would not it be better to check the first character instead of a regex ?
38@@ -5963,7 +5971,7 @@
39   }
40   else
41   {
42-    return _editor_url + "plugins/" + plugin + "/img/" + file;
43+    return _editor_url + _editor_plugins_path + plugin + "/img/" + file;
44   }
45 };
46 
47@@ -5978,7 +5986,7 @@
48     {
49       popup += ".html";
50     }
51-    url = _editor_url + "plugins/" + plugin + "/popups/" + popup;
52+    url = _editor_url + _editor_plugins_path + plugin + "/popups/" + popup;
53   }
54   else if ( file.match(/^\/.*?/) )
55   {
56@@ -6292,11 +6300,11 @@
57     //use internal files
58     if ( context != 'HTMLArea')
59     {
60-      url = _editor_url+"plugins/"+context+"/lang/"+_editor_lang+".js";
61+      url = _editor_url+_editor_plugins_path+context+"/lang/"+_editor_lang+".js";
62     }
63     else
64     {
65-      url = _editor_url+"lang/"+_editor_lang+".js";
66+      url = _editor_url+_editor_lang_path+_editor_lang+".js";
67     }
68   }
69