1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/3d9e14ac53cc/ Changeset: 3d9e14ac53cc User: guerler Date: 2014-11-14 15:08:06+00:00 Summary: ToolForm: Fixes for citations, pasting into numeric fields and ui element sizes Affected #: 13 files
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b client/galaxy/scripts/mvc/tools/tools-form.js --- a/client/galaxy/scripts/mvc/tools/tools-form.js +++ b/client/galaxy/scripts/mvc/tools/tools-form.js @@ -362,15 +362,13 @@
// append citations if (options.citations) { - // fetch citations + var $citations = $('<div/>'); var citations = new CitationModel.ToolCitationCollection(); citations.tool_id = options.id; - var citation_list_view = new CitationView.CitationListView({ collection: citations } ); + var citation_list_view = new CitationView.CitationListView({ el: $citations, collection: citations } ); citation_list_view.render(); citations.fetch(); - - // append to element - this.$el.append(citation_list_view.$el); + this.$el.append($citations); }
// append tool section
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b client/galaxy/scripts/mvc/tools/tools-repeat.js --- a/client/galaxy/scripts/mvc/tools/tools-repeat.js +++ b/client/galaxy/scripts/mvc/tools/tools-repeat.js @@ -73,10 +73,10 @@
// create portlet var portlet = new Portlet.View({ - id : options.id, - title : '<b>' + options.title + '</b>', - cls : 'ui-portlet-repeat', - operations : { + id : options.id, + title : '<b>' + options.title + '</b>', + cls : 'ui-portlet-repeat', + operations : { button_delete : button_delete } });
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b client/galaxy/scripts/mvc/ui/ui-portlet.js --- a/client/galaxy/scripts/mvc/ui/ui-portlet.js +++ b/client/galaxy/scripts/mvc/ui/ui-portlet.js @@ -8,15 +8,16 @@
// defaults options optionsDefault: { - title : '', - icon : '', - buttons : null, - body : null, - scrollable : true, - nopadding : false, - operations : null, - placement : 'bottom', - cls : 'ui-portlet' + title : '', + icon : '', + buttons : null, + body : null, + scrollable : true, + nopadding : false, + operations : null, + placement : 'bottom', + cls : 'ui-portlet', + operations_flt : 'right' },
// elements @@ -157,7 +158,7 @@
if (options.title) { tmpl += '<div id="portlet-header" class="portlet-header">' + - '<div id="operations" style="float: right;"></div>' + + '<div id="operations" style="float: ' + options.operations_flt + ';"></div>' + '<div class="portlet-title">';
if (options.icon)
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b client/galaxy/scripts/mvc/ui/ui-slider.js --- a/client/galaxy/scripts/mvc/ui/ui-slider.js +++ b/client/galaxy/scripts/mvc/ui/ui-slider.js @@ -46,7 +46,7 @@ this.$el.find('.ui-form-slider-text').css('width', '100%'); }
- // backup integer field + // link text input field this.$text = this.$el.find('#text');
// add text field event @@ -55,10 +55,17 @@ });
// add text field event - this.$text.on('keydown', function (event) { - var v = event.which; - if (!(v == 8 || v == 9 || v == 13 || v == 37 || v == 39 || v == 189 || (v >= 48 && v <= 57) - || (self.options.precise && $(this).val().indexOf('.') == -1) && v == 190)) { + var pressed = []; + this.$text.on('keyup', function(e) { + pressed[e.which] = false; + }); + this.$text.on('keydown', function (e) { + var v = e.which; + pressed[v] = true; + if (!(v == 8 || v == 9 || v == 13 || v == 37 || v == 39 || (v >= 48 && v <= 57) + || (v == 190 && $(this).val().indexOf('.') == -1 && self.options.precise) + || (v == 189 && $(this).val().indexOf('-') == -1) + || pressed[91] || pressed[17])) { event.preventDefault(); } }); @@ -67,6 +74,11 @@ // value value : function (new_val) { if (new_val !== undefined) { + // check if its a number + if (isNaN(new_val)) { + new_val = 0; + } + // apply limit if (this.options.max !== null) { new_val = Math.min(new_val, this.options.max);
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b static/scripts/mvc/tools/tools-form.js --- a/static/scripts/mvc/tools/tools-form.js +++ b/static/scripts/mvc/tools/tools-form.js @@ -362,15 +362,13 @@
// append citations if (options.citations) { - // fetch citations + var $citations = $('<div/>'); var citations = new CitationModel.ToolCitationCollection(); citations.tool_id = options.id; - var citation_list_view = new CitationView.CitationListView({ collection: citations } ); + var citation_list_view = new CitationView.CitationListView({ el: $citations, collection: citations } ); citation_list_view.render(); citations.fetch(); - - // append to element - this.$el.append(citation_list_view.$el); + this.$el.append($citations); }
// append tool section
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b static/scripts/mvc/tools/tools-repeat.js --- a/static/scripts/mvc/tools/tools-repeat.js +++ b/static/scripts/mvc/tools/tools-repeat.js @@ -73,10 +73,10 @@
// create portlet var portlet = new Portlet.View({ - id : options.id, - title : '<b>' + options.title + '</b>', - cls : 'ui-portlet-repeat', - operations : { + id : options.id, + title : '<b>' + options.title + '</b>', + cls : 'ui-portlet-repeat', + operations : { button_delete : button_delete } });
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b static/scripts/mvc/ui/ui-portlet.js --- a/static/scripts/mvc/ui/ui-portlet.js +++ b/static/scripts/mvc/ui/ui-portlet.js @@ -8,15 +8,16 @@
// defaults options optionsDefault: { - title : '', - icon : '', - buttons : null, - body : null, - scrollable : true, - nopadding : false, - operations : null, - placement : 'bottom', - cls : 'ui-portlet' + title : '', + icon : '', + buttons : null, + body : null, + scrollable : true, + nopadding : false, + operations : null, + placement : 'bottom', + cls : 'ui-portlet', + operations_flt : 'right' },
// elements @@ -157,7 +158,7 @@
if (options.title) { tmpl += '<div id="portlet-header" class="portlet-header">' + - '<div id="operations" style="float: right;"></div>' + + '<div id="operations" style="float: ' + options.operations_flt + ';"></div>' + '<div class="portlet-title">';
if (options.icon)
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b static/scripts/mvc/ui/ui-slider.js --- a/static/scripts/mvc/ui/ui-slider.js +++ b/static/scripts/mvc/ui/ui-slider.js @@ -46,7 +46,7 @@ this.$el.find('.ui-form-slider-text').css('width', '100%'); }
- // backup integer field + // link text input field this.$text = this.$el.find('#text');
// add text field event @@ -55,10 +55,17 @@ });
// add text field event - this.$text.on('keydown', function (event) { - var v = event.which; - if (!(v == 8 || v == 9 || v == 13 || v == 37 || v == 39 || v == 189 || (v >= 48 && v <= 57) - || (self.options.precise && $(this).val().indexOf('.') == -1) && v == 190)) { + var pressed = []; + this.$text.on('keyup', function(e) { + pressed[e.which] = false; + }); + this.$text.on('keydown', function (e) { + var v = e.which; + pressed[v] = true; + if (!(v == 8 || v == 9 || v == 13 || v == 37 || v == 39 || (v >= 48 && v <= 57) + || (v == 190 && $(this).val().indexOf('.') == -1 && self.options.precise) + || (v == 189 && $(this).val().indexOf('-') == -1) + || pressed[91] || pressed[17])) { event.preventDefault(); } }); @@ -67,6 +74,11 @@ // value value : function (new_val) { if (new_val !== undefined) { + // check if its a number + if (isNaN(new_val)) { + new_val = 0; + } + // apply limit if (this.options.max !== null) { new_val = Math.min(new_val, this.options.max);
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b static/scripts/packed/mvc/tools/tools-form.js --- a/static/scripts/packed/mvc/tools/tools-form.js +++ b/static/scripts/packed/mvc/tools/tools-form.js @@ -1,1 +1,1 @@ -define(["utils/utils","utils/deferred","mvc/ui/ui-portlet","mvc/ui/ui-misc","mvc/citation/citation-model","mvc/citation/citation-view","mvc/tools","mvc/tools/tools-template","mvc/tools/tools-content","mvc/tools/tools-section","mvc/tools/tools-tree","mvc/tools/tools-jobs"],function(i,j,h,m,k,a,e,d,f,l,c,g){var b=Backbone.View.extend({container:"body",initialize:function(o){console.debug(o);var n=this;var p=parent.Galaxy;if(p&&p.modal){this.modal=p.modal}else{this.modal=new m.Modal.View()}if(p&&p.currUser){this.is_admin=p.currUser.get("is_admin")}else{this.is_admin=false}this.options=o;this.deferred=new j();this.setElement("<div/>");$(this.container).append(this.$el);this.tree=new c(this);this.job_handler=new g(this);this.content=new f(this);this._buildForm(o)},message:function(n){$(this.container).empty();$(this.container).append(n)},reset:function(){for(var n in this.element_list){this.element_list[n].reset()}},rebuild:function(){this.tree.refresh();console.debug("tools-form::rebuild() - Rebuilding data structures.")},refresh:function(){if(!this.is_dynamic){return}var n=this;this.deferred.reset();this.deferred.execute(function(){n._updateModel()})},_buildModel:function(){var n=this;var o=galaxy_config.root+"api/tools/"+this.options.id+"/build?";if(this.options.job_id){o+="job_id="+this.options.job_id}else{if(this.options.dataset_id){o+="dataset_id="+this.options.dataset_id}else{var p=top.location.href;var q=p.indexOf("?");if(p.indexOf("tool_id=")!=-1&&q!==-1){o+=p.slice(q+1)}}}i.request({type:"GET",url:o,success:function(r){n.options=$.extend(n.options,r);n.model=r;n.inputs=r.inputs;console.debug("tools-form::initialize() - Initial tool model ready.");console.debug(r);n._buildForm()},error:function(r){console.debug("tools-form::initialize() - Initial tool model request failed.");console.debug(r)}})},_updateModel:function(){var n=this;var o=this.tree.finalize({data:function(r){if(r.values.length>0&&r.values[0]&&r.values[0].src==="hda"){return n.content.get({id:r.values[0].id,src:"hda"}).id_uncoded}return null}});console.debug("tools-form::_refreshForm() - Refreshing states.");console.debug(o);function q(u){for(var s in n.input_list){var t=n.field_list[s];var r=n.input_list[s];if(r.is_dynamic&&t.wait&&t.unwait){if(u){t.wait()}else{t.unwait()}}}}q(true);var p=this.deferred.register();i.request({type:"GET",url:galaxy_config.root+"api/tools/"+this.options.id+"/build",data:o,success:function(r){n._updateForm(r);q(false);n.deferred.done(p);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(r)},error:function(r){n.deferred.done(p);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(r)}})},_updateForm:function(n){var o=this;this.tree.matchModel(n,function(q,u){var p=o.input_list[q];if(p&&p.options){if(JSON.stringify(p.options)!=JSON.stringify(u.options)){p.options=u.options;var v=o.field_list[q];if(v.update){var t=[];switch(p.type){case"data":t=p.options;break;default:for(var s in u.options){var r=u.options[s];if(r.length>2){t.push({label:r[0],value:r[1]})}}}v.update(t);v.trigger("change");console.debug("Updating options for "+q)}}}})},_buildForm:function(p){var o=this;this.field_list={};this.input_list={};this.element_list={};this.model=p;this.inputs=p.inputs;var r=new m.ButtonMenu({icon:"fa-gear",tooltip:"Click to see a list of options."});if(p.biostar_url){r.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(o.options.biostar_url+"/p/new/post/")}});r.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(o.options.biostar_url+"/t/"+o.options.id+"/")}})}r.addMenu({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+galaxy_config.root+"root?tool_id="+o.options.id)}});if(this.is_admin){r.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+o.options.id+"/download"}})}this.section=new l.View(o,{inputs:this.inputs,cls:"ui-table-plain"});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new h.View({icon:"fa-wrench",title:"<b>"+this.model.name+"</b> "+this.model.description,operations:{menu:r},buttons:{execute:new m.Button({icon:"fa-check",tooltip:"Execute the tool",title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){o.job_handler.submit()}})}});this.$el.empty();this.$el.append(this.portlet.$el);if(p.help!=""){this.$el.append(d.help(p.help))}if(p.citations){var n=new k.ToolCitationCollection();n.tool_id=p.id;var q=new a.CitationListView({collection:n});q.render();n.fetch();this.$el.append(q.$el)}this.portlet.append(this.section.$el);this.rebuild()}});return{View:b}}); \ No newline at end of file +define(["utils/utils","utils/deferred","mvc/ui/ui-portlet","mvc/ui/ui-misc","mvc/citation/citation-model","mvc/citation/citation-view","mvc/tools","mvc/tools/tools-template","mvc/tools/tools-content","mvc/tools/tools-section","mvc/tools/tools-tree","mvc/tools/tools-jobs"],function(i,j,h,m,k,a,e,d,f,l,c,g){var b=Backbone.View.extend({container:"body",initialize:function(o){console.debug(o);var n=this;var p=parent.Galaxy;if(p&&p.modal){this.modal=p.modal}else{this.modal=new m.Modal.View()}if(p&&p.currUser){this.is_admin=p.currUser.get("is_admin")}else{this.is_admin=false}this.options=o;this.deferred=new j();this.setElement("<div/>");$(this.container).append(this.$el);this.tree=new c(this);this.job_handler=new g(this);this.content=new f(this);this._buildForm(o)},message:function(n){$(this.container).empty();$(this.container).append(n)},reset:function(){for(var n in this.element_list){this.element_list[n].reset()}},rebuild:function(){this.tree.refresh();console.debug("tools-form::rebuild() - Rebuilding data structures.")},refresh:function(){if(!this.is_dynamic){return}var n=this;this.deferred.reset();this.deferred.execute(function(){n._updateModel()})},_buildModel:function(){var n=this;var o=galaxy_config.root+"api/tools/"+this.options.id+"/build?";if(this.options.job_id){o+="job_id="+this.options.job_id}else{if(this.options.dataset_id){o+="dataset_id="+this.options.dataset_id}else{var p=top.location.href;var q=p.indexOf("?");if(p.indexOf("tool_id=")!=-1&&q!==-1){o+=p.slice(q+1)}}}i.request({type:"GET",url:o,success:function(r){n.options=$.extend(n.options,r);n.model=r;n.inputs=r.inputs;console.debug("tools-form::initialize() - Initial tool model ready.");console.debug(r);n._buildForm()},error:function(r){console.debug("tools-form::initialize() - Initial tool model request failed.");console.debug(r)}})},_updateModel:function(){var n=this;var o=this.tree.finalize({data:function(r){if(r.values.length>0&&r.values[0]&&r.values[0].src==="hda"){return n.content.get({id:r.values[0].id,src:"hda"}).id_uncoded}return null}});console.debug("tools-form::_refreshForm() - Refreshing states.");console.debug(o);function q(u){for(var s in n.input_list){var t=n.field_list[s];var r=n.input_list[s];if(r.is_dynamic&&t.wait&&t.unwait){if(u){t.wait()}else{t.unwait()}}}}q(true);var p=this.deferred.register();i.request({type:"GET",url:galaxy_config.root+"api/tools/"+this.options.id+"/build",data:o,success:function(r){n._updateForm(r);q(false);n.deferred.done(p);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(r)},error:function(r){n.deferred.done(p);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(r)}})},_updateForm:function(n){var o=this;this.tree.matchModel(n,function(q,u){var p=o.input_list[q];if(p&&p.options){if(JSON.stringify(p.options)!=JSON.stringify(u.options)){p.options=u.options;var v=o.field_list[q];if(v.update){var t=[];switch(p.type){case"data":t=p.options;break;default:for(var s in u.options){var r=u.options[s];if(r.length>2){t.push({label:r[0],value:r[1]})}}}v.update(t);v.trigger("change");console.debug("Updating options for "+q)}}}})},_buildForm:function(p){var o=this;this.field_list={};this.input_list={};this.element_list={};this.model=p;this.inputs=p.inputs;var s=new m.ButtonMenu({icon:"fa-gear",tooltip:"Click to see a list of options."});if(p.biostar_url){s.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(o.options.biostar_url+"/p/new/post/")}});s.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(o.options.biostar_url+"/t/"+o.options.id+"/")}})}s.addMenu({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+galaxy_config.root+"root?tool_id="+o.options.id)}});if(this.is_admin){s.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+o.options.id+"/download"}})}this.section=new l.View(o,{inputs:this.inputs,cls:"ui-table-plain"});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new h.View({icon:"fa-wrench",title:"<b>"+this.model.name+"</b> "+this.model.description,operations:{menu:s},buttons:{execute:new m.Button({icon:"fa-check",tooltip:"Execute the tool",title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){o.job_handler.submit()}})}});this.$el.empty();this.$el.append(this.portlet.$el);if(p.help!=""){this.$el.append(d.help(p.help))}if(p.citations){var r=$("<div/>");var n=new k.ToolCitationCollection();n.tool_id=p.id;var q=new a.CitationListView({el:r,collection:n});q.render();n.fetch();this.$el.append(r)}this.portlet.append(this.section.$el);this.rebuild()}});return{View:b}}); \ No newline at end of file
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b static/scripts/packed/mvc/ui/ui-portlet.js --- a/static/scripts/packed/mvc/ui/ui-portlet.js +++ b/static/scripts/packed/mvc/ui/ui-portlet.js @@ -1,1 +1,1 @@ -define(["utils/utils"],function(a){var b=Backbone.View.extend({visible:false,optionsDefault:{title:"",icon:"",buttons:null,body:null,scrollable:true,nopadding:false,operations:null,placement:"bottom",cls:"ui-portlet"},$title:null,$content:null,$buttons:null,$operations:null,initialize:function(e){this.options=a.merge(e,this.optionsDefault);this.setElement(this._template(this.options));this.$content=this.$el.find("#content");this.$title=this.$el.find("#portlet-title-text");var d=this.$el.find("#portlet-content");if(!this.options.scrollable){if(this.options.title){d.addClass("no-scroll")}else{d.addClass("no-scroll-no-title")}}else{d.addClass("scroll")}if(this.options.nopadding){d.css("padding","0px");this.$content.css("padding","0px")}this.$buttons=$(this.el).find("#buttons");if(this.options.buttons){var c=this;$.each(this.options.buttons,function(f,g){g.$el.prop("id",f);c.$buttons.append(g.$el)})}else{this.$buttons.remove()}this.$operations=$(this.el).find("#operations");if(this.options.operations){var c=this;$.each(this.options.operations,function(f,g){g.$el.prop("id",f);c.$operations.append(g.$el)})}if(this.options.body){this.append(this.options.body)}},append:function(c){this.$content.append(a.wrap(c))},content:function(){return this.$content},show:function(){this.$el.fadeIn("fast");this.visible=true},hide:function(){this.$el.fadeOut("fast");this.visible=false},enableButton:function(c){this.$buttons.find("#"+c).prop("disabled",false)},disableButton:function(c){this.$buttons.find("#"+c).prop("disabled",true)},hideOperation:function(c){this.$operations.find("#"+c).hide()},showOperation:function(c){this.$operations.find("#"+c).show()},setOperation:function(e,d){var c=this.$operations.find("#"+e);c.off("click");c.on("click",d)},title:function(d){var c=this.$title;if(d){c.html(d)}return c.html()},_template:function(d){var c='<div id="'+d.id+'" class="'+d.cls+'">';if(d.title){c+='<div id="portlet-header" class="portlet-header"><div id="operations" style="float: right;"></div><div class="portlet-title">';if(d.icon){c+='<i class="icon fa '+d.icon+'"> </i>'}c+='<span id="portlet-title-text" class="portlet-title-text">'+d.title+"</span></div></div>"}c+='<div id="portlet-content" class="portlet-content">';if(d.placement=="top"){c+='<div id="buttons" class="buttons"></div>'}c+='<div id="content" class="content"></div>';if(d.placement=="bottom"){c+='<div id="buttons" class="buttons"></div>'}c+="</div></div>";return c}});return{View:b}}); \ No newline at end of file +define(["utils/utils"],function(a){var b=Backbone.View.extend({visible:false,optionsDefault:{title:"",icon:"",buttons:null,body:null,scrollable:true,nopadding:false,operations:null,placement:"bottom",cls:"ui-portlet",operations_flt:"right"},$title:null,$content:null,$buttons:null,$operations:null,initialize:function(e){this.options=a.merge(e,this.optionsDefault);this.setElement(this._template(this.options));this.$content=this.$el.find("#content");this.$title=this.$el.find("#portlet-title-text");var d=this.$el.find("#portlet-content");if(!this.options.scrollable){if(this.options.title){d.addClass("no-scroll")}else{d.addClass("no-scroll-no-title")}}else{d.addClass("scroll")}if(this.options.nopadding){d.css("padding","0px");this.$content.css("padding","0px")}this.$buttons=$(this.el).find("#buttons");if(this.options.buttons){var c=this;$.each(this.options.buttons,function(f,g){g.$el.prop("id",f);c.$buttons.append(g.$el)})}else{this.$buttons.remove()}this.$operations=$(this.el).find("#operations");if(this.options.operations){var c=this;$.each(this.options.operations,function(f,g){g.$el.prop("id",f);c.$operations.append(g.$el)})}if(this.options.body){this.append(this.options.body)}},append:function(c){this.$content.append(a.wrap(c))},content:function(){return this.$content},show:function(){this.$el.fadeIn("fast");this.visible=true},hide:function(){this.$el.fadeOut("fast");this.visible=false},enableButton:function(c){this.$buttons.find("#"+c).prop("disabled",false)},disableButton:function(c){this.$buttons.find("#"+c).prop("disabled",true)},hideOperation:function(c){this.$operations.find("#"+c).hide()},showOperation:function(c){this.$operations.find("#"+c).show()},setOperation:function(e,d){var c=this.$operations.find("#"+e);c.off("click");c.on("click",d)},title:function(d){var c=this.$title;if(d){c.html(d)}return c.html()},_template:function(d){var c='<div id="'+d.id+'" class="'+d.cls+'">';if(d.title){c+='<div id="portlet-header" class="portlet-header"><div id="operations" style="float: '+d.operations_flt+';"></div><div class="portlet-title">';if(d.icon){c+='<i class="icon fa '+d.icon+'"> </i>'}c+='<span id="portlet-title-text" class="portlet-title-text">'+d.title+"</span></div></div>"}c+='<div id="portlet-content" class="portlet-content">';if(d.placement=="top"){c+='<div id="buttons" class="buttons"></div>'}c+='<div id="content" class="content"></div>';if(d.placement=="bottom"){c+='<div id="buttons" class="buttons"></div>'}c+="</div></div>";return c}});return{View:b}}); \ No newline at end of file
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b static/scripts/packed/mvc/ui/ui-slider.js --- a/static/scripts/packed/mvc/ui/ui-slider.js +++ b/static/scripts/packed/mvc/ui/ui-slider.js @@ -1,1 +1,1 @@ -define(["utils/utils"],function(a){var b=Backbone.View.extend({optionsDefault:{value:"",min:null,max:null,step:null,precise:false,split:10000},initialize:function(d){var c=this;this.options=a.merge(d,this.optionsDefault);this.setElement(this._template(this.options));this.useslider=this.options.max!==null&&this.options.min!==null&&this.options.max>this.options.min;if(this.options.step===null){this.options.step=1;if(this.options.precise&&this.useslider){this.options.step=(this.options.max-this.options.min)/this.options.split}}if(this.useslider){this.$slider=this.$el.find("#slider");this.$slider.slider(this.options);this.$slider.on("slide",function(e,f){c.value(f.value)})}else{this.$el.find(".ui-form-slider-text").css("width","100%")}this.$text=this.$el.find("#text");this.$text.on("change",function(){c.value($(this).val())});this.$text.on("keydown",function(f){var e=f.which;if(!(e==8||e==9||e==13||e==37||e==39||e==189||(e>=48&&e<=57)||(c.options.precise&&$(this).val().indexOf(".")==-1)&&e==190)){f.preventDefault()}})},value:function(c){if(c!==undefined){if(this.options.max!==null){c=Math.min(c,this.options.max)}if(this.options.min!==null){c=Math.max(c,this.options.min)}if(this.options.onchange){this.options.onchange(c)}this.$slider&&this.$slider.slider("value",c);this.$text.val(c)}return this.$text.val()},_template:function(c){return'<div id="'+c.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}}); \ No newline at end of file +define(["utils/utils"],function(a){var b=Backbone.View.extend({optionsDefault:{value:"",min:null,max:null,step:null,precise:false,split:10000},initialize:function(d){var c=this;this.options=a.merge(d,this.optionsDefault);this.setElement(this._template(this.options));this.useslider=this.options.max!==null&&this.options.min!==null&&this.options.max>this.options.min;if(this.options.step===null){this.options.step=1;if(this.options.precise&&this.useslider){this.options.step=(this.options.max-this.options.min)/this.options.split}}if(this.useslider){this.$slider=this.$el.find("#slider");this.$slider.slider(this.options);this.$slider.on("slide",function(f,g){c.value(g.value)})}else{this.$el.find(".ui-form-slider-text").css("width","100%")}this.$text=this.$el.find("#text");this.$text.on("change",function(){c.value($(this).val())});var e=[];this.$text.on("keyup",function(f){e[f.which]=false});this.$text.on("keydown",function(g){var f=g.which;e[f]=true;if(!(f==8||f==9||f==13||f==37||f==39||(f>=48&&f<=57)||(f==190&&$(this).val().indexOf(".")==-1&&c.options.precise)||(f==189&&$(this).val().indexOf("-")==-1)||e[91]||e[17])){event.preventDefault()}})},value:function(c){if(c!==undefined){if(isNaN(c)){c=0}if(this.options.max!==null){c=Math.min(c,this.options.max)}if(this.options.min!==null){c=Math.max(c,this.options.min)}if(this.options.onchange){this.options.onchange(c)}this.$slider&&this.$slider.slider("value",c);this.$text.val(c)}return this.$text.val()},_template:function(c){return'<div id="'+c.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}}); \ No newline at end of file
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b static/style/blue/base.css --- a/static/style/blue/base.css +++ b/static/style/blue/base.css @@ -1307,7 +1307,7 @@ .ui-portlet .portlet-buttons{height:50px;padding:10px} .ui-portlet .portlet-content{height:inherit;padding:10px;clear:both}.ui-portlet .portlet-content .content{padding:10px;height:100%;width:100%}.ui-portlet .portlet-content .content .buttons{height:50px;padding:10px} .ui-portlet .no-scroll{height:calc(100% - 80px)} -.ui-portlet-repeat{border:none;border-left:solid 3px #ebd9b2;border-radius:5px}.ui-portlet-repeat .portlet-header{background:#ebd9b2;border-radius:3px;border-bottom-left-radius:0px;padding:0px 2px} +.ui-portlet-repeat{border:none;border-left:solid 3px #ebd9b2;border-radius:5px;display:inline-block}.ui-portlet-repeat .portlet-header{background:#ebd9b2;border-radius:3px;border-bottom-left-radius:0px;padding:0px 2px} .ui-portlet-repeat .portlet-content{padding:0px}.ui-portlet-repeat .portlet-content .content{padding:0px;padding-left:10px} .ui-popover{max-width:700px;display:none}.ui-popover .popover-close{position:absolute;right:10px;top:7px;font-size:1.2em;cursor:pointer} .ui-popover .popover-title{padding:4px 10px}
diff -r 18e4aea56a74618c69b6407a52af03ce179c914b -r 3d9e14ac53cc9d10bd6cf1006e4d2c196cd72e9b static/style/src/less/ui.less --- a/static/style/src/less/ui.less +++ b/static/style/src/less/ui.less @@ -205,6 +205,7 @@ border: none; border-left: solid 3px @form-heading-bg; border-radius: 5px; + display: inline-block; .portlet-header { background: @form-heading-bg; border-radius: 3px;
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
galaxy-commits@lists.galaxyproject.org