Apply changes of mmariani in Github extpath branch (https://github.com/mmariani/svg-edit/compare/extpath ) as reported by birbag in issue 1184
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2693 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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: [{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: [
|
||||
{
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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 = '<?xml version="1.0" encoding="UTF-8"?>\n' + data,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user