mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #5116 from dannon/onload_webhook_segmentation
Onload webhook toggles.
This commit is contained in:
@@ -76,7 +76,7 @@ window.app = function app(options, bootstrapped) {
|
||||
|
||||
show_tours: function(tour_id) {
|
||||
if (tour_id) {
|
||||
Tours.giveTour(tour_id);
|
||||
Tours.giveTourById(tour_id);
|
||||
} else {
|
||||
this.page.display(new Tours.ToursView());
|
||||
}
|
||||
|
||||
@@ -4,7 +4,10 @@ import _l from "utils/localization";
|
||||
* rendering a tour menu.
|
||||
*/
|
||||
|
||||
import * as BootstrapTour from "libs/bootstrap-tour";
|
||||
// bootstrap-tour configures a window.Tour object; keep a local ref.
|
||||
import "libs/bootstrap-tour";
|
||||
let Tour = window.Tour;
|
||||
|
||||
var gxy_root = typeof Galaxy === "undefined" ? "/" : Galaxy.root;
|
||||
|
||||
var tourpage_template = `<h2>Galaxy Tours</h2>
|
||||
@@ -93,31 +96,8 @@ var Tours = Backbone.Collection.extend({
|
||||
model: TourItem
|
||||
});
|
||||
|
||||
var giveTour = tour_id => {
|
||||
var url = `${gxy_root}api/tours/${tour_id}`;
|
||||
$.getJSON(url, data => {
|
||||
// Set hooks for additional click and data entry actions.
|
||||
var tourdata = hooked_tour_from_data(data);
|
||||
sessionStorage.setItem("activeGalaxyTour", JSON.stringify(data));
|
||||
// Store tour steps in sessionStorage to easily persist w/o hackery.
|
||||
var tour = new Tour(
|
||||
_.extend(
|
||||
{
|
||||
steps: tourdata.steps
|
||||
},
|
||||
tour_opts
|
||||
)
|
||||
);
|
||||
// Always clean restart, since this is a new, explicit giveTour execution.
|
||||
tour.init();
|
||||
tour.goTo(0);
|
||||
tour.restart();
|
||||
});
|
||||
};
|
||||
|
||||
var ToursView = Backbone.View.extend({
|
||||
export var ToursView = Backbone.View.extend({
|
||||
title: _l("Tours"),
|
||||
// initialize
|
||||
initialize: function() {
|
||||
var self = this;
|
||||
this.setElement("<div/>");
|
||||
@@ -165,7 +145,7 @@ var ToursView = Backbone.View.extend({
|
||||
)
|
||||
.on("click", ".tourItem", function(e) {
|
||||
e.preventDefault();
|
||||
giveTour($(this).data("tour.id"));
|
||||
giveTourById($(this).data("tour.id"));
|
||||
})
|
||||
.on("click", ".tag-selector-button", e => {
|
||||
var elem = $(e.target);
|
||||
@@ -183,9 +163,53 @@ var ToursView = Backbone.View.extend({
|
||||
}
|
||||
});
|
||||
|
||||
export function giveTourWithData(data) {
|
||||
let hookedTourData = hooked_tour_from_data(data);
|
||||
sessionStorage.setItem("activeGalaxyTour", JSON.stringify(data));
|
||||
// Store tour steps in sessionStorage to easily persist w/o hackery.
|
||||
let tour = new Tour(_.extend({ steps: hookedTourData.steps }, tour_opts));
|
||||
// Always clean restart, since this is a new, explicit execution.
|
||||
tour.init();
|
||||
tour.goTo(0);
|
||||
tour.restart();
|
||||
return tour;
|
||||
}
|
||||
|
||||
export function giveTourById(tour_id) {
|
||||
var url = `${gxy_root}api/tours/${tour_id}`;
|
||||
$.getJSON(url, data => {
|
||||
giveTourWithData(data);
|
||||
});
|
||||
}
|
||||
|
||||
export function activeGalaxyTourRunner() {
|
||||
var et = JSON.parse(sessionStorage.getItem("activeGalaxyTour"));
|
||||
if (et) {
|
||||
et = hooked_tour_from_data(et);
|
||||
if (et && et.steps) {
|
||||
if (window && window.self === window.top) {
|
||||
// Only kick off a new tour if this is the toplevel window (non-iframe). This
|
||||
// functionality actually *could* be useful, but we'd need to handle it better and
|
||||
// come up with some design guidelines for tours jumping between windows.
|
||||
// Disabling for now.
|
||||
var tour = new Tour(
|
||||
_.extend(
|
||||
{
|
||||
steps: et.steps
|
||||
},
|
||||
tour_opts
|
||||
)
|
||||
);
|
||||
tour.init();
|
||||
tour.restart();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
ToursView: ToursView,
|
||||
hooked_tour_from_data: hooked_tour_from_data,
|
||||
tour_opts: tour_opts,
|
||||
giveTour: giveTour
|
||||
giveTourWithData: giveTourWithData,
|
||||
giveTourById: giveTourById,
|
||||
activeGalaxyTourRunner: activeGalaxyTourRunner
|
||||
};
|
||||
|
||||
@@ -19,13 +19,12 @@ import layout_modal from "layout/modal";
|
||||
_.extend(window, layout_modal);
|
||||
import async_save_text from "utils/async-save-text";
|
||||
window.async_save_text = async_save_text;
|
||||
import POPUPMENU from "ui/popupmenu";
|
||||
window.make_popupmenu = POPUPMENU.make_popupmenu;
|
||||
window.make_popup_menus = POPUPMENU.make_popup_menus;
|
||||
import Popupmenu from "ui/popupmenu";
|
||||
window.make_popupmenu = Popupmenu.make_popupmenu;
|
||||
window.make_popup_menus = Popupmenu.make_popup_menus;
|
||||
import init_tag_click_function from "ui/autocom_tagging";
|
||||
window.init_tag_click_function = init_tag_click_function;
|
||||
import TOURS from "mvc/tours";
|
||||
import QUERY_STRING from "utils/query-string-parsing";
|
||||
import Tours from "mvc/tours";
|
||||
// console.debug( 'galaxy globals loaded' );
|
||||
|
||||
// ============================================================================
|
||||
@@ -89,10 +88,7 @@ function init_refresh_on_change() {
|
||||
.change(function() {
|
||||
var select_field = $(this);
|
||||
var select_val = select_field.val();
|
||||
var refresh = false;
|
||||
|
||||
var ref_on_change_vals = select_field.attr("refresh_on_change_values");
|
||||
|
||||
if (ref_on_change_vals) {
|
||||
ref_on_change_vals = ref_on_change_vals.split(",");
|
||||
var last_selected_value = select_field.attr("last_selected_value");
|
||||
@@ -114,10 +110,7 @@ function init_refresh_on_change() {
|
||||
.click(function() {
|
||||
var select_field = $(this);
|
||||
var select_val = select_field.val();
|
||||
var refresh = false;
|
||||
|
||||
var ref_on_change_vals = select_field.attr("refresh_on_change_values");
|
||||
|
||||
if (ref_on_change_vals) {
|
||||
ref_on_change_vals = ref_on_change_vals.split(",");
|
||||
var last_selected_value = select_field.attr("last_selected_value");
|
||||
@@ -156,7 +149,7 @@ $(document).ready(() => {
|
||||
$("[title]").tooltip();
|
||||
}
|
||||
// Make popup menus.
|
||||
make_popup_menus();
|
||||
Popupmenu.make_popup_menus();
|
||||
|
||||
// Replace big selects.
|
||||
replace_big_select_inputs(20, 1500);
|
||||
@@ -165,7 +158,7 @@ $(document).ready(() => {
|
||||
// add use_panels=True and set target to self.
|
||||
$("a").click(function() {
|
||||
var anchor = $(this);
|
||||
var galaxy_main_exists = parent.frames && parent.frames.galaxy_main;
|
||||
var galaxy_main_exists = window.parent.frames && window.parent.frames.galaxy_main;
|
||||
if (anchor.attr("target") == "galaxy_main" && !galaxy_main_exists) {
|
||||
var href = anchor.attr("href");
|
||||
if (href.indexOf("?") == -1) {
|
||||
@@ -180,44 +173,26 @@ $(document).ready(() => {
|
||||
return anchor;
|
||||
});
|
||||
|
||||
var et = JSON.parse(sessionStorage.getItem("activeGalaxyTour"));
|
||||
if (et) {
|
||||
et = TOURS.hooked_tour_from_data(et);
|
||||
if (et && et.steps) {
|
||||
if (window && window.self === window.top) {
|
||||
// Only kick off a new tour if this is the toplevel window (non-iframe). This
|
||||
// functionality actually *could* be useful, but we'd need to handle it better and
|
||||
// come up with some design guidelines for tours jumping between windows.
|
||||
// Disabling for now.
|
||||
var tour = new Tour(
|
||||
_.extend(
|
||||
{
|
||||
steps: et.steps
|
||||
},
|
||||
TOURS.tour_opts
|
||||
)
|
||||
);
|
||||
tour.init();
|
||||
tour.restart();
|
||||
}
|
||||
}
|
||||
}
|
||||
Tours.activeGalaxyTourRunner();
|
||||
|
||||
function onloadWebhooks() {
|
||||
if (Galaxy.root !== undefined) {
|
||||
// Load all webhooks with the type 'onload'
|
||||
$.getJSON(`${Galaxy.root}api/webhooks/onload/all`, webhooks => {
|
||||
_.each(webhooks, webhook => {
|
||||
if (webhook.activate && webhook.script) {
|
||||
$("<script/>", { type: "text/javascript" })
|
||||
.text(webhook.script)
|
||||
.appendTo("head");
|
||||
$("<style/>", { type: "text/css" })
|
||||
.text(webhook.styles)
|
||||
.appendTo("head");
|
||||
}
|
||||
// Wait until Galaxy.config is loaded.
|
||||
if (Galaxy.config) {
|
||||
if (Galaxy.config.enable_webhooks) {
|
||||
// Load all webhooks with the type 'onload'
|
||||
$.getJSON(`${Galaxy.root}api/webhooks/onload/all`, webhooks => {
|
||||
_.each(webhooks, webhook => {
|
||||
if (webhook.activate && webhook.script) {
|
||||
$("<script/>", { type: "text/javascript" })
|
||||
.text(webhook.script)
|
||||
.appendTo("head");
|
||||
$("<style/>", { type: "text/css" })
|
||||
.text(webhook.styles)
|
||||
.appendTo("head");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
setTimeout(onloadWebhooks, 100);
|
||||
}
|
||||
|
||||
@@ -58,17 +58,7 @@ $(document).ready(function() {
|
||||
},
|
||||
|
||||
_generateTour: function(data) {
|
||||
var tourData = Tours.default.hooked_tour_from_data(data);
|
||||
sessionStorage.setItem('activeGalaxyTour', JSON.stringify(data));
|
||||
|
||||
// Generate and run the tour
|
||||
var tour = new Tour(_.extend({
|
||||
steps: tourData.steps
|
||||
}));
|
||||
tour.init();
|
||||
tour.goTo(0);
|
||||
tour.restart();
|
||||
|
||||
var tour = Tours.giveTourWithData(data);
|
||||
// Force ending the tour when pressing the Execute button
|
||||
$('#execute').on('mousedown', function() {
|
||||
if (tour) {
|
||||
|
||||
@@ -52,6 +52,7 @@ class RootController(controller.JSAppLauncher, UsesAnnotations):
|
||||
config = {
|
||||
'active_view' : 'analysis',
|
||||
'enable_cloud_launch' : app.config.get_bool('enable_cloud_launch', False),
|
||||
'enable_webhooks' : True if app.webhooks_registry.webhooks else False,
|
||||
# TODO: next two should be redundant - why can't we build one from the other?
|
||||
'toolbox' : app.toolbox.to_dict(trans, in_panel=False),
|
||||
'toolbox_in_panel' : app.toolbox.to_dict(trans),
|
||||
|
||||
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 @@
|
||||
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 @@
|
||||
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()})});
|
||||
Reference in New Issue
Block a user