diff --git a/client/galaxy/scripts/mvc/history/options-menu.js b/client/galaxy/scripts/mvc/history/options-menu.js index 373948882d3..9eaf2430110 100644 --- a/client/galaxy/scripts/mvc/history/options-menu.js +++ b/client/galaxy/scripts/mvc/history/options-menu.js @@ -89,7 +89,8 @@ var menu = [ if( Galaxy && Galaxy.currHistoryPanel && confirm( _l( 'Really delete all hidden datasets?' ) ) ){ var filtered = Galaxy.currHistoryPanel.model.contents.hidden(); //TODO: batch - filtered.ajaxQueue( Backbone.Model.prototype.save, { deleted : true }) + // both delete *and* unhide them + filtered.ajaxQueue( Backbone.Model.prototype.save, { deleted : true, visible: true }) .done( function(){ Galaxy.currHistoryPanel.render(); }) diff --git a/static/maps/mvc/history/options-menu.js.map b/static/maps/mvc/history/options-menu.js.map index 4cd6a9ce479..55f322acc59 100644 --- a/static/maps/mvc/history/options-menu.js.map +++ b/static/maps/mvc/history/options-menu.js.map @@ -1 +1 @@ -{"version":3,"file":"options-menu.js","sources":["../../../src/mvc/history/options-menu.js"],"names":["define","PopupMenu","BASE_MVC","_l","buildMenu","isAnon","purgeAllowed","urlRoot","_","clone","menu","filter","menuOption","anon","purge","href","target","confirm","func","galaxy_main","location","html","header","Galaxy","currHistoryPanel","createNewHistory","collapseAll","filtered","model","contents","hidden","ajaxQueue","Backbone","Model","prototype","save","visible","done","render","fail","alert","console","error","arguments","deleted","create","$button","options","undefined","anonymous","root"],"mappings":"AAAAA,QACI,oBACA,eACA,sBACD,SAAUC,EAAWC,EAAUC,GA+IlC,QAASC,GAAWC,EAAQC,EAAcC,GACtC,MAAOC,GAAEC,MAAOC,GAAOC,OAAQ,SAAUC,GACrC,MAAIP,KAAWO,EAAWC,MACf,GAENP,GAAgBM,EAAWE,OACrB,GAIPF,EAAWG,OACXH,EAAWG,KAAOR,EAAUK,EAAWG,KACvCH,EAAWI,OAAS,eAEpBJ,EAAWK,UACXL,EAAWM,KAAO,WACVD,QAASL,EAAWK,WACpBE,YAAYC,SAAWR,EAAWG,SAIvC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,OAAU,EACVD,MAAU,IAGVQ,KAAUlB,EAAI,kBACdY,KAAU,6BACVF,MAAU,IAGVQ,KAAUlB,EAAI,oBACdY,KAAU,oBACVF,MAAU,IAGVQ,KAAUlB,EAAI,kBACdY,KAAU,sCACVF,MAAU,IAGVQ,KAAUlB,EAAI,UACdc,QAAUd,EAAI,sCACdY,KAAU,2BAGVM,KAAUlB,EAAI,sBACdc,QAAUd,EAAI,yEACdY,KAAU,oCACVD,OAAU,EACVD,MAAU,IAIVQ,KAAUlB,EAAI,iBACdmB,QAAU,IAGVD,KAAUlB,EAAI,oBACdY,KAAU,2BA6Bd8B,EAAS,SAAUC,EAASC,GAC5BA,EAAUA,KACV,IAAI1C,GAA+B2C,SAAtBD,EAAQE,WAAyB,EAAOF,EAAQE,UACzD3C,EAAeyC,EAAQzC,eAAgB,EACvC4C,EAAOH,EAAQG,OAAY3B,QAAUA,OAAOwB,QAAWxB,OAAOwB,QAAQG,KAAM,KAC5ExC,EAAON,EAAWC,EAAQC,EAAc4C,EAE5C,OAAO,IAAIjD,GAAW6C,EAASpC,GAK/B,OAAOmC"} \ No newline at end of file +{"version":3,"file":"options-menu.js","sources":["../../../src/mvc/history/options-menu.js"],"names":["define","PopupMenu","BASE_MVC","_l","buildMenu","isAnon","purgeAllowed","urlRoot","_","clone","menu","filter","menuOption","anon","purge","href","target","confirm","func","galaxy_main","location","html","header","Galaxy","currHistoryPanel","createNewHistory","collapseAll","filtered","model","contents","hidden","ajaxQueue","Backbone","Model","prototype","save","visible","done","render","fail","alert","console","error","arguments","deleted","create","$button","options","undefined","anonymous","root"],"mappings":"AAAAA,QACI,oBACA,eACA,sBACD,SAAUC,EAAWC,EAAUC,GAgJlC,QAASC,GAAWC,EAAQC,EAAcC,GACtC,MAAOC,GAAEC,MAAOC,GAAOC,OAAQ,SAAUC,GACrC,MAAIP,KAAWO,EAAWC,MACf,GAENP,GAAgBM,EAAWE,OACrB,GAIPF,EAAWG,OACXH,EAAWG,KAAOR,EAAUK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,OAAOC,iBAAiBc,WAE3BC,KAAM,WACHC,MAAO,4CACPC,QAAQC,MAAOC,iBAM/BtB,KAAUlB,EAAI,0BACdc,QAAUd,EAAI,0EACdY,KAAU,iCACVD,OAAU,EACVD,MAAU,IAGVQ,KAAUlB,EAAI,kBACdY,KAAU,6BACVF,MAAU,IAGVQ,KAAUlB,EAAI,oBACdY,KAAU,oBACVF,MAAU,IAGVQ,KAAUlB,EAAI,kBACdY,KAAU,sCACVF,MAAU,IAGVQ,KAAUlB,EAAI,UACdc,QAAUd,EAAI,sCACdY,KAAU,2BAGVM,KAAUlB,EAAI,sBACdc,QAAUd,EAAI,yEACdY,KAAU,oCACVD,OAAU,EACVD,MAAU,IAIVQ,KAAUlB,EAAI,iBACdmB,QAAU,IAGVD,KAAUlB,EAAI,oBACdY,KAAU,2BA6Bd8B,EAAS,SAAUC,EAASC,GAC5BA,EAAUA,KACV,IAAI1C,GAA+B2C,SAAtBD,EAAQE,WAAyB,EAAOF,EAAQE,UACzD3C,EAAeyC,EAAQzC,eAAgB,EACvC4C,EAAOH,EAAQG,OAAY3B,QAAUA,OAAOwB,QAAWxB,OAAOwB,QAAQG,KAAM,KAC5ExC,EAAON,EAAWC,EAAQC,EAAc4C,EAE5C,OAAO,IAAIjD,GAAW6C,EAASpC,GAK/B,OAAOmC"} \ No newline at end of file diff --git a/static/scripts/mvc/history/options-menu.js b/static/scripts/mvc/history/options-menu.js index 8ead92d9d13..6d42dc57a61 100644 --- a/static/scripts/mvc/history/options-menu.js +++ b/static/scripts/mvc/history/options-menu.js @@ -1,2 +1,2 @@ -define(["mvc/ui/popup-menu","mvc/base-mvc","utils/localization"],function(a,b,c){function d(a,b,c){return _.clone(e).filter(function(d){return a&&!d.anon?!1:!b&&d.purge?!1:(d.href&&(d.href=c+d.href,d.target="galaxy_main"),d.confirm&&(d.func=function(){confirm(d.confirm)&&(galaxy_main.location=d.href)}),!0)})}var e=[{html:c("History Lists"),header:!0},{html:c("Saved Histories"),href:"history/list"},{html:c("Histories Shared with Me"),href:"history/list_shared"},{html:c("Current History"),header:!0,anon:!0},{html:c("Create New"),func:function(){Galaxy&&Galaxy.currHistoryPanel&&Galaxy.currHistoryPanel.createNewHistory()}},{html:c("Copy History"),href:"history/copy"},{html:c("Copy Datasets"),href:"dataset/copy_datasets"},{html:c("Share or Publish"),href:"history/sharing"},{html:c("Extract Workflow"),href:"workflow/build_from_current_history"},{html:c("Dataset Security"),href:"root/history_set_default_permissions"},{html:c("Resume Paused Jobs"),href:"history/resume_paused_jobs?current=True",anon:!0},{html:c("Collapse Expanded Datasets"),func:function(){Galaxy&&Galaxy.currHistoryPanel&&Galaxy.currHistoryPanel.collapseAll()}},{html:c("Unhide Hidden Datasets"),anon:!0,func:function(){if(Galaxy&&Galaxy.currHistoryPanel&&confirm(c("Really unhide all hidden datasets?"))){var a=Galaxy.currHistoryPanel.model.contents.hidden();a.ajaxQueue(Backbone.Model.prototype.save,{visible:!0}).done(function(){Galaxy.currHistoryPanel.render()}).fail(function(){alert("There was an error unhiding the datasets"),console.error(arguments)})}}},{html:c("Delete Hidden Datasets"),anon:!0,func:function(){if(Galaxy&&Galaxy.currHistoryPanel&&confirm(c("Really delete all hidden datasets?"))){var a=Galaxy.currHistoryPanel.model.contents.hidden();a.ajaxQueue(Backbone.Model.prototype.save,{deleted:!0}).done(function(){Galaxy.currHistoryPanel.render()}).fail(function(){alert("There was an error deleting the datasets"),console.error(arguments)})}}},{html:c("Purge Deleted Datasets"),confirm:c("Really delete all deleted datasets permanently? This cannot be undone."),href:"history/purge_deleted_datasets",purge:!0,anon:!0},{html:c("Show Structure"),href:"history/display_structured",anon:!0},{html:c("Export Citations"),href:"history/citations",anon:!0},{html:c("Export to File"),href:"history/export_archive?preview=True",anon:!0},{html:c("Delete"),confirm:c("Really delete the current history?"),href:"history/delete_current"},{html:c("Delete Permanently"),confirm:c("Really delete the current history permanently? This cannot be undone."),href:"history/delete_current?purge=True",purge:!0,anon:!0},{html:c("Other Actions"),header:!0},{html:c("Import from File"),href:"history/import_archive"}],f=function(b,c){c=c||{};var e=void 0===c.anonymous?!0:c.anonymous,f=c.purgeAllowed||!1,g=c.root||(Galaxy&&Galaxy.options?Galaxy.options.root:"/"),h=d(e,f,g);return new a(b,h)};return f}); +define(["mvc/ui/popup-menu","mvc/base-mvc","utils/localization"],function(a,b,c){function d(a,b,c){return _.clone(e).filter(function(d){return a&&!d.anon?!1:!b&&d.purge?!1:(d.href&&(d.href=c+d.href,d.target="galaxy_main"),d.confirm&&(d.func=function(){confirm(d.confirm)&&(galaxy_main.location=d.href)}),!0)})}var e=[{html:c("History Lists"),header:!0},{html:c("Saved Histories"),href:"history/list"},{html:c("Histories Shared with Me"),href:"history/list_shared"},{html:c("Current History"),header:!0,anon:!0},{html:c("Create New"),func:function(){Galaxy&&Galaxy.currHistoryPanel&&Galaxy.currHistoryPanel.createNewHistory()}},{html:c("Copy History"),href:"history/copy"},{html:c("Copy Datasets"),href:"dataset/copy_datasets"},{html:c("Share or Publish"),href:"history/sharing"},{html:c("Extract Workflow"),href:"workflow/build_from_current_history"},{html:c("Dataset Security"),href:"root/history_set_default_permissions"},{html:c("Resume Paused Jobs"),href:"history/resume_paused_jobs?current=True",anon:!0},{html:c("Collapse Expanded Datasets"),func:function(){Galaxy&&Galaxy.currHistoryPanel&&Galaxy.currHistoryPanel.collapseAll()}},{html:c("Unhide Hidden Datasets"),anon:!0,func:function(){if(Galaxy&&Galaxy.currHistoryPanel&&confirm(c("Really unhide all hidden datasets?"))){var a=Galaxy.currHistoryPanel.model.contents.hidden();a.ajaxQueue(Backbone.Model.prototype.save,{visible:!0}).done(function(){Galaxy.currHistoryPanel.render()}).fail(function(){alert("There was an error unhiding the datasets"),console.error(arguments)})}}},{html:c("Delete Hidden Datasets"),anon:!0,func:function(){if(Galaxy&&Galaxy.currHistoryPanel&&confirm(c("Really delete all hidden datasets?"))){var a=Galaxy.currHistoryPanel.model.contents.hidden();a.ajaxQueue(Backbone.Model.prototype.save,{deleted:!0,visible:!0}).done(function(){Galaxy.currHistoryPanel.render()}).fail(function(){alert("There was an error deleting the datasets"),console.error(arguments)})}}},{html:c("Purge Deleted Datasets"),confirm:c("Really delete all deleted datasets permanently? This cannot be undone."),href:"history/purge_deleted_datasets",purge:!0,anon:!0},{html:c("Show Structure"),href:"history/display_structured",anon:!0},{html:c("Export Citations"),href:"history/citations",anon:!0},{html:c("Export to File"),href:"history/export_archive?preview=True",anon:!0},{html:c("Delete"),confirm:c("Really delete the current history?"),href:"history/delete_current"},{html:c("Delete Permanently"),confirm:c("Really delete the current history permanently? This cannot be undone."),href:"history/delete_current?purge=True",purge:!0,anon:!0},{html:c("Other Actions"),header:!0},{html:c("Import from File"),href:"history/import_archive"}],f=function(b,c){c=c||{};var e=void 0===c.anonymous?!0:c.anonymous,f=c.purgeAllowed||!1,g=c.root||(Galaxy&&Galaxy.options?Galaxy.options.root:"/"),h=d(e,f,g);return new a(b,h)};return f}); //# sourceMappingURL=../../../maps/mvc/history/options-menu.js.map \ No newline at end of file