diff --git a/editor/extensions/ext-closepath.js b/editor/extensions/ext-closepath.js index 73b03eaf..6c87f4c9 100644 --- a/editor/extensions/ext-closepath.js +++ b/editor/extensions/ext-closepath.js @@ -43,7 +43,7 @@ svgEditor.addExtension('ClosePath', function() { return { name: 'ClosePath', - svgicons: 'extensions/closepath_icons.svg', + svgicons: svgEditor.curConfig.extPath + 'closepath_icons.svg', buttons: [{ id: 'tool_openpath', type: 'context', diff --git a/editor/extensions/ext-connector.js b/editor/extensions/ext-connector.js index 70aca53e..b3996ad6 100644 --- a/editor/extensions/ext-connector.js +++ b/editor/extensions/ext-connector.js @@ -299,11 +299,11 @@ svgEditor.addExtension("Connector", function(S) { return { name: "Connector", - svgicons: "images/conn.svg", + svgicons: svgEditor.curConfig.imgPath + "conn.svg", buttons: [{ id: "mode_connect", type: "mode", - icon: "images/cut.png", + icon: svgEditor.curConfig.imgPath + "cut.png", title: "Connect two objects", includeWith: { button: '#tool_line', diff --git a/editor/extensions/ext-eyedropper.js b/editor/extensions/ext-eyedropper.js index 230b5b07..4385b9fa 100644 --- a/editor/extensions/ext-eyedropper.js +++ b/editor/extensions/ext-eyedropper.js @@ -61,7 +61,7 @@ svgEditor.addExtension("eyedropper", function(S) { return { name: "eyedropper", - svgicons: "extensions/eyedropper-icon.xml", + svgicons: svgEditor.curConfig.extPath + "eyedropper-icon.xml", buttons: [{ id: "tool_eyedropper", type: "mode", diff --git a/editor/extensions/ext-foreignobject.js b/editor/extensions/ext-foreignobject.js index e098f58d..70c44208 100644 --- a/editor/extensions/ext-foreignobject.js +++ b/editor/extensions/ext-foreignobject.js @@ -86,7 +86,7 @@ svgEditor.addExtension("foreignObject", function(S) { return { name: "foreignObject", - svgicons: "extensions/foreignobject-icons.xml", + svgicons: svgEditor.curConfig.extPath + "foreignobject-icons.xml", buttons: [{ id: "tool_foreign", type: "mode", diff --git a/editor/extensions/ext-grid.js b/editor/extensions/ext-grid.js index 5b405240..724c692c 100644 --- a/editor/extensions/ext-grid.js +++ b/editor/extensions/ext-grid.js @@ -126,7 +126,7 @@ svgEditor.addExtension('view_grid', function() { return { name: 'view_grid', - svgicons: 'extensions/grid-icon.xml', + svgicons: svgEditor.curConfig.extPath + 'grid-icon.xml', zoomChanged: function(zoom) { if(showGrid) updateGrid(zoom); diff --git a/editor/extensions/ext-helloworld.js b/editor/extensions/ext-helloworld.js index 68b62788..91ee8576 100644 --- a/editor/extensions/ext-helloworld.js +++ b/editor/extensions/ext-helloworld.js @@ -19,7 +19,7 @@ svgEditor.addExtension("Hello World", function() { name: "Hello World", // For more notes on how to make an icon file, see the source of // the hellorworld-icon.xml - svgicons: "extensions/helloworld-icon.xml", + svgicons: svgEditor.curConfig.extPath + "helloworld-icon.xml", // Multiple buttons can be added in this array buttons: [{ diff --git a/editor/extensions/ext-imagelib.js b/editor/extensions/ext-imagelib.js index 916a627b..5a51edce 100644 --- a/editor/extensions/ext-imagelib.js +++ b/editor/extensions/ext-imagelib.js @@ -25,7 +25,7 @@ svgEditor.addExtension("imagelib", function() {'use strict'; var img_libs = [{ name: 'Demo library (local)', - url: 'extensions/imagelib/index.html', + url: svgEditor.curConfig.extPath + 'imagelib/index.html', description: 'Demonstration library for SVG-edit on this server' }, { @@ -366,7 +366,7 @@ svgEditor.addExtension("imagelib", function() {'use strict'; } return { - svgicons: "extensions/ext-imagelib.xml", + svgicons: svgEditor.curConfig.extPath + "ext-imagelib.xml", buttons: [{ id: "tool_imagelib", type: "app_menu", // _flyout diff --git a/editor/extensions/ext-markers.js b/editor/extensions/ext-markers.js index 25b08be9..b2a4dd45 100644 --- a/editor/extensions/ext-markers.js +++ b/editor/extensions/ext-markers.js @@ -475,7 +475,7 @@ svgEditor.addExtension("Markers", function(S) { return { name: "Markers", - svgicons: "extensions/markers-icons.xml", + svgicons: svgEditor.curConfig.extPath + "markers-icons.xml", buttons: buildButtonList(), context_tools: [ { diff --git a/editor/extensions/ext-mathjax.js b/editor/extensions/ext-mathjax.js index d41446b0..eb47c540 100644 --- a/editor/extensions/ext-mathjax.js +++ b/editor/extensions/ext-mathjax.js @@ -114,7 +114,7 @@ svgEditor.addExtension("mathjax", function() { return { name: "MatJax", - svgicons: "extensions/mathjax-icons.xml", + svgicons: svgEditor.curConfig.extPath + "mathjax-icons.xml", buttons: [{ id: "tool_mathjax", type: "mode", @@ -268,4 +268,4 @@ svgEditor.addExtension("mathjax", function() { //$(mathjaxConfiguration).appendTo('head'); } }; -}); \ No newline at end of file +}); diff --git a/editor/extensions/ext-panning.js b/editor/extensions/ext-panning.js index 8506a4ab..4bc9d0c2 100644 --- a/editor/extensions/ext-panning.js +++ b/editor/extensions/ext-panning.js @@ -14,7 +14,7 @@ svgEditor.addExtension('ext-panning', function() { return { name: 'Extension Panning', - svgicons: 'extensions/ext-panning.xml', + svgicons: svgEditor.curConfig.extPath + 'ext-panning.xml', buttons: [{ id: 'ext-panning', type: 'mode', diff --git a/editor/extensions/ext-php_savefile.js b/editor/extensions/ext-php_savefile.js index fadf55e7..22afe17a 100644 --- a/editor/extensions/ext-php_savefile.js +++ b/editor/extensions/ext-php_savefile.js @@ -10,7 +10,7 @@ svgEditor.addExtension("php_savefile", { var title = svgCanvas.getDocumentTitle(); return $.trim(title); } - var save_svg_action = 'extensions/savefile.php'; + var save_svg_action = svgEditor.curConfig.extPath + 'savefile.php'; svgEditor.setCustomHandlers({ save: function(win, data) { var svg = '\n' + data, diff --git a/editor/extensions/ext-polygon.js b/editor/extensions/ext-polygon.js index c586a255..e887f044 100644 --- a/editor/extensions/ext-polygon.js +++ b/editor/extensions/ext-polygon.js @@ -60,7 +60,7 @@ svgEditor.addExtension("polygon", function(S){ return { name: "polygon", - svgicons: "extensions/polygon-icons.svg", + svgicons: svgEditor.curConfig.extPath + "polygon-icons.svg", buttons: [{ id: "tool_polygon", type: "mode", diff --git a/editor/extensions/ext-server_opensave.js b/editor/extensions/ext-server_opensave.js index 522fdd8c..0e596e79 100644 --- a/editor/extensions/ext-server_opensave.js +++ b/editor/extensions/ext-server_opensave.js @@ -30,8 +30,8 @@ svgEditor.addExtension("server_opensave", { } var open_svg_action, import_svg_action, import_img_action, open_svg_form, import_svg_form, import_img_form, - save_svg_action = 'extensions/filesave.php', - save_img_action = 'extensions/filesave.php', + save_svg_action = svgEditor.curConfig.extPath + 'filesave.php', + save_img_action = svgEditor.curConfig.extPath + 'filesave.php', // Create upload target (hidden iframe) cancelled = false; @@ -109,9 +109,9 @@ svgEditor.addExtension("server_opensave", { if (window.FileReader) {return;} // Change these to appropriate script file - open_svg_action = 'extensions/fileopen.php?type=load_svg'; - import_svg_action = 'extensions/fileopen.php?type=import_svg'; - import_img_action = 'extensions/fileopen.php?type=import_img'; + open_svg_action = svgEditor.curConfig.extPath + 'fileopen.php?type=load_svg'; + import_svg_action = svgEditor.curConfig.extPath + 'fileopen.php?type=import_svg'; + import_img_action = svgEditor.curConfig.extPath + 'fileopen.php?type=import_img'; // Set up function for PHP uploader to use svgEditor.processFile = function(str64, type) { diff --git a/editor/extensions/ext-shapes.js b/editor/extensions/ext-shapes.js index a749732d..973e9743 100644 --- a/editor/extensions/ext-shapes.js +++ b/editor/extensions/ext-shapes.js @@ -85,7 +85,7 @@ svgEditor.addExtension('shapes', function() { if (!lib) { $('#shape_buttons').html('Loading...'); - $.getJSON('extensions/shapelib/' + cat_id + '.json', function(result) { + $.getJSON(svgEditor.curConfig.extPath + 'shapelib/' + cat_id + '.json', function(result) { cur_lib = library[cat_id] = { data: result.data, size: result.size, @@ -136,7 +136,7 @@ svgEditor.addExtension('shapes', function() { } return { - svgicons: 'extensions/ext-shapes.xml', + svgicons: svgEditor.curConfig.extPath + 'ext-shapes.xml', buttons: [{ id: 'tool_shapelib', type: 'mode_flyout', // _flyout diff --git a/editor/extensions/ext-star.js b/editor/extensions/ext-star.js index 9b520d5c..1a6c2725 100644 --- a/editor/extensions/ext-star.js +++ b/editor/extensions/ext-star.js @@ -62,7 +62,7 @@ svgEditor.addExtension('star', function(S){ return { name: 'star', - svgicons: 'extensions/star-icons.svg', + svgicons: svgEditor.curConfig.extPath + 'star-icons.svg', buttons: [{ id: 'tool_star', type: 'mode', diff --git a/editor/extensions/ext-webappfind.js b/editor/extensions/ext-webappfind.js index 51334620..1fe2f776 100644 --- a/editor/extensions/ext-webappfind.js +++ b/editor/extensions/ext-webappfind.js @@ -46,7 +46,7 @@ svgEditor.addExtension('WebAppFind', function() { return { name: 'WebAppFind', - svgicons: 'extensions/webappfind-icon.svg', + svgicons: svgEditor.curConfig.extPath + 'webappfind-icon.svg', buttons: [{ id: 'webappfind_save', // type: 'app_menu',