fixed indentation and removed two unneeded local vars
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2432 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
570c59ebf2
commit
d809578c6c
|
@ -538,44 +538,43 @@
|
|||
$('#dialog_container').draggable({cancel: '#dialog_content, #dialog_buttons *', containment: 'window'});
|
||||
var box = $('#dialog_box'),
|
||||
btn_holder = $('#dialog_buttons'),
|
||||
|
||||
dbox = function(type, msg, callback, defText) {
|
||||
$('#dialog_content').html('<p>'+msg.replace(/\n/g, '</p><p>')+'</p>')
|
||||
.toggleClass('prompt', (type == 'prompt'));
|
||||
btn_holder.empty();
|
||||
$('#dialog_content').html('<p>'+msg.replace(/\n/g, '</p><p>')+'</p>')
|
||||
.toggleClass('prompt', (type == 'prompt'));
|
||||
btn_holder.empty();
|
||||
|
||||
var ok = $('<input type="button" value="' + uiStrings.common.ok + '">').appendTo(btn_holder);
|
||||
var ok = $('<input type="button" value="' + uiStrings.common.ok + '">').appendTo(btn_holder);
|
||||
|
||||
if (type != 'alert') {
|
||||
$('<input type="button" value="' + uiStrings.common.cancel + '">')
|
||||
.appendTo(btn_holder)
|
||||
.click(function() { box.hide(); callback(false);});
|
||||
}
|
||||
if (type != 'alert') {
|
||||
$('<input type="button" value="' + uiStrings.common.cancel + '">')
|
||||
.appendTo(btn_holder)
|
||||
.click(function() { box.hide(); callback(false);});
|
||||
}
|
||||
|
||||
if (type == 'prompt') {
|
||||
var input = $('<input type="text">').prependTo(btn_holder);
|
||||
input.val(defText || '');
|
||||
input.bind('keydown', 'return', function() {ok.click();});
|
||||
}
|
||||
if (type == 'prompt') {
|
||||
var input = $('<input type="text">').prependTo(btn_holder);
|
||||
input.val(defText || '');
|
||||
input.bind('keydown', 'return', function() {ok.click();});
|
||||
}
|
||||
|
||||
if (type == 'process') {
|
||||
ok.hide();
|
||||
}
|
||||
if (type == 'process') {
|
||||
ok.hide();
|
||||
}
|
||||
|
||||
box.show();
|
||||
box.show();
|
||||
|
||||
ok.click(function() {
|
||||
box.hide();
|
||||
var resp = (type == 'prompt') ? input.val() : true;
|
||||
if (callback) callback(resp);
|
||||
}).focus();
|
||||
ok.click(function() {
|
||||
box.hide();
|
||||
var resp = (type == 'prompt') ? input.val() : true;
|
||||
if (callback) callback(resp);
|
||||
}).focus();
|
||||
|
||||
if (type == 'prompt') input.focus();
|
||||
};
|
||||
if (type == 'prompt') input.focus();
|
||||
};
|
||||
|
||||
$.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);};
|
||||
$.process_cancel = function(msg, cb) { dbox('process', msg, cb);};
|
||||
$.prompt = function(msg, txt, cb) { dbox('prompt', msg, cb, txt);};
|
||||
}());
|
||||
|
||||
|
@ -2200,7 +2199,6 @@
|
|||
};
|
||||
|
||||
Editor.addDropDown('#font_family_dropdown', function() {
|
||||
var fam = $(this).text();
|
||||
$('#font_family').val($(this).text()).change();
|
||||
});
|
||||
|
||||
|
@ -3281,10 +3279,9 @@
|
|||
paint = new $.jGraduate.Paint(p);
|
||||
paintBox[picker].setPaint(paint);
|
||||
svgCanvas.setPaint(picker, paint);
|
||||
|
||||
$('#color_picker').hide();
|
||||
},
|
||||
function(p) {
|
||||
function() {
|
||||
$('#color_picker').hide();
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue