Rebuild client.

This commit is contained in:
Dannon Baker
2017-12-07 16:01:49 -05:00
parent afae7c5dbd
commit 2a7daaaefb
9 changed files with 45 additions and 13 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
define("mvc/tours",["exports","utils/localization","libs/bootstrap-tour"],function(t,e,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(t){return t&&t.__esModule?t:{default:t}}(e),a=(function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);e.default=t}(o),"undefined"==typeof Galaxy?"/":Galaxy.root),r={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},s=function(t){return _.each(t.steps,function(t){t.preclick&&(t.onShow=function(){_.each(t.preclick,function(t){$(t).click()})}),t.postclick&&(t.onHide=function(){_.each(t.postclick,function(t){$(t).click()})}),t.textinsert&&(t.onShown=function(){$(t.element).val(t.textinsert).trigger("change")})}),t},i=Backbone.Model.extend({urlRoot:a+"api/tours"}),u=Backbone.Collection.extend({url:a+"api/tours",model:i}),l=function(t){var e=a+"api/tours/"+t;$.getJSON(e,function(t){var e=s(t);sessionStorage.setItem("activeGalaxyTour",JSON.stringify(t));var o=new Tour(_.extend({steps:e.steps},r));o.init(),o.goTo(0),o.restart()})},c=Backbone.View.extend({title:(0,n.default)("Tours"),initialize:function(){var t=this;this.setElement("<div/>"),this.model=new u,this.model.fetch({success:function(){t.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var t=_.template('<h2>Galaxy Tours</h2>\n<p>This page presents a list of interactive tours available on this Galaxy server.\nSelect any tour to get started (and remember, you can click \'End Tour\' at any time).</p>\n\n<div class="col-12 btn-group" role="group" aria-label="Tag selector">\n <% _.each(tourtagorder, function(tag) { %>\n <button class="btn btn-primary tag-selector-button" tag-selector-button="<%- tag %>">\n <%- tag %>\n </button>\n <% }); %>\n</div>\n\n<% _.each(tourtagorder, function(tourtagkey) { %>\n<div tag="<%- tourtagkey %>" style="display: block;">\n <% var tourtag = tourtags[tourtagkey]; %>\n <h4>\n <%- tourtag.name %>\n </h4>\n <ul class="list-group">\n <% _.each(tourtag.tours, function(tour) { %>\n <li class="list-group-item">\n <a href="/tours/<%- tour.id %>" class="tourItem" data-tour.id=<%- tour.id %>>\n <%- tour.name || tour.id %>\n </a>\n - <%- tour.attributes.description || "No description given." %>\n <% _.each(tour.attributes.tags, function(tag) { %>\n <span class="label label-primary sm-label-pad">\n <%- tag.charAt(0).toUpperCase() + tag.slice(1) %>\n </span>\n <% }); %>\n </li>\n <% }); %>\n </ul>\n</div>\n<% }); %>'),e={};_.each(this.model.models,function(t){null===t.attributes.tags?(void 0===e.Untagged&&(e.Untagged={name:"Untagged",tours:[]}),e.Untagged.tours.push(t)):_.each(t.attributes.tags,function(o){o=o.charAt(0).toUpperCase()+o.slice(1),void 0===e[o]&&(e[o]={name:o,tours:[]}),e[o].tours.push(t)})});var o=Object.keys(e).sort();this.$el.html(t({tours:this.model.models,tourtags:e,tourtagorder:o})).on("click",".tourItem",function(t){t.preventDefault(),l($(this).data("tour.id"))}).on("click",".tag-selector-button",function(t){var e=$(t.target),o="block",n=e.attr("tag-selector-button");e.toggleClass("btn-primary"),e.toggleClass("btn-secondary"),e.hasClass("btn-secondary")&&(o="none"),$("div[tag='"+n+"']").css({display:o})})}});t.default={ToursView:c,hooked_tour_from_data:s,tour_opts:r,giveTour:l}});
define("mvc/tours",["exports","utils/localization","libs/bootstrap-tour"],function(t,e){"use strict";function n(t){var e=c(t);sessionStorage.setItem("activeGalaxyTour",JSON.stringify(t));var n=new i(_.extend({steps:e.steps},u));return n.init(),n.goTo(0),n.restart(),n}function o(t){var e=s+"api/tours/"+t;$.getJSON(e,function(t){n(t)})}function a(){var t=JSON.parse(sessionStorage.getItem("activeGalaxyTour"));if(t&&(t=c(t))&&t.steps&&window&&window.self===window.top){var e=new i(_.extend({steps:t.steps},u));e.init(),e.restart()}}Object.defineProperty(t,"__esModule",{value:!0}),t.ToursView=void 0,t.giveTourWithData=n,t.giveTourById=o,t.activeGalaxyTourRunner=a;var r=function(t){return t&&t.__esModule?t:{default:t}}(e),i=window.Tour,s="undefined"==typeof Galaxy?"/":Galaxy.root,u={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},c=function(t){return _.each(t.steps,function(t){t.preclick&&(t.onShow=function(){_.each(t.preclick,function(t){$(t).click()})}),t.postclick&&(t.onHide=function(){_.each(t.postclick,function(t){$(t).click()})}),t.textinsert&&(t.onShown=function(){$(t.element).val(t.textinsert).trigger("change")})}),t},l=Backbone.Model.extend({urlRoot:s+"api/tours"}),d=Backbone.Collection.extend({url:s+"api/tours",model:l}),g=t.ToursView=Backbone.View.extend({title:(0,r.default)("Tours"),initialize:function(){var t=this;this.setElement("<div/>"),this.model=new d,this.model.fetch({success:function(){t.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var t=_.template('<h2>Galaxy Tours</h2>\n<p>This page presents a list of interactive tours available on this Galaxy server.\nSelect any tour to get started (and remember, you can click \'End Tour\' at any time).</p>\n\n<div class="col-12 btn-group" role="group" aria-label="Tag selector">\n <% _.each(tourtagorder, function(tag) { %>\n <button class="btn btn-primary tag-selector-button" tag-selector-button="<%- tag %>">\n <%- tag %>\n </button>\n <% }); %>\n</div>\n\n<% _.each(tourtagorder, function(tourtagkey) { %>\n<div tag="<%- tourtagkey %>" style="display: block;">\n <% var tourtag = tourtags[tourtagkey]; %>\n <h4>\n <%- tourtag.name %>\n </h4>\n <ul class="list-group">\n <% _.each(tourtag.tours, function(tour) { %>\n <li class="list-group-item">\n <a href="/tours/<%- tour.id %>" class="tourItem" data-tour.id=<%- tour.id %>>\n <%- tour.name || tour.id %>\n </a>\n - <%- tour.attributes.description || "No description given." %>\n <% _.each(tour.attributes.tags, function(tag) { %>\n <span class="label label-primary sm-label-pad">\n <%- tag.charAt(0).toUpperCase() + tag.slice(1) %>\n </span>\n <% }); %>\n </li>\n <% }); %>\n </ul>\n</div>\n<% }); %>'),e={};_.each(this.model.models,function(t){null===t.attributes.tags?(void 0===e.Untagged&&(e.Untagged={name:"Untagged",tours:[]}),e.Untagged.tours.push(t)):_.each(t.attributes.tags,function(n){n=n.charAt(0).toUpperCase()+n.slice(1),void 0===e[n]&&(e[n]={name:n,tours:[]}),e[n].tours.push(t)})});var n=Object.keys(e).sort();this.$el.html(t({tours:this.model.models,tourtags:e,tourtagorder:n})).on("click",".tourItem",function(t){t.preventDefault(),o($(this).data("tour.id"))}).on("click",".tag-selector-button",function(t){var e=$(t.target),n="block",o=e.attr("tag-selector-button");e.toggleClass("btn-primary"),e.toggleClass("btn-secondary"),e.hasClass("btn-secondary")&&(n="none"),$("div[tag='"+o+"']").css({display:n})})}});t.default={ToursView:g,giveTourWithData:n,giveTourById:o,activeGalaxyTourRunner:a}});
+1 -1
View File
@@ -1 +1 @@
define("onload",["layout/panel","layout/modal","utils/async-save-text","ui/popupmenu","ui/autocom_tagging","mvc/tours","utils/query-string-parsing"],function(e,t,n,a,o,i,r){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){function a(e){var t={placeholder:"Click to select",closeOnSelect:!$(e).is("[MULTIPLE]"),dropdownAutoWidth:!0,containerCssClass:"select2-minwidth"};return e.select2(t)}jQuery.fn.select2&&(void 0===e&&(e=20),void 0===t&&(t=3e3),(n=n||$("select")).each(function(){var n=$(this).not("[multiple]"),o=n.find("option").length;o<e||o>t||n.hasClass("no-autocomplete")||a(n)}))}function c(){$("select[refresh_on_change='true']").off("change").change(function(){var e=$(this),t=e.val(),n=e.attr("refresh_on_change_values");if(n){n=n.split(",");var a=e.attr("last_selected_value");if(-1===$.inArray(t,n)&&-1===$.inArray(a,n))return}$(window).trigger("refresh_on_change"),$(document).trigger("convert_to_values"),e.get(0).form.submit()}),$(":checkbox[refresh_on_change='true']").off("click").click(function(){var e=$(this),t=e.val(),n=e.attr("refresh_on_change_values");if(n){n=n.split(",");var a=e.attr("last_selected_value");if(-1===$.inArray(t,n)&&-1===$.inArray(a,n))return}$(window).trigger("refresh_on_change"),e.get(0).form.submit()}),$("a[confirm]").off("click").click(function(){return confirm($(this).attr("confirm"))})}var l=s(e),f=s(t),d=s(n),p=s(a),h=s(o),w=s(i);s(r);window.jQuery=jQuery,window.$=jQuery,window._=_,window.Backbone=Backbone,window.panels=l.default,_.extend(window,f.default),window.async_save_text=d.default,window.make_popupmenu=p.default.make_popupmenu,window.make_popup_menus=p.default.make_popup_menus,window.init_tag_click_function=h.default,window.init_refresh_on_change=c,$(document).ready(function(){function e(){void 0!==Galaxy.root?$.getJSON(Galaxy.root+"api/webhooks/onload/all",function(e){_.each(e,function(e){e.activate&&e.script&&($("<script/>",{type:"text/javascript"}).text(e.script).appendTo("head"),$("<style/>",{type:"text/css"}).text(e.styles).appendTo("head"))})}):setTimeout(e,100)}c(),$.fn.tooltip&&($(".unified-panel-header [title]").tooltip({placement:"bottom"}),$("[title]").tooltip()),make_popup_menus(),u(20,1500),$("a").click(function(){var e=$(this),t=parent.frames&&parent.frames.galaxy_main;if("galaxy_main"==e.attr("target")&&!t){var n=e.attr("href");-1==n.indexOf("?")?n+="?":n+="&",n+="use_panels=True",e.attr("href",n),e.attr("target","_self")}return e});var t=JSON.parse(sessionStorage.getItem("activeGalaxyTour"));if(t&&(t=w.default.hooked_tour_from_data(t))&&t.steps&&window&&window.self===window.top){var n=new Tour(_.extend({steps:t.steps},w.default.tour_opts));n.init(),n.restart()}e()})});
define("onload",["layout/panel","layout/modal","utils/async-save-text","ui/popupmenu","ui/autocom_tagging","mvc/tours"],function(e,t,n,a,o,i){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){function a(e){var t={placeholder:"Click to select",closeOnSelect:!$(e).is("[MULTIPLE]"),dropdownAutoWidth:!0,containerCssClass:"select2-minwidth"};return e.select2(t)}jQuery.fn.select2&&(void 0===e&&(e=20),void 0===t&&(t=3e3),(n=n||$("select")).each(function(){var n=$(this).not("[multiple]"),o=n.find("option").length;o<e||o>t||n.hasClass("no-autocomplete")||a(n)}))}function u(){$("select[refresh_on_change='true']").off("change").change(function(){var e=$(this),t=e.val(),n=e.attr("refresh_on_change_values");if(n){n=n.split(",");var a=e.attr("last_selected_value");if(-1===$.inArray(t,n)&&-1===$.inArray(a,n))return}$(window).trigger("refresh_on_change"),$(document).trigger("convert_to_values"),e.get(0).form.submit()}),$(":checkbox[refresh_on_change='true']").off("click").click(function(){var e=$(this),t=e.val(),n=e.attr("refresh_on_change_values");if(n){n=n.split(",");var a=e.attr("last_selected_value");if(-1===$.inArray(t,n)&&-1===$.inArray(a,n))return}$(window).trigger("refresh_on_change"),e.get(0).form.submit()}),$("a[confirm]").off("click").click(function(){return confirm($(this).attr("confirm"))})}var l=r(e),s=r(t),f=r(n),d=r(a),p=r(o),h=r(i);window.jQuery=jQuery,window.$=jQuery,window._=_,window.Backbone=Backbone,window.panels=l.default,_.extend(window,s.default),window.async_save_text=f.default,window.make_popupmenu=d.default.make_popupmenu,window.make_popup_menus=d.default.make_popup_menus,window.init_tag_click_function=p.default,window.init_refresh_on_change=u,$(document).ready(function(){function e(){Galaxy.config?Galaxy.config.enable_webhooks&&$.getJSON(Galaxy.root+"api/webhooks/onload/all",function(e){_.each(e,function(e){e.activate&&e.script&&($("<script/>",{type:"text/javascript"}).text(e.script).appendTo("head"),$("<style/>",{type:"text/css"}).text(e.styles).appendTo("head"))})}):setTimeout(e,100)}u(),$.fn.tooltip&&($(".unified-panel-header [title]").tooltip({placement:"bottom"}),$("[title]").tooltip()),d.default.make_popup_menus(),c(20,1500),$("a").click(function(){var e=$(this),t=window.parent.frames&&window.parent.frames.galaxy_main;if("galaxy_main"==e.attr("target")&&!t){var n=e.attr("href");-1==n.indexOf("?")?n+="?":n+="&",n+="use_panels=True",e.attr("href",n),e.attr("target","_self")}return e}),h.default.activeGalaxyTourRunner(),e()})});