Added file select option for raster images in server_open extension. Also added Uploading file dialog box for server-based uploads

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1624 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-07-05 15:38:06 +00:00
parent d80dd06bad
commit c0fa1ef4b1
5 changed files with 68 additions and 12 deletions

View File

@@ -446,6 +446,10 @@
input.val(defText || '');
input.bind('keydown', 'return', function() {ok.click();});
}
if(type == 'process') {
ok.hide();
}
box.show();
@@ -460,6 +464,7 @@
$.alert = function(msg, cb) { dbox('alert', msg, cb);};
$.confirm = function(msg, cb) { dbox('confirm', msg, cb);};
$.process_cancel = function(msg, cb) { dbox('process', msg, cb);};
$.prompt = function(msg, txt, cb) { dbox('prompt', msg, cb, txt);};
}());
@@ -1175,7 +1180,12 @@
if(svgCanvas.addedNew) {
if(elname == 'image') {
promptImgURL();
var xlinkNS = "http://www.w3.org/1999/xlink";
var href = elem.getAttributeNS(xlinkNS, "href");
// Prompt for URL if not a data URL
if(href.indexOf('data:') !== 0) {
promptImgURL();
}
} else if(elname == 'text') {
// TODO: Do something here for new text
}