mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Merge pull request #1537 from carlfeberhard/handlebars.removal
Remove handlebars and rely solely on underscore templates
This commit is contained in:
+1
-1
@@ -24,5 +24,5 @@ module.exports = function(grunt) {
|
||||
// see the sub directory grunt-tasks/ for individual task definitions
|
||||
grunt.loadTasks( 'grunt-tasks' );
|
||||
// note: 'handlebars' *not* 'templates' since handlebars doesn't call uglify
|
||||
grunt.registerTask( 'default', [ 'check-modules', 'handlebars', 'uglify', 'webpack' ] );
|
||||
grunt.registerTask( 'default', [ 'check-modules', 'uglify', 'webpack' ] );
|
||||
};
|
||||
|
||||
+3
-17
@@ -44,10 +44,9 @@ A complete rebuild can be done with the following (from the `client` directory):
|
||||
|
||||
This will:
|
||||
|
||||
1. recompile the client templates (handlebars, etc.)
|
||||
2. compress the files in client/galaxy/scripts and place them in static/scripts
|
||||
3. generate source maps and place them in static/maps
|
||||
4. rebuild the webpack-based client apps
|
||||
1. compress the files in client/galaxy/scripts and place them in static/scripts
|
||||
2. generate source maps and place them in static/maps
|
||||
3. rebuild the webpack-based client apps
|
||||
|
||||
|
||||
Rebuilding Scripts Only
|
||||
@@ -74,19 +73,6 @@ To rebuild without compression and watch and rebuild when scripts change:
|
||||
grunt webpack-watch
|
||||
|
||||
|
||||
Templates
|
||||
=========
|
||||
|
||||
You can change and recompile the templates by using:
|
||||
|
||||
grunt templates
|
||||
|
||||
This will:
|
||||
|
||||
1. recompile the templates in client/galaxy/scripts/templates to client/galaxy/scripts/templates/compiled
|
||||
2. minify and generate source maps for the compiled templates
|
||||
|
||||
|
||||
Changing Styles/CSS
|
||||
===================
|
||||
|
||||
|
||||
+1
-2
@@ -14,7 +14,7 @@
|
||||
"underscore": "~1.7.0",
|
||||
"backbone": "~1.1.2",
|
||||
"bootstrap": "~3.3.2",
|
||||
"bootstrap-tour":"~0.10.2",
|
||||
"bootstrap-tour": "~0.10.2",
|
||||
"d3": "~3.5.3",
|
||||
"farbtastic": "~2.0.0-alpha.1",
|
||||
"toastr": "~2.1.0",
|
||||
@@ -31,7 +31,6 @@
|
||||
"jstree": "~3.0.9",
|
||||
"jquery-ui": "git://github.com/jquery/jquery-ui.git#~1.11.2",
|
||||
"threedubmedia.jquery.event": "*",
|
||||
"handlebars": "~3.0.0",
|
||||
"jquery-migrate": "~1.2.1",
|
||||
"requirejs": "~2.1.17"
|
||||
},
|
||||
|
||||
@@ -30,7 +30,6 @@ window.app = function app( options, bootstrapped ){
|
||||
toolPanel = new ToolPanel({
|
||||
el : '#left',
|
||||
userIsAnonymous : Galaxy.user.isAnonymous(),
|
||||
spinner_url : config.spinner_url,
|
||||
search_url : config.search_url,
|
||||
toolbox : config.toolbox,
|
||||
toolbox_in_panel : config.toolbox_in_panel,
|
||||
|
||||
@@ -17,7 +17,6 @@ var ToolPanel = LeftPanel.extend({
|
||||
|
||||
// create tool search, tool panel, and tool panel view.
|
||||
var tool_search = new Tools.ToolSearch({
|
||||
spinner_url : options.spinner_url,
|
||||
search_url : options.search_url,
|
||||
hidden : false
|
||||
});
|
||||
|
||||
@@ -1,881 +0,0 @@
|
||||
/*!
|
||||
|
||||
handlebars v3.0.3
|
||||
|
||||
Copyright (C) 2011-2014 by Yehuda Katz
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@license
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define(factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["Handlebars"] = factory();
|
||||
else
|
||||
root["Handlebars"] = factory();
|
||||
})(this, function() {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId])
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ exports: {},
|
||||
/******/ id: moduleId,
|
||||
/******/ loaded: false
|
||||
/******/ };
|
||||
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.loaded = true;
|
||||
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var _interopRequireWildcard = __webpack_require__(7)['default'];
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var _import = __webpack_require__(1);
|
||||
|
||||
var base = _interopRequireWildcard(_import);
|
||||
|
||||
// Each of these augment the Handlebars object. No need to setup here.
|
||||
// (This is done to easily share code between commonjs and browse envs)
|
||||
|
||||
var _SafeString = __webpack_require__(2);
|
||||
|
||||
var _SafeString2 = _interopRequireWildcard(_SafeString);
|
||||
|
||||
var _Exception = __webpack_require__(3);
|
||||
|
||||
var _Exception2 = _interopRequireWildcard(_Exception);
|
||||
|
||||
var _import2 = __webpack_require__(4);
|
||||
|
||||
var Utils = _interopRequireWildcard(_import2);
|
||||
|
||||
var _import3 = __webpack_require__(5);
|
||||
|
||||
var runtime = _interopRequireWildcard(_import3);
|
||||
|
||||
var _noConflict = __webpack_require__(6);
|
||||
|
||||
var _noConflict2 = _interopRequireWildcard(_noConflict);
|
||||
|
||||
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
||||
function create() {
|
||||
var hb = new base.HandlebarsEnvironment();
|
||||
|
||||
Utils.extend(hb, base);
|
||||
hb.SafeString = _SafeString2['default'];
|
||||
hb.Exception = _Exception2['default'];
|
||||
hb.Utils = Utils;
|
||||
hb.escapeExpression = Utils.escapeExpression;
|
||||
|
||||
hb.VM = runtime;
|
||||
hb.template = function (spec) {
|
||||
return runtime.template(spec, hb);
|
||||
};
|
||||
|
||||
return hb;
|
||||
}
|
||||
|
||||
var inst = create();
|
||||
inst.create = create;
|
||||
|
||||
_noConflict2['default'](inst);
|
||||
|
||||
inst['default'] = inst;
|
||||
|
||||
exports['default'] = inst;
|
||||
module.exports = exports['default'];
|
||||
|
||||
/***/ },
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var _interopRequireWildcard = __webpack_require__(7)['default'];
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
||||
exports.createFrame = createFrame;
|
||||
|
||||
var _import = __webpack_require__(4);
|
||||
|
||||
var Utils = _interopRequireWildcard(_import);
|
||||
|
||||
var _Exception = __webpack_require__(3);
|
||||
|
||||
var _Exception2 = _interopRequireWildcard(_Exception);
|
||||
|
||||
var VERSION = '3.0.1';
|
||||
exports.VERSION = VERSION;
|
||||
var COMPILER_REVISION = 6;
|
||||
|
||||
exports.COMPILER_REVISION = COMPILER_REVISION;
|
||||
var REVISION_CHANGES = {
|
||||
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
||||
2: '== 1.0.0-rc.3',
|
||||
3: '== 1.0.0-rc.4',
|
||||
4: '== 1.x.x',
|
||||
5: '== 2.0.0-alpha.x',
|
||||
6: '>= 2.0.0-beta.1'
|
||||
};
|
||||
|
||||
exports.REVISION_CHANGES = REVISION_CHANGES;
|
||||
var isArray = Utils.isArray,
|
||||
isFunction = Utils.isFunction,
|
||||
toString = Utils.toString,
|
||||
objectType = '[object Object]';
|
||||
|
||||
function HandlebarsEnvironment(helpers, partials) {
|
||||
this.helpers = helpers || {};
|
||||
this.partials = partials || {};
|
||||
|
||||
registerDefaultHelpers(this);
|
||||
}
|
||||
|
||||
HandlebarsEnvironment.prototype = {
|
||||
constructor: HandlebarsEnvironment,
|
||||
|
||||
logger: logger,
|
||||
log: log,
|
||||
|
||||
registerHelper: function registerHelper(name, fn) {
|
||||
if (toString.call(name) === objectType) {
|
||||
if (fn) {
|
||||
throw new _Exception2['default']('Arg not supported with multiple helpers');
|
||||
}
|
||||
Utils.extend(this.helpers, name);
|
||||
} else {
|
||||
this.helpers[name] = fn;
|
||||
}
|
||||
},
|
||||
unregisterHelper: function unregisterHelper(name) {
|
||||
delete this.helpers[name];
|
||||
},
|
||||
|
||||
registerPartial: function registerPartial(name, partial) {
|
||||
if (toString.call(name) === objectType) {
|
||||
Utils.extend(this.partials, name);
|
||||
} else {
|
||||
if (typeof partial === 'undefined') {
|
||||
throw new _Exception2['default']('Attempting to register a partial as undefined');
|
||||
}
|
||||
this.partials[name] = partial;
|
||||
}
|
||||
},
|
||||
unregisterPartial: function unregisterPartial(name) {
|
||||
delete this.partials[name];
|
||||
}
|
||||
};
|
||||
|
||||
function registerDefaultHelpers(instance) {
|
||||
instance.registerHelper('helperMissing', function () {
|
||||
if (arguments.length === 1) {
|
||||
// A missing field in a {{foo}} constuct.
|
||||
return undefined;
|
||||
} else {
|
||||
// Someone is actually trying to call something, blow up.
|
||||
throw new _Exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
||||
}
|
||||
});
|
||||
|
||||
instance.registerHelper('blockHelperMissing', function (context, options) {
|
||||
var inverse = options.inverse,
|
||||
fn = options.fn;
|
||||
|
||||
if (context === true) {
|
||||
return fn(this);
|
||||
} else if (context === false || context == null) {
|
||||
return inverse(this);
|
||||
} else if (isArray(context)) {
|
||||
if (context.length > 0) {
|
||||
if (options.ids) {
|
||||
options.ids = [options.name];
|
||||
}
|
||||
|
||||
return instance.helpers.each(context, options);
|
||||
} else {
|
||||
return inverse(this);
|
||||
}
|
||||
} else {
|
||||
if (options.data && options.ids) {
|
||||
var data = createFrame(options.data);
|
||||
data.contextPath = Utils.appendContextPath(options.data.contextPath, options.name);
|
||||
options = { data: data };
|
||||
}
|
||||
|
||||
return fn(context, options);
|
||||
}
|
||||
});
|
||||
|
||||
instance.registerHelper('each', function (context, options) {
|
||||
if (!options) {
|
||||
throw new _Exception2['default']('Must pass iterator to #each');
|
||||
}
|
||||
|
||||
var fn = options.fn,
|
||||
inverse = options.inverse,
|
||||
i = 0,
|
||||
ret = '',
|
||||
data = undefined,
|
||||
contextPath = undefined;
|
||||
|
||||
if (options.data && options.ids) {
|
||||
contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
||||
}
|
||||
|
||||
if (isFunction(context)) {
|
||||
context = context.call(this);
|
||||
}
|
||||
|
||||
if (options.data) {
|
||||
data = createFrame(options.data);
|
||||
}
|
||||
|
||||
function execIteration(field, index, last) {
|
||||
if (data) {
|
||||
data.key = field;
|
||||
data.index = index;
|
||||
data.first = index === 0;
|
||||
data.last = !!last;
|
||||
|
||||
if (contextPath) {
|
||||
data.contextPath = contextPath + field;
|
||||
}
|
||||
}
|
||||
|
||||
ret = ret + fn(context[field], {
|
||||
data: data,
|
||||
blockParams: Utils.blockParams([context[field], field], [contextPath + field, null])
|
||||
});
|
||||
}
|
||||
|
||||
if (context && typeof context === 'object') {
|
||||
if (isArray(context)) {
|
||||
for (var j = context.length; i < j; i++) {
|
||||
execIteration(i, i, i === context.length - 1);
|
||||
}
|
||||
} else {
|
||||
var priorKey = undefined;
|
||||
|
||||
for (var key in context) {
|
||||
if (context.hasOwnProperty(key)) {
|
||||
// We're running the iterations one step out of sync so we can detect
|
||||
// the last iteration without have to scan the object twice and create
|
||||
// an itermediate keys array.
|
||||
if (priorKey) {
|
||||
execIteration(priorKey, i - 1);
|
||||
}
|
||||
priorKey = key;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (priorKey) {
|
||||
execIteration(priorKey, i - 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (i === 0) {
|
||||
ret = inverse(this);
|
||||
}
|
||||
|
||||
return ret;
|
||||
});
|
||||
|
||||
instance.registerHelper('if', function (conditional, options) {
|
||||
if (isFunction(conditional)) {
|
||||
conditional = conditional.call(this);
|
||||
}
|
||||
|
||||
// Default behavior is to render the positive path if the value is truthy and not empty.
|
||||
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
|
||||
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
||||
if (!options.hash.includeZero && !conditional || Utils.isEmpty(conditional)) {
|
||||
return options.inverse(this);
|
||||
} else {
|
||||
return options.fn(this);
|
||||
}
|
||||
});
|
||||
|
||||
instance.registerHelper('unless', function (conditional, options) {
|
||||
return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
|
||||
});
|
||||
|
||||
instance.registerHelper('with', function (context, options) {
|
||||
if (isFunction(context)) {
|
||||
context = context.call(this);
|
||||
}
|
||||
|
||||
var fn = options.fn;
|
||||
|
||||
if (!Utils.isEmpty(context)) {
|
||||
if (options.data && options.ids) {
|
||||
var data = createFrame(options.data);
|
||||
data.contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]);
|
||||
options = { data: data };
|
||||
}
|
||||
|
||||
return fn(context, options);
|
||||
} else {
|
||||
return options.inverse(this);
|
||||
}
|
||||
});
|
||||
|
||||
instance.registerHelper('log', function (message, options) {
|
||||
var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
|
||||
instance.log(level, message);
|
||||
});
|
||||
|
||||
instance.registerHelper('lookup', function (obj, field) {
|
||||
return obj && obj[field];
|
||||
});
|
||||
}
|
||||
|
||||
var logger = {
|
||||
methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' },
|
||||
|
||||
// State enum
|
||||
DEBUG: 0,
|
||||
INFO: 1,
|
||||
WARN: 2,
|
||||
ERROR: 3,
|
||||
level: 1,
|
||||
|
||||
// Can be overridden in the host environment
|
||||
log: function log(level, message) {
|
||||
if (typeof console !== 'undefined' && logger.level <= level) {
|
||||
var method = logger.methodMap[level];
|
||||
(console[method] || console.log).call(console, message); // eslint-disable-line no-console
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.logger = logger;
|
||||
var log = logger.log;
|
||||
|
||||
exports.log = log;
|
||||
|
||||
function createFrame(object) {
|
||||
var frame = Utils.extend({}, object);
|
||||
frame._parent = object;
|
||||
return frame;
|
||||
}
|
||||
|
||||
/* [args, ]options */
|
||||
|
||||
/***/ },
|
||||
/* 2 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
// Build out our basic SafeString type
|
||||
function SafeString(string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
||||
return '' + this.string;
|
||||
};
|
||||
|
||||
exports['default'] = SafeString;
|
||||
module.exports = exports['default'];
|
||||
|
||||
/***/ },
|
||||
/* 3 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
||||
|
||||
function Exception(message, node) {
|
||||
var loc = node && node.loc,
|
||||
line = undefined,
|
||||
column = undefined;
|
||||
if (loc) {
|
||||
line = loc.start.line;
|
||||
column = loc.start.column;
|
||||
|
||||
message += ' - ' + line + ':' + column;
|
||||
}
|
||||
|
||||
var tmp = Error.prototype.constructor.call(this, message);
|
||||
|
||||
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
||||
for (var idx = 0; idx < errorProps.length; idx++) {
|
||||
this[errorProps[idx]] = tmp[errorProps[idx]];
|
||||
}
|
||||
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, Exception);
|
||||
}
|
||||
|
||||
if (loc) {
|
||||
this.lineNumber = line;
|
||||
this.column = column;
|
||||
}
|
||||
}
|
||||
|
||||
Exception.prototype = new Error();
|
||||
|
||||
exports['default'] = Exception;
|
||||
module.exports = exports['default'];
|
||||
|
||||
/***/ },
|
||||
/* 4 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.extend = extend;
|
||||
|
||||
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
||||
exports.indexOf = indexOf;
|
||||
exports.escapeExpression = escapeExpression;
|
||||
exports.isEmpty = isEmpty;
|
||||
exports.blockParams = blockParams;
|
||||
exports.appendContextPath = appendContextPath;
|
||||
var escape = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
'\'': ''',
|
||||
'`': '`'
|
||||
};
|
||||
|
||||
var badChars = /[&<>"'`]/g,
|
||||
possible = /[&<>"'`]/;
|
||||
|
||||
function escapeChar(chr) {
|
||||
return escape[chr];
|
||||
}
|
||||
|
||||
function extend(obj /* , ...source */) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
for (var key in arguments[i]) {
|
||||
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
||||
obj[key] = arguments[i][key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
var toString = Object.prototype.toString;
|
||||
|
||||
exports.toString = toString;
|
||||
// Sourced from lodash
|
||||
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
||||
/*eslint-disable func-style, no-var */
|
||||
var isFunction = function isFunction(value) {
|
||||
return typeof value === 'function';
|
||||
};
|
||||
// fallback for older versions of Chrome and Safari
|
||||
/* istanbul ignore next */
|
||||
if (isFunction(/x/)) {
|
||||
exports.isFunction = isFunction = function (value) {
|
||||
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
||||
};
|
||||
}
|
||||
var isFunction;
|
||||
exports.isFunction = isFunction;
|
||||
/*eslint-enable func-style, no-var */
|
||||
|
||||
/* istanbul ignore next */
|
||||
var isArray = Array.isArray || function (value) {
|
||||
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
||||
};exports.isArray = isArray;
|
||||
|
||||
function indexOf(array, value) {
|
||||
for (var i = 0, len = array.length; i < len; i++) {
|
||||
if (array[i] === value) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
function escapeExpression(string) {
|
||||
if (typeof string !== 'string') {
|
||||
// don't escape SafeStrings, since they're already safe
|
||||
if (string && string.toHTML) {
|
||||
return string.toHTML();
|
||||
} else if (string == null) {
|
||||
return '';
|
||||
} else if (!string) {
|
||||
return string + '';
|
||||
}
|
||||
|
||||
// Force a string conversion as this will be done by the append regardless and
|
||||
// the regex test will do this transparently behind the scenes, causing issues if
|
||||
// an object's to string has escaped characters in it.
|
||||
string = '' + string;
|
||||
}
|
||||
|
||||
if (!possible.test(string)) {
|
||||
return string;
|
||||
}
|
||||
return string.replace(badChars, escapeChar);
|
||||
}
|
||||
|
||||
function isEmpty(value) {
|
||||
if (!value && value !== 0) {
|
||||
return true;
|
||||
} else if (isArray(value) && value.length === 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockParams(params, ids) {
|
||||
params.path = ids;
|
||||
return params;
|
||||
}
|
||||
|
||||
function appendContextPath(contextPath, id) {
|
||||
return (contextPath ? contextPath + '.' : '') + id;
|
||||
}
|
||||
|
||||
/***/ },
|
||||
/* 5 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var _interopRequireWildcard = __webpack_require__(7)['default'];
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.checkRevision = checkRevision;
|
||||
|
||||
// TODO: Remove this line and break up compilePartial
|
||||
|
||||
exports.template = template;
|
||||
exports.wrapProgram = wrapProgram;
|
||||
exports.resolvePartial = resolvePartial;
|
||||
exports.invokePartial = invokePartial;
|
||||
exports.noop = noop;
|
||||
|
||||
var _import = __webpack_require__(4);
|
||||
|
||||
var Utils = _interopRequireWildcard(_import);
|
||||
|
||||
var _Exception = __webpack_require__(3);
|
||||
|
||||
var _Exception2 = _interopRequireWildcard(_Exception);
|
||||
|
||||
var _COMPILER_REVISION$REVISION_CHANGES$createFrame = __webpack_require__(1);
|
||||
|
||||
function checkRevision(compilerInfo) {
|
||||
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
||||
currentRevision = _COMPILER_REVISION$REVISION_CHANGES$createFrame.COMPILER_REVISION;
|
||||
|
||||
if (compilerRevision !== currentRevision) {
|
||||
if (compilerRevision < currentRevision) {
|
||||
var runtimeVersions = _COMPILER_REVISION$REVISION_CHANGES$createFrame.REVISION_CHANGES[currentRevision],
|
||||
compilerVersions = _COMPILER_REVISION$REVISION_CHANGES$createFrame.REVISION_CHANGES[compilerRevision];
|
||||
throw new _Exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
|
||||
} else {
|
||||
// Use the embedded version info since the runtime doesn't know about this revision yet
|
||||
throw new _Exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function template(templateSpec, env) {
|
||||
/* istanbul ignore next */
|
||||
if (!env) {
|
||||
throw new _Exception2['default']('No environment passed to template');
|
||||
}
|
||||
if (!templateSpec || !templateSpec.main) {
|
||||
throw new _Exception2['default']('Unknown template object: ' + typeof templateSpec);
|
||||
}
|
||||
|
||||
// Note: Using env.VM references rather than local var references throughout this section to allow
|
||||
// for external users to override these as psuedo-supported APIs.
|
||||
env.VM.checkRevision(templateSpec.compiler);
|
||||
|
||||
function invokePartialWrapper(partial, context, options) {
|
||||
if (options.hash) {
|
||||
context = Utils.extend({}, context, options.hash);
|
||||
}
|
||||
|
||||
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
||||
var result = env.VM.invokePartial.call(this, partial, context, options);
|
||||
|
||||
if (result == null && env.compile) {
|
||||
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
||||
result = options.partials[options.name](context, options);
|
||||
}
|
||||
if (result != null) {
|
||||
if (options.indent) {
|
||||
var lines = result.split('\n');
|
||||
for (var i = 0, l = lines.length; i < l; i++) {
|
||||
if (!lines[i] && i + 1 === l) {
|
||||
break;
|
||||
}
|
||||
|
||||
lines[i] = options.indent + lines[i];
|
||||
}
|
||||
result = lines.join('\n');
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
throw new _Exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
||||
}
|
||||
}
|
||||
|
||||
// Just add water
|
||||
var container = {
|
||||
strict: function strict(obj, name) {
|
||||
if (!(name in obj)) {
|
||||
throw new _Exception2['default']('"' + name + '" not defined in ' + obj);
|
||||
}
|
||||
return obj[name];
|
||||
},
|
||||
lookup: function lookup(depths, name) {
|
||||
var len = depths.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (depths[i] && depths[i][name] != null) {
|
||||
return depths[i][name];
|
||||
}
|
||||
}
|
||||
},
|
||||
lambda: function lambda(current, context) {
|
||||
return typeof current === 'function' ? current.call(context) : current;
|
||||
},
|
||||
|
||||
escapeExpression: Utils.escapeExpression,
|
||||
invokePartial: invokePartialWrapper,
|
||||
|
||||
fn: function fn(i) {
|
||||
return templateSpec[i];
|
||||
},
|
||||
|
||||
programs: [],
|
||||
program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
||||
var programWrapper = this.programs[i],
|
||||
fn = this.fn(i);
|
||||
if (data || depths || blockParams || declaredBlockParams) {
|
||||
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
||||
} else if (!programWrapper) {
|
||||
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
||||
}
|
||||
return programWrapper;
|
||||
},
|
||||
|
||||
data: function data(value, depth) {
|
||||
while (value && depth--) {
|
||||
value = value._parent;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
merge: function merge(param, common) {
|
||||
var obj = param || common;
|
||||
|
||||
if (param && common && param !== common) {
|
||||
obj = Utils.extend({}, common, param);
|
||||
}
|
||||
|
||||
return obj;
|
||||
},
|
||||
|
||||
noop: env.VM.noop,
|
||||
compilerInfo: templateSpec.compiler
|
||||
};
|
||||
|
||||
function ret(context) {
|
||||
var options = arguments[1] === undefined ? {} : arguments[1];
|
||||
|
||||
var data = options.data;
|
||||
|
||||
ret._setup(options);
|
||||
if (!options.partial && templateSpec.useData) {
|
||||
data = initData(context, data);
|
||||
}
|
||||
var depths = undefined,
|
||||
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
||||
if (templateSpec.useDepths) {
|
||||
depths = options.depths ? [context].concat(options.depths) : [context];
|
||||
}
|
||||
|
||||
return templateSpec.main.call(container, context, container.helpers, container.partials, data, blockParams, depths);
|
||||
}
|
||||
ret.isTop = true;
|
||||
|
||||
ret._setup = function (options) {
|
||||
if (!options.partial) {
|
||||
container.helpers = container.merge(options.helpers, env.helpers);
|
||||
|
||||
if (templateSpec.usePartial) {
|
||||
container.partials = container.merge(options.partials, env.partials);
|
||||
}
|
||||
} else {
|
||||
container.helpers = options.helpers;
|
||||
container.partials = options.partials;
|
||||
}
|
||||
};
|
||||
|
||||
ret._child = function (i, data, blockParams, depths) {
|
||||
if (templateSpec.useBlockParams && !blockParams) {
|
||||
throw new _Exception2['default']('must pass block params');
|
||||
}
|
||||
if (templateSpec.useDepths && !depths) {
|
||||
throw new _Exception2['default']('must pass parent depths');
|
||||
}
|
||||
|
||||
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
||||
function prog(context) {
|
||||
var options = arguments[1] === undefined ? {} : arguments[1];
|
||||
|
||||
return fn.call(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), depths && [context].concat(depths));
|
||||
}
|
||||
prog.program = i;
|
||||
prog.depth = depths ? depths.length : 0;
|
||||
prog.blockParams = declaredBlockParams || 0;
|
||||
return prog;
|
||||
}
|
||||
|
||||
function resolvePartial(partial, context, options) {
|
||||
if (!partial) {
|
||||
partial = options.partials[options.name];
|
||||
} else if (!partial.call && !options.name) {
|
||||
// This is a dynamic partial that returned a string
|
||||
options.name = partial;
|
||||
partial = options.partials[partial];
|
||||
}
|
||||
return partial;
|
||||
}
|
||||
|
||||
function invokePartial(partial, context, options) {
|
||||
options.partial = true;
|
||||
|
||||
if (partial === undefined) {
|
||||
throw new _Exception2['default']('The partial ' + options.name + ' could not be found');
|
||||
} else if (partial instanceof Function) {
|
||||
return partial(context, options);
|
||||
}
|
||||
}
|
||||
|
||||
function noop() {
|
||||
return '';
|
||||
}
|
||||
|
||||
function initData(context, data) {
|
||||
if (!data || !('root' in data)) {
|
||||
data = data ? _COMPILER_REVISION$REVISION_CHANGES$createFrame.createFrame(data) : {};
|
||||
data.root = context;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/***/ },
|
||||
/* 6 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
/*global window */
|
||||
|
||||
exports['default'] = function (Handlebars) {
|
||||
/* istanbul ignore next */
|
||||
var root = typeof global !== 'undefined' ? global : window,
|
||||
$Handlebars = root.Handlebars;
|
||||
/* istanbul ignore next */
|
||||
Handlebars.noConflict = function () {
|
||||
if (root.Handlebars === Handlebars) {
|
||||
root.Handlebars = $Handlebars;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = exports['default'];
|
||||
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
||||
|
||||
/***/ },
|
||||
/* 7 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
exports["default"] = function (obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
"default": obj
|
||||
};
|
||||
};
|
||||
|
||||
exports.__esModule = true;
|
||||
|
||||
/***/ }
|
||||
/******/ ])
|
||||
});
|
||||
;
|
||||
@@ -6,13 +6,10 @@
|
||||
"libs/underscore",
|
||||
"viz/trackster/util",
|
||||
"mvc/dataset/data",
|
||||
"mvc/tool/tool-form",
|
||||
"templates/tool_form.handlebars",
|
||||
"templates/tool_link.handlebars",
|
||||
"templates/panel_section.handlebars",
|
||||
"templates/tool_search.handlebars",
|
||||
"mvc/tool/tool-form"
|
||||
|
||||
], function(_, util, data, ToolForm, tool_form_template, tool_link_template, panel_section_template, tool_search_template) {
|
||||
], function(_, util, data, ToolForm) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Mixin for tracking model visibility.
|
||||
@@ -353,7 +350,6 @@ var ToolSearch = Backbone.Model.extend({
|
||||
defaults: {
|
||||
search_hint_string: "search tools",
|
||||
min_chars_for_search: 3,
|
||||
spinner_url: "",
|
||||
clear_btn_url: "",
|
||||
search_url: "",
|
||||
visible: true,
|
||||
@@ -496,7 +492,7 @@ var ToolPanel = Backbone.Model.extend({
|
||||
/**
|
||||
* View classes for Galaxy tools and tool panel.
|
||||
*
|
||||
* Views use precompiled Handlebars templates for rendering. Views update as needed
|
||||
* Views use the templates defined below for rendering. Views update as needed
|
||||
* based on (a) model/collection events and (b) user interactions; in this sense,
|
||||
* they are controllers are well and the HTML is the real view in the MVC architecture.
|
||||
*/
|
||||
@@ -523,7 +519,7 @@ var ToolLinkView = BaseView.extend({
|
||||
render: function() {
|
||||
// create element
|
||||
var $link = $('<div/>');
|
||||
$link.append(tool_link_template(this.model.toJSON()));
|
||||
$link.append(templates.tool_link(this.model.toJSON()));
|
||||
|
||||
// open upload dialog for upload tool
|
||||
if (this.model.id === 'upload1') {
|
||||
@@ -576,7 +572,7 @@ var ToolSectionView = BaseView.extend({
|
||||
|
||||
render: function() {
|
||||
// Build using template.
|
||||
this.$el.append( panel_section_template(this.model.toJSON()) );
|
||||
this.$el.append( templates.panel_section(this.model.toJSON()) );
|
||||
|
||||
// Add tools to section.
|
||||
var section_body = this.$el.find(".toolSectionBody");
|
||||
@@ -632,7 +628,7 @@ var ToolSearchView = Backbone.View.extend({
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.append( tool_search_template(this.model.toJSON()) );
|
||||
this.$el.append( templates.tool_search(this.model.toJSON()) );
|
||||
if (!this.model.is_visible()) {
|
||||
this.$el.hide();
|
||||
}
|
||||
@@ -736,7 +732,7 @@ var ToolFormView = Backbone.View.extend({
|
||||
|
||||
render: function() {
|
||||
this.$el.children().remove();
|
||||
this.$el.append( tool_form_template(this.model.toJSON()) );
|
||||
this.$el.append( templates.tool_form(this.model.toJSON()) );
|
||||
}
|
||||
});
|
||||
|
||||
@@ -785,6 +781,72 @@ var IntegratedToolMenuAndView = Backbone.View.extend({
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: move into relevant views
|
||||
var templates = {
|
||||
// the search bar at the top of the tool panel
|
||||
tool_search : _.template([
|
||||
'<input id="tool-search-query" class="search-query parent-width" name="query" ',
|
||||
'placeholder="<%- search_hint_string %>" autocomplete="off" type="text" />',
|
||||
'<a id="search-clear-btn" title="clear search (esc)"> </a>',
|
||||
//TODO: replace with icon
|
||||
'<span id="search-spinner" class="search-spinner fa fa-spinner fa-spin"></span>',
|
||||
].join('')),
|
||||
|
||||
// the category level container in the tool panel (e.g. 'Get Data', 'Text Manipulation')
|
||||
panel_section : _.template([
|
||||
'<div class="toolSectionTitle" id="title_<%- id %>">',
|
||||
'<a href="javascript:void(0)"><span><%- name %></span></a>',
|
||||
'</div>',
|
||||
'<div id="<%- id %>" class="toolSectionBody" style="display: none;">',
|
||||
'<div class="toolSectionBg"></div>',
|
||||
'<div>'
|
||||
].join('')),
|
||||
|
||||
// a single tool's link in the tool panel; will load the tool form in the center panel
|
||||
tool_link : _.template([
|
||||
'<span class="labels">',
|
||||
'<% _.each( labels, function( label ){ %>',
|
||||
'<span class="label label-default label-<%- label %>">',
|
||||
'<%- label %>',
|
||||
'</span>',
|
||||
'<% }); %>',
|
||||
'</span>',
|
||||
'<a class="<%- id %> tool-link" href="<%= link %>" target="<%- target %>" minsizehint="<%- min_width %>">',
|
||||
'<%- name %>',
|
||||
'</a>',
|
||||
' <%- description %>'
|
||||
].join('')),
|
||||
|
||||
// the tool form for entering tool parameters, viewing help and executing the tool
|
||||
// loaded when a tool link is clicked in the tool panel
|
||||
tool_form : _.template([
|
||||
'<div class="toolFormTitle"><%- tool.name %> (version <%- tool.version %>)</div>',
|
||||
'<div class="toolFormBody">',
|
||||
'<% _.each( tool.inputs, function( input ){ %>',
|
||||
'<div class="form-row">',
|
||||
'<label for="<%- input.name %>"><%- input.label %>:</label>',
|
||||
'<div class="form-row-input">',
|
||||
'<%= input.html %>',
|
||||
'</div>',
|
||||
'<div class="toolParamHelp" style="clear: both;">',
|
||||
'<%- input.help %>',
|
||||
'</div>',
|
||||
'<div style="clear: both;"></div>',
|
||||
'</div>',
|
||||
'<% }); %>',
|
||||
'</div>',
|
||||
'<div class="form-row form-actions">',
|
||||
'<input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute" />',
|
||||
'</div>',
|
||||
'<div class="toolHelp">',
|
||||
'<div class="toolHelpBody"><% tool.help %></div>',
|
||||
'</div>',
|
||||
// TODO: we need scoping here because 'help' is the dom for the help menu in the masthead
|
||||
// which implies a leaky variable that I can't find
|
||||
].join(''), { variable: 'tool' }),
|
||||
};
|
||||
|
||||
|
||||
// Exports
|
||||
return {
|
||||
ToolParameter: ToolParameter,
|
||||
|
||||
@@ -8,7 +8,6 @@ window[ 'jQuery' ] = jQuery; // a weird form to prevent webpack from sub'ing 'wi
|
||||
window.$ = jQuery;
|
||||
window._ = _;
|
||||
window.Backbone = Backbone;
|
||||
window.Handlebars = Handlebars;
|
||||
// console.debug('globals loaded:', window.jQuery, window.Backbone, '...');
|
||||
|
||||
// these are galaxy globals not defined in the provider (although they could be - but why encourage that?)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
define(['libs/handlebars.runtime'], function(Handlebars) {
|
||||
|
||||
return Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression;
|
||||
|
||||
return "<div class=\"toolSectionTitle\" id=\"title_"
|
||||
+ alias3(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ "\">\n <a href=\"javascript:void(0)\"><span>"
|
||||
+ alias3(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper)))
|
||||
+ "</span></a>\n</div>\n<div id=\""
|
||||
+ alias3(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ "\" class=\"toolSectionBody\" style=\"display: none; \">\n <div class=\"toolSectionBg\"></div>\n<div>";
|
||||
},"useData":true})
|
||||
|
||||
});
|
||||
@@ -1,29 +0,0 @@
|
||||
define(['libs/handlebars.runtime'], function(Handlebars) {
|
||||
|
||||
return Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression;
|
||||
|
||||
return " <div class=\"form-row\">\n <label for=\""
|
||||
+ alias3(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper)))
|
||||
+ "\">"
|
||||
+ alias3(((helper = (helper = helpers.label || (depth0 != null ? depth0.label : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"label","hash":{},"data":data}) : helper)))
|
||||
+ ":</label>\n <div class=\"form-row-input\">\n "
|
||||
+ ((stack1 = ((helper = (helper = helpers.html || (depth0 != null ? depth0.html : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"html","hash":{},"data":data}) : helper))) != null ? stack1 : "")
|
||||
+ "\n </div>\n <div class=\"toolParamHelp\" style=\"clear: both;\">\n "
|
||||
+ alias3(((helper = (helper = helpers.help || (depth0 != null ? depth0.help : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"help","hash":{},"data":data}) : helper)))
|
||||
+ "\n </div>\n <div style=\"clear: both;\"></div>\n </div>\n";
|
||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression;
|
||||
|
||||
return "<div class=\"toolFormTitle\">"
|
||||
+ alias3(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper)))
|
||||
+ " (version "
|
||||
+ alias3(((helper = (helper = helpers.version || (depth0 != null ? depth0.version : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"version","hash":{},"data":data}) : helper)))
|
||||
+ ")</div>\n <div class=\"toolFormBody\">\n"
|
||||
+ ((stack1 = helpers.each.call(depth0,(depth0 != null ? depth0.inputs : depth0),{"name":"each","hash":{},"fn":this.program(1, data, 0),"inverse":this.noop,"data":data})) != null ? stack1 : "")
|
||||
+ " </div>\n <div class=\"form-row form-actions\">\n <input type=\"submit\" class=\"btn btn-primary\" name=\"runtool_btn\" value=\"Execute\">\n</div>\n<div class=\"toolHelp\">\n <div class=\"toolHelpBody\">"
|
||||
+ alias3(((helper = (helper = helpers.help || (depth0 != null ? depth0.help : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"help","hash":{},"data":data}) : helper)))
|
||||
+ "</div>\n</div>";
|
||||
},"useData":true})
|
||||
|
||||
});
|
||||
@@ -1,31 +0,0 @@
|
||||
define(['libs/handlebars.runtime'], function(Handlebars) {
|
||||
|
||||
return Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||
var alias1=this.lambda, alias2=this.escapeExpression;
|
||||
|
||||
return "<span class=\"label label-default label-"
|
||||
+ alias2(alias1(depth0, depth0))
|
||||
+ "\">"
|
||||
+ alias2(alias1(depth0, depth0))
|
||||
+ "</span> ";
|
||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
var stack1, helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression;
|
||||
|
||||
return "<span class=\"labels\">"
|
||||
+ ((stack1 = helpers.each.call(depth0,(depth0 != null ? depth0.labels : depth0),{"name":"each","hash":{},"fn":this.program(1, data, 0),"inverse":this.noop,"data":data})) != null ? stack1 : "")
|
||||
+ "</span>\n<a class=\""
|
||||
+ alias3(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"id","hash":{},"data":data}) : helper)))
|
||||
+ " tool-link\" href=\""
|
||||
+ alias3(((helper = (helper = helpers.link || (depth0 != null ? depth0.link : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"link","hash":{},"data":data}) : helper)))
|
||||
+ "\" target=\""
|
||||
+ alias3(((helper = (helper = helpers.target || (depth0 != null ? depth0.target : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"target","hash":{},"data":data}) : helper)))
|
||||
+ "\" minsizehint=\""
|
||||
+ alias3(((helper = (helper = helpers.min_width || (depth0 != null ? depth0.min_width : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"min_width","hash":{},"data":data}) : helper)))
|
||||
+ "\">"
|
||||
+ alias3(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper)))
|
||||
+ "</a>\n"
|
||||
+ alias3(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"description","hash":{},"data":data}) : helper)))
|
||||
+ "\n";
|
||||
},"useData":true})
|
||||
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
define(['libs/handlebars.runtime'], function(Handlebars) {
|
||||
|
||||
return Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression;
|
||||
|
||||
return "<input type=\"text\" name=\"query\" placeholder=\""
|
||||
+ alias3(((helper = (helper = helpers.search_hint_string || (depth0 != null ? depth0.search_hint_string : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"search_hint_string","hash":{},"data":data}) : helper)))
|
||||
+ "\" id=\"tool-search-query\" autocomplete=\"off\" class=\"search-query parent-width\" />\n<a id=\"search-clear-btn\" title=\"clear search (esc)\"> </a>\n<img src=\""
|
||||
+ alias3(((helper = (helper = helpers.spinner_url || (depth0 != null ? depth0.spinner_url : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"spinner_url","hash":{},"data":data}) : helper)))
|
||||
+ "\" id=\"search-spinner\" class=\"search-spinner\"/>\n";
|
||||
},"useData":true})
|
||||
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
<div class="toolSectionTitle" id="title_{{id}}">
|
||||
<a href="javascript:void(0)"><span>{{name}}</span></a>
|
||||
</div>
|
||||
<div id="{{id}}" class="toolSectionBody" style="display: none; ">
|
||||
<div class="toolSectionBg"></div>
|
||||
<div>
|
||||
@@ -1,21 +0,0 @@
|
||||
<div class="toolFormTitle">{{name}} (version {{version}})</div>
|
||||
<div class="toolFormBody">
|
||||
{{#each inputs}}
|
||||
<div class="form-row">
|
||||
<label for="{{name}}">{{label}}:</label>
|
||||
<div class="form-row-input">
|
||||
{{{html}}}
|
||||
</div>
|
||||
<div class="toolParamHelp" style="clear: both;">
|
||||
{{help}}
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class="form-row form-actions">
|
||||
<input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">
|
||||
</div>
|
||||
<div class="toolHelp">
|
||||
<div class="toolHelpBody">{{help}}</div>
|
||||
</div>
|
||||
@@ -1,3 +0,0 @@
|
||||
<span class="labels">{{#each labels}}<span class="label label-default label-{{this}}">{{this}}</span> {{/each}}</span>
|
||||
<a class="{{id}} tool-link" href="{{link}}" target="{{target}}" minsizehint="{{min_width}}">{{name}}</a>
|
||||
{{description}}
|
||||
@@ -1,3 +0,0 @@
|
||||
<input type="text" name="query" placeholder="{{search_hint_string}}" id="tool-search-query" autocomplete="off" class="search-query parent-width" />
|
||||
<a id="search-clear-btn" title="clear search (esc)"> </a>
|
||||
<img src="{{spinner_url}}" id="search-spinner" class="search-spinner"/>
|
||||
@@ -724,6 +724,8 @@ input[type="submit"], button {
|
||||
display: none;
|
||||
right: 6px;
|
||||
top: 9px;
|
||||
font-size: 1.4em;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
#search-clear-btn {
|
||||
|
||||
@@ -15,7 +15,6 @@ module.exports = function( grunt ){
|
||||
'traceKit': [ 'tracekit.js', 'tracekit.js' ],
|
||||
'ravenjs': [ 'dist/raven.js', 'raven.js' ],
|
||||
'underscore': [ 'underscore.js', 'underscore.js' ],
|
||||
'handlebars': [ 'handlebars.runtime.js', 'handlebars.runtime.js' ],
|
||||
'backbone': [ 'backbone.js', 'backbone.js' ],
|
||||
'requirejs': [ 'require.js', 'require.js' ],
|
||||
'd3': [ 'd3.js', 'd3.js' ],
|
||||
|
||||
@@ -17,7 +17,6 @@ module.exports = function( grunt ){
|
||||
'autocomplete_tagging',
|
||||
'embed_item',
|
||||
'iphone',
|
||||
'masthead',
|
||||
'library',
|
||||
'trackster',
|
||||
'circster',
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
/**
|
||||
* Grunt task to compile templates.
|
||||
* @param {Object} grunt main grunt file
|
||||
* @return {Function} callback to build this task
|
||||
*/
|
||||
module.exports = function( grunt ){
|
||||
"use strict";
|
||||
|
||||
var app = grunt.config.get( 'app' ),
|
||||
paths = grunt.config.get( 'paths' );
|
||||
|
||||
grunt.config( 'handlebars', {
|
||||
'default' : {
|
||||
files: [{
|
||||
expand : true,
|
||||
cwd : paths.srcSymlink + '/templates',
|
||||
src : '**/*.handlebars',
|
||||
dest : paths.srcSymlink + '/templates/compiled',
|
||||
ext : '.js'
|
||||
}],
|
||||
options : {
|
||||
// namespace needs to be false to return a fn (instead of adding to a global namespace)
|
||||
namespace : false,
|
||||
// define truthy amd here - if string, this will be the modules require'd
|
||||
amd : 'libs/handlebars.runtime',
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask( 'templates', function(){
|
||||
// compile then compress
|
||||
grunt.task.run( 'handlebars' );
|
||||
grunt.config( 'uglify.target.files', [{
|
||||
expand : true,
|
||||
cwd : paths.srcSymlink + '/templates/compiled',
|
||||
src : '**/*.js',
|
||||
dest : paths.dist + '/templates/compiled'
|
||||
}]);
|
||||
grunt.task.run( 'uglify' );
|
||||
});
|
||||
|
||||
// -------------------------------------------------------------------------- watch & compile
|
||||
// grunt.config( 'watch', {
|
||||
// watch: {
|
||||
// // watch for changes in the src dir
|
||||
// files: [ paths.srcSymlink + '/**' ],
|
||||
// tasks: [ 'uglify' ],
|
||||
// options: {
|
||||
// spawn: false
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
grunt.loadNpmTasks( 'grunt-contrib-handlebars' );
|
||||
};
|
||||
@@ -13,14 +13,11 @@
|
||||
"grunt-cli": "^0.1.13",
|
||||
"grunt-contrib-clean": "^0.6.0",
|
||||
"grunt-contrib-copy": "^0.5.0",
|
||||
"grunt-contrib-handlebars": "^0.10.2",
|
||||
"grunt-contrib-less": "^1.1.0",
|
||||
"grunt-contrib-uglify": "^0.8.0",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-exec": "^0.4.6",
|
||||
"grunt-spritesmith": "^4.7.1",
|
||||
"handlebars": "^4.0.4",
|
||||
"handlebars-loader": "^1.1.4",
|
||||
"i18n-webpack-plugin": "^0.2.7",
|
||||
"webpack": "^1.10.1",
|
||||
"webpack-dev-server": "^1.7.0"
|
||||
|
||||
@@ -23,7 +23,6 @@ var webpack = require( 'webpack' ),
|
||||
// mvc
|
||||
'libs/underscore',
|
||||
'libs/backbone',
|
||||
'libs/handlebars.runtime',
|
||||
// all pages get these
|
||||
'ui/autocom_tagging',
|
||||
'layout/modal',
|
||||
@@ -54,7 +53,6 @@ module.exports = {
|
||||
},
|
||||
module : {
|
||||
loaders : [
|
||||
{ test : /\.handlebars$/, loader : 'handlebars-loader' },
|
||||
],
|
||||
},
|
||||
resolveLoader : {
|
||||
@@ -74,7 +72,6 @@ module.exports = {
|
||||
'window.jQuery': 'jquery',
|
||||
_: "underscore",
|
||||
Backbone: 'libs/backbone',
|
||||
Handlebars: 'libs/handlebars.runtime'
|
||||
}),
|
||||
// new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 })
|
||||
],
|
||||
|
||||
@@ -5,29 +5,13 @@ module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON( 'package.json' ),
|
||||
|
||||
handlebars: {
|
||||
// compile all hb templates into a single file in the build dir
|
||||
compile: {
|
||||
options: {
|
||||
namespace: 'scatterplot',
|
||||
processName : function( filepath ){
|
||||
return filepath.match( /\w*\.handlebars/ )[0].replace( '.handlebars', '' );
|
||||
}
|
||||
},
|
||||
files: {
|
||||
"build/compiled-templates.js" : "src/handlebars/*.handlebars"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
concat: {
|
||||
// concat the template file and any js files in the src dir into a single file in the build dir
|
||||
// concat any js files in the src dir into a single file in the build dir
|
||||
options: {
|
||||
separator: ';\n'
|
||||
},
|
||||
dist: {
|
||||
//NOTE: mvc references templates - templates must be cat'd first
|
||||
src : [ 'build/compiled-templates.js', 'src/**/*.js' ],
|
||||
src : [ 'src/**/*.js' ],
|
||||
dest: 'build/scatterplot-concat.js'
|
||||
}
|
||||
},
|
||||
@@ -47,17 +31,16 @@ module.exports = function(grunt) {
|
||||
|
||||
watch: {
|
||||
// watch for changes in the src dir
|
||||
files: [ 'src/**.js', 'src/handlebars/*.handlebars' ],
|
||||
files: [ 'src/**.js' ],
|
||||
tasks: [ 'default' ]
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks( 'grunt-contrib-handlebars' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-concat' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
||||
|
||||
grunt.registerTask( 'default', [ 'handlebars', 'concat', 'uglify' ]);
|
||||
grunt.registerTask( 'default', [ 'concat', 'uglify' ]);
|
||||
// you can run grunt watch directly:
|
||||
// grunt watch
|
||||
};
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-cli": "~0.1.9",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-handlebars": "^0.9.3",
|
||||
"grunt-contrib-uglify": "~0.2.2",
|
||||
"grunt-contrib-watch": "~0.5.3"
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<p class="help-text">
|
||||
Use the following controls to how the chart is displayed.
|
||||
The slide controls can be moved by the mouse or, if the 'handle' is in focus, your keyboard's arrow keys.
|
||||
Move the focus between controls by using the tab or shift+tab keys on your keyboard.
|
||||
Use the 'Draw' button to render (or re-render) the chart with the current settings.
|
||||
</p>
|
||||
|
||||
<div data-config-key="datapointSize" class="form-input numeric-slider-input">
|
||||
<label for="datapointSize">Size of data point: </label>
|
||||
<div class="slider-output">{{datapointSize}}</div>
|
||||
<div class="slider"></div>
|
||||
<p class="form-help help-text-small">
|
||||
Size of the graphic representation of each data point
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div data-config-key="width" class="form-input numeric-slider-input">
|
||||
<label for="width">Chart width: </label>
|
||||
<div class="slider-output">{{width}}</div>
|
||||
<div class="slider"></div>
|
||||
<p class="form-help help-text-small">
|
||||
(not including chart margins and axes)
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div data-config-key="height" class="form-input numeric-slider-input">
|
||||
<label for="height">Chart height: </label>
|
||||
<div class="slider-output">{{height}}</div>
|
||||
<div class="slider"></div>
|
||||
<p class="form-help help-text-small">
|
||||
(not including chart margins and axes)
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div data-config-key="X-axis-label"class="text-input form-input">
|
||||
<label for="X-axis-label">Re-label the X axis: </label>
|
||||
<input type="text" name="X-axis-label" id="X-axis-label" value="{{xLabel}}" />
|
||||
<p class="form-help help-text-small"></p>
|
||||
</div>
|
||||
|
||||
<div data-config-key="Y-axis-label" class="text-input form-input">
|
||||
<label for="Y-axis-label">Re-label the Y axis: </label>
|
||||
<input type="text" name="Y-axis-label" id="Y-axis-label" value="{{yLabel}}" />
|
||||
<p class="form-help help-text-small"></p>
|
||||
</div>
|
||||
|
||||
<button class="render-button btn btn-primary active">Draw</button>
|
||||
@@ -1,24 +0,0 @@
|
||||
<p class="help-text">
|
||||
Use the following control to change which columns are used by the chart. Click any cell
|
||||
from the last three rows of the table to select the column for the appropriate data.
|
||||
Use the 'Draw' button to render (or re-render) the chart with the current settings.
|
||||
</p>
|
||||
|
||||
<ul class="help-text" style="margin-left: 8px">
|
||||
<li><b>X Column</b>: which column values will be used for the x axis of the chart.</li>
|
||||
<li><b>Y Column</b>: which column values will be used for the y axis of the chart.</li>
|
||||
<li><b>ID Column</b>: an additional column value displayed when the user hovers over a data point.
|
||||
It may be useful to select unique or categorical identifiers here (such as gene ids).
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="column-selection">
|
||||
<pre class="peek">{{{ peek }}}</pre>
|
||||
</div>
|
||||
|
||||
<p class="help-text help-text-small">
|
||||
<b>Note</b>: If it can be determined from the dataset's filetype that a column is not numeric,
|
||||
that column choice may be disabled for either the x or y axis.
|
||||
</p>
|
||||
|
||||
<button class="render-button btn btn-primary active">Draw</button>
|
||||
@@ -1,42 +0,0 @@
|
||||
<div class="scatterplot-editor tabbable tabs-left">
|
||||
{{! tab buttons/headers using Bootstrap }}
|
||||
<ul class="nav nav-tabs">
|
||||
{{! start with the data controls as the displayed tab }}
|
||||
<li class="active">
|
||||
<a title="Use this tab to change which data are used"
|
||||
href="#data-control" data-toggle="tab">Data Controls</a>
|
||||
</li>
|
||||
<li>
|
||||
<a title="Use this tab to change how the chart is drawn"
|
||||
href="#chart-control" data-toggle="tab" >Chart Controls</a>
|
||||
</li>
|
||||
{{! chart starts as disabled since there's no info yet }}
|
||||
<li class="disabled">
|
||||
<a title="This tab will display the chart"
|
||||
href="#chart-display" data-toggle="tab">Chart</a>
|
||||
</li>
|
||||
{{! ... }}
|
||||
<li class="file-controls">
|
||||
<!-- <button class="copy-btn btn btn-default"
|
||||
title="Save this as a new visualization">Save to new</button>-->
|
||||
<button class="save-btn btn btn-default">Save</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{! data form, chart config form, chart all get their own tab }}
|
||||
<div class="tab-content">
|
||||
{{! ---------------------------- tab for data settings form }}
|
||||
<div id="data-control" class="scatterplot-config-control tab-pane active">
|
||||
{{! rendered separately }}
|
||||
</div>
|
||||
|
||||
{{! ---------------------------- tab for chart graphics control form }}
|
||||
<div id="chart-control" class="scatterplot-config-control tab-pane">
|
||||
{{! rendered separately }}
|
||||
</div>
|
||||
|
||||
{{! ---------------------------- tab for actual chart }}
|
||||
<div id="chart-display" class="scatterplot-display tab-pane"></div>
|
||||
|
||||
</div>{{! end .tab-content }}
|
||||
</div>{{! end .chart-control }}
|
||||
@@ -18,7 +18,7 @@ todo:
|
||||
Drag & Drop other splots onto current (redraw with new axis and differentiate the datasets)
|
||||
Remove 'chart' namessave
|
||||
Somehow link out from info box?
|
||||
|
||||
|
||||
Subclass on specific datatypes? (vcf, cuffdiff, etc.)
|
||||
What can be common/useful to other visualizations?
|
||||
|
||||
@@ -33,7 +33,7 @@ var ScatterplotConfigEditor = Backbone.View.extend({
|
||||
//TODO: !should be a view on a visualization model
|
||||
//logger : console,
|
||||
className : 'scatterplot-control-form',
|
||||
|
||||
|
||||
/** initialize requires a configuration Object containing a dataset Object */
|
||||
initialize : function( attributes ){
|
||||
if( !this.model ){
|
||||
@@ -139,7 +139,7 @@ var ScatterplotConfigEditor = Backbone.View.extend({
|
||||
$dataControl.find( '[title]' ).tooltip();
|
||||
return $dataControl;
|
||||
},
|
||||
|
||||
|
||||
/** tab content to control how the chart is rendered (data glyph size, chart size, etc.) */
|
||||
_render_chartControls : function( $where ){
|
||||
//TODO: as controls on actual chart
|
||||
@@ -147,7 +147,7 @@ var ScatterplotConfigEditor = Backbone.View.extend({
|
||||
var editor = this,
|
||||
config = this.model.get( 'config' ),
|
||||
$chartControls = $where.find( '#chart-control' );
|
||||
|
||||
|
||||
// ---- skeleton/form for controls
|
||||
$chartControls.html( ScatterplotConfigEditor.templates.chartControl( config ) );
|
||||
//console.debug( '$chartControl:', $chartControls );
|
||||
@@ -258,9 +258,130 @@ var ScatterplotConfigEditor = Backbone.View.extend({
|
||||
});
|
||||
|
||||
ScatterplotConfigEditor.templates = {
|
||||
mainLayout : scatterplot.editor,
|
||||
dataControl : scatterplot.datacontrol,
|
||||
chartControl : scatterplot.chartcontrol
|
||||
// tabbed, main layout for the editor (not used for scatterplot-display)
|
||||
mainLayout : _.template([
|
||||
'<div class="scatterplot-editor tabbable tabs-left">',
|
||||
// tab buttons/headers using Bootstrap
|
||||
'<ul class="nav nav-tabs">',
|
||||
// start with the data controls as the displayed tab
|
||||
'<li class="active">',
|
||||
'<a title="Use this tab to change which data are used"',
|
||||
'href="#data-control" data-toggle="tab">Data Controls</a>',
|
||||
'</li>',
|
||||
'<li>',
|
||||
'<a title="Use this tab to change how the chart is drawn"',
|
||||
'href="#chart-control" data-toggle="tab" >Chart Controls</a>',
|
||||
'</li>',
|
||||
// chart starts as disabled since there's no info yet
|
||||
'<li class="disabled">',
|
||||
'<a title="This tab will display the chart"',
|
||||
'href="#chart-display" data-toggle="tab">Chart</a>',
|
||||
'</li>',
|
||||
// button for saving the visualization config on the server
|
||||
'<li class="file-controls">',
|
||||
'<button class="save-btn btn btn-default">Save</button>',
|
||||
'</li>',
|
||||
'</ul>',
|
||||
|
||||
// data form, chart config form, chart all get their own tab
|
||||
'<div class="tab-content">',
|
||||
// tab for data settings form
|
||||
'<div id="data-control" class="scatterplot-config-control tab-pane active"></div>',
|
||||
|
||||
// tab for chart graphics control form
|
||||
'<div id="chart-control" class="scatterplot-config-control tab-pane"></div>',
|
||||
|
||||
// tab for actual chart
|
||||
'<div id="chart-display" class="scatterplot-display tab-pane"></div>',
|
||||
|
||||
'</div>',
|
||||
'</div>',
|
||||
].join('')),
|
||||
|
||||
// the controls for data selection (this is mostly done with column selector now)
|
||||
// TODO: this could be moved to the main template above
|
||||
// TODO: localize
|
||||
dataControl : _.template([
|
||||
'<p class="help-text">',
|
||||
'Use the following control to change which columns are used by the chart. Click any cell ',
|
||||
'from the last three rows of the table to select the column for the appropriate data. ',
|
||||
'Use the \'Draw\' button to render (or re-render) the chart with the current settings. ',
|
||||
'</p>',
|
||||
|
||||
'<ul class="help-text" style="margin-left: 8px">',
|
||||
'<li><b>X Column</b>: which column values will be used for the x axis of the chart.</li>',
|
||||
'<li><b>Y Column</b>: which column values will be used for the y axis of the chart.</li>',
|
||||
'<li><b>ID Column</b>: an additional column value displayed when the user hovers over a data point. ',
|
||||
'It may be useful to select unique or categorical identifiers here (such as gene ids).',
|
||||
'</li>',
|
||||
'</ul>',
|
||||
|
||||
'<div class="column-selection">',
|
||||
// the only dynamic thing
|
||||
'<pre class="peek"><%= peek %></pre>',
|
||||
'</div>',
|
||||
|
||||
'<p class="help-text help-text-small">',
|
||||
'<b>Note</b>: If it can be determined from the dataset\'s filetype that a column is not numeric, ',
|
||||
'that column choice may be disabled for either the x or y axis.',
|
||||
'</p>',
|
||||
|
||||
'<button class="render-button btn btn-primary active">Draw</button>',
|
||||
].join('')),
|
||||
|
||||
chartControl : _.template([
|
||||
'<p class="help-text">',
|
||||
'Use the following controls to how the chart is displayed. The slide controls can be moved ',
|
||||
'by the mouse or, if the \'handle\' is in focus, your keyboard\'s arrow keys. ',
|
||||
'Move the focus between controls by using the tab or shift+tab keys on your keyboard. ',
|
||||
'Use the \'Draw\' button to render (or re-render) the chart with the current settings. ',
|
||||
'</p>',
|
||||
|
||||
'<div data-config-key="datapointSize" class="form-input numeric-slider-input">',
|
||||
'<label for="datapointSize">Size of data point: </label>',
|
||||
'<div class="slider-output"><%- datapointSize %></div>',
|
||||
'<div class="slider"></div>',
|
||||
'<p class="form-help help-text-small">',
|
||||
'Size of the graphic representation of each data point',
|
||||
'</p>',
|
||||
'</div>',
|
||||
|
||||
'<div data-config-key="width" class="form-input numeric-slider-input">',
|
||||
'<label for="width">Chart width: </label>',
|
||||
'<div class="slider-output"><%- width %></div>',
|
||||
'<div class="slider"></div>',
|
||||
'<p class="form-help help-text-small">',
|
||||
'(not including chart margins and axes)',
|
||||
'</p>',
|
||||
'</div>',
|
||||
|
||||
'<div data-config-key="height" class="form-input numeric-slider-input">',
|
||||
'<label for="height">Chart height: </label>',
|
||||
'<div class="slider-output"><%- height %></div>',
|
||||
'<div class="slider"></div>',
|
||||
'<p class="form-help help-text-small">',
|
||||
'(not including chart margins and axes)',
|
||||
'</p>',
|
||||
'</div>',
|
||||
|
||||
'<div data-config-key="X-axis-label"class="text-input form-input">',
|
||||
'<label for="X-axis-label">Re-label the X axis: </label>',
|
||||
'<input type="text" name="X-axis-label" id="X-axis-label" value="<%- xLabel %>" />',
|
||||
'<p class="form-help help-text-small"></p>',
|
||||
'</div>',
|
||||
|
||||
'<div data-config-key="Y-axis-label" class="text-input form-input">',
|
||||
'<label for="Y-axis-label">Re-label the Y axis: </label>',
|
||||
'<input type="text" name="Y-axis-label" id="Y-axis-label" value="<%- yLabel %>" />',
|
||||
'<p class="form-help help-text-small"></p>',
|
||||
'</div>',
|
||||
|
||||
'<button class="render-button btn btn-primary active">Draw</button>',
|
||||
].join('')),
|
||||
|
||||
// mainLayout : scatterplot.editor,
|
||||
// dataControl : scatterplot.datacontrol,
|
||||
// chartControl : scatterplot.chartcontrol
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -30,7 +30,6 @@ ${h.js( 'libs/jquery/jquery',
|
||||
'libs/underscore',
|
||||
'libs/backbone/backbone',
|
||||
'libs/d3',
|
||||
'libs/handlebars.runtime',
|
||||
'ui/peek-column-selector',
|
||||
'ui/pagination',
|
||||
'mvc/visualization/visualization-model' )}
|
||||
|
||||
@@ -43,7 +43,6 @@ class RootController( controller.JSAppLauncher, UsesAnnotations ):
|
||||
'active_view' : 'analysis',
|
||||
'params' : dict( trans.request.params ),
|
||||
'enable_cloud_launch' : app.config.get_bool( 'enable_cloud_launch', False ),
|
||||
'spinner_url' : web.url_for( '/static/images/loading_small_white_bg.gif' ),
|
||||
'search_url' : web.url_for( controller='root', action='tool_search' ),
|
||||
# TODO: next two should be redundant - why can't we build one from the other?
|
||||
'toolbox' : app.toolbox.to_dict( trans, in_panel=False ),
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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","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":"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"}
|
||||
{"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","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":"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"}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
webpackJsonp([4],[function(e,r,n){(function(e){var r=n(1),a=r,i=n(82).GalaxyApp,o=n(13),t=n(5),l=n(84);window.app=function(n,c){window.Galaxy=new i(n,c),Galaxy.debug("login app");var d=encodeURI(n.redirect);if(!n.show_welcome_with_login){var w=r.param({use_panels:"True",redirect:d});return void(window.location.href=Galaxy.root+"user/login?"+w)}var p=new l.PageLayoutView(e.extend(n,{el:"body",center:new o.CenterPanel({el:"#center"}),right:new o.RightPanel({title:t("Login required"),el:"#right"})}));a(function(){var e=r.param({redirect:d}),a=Galaxy.root+"user/login?"+e;p.render(),p.center.$("#galaxy_main").prop("src",n.welcome_url),p.right.$(".unified-panel-body").css("overflow","hidden").html('<iframe src="'+a+'" frameborder="0" style="width: 100%; height: 100%;"/>')})}}).call(r,n(3))}]);
|
||||
webpackJsonp([4],[function(e,r,n){(function(e){var r=n(1),a=r,i=n(59).GalaxyApp,o=n(10),t=n(5),l=n(61);window.app=function(n,c){window.Galaxy=new i(n,c),Galaxy.debug("login app");var d=encodeURI(n.redirect);if(!n.show_welcome_with_login){var w=r.param({use_panels:"True",redirect:d});return void(window.location.href=Galaxy.root+"user/login?"+w)}var p=new l.PageLayoutView(e.extend(n,{el:"body",center:new o.CenterPanel({el:"#center"}),right:new o.RightPanel({title:t("Login required"),el:"#right"})}));a(function(){var e=r.param({redirect:d}),a=Galaxy.root+"user/login?"+e;p.render(),p.center.$("#galaxy_main").prop("src",n.welcome_url),p.right.$(".unified-panel-body").css("overflow","hidden").html('<iframe src="'+a+'" frameborder="0" style="width: 100%; height: 100%;"/>')})}}).call(r,n(3))}]);
|
||||
//# sourceMappingURL=login.bundled.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
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)}});
|
||||
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.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
|
||||
@@ -1,2 +0,0 @@
|
||||
define(["libs/handlebars.runtime"],function(a){return a.template({compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f=b.helperMissing,g="function",h=this.escapeExpression;return'<div class="toolSectionTitle" id="title_'+h((e=null!=(e=b.id||(null!=a?a.id:a))?e:f,typeof e===g?e.call(a,{name:"id",hash:{},data:d}):e))+'">\n <a href="javascript:void(0)"><span>'+h((e=null!=(e=b.name||(null!=a?a.name:a))?e:f,typeof e===g?e.call(a,{name:"name",hash:{},data:d}):e))+'</span></a>\n</div>\n<div id="'+h((e=null!=(e=b.id||(null!=a?a.id:a))?e:f,typeof e===g?e.call(a,{name:"id",hash:{},data:d}):e))+'" class="toolSectionBody" style="display: none; ">\n <div class="toolSectionBg"></div>\n<div>'},useData:!0})});
|
||||
//# sourceMappingURL=../../../maps/templates/compiled/panel_section.js.map
|
||||
@@ -1,2 +0,0 @@
|
||||
define(["libs/handlebars.runtime"],function(a){return a.template({1:function(a,b,c,d){var e,f,g=b.helperMissing,h="function",i=this.escapeExpression;return' <div class="form-row">\n <label for="'+i((f=null!=(f=b.name||(null!=a?a.name:a))?f:g,typeof f===h?f.call(a,{name:"name",hash:{},data:d}):f))+'">'+i((f=null!=(f=b.label||(null!=a?a.label:a))?f:g,typeof f===h?f.call(a,{name:"label",hash:{},data:d}):f))+':</label>\n <div class="form-row-input">\n '+(null!=(f=null!=(f=b.html||(null!=a?a.html:a))?f:g,e=typeof f===h?f.call(a,{name:"html",hash:{},data:d}):f)?e:"")+'\n </div>\n <div class="toolParamHelp" style="clear: both;">\n '+i((f=null!=(f=b.help||(null!=a?a.help:a))?f:g,typeof f===h?f.call(a,{name:"help",hash:{},data:d}):f))+'\n </div>\n <div style="clear: both;"></div>\n </div>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f,g=b.helperMissing,h="function",i=this.escapeExpression;return'<div class="toolFormTitle">'+i((f=null!=(f=b.name||(null!=a?a.name:a))?f:g,typeof f===h?f.call(a,{name:"name",hash:{},data:d}):f))+" (version "+i((f=null!=(f=b.version||(null!=a?a.version:a))?f:g,typeof f===h?f.call(a,{name:"version",hash:{},data:d}):f))+')</div>\n <div class="toolFormBody">\n'+(null!=(e=b.each.call(a,null!=a?a.inputs:a,{name:"each",hash:{},fn:this.program(1,d,0),inverse:this.noop,data:d}))?e:"")+' </div>\n <div class="form-row form-actions">\n <input type="submit" class="btn btn-primary" name="runtool_btn" value="Execute">\n</div>\n<div class="toolHelp">\n <div class="toolHelpBody">'+i((f=null!=(f=b.help||(null!=a?a.help:a))?f:g,typeof f===h?f.call(a,{name:"help",hash:{},data:d}):f))+"</div>\n</div>"},useData:!0})});
|
||||
//# sourceMappingURL=../../../maps/templates/compiled/tool_form.js.map
|
||||
@@ -1,2 +0,0 @@
|
||||
define(["libs/handlebars.runtime"],function(a){return a.template({1:function(a){var b=this.lambda,c=this.escapeExpression;return'<span class="label label-default label-'+c(b(a,a))+'">'+c(b(a,a))+"</span> "},compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f,g=b.helperMissing,h="function",i=this.escapeExpression;return'<span class="labels">'+(null!=(e=b.each.call(a,null!=a?a.labels:a,{name:"each",hash:{},fn:this.program(1,d,0),inverse:this.noop,data:d}))?e:"")+'</span>\n<a class="'+i((f=null!=(f=b.id||(null!=a?a.id:a))?f:g,typeof f===h?f.call(a,{name:"id",hash:{},data:d}):f))+' tool-link" href="'+i((f=null!=(f=b.link||(null!=a?a.link:a))?f:g,typeof f===h?f.call(a,{name:"link",hash:{},data:d}):f))+'" target="'+i((f=null!=(f=b.target||(null!=a?a.target:a))?f:g,typeof f===h?f.call(a,{name:"target",hash:{},data:d}):f))+'" minsizehint="'+i((f=null!=(f=b.min_width||(null!=a?a.min_width:a))?f:g,typeof f===h?f.call(a,{name:"min_width",hash:{},data:d}):f))+'">'+i((f=null!=(f=b.name||(null!=a?a.name:a))?f:g,typeof f===h?f.call(a,{name:"name",hash:{},data:d}):f))+"</a>\n"+i((f=null!=(f=b.description||(null!=a?a.description:a))?f:g,typeof f===h?f.call(a,{name:"description",hash:{},data:d}):f))+"\n"},useData:!0})});
|
||||
//# sourceMappingURL=../../../maps/templates/compiled/tool_link.js.map
|
||||
@@ -1,2 +0,0 @@
|
||||
define(["libs/handlebars.runtime"],function(a){return a.template({compiler:[6,">= 2.0.0-beta.1"],main:function(a,b,c,d){var e,f=b.helperMissing,g="function",h=this.escapeExpression;return'<input type="text" name="query" placeholder="'+h((e=null!=(e=b.search_hint_string||(null!=a?a.search_hint_string:a))?e:f,typeof e===g?e.call(a,{name:"search_hint_string",hash:{},data:d}):e))+'" id="tool-search-query" autocomplete="off" class="search-query parent-width" />\n<a id="search-clear-btn" title="clear search (esc)"> </a>\n<img src="'+h((e=null!=(e=b.spinner_url||(null!=a?a.spinner_url:a))?e:f,typeof e===g?e.call(a,{name:"spinner_url",hash:{},data:d}):e))+'" id="search-spinner" class="search-spinner"/>\n'},useData:!0})});
|
||||
//# sourceMappingURL=../../../maps/templates/compiled/tool_search.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -77,16 +77,6 @@
|
||||
},
|
||||
// cache busting using time server was restarted
|
||||
urlArgs: 'v=${app.server_starttime}',
|
||||
// this section allows us to require the compiled tool menu handlebars templates from compiled/ using requirejs
|
||||
// even if they're formatted (with the extension) to load via handlebars-loader when using webpack
|
||||
map: {
|
||||
'mvc/tool/tools': {
|
||||
'templates/tool_form.handlebars' : 'templates/compiled/tool_form',
|
||||
'templates/tool_search.handlebars' : 'templates/compiled/tool_search',
|
||||
'templates/panel_section.handlebars': 'templates/compiled/panel_section',
|
||||
'templates/tool_link.handlebars' : 'templates/compiled/tool_link',
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -102,16 +102,6 @@
|
||||
},
|
||||
"libs/d3": { exports: "d3" },
|
||||
},
|
||||
// this section allows us to require the compiled tool menu handlebars templates from compiled/ using requirejs
|
||||
// even if they're formatted (with the extension) to load via handlebars-loader when using webpack
|
||||
map: {
|
||||
'mvc/tool/tools': {
|
||||
'templates/tool_form.handlebars' : 'templates/compiled/tool_form',
|
||||
'templates/tool_search.handlebars' : 'templates/compiled/tool_search',
|
||||
'templates/panel_section.handlebars': 'templates/compiled/panel_section',
|
||||
'templates/tool_link.handlebars' : 'templates/compiled/tool_link',
|
||||
},
|
||||
},
|
||||
// cache buster based on templated server (re)start time
|
||||
urlArgs: 'v=${app.server_starttime}'
|
||||
});
|
||||
|
||||
@@ -106,7 +106,6 @@
|
||||
<%def name="javascripts()">
|
||||
${parent.javascripts()}
|
||||
|
||||
## ${h.templates( "tool_link", "panel_section", "tool_search", "tool_form" )}
|
||||
${h.js( "libs/jquery/jquery-ui" )}
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -119,7 +118,6 @@
|
||||
// exports: "Backbone"
|
||||
// },
|
||||
// "libs/d3": { exports: "d3" },
|
||||
// 'handlebars' : { exports: 'Handlebars' },
|
||||
// },
|
||||
// // cache buster based on templated server (re)start time
|
||||
// urlArgs: 'v=${app.server_starttime}'
|
||||
|
||||
Reference in New Issue
Block a user