put server-save into "extras"

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@47 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Pavol Rusnak
2009-06-06 23:54:53 +00:00
parent 35e68a1dd5
commit 8a55732a30
8 changed files with 27 additions and 43 deletions

View File

@@ -7,7 +7,6 @@ $(document).ready(function(){
});
$('#palette').append(str);
var pos = $('#tools_rect_show').position();
$('#tools_rect').css({'left': pos.left+2, 'top': pos.top+2});
pos = $('#tools_ellipse_show').position();
@@ -123,7 +122,7 @@ $(document).ready(function(){
});
$('#tool_submit').click(function(){
SvgCanvas.serialize(serializeHandler);
SvgCanvas.save();
});
var colorPicker = function(elem) {
@@ -191,20 +190,4 @@ $(document).ready(function(){
$('#tools_ellipse').show();
});
})
var serializeHandler = function(svg) {
//alert(svg);
submitSvgStr(svg);
}
function submitSvgStr(str){
//alert("This is svg image in string format \n This will be posted to server \n " + str)
//posting the data to server
$.post(
"save.php",
{svg_data: escape(str)},
function(data){
alert(data);
});
}
});