This commit is contained in:
Dannon Baker
2015-12-18 10:26:22 -05:00
parent 455372e6bf
commit 0203a69d88
33 changed files with 1820 additions and 48 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",
+31 -1
View File
@@ -7,7 +7,8 @@ var jQuery = require( 'jquery' ),
ToolPanel = require( './tool-panel' ),
HistoryPanel = require( './history-panel' ),
PAGE = require( 'layout/page' ),
ToolForm = require( 'mvc/tool/tool-form' );
ToolForm = require( 'mvc/tool/tool-form' ),
Tours = require('libs/bootstrap-tour');
/** define the 'Analyze Data'/analysis/main/home page for Galaxy
* * has a masthead
@@ -75,6 +76,35 @@ window.app = function app( options, bootstrapped ){
$( '.select2-hidden-accessible' ).remove();
centerPanel.display( view );
},
// DBTODO: THIS SHOULD PROBABLY NOT BE HERE -- but where?
giveTour: function(tour_id){
var url = Galaxy.root + 'api/tours/' + tour_id;
$.getJSON( url, function( data ) {
// Set hooks for additional click and data entry actions.
_.each(data.steps, function(step) {
if (step.preclick){
step.onShow= function(){$(step.preclick).click()};
}
if (step.postclick){
step.onHide = function(){$(step.postclick).click()};
}
if (step.textinsert){
step.onShown= function(){$(step.element).text(step.textinsert)};
}
});
// Store tour steps in sessionStorage to easily persist w/o hackery.
sessionStorage.setItem('activeGalaxyTour', data);
var tour = new Tour({
orphan: true,
debug: true, // REMOVE ME WHEN DONE DEBUGGING
steps: data.steps
});
// Always clean restart, since this is a new, explicit giveTour execution.
tour.init();
tour.goTo(0);
tour.restart();
});
},
};
// .................................................... routes
+29 -11
View File
@@ -1,5 +1,5 @@
// dependencies
define([], function() {
define(['mvc/tours'], function( Tours ) {
/** GalaxyMenu uses the GalaxyMasthead class in order to add menu items and icons to the Masthead **/
var GalaxyMenu = Backbone.Model.extend({
@@ -81,6 +81,7 @@ var GalaxyMenu = Backbone.Model.extend({
content : 'page/list_published'
});
this.masthead.append(tab_shared);
//
@@ -209,6 +210,13 @@ var GalaxyMenu = Backbone.Model.extend({
target : '_blank'
});
}
tab_help.add({
title : 'Interactive Tours',
onclick : function(c){
Galaxy.app.display(new Tours.ToursView());
},
target : 'galaxy_main'
});
this.masthead.append( tab_help );
//
@@ -388,7 +396,8 @@ var GalaxyMastheadTab = Backbone.View.extend({
type : 'url',
target : '_parent',
scratchbook : false,
divider : false
divider : false,
onclick : undefined
}
// read in defaults
@@ -419,17 +428,26 @@ var GalaxyMastheadTab = Backbone.View.extend({
// add events
var self = this;
$item.on('click', function(e){
// prevent default
e.preventDefault();
// no modifications if new tab is requested
if (self.options.target === '_blank')
return true;
// load into frame
Galaxy.frame.add(options);
});
if (menuOptions.onclick !== undefined){
$item.on('click', function(e){
e.preventDefault();
menuOptions.onclick();
});
} else {
$item.on('click', function(e){
// prevent default
e.preventDefault();
// no modifications if new tab is requested
if (self.options.target === '_blank')
return true;
// load into frame
Galaxy.frame.add(options);
});
}
// append divider
if (menuOptions.divider)
+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
};
});
});
+62
View File
@@ -0,0 +1,62 @@
/**
* 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([],function() {
var Tour = Backbone.Model.extend({
urlRoot: '/api/tours',
});
var Tours = Backbone.Collection.extend({
url: '/api/tours',
model: Tour,
});
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 ){
console.log(model);
self.render();
},
error: function( model, response ){
// Do something.
console.error("Failed to fetch tours.");
}
});
},
render: function(){
var tpl = _.template([
"<h2>Available Galaxy Tours</h2>",
"<ul>",
'<% _.each(tours, function(tour) { %>',
'<li>',
'<a href="#" class="tourItem" data-tour.id=<%- tour.id %>>',
'<%- tour.id %>',
'</a>',
'- <%- tour.attributes.description %>',
'</li>',
'<% }); %>',
"</ul>"].join(''));
this.$el.html(tpl({tours: this.model.models, Galaxy: Galaxy})).on("click", ".tourItem", function(e){
Galaxy.app.giveTour($(this).data("tour.id"));
});
},
});
return {ToursView: ToursView}
});
@@ -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>' +
@@ -267,7 +267,7 @@
@zindex-navbar: 1000;
@zindex-dropdown: 1000;
@zindex-popover: 1010;
@zindex-popover: 1080;
@zindex-tooltip: 1030;
@zindex-navbar-fixed: 1030;
@zindex-modal-background: 1040;
+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' ] );
};
};
+4
View File
@@ -249,6 +249,10 @@ paste.app_factory = galaxy.web.buildapp:app_factory
# have security considerations, so proceed with caution.
#interactive_environment_plugins_directory =
# Interactive tour directory: where to store interactive tour definition files.
# Set to config/plugins/tours to load the default tours that ship with Galaxy.
#tour_config_dir =
# 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.
+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
@@ -105,6 +105,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", ""), self.root)
self.expose_user_name = kwargs.get( "expose_user_name", False )
self.expose_user_email = kwargs.get( "expose_user_email", False )
+59
View File
@@ -0,0 +1,59 @@
"""
This module manages loading/etc of Galaxy interactive tours.
"""
import os
import yaml
import logging
log = logging.getLogger( __name__ )
def tour_loader(contents_dict):
# This *COULD* be done on the clientside. Maybe even should?
for step in contents_dict['steps']:
if 'intro' in step:
step['content'] = step.pop('intro')
if 'position' in step:
step['placement'] = step.pop('position')
# Handle these hooks on the client side, instead of trying to ship
# functions as strings and eval
# if 'preclick' in step:
# step['onShow'] = "$('%s').click()" % step.pop('preclick')
# if 'postclick' in step:
# step['onHide'] = "$('%s').click()" % step.pop('postclick')
# if 'textinsert' in step:
# step['onShown'] = "$('%s').text('%s')" % (step['element'], step.pop('textinsert'))
if 'element' not in step:
step['orphan'] = True
return contents_dict
class ToursRegistry(object):
def __init__(self, tour_dir):
self.tour_dir = tour_dir
self.load_tours()
def tours_by_id_with_description(self):
return [{'id': k,
'description': self.tours[k].get('description', None)}
for k in self.tours.keys()]
def load_tours(self):
self.tours = {}
for f in os.listdir(self.tour_dir):
if f.endswith('.yaml'):
tour_path = os.path.join(self.tour_dir, f)
with open(tour_path) as handle:
conf = yaml.load(handle)
# Could pop the following, but is there a good reason to?
# As long as they key doesn't conflict with tour keys, it's
# fine.
tour_id = conf.get('tour_id', f.strip('.yaml'))
self.tours[tour_id] = tour_loader(conf)
log.info("Loaded tour '%s'" % tour_id)
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)
+34
View File
@@ -0,0 +1,34 @@
"""
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.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 trans.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_config_file}:
Read a yaml file containing the specified tour definition
:returns: tour definition
:rtype: dictionary
"""
return trans.app.tour_registry.tour_contents(tour_id)
+16
View File
@@ -393,6 +393,22 @@ 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" ] ) )
# =======================
# ===== 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,OACvBD,KAAKE,SAAYH,EAAQG,SACzBF,KAAKG,UAITA,OAAQ,WAIJ,GAAIC,GAAe,GAAIX,GAASY,mBAC5BC,GAAkB,WAClBC,MAAkB,eAClBC,QAAkB,GAClBC,gBAAkB,sBAEtBT,MAAKE,SAASQ,OAAQN,EAMtB,IAAIO,IACAL,GAAkB,WAClBC,MAAkB,WAClBC,QAAkB,WAClBC,gBAAkB,6BAEhBG,QAAOC,KAAKP,KACdK,EAAiBG,UAAW,EAGhC,IAAIC,GAAe,GAAItB,GAASY,kBAAmBM,EACnDX,MAAKE,SAASQ,OAAQK,EAKtB,IAAIC,GAAa,GAAIvB,GAASY,mBAC1BC,GAAkB,SAClBC,MAAkB,cAClBC,QAAkB,gBAClBC,gBAAkB,8BAyCtB,IAtCAO,EAAWC,KACPV,MAAU,4BACVC,QAAU,kBAGdQ,EAAWC,KACPV,MAAU,iBACVC,QAAU,eACVU,SAAU,IAGdF,EAAWC,KACPV,MAAU,sBACVC,QAAU,2BAGdQ,EAAWC,KACPV,MAAU,sBACVC,QAAU,4BAIdQ,EAAWC,KACPV,MAAU,2BACVC,QAAU,iCAGdQ,EAAWC,KACPV,MAAU,kBACVC,QAAU,wBAIdR,KAAKE,SAASQ,OAAOM,GAKhBhB,KAAKD,QAAQoB,cAAgB,CAC9B,GAAIC,GAAU,GAAI3B,GAASY,mBACvBC,GAAU,MACVC,MAAU,OAEda,GAAQH,KACJV,MAAU,sBACVC,QAAU,mBAEdY,EAAQH,KACJV,MAAU,eACVC,QAAU,gCAEdY,EAAQH,KACJV,MAAU,OACVC,QAAUR,KAAKD,QAAQsB,eAE3BrB,KAAKE,SAASQ,OAAQU,GAO1B,GAAIE,IACAhB,GAAkB,gBAClBC,MAAkB,gBAClBC,QAAkB,qBAClBC,gBAAkB,qBAIhBG,QAAOC,KAAKP,KACdgB,EAAsBR,UAAW,EAErC,IAAIS,GAAoB,GAAI9B,GAASY,kBAAmBiB,EAoBxD,IAjBKV,OAAOC,KAAKP,KACbiB,EAAkBN,KACdV,MAAU,oBACVC,QAAU,0BACVgB,OAAU,WAEdD,EAAkBN,KACdV,MAAU,uBACVC,QAAU,qBACVgB,OAAU,YAGlBxB,KAAKE,SAASQ,OAAQa,GAKjBX,OAAOC,KAAKY,IAAK,YAAe,CACjC,GAAIC,GAAY,GAAIjC,GAASY,mBACzBC,GAAkB,QAClBC,MAAkB,QAClBC,QAAkB,QAClBmB,YAAkB,aAClBlB,gBAAkB,0BAEtBT,MAAKE,SAASQ,OAAQgB,GAM1B,GAAIE,GAAW,GAAInC,GAASY,mBACxBC,GAAkB,OAClBC,MAAkB,OAClBE,gBAAkB,wCA6DtB,IA3DKT,KAAKD,QAAQ8B,cACdD,EAASX,KACLV,MAAU,iBACVC,QAAUR,KAAKD,QAAQ+B,qBACvBN,OAAU,WAEdI,EAASX,KACLV,MAAU,iBACVC,QAAU,oCACVgB,OAAU,YAGlBI,EAASX,KACLV,MAAU,UACVC,QAAUR,KAAKD,QAAQgC,YACvBP,OAAU,WAEdI,EAASX,KACLV,MAAU,SACVC,QAAUR,KAAKD,QAAQiC,WACvBR,OAAU,WAEdI,EAASX,KACLV,MAAU,gBACVC,QAAUR,KAAKD,QAAQkC,cACvBT,OAAU,WAEdI,EAASX,KACLV,MAAU,SACVC,QAAUR,KAAKD,QAAQmC,gBACvBV,OAAU,WAEdI,EAASX,KACLV,MAAU,OACVC,QAAUR,KAAKD,QAAQoC,SACvBX,OAAU,WAEdI,EAASX,KACLV,MAAU,qBACVC,QAAUR,KAAKD,QAAQqC,aACvBZ,OAAU,WAEVxB,KAAKD,QAAQsC,WACbT,EAASX,KACLV,MAAU,uBACVC,QAAUR,KAAKD,QAAQsC,UACvBb,OAAU,WAGlBI,EAASX,KACLV,MAAU,oBACVC,QAAU,kBACVgB,OAAU,gBAEdxB,KAAKE,SAASQ,OAAQkB,GAKhBhB,OAAOC,KAAKP,GA0BX,CACH,GAAIgC,GAAW,GAAI7C,GAASY,mBACxBC,GAAkB,OAClBC,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
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","Backbone","Model","extend","urlRoot","Tours","Collection","url","model","ToursView","View","initialize","self","this","setElement","fetch","success","console","log","render","error","tpl","_","template","join","$el","html","tours","models","Galaxy","on","app","giveTour","$","data"],"mappings":"AAUAA,UAAU,WAEN,GAAIC,GAAOC,SAASC,MAAMC,QACxBC,QAAS,eAGPC,EAAQJ,SAASK,WAAWH,QAC9BI,IAAK,aACLC,MAAOR,IAGLS,EAAYR,SAASS,KAAKP,QAE1BQ,WAAY,WACR,GAAIC,GAAOC,IACXA,MAAKC,WAAW,UAChBD,KAAKL,MAAQ,GAAIH,GACjBQ,KAAKL,MAAMO,OACTC,QAAS,SAAUR,GACjBS,QAAQC,IAAIV,GACZI,EAAKO,UAEPC,MAAO,WAELH,QAAQG,MAAM,8BAKtBD,OAAQ,WACJ,GAAIE,GAAMC,EAAEC,UACR,kCACA,OACA,uCACI,OACI,4DACI,iBACJ,OACA,uCACJ,QACJ,YACA,SAASC,KAAK,IAClBX,MAAKY,IAAIC,KAAKL,GAAKM,MAAOd,KAAKL,MAAMoB,OAAQC,OAAQA,UAAUC,GAAG,QAAS,YAAa,WACpFD,OAAOE,IAAIC,SAASC,EAAEpB,MAAMqB,KAAK,gBAO7C,QAAQzB,UAAWA"}
+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"}
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
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
define([],function(){var a=Backbone.Model.extend({urlRoot:"/api/tours"}),b=Backbone.Collection.extend({url:"/api/tours",model:a}),c=Backbone.View.extend({initialize:function(){var a=this;this.setElement("<div/>"),this.model=new b,this.model.fetch({success:function(b){console.log(b),a.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var a=_.template(["<h2>Available Galaxy Tours</h2>","<ul>","<% _.each(tours, function(tour) { %>","<li>",'<a href="#" class="tourItem" data-tour.id=<%- tour.id %>>',"<%- tour.id %>","</a>","- <%- tour.attributes.description %>","</li>","<% }); %>","</ul>"].join(""));this.$el.html(a({tours:this.model.models,Galaxy:Galaxy})).on("click",".tourItem",function(){Galaxy.app.giveTour($(this).data("tour.id"))})}});return{ToursView:c}});
//# 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
File diff suppressed because one or more lines are too long
+728
View File
@@ -0,0 +1,728 @@
/* ========================================================================
* 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.
* ========================================================================
*/
/*!
* Bootstrap v3.1.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.btn:hover,
.btn:focus {
color: #333333;
text-decoration: none;
}
.btn:active,
.btn.active {
outline: 0;
background-image: none;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
cursor: not-allowed;
pointer-events: none;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default {
color: #333333;
background-color: #ffffff;
border-color: #cccccc;
}
.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
color: #333333;
background-color: #e6e6e6;
border-color: #adadad;
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
background-image: none;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #ffffff;
border-color: #cccccc;
}
.btn-default .badge {
color: #ffffff;
background-color: #333333;
}
.btn-primary {
color: #ffffff;
background-color: #428bca;
border-color: #357ebd;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
color: #ffffff;
background-color: #3071a9;
border-color: #285e8e;
}
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
background-image: none;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #428bca;
border-color: #357ebd;
}
.btn-primary .badge {
color: #428bca;
background-color: #ffffff;
}
.btn-success {
color: #ffffff;
background-color: #5cb85c;
border-color: #4cae4c;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
color: #ffffff;
background-color: #449d44;
border-color: #398439;
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
background-image: none;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #5cb85c;
border-color: #4cae4c;
}
.btn-success .badge {
color: #5cb85c;
background-color: #ffffff;
}
.btn-info {
color: #ffffff;
background-color: #5bc0de;
border-color: #46b8da;
}
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
color: #ffffff;
background-color: #31b0d5;
border-color: #269abc;
}
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
background-image: none;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #5bc0de;
border-color: #46b8da;
}
.btn-info .badge {
color: #5bc0de;
background-color: #ffffff;
}
.btn-warning {
color: #ffffff;
background-color: #f0ad4e;
border-color: #eea236;
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
color: #ffffff;
background-color: #ec971f;
border-color: #d58512;
}
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
background-image: none;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #f0ad4e;
border-color: #eea236;
}
.btn-warning .badge {
color: #f0ad4e;
background-color: #ffffff;
}
.btn-danger {
color: #ffffff;
background-color: #d9534f;
border-color: #d43f3a;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
color: #ffffff;
background-color: #c9302c;
border-color: #ac2925;
}
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
background-image: none;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #d9534f;
border-color: #d43f3a;
}
.btn-danger .badge {
color: #d9534f;
background-color: #ffffff;
}
.btn-link {
color: #428bca;
font-weight: normal;
cursor: pointer;
border-radius: 0;
}
.btn-link,
.btn-link:active,
.btn-link[disabled],
fieldset[disabled] .btn-link {
background-color: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:active {
border-color: transparent;
}
.btn-link:hover,
.btn-link:focus {
color: #2a6496;
text-decoration: underline;
background-color: transparent;
}
.btn-link[disabled]:hover,
fieldset[disabled] .btn-link:hover,
.btn-link[disabled]:focus,
fieldset[disabled] .btn-link:focus {
color: #777777;
text-decoration: none;
}
.btn-lg,
.btn-group-lg > .btn {
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 6px;
}
.btn-sm,
.btn-group-sm > .btn {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
.btn-xs,
.btn-group-xs > .btn {
padding: 1px 5px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
.btn-block {
display: block;
width: 100%;
}
.btn-block + .btn-block {
margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
width: 100%;
}
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-block;
vertical-align: middle;
}
.btn-group > .btn,
.btn-group-vertical > .btn {
position: relative;
float: left;
}
.btn-group > .btn:hover,
.btn-group-vertical > .btn:hover,
.btn-group > .btn:focus,
.btn-group-vertical > .btn:focus,
.btn-group > .btn:active,
.btn-group-vertical > .btn:active,
.btn-group > .btn.active,
.btn-group-vertical > .btn.active {
z-index: 2;
}
.btn-group > .btn:focus,
.btn-group-vertical > .btn:focus {
outline: 0;
}
.btn-group .btn + .btn,
.btn-group .btn + .btn-group,
.btn-group .btn-group + .btn,
.btn-group .btn-group + .btn-group {
margin-left: -1px;
}
.btn-toolbar {
margin-left: -5px;
}
.btn-toolbar .btn-group,
.btn-toolbar .input-group {
float: left;
}
.btn-toolbar > .btn,
.btn-toolbar > .btn-group,
.btn-toolbar > .input-group {
margin-left: 5px;
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
.btn-group > .btn:first-child {
margin-left: 0;
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:first-child > .btn:last-child,
.btn-group > .btn-group:first-child > .dropdown-toggle {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.btn-group > .btn-group:last-child > .btn:first-child {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
}
.btn-group > .btn-lg + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
}
.btn-group.open .dropdown-toggle {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn-group.open .dropdown-toggle.btn-link {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn .caret {
margin-left: 0;
}
.btn-lg .caret {
border-width: 5px 5px 0;
border-bottom-width: 0;
}
.dropup .btn-lg .caret {
border-width: 0 5px 5px;
}
.btn-group-vertical > .btn,
.btn-group-vertical > .btn-group,
.btn-group-vertical > .btn-group > .btn {
display: block;
float: none;
width: 100%;
max-width: 100%;
}
.btn-group-vertical > .btn-group > .btn {
float: none;
}
.btn-group-vertical > .btn + .btn,
.btn-group-vertical > .btn + .btn-group,
.btn-group-vertical > .btn-group + .btn,
.btn-group-vertical > .btn-group + .btn-group {
margin-top: -1px;
margin-left: 0;
}
.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
border-radius: 0;
}
.btn-group-vertical > .btn:first-child:not(:last-child) {
border-top-right-radius: 4px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.btn-group-vertical > .btn:last-child:not(:first-child) {
border-bottom-left-radius: 4px;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.btn-group-justified {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
}
.btn-group-justified > .btn,
.btn-group-justified > .btn-group {
float: none;
display: table-cell;
width: 1%;
}
.btn-group-justified > .btn-group .btn {
width: 100%;
}
.btn-group-justified > .btn-group .dropdown-menu {
left: auto;
}
[data-toggle="buttons"] > .btn > input[type="radio"],
[data-toggle="buttons"] > .btn > input[type="checkbox"] {
position: absolute;
z-index: -1;
opacity: 0;
filter: alpha(opacity=0);
}
.popover {
position: absolute;
top: 0;
left: 0;
z-index: 1060;
display: none;
max-width: 276px;
padding: 1px;
text-align: left;
background-color: #ffffff;
background-clip: padding-box;
border: 1px solid #cccccc;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
white-space: normal;
}
.popover.top {
margin-top: -10px;
}
.popover.right {
margin-left: 10px;
}
.popover.bottom {
margin-top: 10px;
}
.popover.left {
margin-left: -10px;
}
.popover-title {
margin: 0;
padding: 8px 14px;
font-size: 14px;
font-weight: normal;
line-height: 18px;
background-color: #f7f7f7;
border-bottom: 1px solid #ebebeb;
border-radius: 5px 5px 0 0;
}
.popover-content {
padding: 9px 14px;
}
.popover > .arrow,
.popover > .arrow:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.popover > .arrow {
border-width: 11px;
}
.popover > .arrow:after {
border-width: 10px;
content: "";
}
.popover.top > .arrow {
left: 50%;
margin-left: -11px;
border-bottom-width: 0;
border-top-color: #999999;
border-top-color: rgba(0, 0, 0, 0.25);
bottom: -11px;
}
.popover.top > .arrow:after {
content: " ";
bottom: 1px;
margin-left: -10px;
border-bottom-width: 0;
border-top-color: #ffffff;
}
.popover.right > .arrow {
top: 50%;
left: -11px;
margin-top: -11px;
border-left-width: 0;
border-right-color: #999999;
border-right-color: rgba(0, 0, 0, 0.25);
}
.popover.right > .arrow:after {
content: " ";
left: 1px;
bottom: -10px;
border-left-width: 0;
border-right-color: #ffffff;
}
.popover.bottom > .arrow {
left: 50%;
margin-left: -11px;
border-top-width: 0;
border-bottom-color: #999999;
border-bottom-color: rgba(0, 0, 0, 0.25);
top: -11px;
}
.popover.bottom > .arrow:after {
content: " ";
top: 1px;
margin-left: -10px;
border-top-width: 0;
border-bottom-color: #ffffff;
}
.popover.left > .arrow {
top: 50%;
right: -11px;
margin-top: -11px;
border-right-width: 0;
border-left-color: #999999;
border-left-color: rgba(0, 0, 0, 0.25);
}
.popover.left > .arrow:after {
content: " ";
right: 1px;
border-right-width: 0;
border-left-color: #ffffff;
bottom: -10px;
}
.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">
+1 -1
View File
@@ -22,7 +22,7 @@
<%def name="stylesheets()">
${h.css(
'base',
'jquery.rating'
'jquery.rating',
)}
<style type="text/css">
#center {