mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Combine scratchbook requires
This commit is contained in:
@@ -1,163 +1,170 @@
|
||||
/** Frame manager uses the ui-frames to create the scratch book masthead icon and functionality **/
|
||||
define(["mvc/ui/ui-frames"], function(Frames) {
|
||||
return Backbone.View.extend({
|
||||
initialize: function(options) {
|
||||
var self = this;
|
||||
options = options || {};
|
||||
this.frames = new Frames.View({ visible: false });
|
||||
this.setElement(this.frames.$el);
|
||||
this.buttonActive = options.collection.add({
|
||||
id: "enable-scratchbook",
|
||||
icon: "fa-th",
|
||||
tooltip: _l("Enable/Disable Scratchbook"),
|
||||
onclick: function() {
|
||||
self.active = !self.active;
|
||||
self.buttonActive.set({
|
||||
toggle: self.active,
|
||||
show_note: self.active,
|
||||
note_cls: self.active && "fa fa-check"
|
||||
});
|
||||
!self.active && self.frames.hide();
|
||||
},
|
||||
onbeforeunload: function() {
|
||||
if (self.frames.length() > 0) {
|
||||
return (
|
||||
"You opened " +
|
||||
self.frames.length() +
|
||||
" frame(s) which will be lost."
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.buttonLoad = options.collection.add({
|
||||
id: "show-scratchbook",
|
||||
icon: "fa-eye",
|
||||
tooltip: _l("Show/Hide Scratchbook"),
|
||||
show_note: true,
|
||||
visible: false,
|
||||
onclick: function(e) {
|
||||
self.frames.visible
|
||||
? self.frames.hide()
|
||||
: self.frames.show();
|
||||
}
|
||||
});
|
||||
this.frames
|
||||
.on("add remove", function() {
|
||||
this.visible && this.length() == 0 && this.hide();
|
||||
self.buttonLoad.set({
|
||||
note: this.length(),
|
||||
visible: this.length() > 0
|
||||
});
|
||||
})
|
||||
.on("show hide ", function() {
|
||||
self.buttonLoad.set({
|
||||
toggle: this.visible,
|
||||
icon: (this.visible && "fa-eye") || "fa-eye-slash"
|
||||
});
|
||||
});
|
||||
this.history_cache = {};
|
||||
},
|
||||
|
||||
/** Add a dataset to the frames */
|
||||
addDataset: function(dataset_id) {
|
||||
var self = this;
|
||||
var current_dataset = null;
|
||||
if (Galaxy && Galaxy.currHistoryPanel) {
|
||||
var history_id = Galaxy.currHistoryPanel.collection.historyId;
|
||||
this.history_cache[history_id] = {
|
||||
name: Galaxy.currHistoryPanel.model.get("name"),
|
||||
dataset_ids: []
|
||||
};
|
||||
Galaxy.currHistoryPanel.collection.each(function(model) {
|
||||
!model.get("deleted") &&
|
||||
model.get("visible") &&
|
||||
self.history_cache[history_id].dataset_ids.push(
|
||||
model.get("id")
|
||||
);
|
||||
});
|
||||
}
|
||||
var _findDataset = function(dataset, offset) {
|
||||
if (dataset) {
|
||||
var history_details =
|
||||
self.history_cache[dataset.get("history_id")];
|
||||
if (history_details && history_details.dataset_ids) {
|
||||
var dataset_list = history_details.dataset_ids;
|
||||
var pos = dataset_list.indexOf(dataset.get("id"));
|
||||
if (
|
||||
pos !== -1 &&
|
||||
pos + offset >= 0 &&
|
||||
pos + offset < dataset_list.length
|
||||
) {
|
||||
return dataset_list[pos + offset];
|
||||
define(
|
||||
[
|
||||
"mvc/ui/ui-frames",
|
||||
"mvc/dataset/data",
|
||||
"viz/visualization",
|
||||
"viz/trackster"
|
||||
],
|
||||
function(Frames, DATA, visualization, trackster) {
|
||||
return Backbone.View.extend({
|
||||
initialize: function(options) {
|
||||
var self = this;
|
||||
options = options || {};
|
||||
this.frames = new Frames.View({ visible: false });
|
||||
this.setElement(this.frames.$el);
|
||||
this.buttonActive = options.collection.add({
|
||||
id: "enable-scratchbook",
|
||||
icon: "fa-th",
|
||||
tooltip: _l("Enable/Disable Scratchbook"),
|
||||
onclick: function() {
|
||||
self.active = !self.active;
|
||||
self.buttonActive.set({
|
||||
toggle: self.active,
|
||||
show_note: self.active,
|
||||
note_cls: self.active && "fa fa-check"
|
||||
});
|
||||
!self.active && self.frames.hide();
|
||||
},
|
||||
onbeforeunload: function() {
|
||||
if (self.frames.length() > 0) {
|
||||
return (
|
||||
"You opened " +
|
||||
self.frames.length() +
|
||||
" frame(s) which will be lost."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var _loadDatasetOffset = function(dataset, offset, frame) {
|
||||
var new_dataset_id = _findDataset(dataset, offset);
|
||||
if (new_dataset_id) {
|
||||
self._loadDataset(new_dataset_id, function(
|
||||
new_dataset,
|
||||
config
|
||||
) {
|
||||
current_dataset = new_dataset;
|
||||
frame.model.set(config);
|
||||
});
|
||||
this.buttonLoad = options.collection.add({
|
||||
id: "show-scratchbook",
|
||||
icon: "fa-eye",
|
||||
tooltip: _l("Show/Hide Scratchbook"),
|
||||
show_note: true,
|
||||
visible: false,
|
||||
onclick: function(e) {
|
||||
self.frames.visible
|
||||
? self.frames.hide()
|
||||
: self.frames.show();
|
||||
}
|
||||
});
|
||||
this.frames
|
||||
.on("add remove", function() {
|
||||
this.visible && this.length() == 0 && this.hide();
|
||||
self.buttonLoad.set({
|
||||
note: this.length(),
|
||||
visible: this.length() > 0
|
||||
});
|
||||
})
|
||||
.on("show hide ", function() {
|
||||
self.buttonLoad.set({
|
||||
toggle: this.visible,
|
||||
icon: (this.visible && "fa-eye") || "fa-eye-slash"
|
||||
});
|
||||
});
|
||||
} else {
|
||||
frame.model.trigger("change");
|
||||
}
|
||||
};
|
||||
this._loadDataset(dataset_id, function(dataset, config) {
|
||||
current_dataset = dataset;
|
||||
self.add(
|
||||
_.extend(
|
||||
{
|
||||
menu: [
|
||||
{
|
||||
icon: "fa fa-chevron-circle-left",
|
||||
tooltip: "Previous in History",
|
||||
onclick: function(frame) {
|
||||
_loadDatasetOffset(
|
||||
current_dataset,
|
||||
-1,
|
||||
frame
|
||||
);
|
||||
},
|
||||
disabled: function() {
|
||||
return !_findDataset(
|
||||
current_dataset,
|
||||
-1
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
icon: "fa fa-chevron-circle-right",
|
||||
tooltip: "Next in History",
|
||||
onclick: function(frame) {
|
||||
_loadDatasetOffset(
|
||||
current_dataset,
|
||||
1,
|
||||
frame
|
||||
);
|
||||
},
|
||||
disabled: function() {
|
||||
return !_findDataset(
|
||||
current_dataset,
|
||||
1
|
||||
);
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
config
|
||||
)
|
||||
);
|
||||
});
|
||||
},
|
||||
this.history_cache = {};
|
||||
},
|
||||
|
||||
_loadDataset: function(dataset_id, callback) {
|
||||
var self = this;
|
||||
require(["mvc/dataset/data"], function(DATA) {
|
||||
/** Add a dataset to the frames */
|
||||
addDataset: function(dataset_id) {
|
||||
var self = this;
|
||||
var current_dataset = null;
|
||||
if (Galaxy && Galaxy.currHistoryPanel) {
|
||||
var history_id =
|
||||
Galaxy.currHistoryPanel.collection.historyId;
|
||||
this.history_cache[history_id] = {
|
||||
name: Galaxy.currHistoryPanel.model.get("name"),
|
||||
dataset_ids: []
|
||||
};
|
||||
Galaxy.currHistoryPanel.collection.each(function(model) {
|
||||
!model.get("deleted") &&
|
||||
model.get("visible") &&
|
||||
self.history_cache[history_id].dataset_ids.push(
|
||||
model.get("id")
|
||||
);
|
||||
});
|
||||
}
|
||||
var _findDataset = function(dataset, offset) {
|
||||
if (dataset) {
|
||||
var history_details =
|
||||
self.history_cache[dataset.get("history_id")];
|
||||
if (history_details && history_details.dataset_ids) {
|
||||
var dataset_list = history_details.dataset_ids;
|
||||
var pos = dataset_list.indexOf(dataset.get("id"));
|
||||
if (
|
||||
pos !== -1 &&
|
||||
pos + offset >= 0 &&
|
||||
pos + offset < dataset_list.length
|
||||
) {
|
||||
return dataset_list[pos + offset];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var _loadDatasetOffset = function(dataset, offset, frame) {
|
||||
var new_dataset_id = _findDataset(dataset, offset);
|
||||
if (new_dataset_id) {
|
||||
self._loadDataset(new_dataset_id, function(
|
||||
new_dataset,
|
||||
config
|
||||
) {
|
||||
current_dataset = new_dataset;
|
||||
frame.model.set(config);
|
||||
});
|
||||
} else {
|
||||
frame.model.trigger("change");
|
||||
}
|
||||
};
|
||||
this._loadDataset(dataset_id, function(dataset, config) {
|
||||
current_dataset = dataset;
|
||||
self.add(
|
||||
_.extend(
|
||||
{
|
||||
menu: [
|
||||
{
|
||||
icon: "fa fa-chevron-circle-left",
|
||||
tooltip: "Previous in History",
|
||||
onclick: function(frame) {
|
||||
_loadDatasetOffset(
|
||||
current_dataset,
|
||||
-1,
|
||||
frame
|
||||
);
|
||||
},
|
||||
disabled: function() {
|
||||
return !_findDataset(
|
||||
current_dataset,
|
||||
-1
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
icon: "fa fa-chevron-circle-right",
|
||||
tooltip: "Next in History",
|
||||
onclick: function(frame) {
|
||||
_loadDatasetOffset(
|
||||
current_dataset,
|
||||
1,
|
||||
frame
|
||||
);
|
||||
},
|
||||
disabled: function() {
|
||||
return !_findDataset(
|
||||
current_dataset,
|
||||
1
|
||||
);
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
config
|
||||
)
|
||||
);
|
||||
});
|
||||
},
|
||||
|
||||
_loadDataset: function(dataset_id, callback) {
|
||||
var self = this;
|
||||
var dataset = new DATA.Dataset({ id: dataset_id });
|
||||
$.when(dataset.fetch()).then(function() {
|
||||
var is_tabular = _.find(["tabular", "interval"], function(
|
||||
@@ -200,16 +207,11 @@ define(["mvc/ui/ui-frames"], function(Frames) {
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
/** Add a trackster visualization to the frames. */
|
||||
addTrackster: function(viz_id) {
|
||||
var self = this;
|
||||
require(["viz/visualization", "viz/trackster"], function(
|
||||
visualization,
|
||||
trackster
|
||||
) {
|
||||
/** Add a trackster visualization to the frames. */
|
||||
addTrackster: function(viz_id) {
|
||||
var self = this;
|
||||
var viz = new visualization.Visualization({ id: viz_id });
|
||||
$.when(viz.fetch()).then(function() {
|
||||
var ui = new trackster.TracksterUI(Galaxy.root);
|
||||
@@ -250,39 +252,39 @@ define(["mvc/ui/ui-frames"], function(Frames) {
|
||||
};
|
||||
self.add(frame_config);
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
/** Add and display a new frame/window based on options. */
|
||||
add: function(options) {
|
||||
if (options.target == "_blank") {
|
||||
window.open(options.url);
|
||||
} else if (
|
||||
options.target == "_top" ||
|
||||
options.target == "_parent" ||
|
||||
options.target == "_self"
|
||||
) {
|
||||
window.location = options.url;
|
||||
} else if (!this.active || options.noscratchbook) {
|
||||
var $galaxy_main = $(window.parent.document).find(
|
||||
"#galaxy_main"
|
||||
);
|
||||
if (
|
||||
options.target == "galaxy_main" ||
|
||||
options.target == "center"
|
||||
/** Add and display a new frame/window based on options. */
|
||||
add: function(options) {
|
||||
if (options.target == "_blank") {
|
||||
window.open(options.url);
|
||||
} else if (
|
||||
options.target == "_top" ||
|
||||
options.target == "_parent" ||
|
||||
options.target == "_self"
|
||||
) {
|
||||
if ($galaxy_main.length === 0) {
|
||||
window.location =
|
||||
options.url +
|
||||
(options.url.indexOf("?") == -1 ? "?" : "&") +
|
||||
"use_panels=True";
|
||||
} else {
|
||||
$galaxy_main.attr("src", options.url);
|
||||
}
|
||||
} else window.location = options.url;
|
||||
} else {
|
||||
this.frames.add(options);
|
||||
window.location = options.url;
|
||||
} else if (!this.active || options.noscratchbook) {
|
||||
var $galaxy_main = $(window.parent.document).find(
|
||||
"#galaxy_main"
|
||||
);
|
||||
if (
|
||||
options.target == "galaxy_main" ||
|
||||
options.target == "center"
|
||||
) {
|
||||
if ($galaxy_main.length === 0) {
|
||||
window.location =
|
||||
options.url +
|
||||
(options.url.indexOf("?") == -1 ? "?" : "&") +
|
||||
"use_panels=True";
|
||||
} else {
|
||||
$galaxy_main.attr("src", options.url);
|
||||
}
|
||||
} else window.location = options.url;
|
||||
} else {
|
||||
this.frames.add(options);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
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,2 +1,2 @@
|
||||
webpackJsonp([4],{116:function(e,t,i){"use strict";(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}var n=i(0),r=a(n),o=i(42),l=i(4),u=a(l),d=i(43),c=a(d),p=r.default;window.app=function(i,a){window.Galaxy=new o.GalaxyApp(i,a),Galaxy.debug("login app");var n=encodeURI(i.redirect);if(!i.show_welcome_with_login){var l=r.default.param({use_panels:"True",redirect:n});return void(window.location.href=Galaxy.root+"user/login?"+l)}var d=e.View.extend({initialize:function(t){this.page=t,this.model=new e.Model({title:(0,u.default)("Login required")}),this.setElement(this._template())},render:function(){this.page.$("#galaxy_main").prop("src",i.welcome_url)},_template:function(){return'<iframe src="'+i.root+"user/login?"+p.param({redirect:n})+'" frameborder="0" style="width: 100%; height: 100%;"/>'}});p(function(){Galaxy.page=new c.default.View(t.extend(i,{Right:d}))})}}).call(t,i(1),i(2))}},[116]);
|
||||
webpackJsonp([2],{102:function(e,t,i){"use strict";(function(e,t){function a(e){return e&&e.__esModule?e:{default:e}}var n=i(0),r=a(n),o=i(24),l=i(4),u=a(l),d=i(25),c=a(d),p=r.default;window.app=function(i,a){window.Galaxy=new o.GalaxyApp(i,a),Galaxy.debug("login app");var n=encodeURI(i.redirect);if(!i.show_welcome_with_login){var l=r.default.param({use_panels:"True",redirect:n});return void(window.location.href=Galaxy.root+"user/login?"+l)}var d=e.View.extend({initialize:function(t){this.page=t,this.model=new e.Model({title:(0,u.default)("Login required")}),this.setElement(this._template())},render:function(){this.page.$("#galaxy_main").prop("src",i.welcome_url)},_template:function(){return'<iframe src="'+i.root+"user/login?"+p.param({redirect:n})+'" frameborder="0" style="width: 100%; height: 100%;"/>'}});p(function(){Galaxy.page=new c.default.View(t.extend(i,{Right:d}))})}}).call(t,i(2),i(1))}},[102]);
|
||||
//# sourceMappingURL=login.bundled.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
define([],function(){"use strict";define(["mvc/ui/ui-frames"],function(t){return Backbone.View.extend({initialize:function(e){var i=this;e=e||{},this.frames=new t.View({visible:!1}),this.setElement(this.frames.$el),this.buttonActive=e.collection.add({id:"enable-scratchbook",icon:"fa-th",tooltip:_l("Enable/Disable Scratchbook"),onclick:function(){i.active=!i.active,i.buttonActive.set({toggle:i.active,show_note:i.active,note_cls:i.active&&"fa fa-check"}),!i.active&&i.frames.hide()},onbeforeunload:function(){if(i.frames.length()>0)return"You opened "+i.frames.length()+" frame(s) which will be lost."}}),this.buttonLoad=e.collection.add({id:"show-scratchbook",icon:"fa-eye",tooltip:_l("Show/Hide Scratchbook"),show_note:!0,visible:!1,onclick:function(t){i.frames.visible?i.frames.hide():i.frames.show()}}),this.frames.on("add remove",function(){this.visible&&0==this.length()&&this.hide(),i.buttonLoad.set({note:this.length(),visible:this.length()>0})}).on("show hide ",function(){i.buttonLoad.set({toggle:this.visible,icon:this.visible&&"fa-eye"||"fa-eye-slash"})}),this.history_cache={}},addDataset:function(t){var e=this,i=null;if(Galaxy&&Galaxy.currHistoryPanel){var a=Galaxy.currHistoryPanel.collection.historyId;this.history_cache[a]={name:Galaxy.currHistoryPanel.model.get("name"),dataset_ids:[]},Galaxy.currHistoryPanel.collection.each(function(t){!t.get("deleted")&&t.get("visible")&&e.history_cache[a].dataset_ids.push(t.get("id"))})}var n=function(t,i){if(t){var a=e.history_cache[t.get("history_id")];if(a&&a.dataset_ids){var n=a.dataset_ids,o=n.indexOf(t.get("id"));if(-1!==o&&o+i>=0&&o+i<n.length)return n[o+i]}}},o=function(t,a,o){var r=n(t,a);r?e._loadDataset(r,function(t,e){i=t,o.model.set(e)}):o.model.trigger("change")};this._loadDataset(t,function(t,a){i=t,e.add(_.extend({menu:[{icon:"fa fa-chevron-circle-left",tooltip:"Previous in History",onclick:function(t){o(i,-1,t)},disabled:function(){return!n(i,-1)}},{icon:"fa fa-chevron-circle-right",tooltip:"Next in History",onclick:function(t){o(i,1,t)},disabled:function(){return!n(i,1)}}]},a))})},_loadDataset:function(t,e){var i=this;require(["mvc/dataset/data"],function(a){var n=new a.Dataset({id:t});$.when(n.fetch()).then(function(){var o=_.find(["tabular","interval"],function(t){return-1!==n.get("data_type").indexOf(t)}),r=n.get("name"),c=i.history_cache[n.get("history_id")];c&&(r=c.name+": "+r),e(n,o?{title:r,url:null,content:a.createTabularDatasetChunkedView({model:new a.TabularDataset(n.toJSON()),embedded:!0,height:"100%"}).$el}:{title:r,url:Galaxy.root+"datasets/"+t+"/display/?preview=True",content:null})})})},addTrackster:function(t){var e=this;require(["viz/visualization","viz/trackster"],function(i,a){var n=new i.Visualization({id:t});$.when(n.fetch()).then(function(){var t=new a.TracksterUI(Galaxy.root),i={title:n.get("name"),type:"other",content:function(e){var i={container:e,name:n.get("title"),id:n.id,dbkey:n.get("dbkey"),stand_alone:!1},a=n.get("latest_revision"),o=a.config.view.drawables;_.each(o,function(t){t.dataset={hda_ldda:t.hda_ldda,id:t.dataset_id}}),view=t.create_visualization(i,a.config.viewport,a.config.view.drawables,a.config.bookmarks,!1)}};e.add(i)})})},add:function(t){if("_blank"==t.target)window.open(t.url);else if("_top"==t.target||"_parent"==t.target||"_self"==t.target)window.location=t.url;else if(!this.active||t.noscratchbook){var e=$(window.parent.document).find("#galaxy_main");"galaxy_main"==t.target||"center"==t.target?0===e.length?window.location=t.url+(-1==t.url.indexOf("?")?"?":"&")+"use_panels=True":e.attr("src",t.url):window.location=t.url}else this.frames.add(t)}})})});
|
||||
define([],function(){"use strict";define(["mvc/ui/ui-frames","mvc/dataset/data","viz/visualization","viz/trackster"],function(t,e,i,a){return Backbone.View.extend({initialize:function(e){var i=this;e=e||{},this.frames=new t.View({visible:!1}),this.setElement(this.frames.$el),this.buttonActive=e.collection.add({id:"enable-scratchbook",icon:"fa-th",tooltip:_l("Enable/Disable Scratchbook"),onclick:function(){i.active=!i.active,i.buttonActive.set({toggle:i.active,show_note:i.active,note_cls:i.active&&"fa fa-check"}),!i.active&&i.frames.hide()},onbeforeunload:function(){if(i.frames.length()>0)return"You opened "+i.frames.length()+" frame(s) which will be lost."}}),this.buttonLoad=e.collection.add({id:"show-scratchbook",icon:"fa-eye",tooltip:_l("Show/Hide Scratchbook"),show_note:!0,visible:!1,onclick:function(t){i.frames.visible?i.frames.hide():i.frames.show()}}),this.frames.on("add remove",function(){this.visible&&0==this.length()&&this.hide(),i.buttonLoad.set({note:this.length(),visible:this.length()>0})}).on("show hide ",function(){i.buttonLoad.set({toggle:this.visible,icon:this.visible&&"fa-eye"||"fa-eye-slash"})}),this.history_cache={}},addDataset:function(t){var e=this,i=null;if(Galaxy&&Galaxy.currHistoryPanel){var a=Galaxy.currHistoryPanel.collection.historyId;this.history_cache[a]={name:Galaxy.currHistoryPanel.model.get("name"),dataset_ids:[]},Galaxy.currHistoryPanel.collection.each(function(t){!t.get("deleted")&&t.get("visible")&&e.history_cache[a].dataset_ids.push(t.get("id"))})}var n=function(t,i){if(t){var a=e.history_cache[t.get("history_id")];if(a&&a.dataset_ids){var n=a.dataset_ids,o=n.indexOf(t.get("id"));if(-1!==o&&o+i>=0&&o+i<n.length)return n[o+i]}}},o=function(t,a,o){var s=n(t,a);s?e._loadDataset(s,function(t,e){i=t,o.model.set(e)}):o.model.trigger("change")};this._loadDataset(t,function(t,a){i=t,e.add(_.extend({menu:[{icon:"fa fa-chevron-circle-left",tooltip:"Previous in History",onclick:function(t){o(i,-1,t)},disabled:function(){return!n(i,-1)}},{icon:"fa fa-chevron-circle-right",tooltip:"Next in History",onclick:function(t){o(i,1,t)},disabled:function(){return!n(i,1)}}]},a))})},_loadDataset:function(t,i){var a=this,n=new e.Dataset({id:t});$.when(n.fetch()).then(function(){var o=_.find(["tabular","interval"],function(t){return-1!==n.get("data_type").indexOf(t)}),s=n.get("name"),c=a.history_cache[n.get("history_id")];c&&(s=c.name+": "+s),i(n,o?{title:s,url:null,content:e.createTabularDatasetChunkedView({model:new e.TabularDataset(n.toJSON()),embedded:!0,height:"100%"}).$el}:{title:s,url:Galaxy.root+"datasets/"+t+"/display/?preview=True",content:null})})},addTrackster:function(t){var e=this,n=new i.Visualization({id:t});$.when(n.fetch()).then(function(){var t=new a.TracksterUI(Galaxy.root),i={title:n.get("name"),type:"other",content:function(e){var i={container:e,name:n.get("title"),id:n.id,dbkey:n.get("dbkey"),stand_alone:!1},a=n.get("latest_revision"),o=a.config.view.drawables;_.each(o,function(t){t.dataset={hda_ldda:t.hda_ldda,id:t.dataset_id}}),view=t.create_visualization(i,a.config.viewport,a.config.view.drawables,a.config.bookmarks,!1)}};e.add(i)})},add:function(t){if("_blank"==t.target)window.open(t.url);else if("_top"==t.target||"_parent"==t.target||"_self"==t.target)window.location=t.url;else if(!this.active||t.noscratchbook){var e=$(window.parent.document).find("#galaxy_main");"galaxy_main"==t.target||"center"==t.target?0===e.length?window.location=t.url+(-1==t.url.indexOf("?")?"?":"&")+"use_panels=True":e.attr("src",t.url):window.location=t.url}else this.frames.add(t)}})})});
|
||||
//# sourceMappingURL=../../maps/layout/scratchbook.js.map
|
||||
|
||||
Reference in New Issue
Block a user