Remove old dialog box && update path to controllers in ajax call

update path to controllers
This commit is contained in:
Nicolas Le Goff
2012-10-09 19:45:51 +02:00
parent a61779ee5a
commit e8258acf15
6 changed files with 75 additions and 126 deletions

View File

@@ -1076,38 +1076,27 @@ function download_basket()
function download(value)
{
var dialog_box = $('#dialog_dwnl');
var dialog = p4.Dialog.Create({title: typeof(language) !== 'undefined' ? language['export']: ''});
dialog_box = $('#dialog_dwnl');
dialog_box.empty().addClass('loading').dialog({
width:800,
height:600,
modal:true,
closeOnEscape : false,
resizable : false,
overlay: {
backgroundColor: '#000',
opacity: 0.7
},
beforeclose:function(){
tinyMCE.execCommand('mceRemoveControl',true,'sendmail_message');
tinyMCE.execCommand('mceRemoveControl',true,'order_usage');
}
}).dialog('open');
$.post("/include/multiexports.php", "lst="+value, function(data) {
dialog_box.removeClass('loading').empty().append(data);
$('.tabs', dialog_box).tabs();
tinyMCE.execCommand('mceAddControl',true,'sendmail_message');
tinyMCE.execCommand('mceAddControl',true,'order_usage');
$('.close_button', dialog_box).bind('click',function(){
dialog_box.dialog('close').dialog('destroy');
dialog.getDomElement().bind("dialogbeforeclose", function(event, ui) {
tinyMCE.execCommand('mceRemoveControl',true,'sendmail_message');
tinyMCE.execCommand('mceRemoveControl',true,'order_usage');
});
return false;
});
$.post("/prod/export/multi-export/", "lst="+value, function(data) {
dialog.setContent(data);
$('.tabs', dialog.getDomElement()).tabs();
tinyMCE.execCommand('mceAddControl',true,'sendmail_message');
tinyMCE.execCommand('mceAddControl',true,'order_usage');
$('.close_button', dialog.getDomElement()).bind('click',function(){
dialog.Close();
});
return false;
});
}