mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add value to model
This commit is contained in:
@@ -8,7 +8,8 @@ define([ 'utils/utils' ], function( Utils ) {
|
||||
max : null,
|
||||
step : null,
|
||||
precise : false,
|
||||
split : 10000
|
||||
split : 10000,
|
||||
value : null
|
||||
}).set( options );
|
||||
|
||||
// create new element
|
||||
@@ -17,24 +18,21 @@ define([ 'utils/utils' ], function( Utils ) {
|
||||
this.$slider = this.$( '#slider' );
|
||||
this.$slider_text = this.$( '.ui-form-slider-text' );
|
||||
|
||||
// set initial value
|
||||
this.options.value !== undefined && ( this.value( this.options.value ) );
|
||||
|
||||
// add text field event
|
||||
var pressed = [];
|
||||
this.$text.on( 'change', function () {
|
||||
self.value( $( this ).val() );
|
||||
}).on( 'keyup', function( e ) {
|
||||
pressed[e.which] = false;
|
||||
self.options.onchange && self.options.onchange( $( this ).val() );
|
||||
self.model.get( 'onchange' ) && self.model.get( 'onchange' )( $( this ).val() );
|
||||
}).on( 'keydown', function ( e ) {
|
||||
var v = e.which;
|
||||
pressed[ v ] = true;
|
||||
if ( self.options.is_workflow && pressed[ 16 ] && v == 52 ) {
|
||||
if ( self.model.get( 'is_workflow' ) && pressed[ 16 ] && v == 52 ) {
|
||||
self.value( '$' )
|
||||
event.preventDefault();
|
||||
} else if (!( v == 8 || v == 9 || v == 13 || v == 37 || v == 39 || ( v >= 48 && v <= 57 && !pressed[ 16 ] ) || ( v >= 96 && v <= 105 )
|
||||
|| ( ( v == 190 || v == 110 ) && $( this ).val().indexOf( '.' ) == -1 && self.options.precise )
|
||||
|| ( ( v == 190 || v == 110 ) && $( this ).val().indexOf( '.' ) == -1 && self.model.get( 'precise' ) )
|
||||
|| ( ( v == 189 || v == 109 ) && $( this ).val().indexOf( '-' ) == -1 )
|
||||
|| self._isParameter( $( this ).val() )
|
||||
|| pressed[ 91 ] || pressed[ 17 ] ) ) {
|
||||
@@ -42,6 +40,7 @@ define([ 'utils/utils' ], function( Utils ) {
|
||||
}
|
||||
});
|
||||
|
||||
// add change listener
|
||||
this.listenTo( this.model, 'change', this.render, this );
|
||||
this.render();
|
||||
},
|
||||
@@ -58,11 +57,11 @@ define([ 'utils/utils' ], function( Utils ) {
|
||||
}
|
||||
}
|
||||
if ( useslider ) {
|
||||
this.$slider.show();
|
||||
this.$slider.slider( { min: options.min, max: options.max, step: step } );
|
||||
this.$slider.on( 'slide', function ( event, ui ) {
|
||||
self.value( ui.value );
|
||||
});
|
||||
this.$slider.slider( { min: options.min, max: options.max, step: step } )
|
||||
.on( 'slide', function ( event, ui ) {
|
||||
self.value( ui.value );
|
||||
}).show();
|
||||
this.$slide_text.css( 'width', 'auto' );
|
||||
} else {
|
||||
this.$slider.hide();
|
||||
this.$slide_text.css( 'width', '100%' );
|
||||
@@ -71,22 +70,23 @@ define([ 'utils/utils' ], function( Utils ) {
|
||||
|
||||
/** Set and Return the current value */
|
||||
value : function ( new_val ) {
|
||||
var options = this.model.attributes;
|
||||
if ( new_val !== undefined ) {
|
||||
if ( new_val !== null && new_val !== '' && !this._isParameter( new_val ) ) {
|
||||
isNaN( new_val ) && ( new_val = 0 );
|
||||
this.options.max !== null && ( new_val = Math.min( new_val, this.options.max ) );
|
||||
this.options.min !== null && ( new_val = Math.max( new_val, this.options.min ) );
|
||||
options.max !== null && ( new_val = Math.min( new_val, options.max ) );
|
||||
options.min !== null && ( new_val = Math.max( new_val, options.min ) );
|
||||
}
|
||||
this.$slider && this.$slider.slider( 'value', new_val );
|
||||
this.$text.val( new_val );
|
||||
this.options.onchange && this.options.onchange( new_val );
|
||||
options.onchange && options.onchange( new_val );
|
||||
}
|
||||
return this.$text.val();
|
||||
},
|
||||
|
||||
/** Return true if the field contains a workflow parameter i.e. $('name') */
|
||||
_isParameter: function( value ) {
|
||||
return this.options.is_workflow && String( value ).substring( 0, 1 ) === '$';
|
||||
return this.model.get( 'is_workflow' ) && String( value ).substring( 0, 1 ) === '$';
|
||||
},
|
||||
|
||||
/** Slider template */
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"ui-slider.js","sources":["../../../src/mvc/ui/ui-slider.js"],"names":["define","Utils","View","Backbone","extend","initialize","options","self","this","model","Model","id","uid","min","max","step","precise","split","set","setElement","_template","attributes","$text","$","$slider","$slider_text","undefined","value","pressed","on","val","e","which","onchange","v","is_workflow","event","preventDefault","indexOf","_isParameter","listenTo","render","useslider","show","slider","ui","hide","$slide_text","css","new_val","isNaN","Math","String","substring"],"mappings":"AAAAA,QAAS,eAAiB,SAAUC,GACpC,GAAIC,GAAOC,SAASD,KAAKE,QACrBC,WAAa,SAAUC,GACnB,GAAIC,GAAOC,IACXA,MAAKC,MAAQH,GAAWA,EAAQG,OAAS,GAAIN,UAASO,OAClDC,GAAUV,EAAMW,MAChBC,IAAU,KACVC,IAAU,KACVC,KAAU,KACVC,SAAU,EACVC,MAAU,MACXC,IAAKZ,GAGRE,KAAKW,WAAYX,KAAKY,UAAWZ,KAAKC,MAAMY,aAC5Cb,KAAKc,MAAiBd,KAAKe,EAAG,SAC9Bf,KAAKgB,QAAiBhB,KAAKe,EAAG,WAC9Bf,KAAKiB,aAAiBjB,KAAKe,EAAG,wBAGPG,SAAvBlB,KAAKF,QAAQqB,OAAyBnB,KAAKmB,MAAOnB,KAAKF,QAAQqB,MAG/D,IAAIC,KACJpB,MAAKc,MAAMO,GAAI,SAAU,WACrBtB,EAAKoB,MAAOJ,EAAGf,MAAOsB,SACvBD,GAAI,QAAS,SAAUE,GACtBH,EAAQG,EAAEC,QAAS,EACnBzB,EAAKD,QAAQ2B,UAAY1B,EAAKD,QAAQ2B,SAAUV,EAAGf,MAAOsB,SAC3DD,GAAI,UAAW,SAAWE,GACzB,GAAIG,GAAIH,EAAEC,KACVJ,GAASM,IAAM,EACV3B,EAAKD,QAAQ6B,aAAeP,EAAS,KAAa,IAALM,GAC9C3B,EAAKoB,MAAO,KACZS,MAAMC,kBACS,GAALH,GAAe,GAALA,GAAe,IAALA,GAAgB,IAALA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AWhB,KAAKgB,QAAQoB,OAAQ,QAASK,GAC9CzC,KAAKc,MAAMQ,IAAKmB,GAChBzC,KAAKF,QAAQ2B,UAAYzB,KAAKF,QAAQ2B,SAAUgB,IAE7CzC,KAAKc,MAAMQ,OAItBS,aAAc,SAAUZ,GACpB,MAAOnB,MAAKF,QAAQ6B,aAAqD,MAAtCiB,OAAQzB,GAAQ0B,UAAW,EAAG,IAIrEjC,UAAW,SAAUd,GACjB,MAAQ,YAAcA,EAAQK,GAAK,+IAO3C,QACIT,KAAOA"}
|
||||
{"version":3,"file":"ui-slider.js","sources":["../../../src/mvc/ui/ui-slider.js"],"names":["define","Utils","View","Backbone","extend","initialize","options","self","this","model","Model","id","uid","min","max","step","precise","split","value","set","setElement","_template","attributes","$text","$","$slider","$slider_text","pressed","on","val","e","which","get","v","event","preventDefault","indexOf","_isParameter","listenTo","render","useslider","slider","ui","show","$slide_text","css","hide","new_val","undefined","isNaN","Math","onchange","String","substring"],"mappings":"AAAAA,QAAS,eAAiB,SAAUC,GAChC,GAAIC,GAAOC,SAASD,KAAKE,QACrBC,WAAa,SAAUC,GACnB,GAAIC,GAAOC,IACXA,MAAKC,MAAQH,GAAWA,EAAQG,OAAS,GAAIN,UAASO,OAClDC,GAAUV,EAAMW,MAChBC,IAAU,KACVC,IAAU,KACVC,KAAU,KACVC,SAAU,EACVC,MAAU,IACVC,MAAU,OACXC,IAAKb,GAGRE,KAAKY,WAAYZ,KAAKa,UAAWb,KAAKC,MAAMa,aAC5Cd,KAAKe,MAAiBf,KAAKgB,EAAG,SAC9BhB,KAAKiB,QAAiBjB,KAAKgB,EAAG,WAC9BhB,KAAKkB,aAAiBlB,KAAKgB,EAAG,uBAG9B,IAAIG,KACJnB,MAAKe,MAAMK,GAAI,SAAU,WACrBrB,EAAKW,MAAOM,EAAGhB,MAAOqB,SACvBD,GAAI,QAAS,SAAUE,GACtBH,EAAQG,EAAEC,QAAS,EACnBxB,EAAKE,MAAMuB,IAAK,aAAgBzB,EA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AKC,MAAMa,UAWzB,OAViB0B,UAAZD,IACgB,OAAZA,GAAgC,KAAZA,GAAmBvC,KAAK6B,aAAcU,KAC3DE,MAAOF,KAAeA,EAAU,GAChB,OAAhBzC,EAAQQ,MAAkBiC,EAAUG,KAAKrC,IAAKkC,EAASzC,EAAQQ,MAC/C,OAAhBR,EAAQO,MAAkBkC,EAAUG,KAAKpC,IAAKiC,EAASzC,EAAQO,OAEnEL,KAAKiB,SAAWjB,KAAKiB,QAAQgB,OAAQ,QAASM,GAC9CvC,KAAKe,MAAMM,IAAKkB,GAChBzC,EAAQ6C,UAAY7C,EAAQ6C,SAAUJ,IAEnCvC,KAAKe,MAAMM,OAItBQ,aAAc,SAAUnB,GACpB,MAAOV,MAAKC,MAAMuB,IAAK,gBAAyD,MAAtCoB,OAAQlC,GAAQmC,UAAW,EAAG,IAI5EhC,UAAW,SAAUf,GACjB,MAAQ,YAAcA,EAAQK,GAAK,+IAO3C,QACIT,KAAOA"}
|
||||
@@ -1,2 +1,200 @@
|
||||
webpackJsonp([4],{0:function(e,t,i){(function(e){var t=i(1),s=t,a=i(30).GalaxyApp,l=i(92),n=i(31);window.app=function(t,i){window.Galaxy=new a(t,i),Galaxy.debug("admin app"),Galaxy.params=Galaxy.config.params,s(function(){e.extend(t.config,{active_view:"admin"}),Galaxy.page=new n.View(e.extend(t,{Left:l}))})}}).call(t,i(2))},92:function(e,t,i){(function(t,s,a){var l=i(5),n=t.View.extend({initialize:function(e,i){var s=this;this.page=e,this.root=i.root,this.config=i.config,this.settings=i.settings,this.message=i.message,this.status=i.status,this.model=new t.Model({title:l("Administration")}),this.categories=new t.Collection([{title:"Server",items:[{title:"Data types registry",url:"admin/view_datatypes_registry"},{title:"Data tables registry",url:"admin/view_tool_data_tables"},{title:"Display applications",url:"admin/display_applications"},{title:"Manage jobs",url:"admin/jobs"}]},{title:"Tools and Tool Shed",items:[{title:"Search Tool Shed",url:"admin_toolshed/browse_tool_sheds",enabled:s.settings.is_tool_shed_installed},{title:"Search Tool Shed (Beta)",url:"admin_toolshed/browse_toolsheds",enabled:s.settings.is_tool_shed_installed&&s.config.enable_beta_ts_api_install},{title:"Monitor installing repositories",url:"admin_toolshed/monitor_repository_installation?installing_repository_ids="+s.settings.installing_repository_ids,enabled:s.settings.installing_repository_ids},{title:"Manage installed tools",url:"admin_toolshed/browse_repositories",enabled:s.settings.is_repo_installed},{title:"Reset metadata",url:"admin_toolshed/reset_metadata_on_selected_installed_repositories",enabled:s.settings.is_repo_installed},{title:"Download local tool",url:"admin/package_tool"},{title:"Tool lineage",url:"admin/tool_versions"},{title:"Reload a tool's configuration",url:"admin/reload_tool"},{title:"Review tool migration stages",url:"admin/review_tool_migration_stages"},{title:"View Tool Error Logs",url:"admin/tool_errors"},{title:"Manage Display Whitelist",url:"admin/sanitize_whitelist"},{title:"Manage Tool Dependencies",url:"admin/manage_tool_dependencies"}]},{title:"User Management",items:[{title:"Users",url:"admin/users"},{title:"Groups",url:"admin/groups"},{title:"Roles",url:"admin/roles"},{title:"API keys",url:"userskeys/all_users"},{title:"Impersonate a user",url:"admin/impersonate",enabled:s.config.allow_user_impersonation}]},{title:"Data",items:[{title:"Quotas",url:"admin/quotas",enabled:s.config.enable_quotas},{title:"Data libraries",url:"library_admin/browse_libraries"},{title:"Roles",url:"admin/roles"},{title:"Local data",url:"data_manager"}]},{title:"Form Definitions",items:[{title:"Form definitions",url:"forms/browse_form_definitions"}]},{title:"Sample Tracking",items:[{title:"Sequencers and external services",url:"external_service/browse_external_services"},{title:"Request types",url:"request_type/browse_request_types"},{title:"Sequencing requests",url:"requests_admin/browse_requests"},{title:"Find samples",url:"requests_common/find_samples?cntrller=requests_admin"}]}]),this.setElement(this._template())},render:function(){var e=this;this.$el.empty(),this.categories.each(function(t){var i=s(e._templateSection(t.attributes)),n=i.find(".ui-side-section-body");a.each(t.get("items"),function(t){(void 0===t.enabled||t.enabled)&&n.append(s("<div/>").addClass("ui-side-section-body-title").append(s("<a/>").attr({href:e.root+t.url,target:"galaxy_main"}).text(l(t.title))))}),e.$el.append(i)}),this.page.$("#galaxy_main").prop("src",this.root+"admin/center?message="+this.message+"&status="+this.status)},_templateSection:function(e){return["<div>",'<div class="ui-side-section-title">'+l(e.title)+"</div>",'<div class="ui-side-section-body"/>',"</div>"].join("")},_template:function(){return'<div class="ui-side-panel"/>'},toString:function(){return"adminPanel"}});e.exports=n}).call(t,i(3),i(1),i(2))}});
|
||||
webpackJsonp([0],{
|
||||
|
||||
/***/ 0:
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(_) {var jQuery = __webpack_require__(2),
|
||||
$ = jQuery,
|
||||
GalaxyApp = __webpack_require__(3).GalaxyApp,
|
||||
AdminPanel = __webpack_require__(11),
|
||||
Page = __webpack_require__(12);
|
||||
|
||||
window.app = function app(options, bootstrapped) {
|
||||
window.Galaxy = new GalaxyApp(options, bootstrapped);
|
||||
Galaxy.debug('admin app');
|
||||
Galaxy.params = Galaxy.config.params;
|
||||
$(function () {
|
||||
_.extend(options.config, { active_view: 'admin' });
|
||||
Galaxy.page = new Page.View(_.extend(options, {
|
||||
Left: AdminPanel
|
||||
}));
|
||||
});
|
||||
};
|
||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
||||
|
||||
/***/ },
|
||||
|
||||
/***/ 11:
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(Backbone, $, _) {var _l = __webpack_require__(7);
|
||||
|
||||
var AdminPanel = Backbone.View.extend({
|
||||
initialize: function (page, options) {
|
||||
var self = this;
|
||||
this.page = page;
|
||||
this.root = options.root;
|
||||
this.config = options.config;
|
||||
this.settings = options.settings;
|
||||
this.message = options.message;
|
||||
this.status = options.status;
|
||||
this.model = new Backbone.Model({
|
||||
title: _l('Administration')
|
||||
});
|
||||
this.categories = new Backbone.Collection([{
|
||||
title: 'Server',
|
||||
items: [{
|
||||
title: 'Data types registry',
|
||||
url: 'admin/view_datatypes_registry'
|
||||
}, {
|
||||
title: 'Data tables registry',
|
||||
url: 'admin/view_tool_data_tables'
|
||||
}, {
|
||||
title: 'Display applications',
|
||||
url: 'admin/display_applications'
|
||||
}, {
|
||||
title: 'Manage jobs',
|
||||
url: 'admin/jobs'
|
||||
}]
|
||||
}, {
|
||||
title: 'Tools and Tool Shed',
|
||||
items: [{
|
||||
title: 'Search Tool Shed',
|
||||
url: 'admin_toolshed/browse_tool_sheds',
|
||||
enabled: self.settings.is_tool_shed_installed
|
||||
}, {
|
||||
title: 'Search Tool Shed (Beta)',
|
||||
url: 'admin_toolshed/browse_toolsheds',
|
||||
enabled: self.settings.is_tool_shed_installed && self.config.enable_beta_ts_api_install
|
||||
}, {
|
||||
title: 'Monitor installing repositories',
|
||||
url: 'admin_toolshed/monitor_repository_installation?installing_repository_ids=' + self.settings.installing_repository_ids,
|
||||
enabled: self.settings.installing_repository_ids
|
||||
}, {
|
||||
title: 'Manage installed tools',
|
||||
url: 'admin_toolshed/browse_repositories',
|
||||
enabled: self.settings.is_repo_installed
|
||||
}, {
|
||||
title: 'Reset metadata',
|
||||
url: 'admin_toolshed/reset_metadata_on_selected_installed_repositories',
|
||||
enabled: self.settings.is_repo_installed
|
||||
}, {
|
||||
title: 'Download local tool',
|
||||
url: 'admin/package_tool'
|
||||
}, {
|
||||
title: 'Tool lineage',
|
||||
url: 'admin/tool_versions'
|
||||
}, {
|
||||
title: 'Reload a tool\'s configuration',
|
||||
url: 'admin/reload_tool'
|
||||
}, {
|
||||
title: 'Review tool migration stages',
|
||||
url: 'admin/review_tool_migration_stages'
|
||||
}, {
|
||||
title: 'View Tool Error Logs',
|
||||
url: 'admin/tool_errors'
|
||||
}, {
|
||||
title: 'Manage Display Whitelist',
|
||||
url: 'admin/sanitize_whitelist'
|
||||
}, {
|
||||
title: 'Manage Tool Dependencies',
|
||||
url: 'admin/manage_tool_dependencies'
|
||||
}]
|
||||
}, {
|
||||
title: 'User Management',
|
||||
items: [{
|
||||
title: 'Users',
|
||||
url: 'admin/users'
|
||||
}, {
|
||||
title: 'Groups',
|
||||
url: 'admin/groups'
|
||||
}, {
|
||||
title: 'Roles',
|
||||
url: 'admin/roles'
|
||||
}, {
|
||||
title: 'API keys',
|
||||
url: 'userskeys/all_users'
|
||||
}, {
|
||||
title: 'Impersonate a user',
|
||||
url: 'admin/impersonate',
|
||||
enabled: self.config.allow_user_impersonation
|
||||
}]
|
||||
}, {
|
||||
title: 'Data',
|
||||
items: [{
|
||||
title: 'Quotas',
|
||||
url: 'admin/quotas',
|
||||
enabled: self.config.enable_quotas
|
||||
}, {
|
||||
title: 'Data libraries',
|
||||
url: 'library_admin/browse_libraries'
|
||||
}, {
|
||||
title: 'Roles',
|
||||
url: 'admin/roles'
|
||||
}, {
|
||||
title: 'Local data',
|
||||
url: 'data_manager'
|
||||
}]
|
||||
}, {
|
||||
title: 'Form Definitions',
|
||||
items: [{
|
||||
title: 'Form definitions',
|
||||
url: 'forms/browse_form_definitions'
|
||||
}]
|
||||
}, {
|
||||
title: 'Sample Tracking',
|
||||
items: [{
|
||||
title: 'Sequencers and external services',
|
||||
url: 'external_service/browse_external_services'
|
||||
}, {
|
||||
title: 'Request types',
|
||||
url: 'request_type/browse_request_types'
|
||||
}, {
|
||||
title: 'Sequencing requests',
|
||||
url: 'requests_admin/browse_requests'
|
||||
}, {
|
||||
title: 'Find samples',
|
||||
url: 'requests_common/find_samples?cntrller=requests_admin'
|
||||
}]
|
||||
}]);
|
||||
this.setElement(this._template());
|
||||
},
|
||||
|
||||
render: function () {
|
||||
var self = this;
|
||||
this.$el.empty();
|
||||
this.categories.each(function (category) {
|
||||
var $section = $(self._templateSection(category.attributes));
|
||||
var $entries = $section.find('.ui-side-section-body');
|
||||
_.each(category.get('items'), function (item) {
|
||||
if (item.enabled === undefined || item.enabled) {
|
||||
$entries.append($('<div/>').addClass('ui-side-section-body-title').append($('<a/>').attr({
|
||||
href: self.root + item.url,
|
||||
target: 'galaxy_main' }).text(_l(item.title))));
|
||||
}
|
||||
});
|
||||
self.$el.append($section);
|
||||
});
|
||||
this.page.$('#galaxy_main').prop('src', this.root + 'admin/center?message=' + this.message + '&status=' + this.status);
|
||||
},
|
||||
|
||||
_templateSection: function (options) {
|
||||
return ['<div>', '<div class="ui-side-section-title">' + _l(options.title) + '</div>', '<div class="ui-side-section-body"/>', '</div>'].join('');
|
||||
},
|
||||
|
||||
_template: function () {
|
||||
return '<div class="ui-side-panel"/>';
|
||||
},
|
||||
|
||||
toString: function () {
|
||||
return 'adminPanel';
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = AdminPanel;
|
||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4), __webpack_require__(2), __webpack_require__(1)))
|
||||
|
||||
/***/ }
|
||||
|
||||
});
|
||||
//# sourceMappingURL=admin.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
+32400
-21
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,49 @@
|
||||
webpackJsonp([5],[function(e,i,n){(function(e,i){var a=n(1),t=a,r=n(30).GalaxyApp,o=n(5),l=n(31);window.app=function(n,c){window.Galaxy=new r(n,c),Galaxy.debug("login app");var p=encodeURI(n.redirect);if(!n.show_welcome_with_login){var d=a.param({use_panels:"True",redirect:p});return void(window.location.href=Galaxy.root+"user/login?"+d)}var w=e.View.extend({initialize:function(i){this.page=i,this.model=new e.Model({title:o("Login required")}),this.setElement(this._template())},render:function(){this.page.$("#galaxy_main").prop("src",n.welcome_url)},_template:function(){var e=n.root+"user/login?"+t.param({redirect:p});return'<iframe src="'+e+'" frameborder="0" style="width: 100%; height: 100%;"/>'}});t(function(){Galaxy.page=new l.View(i.extend(n,{Right:w}))})}}).call(i,n(3),n(2))}]);
|
||||
webpackJsonp([6],[
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
|
||||
/* WEBPACK VAR INJECTION */(function(Backbone, _) {var jQuery = __webpack_require__(2),
|
||||
$ = jQuery,
|
||||
GalaxyApp = __webpack_require__(3).GalaxyApp,
|
||||
_l = __webpack_require__(7),
|
||||
Page = __webpack_require__(12);
|
||||
|
||||
window.app = function app(options, bootstrapped) {
|
||||
window.Galaxy = new GalaxyApp(options, bootstrapped);
|
||||
Galaxy.debug('login app');
|
||||
var redirect = encodeURI(options.redirect);
|
||||
|
||||
// TODO: remove iframe for user login (at least) and render login page from here
|
||||
// then remove this redirect
|
||||
if (!options.show_welcome_with_login) {
|
||||
var params = jQuery.param({ use_panels: 'True', redirect: redirect });
|
||||
window.location.href = Galaxy.root + 'user/login?' + params;
|
||||
return;
|
||||
}
|
||||
|
||||
var LoginPage = Backbone.View.extend({
|
||||
initialize: function (page) {
|
||||
this.page = page;
|
||||
this.model = new Backbone.Model({ title: _l('Login required') });
|
||||
this.setElement(this._template());
|
||||
},
|
||||
render: function () {
|
||||
this.page.$('#galaxy_main').prop('src', options.welcome_url);
|
||||
},
|
||||
_template: function () {
|
||||
var login_url = options.root + 'user/login?' + $.param({ redirect: redirect });
|
||||
return '<iframe src="' + login_url + '" frameborder="0" style="width: 100%; height: 100%;"/>';
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
Galaxy.page = new Page.View(_.extend(options, {
|
||||
Right: LoginPage
|
||||
}));
|
||||
});
|
||||
};
|
||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4), __webpack_require__(1)))
|
||||
|
||||
/***/ }
|
||||
]);
|
||||
//# sourceMappingURL=login.bundled.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["webpack:///login.bundled.js","webpack:///./galaxy/scripts/apps/login.js"],"names":["webpackJsonp","module","exports","__webpack_require__","Backbone","_","jQuery","$","GalaxyApp","_l","Page","window","app","options","bootstrapped","Galaxy","debug","redirect","encodeURI","show_welcome_with_login","params","param","use_panels","location","href","root","LoginPage","View","extend","initialize","page","this","model","Model","title","setElement","_template","render","prop","welcome_url","login_url","Right","call"],"mappings":"AAAAA,cAAc,IAER,SAAUC,EAAQC,EAASC,ICFjC,SAAAC,EAAAC,GAAA,GAAIC,GAASH,EAAS,GAClBI,EAAID,EACJE,EAAYL,EAAS,IAAWK,UAChCC,EAAKN,EAAS,GACdO,EAAOP,EAAS,GAEpBQ,QAAOC,IAAM,SAAcC,EAASC,GAChCH,OAAOI,OAAS,GAAIP,GAAWK,EAASC,GACxCC,OAAOC,MAAO,YACd,IAAIC,GAAWC,UAAWL,EAAQI,SAIlC,KAAKJ,EAAQM,wBAAyB,CAClC,GAAIC,GAASd,EAAOe,OAAQC,WAAa,OAAQL,SAAWA,GAE5D,aADAN,OAAOY,SAASC,KAAOT,OAAOU,KAAO,cAAgBL,GAIzD,GAAIM,GAAYtB,EAASuB,KAAKC,QAC1BC,WAAY,SAAUC,GAClBC,KAAKD,KAAOA,EACZC,KAAKC,MAAQ,GAAI5B,GAAS6B,OAAQC,MAAQzB,EAAI,oBAC9CsB,KAAKI,WAAYJ,KAAKK,cAE1BC,OAAQ,WACJN,KAAKD,KAAKvB,EAAG,gBAAiB+B,KAAM,MAAOzB,EAAQ0B,cAEvDH,UAAY,WACR,GAAII,GAAY3B,EAAQY,KAAO,cAAgBlB,EAAEc,OAASJ,SAAWA,GACrE,OAAO,gBAAkBuB,EAAY,2DAI7CjC,GAAE,WACEQ,OAAOe,KAAO,GAAIpB,GAAKiB,KAAMtB,EAAEuB,OAAQf,GACnC4B,MAAQf,UDQUgB,KAAKxC,EAASC,EAAoB,GAAIA,EAAoB","file":"login.bundled.js","sourcesContent":["webpackJsonp([5],[\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(Backbone, _) {var jQuery = __webpack_require__(1),\n\t $ = jQuery,\n\t GalaxyApp = __webpack_require__(30).GalaxyApp,\n\t _l = __webpack_require__(5),\n\t Page = __webpack_require__(31);\n\t\n\twindow.app = function app(options, bootstrapped) {\n\t window.Galaxy = new GalaxyApp(options, bootstrapped);\n\t Galaxy.debug('login app');\n\t var redirect = encodeURI(options.redirect);\n\t\n\t // TODO: remove iframe for user login (at least) and render login page from here\n\t // then remove this redirect\n\t if (!options.show_welcome_with_login) {\n\t var params = jQuery.param({ use_panels: 'True', redirect: redirect });\n\t window.location.href = Galaxy.root + 'user/login?' + params;\n\t return;\n\t }\n\t\n\t var LoginPage = Backbone.View.extend({\n\t initialize: function (page) {\n\t this.page = page;\n\t this.model = new Backbone.Model({ title: _l('Login required') });\n\t this.setElement(this._template());\n\t },\n\t render: function () {\n\t this.page.$('#galaxy_main').prop('src', options.welcome_url);\n\t },\n\t _template: function () {\n\t var login_url = options.root + 'user/login?' + $.param({ redirect: redirect });\n\t return '<iframe src=\"' + login_url + '\" frameborder=\"0\" style=\"width: 100%; height: 100%;\"/>';\n\t }\n\t });\n\t\n\t $(function () {\n\t Galaxy.page = new Page.View(_.extend(options, {\n\t Right: LoginPage\n\t }));\n\t });\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(2)))\n\n/***/ })\n]);\n\n\n// WEBPACK FOOTER //\n// login.bundled.js","var jQuery = require( 'jquery' ),\n $ = jQuery,\n GalaxyApp = require( 'galaxy' ).GalaxyApp,\n _l = require( 'utils/localization' ),\n Page = require( 'layout/page' );\n\nwindow.app = function app( options, bootstrapped ){\n window.Galaxy = new GalaxyApp( options, bootstrapped );\n Galaxy.debug( 'login app' );\n var redirect = encodeURI( options.redirect );\n\n // TODO: remove iframe for user login (at least) and render login page from here\n // then remove this redirect\n if( !options.show_welcome_with_login ){\n var params = jQuery.param({ use_panels : 'True', redirect : redirect });\n window.location.href = Galaxy.root + 'user/login?' + params;\n return;\n }\n\n var LoginPage = Backbone.View.extend({\n initialize: function( page ) {\n this.page = page;\n this.model = new Backbone.Model({ title : _l( 'Login required' ) } );\n this.setElement( this._template() );\n },\n render: function() {\n this.page.$( '#galaxy_main' ).prop( 'src', options.welcome_url );\n },\n _template : function() {\n var login_url = options.root + 'user/login?' + $.param( { redirect : redirect } );\n return '<iframe src=\"' + login_url + '\" frameborder=\"0\" style=\"width: 100%; height: 100%;\"/>';\n }\n });\n\n $(function(){\n Galaxy.page = new Page.View( _.extend( options, {\n Right : LoginPage\n } ) );\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/apps/login.js"],"sourceRoot":""}
|
||||
{"version":3,"sources":["webpack:///./galaxy/scripts/apps/login.js"],"names":["jQuery","require","$","GalaxyApp","_l","Page","window","app","options","bootstrapped","Galaxy","debug","redirect","encodeURI","show_welcome_with_login","params","param","use_panels","location","href","root","LoginPage","Backbone","View","extend","initialize","page","model","Model","title","setElement","_template","render","prop","welcome_url","login_url","_","Right"],"mappings":";;;;AAAA,wDAAIA,SAAS,mBAAAC,CAAS,CAAT,CAAb;AAAA,KACIC,IAAIF,MADR;AAAA,KAEIG,YAAY,mBAAAF,CAAS,CAAT,EAAoBE,SAFpC;AAAA,KAGIC,KAAK,mBAAAH,CAAS,CAAT,CAHT;AAAA,KAIII,OAAO,mBAAAJ,CAAS,EAAT,CAJX;;AAMAK,QAAOC,GAAP,GAAa,SAASA,GAAT,CAAcC,OAAd,EAAuBC,YAAvB,EAAqC;AAC9CH,YAAOI,MAAP,GAAgB,IAAIP,SAAJ,CAAeK,OAAf,EAAwBC,YAAxB,CAAhB;AACAC,YAAOC,KAAP,CAAc,WAAd;AACA,SAAIC,WAAWC,UAAWL,QAAQI,QAAnB,CAAf;;AAEA;AACA;AACA,SAAI,CAACJ,QAAQM,uBAAb,EAAsC;AAClC,aAAIC,SAASf,OAAOgB,KAAP,CAAa,EAAEC,YAAa,MAAf,EAAuBL,UAAWA,QAAlC,EAAb,CAAb;AACAN,gBAAOY,QAAP,CAAgBC,IAAhB,GAAuBT,OAAOU,IAAP,GAAc,aAAd,GAA8BL,MAArD;AACA;AACH;;AAED,SAAIM,YAAYC,SAASC,IAAT,CAAcC,MAAd,CAAqB;AACjCC,qBAAY,UAAUC,IAAV,EAAiB;AACzB,kBAAKA,IAAL,GAAYA,IAAZ;AACA,kBAAKC,KAAL,GAAa,IAAIL,SAASM,KAAb,CAAmB,EAAEC,OAAQzB,GAAI,gBAAJ,CAAV,EAAnB,CAAb;AACA,kBAAK0B,UAAL,CAAiB,KAAKC,SAAL,EAAjB;AACH,UALgC;AAMjCC,iBAAQ,YAAW;AACf,kBAAKN,IAAL,CAAUxB,CAAV,CAAa,cAAb,EAA8B+B,IAA9B,CAAoC,KAApC,EAA2CzB,QAAQ0B,WAAnD;AACH,UARgC;AASjCH,oBAAY,YAAW;AACnB,iBAAII,YAAY3B,QAAQY,IAAR,GAAe,aAAf,GAA+BlB,EAAEc,KAAF,CAAS,EAAEJ,UAAWA,QAAb,EAAT,CAA/C;AACA,oBAAO,kBAAkBuB,SAAlB,GAA8B,wDAArC;AACH;AAZgC,MAArB,CAAhB;;AAeAjC,OAAE,YAAU;AACRQ,gBAAOgB,IAAP,GAAc,IAAIrB,KAAKkB,IAAT,CAAea,EAAEZ,MAAF,CAAUhB,OAAV,EAAmB;AAC5C6B,oBAAQhB;AADoC,UAAnB,CAAf,CAAd;AAGH,MAJD;AAKH,EAjCD,C","file":"login.bundled.js","sourcesContent":["var jQuery = require( 'jquery' ),\n $ = jQuery,\n GalaxyApp = require( 'galaxy' ).GalaxyApp,\n _l = require( 'utils/localization' ),\n Page = require( 'layout/page' );\n\nwindow.app = function app( options, bootstrapped ){\n window.Galaxy = new GalaxyApp( options, bootstrapped );\n Galaxy.debug( 'login app' );\n var redirect = encodeURI( options.redirect );\n\n // TODO: remove iframe for user login (at least) and render login page from here\n // then remove this redirect\n if( !options.show_welcome_with_login ){\n var params = jQuery.param({ use_panels : 'True', redirect : redirect });\n window.location.href = Galaxy.root + 'user/login?' + params;\n return;\n }\n\n var LoginPage = Backbone.View.extend({\n initialize: function( page ) {\n this.page = page;\n this.model = new Backbone.Model({ title : _l( 'Login required' ) } );\n this.setElement( this._template() );\n },\n render: function() {\n this.page.$( '#galaxy_main' ).prop( 'src', options.welcome_url );\n },\n _template : function() {\n var login_url = options.root + 'user/login?' + $.param( { redirect : redirect } );\n return '<iframe src=\"' + login_url + '\" frameborder=\"0\" style=\"width: 100%; height: 100%;\"/>';\n }\n });\n\n $(function(){\n Galaxy.page = new Page.View( _.extend( options, {\n Right : LoginPage\n } ) );\n });\n};\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/apps/login.js"],"sourceRoot":""}
|
||||
@@ -1,2 +1,2 @@
|
||||
define(["utils/utils"],function(a){var b=Backbone.View.extend({initialize:function(b){var c=this;this.model=b&&b.model||new Backbone.Model({id:a.uid(),min:null,max:null,step:null,precise:!1,split:1e4}).set(b),this.setElement(this._template(this.model.attributes)),this.$text=this.$("#text"),this.$slider=this.$("#slider"),this.$slider_text=this.$(".ui-form-slider-text"),void 0!==this.options.value&&this.value(this.options.value);var d=[];this.$text.on("change",function(){c.value($(this).val())}).on("keyup",function(a){d[a.which]=!1,c.options.onchange&&c.options.onchange($(this).val())}).on("keydown",function(a){var b=a.which;d[b]=!0,c.options.is_workflow&&d[16]&&52==b?(c.value("$"),event.preventDefault()):8==b||9==b||13==b||37==b||39==b||b>=48&&57>=b&&!d[16]||b>=96&&105>=b||(190==b||110==b)&&-1==$(this).val().indexOf(".")&&c.options.precise||(189==b||109==b)&&-1==$(this).val().indexOf("-")||c._isParameter($(this).val())||d[91]||d[17]||event.preventDefault()}),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(){var a=this.model.attributes,b=null!==a.max&&null!==a.min&&a.max>a.min,c=a.step;c||(c=a.precise&&b?(a.max-a.min)/a.split:1),b?(this.$slider.show(),this.$slider.slider({min:a.min,max:a.max,step:c}),this.$slider.on("slide",function(a,b){self.value(b.value)})):(this.$slider.hide(),this.$slide_text.css("width","100%"))},value:function(a){return void 0!==a&&(null===a||""===a||this._isParameter(a)||(isNaN(a)&&(a=0),null!==this.options.max&&(a=Math.min(a,this.options.max)),null!==this.options.min&&(a=Math.max(a,this.options.min))),this.$slider&&this.$slider.slider("value",a),this.$text.val(a),this.options.onchange&&this.options.onchange(a)),this.$text.val()},_isParameter:function(a){return this.options.is_workflow&&"$"===String(a).substring(0,1)},_template:function(a){return'<div id="'+a.id+'" class="ui-form-slider"><input id="text" type="text" class="ui-form-slider-text"/><div id="slider" class="ui-form-slider-element"/></div>'}});return{View:b}});
|
||||
define(["utils/utils"],function(a){var b=Backbone.View.extend({initialize:function(b){var c=this;this.model=b&&b.model||new Backbone.Model({id:a.uid(),min:null,max:null,step:null,precise:!1,split:1e4,value:null}).set(b),this.setElement(this._template(this.model.attributes)),this.$text=this.$("#text"),this.$slider=this.$("#slider"),this.$slider_text=this.$(".ui-form-slider-text");var d=[];this.$text.on("change",function(){c.value($(this).val())}).on("keyup",function(a){d[a.which]=!1,c.model.get("onchange")&&c.model.get("onchange")($(this).val())}).on("keydown",function(a){var b=a.which;d[b]=!0,c.model.get("is_workflow")&&d[16]&&52==b?(c.value("$"),event.preventDefault()):8==b||9==b||13==b||37==b||39==b||b>=48&&57>=b&&!d[16]||b>=96&&105>=b||(190==b||110==b)&&-1==$(this).val().indexOf(".")&&c.model.get("precise")||(189==b||109==b)&&-1==$(this).val().indexOf("-")||c._isParameter($(this).val())||d[91]||d[17]||event.preventDefault()}),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(){var a=this.model.attributes,b=null!==a.max&&null!==a.min&&a.max>a.min,c=a.step;c||(c=a.precise&&b?(a.max-a.min)/a.split:1),b?(this.$slider.slider({min:a.min,max:a.max,step:c}).on("slide",function(a,b){self.value(b.value)}).show(),this.$slide_text.css("width","auto")):(this.$slider.hide(),this.$slide_text.css("width","100%"))},value:function(a){var b=this.model.attributes;return void 0!==a&&(null===a||""===a||this._isParameter(a)||(isNaN(a)&&(a=0),null!==b.max&&(a=Math.min(a,b.max)),null!==b.min&&(a=Math.max(a,b.min))),this.$slider&&this.$slider.slider("value",a),this.$text.val(a),b.onchange&&b.onchange(a)),this.$text.val()},_isParameter:function(a){return this.model.get("is_workflow")&&"$"===String(a).substring(0,1)},_template:function(a){return'<div id="'+a.id+'" class="ui-form-slider"><input id="text" type="text" class="ui-form-slider-text"/><div id="slider" class="ui-form-slider-element"/></div>'}});return{View:b}});
|
||||
//# sourceMappingURL=../../../maps/mvc/ui/ui-slider.js.map
|
||||
Reference in New Issue
Block a user