mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
ToolForm: Use icon instead of text for optional parameters
This commit is contained in:
@@ -21,8 +21,8 @@ define(['utils/utils', 'mvc/tools/tools-form-base'],
|
||||
this.options = options;
|
||||
|
||||
// set labels
|
||||
this.options.text_enable = 'In Advance';
|
||||
this.options.text_disable = 'At Runtime';
|
||||
this.options.text_enable = 'Set in Advance';
|
||||
this.options.text_disable = 'Set at Runtime';
|
||||
|
||||
// configure workflow style
|
||||
this.options.is_dynamic = false;
|
||||
|
||||
@@ -9,27 +9,30 @@ define([], function() {
|
||||
initialize: function(app, options) {
|
||||
// link app
|
||||
this.app = app;
|
||||
|
||||
// set text labels
|
||||
this.text_enable = app.options.text_enable || 'Enable';
|
||||
this.text_disable = app.options.text_disable || 'Disable';
|
||||
|
||||
// set text labels and icons for optional button
|
||||
this.text_enable = app.options.text_enable || 'Enable';
|
||||
this.text_disable = app.options.text_disable || 'Disable';
|
||||
this.cls_enable = app.options.cls_enable || 'fa fa-plus-square';
|
||||
this.cls_disable = app.options.cls_disable || 'fa fa-minus-square';
|
||||
|
||||
// link field
|
||||
this.field = options.field;
|
||||
this.default_value = options.default_value;
|
||||
|
||||
|
||||
// set element
|
||||
this.setElement(this._template(options));
|
||||
|
||||
|
||||
// link elements
|
||||
this.$field = this.$el.find('.ui-table-form-field');
|
||||
this.$title_optional = this.$el.find('.ui-table-form-title-optional');
|
||||
this.$optional = this.$el.find('.ui-table-form-optional');
|
||||
this.$optional_icon = this.$el.find('.ui-table-form-optional').find('.icon');
|
||||
this.$error_text = this.$el.find('.ui-table-form-error-text');
|
||||
this.$error = this.$el.find('.ui-table-form-error');
|
||||
|
||||
|
||||
// add field element
|
||||
this.$field.prepend(this.field.$el);
|
||||
|
||||
|
||||
// decide wether to expand or collapse optional fields
|
||||
this.field.skip = false;
|
||||
var v = this.field.value && this.field.value();
|
||||
@@ -40,21 +43,21 @@ define([], function() {
|
||||
|
||||
// refresh view
|
||||
this._refresh();
|
||||
|
||||
|
||||
// add optional hide/show
|
||||
var self = this;
|
||||
this.$title_optional.on('click', function() {
|
||||
this.$optional.on('click', function() {
|
||||
// flip flag
|
||||
self.field.skip = !self.field.skip;
|
||||
|
||||
|
||||
// refresh view
|
||||
self._refresh();
|
||||
|
||||
|
||||
// refresh state
|
||||
self.app.trigger('refresh');
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** Set error text
|
||||
*/
|
||||
error: function(text) {
|
||||
@@ -62,27 +65,46 @@ define([], function() {
|
||||
this.$error.show();
|
||||
this.$el.addClass('ui-error');
|
||||
},
|
||||
|
||||
|
||||
/** Reset this view
|
||||
*/
|
||||
reset: function() {
|
||||
this.$error.hide();
|
||||
this.$el.removeClass('ui-error');
|
||||
},
|
||||
|
||||
|
||||
/** Refresh element
|
||||
*/
|
||||
_refresh: function() {
|
||||
// reset optional button
|
||||
this.$optional_icon.removeClass().addClass('icon');
|
||||
|
||||
// identify state
|
||||
if (!this.field.skip) {
|
||||
// enable input field
|
||||
this.$field.fadeIn('fast');
|
||||
this.$title_optional.html(this.text_disable);
|
||||
this._tooltip(this.text_disable, this.cls_disable);
|
||||
|
||||
} else {
|
||||
// disable input field
|
||||
this.$field.hide();
|
||||
this.$title_optional.html(this.text_enable);
|
||||
this._tooltip(this.text_enable, this.cls_enable);
|
||||
// reset field value
|
||||
this.field.value && this.field.value(this.default_value);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/** Set tooltip text
|
||||
*/
|
||||
_tooltip: function(title, cls) {
|
||||
if (this.$optional.length) {
|
||||
this.$optional_icon.addClass(cls)
|
||||
.tooltip({ placement: 'bottom' })
|
||||
.attr('data-original-title', title)
|
||||
.tooltip('fixTitle').tooltip('hide');
|
||||
}
|
||||
},
|
||||
|
||||
/** Main Template
|
||||
*/
|
||||
_template: function(options) {
|
||||
@@ -91,30 +113,32 @@ define([], function() {
|
||||
'<div class="ui-table-form-error ui-error">' +
|
||||
'<span class="fa fa-arrow-down"/><span class="ui-table-form-error-text"/>' +
|
||||
'</div>' +
|
||||
'<div class="ui-table-form-title-strong">';
|
||||
|
||||
'<div class="ui-table-form-title">';
|
||||
|
||||
// is optional
|
||||
if (options.optional) {
|
||||
tmp += options.label +
|
||||
'<span> [<span class="ui-table-form-title-optional"/>]</span>';
|
||||
tmp += '<div class="ui-table-form-optional">' +
|
||||
'<i class="icon"/>' + options.label +
|
||||
'</div>';
|
||||
} else {
|
||||
tmp += options.label;
|
||||
tmp += options.label;
|
||||
}
|
||||
|
||||
|
||||
// finalize title
|
||||
tmp += '</div>' +
|
||||
'<div class="ui-table-form-field">';
|
||||
|
||||
// add help
|
||||
if (options.help) {
|
||||
tmp += '<div class="ui-table-form-info">' + options.help + '</div>';
|
||||
}
|
||||
|
||||
|
||||
// finalize
|
||||
tmp += '</div>' +
|
||||
'</div>';
|
||||
|
||||
|
||||
// return input element
|
||||
return tmp;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -21,8 +21,8 @@ define(['utils/utils', 'mvc/tools/tools-form-base'],
|
||||
this.options = options;
|
||||
|
||||
// set labels
|
||||
this.options.text_enable = 'In Advance';
|
||||
this.options.text_disable = 'At Runtime';
|
||||
this.options.text_enable = 'Set in Advance';
|
||||
this.options.text_disable = 'Set at Runtime';
|
||||
|
||||
// configure workflow style
|
||||
this.options.is_dynamic = false;
|
||||
|
||||
@@ -9,27 +9,30 @@ define([], function() {
|
||||
initialize: function(app, options) {
|
||||
// link app
|
||||
this.app = app;
|
||||
|
||||
// set text labels
|
||||
this.text_enable = app.options.text_enable || 'Enable';
|
||||
this.text_disable = app.options.text_disable || 'Disable';
|
||||
|
||||
// set text labels and icons for optional button
|
||||
this.text_enable = app.options.text_enable || 'Enable';
|
||||
this.text_disable = app.options.text_disable || 'Disable';
|
||||
this.cls_enable = app.options.cls_enable || 'fa fa-plus-square';
|
||||
this.cls_disable = app.options.cls_disable || 'fa fa-minus-square';
|
||||
|
||||
// link field
|
||||
this.field = options.field;
|
||||
this.default_value = options.default_value;
|
||||
|
||||
|
||||
// set element
|
||||
this.setElement(this._template(options));
|
||||
|
||||
|
||||
// link elements
|
||||
this.$field = this.$el.find('.ui-table-form-field');
|
||||
this.$title_optional = this.$el.find('.ui-table-form-title-optional');
|
||||
this.$optional = this.$el.find('.ui-table-form-optional');
|
||||
this.$optional_icon = this.$el.find('.ui-table-form-optional').find('.icon');
|
||||
this.$error_text = this.$el.find('.ui-table-form-error-text');
|
||||
this.$error = this.$el.find('.ui-table-form-error');
|
||||
|
||||
|
||||
// add field element
|
||||
this.$field.prepend(this.field.$el);
|
||||
|
||||
|
||||
// decide wether to expand or collapse optional fields
|
||||
this.field.skip = false;
|
||||
var v = this.field.value && this.field.value();
|
||||
@@ -40,21 +43,21 @@ define([], function() {
|
||||
|
||||
// refresh view
|
||||
this._refresh();
|
||||
|
||||
|
||||
// add optional hide/show
|
||||
var self = this;
|
||||
this.$title_optional.on('click', function() {
|
||||
this.$optional.on('click', function() {
|
||||
// flip flag
|
||||
self.field.skip = !self.field.skip;
|
||||
|
||||
|
||||
// refresh view
|
||||
self._refresh();
|
||||
|
||||
|
||||
// refresh state
|
||||
self.app.trigger('refresh');
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** Set error text
|
||||
*/
|
||||
error: function(text) {
|
||||
@@ -62,27 +65,46 @@ define([], function() {
|
||||
this.$error.show();
|
||||
this.$el.addClass('ui-error');
|
||||
},
|
||||
|
||||
|
||||
/** Reset this view
|
||||
*/
|
||||
reset: function() {
|
||||
this.$error.hide();
|
||||
this.$el.removeClass('ui-error');
|
||||
},
|
||||
|
||||
|
||||
/** Refresh element
|
||||
*/
|
||||
_refresh: function() {
|
||||
// reset optional button
|
||||
this.$optional_icon.removeClass().addClass('icon');
|
||||
|
||||
// identify state
|
||||
if (!this.field.skip) {
|
||||
// enable input field
|
||||
this.$field.fadeIn('fast');
|
||||
this.$title_optional.html(this.text_disable);
|
||||
this._tooltip(this.text_disable, this.cls_disable);
|
||||
|
||||
} else {
|
||||
// disable input field
|
||||
this.$field.hide();
|
||||
this.$title_optional.html(this.text_enable);
|
||||
this._tooltip(this.text_enable, this.cls_enable);
|
||||
// reset field value
|
||||
this.field.value && this.field.value(this.default_value);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/** Set tooltip text
|
||||
*/
|
||||
_tooltip: function(title, cls) {
|
||||
if (this.$optional.length) {
|
||||
this.$optional_icon.addClass(cls)
|
||||
.tooltip({ placement: 'bottom' })
|
||||
.attr('data-original-title', title)
|
||||
.tooltip('fixTitle').tooltip('hide');
|
||||
}
|
||||
},
|
||||
|
||||
/** Main Template
|
||||
*/
|
||||
_template: function(options) {
|
||||
@@ -91,30 +113,32 @@ define([], function() {
|
||||
'<div class="ui-table-form-error ui-error">' +
|
||||
'<span class="fa fa-arrow-down"/><span class="ui-table-form-error-text"/>' +
|
||||
'</div>' +
|
||||
'<div class="ui-table-form-title-strong">';
|
||||
|
||||
'<div class="ui-table-form-title">';
|
||||
|
||||
// is optional
|
||||
if (options.optional) {
|
||||
tmp += options.label +
|
||||
'<span> [<span class="ui-table-form-title-optional"/>]</span>';
|
||||
tmp += '<div class="ui-table-form-optional">' +
|
||||
'<i class="icon"/>' + options.label +
|
||||
'</div>';
|
||||
} else {
|
||||
tmp += options.label;
|
||||
tmp += options.label;
|
||||
}
|
||||
|
||||
|
||||
// finalize title
|
||||
tmp += '</div>' +
|
||||
'<div class="ui-table-form-field">';
|
||||
|
||||
// add help
|
||||
if (options.help) {
|
||||
tmp += '<div class="ui-table-form-info">' + options.help + '</div>';
|
||||
}
|
||||
|
||||
|
||||
// finalize
|
||||
tmp += '</div>' +
|
||||
'</div>';
|
||||
|
||||
|
||||
// return input element
|
||||
return tmp;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1 +1 @@
|
||||
define(["utils/utils","mvc/tools/tools-form-base"],function(b,a){var c=a.extend({initialize:function(e){this.node=workflow.active_node;if(!this.node){console.debug("FAILED - tools-form-workflow:initialize() - Node not found in workflow.");return}this.post_job_actions=this.node.post_job_actions||{};this.options=e;this.options.text_enable="In Advance";this.options.text_disable="At Runtime";this.options.is_dynamic=false;this.options.narrow=true;this.options.initial_errors=true;this.options.cls_portlet="ui-portlet-narrow";b.deepeach(e.inputs,function(f){if(f.type){f.optional=(["data","data_hidden","hidden","drill_down","repeat","conditional"]).indexOf(f.type)==-1}});b.deepeach(e.inputs,function(f){if(f.type){if(f.type=="conditional"){f.test_param.optional=false}}});var d=this;b.get({url:galaxy_config.root+"api/datatypes",cache:true,success:function(f){d.datatypes=f;d._makeSections(e.inputs);a.prototype.initialize.call(d,e)}})},_makeSections:function(d){d[b.uuid()]={label:"Annotation / Notes",name:"annotation",type:"text",area:true,help:"Add an annotation or note for this step. It will be shown with the workflow.",value:this.node.annotation};var f=this.node.output_terminals&&Object.keys(this.node.output_terminals)[0];if(f){d[b.uuid()]={name:"pja__"+f+"__EmailAction",label:"Email notification",type:"boolean",value:String(Boolean(this.post_job_actions["EmailAction"+f])),ignore:"false",help:"An email notification will be send when the job has completed.",payload:{host:window.location.host}};d[b.uuid()]={name:"pja__"+f+"__DeleteIntermediatesAction",label:"Output cleanup",type:"boolean",value:String(Boolean(this.post_job_actions["DeleteIntermediatesAction"+f])),ignore:"false",help:"Delete intermediate outputs if they are not used as input for another job."};for(var e in this.node.output_terminals){d[b.uuid()]=this._makeSection(e)}}},_makeSection:function(h){var g=[];for(key in this.datatypes){g.push({0:this.datatypes[key],1:this.datatypes[key]})}g.sort(function(j,i){return j.label>i.label?1:j.label<i.label?-1:0});g.unshift({0:"Sequences",1:"Sequences"});g.unshift({0:"Roadmaps",1:"Roadmaps"});g.unshift({0:"Leave unchanged",1:""});var f={label:"Add Actions: '"+h+"'",type:"section",inputs:[{action:"RenameDatasetAction",argument:"newname",label:"Rename dataset",type:"text",value:"",ignore:"",help:'This action will rename the result dataset. Click <a href="https://wiki.galaxyproject.org/Learn/AdvancedWorkflow/Variables">here</a> for more information.'},{action:"ChangeDatatypeAction",argument:"newtype",label:"Change datatype",type:"select",ignore:"",options:g,help:"This action will change the datatype of the output to the indicated value."},{action:"TagDatasetAction",argument:"tags",label:"Tags",type:"text",value:"",ignore:"",help:"This action will set tags for the dataset."},{label:"Assign columns",type:"section",inputs:[{action:"ColumnSetAction",argument:"chromCol",label:"Chrom column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",argument:"startCol",label:"Start column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",argument:"endCol",label:"End column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",argument:"strandCol",label:"Strand column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",argument:"nameCol",label:"Name column",type:"integer",value:"",ignore:""}],help:"This action will set column assignments in the output dataset. Blank fields are ignored."}]};var d=this;function e(n,o){o=o||[];o.push(n);for(var m in n.inputs){var k=n.inputs[m];if(k.action){k.name="pja__"+h+"__"+k.action;if(k.argument){k.name+="__"+k.argument}if(k.payload){for(var s in k.payload){var q=k.payload[s];k.payload[k.name+"__"+s]=q;delete q}}var r=d.post_job_actions[k.action+h];if(r){for(var l in o){o[l].expand=true}if(k.argument){k.value=r.action_arguments&&r.action_arguments[k.argument]||k.value}else{k.value="true"}}}if(k.inputs){e(k,o.slice(0))}}}e(f);return f},_buildModel:function(){Galaxy.modal.show({title:"Coming soon...",body:"This feature has not been implemented yet.",buttons:{Close:function(){Galaxy.modal.hide()}}})},_updateModel:function(e){var d=this;e={tool_id:this.options.id,tool_version:this.options.version,inputs:e};console.debug("tools-form-workflow::_refreshForm() - Refreshing states.");console.debug(e);var g=this.deferred.register();var f=galaxy_config.root+"api/workflows/build_module";b.request({type:"POST",url:f,data:e,success:function(h){d.node.update_field_data(h);d._errors(h&&h.tool_model);d.deferred.done(g);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(h)},error:function(h){d.deferred.done(g);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(h)}})}});return{View:c}});
|
||||
define(["utils/utils","mvc/tools/tools-form-base"],function(b,a){var c=a.extend({initialize:function(e){this.node=workflow.active_node;if(!this.node){console.debug("FAILED - tools-form-workflow:initialize() - Node not found in workflow.");return}this.post_job_actions=this.node.post_job_actions||{};this.options=e;this.options.text_enable="Set in Advance";this.options.text_disable="Set at Runtime";this.options.is_dynamic=false;this.options.narrow=true;this.options.initial_errors=true;this.options.cls_portlet="ui-portlet-narrow";b.deepeach(e.inputs,function(f){if(f.type){f.optional=(["data","data_hidden","hidden","drill_down","repeat","conditional"]).indexOf(f.type)==-1}});b.deepeach(e.inputs,function(f){if(f.type){if(f.type=="conditional"){f.test_param.optional=false}}});var d=this;b.get({url:galaxy_config.root+"api/datatypes",cache:true,success:function(f){d.datatypes=f;d._makeSections(e.inputs);a.prototype.initialize.call(d,e)}})},_makeSections:function(d){d[b.uuid()]={label:"Annotation / Notes",name:"annotation",type:"text",area:true,help:"Add an annotation or note for this step. It will be shown with the workflow.",value:this.node.annotation};var f=this.node.output_terminals&&Object.keys(this.node.output_terminals)[0];if(f){d[b.uuid()]={name:"pja__"+f+"__EmailAction",label:"Email notification",type:"boolean",value:String(Boolean(this.post_job_actions["EmailAction"+f])),ignore:"false",help:"An email notification will be send when the job has completed.",payload:{host:window.location.host}};d[b.uuid()]={name:"pja__"+f+"__DeleteIntermediatesAction",label:"Output cleanup",type:"boolean",value:String(Boolean(this.post_job_actions["DeleteIntermediatesAction"+f])),ignore:"false",help:"Delete intermediate outputs if they are not used as input for another job."};for(var e in this.node.output_terminals){d[b.uuid()]=this._makeSection(e)}}},_makeSection:function(h){var g=[];for(key in this.datatypes){g.push({0:this.datatypes[key],1:this.datatypes[key]})}g.sort(function(j,i){return j.label>i.label?1:j.label<i.label?-1:0});g.unshift({0:"Sequences",1:"Sequences"});g.unshift({0:"Roadmaps",1:"Roadmaps"});g.unshift({0:"Leave unchanged",1:""});var f={label:"Add Actions: '"+h+"'",type:"section",inputs:[{action:"RenameDatasetAction",argument:"newname",label:"Rename dataset",type:"text",value:"",ignore:"",help:'This action will rename the result dataset. Click <a href="https://wiki.galaxyproject.org/Learn/AdvancedWorkflow/Variables">here</a> for more information.'},{action:"ChangeDatatypeAction",argument:"newtype",label:"Change datatype",type:"select",ignore:"",options:g,help:"This action will change the datatype of the output to the indicated value."},{action:"TagDatasetAction",argument:"tags",label:"Tags",type:"text",value:"",ignore:"",help:"This action will set tags for the dataset."},{label:"Assign columns",type:"section",inputs:[{action:"ColumnSetAction",argument:"chromCol",label:"Chrom column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",argument:"startCol",label:"Start column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",argument:"endCol",label:"End column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",argument:"strandCol",label:"Strand column",type:"integer",value:"",ignore:""},{action:"ColumnSetAction",argument:"nameCol",label:"Name column",type:"integer",value:"",ignore:""}],help:"This action will set column assignments in the output dataset. Blank fields are ignored."}]};var d=this;function e(n,o){o=o||[];o.push(n);for(var m in n.inputs){var k=n.inputs[m];if(k.action){k.name="pja__"+h+"__"+k.action;if(k.argument){k.name+="__"+k.argument}if(k.payload){for(var s in k.payload){var q=k.payload[s];k.payload[k.name+"__"+s]=q;delete q}}var r=d.post_job_actions[k.action+h];if(r){for(var l in o){o[l].expand=true}if(k.argument){k.value=r.action_arguments&&r.action_arguments[k.argument]||k.value}else{k.value="true"}}}if(k.inputs){e(k,o.slice(0))}}}e(f);return f},_buildModel:function(){Galaxy.modal.show({title:"Coming soon...",body:"This feature has not been implemented yet.",buttons:{Close:function(){Galaxy.modal.hide()}}})},_updateModel:function(e){var d=this;e={tool_id:this.options.id,tool_version:this.options.version,inputs:e};console.debug("tools-form-workflow::_refreshForm() - Refreshing states.");console.debug(e);var g=this.deferred.register();var f=galaxy_config.root+"api/workflows/build_module";b.request({type:"POST",url:f,data:e,success:function(h){d.node.update_field_data(h);d._errors(h&&h.tool_model);d.deferred.done(g);console.debug("tools-form::_refreshForm() - States refreshed.");console.debug(h)},error:function(h){d.deferred.done(g);console.debug("tools-form::_refreshForm() - Refresh request failed.");console.debug(h)}})}});return{View:c}});
|
||||
@@ -1 +1 @@
|
||||
define([],function(){return Backbone.View.extend({initialize:function(d,c){this.app=d;this.text_enable=d.options.text_enable||"Enable";this.text_disable=d.options.text_disable||"Disable";this.field=c.field;this.default_value=c.default_value;this.setElement(this._template(c));this.$field=this.$el.find(".ui-table-form-field");this.$title_optional=this.$el.find(".ui-table-form-title-optional");this.$error_text=this.$el.find(".ui-table-form-error-text");this.$error=this.$el.find(".ui-table-form-error");this.$field.prepend(this.field.$el);this.field.skip=false;var b=this.field.value&&this.field.value();this.field.skip=Boolean(c.optional&&(b===null||b==this.default_value||Number(b)==Number(this.default_value)||JSON.stringify(b)==JSON.stringify(this.default_value)));this._refresh();var a=this;this.$title_optional.on("click",function(){a.field.skip=!a.field.skip;a._refresh();a.app.trigger("refresh")})},error:function(a){this.$error_text.html(a);this.$error.show();this.$el.addClass("ui-error")},reset:function(){this.$error.hide();this.$el.removeClass("ui-error")},_refresh:function(){if(!this.field.skip){this.$field.fadeIn("fast");this.$title_optional.html(this.text_disable)}else{this.$field.hide();this.$title_optional.html(this.text_enable);this.field.value&&this.field.value(this.default_value)}},_template:function(a){var b='<div class="ui-table-form-element"><div class="ui-table-form-error ui-error"><span class="fa fa-arrow-down"/><span class="ui-table-form-error-text"/></div><div class="ui-table-form-title-strong">';if(a.optional){b+=a.label+'<span> [<span class="ui-table-form-title-optional"/>]</span>'}else{b+=a.label}b+='</div><div class="ui-table-form-field">';if(a.help){b+='<div class="ui-table-form-info">'+a.help+"</div>"}b+="</div></div>";return b}})});
|
||||
define([],function(){return Backbone.View.extend({initialize:function(d,c){this.app=d;this.text_enable=d.options.text_enable||"Enable";this.text_disable=d.options.text_disable||"Disable";this.cls_enable=d.options.cls_enable||"fa fa-plus-square";this.cls_disable=d.options.cls_disable||"fa fa-minus-square";this.field=c.field;this.default_value=c.default_value;this.setElement(this._template(c));this.$field=this.$el.find(".ui-table-form-field");this.$optional=this.$el.find(".ui-table-form-optional");this.$optional_icon=this.$el.find(".ui-table-form-optional").find(".icon");this.$error_text=this.$el.find(".ui-table-form-error-text");this.$error=this.$el.find(".ui-table-form-error");this.$field.prepend(this.field.$el);this.field.skip=false;var b=this.field.value&&this.field.value();this.field.skip=Boolean(c.optional&&(b===null||b==this.default_value||Number(b)==Number(this.default_value)||JSON.stringify(b)==JSON.stringify(this.default_value)));this._refresh();var a=this;this.$optional.on("click",function(){a.field.skip=!a.field.skip;a._refresh();a.app.trigger("refresh")})},error:function(a){this.$error_text.html(a);this.$error.show();this.$el.addClass("ui-error")},reset:function(){this.$error.hide();this.$el.removeClass("ui-error")},_refresh:function(){this.$optional_icon.removeClass().addClass("icon");if(!this.field.skip){this.$field.fadeIn("fast");this._tooltip(this.text_disable,this.cls_disable)}else{this.$field.hide();this._tooltip(this.text_enable,this.cls_enable);this.field.value&&this.field.value(this.default_value)}},_tooltip:function(b,a){if(this.$optional.length){this.$optional_icon.addClass(a).tooltip({placement:"bottom"}).attr("data-original-title",b).tooltip("fixTitle").tooltip("hide")}},_template:function(a){var b='<div class="ui-table-form-element"><div class="ui-table-form-error ui-error"><span class="fa fa-arrow-down"/><span class="ui-table-form-error-text"/></div><div class="ui-table-form-title">';if(a.optional){b+='<div class="ui-table-form-optional"><i class="icon"/>'+a.label+"</div>"}else{b+=a.label}b+='</div><div class="ui-table-form-field">';if(a.help){b+='<div class="ui-table-form-info">'+a.help+"</div>"}b+="</div></div>";return b}})});
|
||||
@@ -1414,10 +1414,8 @@ label{font-weight:normal}
|
||||
.ui-table tbody,.ui-table-plain tbody{cursor:pointer}
|
||||
.ui-table-plain{table-layout:fixed}.ui-table-plain tbody{cursor:auto !important}.ui-table-plain tbody td{padding:0px !important;border:none !important}
|
||||
.ui-table-plain .ui-table-section{border-left:solid 3px #ebd9b2;border-radius:5px !important;margin-bottom:5px;padding-left:10px}
|
||||
.ui-table-form-element{margin-top:5px;margin-bottom:5px;overflow:hidden}.ui-table-form-element .ui-table-form-title-optional{font-weight:bold;text-decoration:underline;cursor:pointer}
|
||||
.ui-table-form-element .ui-table-form-field{margin-top:5px}
|
||||
.ui-table-form-title-strong{font-weight:bold}
|
||||
.ui-table-form-info{clear:both !important}
|
||||
.ui-table-form-element{margin-top:5px;margin-bottom:5px;overflow:hidden}.ui-table-form-element .ui-table-form-title{font-weight:bold}.ui-table-form-element .ui-table-form-title .ui-table-form-optional{cursor:pointer}.ui-table-form-element .ui-table-form-title .ui-table-form-optional .icon{margin-right:5px;font-size:1.2em}
|
||||
.ui-table-form-element .ui-table-form-field{margin-top:5px}.ui-table-form-element .ui-table-form-field .ui-table-form-info{clear:both !important}
|
||||
.ui-table-form-separator{font-weight:bold;font-size:0.9em}
|
||||
.ui-table-form-error{display:none}.ui-table-form-error .ui-table-form-error-text{padding-left:5px}
|
||||
.ui-portlet,.ui-portlet-repeat,.ui-portlet-limited,.ui-portlet-section,.ui-portlet-narrow,.ui-portlet-repeat,.ui-portlet-limited,.ui-portlet-section,.ui-portlet-narrow{border:solid #d6b161 1px;border-radius:3px;position:relative;clear:both;width:auto;height:100%}.ui-portlet .portlet-header,.ui-portlet-limited .portlet-header,.ui-portlet-narrow .portlet-header{background:#ebd9b2;border-bottom:solid #d6b161 1px;padding:2px 8px;overflow:visible;float:right;width:100%}.ui-portlet .portlet-header .portlet-title,.ui-portlet-limited .portlet-header .portlet-title,.ui-portlet-narrow .portlet-header .portlet-title{display:inline;vertical-align:middle}.ui-portlet .portlet-header .portlet-title .portlet-title-text,.ui-portlet-limited .portlet-header .portlet-title .portlet-title-text,.ui-portlet-narrow .portlet-header .portlet-title .portlet-title-text{vertical-align:middle;line-height:22px}
|
||||
@@ -1454,9 +1452,9 @@ label{font-weight:normal}
|
||||
.ui-select select{position:relative;top:0px;height:27px;width:100%;padding-left:5px;padding-right:20px;cursor:pointer;background:transparent;-webkit-appearance:none;border:1px solid #bfbfbf;-moz-border-radius:3px;border-radius:3px}
|
||||
.ui-select-content .ui-options{float:left;padding-top:2px}
|
||||
.ui-color-picker .ui-color-picker-header{cursor:pointer}
|
||||
.ui-color-picker .ui-color-picker-value{float:left;border-radius:3px;border:solid 1px #000000;width:12px;height:12px;margin-bottom:10px;margin-right:5px}
|
||||
.ui-color-picker .ui-color-picker-value{float:left;border-radius:3px;border:solid 1px #000000;width:12px;height:12px;margin-right:5px}
|
||||
.ui-color-picker .ui-color-picker-label{float:left;line-height:1.2em}
|
||||
.ui-color-picker .ui-color-picker-view{display:none;float:left;overflow:auto;height:100%}.ui-color-picker .ui-color-picker-view .ui-color-picker-panel{width:210px}.ui-color-picker .ui-color-picker-view .ui-color-picker-panel .ui-color-picker-content{margin-bottom:15px}.ui-color-picker .ui-color-picker-view .ui-color-picker-panel .ui-color-picker-content .label{padding-bottom:2px}
|
||||
.ui-color-picker .ui-color-picker-view{height:100%;overflow:auto;display:none;float:left;margin-top:10px}.ui-color-picker .ui-color-picker-view .ui-color-picker-panel{width:210px}.ui-color-picker .ui-color-picker-view .ui-color-picker-panel .ui-color-picker-content{margin-bottom:15px}.ui-color-picker .ui-color-picker-view .ui-color-picker-panel .ui-color-picker-content .label{padding-bottom:2px}
|
||||
.ui-color-picker .ui-color-picker-view .ui-color-picker-panel .ui-color-picker-content .line .ui-color-picker-box{cursor:pointer;float:left;margin-right:5px;border:solid 1px #c0c0c0;width:15px;height:15px;border-radius:2px}.ui-color-picker .ui-color-picker-view .ui-color-picker-panel .ui-color-picker-content .line .ui-color-picker-box .ui-color-picker-check{color:black;font-size:1.2em;position:relative;left:1px}
|
||||
.libraryRow{background-color:#ebd9b2}
|
||||
.datasetHighlighted{background-color:#f9f9f9}
|
||||
@@ -1804,7 +1802,7 @@ div.form-row label.inline{display:inline}
|
||||
div.form-row-input{width:90%;float:left}
|
||||
div.form-row-input label{font-weight:normal;display:inline}
|
||||
div.form-row-error-message{width:300px;float:left;color:red;font-weight:bold;padding:3px 0}
|
||||
.form-row .help,.toolParamHelp,.ui-table-form-info{color:#666}.form-row .help a,.toolParamHelp a{color:#666}
|
||||
.form-row .help,.toolParamHelp,.ui-table-form-element .ui-table-form-field .ui-table-form-info{color:#666}.form-row .help a,.toolParamHelp a{color:#666}
|
||||
.form-row.form-actions{background:whiteSmoke;border-top:solid #ddd 1px;padding-top:10px;padding-bottom:10px;margin-top:5px}
|
||||
select{padding:2px;font-size:12px;line-height:1.428571429}
|
||||
select,input,textarea{font:inherit}
|
||||
|
||||
@@ -57,7 +57,10 @@
|
||||
height: auto !important;
|
||||
ul {
|
||||
i {
|
||||
font-size: 1.2em; margin-right: @ui-margin-horizontal; position: relative; top: 1px;
|
||||
font-size: 1.2em;
|
||||
margin-right: @ui-margin-horizontal;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
}
|
||||
.button {
|
||||
@@ -142,28 +145,28 @@
|
||||
|
||||
// table form elements
|
||||
.ui-table-form-element {
|
||||
.ui-table-form-title-optional {
|
||||
.ui-table-form-title {
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
.ui-table-form-optional {
|
||||
cursor: pointer;
|
||||
.icon {
|
||||
margin-right: 5px;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ui-table-form-field {
|
||||
margin-top: @ui-margin-vertical;
|
||||
.ui-table-form-info {
|
||||
&:extend(.toolParamHelp);
|
||||
clear: both !important;
|
||||
}
|
||||
}
|
||||
margin-top: @ui-margin-vertical;
|
||||
margin-bottom: @ui-margin-vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ui-table-form-title-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ui-table-form-info {
|
||||
&:extend(.toolParamHelp);
|
||||
clear: both !important;
|
||||
}
|
||||
|
||||
.ui-table-form-separator {
|
||||
font-weight: bold;
|
||||
font-size: 0.9em;
|
||||
@@ -453,7 +456,6 @@
|
||||
border: solid 1px #000000;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.ui-color-picker-label {
|
||||
@@ -465,6 +467,7 @@
|
||||
overflow: auto;
|
||||
display: none;
|
||||
float: left;
|
||||
margin-top: 10px;
|
||||
.ui-color-picker-panel {
|
||||
width: 210px;
|
||||
.ui-color-picker-content {
|
||||
|
||||
Reference in New Issue
Block a user