Merge pull request #1422 from dannon/interactive_tours

Interactive Tours
This commit is contained in:
Björn Grüning
2016-01-05 20:21:46 +01:00
43 changed files with 1557 additions and 70 deletions
+1
View File
@@ -14,6 +14,7 @@
"underscore": "~1.7.0",
"backbone": "~1.1.2",
"bootstrap": "~3.3.2",
"bootstrap-tour":"~0.10.2",
"d3": "~3.5.3",
"farbtastic": "~2.0.0-alpha.1",
"toastr": "~2.1.0",
+8 -1
View File
@@ -1,5 +1,5 @@
/** Masthead Collection **/
define([], function() {
define(['mvc/tours'], function( Tours ) {
var Collection = Backbone.Collection.extend({
model: Backbone.Model.extend({
defaults: {
@@ -142,6 +142,12 @@ var Collection = Backbone.Collection.extend({
title : 'How to Cite Galaxy',
url : options.citation_url,
target : '_blank'
},{
title : 'Interactive Tours',
onclick : function(c){
Galaxy.app.display(new Tours.ToursView());
},
target : 'galaxy_main'
}]
};
options.terms_url && helpTab.menu.push({
@@ -244,6 +250,7 @@ var Tab = Backbone.View.extend({
this.$menu = this.$( '.dropdown-menu' );
this.$note = this.$( '.dropdown-note' );
this.model = options.model;
this.$el.attr( 'id', this.model.id );
this.model.on( 'init change:title', function() {
this.get( 'title' ) && self.$toggle.html( this.get( 'title' ) );
}).on( 'init change:visible', function() {
@@ -7,6 +7,7 @@ return Backbone.View.extend({
this.frames = new Frames.View({ visible : false });
this.setElement( this.frames.$el );
this.buttonActive = options.collection.add({
id : 'enable-scratchbook',
icon : 'fa-th',
tooltip : 'Enable/Disable Scratchbook',
onclick : function() {
@@ -25,6 +26,7 @@ return Backbone.View.extend({
}
});
this.buttonLoad = options.collection.add({
id : 'show-scratchbook',
icon : 'fa-eye',
tooltip : 'Show/Hide Scratchbook',
show_note : true,
+802
View File
@@ -0,0 +1,802 @@
/* ========================================================================
* bootstrap-tour - v0.10.1
* http://bootstraptour.com
* ========================================================================
* Copyright 2012-2013 Ulrich Sossou
*
* ========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================================
*/
(function($, window) {
var Tour, document;
document = window.document;
Tour = (function() {
function Tour(options) {
var storage;
try {
storage = window.localStorage;
} catch (_error) {
storage = false;
}
this._options = $.extend({
name: 'tour',
steps: [],
container: 'body',
autoscroll: true,
keyboard: true,
storage: storage,
debug: false,
backdrop: false,
backdropPadding: 0,
redirect: true,
orphan: false,
duration: false,
delay: false,
basePath: '',
template: '<div class="popover" role="tooltip"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev">&laquo; Prev</button> <button class="btn btn-sm btn-default" data-role="next">Next &raquo;</button> <button class="btn btn-sm btn-default" data-role="pause-resume" data-pause-text="Pause" data-resume-text="Resume">Pause</button> </div> <button class="btn btn-sm btn-default" data-role="end">End tour</button> </div> </div>',
afterSetState: function(key, value) {},
afterGetState: function(key, value) {},
afterRemoveState: function(key) {},
onStart: function(tour) {},
onEnd: function(tour) {},
onShow: function(tour) {},
onShown: function(tour) {},
onHide: function(tour) {},
onHidden: function(tour) {},
onNext: function(tour) {},
onPrev: function(tour) {},
onPause: function(tour, duration) {},
onResume: function(tour, duration) {}
}, options);
this._force = false;
this._inited = false;
this.backdrop = {
overlay: null,
$element: null,
$background: null,
backgroundShown: false,
overlayElementShown: false
};
this;
}
Tour.prototype.addSteps = function(steps) {
var step, _i, _len;
for (_i = 0, _len = steps.length; _i < _len; _i++) {
step = steps[_i];
this.addStep(step);
}
return this;
};
Tour.prototype.addStep = function(step) {
this._options.steps.push(step);
return this;
};
Tour.prototype.getStep = function(i) {
if (this._options.steps[i] != null) {
return $.extend({
id: "step-" + i,
path: '',
placement: 'right',
title: '',
content: '<p></p>',
next: i === this._options.steps.length - 1 ? -1 : i + 1,
prev: i - 1,
animation: true,
container: this._options.container,
autoscroll: this._options.autoscroll,
backdrop: this._options.backdrop,
backdropPadding: this._options.backdropPadding,
redirect: this._options.redirect,
orphan: this._options.orphan,
duration: this._options.duration,
delay: this._options.delay,
template: this._options.template,
onShow: this._options.onShow,
onShown: this._options.onShown,
onHide: this._options.onHide,
onHidden: this._options.onHidden,
onNext: this._options.onNext,
onPrev: this._options.onPrev,
onPause: this._options.onPause,
onResume: this._options.onResume
}, this._options.steps[i]);
}
};
Tour.prototype.init = function(force) {
this._force = force;
if (this.ended()) {
this._debug('Tour ended, init prevented.');
return this;
}
this.setCurrentStep();
this._initMouseNavigation();
this._initKeyboardNavigation();
this._onResize((function(_this) {
return function() {
return _this.showStep(_this._current);
};
})(this));
if (this._current !== null) {
this.showStep(this._current);
}
this._inited = true;
return this;
};
Tour.prototype.start = function(force) {
var promise;
if (force == null) {
force = false;
}
if (!this._inited) {
this.init(force);
}
if (this._current === null) {
promise = this._makePromise(this._options.onStart != null ? this._options.onStart(this) : void 0);
this._callOnPromiseDone(promise, this.showStep, 0);
}
return this;
};
Tour.prototype.next = function() {
var promise;
promise = this.hideStep(this._current);
return this._callOnPromiseDone(promise, this._showNextStep);
};
Tour.prototype.prev = function() {
var promise;
promise = this.hideStep(this._current);
return this._callOnPromiseDone(promise, this._showPrevStep);
};
Tour.prototype.goTo = function(i) {
var promise;
promise = this.hideStep(this._current);
return this._callOnPromiseDone(promise, this.showStep, i);
};
Tour.prototype.end = function() {
var endHelper, promise;
endHelper = (function(_this) {
return function(e) {
$(document).off("click.tour-" + _this._options.name);
$(document).off("keyup.tour-" + _this._options.name);
$(window).off("resize.tour-" + _this._options.name);
_this._setState('end', 'yes');
_this._inited = false;
_this._force = false;
_this._clearTimer();
if (_this._options.onEnd != null) {
return _this._options.onEnd(_this);
}
};
})(this);
promise = this.hideStep(this._current);
return this._callOnPromiseDone(promise, endHelper);
};
Tour.prototype.ended = function() {
return !this._force && !!this._getState('end');
};
Tour.prototype.restart = function() {
this._removeState('current_step');
this._removeState('end');
return this.start();
};
Tour.prototype.pause = function() {
var step;
step = this.getStep(this._current);
if (!(step && step.duration)) {
return this;
}
this._paused = true;
this._duration -= new Date().getTime() - this._start;
window.clearTimeout(this._timer);
this._debug("Paused/Stopped step " + (this._current + 1) + " timer (" + this._duration + " remaining).");
if (step.onPause != null) {
return step.onPause(this, this._duration);
}
};
Tour.prototype.resume = function() {
var step;
step = this.getStep(this._current);
if (!(step && step.duration)) {
return this;
}
this._paused = false;
this._start = new Date().getTime();
this._duration = this._duration || step.duration;
this._timer = window.setTimeout((function(_this) {
return function() {
if (_this._isLast()) {
return _this.next();
} else {
return _this.end();
}
};
})(this), this._duration);
this._debug("Started step " + (this._current + 1) + " timer with duration " + this._duration);
if ((step.onResume != null) && this._duration !== step.duration) {
return step.onResume(this, this._duration);
}
};
Tour.prototype.hideStep = function(i) {
var hideStepHelper, promise, step;
step = this.getStep(i);
if (!step) {
return;
}
this._clearTimer();
promise = this._makePromise(step.onHide != null ? step.onHide(this, i) : void 0);
hideStepHelper = (function(_this) {
return function(e) {
var $element;
$element = $(step.element);
if (!($element.data('bs.popover') || $element.data('popover'))) {
$element = $('body');
}
$element.popover('destroy').removeClass("tour-" + _this._options.name + "-element tour-" + _this._options.name + "-" + i + "-element");
if (step.reflex) {
$element.removeClass('tour-step-element-reflex').off("" + (_this._reflexEvent(step.reflex)) + ".tour-" + _this._options.name);
}
if (step.backdrop) {
_this._hideBackdrop();
}
if (step.onHidden != null) {
return step.onHidden(_this);
}
};
})(this);
this._callOnPromiseDone(promise, hideStepHelper);
return promise;
};
Tour.prototype.showStep = function(i) {
var promise, showStepHelper, skipToPrevious, step;
if (this.ended()) {
this._debug('Tour ended, showStep prevented.');
return this;
}
step = this.getStep(i);
if (!step) {
return;
}
skipToPrevious = i < this._current;
promise = this._makePromise(step.onShow != null ? step.onShow(this, i) : void 0);
showStepHelper = (function(_this) {
return function(e) {
var current_path, path, showPopoverAndOverlay;
_this.setCurrentStep(i);
path = (function() {
switch ({}.toString.call(step.path)) {
case '[object Function]':
return step.path();
case '[object String]':
return this._options.basePath + step.path;
default:
return step.path;
}
}).call(_this);
current_path = [document.location.pathname, document.location.hash].join('');
if (_this._isRedirect(path, current_path)) {
_this._redirect(step, path);
return;
}
if (_this._isOrphan(step)) {
if (!step.orphan) {
_this._debug("Skip the orphan step " + (_this._current + 1) + ".\nOrphan option is false and the element does not exist or is hidden.");
if (skipToPrevious) {
_this._showPrevStep();
} else {
_this._showNextStep();
}
return;
}
_this._debug("Show the orphan step " + (_this._current + 1) + ". Orphans option is true.");
}
if (step.backdrop) {
_this._showBackdrop(!_this._isOrphan(step) ? step.element : void 0);
}
showPopoverAndOverlay = function() {
if (_this.getCurrentStep() !== i) {
return;
}
if ((step.element != null) && step.backdrop) {
_this._showOverlayElement(step);
}
_this._showPopover(step, i);
if (step.onShown != null) {
step.onShown(_this);
}
return _this._debug("Step " + (_this._current + 1) + " of " + _this._options.steps.length);
};
if (step.autoscroll) {
_this._scrollIntoView(step.element, showPopoverAndOverlay);
} else {
showPopoverAndOverlay();
}
if (step.duration) {
return _this.resume();
}
};
})(this);
if (step.delay) {
this._debug("Wait " + step.delay + " milliseconds to show the step " + (this._current + 1));
window.setTimeout((function(_this) {
return function() {
return _this._callOnPromiseDone(promise, showStepHelper);
};
})(this), step.delay);
} else {
this._callOnPromiseDone(promise, showStepHelper);
}
return promise;
};
Tour.prototype.getCurrentStep = function() {
return this._current;
};
Tour.prototype.setCurrentStep = function(value) {
if (value != null) {
this._current = value;
this._setState('current_step', value);
} else {
this._current = this._getState('current_step');
this._current = this._current === null ? null : parseInt(this._current, 10);
}
return this;
};
Tour.prototype._setState = function(key, value) {
var e, keyName;
if (this._options.storage) {
keyName = "" + this._options.name + "_" + key;
try {
this._options.storage.setItem(keyName, value);
} catch (_error) {
e = _error;
if (e.code === DOMException.QUOTA_EXCEEDED_ERR) {
this._debug('LocalStorage quota exceeded. State storage failed.');
}
}
return this._options.afterSetState(keyName, value);
} else {
if (this._state == null) {
this._state = {};
}
return this._state[key] = value;
}
};
Tour.prototype._removeState = function(key) {
var keyName;
if (this._options.storage) {
keyName = "" + this._options.name + "_" + key;
this._options.storage.removeItem(keyName);
return this._options.afterRemoveState(keyName);
} else {
if (this._state != null) {
return delete this._state[key];
}
}
};
Tour.prototype._getState = function(key) {
var keyName, value;
if (this._options.storage) {
keyName = "" + this._options.name + "_" + key;
value = this._options.storage.getItem(keyName);
} else {
if (this._state != null) {
value = this._state[key];
}
}
if (value === void 0 || value === 'null') {
value = null;
}
this._options.afterGetState(key, value);
return value;
};
Tour.prototype._showNextStep = function() {
var promise, showNextStepHelper, step;
step = this.getStep(this._current);
showNextStepHelper = (function(_this) {
return function(e) {
return _this.showStep(step.next);
};
})(this);
promise = this._makePromise(step.onNext != null ? step.onNext(this) : void 0);
return this._callOnPromiseDone(promise, showNextStepHelper);
};
Tour.prototype._showPrevStep = function() {
var promise, showPrevStepHelper, step;
step = this.getStep(this._current);
showPrevStepHelper = (function(_this) {
return function(e) {
return _this.showStep(step.prev);
};
})(this);
promise = this._makePromise(step.onPrev != null ? step.onPrev(this) : void 0);
return this._callOnPromiseDone(promise, showPrevStepHelper);
};
Tour.prototype._debug = function(text) {
if (this._options.debug) {
return window.console.log("Bootstrap Tour '" + this._options.name + "' | " + text);
}
};
Tour.prototype._isRedirect = function(path, currentPath) {
return (path != null) && path !== '' && (({}.toString.call(path) === '[object RegExp]' && !path.test(currentPath)) || ({}.toString.call(path) === '[object String]' && path.replace(/\?.*$/, '').replace(/\/?$/, '') !== currentPath.replace(/\/?$/, '')));
};
Tour.prototype._redirect = function(step, path) {
if ($.isFunction(step.redirect)) {
return step.redirect.call(this, path);
} else if (step.redirect === true) {
this._debug("Redirect to " + path);
return document.location.href = path;
}
};
Tour.prototype._isOrphan = function(step) {
return (step.element == null) || !$(step.element).length || $(step.element).is(':hidden') && ($(step.element)[0].namespaceURI !== 'http://www.w3.org/2000/svg');
};
Tour.prototype._isLast = function() {
return this._current < this._options.steps.length - 1;
};
Tour.prototype._showPopover = function(step, i) {
var $element, $tip, isOrphan, options;
$(".tour-" + this._options.name).remove();
options = $.extend({}, this._options);
isOrphan = this._isOrphan(step);
step.template = this._template(step, i);
if (isOrphan) {
step.element = 'body';
step.placement = 'top';
}
$element = $(step.element);
$element.addClass("tour-" + this._options.name + "-element tour-" + this._options.name + "-" + i + "-element");
if (step.options) {
$.extend(options, step.options);
}
if (step.reflex && !isOrphan) {
$element.addClass('tour-step-element-reflex');
$element.off("" + (this._reflexEvent(step.reflex)) + ".tour-" + this._options.name);
$element.on("" + (this._reflexEvent(step.reflex)) + ".tour-" + this._options.name, (function(_this) {
return function() {
if (_this._isLast()) {
return _this.next();
} else {
return _this.end();
}
};
})(this));
}
$element.popover({
placement: step.placement,
trigger: 'manual',
title: step.title,
content: step.content,
html: true,
animation: step.animation,
container: step.container,
template: step.template,
selector: step.element
}).popover('show');
$tip = $element.data('bs.popover') ? $element.data('bs.popover').tip() : $element.data('popover').tip();
$tip.attr('id', step.id);
this._reposition($tip, step);
if (isOrphan) {
return this._center($tip);
}
};
Tour.prototype._template = function(step, i) {
var $navigation, $next, $prev, $resume, $template;
$template = $.isFunction(step.template) ? $(step.template(i, step)) : $(step.template);
$navigation = $template.find('.popover-navigation');
$prev = $navigation.find('[data-role="prev"]');
$next = $navigation.find('[data-role="next"]');
$resume = $navigation.find('[data-role="pause-resume"]');
if (this._isOrphan(step)) {
$template.addClass('orphan');
}
$template.addClass("tour-" + this._options.name + " tour-" + this._options.name + "-" + i);
if (step.prev < 0) {
$prev.addClass('disabled');
}
if (step.next < 0) {
$next.addClass('disabled');
}
if (!step.duration) {
$resume.remove();
}
return $template.clone().wrap('<div>').parent().html();
};
Tour.prototype._reflexEvent = function(reflex) {
if ({}.toString.call(reflex) === '[object Boolean]') {
return 'click';
} else {
return reflex;
}
};
Tour.prototype._reposition = function($tip, step) {
var offsetBottom, offsetHeight, offsetRight, offsetWidth, originalLeft, originalTop, tipOffset;
offsetWidth = $tip[0].offsetWidth;
offsetHeight = $tip[0].offsetHeight;
tipOffset = $tip.offset();
originalLeft = tipOffset.left;
originalTop = tipOffset.top;
offsetBottom = $(document).outerHeight() - tipOffset.top - $tip.outerHeight();
if (offsetBottom < 0) {
tipOffset.top = tipOffset.top + offsetBottom;
}
offsetRight = $('html').outerWidth() - tipOffset.left - $tip.outerWidth();
if (offsetRight < 0) {
tipOffset.left = tipOffset.left + offsetRight;
}
if (tipOffset.top < 0) {
tipOffset.top = 0;
}
if (tipOffset.left < 0) {
tipOffset.left = 0;
}
$tip.offset(tipOffset);
if (step.placement === 'bottom' || step.placement === 'top') {
if (originalLeft !== tipOffset.left) {
return this._replaceArrow($tip, (tipOffset.left - originalLeft) * 2, offsetWidth, 'left');
}
} else {
if (originalTop !== tipOffset.top) {
return this._replaceArrow($tip, (tipOffset.top - originalTop) * 2, offsetHeight, 'top');
}
}
};
Tour.prototype._center = function($tip) {
return $tip.css('top', $(window).outerHeight() / 2 - $tip.outerHeight() / 2);
};
Tour.prototype._replaceArrow = function($tip, delta, dimension, position) {
return $tip.find('.arrow').css(position, delta ? 50 * (1 - delta / dimension) + '%' : '');
};
Tour.prototype._scrollIntoView = function(element, callback) {
var $element, $window, counter, offsetTop, scrollTop, windowHeight;
$element = $(element);
if (!$element.length) {
return callback();
}
$window = $(window);
offsetTop = $element.offset().top;
windowHeight = $window.height();
scrollTop = Math.max(0, offsetTop - (windowHeight / 2));
this._debug("Scroll into view. ScrollTop: " + scrollTop + ". Element offset: " + offsetTop + ". Window height: " + windowHeight + ".");
counter = 0;
return $('body, html').stop(true, true).animate({
scrollTop: Math.ceil(scrollTop)
}, (function(_this) {
return function() {
if (++counter === 2) {
callback();
return _this._debug("Scroll into view.\nAnimation end element offset: " + ($element.offset().top) + ".\nWindow height: " + ($window.height()) + ".");
}
};
})(this));
};
Tour.prototype._onResize = function(callback, timeout) {
return $(window).on("resize.tour-" + this._options.name, function() {
clearTimeout(timeout);
return timeout = setTimeout(callback, 100);
});
};
Tour.prototype._initMouseNavigation = function() {
var _this;
_this = this;
return $(document).off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='prev']").off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='next']").off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='end']").off("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='pause-resume']").on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='next']", (function(_this) {
return function(e) {
e.preventDefault();
return _this.next();
};
})(this)).on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='prev']", (function(_this) {
return function(e) {
e.preventDefault();
return _this.prev();
};
})(this)).on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='end']", (function(_this) {
return function(e) {
e.preventDefault();
return _this.end();
};
})(this)).on("click.tour-" + this._options.name, ".popover.tour-" + this._options.name + " *[data-role='pause-resume']", function(e) {
var $this;
e.preventDefault();
$this = $(this);
$this.text(_this._paused ? $this.data('pause-text') : $this.data('resume-text'));
if (_this._paused) {
return _this.resume();
} else {
return _this.pause();
}
});
};
Tour.prototype._initKeyboardNavigation = function() {
if (!this._options.keyboard) {
return;
}
return $(document).on("keyup.tour-" + this._options.name, (function(_this) {
return function(e) {
if (!e.which) {
return;
}
switch (e.which) {
case 39:
e.preventDefault();
if (_this._isLast()) {
return _this.next();
} else {
return _this.end();
}
break;
case 37:
e.preventDefault();
if (_this._current > 0) {
return _this.prev();
}
break;
case 27:
e.preventDefault();
return _this.end();
}
};
})(this));
};
Tour.prototype._makePromise = function(result) {
if (result && $.isFunction(result.then)) {
return result;
} else {
return null;
}
};
Tour.prototype._callOnPromiseDone = function(promise, cb, arg) {
if (promise) {
return promise.then((function(_this) {
return function(e) {
return cb.call(_this, arg);
};
})(this));
} else {
return cb.call(this, arg);
}
};
Tour.prototype._showBackdrop = function(element) {
if (this.backdrop.backgroundShown) {
return;
}
this.backdrop = $('<div>', {
"class": 'tour-backdrop'
});
this.backdrop.backgroundShown = true;
return $('body').append(this.backdrop);
};
Tour.prototype._hideBackdrop = function() {
this._hideOverlayElement();
return this._hideBackground();
};
Tour.prototype._hideBackground = function() {
if (this.backdrop) {
this.backdrop.remove();
this.backdrop.overlay = null;
return this.backdrop.backgroundShown = false;
}
};
Tour.prototype._showOverlayElement = function(step) {
var $element, elementData;
$element = $(step.element);
if (!$element || $element.length === 0 || this.backdrop.overlayElementShown) {
return;
}
this.backdrop.overlayElementShown = true;
this.backdrop.$element = $element.addClass('tour-step-backdrop');
this.backdrop.$background = $('<div>', {
"class": 'tour-step-background'
});
elementData = {
width: $element.innerWidth(),
height: $element.innerHeight(),
offset: $element.offset()
};
this.backdrop.$background.appendTo('body');
if (step.backdropPadding) {
elementData = this._applyBackdropPadding(step.backdropPadding, elementData);
}
return this.backdrop.$background.width(elementData.width).height(elementData.height).offset(elementData.offset);
};
Tour.prototype._hideOverlayElement = function() {
if (!this.backdrop.overlayElementShown) {
return;
}
this.backdrop.$element.removeClass('tour-step-backdrop');
this.backdrop.$background.remove();
this.backdrop.$element = null;
this.backdrop.$background = null;
return this.backdrop.overlayElementShown = false;
};
Tour.prototype._applyBackdropPadding = function(padding, data) {
if (typeof padding === 'object') {
if (padding.top == null) {
padding.top = 0;
}
if (padding.right == null) {
padding.right = 0;
}
if (padding.bottom == null) {
padding.bottom = 0;
}
if (padding.left == null) {
padding.left = 0;
}
data.offset.top = data.offset.top - padding.top;
data.offset.left = data.offset.left - padding.left;
data.width = data.width + padding.left + padding.right;
data.height = data.height + padding.top + padding.bottom;
} else {
data.offset.top = data.offset.top - padding;
data.offset.left = data.offset.left - padding;
data.width = data.width + (padding * 2);
data.height = data.height + (padding * 2);
}
return data;
};
Tour.prototype._clearTimer = function() {
window.clearTimeout(this._timer);
this._timer = null;
return this._duration = null;
};
return Tour;
})();
return window.Tour = Tour;
})(jQuery, window);
@@ -332,4 +332,4 @@ define([ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/form/form-view', 'mvc/form/form-d
return {
View: View
};
});
});
+130
View File
@@ -0,0 +1,130 @@
/**
* This is the primary galaxy tours definition, currently only used for
* rendering a tour menu.
*
* For now it's intended to be plunked into the center display a-la
* Galaxy.app.display, but we could use a modal as well for more flexibility.
*
* DBTODO - This is downright backbone abuse, rewrite it.
*/
define(['libs/bootstrap-tour'],function(BootstrapTour) {
var tour_opts = { storage: window.sessionStorage,
onEnd: function(){
sessionStorage.removeItem('activeGalaxyTour');
},
delay: 150, // Attempts to make it look natural
orphan:true
}
var hooked_tour_from_data = function(data){
_.each(data.steps, function(step) {
if (step.preclick){
step.onShow= function(){
_.each(step.preclick, function(preclick){
// TODO: click delay between clicks
$(preclick).click();
});
};
}
if (step.postclick){
step.onHide = function(){
_.each(step.postclick, function(postclick){
// TODO: click delay between clicks
$(postclick).click();
});
};
}
if (step.textinsert){
// Have to manually trigger a change here, for some
// elements which have additional logic, like the
// upload input box
step.onShown= function(){
$(step.element).val(step.textinsert).trigger("change")
};
}
});
return data;
}
// DBTODO: there's probably a better way to do this for pages which don't
// have Galaxy objects.
if (typeof Galaxy != "undefined") {
var gxy_root = Galaxy.root;
}else{
var gxy_root = '/';
}
var TourItem = Backbone.Model.extend({
urlRoot: gxy_root + 'api/tours',
});
var Tours = Backbone.Collection.extend({
url: gxy_root + 'api/tours',
model: TourItem,
});
var giveTour = function(tour_id){
var url = gxy_root + 'api/tours/' + tour_id;
$.getJSON( url, function( data ) {
// Set hooks for additional click and data entry actions.
tourdata = hooked_tour_from_data(data);
console.log(tourdata);
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({
// initialize
initialize: function(options) {
var self = this;
this.setElement('<div/>');
this.model = new Tours()
this.model.fetch({
success: function( model ){
self.render();
},
error: function( model, response ){
// Do something.
console.error("Failed to fetch tours.");
}
});
},
render: function(){
var self = this;
var tpl = _.template([
"<h2>Galaxy Tours</h2>",
"<p>This page presents a list of interactive tours available on this Galaxy server. ",
"Select any tour to get started (and remember, you can click 'End Tour' at any time).</p>",
"<ul>",
'<% _.each(tours, function(tour) { %>',
'<li>',
'<a href="#" class="tourItem" data-tour.id=<%- tour.id %>>',
'<%- tour.attributes.name || tour.id %>',
'</a>',
' - <%- tour.attributes.description || "No description given." %>',
'</li>',
'<% }); %>',
"</ul>"].join(''));
this.$el.html(tpl({tours: this.model.models})).on("click", ".tourItem", function(e){
giveTour($(this).data("tour.id"));
});
}
});
return {ToursView: ToursView,
hooked_tour_from_data: hooked_tour_from_data,
tour_opts: tour_opts,
giveTour: giveTour}
});
@@ -77,7 +77,7 @@ var View = Backbone.View.extend({
return '<div class="upload-button">' +
'<div class="progress">' +
'<div class="progress-bar"/>' +
'<a class="panel-header-button" href="javascript:void(0)">' +
'<a class="panel-header-button" href="javascript:void(0)" id="tool-panel-upload-button">' +
'<span class="fa fa-upload"/>' +
'</a>' +
'</div>' +
+36
View File
@@ -20,6 +20,7 @@ var POPUPMENU = require( 'ui/popupmenu' );
window.make_popupmenu = POPUPMENU.make_popupmenu;
window.make_popup_menus = POPUPMENU.make_popup_menus;
window.init_tag_click_function = require( 'ui/autocom_tagging' );
var TOURS = require( 'mvc/tours' );
// console.debug( 'galaxy globals loaded' );
// ============================================================================
@@ -165,4 +166,39 @@ $(document).ready( function() {
return anchor;
});
try{
// So, depending on what elements your tour is hooked to, this may not
// work on some pages with some rendered content because of view
// rendering delays.
// Another option is to present an icon for 'continue-tour' somewhere?
urlparms = _.object(_.compact(_.map(location.search.slice(1).split('&'), function(item) { if (item) return item.split('='); })));
if (urlparms.tour_id){
var tour_id = urlparms.tour_id;
delete urlparms.tour_id;
var url = $(location).attr('href');
var repacked_url_args = _.map(Object.getOwnPropertyNames(urlparms), function(k) { return "?" + [k, urlparms[k]].join('=') }).join('&');
url = window.location.href.split('?')[0];
if (repacked_url_args !== "?"){
url = url + repacked_url_args;
}
history.pushState(null, null, url);
TOURS.giveTour(tour_id);
}
else{
et = JSON.parse(sessionStorage.getItem('activeGalaxyTour'));
if (et){
et = TOURS.hooked_tour_from_data(et);
if (et && et.steps){
var tour = new Tour(_.extend({
steps: et.steps,
}, TOURS.tour_opts));
tour.init();
tour.restart();
}
}
}
}
catch(ex){
console.log("Tour loading failure, you'll need to restart the tour manually." + ex);
}
});
+2 -1
View File
@@ -23,6 +23,7 @@ module.exports = function( grunt ){
'farbtastic': [ 'src/farbtastic.js', 'farbtastic.js' ],
'jQTouch': [ 'src/reference/jqtouch.js', 'jquery/jqtouch.js' ],
'bootstrap-tour': [ 'build/js/bootstrap-tour.js', 'bootstrap-tour.js' ],
// these need to be updated and tested
//'jquery-form': [ 'jquery.form.js', 'jquery/jquery.form.js' ],
@@ -90,4 +91,4 @@ module.exports = function( grunt ){
grunt.registerTask( 'copy-libs', 'copy external libraries to src', copyLibs );
grunt.registerTask( 'install-libs', 'fetch external libraries and copy to src',
[ 'bower-install-simple:prod', 'copy-libs' ] );
};
};
+1
View File
@@ -19,6 +19,7 @@ var webpack = require( 'webpack' ),
'libs/jquery.sparklines',
'libs/jquery/jquery-ui',
'libs/bootstrap',
'libs/bootstrap-tour',
// mvc
'libs/underscore',
'libs/backbone',
+10 -1
View File
@@ -273,9 +273,18 @@ paste.app_factory = galaxy.web.buildapp:app_factory
# environment plugins. By default none will be loaded. Set to
# config/plugins/interactive_environments to load Galaxy's stock plugins
# (currently just IPython). These will require Docker to be configured and
# have security considerations, so proceed with caution.
# have security considerations, so proceed with caution. The path is relative to the
# Galaxy root dir. To use an absolute path begin the path with '/'. This is a comma
# separated list.
#interactive_environment_plugins_directory =
# Interactive tour directory: where to store interactive tour definition files.
# Galaxy ships with several basic interface tours enabled, though a different
# directory with custom tours can be specified here. The path is relative to the
# Galaxy root dir. To use an absolute path begin the path with '/'. This is a comma
# separated list.
#tour_config_dir = config/plugins/tours
# Each job is given a unique empty directory as its current working directory.
# This option defines in what parent directory those directories will be
# created.
+96
View File
@@ -0,0 +1,96 @@
name: Galaxy UI
description: A gentle introduction to the Galaxy User Interface
title_default: "Welcome to Galaxy"
steps:
- title: "Welcome to Galaxy"
content: "This short tour will walk you through Galaxy's user interface."
backdrop: true
- element: ".upload-button"
intro: "Use this button to upload your data."
position: "right"
postclick:
- ".upload-button"
- element: "button#btn-local"
intro: "Upload data from your computer."
position: "top"
postclick:
- "button#btn-new"
- element: "button#btn-new"
intro: "Copy and Paste data or include URLs."
position: "top"
preclick:
- ".upload-button"
- element: "textarea#text-content"
intro: "Insert data into Galaxy."
position: "top"
textinsert: |
https://raw.githubusercontent.com/arq5x/bedtools/master/test/merge/a.full.bed
https://raw.githubusercontent.com/arq5x/bedtools/master/test/merge/a.full.bed
https://raw.githubusercontent.com/arq5x/bedtools/master/test/merge/a.full.bed
- element: "button#btn-start"
intro: "Upload the data into your Galaxy history."
position: "bottom"
postclick:
- "button#btn-start"
- element: "button#btn-close"
intro: "Hit the close button in upload."
position: "bottom"
postclick:
- "#btn-close"
- element: 'a[href$="tool_runner?tool_id=Filter1"]'
intro: "Tools are grouped into categories to make them easier to find."
position: "right"
preclick:
- 'a[href$="tool_runner?tool_id=Filter1"]'
postclick:
- "#title_filter a"
- element: '#center-panel'
intro: "This is your Filter tool."
position: "right"
preclick:
- '#center-panel'
- element: '#uid-0'
intro: "Your tool parameters."
position: "right"
- element: 'div.toolHelp'
intro: "Your tool parameters."
position: "right"
- element: '#execute'
intro: "Send your tool to the Compute Cluster."
position: "right"
preclick:
- '#execute'
- element: "#right"
intro: "This is your history! All anylysis steps will be recorded and can be redone at any time."
position: "left"
- element: "#masthead"
intro: "Your top panel will give you access to a lot of useful things."
position: "bottom"
- element: "#analysis"
intro: "Start your <b>analysis</b> from here."
position: "bottom"
- element: "#workflow"
intro: "Manage, Import, Export and Share your <b>Workflows</b>."
position: "bottom"
- element: "#shared"
intro: "Get access to all <b>Workflows, <b>Histories</b>, <b>Pages</b>, <b>Visualizations</b> and you <b>Data Library</b> that are shared with you."
position: "bottom"
- element: "#visualization"
intro: "Want to start visualize your data in Trackster? Start here!"
position: "bottom"
- element: "#help"
intro: "Here you get more help from the Galaxy <b>Community</b> with Videos and a QA board."
position: "bottom"
- element: "#user"
intro: "Login and start your analysis!"
position: "bottom"
+143
View File
@@ -0,0 +1,143 @@
name: History Introduction
description: A detailed introduction to the <b>Galaxy History</b>
title_default: "Galaxy History Introduction"
steps:
- content: "This short tour will walk you through <b>Galaxy's History</b> and datasets."
- element: ".upload-button"
intro: |
At first we get some data into your Galaxy and into your History.<br>
Use this button to upload your data.
position: "right"
postclick:
- ".upload-button"
- element: "button#btn-local"
intro: "Upload data from your computer."
position: "top"
postclick:
- "button#btn-new"
- element: "button#btn-new"
intro: "Copy and Paste data or include URLs to data which will be fetched automatically by Galaxy."
position: "top"
- element: "textarea#text-content"
intro: "We insert some URLs to get example data in Galaxy."
position: "bottom"
textinsert: |
file://home/bag/Bilder/Python-Programming-in-Galaxy.png
file://home/bag/Downloads/a.tab
- element: "button#btn-start"
intro: "Upload the data into your Galaxy <b>History</b>."
position: "bottom"
postclick:
- "button#btn-start"
- "button#btn-close"
- element: "#right"
intro: "This is your history! All anylysis steps will be recorded and can be redone at any time."
position: "left"
- element: "#dataset-2d9035b3fc152403"
intro: "This is one of your uploaded datasets. You can get more informations and options like different visualizations by clicking on it."
position: "left"
postclick:
- "#dataset-2d9035b3fc152403 > div.title-bar.clear > div > span.name"
- element: "#dataset-2d9035b3fc152403 > div.details > div.summary > div.datatype > label"
title: "Metadata"
intro: "Galaxy has assigned a datatype too your dataset during upload, which you can see here."
position: "left"
- element: "#dataset-2d9035b3fc152403 > div.details > div.actions.clear > div.left > a.download-btn.icon-btn"
title: "Download your dataset"
intro: "You can download every dataset by using the floppy disc symbol."
position: "left"
- element: "#dataset-2d9035b3fc152403 > div.details > div.actions.clear > div.left > a.icon-btn.params-btn"
title: "Even more information"
intro: "Get an overview of all metadata associated with your dataset by using the Information symbol."
position: "left"
preclick:
- "#dataset-2d9035b3fc152403 > div.details > div.actions.clear > div.left > a.icon-btn.params-btn"
- element: "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.display-btn"
title: "Inspect your data"
intro: "The eye symbol can be used to look at your data."
position: "left"
preclick:
- "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.display-btn"
- element: "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.edit-btn"
title: "Edit metadata"
intro: "With the pencil button you can edit metadata attributes of your dataset, like the associated filetype or the dataset name."
position: "left"
preclick:
- "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.edit-btn"
- element: "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.delete-btn"
title: "Remove datasets"
intro: "You can remove a dataset from the history with the cross symbol."
position: "left"
postclick:
- "#dataset-2d9035b3fc152403 > div.primary-actions > a.icon-btn.delete-btn"
- element: "#current-history-panel > div.controls > div.subtitle > a"
title: "Include all deleted datasets"
intro: "By default your history will hide all deleted datasets from you. You can visualize them by toggling this button."
position: "bottom"
postclick:
- "#current-history-panel > div.controls > div.subtitle > a"
- element: "#dataset-2d9035b3fc152403 > div.warnings > div > a"
title: "Undeleting a dataset"
intro: |
"Galaxy datasets are only marked as deleled and can be recovered by exeecuting this link.
Please note that datasets marked as deleted can be purged by your administrator at any time. :beer: "
position: "bottom"
postclick:
- "#dataset-2d9035b3fc152403 > div.warnings > div > a"
- element: "#current-history-panel > div.controls > div.subtitle > a"
title: "Hiding all deleted datasets"
intro: "Hiding datasets that were previously deleted works in the same way."
position: "bottom"
preclick:
- "#current-history-panel > div.controls > div.subtitle > a"
- element: "#current-history-panel > div.controls > div.title > div"
title: "Change your History name"
intro: "You can change the history name clicking on the title"
position: "bottom"
preclick:
- "#current-history-panel > div.controls > div.title > div"
- element: "#current-history-panel > div.controls > div.search > div > input"
title: "Search your History"
intro: "You can filter your history by typing your search term in here. Galaxy supports more advanced filters that can be seen here."
position: "left"
textinsert: "WWFSMD"
preclick:
- "#current-history-panel > div.controls > div.search > div > input"
- element: "#history-options-button"
title: "History Options"
intro: "In the History menue you will find a lot more usful History options."
position: "left"
postclick:
- "#history-options-button"
- element: "#history-options-button-menu > li:nth-child(2) > a"
title: "History structure"
intro: "See the structure of your History by clicking this item."
position: "left"
postclick:
- "#history-options-button-menu > li:nth-child(2) > a"
- title: "Enjoy your Galaxy Histories"
intro: "Thanks for taking this tour! Happy research with Galaxy!"
+3
View File
@@ -14,6 +14,7 @@ from galaxy.visualization.genomes import Genomes
from galaxy.visualization.data_providers.registry import DataProviderRegistry
from galaxy.visualization.plugins.registry import VisualizationsRegistry
from galaxy.tools.special_tools import load_lib_tools
from galaxy.tours import ToursRegistry
from galaxy.sample_tracking import external_service_types
from galaxy.openid.providers import OpenIDProviders
from galaxy.tools.data_manager.manager import DataManagers
@@ -105,6 +106,8 @@ class UniverseApplication( object, config.ConfiguresGalaxyMixin ):
self,
directories_setting=self.config.visualization_plugins_directory,
template_cache_dir=self.config.template_cache )
# Tours registry
self.tour_registry = ToursRegistry(self.config.tour_config_dir)
# Load security policy.
self.security_agent = self.model.security_agent
self.host_security_agent = galaxy.security.HostAgent(
+2
View File
@@ -106,6 +106,8 @@ class Configuration( object ):
self.user_label_filters = listify( kwargs.get( "user_tool_label_filters", [] ), do_strip=True )
self.user_section_filters = listify( kwargs.get( "user_tool_section_filters", [] ), do_strip=True )
self.tour_config_dir = resolve_path( kwargs.get("tour_config_dir", "config/plugins/tours"), self.root)
self.expose_user_name = kwargs.get( "expose_user_name", False )
self.expose_user_email = kwargs.get( "expose_user_email", False )
+80
View File
@@ -0,0 +1,80 @@
"""
This module manages loading/etc of Galaxy interactive tours.
"""
import os
import yaml
import logging
from galaxy import util
log = logging.getLogger( __name__ )
def tour_loader(contents_dict):
# Some of this can be done on the clientside. Maybe even should?
title_default = contents_dict.get('title_default', None)
for step in contents_dict['steps']:
if 'intro' in step:
step['content'] = step.pop('intro')
if 'position' in step:
step['placement'] = step.pop('position')
if 'element' not in step:
step['orphan'] = True
if title_default:
step['title'] = title_default
return contents_dict
class ToursRegistry(object):
def __init__(self, tour_directories):
self.tour_directories = util.config_directories_from_setting( tour_directories )
self.load_tours()
def tours_by_id_with_description(self):
return [{'id': k,
'description': self.tours[k].get('description', None),
'name': self.tours[k].get('name', None)}
for k in self.tours.keys()]
def load_tour(self, tour_id):
for tour_dir in self.tour_directories:
tour_path = os.path.join(self.tour_dir, tour_id + ".yaml")
if not os.path.exists(tour_path):
tour_path = os.path.join(self.tour_dir, tour_id + ".yml")
if os.path.exists(tour_path):
break
if os.path.exists(tour_path):
return self._load_tour_from_path(tour_path)
else:
return None
def load_tours(self):
self.tours = {}
for tour_dir in self.tour_directories:
for filename in os.listdir(tour_dir):
if filename.endswith('.yaml') or filename.endswith('.yml'):
self._load_tour_from_path(os.path.join(tour_dir, filename))
return self.tours_by_id_with_description()
def tour_contents(self, tour_id):
# Extra format translation could happen here (like the previous intro_to_tour)
# For now just return the loaded contents.
return self.tours.get(tour_id, None)
def _load_tour_from_path(self, tour_path):
filename = os.path.basename(tour_path)
tour_id = os.path.splitext(filename)[0]
try:
with open(tour_path) as handle:
conf = yaml.load(handle)
tour = tour_loader(conf)
self.tours[tour_id] = tour_loader(conf)
log.info("Loaded tour '%s'" % tour_id)
return tour
except IOError:
log.exception("Tour '%s' could not be loaded, error reading file." % tour_id)
except yaml.error.YAMLError:
log.exception("Tour '%s' could not be loaded, error within file. Please check your yaml syntax." % tour_id)
return None
+29
View File
@@ -1269,6 +1269,35 @@ def galaxy_directory():
return os.path.abspath(galaxy_root_path)
def config_directories_from_setting( directories_setting, galaxy_root=galaxy_root_path ):
"""
Parse the ``directories_setting`` into a list of relative or absolute
filesystem paths that will be searched to discover plugins.
:type galaxy_root: string
:param galaxy_root: the root path of this galaxy installation
:type directories_setting: string (default: None)
:param directories_setting: the filesystem path (or paths)
to search for plugins. Can be CSV string of paths. Will be treated as
absolute if a path starts with '/', relative otherwise.
:rtype: list of strings
:returns: list of filesystem paths
"""
directories = []
if not directories_setting:
return directories
for directory in listify( directories_setting ):
directory = directory.strip()
if not directory.startswith( '/' ):
directory = os.path.join( galaxy_root, directory )
if not os.path.exists( directory ):
log.warn( 'directory not found: %s', directory )
continue
directories.append( directory )
return directories
def parse_int(value, min_val=None, max_val=None, default=None, allow_none=False):
try:
value = int(value)
+1 -29
View File
@@ -64,39 +64,11 @@ class PluginManager( object ):
self.skip_bad_plugins = skip_bad_plugins
self.plugins = odict.odict()
self.directories = self.parse_directories_setting( app.config.root, directories_setting )
self.directories = util.config_directories_from_setting( directories_setting, app.config.root )
self.load_configuration()
self.load_plugins()
def parse_directories_setting( self, galaxy_root, directories_setting ):
"""
Parse the ``directories_setting`` into a list of relative or absolute
filesystem paths that will be searched to discover plugins.
:type galaxy_root: string
:param galaxy_root: the root path of this galaxy installation
:type directories_setting: string (default: None)
:param directories_setting: the filesystem path (or paths)
to search for plugins. Can be CSV string of paths. Will be treated as
absolute if a path starts with '/', relative otherwise.
:rtype: list of strings
:returns: list of filesystem paths
"""
directories = []
if not directories_setting:
return directories
for directory in util.listify( directories_setting ):
directory = directory.strip()
if not directory.startswith( '/' ):
directory = os.path.join( galaxy_root, directory )
if not os.path.exists( directory ):
log.warn( '%s, directory not found: %s', self, directory )
continue
directories.append( directory )
return directories
def load_configuration( self ):
"""
Override to load some framework/plugin specifc configuration.
+47
View File
@@ -0,0 +1,47 @@
"""
API Controller providing Galaxy Tours
"""
import logging
from galaxy.web import _future_expose_api_anonymous_and_sessionless as expose_api_anonymous_and_sessionless
from galaxy.web import require_admin
from galaxy.web import expose_api
from galaxy.web.base.controller import BaseAPIController
log = logging.getLogger( __name__ )
class ToursController( BaseAPIController ):
def __init__( self, app ):
super( ToursController, self ).__init__( app )
@expose_api_anonymous_and_sessionless
def index( self, trans, **kwd ):
"""
*GET /api/tours/
Displays available tours
"""
return self.app.tour_registry.tours_by_id_with_description()
@expose_api_anonymous_and_sessionless
def show( self, trans, tour_id, **kwd ):
"""
load_config( self, trans, Tour_config_file, **kwd )
* GET /api/tours/{tour_id}:
Read a yaml file containing the specified tour definition
:returns: tour definition
:rtype: dictionary
"""
return self.app.tour_registry.tour_contents(tour_id)
@expose_api
@require_admin
def update_tour( self, trans, tour_id, **kwd ):
"""
This simply reloads tours right now. It's a quick hack.
TODO: allow creation of new tours (which get written to the
filesystem).
"""
return self.app.tour_registry.load_tour(tour_id)
+22
View File
@@ -406,6 +406,28 @@ def populate_api_routes( webapp, app ):
action='get_api_key',
conditions=dict( method=[ "GET" ] ) )
# =====================
# ===== TOURS API =====
# =====================
webapp.mapper.connect( 'index',
'/api/tours',
controller='tours',
action='index',
conditions=dict( method=["GET"] ) )
webapp.mapper.connect( 'show',
'/api/tours/{tour_id}',
controller='tours',
action='show',
conditions=dict( method=[ "GET" ] ) )
webapp.mapper.connect( 'update_tour',
'/api/tours/{tour_id}',
controller='tours',
action='update_tour',
conditions=dict( method=[ "POST" ] ) )
# =======================
# ===== LIBRARY API =====
# =======================
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"galaxy.menu.js","sources":["../src/galaxy.menu.js"],"names":["define","Masthead","GalaxyMenu","Backbone","Model","extend","initialize","options","this","config","masthead","create","tab_analysis","GalaxyMastheadTab","id","title","content","title_attribute","append","workflow_options","Galaxy","user","disabled","tab_workflow","tab_shared","add","divider","user_requests","tab_lab","lims_doc_url","visualization_options","tab_visualization","target","get","tab_admin","extra_class","tab_help","biostar_url","biostar_url_redirect","support_url","search_url","mailing_lists","screencasts_url","wiki_url","citation_url","terms_url","tab_user","use_remote_user","allow_user_creation","active_view","highlight"],"mappings":"AACAA,QAAQ,mBAAoB,SAAUC,GAGtC,GAAIC,GAAaC,SAASC,MAAMC,QAC5BC,WAAY,SAAUC,GAClBC,KAAKD,QAAUA,EAAQE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MAAkB,OAClBoB,YAAkB,gBAClBlB,gBAAkB,sCAItB6B,GAASrB,KACLV,MAAU,gBAAkBK,OAAOC,KAAKY,IAAK,WAGjDa,EAASrB,KACLV,MAAU,cACVC,QAAU,qBACVgB,OAAU,gBAGdc,EAASrB,KACLV,MAAU,gBACVC,QAAU,cACVgB,OAAU,gBAGdc,EAASrB,KACLV,MAAU,SACVC,QAAU,cACVgB,OAAU,OACVN,SAAU,IAIdoB,EAASrB,KACLV,MAAU,kBACVC,QAAU,eACVgB,OAAU,gBAEdc,EAASrB,KACLV,MAAU,iBACVC,QAAU,eACVgB,OAAU,gBAEdc,EAASrB,KACLV,MAAU,cACVC,QAAU,YACVgB,OAAU,SAGdc,EAASrB,KACLV,MAAU,WACVC,QAAU,8BACVgB,OAAU,gBAGTxB,KAAKD,QAAQwC,iBACdD,EAASrB,KACLV,MAAU,cACVC,QAAU,mCACVgB,OAAU,gBAKlBxB,KAAKE,SAASQ,OAAQ4B,OA1FJ,CAClB,GAAIA,GAAW,GAAI7C,GAASY,mBACxBC,GAAkB,OAClBC,MAAkB,OAClBoB,YAAkB,iBAClBlB,gBAAkB,iCAItB6B,GAASrB,KACLV,MAAU,QACVC,QAAU,aACVgB,OAAU,gBAITxB,KAAKD,QAAQyC,qBACdF,EAASrB,KACLV,MAAU,WACVC,QAAU,cACVgB,OAAU,gBAKlBxB,KAAKE,SAASQ,OAAQ4B,GAqErBtC,KAAKD,QAAQ0C,aACdzC,KAAKE,SAASwC,UAAW1C,KAAKD,QAAQ0C,eAMlD,QACI/C,WAAYA"}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"scratchbook.js","sources":["../../src/layout/scratchbook.js"],"names":["define","Frames","Backbone","View","extend","initialize","options","self","this","frames","visible","setElement","$el","buttonActive","collection","add","icon","tooltip","onclick","active","set","toggle","show_note","note_cls","hide","onbeforeunload","length","buttonLoad","show","on","note","addDataset","dataset_id","require","DATA","dataset","Dataset","id","$","when","fetch","then","frame_config","title","get","is_tabular","_","find","data_type","indexOf","tabular_dataset","TabularDataset","toJSON","content","parent_elt","createTabularDatasetChunkedView","model","embedded","height","url","Galaxy","root","addTrackster","viz_id","visualization","trackster","viz","Visualization","ui","TracksterUI","type","view_config","container","name","dbkey","stand_alone","latest_revision","drawables","config","view","each","d","hda_ldda","create_visualization","viewport","bookmarks","target","window","open","location","$galaxy_main","parent","document","href","attr"],"mappings":"AACAA,QAAS,oBAAsB,SAAUC,GACzC,MAAOC,UAASC,KAAKC,QACjBC,WAAa,SAAUC,GACnB,GAAIC,GAAOC,IACXF,GAAUA,MACVE,KAAKC,OAAS,GAAIR,GAAOE,MAAOO,SAAU,IAC1CF,KAAKG,WAAYH,KAAKC,OAAOG,KAC7BJ,KAAKK,aAAeP,EAAQQ,WAAWC,KACnCC,KAAkB,QAClBC,QAAkB,6BAClBC,QAAkB,WACdX,EAAKY,QAAUZ,EAAKY,OACpBZ,EAAKM,aAAaO,KACdC,OAAYd,EAAKY,OACjBG,UAAYf,EAAKY,OACjBI,SAAYhB,EAAKY,QAAU,iBAE9BZ,EAAKY,QAAUZ,EAAKE,OAAOe,QAEhCC,eAAkB,WACd,MAAKlB,GAAKE,OAAOiB,SAAW,EACjB,cAAgBnB,EAAKE,OAAOiB,SAAW,gCADlD,UAKRlB,KAAKmB,WAAarB,EAAQQ,WAAWC,KACjCC,KAAkB,SAClBC,QAAkB,wBAClBK,WAAkB,EAClBZ,SAAkB,EAClBQ,QAAkB,WACdX,EAAKE,OAAOC,QAAUH,EAAKE,OAAOe,OAASjB,EAAKE,OAAOmB,UAG/DpB,KAAKC,OAAOoB,GAAI,aAAc,WAC1BrB,KAAKE,SAA4B,GAAjBF,KAAKkB,UAAiBlB,KAAKgB,OAC3CjB,EAAKoB,WAAWP,KAAOU,KAAQtB,KAAKkB,SAAUhB,QAAWF,KAAKkB,SAAW,MAC1EG,GAAI,aAAc,WACjBtB,EAAKoB,WAAWP,KAAOC,OAAUb,KAAKE,QAASM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AAGe,qBAAqBZ,EACAK,EAAgBE,OAAOM,SACvBR,EAAgBE,OAAOC,KAAKF,UAC5BD,EAAgBE,OAAOO,WACvB,IAG3C9E,GAAKQ,IAAI2B,QAMrB3B,IAAK,SAAUT,GACX,GAAuB,UAAlBA,EAAQgF,OACTC,OAAOC,KAAMlF,EAAQqD,SAClB,IAAuB,QAAlBrD,EAAQgF,QAAsC,WAAlBhF,EAAQgF,QAAyC,SAAlBhF,EAAQgF,OAC3EC,OAAOE,SAAWnF,EAAQqD,QACvB,IAAMnD,KAAKW,OAiBdX,KAAKC,OAAOM,IAAKT,OAjBM,CACvB,GAAIoF,GAAepD,EAAGiD,OAAOI,OAAOC,UAAW7C,KAAM,eACrD,IAAuB,eAAlBzC,EAAQgF,QAA6C,UAAlBhF,EAAQgF,OAC5C,GAA6B,IAAxBI,EAAahE,OAAc,CAC5B,GAAImE,GAAOvF,EAAQqD,GAEfkC,IADwB,IAAvBA,EAAK5C,QAAS,KACP,IAEA,IACZ4C,GAAQ,kBACRN,OAAOE,SAAWI,MAElBH,GAAaI,KAAM,MAAOxF,EAAQqD,SAGtC4B,QAAOE,SAAWnF,EAAQqD"}
{"version":3,"file":"scratchbook.js","sources":["../../src/layout/scratchbook.js"],"names":["define","Frames","Backbone","View","extend","initialize","options","self","this","frames","visible","setElement","$el","buttonActive","collection","add","id","icon","tooltip","onclick","active","set","toggle","show_note","note_cls","hide","onbeforeunload","length","buttonLoad","show","on","note","addDataset","dataset_id","require","DATA","dataset","Dataset","$","when","fetch","then","frame_config","title","get","is_tabular","_","find","data_type","indexOf","tabular_dataset","TabularDataset","toJSON","content","parent_elt","createTabularDatasetChunkedView","model","embedded","height","url","Galaxy","root","addTrackster","viz_id","visualization","trackster","viz","Visualization","ui","TracksterUI","type","view_config","container","name","dbkey","stand_alone","latest_revision","drawables","config","view","each","d","hda_ldda","create_visualization","viewport","bookmarks","target","window","open","location","$galaxy_main","parent","document","href","attr"],"mappings":"AACAA,QAAS,oBAAsB,SA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gF,QAAyC,SAAlBhF,EAAQgF,OAC3EC,OAAOE,SAAWnF,EAAQqD,QACvB,IAAMnD,KAAKY,OAiBdZ,KAAKC,OAAOM,IAAKT,OAjBM,CACvB,GAAIoF,GAAepD,EAAGiD,OAAOI,OAAOC,UAAW7C,KAAM,eACrD,IAAuB,eAAlBzC,EAAQgF,QAA6C,UAAlBhF,EAAQgF,OAC5C,GAA6B,IAAxBI,EAAa/D,OAAc,CAC5B,GAAIkE,GAAOvF,EAAQqD,GAEfkC,IADwB,IAAvBA,EAAK5C,QAAS,KACP,IAEA,IACZ4C,GAAQ,kBACRN,OAAOE,SAAWI,MAElBH,GAAaI,KAAM,MAAOxF,EAAQqD,SAGtC4B,QAAOE,SAAWnF,EAAQqD"}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"tours.js","sources":["../../src/mvc/tours.js"],"names":["define","tour_opts","storage","window","sessionStorage","onEnd","removeItem","delay","orphan","hooked_tour_from_data","data","_","each","steps","step","preclick","onShow","$","click","postclick","onHide","textinsert","onShown","element","val","trigger","Galaxy","gxy_root","root","TourItem","Backbone","Model","extend","urlRoot","Tours","Collection","url","model","giveTour","tour_id","getJSON","tourdata","console","log","setItem","JSON","stringify","tour","Tour","init","goTo","restart","ToursView","View","initialize","self","this","setElement","fetch","success","render","error","tpl","template","join","$el","html","tours","models","on"],"mappings":"AAUAA,QAAQ,uBAAuB,WAE3B,GAAIC,IAAcC,QAASC,OAAOC,eAChBC,MAAO,WACHD,eAAeE,WAAW,qBAE9BC,MAAO,IACPC,QAAO,GAGrBC,EAAwB,SAASC,GA2BjC,MA1BAC,GAAEC,KAAKF,EAAKG,MAAO,SAASC,GACpBA,EAAKC,WACLD,EAAKE,OAAQ,WACTL,EAAEC,KAAKE,EAAKC,SAAU,SAASA,GAE3BE,EAAEF,GAAUG,YAIpBJ,EAAKK,YACLL,EAAKM,OAAS,WACVT,EAAEC,KAAKE,EAAKK,UAAW,SAASA,GAE5BF,EAAEE,GAAWD,YAIrBJ,EAAKO,aAILP,EAAKQ,QAAS,WACVL,EAAEH,EAAKS,SAASC,IAAIV,EAAKO,YAAYI,QAAQ,cAIlDf,EAKX,IAAqB,mBAAVgB,QACP,GAAIC,GAAWD,OAAOE,SAEtB,IAAID,GAAW,GAGnB,IAAIE,GAAWC,SAASC,MAAMC,QAC5BC,QAASN,EAAW,cAGlBO,EAAQJ,SAASK,WAAWH,QAC9BI,IAAMT,EAAW,YACjBU,MAAOR,IAILS,EAAY,SAASC,GACrB,GAAIH,GAAMT,EAAW,aAAeY,CACpCtB,GAAEuB,QAASJ,EAAK,SAAU1B,GAEtB+B,SAAWhC,EAAsBC,GACjCgC,QAAQC,IAAIF,UACZrC,eAAewC,QAAQ,mBAAoBC,KAAKC,UAAUpC,GAE1D,IAAIqC,GAAO,GAAIC,MAAKrC,EAAEqB,QAClBnB,MAAO4B,SAAS5B,OACjBZ,GAEH8C,GAAKE,OACLF,EAAKG,KAAK,GACVH,EAAKI,aAITC,EAAYtB,SAASuB,KAAKrB,QAE1BsB,WAAY,WACR,GAAIC,GAAOC,IACXA,MAAKC,WAAW,UAChBD,KAAKnB,MAAQ,GAAIH,GACjBsB,KAAKnB,MAAMqB,OACTC,QAAS,WACPJ,EAAKK,UAEPC,MAAO,WAELnB,QAAQmB,MAAM,8BAKtBD,OAAQ,WACJ,GACIE,GAAMnD,EAAEoD,UACR,wBACA,uFACA,2FACA,OACA,uCACI,OACI,4DACI,yCACJ,OACA,mEACJ,QACJ,YACA,SAASC,KAAK,IAClBR,MAAKS,IAAIC,KAAKJ,GAAKK,MAAOX,KAAKnB,MAAM+B,UAAUC,GAAG,QAAS,YAAa,WACpE/B,EAASrB,EAAEuC,MAAM9C,KAAK,gBAKlC,QAAQ0C,UAAWA,EACX3C,sBAAuBA,EACvBR,UAAWA,EACXqC,SAAUA"}
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"upload-button.js","sources":["../../../src/mvc/upload/upload-button.js"],"names":["define","Model","Backbone","extend","defaults","icon","tooltip","label","percentage","status","View","model","initialize","options","self","this","setElement","_template","$el","on","e","onclick","title","get","placement","_percentage","_status","$","window","text","onunload","value","find","removeClass","addClass","css","width"],"mappings":"AACAA,UAAW,WAGX,GAAIC,GAAQC,SAASD,MAAME,QACvBC,UACIC,KAAc,YACdC,QAAc,8CACdC,MAAc,YACdC,WAAc,EACdC,OAAc,MAKlBC,EAAOR,SAASQ,KAAKP,QAErBQ,MAAQ,KAGRC,WAAa,SAAUC,GAEnB,GAAIC,GAAOC,KAGPJ,EAAQE,EAAQF,KAGpBI,MAAKC,WAAYD,KAAKE,aAGtBF,KAAKG,IAAIC,GAAI,QAAS,SAAUC,GAAMP,EAAQQ,QAASD,KAGvDL,KAAKG,IAAIZ,SAAWgB,MAAOX,EAAMY,IAAI,WAAYC,UAAW,WAG5Db,EAAMQ,GAAI,oBAAqB,WAC3BL,EAAKW,YAAad,EAAMY,IAAK,iBAEjCZ,EAAMQ,GAAI,gBAAiB,WACvBL,EAAKY,QAASf,EAAMY,IAAK,YAI7B,IAAIT,GAAOC,IACXY,GAAGC,QAAST,GAAI,eAAgB,WAC5B,GAAIU,GAAO,EAIX,OAHKhB,GAAQiB,WACTD,EAAOhB,EAAQiB,YAEN,IAARD,EACMA,EADX,UAORH,QAAS,SAAUK,GACf,GAAIb,GAAMH,KAAKG,IAAIc,KAAM,gBACzBd,GAAIe,cACJf,EAAIgB,SAAU,gBACdhB,EAAIgB,SAAU,6BACA,IAATH,GACDb,EAAIgB,SAAU,gBAAkBH,IAKxCN,YAAa,SAAUM,GACnB,GAAIb,GAAMH,KAAKG,IAAIc,KAAM,gBACzBd,GAAIiB,KAAOC,MAAQL,EAAQ,OAI/Bd,UAAW,WACP,MAAQ,sLAWhB,QACIhB,MAAUA,EACVS,KAAUA"}
{"version":3,"file":"upload-button.js","sources":["../../../src/mvc/upload/upload-button.js"],"names":["define","Model","Backbone","extend","defaults","icon","tooltip","label","percentage","status","View","model","initialize","options","self","this","setElement","_template","$el","on","e","onclick","title","get","placement","_percentage","_status","$","window","text","onunload","value","find","removeClass","addClass","css","width"],"mappings":"AACAA,UAAW,WAGX,GAAIC,GAAQC,SAASD,MAAME,QACvBC,UACIC,KAAc,YACdC,QAAc,8CACdC,MAAc,YACdC,WAAc,EACdC,OAAc,MAKlBC,EAAOR,SAASQ,KAAKP,QAErBQ,MAAQ,KAGRC,WAAa,SAAUC,GAEnB,GAAIC,GAAOC,KAGPJ,EAAQE,EAAQF,KAGpBI,MAAKC,WAAYD,KAAKE,aAGtBF,KAAKG,IAAIC,GAAI,QAAS,SAAUC,GAAMP,EAAQQ,QAASD,KAGvDL,KAAKG,IAAIZ,SAAWgB,MAAOX,EAAMY,IAAI,WAAYC,UAAW,WAG5Db,EAAMQ,GAAI,oBAAqB,WAC3BL,EAAKW,YAAad,EAAMY,IAAK,iBAEjCZ,EAAMQ,GAAI,gBAAiB,WACvBL,EAAKY,QAASf,EAAMY,IAAK,YAI7B,IAAIT,GAAOC,IACXY,GAAGC,QAAST,GAAI,eAAgB,WAC5B,GAAIU,GAAO,EAIX,OAHKhB,GAAQiB,WACTD,EAAOhB,EAAQiB,YAEN,IAARD,EACMA,EADX,UAORH,QAAS,SAAUK,GACf,GAAIb,GAAMH,KAAKG,IAAIc,KAAM,gBACzBd,GAAIe,cACJf,EAAIgB,SAAU,gBACdhB,EAAIgB,SAAU,6BACA,IAATH,GACDb,EAAIgB,SAAU,gBAAkBH,IAKxCN,YAAa,SAAUM,GACnB,GAAIb,GAAMH,KAAKG,IAAIc,KAAM,gBACzBd,GAAIiB,KAAOC,MAAQL,EAAQ,OAI/Bd,UAAW,WACP,MAAQ,oNAWhB,QACIhB,MAAUA,EACVS,KAAUA"}
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"onload.js","sources":["../src/onload.js"],"names":["replace_big_select_inputs","min_length","max_length","select_elts","refresh_select2","element","select_elt","$","options","placeholder","closeOnSelect","is","dropdownAutoWidth","containerCssClass","select2","jQuery","fn","undefined","each","this","not","num_options","find","length","hasClass","init_refresh_on_change","off","change","select_field","select_val","val","ref_on_change_vals","attr","split","last_selected_value","inArray","window","trigger","document","get","form","submit","click","confirm","_","Backbone","Handlebars","panels","require","extend","async_save_text","POPUPMENU","make_popupmenu","make_popup_menus","init_tag_click_function","ready","tooltip","placement","anchor","galaxy_main_exists","parent","frames","galaxy_main","href","indexOf"],"mappings":"AA4BA,QAASA,2BAA0BC,EAAYC,EAAYC,GAEvD,QAASC,GAAiBC,GACtB,GAAIC,GAAaC,EAAEF,GACfG,GAAYC,YAAY,kBACZC,eAAgBJ,EAAWK,GAAG,cAC9BC,mBAAsB,EACtBC,kBAAmB,mBAEnC,OAAOR,GAAQS,QAASN,GAIvBO,OAAOC,GAAGF,UAKIG,SAAfhB,IACAA,EAAa,IAEEgB,SAAff,IACAA,EAAa,KAGjBC,EAAcA,GAAeI,EAAE,UAE/BJ,EAAYe,KAAM,WACd,GAAIZ,GAAaC,EAAEY,MAAMC,IAAI,cAEzBC,EAAcf,EAAWgB,KAAK,UAAUC,MACxBtB,GAAdoB,GAA8BA,EAAcnB,GAI9CI,EAAWkB,SAAS,oBAWxBpB,EAAiBE,MAKzB,QAASmB,0BACLlB,EAAE,oCACGmB,IAAI,UACJC,OAAO,WACJ,GAAIC,GAAerB,EAAEY,MACjBU,EAAaD,EAAaE,MAE1BC,EAAqBH,EAAaI,KAAK,2BAC3C,IAAID,EAAoB,CACpBA,EAAqBA,EAAmBE,MAAM,IAC9C,IAAIC,GAAsBN,EAAaI,KAAK,sBAC5C,IAAkD,KAA9CzB,EAAE4B,QAAQN,EAAYE,IAAqF,KAAvDxB,EAAE4B,QAAQD,EAAqBH,GACnF,OAGRxB,EAAE6B,QAAQC,QAAQ,qBAClB9B,EAAE+B,UAAUD,QAAQ,qBACpBT,EAAaW,IAAI,GAAGC,KAAKC,WAIjClC,EAAE,uCACGmB,IAAI,SACJgB,MAAO,WACJ,GAAId,GAAerB,EAAEY,MACjBU,EAAaD,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,"file":"onload.js","sources":["../src/onload.js"],"names":["replace_big_select_inputs","min_length","max_length","select_elts","refresh_select2","element","select_elt","$","options","placeholder","closeOnSelect","is","dropdownAutoWidth","containerCssClass","select2","jQuery","fn","undefined","each","this","not","num_options","find","length","hasClass","init_refresh_on_change","off","change","select_field","select_val","val","ref_on_change_vals","attr","split","last_selected_value","inArray","window","trigger","document","get","form","submit","click","confirm","_","Backbone","Handlebars","panels","require","extend","async_save_text","POPUPMENU","make_popupmenu","make_popup_menus","init_tag_click_function","TOURS","ready","tooltip","placement","anchor","galaxy_main_exists","parent","frames","galaxy_main","href","indexOf","urlparms","object","compact","map","location","search","slice","item","tour_id","url","repacked_url_args","Object","getOwnPropertyNames","k","join","history","pushState","giveTour","et","JSON","parse","sessionStorage","getItem","hooked_tour_from_data","steps","tour","Tour","tour_opts","init","restart","ex","console","log"],"mappings":"AA6BA,QAASA,2BAA0BC,EAAYC,EAAYC,GAEvD,QAASC,GAAiBC,GACtB,GAAIC,GAAaC,EAAEF,GACfG,GAAYC,YAAY,kBACZC,eAAgBJ,EAAWK,GAAG,cAC9BC,mBAAsB,EACtBC,kBAAmB,mBAEnC,OAAOR,GAAQS,QAASN,GAIvBO,OAAOC,GAAGF,UAKIG,SAAfhB,IACAA,EAAa,IAEEgB,SAAff,IACAA,EAAa,KAGjBC,EAAcA,GAAeI,EAAE,UAE/BJ,EAAYe,KAAM,WACd,GAAIZ,GAAaC,EAAEY,MAAMC,IAAI,cAEzBC,EAAcf,EAAWgB,KAAK,UAAUC,MACxBtB,GAAdoB,GAA8BA,EAAcnB,GAI9CI,EAAWkB,SAAS,oBAWxBpB,EAAiBE,MAKzB,QAASmB,0BACLlB,EAAE,oCACGmB,IAAI,UACJC,OAAO,WACJ,GAAIC,GAAerB,EAAEY,MACjBU,EAAaD,EAAaE,MAE1BC,EAAqBH,EAAaI,KAAK,2BAC3C,IAAID,EAAoB,CACpBA,EAAqBA,EAAmBE,MAAM,IAC9C,IAAIC,GAAsBN,EAA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mC,MAAO,WACV,GAAIiB,GAASpD,EAAEY,MACXyC,EAAsBC,OAAOC,QAAUD,OAAOC,OAAOC,WACzD,IAAkC,eAA3BJ,EAAO3B,KAAM,YAAoC4B,EAAuB,CAC3E,GAAII,GAAOL,EAAO3B,KAAK,OAEnBgC,IADqB,IAArBA,EAAKC,QAAQ,KACL,IAGA,IAEZD,GAAQ,kBACRL,EAAO3B,KAAK,OAAQgC,GACpBL,EAAO3B,KAAK,SAAU,SAE1B,MAAO2B,IAGX,KAMI,GADAO,SAAWtB,EAAEuB,OAAOvB,EAAEwB,QAAQxB,EAAEyB,IAAIC,SAASC,OAAOC,MAAM,GAAGvC,MAAM,KAAM,SAASwC,GAAQ,MAAIA,GAAaA,EAAKxC,MAAM,KAA5B,WACtFiC,SAASQ,QAAQ,CACjB,GAAIA,GAAUR,SAASQ,cAChBR,UAASQ,OAChB,IAAIC,GAAMpE,EAAE+D,UAAUtC,KAAK,QACvB4C,EAAoBhC,EAAEyB,IAAIQ,OAAOC,oBAAoBZ,UAAW,SAASa,GAAK,MAAO,KAAOA,EAAGb,SAASa,IAAIC,KAAK,OAAQA,KAAK,IAClIL,GAAMvC,OAAOkC,SAASN,KAAK/B,MAAM,KAAK,GACZ,MAAtB2C,IACAD,GAAYC,GAEhBK,QAAQC,UAAU,KAAM,KAAMP,GAC9BpB,MAAM4B,SAAST,OAIf,IADAU,GAAKC,KAAKC,MAAMC,eAAeC,QAAQ,qBACnCJ,KACAA,GAAK7B,MAAMkC,sBAAsBL,IAC7BA,IAAMA,GAAGM,OAAM,CACf,GAAIC,GAAO,GAAIC,MAAKhD,EAAEK,QAClByC,MAAON,GAAGM,OACXnC,MAAMsC,WACTF,GAAKG,OACLH,EAAKI,WAKrB,MAAMC,GACFC,QAAQC,IAAI,kEAAoEF"}
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
+2
View File
@@ -0,0 +1,2 @@
define(["galaxy.masthead"],function(a){var b=Backbone.Model.extend({initialize:function(a){this.options=a.config,this.masthead=a.masthead,this.create()},create:function(){var b=new a.GalaxyMastheadTab({id:"analysis",title:"Analyze Data",content:"",title_attribute:"Analysis home view"});this.masthead.append(b);var c={id:"workflow",title:"Workflow",content:"workflow",title_attribute:"Chain tools into workflows"};Galaxy.user.id||(c.disabled=!0);var d=new a.GalaxyMastheadTab(c);this.masthead.append(d);var e=new a.GalaxyMastheadTab({id:"shared",title:"Shared Data",content:"library/index",title_attribute:"Access published resources"});if(e.add({title:"Data Libraries deprecated",content:"library/index"}),e.add({title:"Data Libraries",content:"library/list",divider:!0}),e.add({title:"Published Histories",content:"history/list_published"}),e.add({title:"Published Workflows",content:"workflow/list_published"}),e.add({title:"Published Visualizations",content:"visualization/list_published"}),e.add({title:"Published Pages",content:"page/list_published"}),this.masthead.append(e),this.options.user_requests){var f=new a.GalaxyMastheadTab({id:"lab",title:"Lab"});f.add({title:"Sequencing Requests",content:"requests/index"}),f.add({title:"Find Samples",content:"requests/find_samples_index"}),f.add({title:"Help",content:this.options.lims_doc_url}),this.masthead.append(f)}var g={id:"visualization",title:"Visualization",content:"visualization/list",title_attribute:"Visualize datasets"};Galaxy.user.id||(g.disabled=!0);var h=new a.GalaxyMastheadTab(g);if(Galaxy.user.id&&(h.add({title:"New Track Browser",content:"visualization/trackster",target:"_frame"}),h.add({title:"Saved Visualizations",content:"visualization/list",target:"_frame"})),this.masthead.append(h),Galaxy.user.get("is_admin")){var i=new a.GalaxyMastheadTab({id:"admin",title:"Admin",content:"admin",extra_class:"admin-only",title_attribute:"Administer this Galaxy"});this.masthead.append(i)}var j=new a.GalaxyMastheadTab({id:"help",title:"Help",title_attribute:"Support, contact, and community hubs"});if(this.options.biostar_url&&(j.add({title:"Galaxy Biostar",content:this.options.biostar_url_redirect,target:"_blank"}),j.add({title:"Ask a question",content:"biostar/biostar_question_redirect",target:"_blank"})),j.add({title:"Support",content:this.options.support_url,target:"_blank"}),j.add({title:"Search",content:this.options.search_url,target:"_blank"}),j.add({title:"Mailing Lists",content:this.options.mailing_lists,target:"_blank"}),j.add({title:"Videos",content:this.options.screencasts_url,target:"_blank"}),j.add({title:"Wiki",content:this.options.wiki_url,target:"_blank"}),j.add({title:"How to Cite Galaxy",content:this.options.citation_url,target:"_blank"}),this.options.terms_url&&j.add({title:"Terms and Conditions",content:this.options.terms_url,target:"_blank"}),j.add({title:"Interactive Tours",content:"page/list_tours",target:"galaxy_main"}),this.masthead.append(j),Galaxy.user.id){var k=new a.GalaxyMastheadTab({id:"user",title:"User",extra_class:"loggedin-only",title_attribute:"Account preferences and saved data"});k.add({title:"Logged in as "+Galaxy.user.get("email")}),k.add({title:"Preferences",content:"user?cntrller=user",target:"galaxy_main"}),k.add({title:"Custom Builds",content:"user/dbkeys",target:"galaxy_main"}),k.add({title:"Logout",content:"user/logout",target:"_top",divider:!0}),k.add({title:"Saved Histories",content:"history/list",target:"galaxy_main"}),k.add({title:"Saved Datasets",content:"dataset/list",target:"galaxy_main"}),k.add({title:"Saved Pages",content:"page/list",target:"_top"}),k.add({title:"API Keys",content:"user/api_keys?cntrller=user",target:"galaxy_main"}),this.options.use_remote_user&&k.add({title:"Public Name",content:"user/edit_username?cntrller=user",target:"galaxy_main"}),this.masthead.append(k)}else{var k=new a.GalaxyMastheadTab({id:"user",title:"User",extra_class:"loggedout-only",title_attribute:"Account registration or login"});k.add({title:"Login",content:"user/login",target:"galaxy_main"}),this.options.allow_user_creation&&k.add({title:"Register",content:"user/create",target:"galaxy_main"}),this.masthead.append(k)}this.options.active_view&&this.masthead.highlight(this.options.active_view)}});return{GalaxyMenu:b}});
//# sourceMappingURL=../maps/galaxy.menu.js.map
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,2 +1,2 @@
define(["mvc/ui/ui-frames"],function(a){return Backbone.View.extend({initialize:function(b){var c=this;b=b||{},this.frames=new a.View({visible:!1}),this.setElement(this.frames.$el),this.buttonActive=b.collection.add({icon:"fa-th",tooltip:"Enable/Disable Scratchbook",onclick:function(){c.active=!c.active,c.buttonActive.set({toggle:c.active,show_note:c.active,note_cls:c.active&&"fa fa-check"}),!c.active&&c.frames.hide()},onbeforeunload:function(){return c.frames.length()>0?"You opened "+c.frames.length()+" frame(s) which will be lost.":void 0}}),this.buttonLoad=b.collection.add({icon:"fa-eye",tooltip:"Show/Hide Scratchbook",show_note:!0,visible:!1,onclick:function(){c.frames.visible?c.frames.hide():c.frames.show()}}),this.frames.on("add remove",function(){this.visible&&0==this.length()&&this.hide(),c.buttonLoad.set({note:this.length(),visible:this.length()>0})}).on("show hide ",function(){c.buttonLoad.set({toggle:this.visible,icon:this.visible&&"fa-eye"||"fa-eye-slash"})})},addDataset:function(a){var b=this;require(["mvc/dataset/data"],function(c){var d=new c.Dataset({id:a});$.when(d.fetch()).then(function(){var a={title:d.get("name")},e=_.find(["tabular","interval"],function(a){return-1!==d.get("data_type").indexOf(a)});if(e){var f=new c.TabularDataset(d.toJSON());_.extend(a,{content:function(a){c.createTabularDatasetChunkedView({model:f,parent_elt:a,embedded:!0,height:"100%"})}})}else _.extend(a,{url:Galaxy.root+"datasets/"+d.id+"/display/?preview=True"});b.add(a)})})},addTrackster:function(a){var b=this;require(["viz/visualization","viz/trackster"],function(c,d){var e=new c.Visualization({id:a});$.when(e.fetch()).then(function(){var a=new d.TracksterUI(Galaxy.root),c={title:e.get("name"),type:"other",content:function(b){var c={container:b,name:e.get("title"),id:e.id,dbkey:e.get("dbkey"),stand_alone:!1},d=e.get("latest_revision"),f=d.config.view.drawables;_.each(f,function(a){a.dataset={hda_ldda:a.hda_ldda,id:a.dataset_id}}),view=a.create_visualization(c,d.config.viewport,d.config.view.drawables,d.config.bookmarks,!1)}};b.add(c)})})},add:function(a){if("_blank"==a.target)window.open(a.url);else if("_top"==a.target||"_parent"==a.target||"_self"==a.target)window.location=a.url;else if(this.active)this.frames.add(a);else{var b=$(window.parent.document).find("#galaxy_main");if("galaxy_main"==a.target||"center"==a.target)if(0===b.length){var c=a.url;c+=-1==c.indexOf("?")?"?":"&",c+="use_panels=True",window.location=c}else b.attr("src",a.url);else window.location=a.url}}})});
define(["mvc/ui/ui-frames"],function(a){return Backbone.View.extend({initialize:function(b){var c=this;b=b||{},this.frames=new a.View({visible:!1}),this.setElement(this.frames.$el),this.buttonActive=b.collection.add({id:"enable-scratchbook",icon:"fa-th",tooltip:"Enable/Disable Scratchbook",onclick:function(){c.active=!c.active,c.buttonActive.set({toggle:c.active,show_note:c.active,note_cls:c.active&&"fa fa-check"}),!c.active&&c.frames.hide()},onbeforeunload:function(){return c.frames.length()>0?"You opened "+c.frames.length()+" frame(s) which will be lost.":void 0}}),this.buttonLoad=b.collection.add({id:"show-scratchbook",icon:"fa-eye",tooltip:"Show/Hide Scratchbook",show_note:!0,visible:!1,onclick:function(){c.frames.visible?c.frames.hide():c.frames.show()}}),this.frames.on("add remove",function(){this.visible&&0==this.length()&&this.hide(),c.buttonLoad.set({note:this.length(),visible:this.length()>0})}).on("show hide ",function(){c.buttonLoad.set({toggle:this.visible,icon:this.visible&&"fa-eye"||"fa-eye-slash"})})},addDataset:function(a){var b=this;require(["mvc/dataset/data"],function(c){var d=new c.Dataset({id:a});$.when(d.fetch()).then(function(){var a={title:d.get("name")},e=_.find(["tabular","interval"],function(a){return-1!==d.get("data_type").indexOf(a)});if(e){var f=new c.TabularDataset(d.toJSON());_.extend(a,{content:function(a){c.createTabularDatasetChunkedView({model:f,parent_elt:a,embedded:!0,height:"100%"})}})}else _.extend(a,{url:Galaxy.root+"datasets/"+d.id+"/display/?preview=True"});b.add(a)})})},addTrackster:function(a){var b=this;require(["viz/visualization","viz/trackster"],function(c,d){var e=new c.Visualization({id:a});$.when(e.fetch()).then(function(){var a=new d.TracksterUI(Galaxy.root),c={title:e.get("name"),type:"other",content:function(b){var c={container:b,name:e.get("title"),id:e.id,dbkey:e.get("dbkey"),stand_alone:!1},d=e.get("latest_revision"),f=d.config.view.drawables;_.each(f,function(a){a.dataset={hda_ldda:a.hda_ldda,id:a.dataset_id}}),view=a.create_visualization(c,d.config.viewport,d.config.view.drawables,d.config.bookmarks,!1)}};b.add(c)})})},add:function(a){if("_blank"==a.target)window.open(a.url);else if("_top"==a.target||"_parent"==a.target||"_self"==a.target)window.location=a.url;else if(this.active)this.frames.add(a);else{var b=$(window.parent.document).find("#galaxy_main");if("galaxy_main"==a.target||"center"==a.target)if(0===b.length){var c=a.url;c+=-1==c.indexOf("?")?"?":"&",c+="use_panels=True",window.location=c}else b.attr("src",a.url);else window.location=a.url}}})});
//# sourceMappingURL=../../maps/layout/scratchbook.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
define(["libs/bootstrap-tour"],function(){var a={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},b=function(a){return _.each(a.steps,function(a){a.preclick&&(a.onShow=function(){_.each(a.preclick,function(a){$(a).click()})}),a.postclick&&(a.onHide=function(){_.each(a.postclick,function(a){$(a).click()})}),a.textinsert&&(a.onShown=function(){$(a.element).val(a.textinsert).trigger("change")})}),a};if("undefined"!=typeof Galaxy)var c=Galaxy.root;else var c="/";var d=Backbone.Model.extend({urlRoot:c+"api/tours"}),e=Backbone.Collection.extend({url:c+"api/tours",model:d}),f=function(d){var e=c+"api/tours/"+d;$.getJSON(e,function(c){tourdata=b(c),console.log(tourdata),sessionStorage.setItem("activeGalaxyTour",JSON.stringify(c));var d=new Tour(_.extend({steps:tourdata.steps},a));d.init(),d.goTo(0),d.restart()})},g=Backbone.View.extend({initialize:function(){var a=this;this.setElement("<div/>"),this.model=new e,this.model.fetch({success:function(){a.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var a=_.template(["<h2>Galaxy Tours</h2>","<p>This page presents a list of interactive tours available on this Galaxy server. ","Select any tour to get started (and remember, you can click 'End Tour' at any time).</p>","<ul>","<% _.each(tours, function(tour) { %>","<li>",'<a href="#" class="tourItem" data-tour.id=<%- tour.id %>>',"<%- tour.attributes.name || tour.id %>","</a>",' - <%- tour.attributes.description || "No description given." %>',"</li>","<% }); %>","</ul>"].join(""));this.$el.html(a({tours:this.model.models})).on("click",".tourItem",function(){f($(this).data("tour.id"))})}});return{ToursView:g,hooked_tour_from_data:b,tour_opts:a,giveTour:f}});
//# sourceMappingURL=../../maps/mvc/tours.js.map
+1 -1
View File
@@ -1,2 +1,2 @@
define([],function(){var a=Backbone.Model.extend({defaults:{icon:"fa-upload",tooltip:"Download from URL or upload files from disk",label:"Load Data",percentage:0,status:""}}),b=Backbone.View.extend({model:null,initialize:function(a){var b=this,c=a.model;this.setElement(this._template()),this.$el.on("click",function(b){a.onclick(b)}),this.$el.tooltip({title:c.get("tooltip"),placement:"bottom"}),c.on("change:percentage",function(){b._percentage(c.get("percentage"))}),c.on("change:status",function(){b._status(c.get("status"))});var b=this;$(window).on("beforeunload",function(){var b="";return a.onunload&&(b=a.onunload()),""!=b?b:void 0})},_status:function(a){var b=this.$el.find(".progress-bar");b.removeClass(),b.addClass("progress-bar"),b.addClass("progress-bar-notransition"),""!=a&&b.addClass("progress-bar-"+a)},_percentage:function(a){var b=this.$el.find(".progress-bar");b.css({width:a+"%"})},_template:function(){return'<div class="upload-button"><div class="progress"><div class="progress-bar"/><a class="panel-header-button" href="javascript:void(0)"><span class="fa fa-upload"/></a></div></div>'}});return{Model:a,View:b}});
define([],function(){var a=Backbone.Model.extend({defaults:{icon:"fa-upload",tooltip:"Download from URL or upload files from disk",label:"Load Data",percentage:0,status:""}}),b=Backbone.View.extend({model:null,initialize:function(a){var b=this,c=a.model;this.setElement(this._template()),this.$el.on("click",function(b){a.onclick(b)}),this.$el.tooltip({title:c.get("tooltip"),placement:"bottom"}),c.on("change:percentage",function(){b._percentage(c.get("percentage"))}),c.on("change:status",function(){b._status(c.get("status"))});var b=this;$(window).on("beforeunload",function(){var b="";return a.onunload&&(b=a.onunload()),""!=b?b:void 0})},_status:function(a){var b=this.$el.find(".progress-bar");b.removeClass(),b.addClass("progress-bar"),b.addClass("progress-bar-notransition"),""!=a&&b.addClass("progress-bar-"+a)},_percentage:function(a){var b=this.$el.find(".progress-bar");b.css({width:a+"%"})},_template:function(){return'<div class="upload-button"><div class="progress"><div class="progress-bar"/><a class="panel-header-button" href="javascript:void(0)" id="tool-panel-upload-button"><span class="fa fa-upload"/></a></div></div>'}});return{Model:a,View:b}});
//# sourceMappingURL=../../../maps/mvc/upload/upload-button.js.map
+1 -1
View File
@@ -1,2 +1,2 @@
function replace_big_select_inputs(a,b,c){function d(a){var b=$(a),c={placeholder:"Click to select",closeOnSelect:!b.is("[MULTIPLE]"),dropdownAutoWidth:!0,containerCssClass:"select2-minwidth"};return a.select2(c)}jQuery.fn.select2&&(void 0===a&&(a=20),void 0===b&&(b=3e3),c=c||$("select"),c.each(function(){var c=$(this).not("[multiple]"),e=c.find("option").length;a>e||e>b||c.hasClass("no-autocomplete")||d(c)}))}function init_refresh_on_change(){$("select[refresh_on_change='true']").off("change").change(function(){var a=$(this),b=a.val(),c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var d=a.attr("last_selected_value");if(-1===$.inArray(b,c)&&-1===$.inArray(d,c))return}$(window).trigger("refresh_on_change"),$(document).trigger("convert_to_values"),a.get(0).form.submit()}),$(":checkbox[refresh_on_change='true']").off("click").click(function(){var a=$(this),b=a.val(),c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var d=a.attr("last_selected_value");if(-1===$.inArray(b,c)&&-1===$.inArray(d,c))return}$(window).trigger("refresh_on_change"),a.get(0).form.submit()}),$("a[confirm]").off("click").click(function(){return confirm($(this).attr("confirm"))})}window.jQuery=jQuery,window.$=jQuery,window._=_,window.Backbone=Backbone,window.Handlebars=Handlebars,window.panels=require("layout/panel"),_.extend(window,require("layout/modal")),window.async_save_text=require("utils/async-save-text");var POPUPMENU=require("ui/popupmenu");window.make_popupmenu=POPUPMENU.make_popupmenu,window.make_popup_menus=POPUPMENU.make_popup_menus,window.init_tag_click_function=require("ui/autocom_tagging"),window.init_refresh_on_change=init_refresh_on_change,$(document).ready(function(){init_refresh_on_change(),$.fn.tooltip&&($(".unified-panel-header [title]").tooltip({placement:"bottom"}),$("[title]").tooltip()),make_popup_menus(),replace_big_select_inputs(20,1500),$("a").click(function(){var a=$(this),b=parent.frames&&parent.frames.galaxy_main;if("galaxy_main"==a.attr("target")&&!b){var c=a.attr("href");c+=-1==c.indexOf("?")?"?":"&",c+="use_panels=True",a.attr("href",c),a.attr("target","_self")}return a})});
function replace_big_select_inputs(a,b,c){function d(a){var b=$(a),c={placeholder:"Click to select",closeOnSelect:!b.is("[MULTIPLE]"),dropdownAutoWidth:!0,containerCssClass:"select2-minwidth"};return a.select2(c)}jQuery.fn.select2&&(void 0===a&&(a=20),void 0===b&&(b=3e3),c=c||$("select"),c.each(function(){var c=$(this).not("[multiple]"),e=c.find("option").length;a>e||e>b||c.hasClass("no-autocomplete")||d(c)}))}function init_refresh_on_change(){$("select[refresh_on_change='true']").off("change").change(function(){var a=$(this),b=a.val(),c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var d=a.attr("last_selected_value");if(-1===$.inArray(b,c)&&-1===$.inArray(d,c))return}$(window).trigger("refresh_on_change"),$(document).trigger("convert_to_values"),a.get(0).form.submit()}),$(":checkbox[refresh_on_change='true']").off("click").click(function(){var a=$(this),b=a.val(),c=a.attr("refresh_on_change_values");if(c){c=c.split(",");var d=a.attr("last_selected_value");if(-1===$.inArray(b,c)&&-1===$.inArray(d,c))return}$(window).trigger("refresh_on_change"),a.get(0).form.submit()}),$("a[confirm]").off("click").click(function(){return confirm($(this).attr("confirm"))})}window.jQuery=jQuery,window.$=jQuery,window._=_,window.Backbone=Backbone,window.Handlebars=Handlebars,window.panels=require("layout/panel"),_.extend(window,require("layout/modal")),window.async_save_text=require("utils/async-save-text");var POPUPMENU=require("ui/popupmenu");window.make_popupmenu=POPUPMENU.make_popupmenu,window.make_popup_menus=POPUPMENU.make_popup_menus,window.init_tag_click_function=require("ui/autocom_tagging");var TOURS=require("mvc/tours");window.init_refresh_on_change=init_refresh_on_change,$(document).ready(function(){init_refresh_on_change(),$.fn.tooltip&&($(".unified-panel-header [title]").tooltip({placement:"bottom"}),$("[title]").tooltip()),make_popup_menus(),replace_big_select_inputs(20,1500),$("a").click(function(){var a=$(this),b=parent.frames&&parent.frames.galaxy_main;if("galaxy_main"==a.attr("target")&&!b){var c=a.attr("href");c+=-1==c.indexOf("?")?"?":"&",c+="use_panels=True",a.attr("href",c),a.attr("target","_self")}return a});try{if(urlparms=_.object(_.compact(_.map(location.search.slice(1).split("&"),function(a){return a?a.split("="):void 0}))),urlparms.tour_id){var a=urlparms.tour_id;delete urlparms.tour_id;var b=$(location).attr("href"),c=_.map(Object.getOwnPropertyNames(urlparms),function(a){return"?"+[a,urlparms[a]].join("=")}).join("&");b=window.location.href.split("?")[0],"?"!==c&&(b+=c),history.pushState(null,null,b),TOURS.giveTour(a)}else if(et=JSON.parse(sessionStorage.getItem("activeGalaxyTour")),et&&(et=TOURS.hooked_tour_from_data(et),et&&et.steps)){var d=new Tour(_.extend({steps:et.steps},TOURS.tour_opts));d.init(),d.restart()}}catch(e){console.log("Tour loading failure, you'll need to restart the tour manually."+e)}});
//# sourceMappingURL=../maps/onload.js.map
+73
View File
@@ -0,0 +1,73 @@
/* ========================================================================
* bootstrap-tour - v0.10.1
* http://bootstraptour.com
* ========================================================================
* Copyright 2012-2013 Ulrich Sossou
*
* ========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================================
*/
.tour-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1100;
background-color: #000;
opacity: 0.8;
filter: alpha(opacity=80);
}
.tour-step-backdrop {
position: relative;
z-index: 1101;
background: inherit;
}
.tour-step-backdrop > td {
position: relative;
z-index: 1101;
}
.tour-step-background {
position: absolute !important;
z-index: 1100;
background: inherit;
border-radius: 6px;
}
.popover[class*="tour-"] {
z-index: 1100;
}
.popover[class*="tour-"] .popover-navigation {
padding: 9px 14px;
}
.popover[class*="tour-"] .popover-navigation *[data-role="end"] {
float: right;
}
.popover[class*="tour-"] .popover-navigation *[data-role="prev"],
.popover[class*="tour-"] .popover-navigation *[data-role="next"],
.popover[class*="tour-"] .popover-navigation *[data-role="end"] {
cursor: pointer;
}
.popover[class*="tour-"] .popover-navigation *[data-role="prev"].disabled,
.popover[class*="tour-"] .popover-navigation *[data-role="next"].disabled,
.popover[class*="tour-"] .popover-navigation *[data-role="end"].disabled {
cursor: default;
}
.popover[class*="tour-"].orphan {
position: fixed;
margin-top: 0;
}
.popover[class*="tour-"].orphan .arrow {
display: none;
}
+2
View File
@@ -30,6 +30,7 @@
## Default stylesheets
<%def name="stylesheets()">
${h.css('base')}
${h.css('bootstrap-tour')}
</%def>
## Default javascripts
@@ -49,6 +50,7 @@
## TODO: remove when all libs are required directly in modules
'bundled/libs.bundled',
'libs/require',
"libs/bootstrap-tour",
)}
<script type="text/javascript">
+2 -1
View File
@@ -22,7 +22,8 @@
<%def name="stylesheets()">
${h.css(
'base',
'jquery.rating'
'jquery.rating',
'bootstrap-tour'
)}
<style type="text/css">
#center {
+1
View File
@@ -17,6 +17,7 @@
'jquery-ui/smoothness/jquery-ui',
## base needs to come after jquery-ui because of ui-button, ui- etc. name collision
'base',
'bootstrap-tour',
)}
${ page_setup() }
</head>
+17
View File
@@ -0,0 +1,17 @@
from base import api
class TourApiTestCase( api.ApiTestCase ):
def test_index(self):
response = self._get( "tours" )
self._assert_status_code_is( response, 200 )
tours = response.json()
tour_keys = map(lambda t: t["id"], tours)
assert "core.history" in tour_keys
def test_show(self):
response = self._get( "tours/core.history" )
self._assert_status_code_is( response, 200 )
tour = response.json()
self._assert_has_keys(tour, "name", "description", "title_default", "steps")