Workflow: Add style for workflow tool form

This commit is contained in:
Aysam Guerler
2015-02-05 22:25:22 -05:00
parent ba825fc553
commit c8aece99eb
13 changed files with 106 additions and 72 deletions
@@ -18,7 +18,9 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc',
// shows form in narrow view mode
narrow : false,
// shows errors on start
initial_errors : false
initial_errors : false,
// portlet style
cls_portlet : 'ui-portlet-limited'
};
// configure options
@@ -294,7 +296,7 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc',
this.portlet = new Portlet.View({
icon : 'fa-wrench',
title : '<b>' + options.name + '</b> ' + options.description + ' (Galaxy Tool Version ' + options.version + ')',
cls : 'ui-portlet-slim',
cls : this.options.cls_portlet,
operations: {
requirements : requirements_button,
menu : menu_button,
@@ -303,11 +305,6 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc',
buttons : this.buttons
});
// remove padding
if (options.narrow) {
this.portlet.$content.css('padding', '0px');
}
// append message
this.portlet.append(this.message.$el, true);
@@ -28,6 +28,7 @@ define(['utils/utils', 'mvc/tools/tools-form-base'],
this.options.is_dynamic = false;
this.options.narrow = true;
this.options.initial_errors = true;
this.options.cls_portlet = 'ui-portlet-narrow';
// declare fields as optional
Utils.deepeach(options.inputs, function(item) {
+2 -2
View File
@@ -67,7 +67,7 @@ var View = Backbone.View.extend({
}
// append operations
this.$operations = $(this.el).find('.operations');
this.$operations = $(this.el).find('.portlet-operations');
if (this.options.operations) {
// link functions
var self = this;
@@ -157,7 +157,7 @@ var View = Backbone.View.extend({
if (options.title) {
tmpl += '<div class="portlet-header">' +
'<div class="operations" style="float: ' + options.operations_flt + ';"></div>' +
'<div class="portlet-operations" style="float: ' + options.operations_flt + ';"></div>' +
'<div class="portlet-title">';
if (options.icon)
File diff suppressed because one or more lines are too long
@@ -28,7 +28,7 @@ return Backbone.View.extend({
this.setElement($(this._template()));
// use full screen for viewer
this._fullscreen(this.$el, 100);
this._fullscreen(this.$el, 90);
// prevent window scrolling
var initial_overflow = $('body').css('overflow');
+4 -7
View File
@@ -18,7 +18,9 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc',
// shows form in narrow view mode
narrow : false,
// shows errors on start
initial_errors : false
initial_errors : false,
// portlet style
cls_portlet : 'ui-portlet-limited'
};
// configure options
@@ -294,7 +296,7 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc',
this.portlet = new Portlet.View({
icon : 'fa-wrench',
title : '<b>' + options.name + '</b> ' + options.description + ' (Galaxy Tool Version ' + options.version + ')',
cls : 'ui-portlet-slim',
cls : this.options.cls_portlet,
operations: {
requirements : requirements_button,
menu : menu_button,
@@ -303,11 +305,6 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc',
buttons : this.buttons
});
// remove padding
if (options.narrow) {
this.portlet.$content.css('padding', '0px');
}
// append message
this.portlet.append(this.message.$el, true);
@@ -28,6 +28,7 @@ define(['utils/utils', 'mvc/tools/tools-form-base'],
this.options.is_dynamic = false;
this.options.narrow = true;
this.options.initial_errors = true;
this.options.cls_portlet = 'ui-portlet-narrow';
// declare fields as optional
Utils.deepeach(options.inputs, function(item) {
+2 -2
View File
@@ -67,7 +67,7 @@ var View = Backbone.View.extend({
}
// append operations
this.$operations = $(this.el).find('.operations');
this.$operations = $(this.el).find('.portlet-operations');
if (this.options.operations) {
// link functions
var self = this;
@@ -157,7 +157,7 @@ var View = Backbone.View.extend({
if (options.title) {
tmpl += '<div class="portlet-header">' +
'<div class="operations" style="float: ' + options.operations_flt + ';"></div>' +
'<div class="portlet-operations" style="float: ' + options.operations_flt + ';"></div>' +
'<div class="portlet-title">';
if (options.icon)
@@ -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"],function(g,h,f,k,i,a,d,c,e,j,b){return Backbone.View.extend({initialize:function(l){this.optionsDefault={is_dynamic:true,narrow:false,initial_errors:false};this.options=g.merge(l,this.optionsDefault);console.debug(this.options);var m=parent.Galaxy;if(m&&m.modal){this.modal=m.modal}else{this.modal=new k.Modal.View()}if(m&&m.currUser){this.is_admin=m.currUser.get("is_admin")}else{this.is_admin=false}this.container=this.options.container||"body";this.deferred=new h();this.setElement("<div/>");$(this.container).append(this.$el);this.build(this.options)},build:function(m){var l=this;this.off("refresh");this.off("reset");this.field_list={};this.input_list={};this.element_list={};this.tree=new b(this);this.content=new e(this);l.options.inputs=m&&m.inputs;this._renderForm(m);this.tree.finalize();if(m.initial_errors){this._errors(m)}this.on("refresh",function(){l.deferred.reset();l.deferred.execute(function(){l._updateModel()})});this.on("reset",function(){for(var n in this.element_list){this.element_list[n].reset()}});this.trigger("refresh")},reciept:function(l){$(this.container).empty();$(this.container).append(l)},highlight:function(m,n,l){var o=this.element_list[m];if(o){o.error(n||"Please verify this parameter.");if(!l){$(this.container).animate({scrollTop:o.$el.offset().top-20},500)}}},_errors:function(n){this.trigger("reset");if(n&&n.errors){var o=this.tree.matchResponse(n.errors);for(var m in this.element_list){var l=this.element_list[m];if(o[m]){this.highlight(m,o[m],true)}}}},_renderForm:function(u){var t=this;this.message=new k.Message();var q=new k.ButtonIcon({icon:"fa-info-circle",title:(!u.narrow&&"Requirements")||null,tooltip:"Display tool requirements",onclick:function(){if(!this.visible){this.visible=true;t.message.update({persistent:true,message:c.requirements(u),status:"info"})}else{this.visible=false;t.message.update({message:""})}}});if(!u.requirements||u.requirements.length==0){q.$el.hide()}var m=new k.ButtonMenu({icon:"fa-cubes",title:(!u.narrow&&"Versions")||null,tooltip:"Select another tool version"});if(u.versions&&u.versions.length>1){for(var o in u.versions){var r=u.versions[o];if(r!=u.version){m.addMenu({title:"Switch to "+r,version:r,icon:"fa-cube",onclick:function(){t.options.id=t.options.id.replace(t.options.version,this.version);t.options.version=this.version;t.deferred.reset();t.deferred.execute(function(){t._buildModel()})}})}}}else{m.$el.hide()}var p=new k.ButtonMenu({icon:"fa-caret-down",title:(!u.narrow&&"Options")||null,tooltip:"View available options"});if(u.biostar_url){p.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/p/new/post/")}});p.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/t/"+u.id+"/")}})}p.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="+u.id)}});if(this.is_admin){p.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+u.id+"/download"}})}this.section=new j.View(t,{inputs:u.inputs});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new f.View({icon:"fa-wrench",title:"<b>"+u.name+"</b> "+u.description+" (Galaxy Tool Version "+u.version+")",cls:"ui-portlet-slim",operations:{requirements:q,menu:p,versions:m},buttons:this.buttons});if(u.narrow){this.portlet.$content.css("padding","0px")}this.portlet.append(this.message.$el,true);this.portlet.append(this.section.$el);this.$el.empty();this.$el.append(this.portlet.$el);if(u.help!=""){this.$el.append(c.help(u.help))}if(u.citations){var s=$("<div/>");var l=new i.ToolCitationCollection();l.tool_id=u.id;var n=new a.CitationListView({el:s,collection:l});n.render();l.fetch();this.$el.append(s)}if(u.message){this.message.update({persistent:true,status:"warning",message:u.message})}}})});
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"],function(g,h,f,k,i,a,d,c,e,j,b){return Backbone.View.extend({initialize:function(l){this.optionsDefault={is_dynamic:true,narrow:false,initial_errors:false,cls_portlet:"ui-portlet-limited"};this.options=g.merge(l,this.optionsDefault);console.debug(this.options);var m=parent.Galaxy;if(m&&m.modal){this.modal=m.modal}else{this.modal=new k.Modal.View()}if(m&&m.currUser){this.is_admin=m.currUser.get("is_admin")}else{this.is_admin=false}this.container=this.options.container||"body";this.deferred=new h();this.setElement("<div/>");$(this.container).append(this.$el);this.build(this.options)},build:function(m){var l=this;this.off("refresh");this.off("reset");this.field_list={};this.input_list={};this.element_list={};this.tree=new b(this);this.content=new e(this);l.options.inputs=m&&m.inputs;this._renderForm(m);this.tree.finalize();if(m.initial_errors){this._errors(m)}this.on("refresh",function(){l.deferred.reset();l.deferred.execute(function(){l._updateModel()})});this.on("reset",function(){for(var n in this.element_list){this.element_list[n].reset()}});this.trigger("refresh")},reciept:function(l){$(this.container).empty();$(this.container).append(l)},highlight:function(m,n,l){var o=this.element_list[m];if(o){o.error(n||"Please verify this parameter.");if(!l){$(this.container).animate({scrollTop:o.$el.offset().top-20},500)}}},_errors:function(n){this.trigger("reset");if(n&&n.errors){var o=this.tree.matchResponse(n.errors);for(var m in this.element_list){var l=this.element_list[m];if(o[m]){this.highlight(m,o[m],true)}}}},_renderForm:function(u){var t=this;this.message=new k.Message();var q=new k.ButtonIcon({icon:"fa-info-circle",title:(!u.narrow&&"Requirements")||null,tooltip:"Display tool requirements",onclick:function(){if(!this.visible){this.visible=true;t.message.update({persistent:true,message:c.requirements(u),status:"info"})}else{this.visible=false;t.message.update({message:""})}}});if(!u.requirements||u.requirements.length==0){q.$el.hide()}var m=new k.ButtonMenu({icon:"fa-cubes",title:(!u.narrow&&"Versions")||null,tooltip:"Select another tool version"});if(u.versions&&u.versions.length>1){for(var o in u.versions){var r=u.versions[o];if(r!=u.version){m.addMenu({title:"Switch to "+r,version:r,icon:"fa-cube",onclick:function(){t.options.id=t.options.id.replace(t.options.version,this.version);t.options.version=this.version;t.deferred.reset();t.deferred.execute(function(){t._buildModel()})}})}}}else{m.$el.hide()}var p=new k.ButtonMenu({icon:"fa-caret-down",title:(!u.narrow&&"Options")||null,tooltip:"View available options"});if(u.biostar_url){p.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/p/new/post/")}});p.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(u.biostar_url+"/t/"+u.id+"/")}})}p.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="+u.id)}});if(this.is_admin){p.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=galaxy_config.root+"api/tools/"+u.id+"/download"}})}this.section=new j.View(t,{inputs:u.inputs});if(this.incompatible){this.$el.hide();$("#tool-form-classic").show();return}this.portlet=new f.View({icon:"fa-wrench",title:"<b>"+u.name+"</b> "+u.description+" (Galaxy Tool Version "+u.version+")",cls:this.options.cls_portlet,operations:{requirements:q,menu:p,versions:m},buttons:this.buttons});this.portlet.append(this.message.$el,true);this.portlet.append(this.section.$el);this.$el.empty();this.$el.append(this.portlet.$el);if(u.help!=""){this.$el.append(c.help(u.help))}if(u.citations){var s=$("<div/>");var l=new i.ToolCitationCollection();l.tool_id=u.id;var n=new a.CitationListView({el:s,collection:l});n.render();l.fetch();this.$el.append(s)}if(u.message){this.message.update({persistent:true,status:"warning",message:u.message})}}})});
@@ -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;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(){var d=this;var e=this.tree.finalize();console.debug("tools-form-workflow::_refreshForm() - Refreshing states.");console.debug(e);var g=this.deferred.register();var f=galaxy_config.root+"workflow/editor_form_post?tool_id="+this.options.id+"&__is_dynamic__=False";b.request({type:"GET",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="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(){var d=this;var e=this.tree.finalize();console.debug("tools-form-workflow::_refreshForm() - Refreshing states.");console.debug(e);var g=this.deferred.register();var f=galaxy_config.root+"workflow/editor_form_post?tool_id="+this.options.id+"&__is_dynamic__=False";b.request({type:"GET",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
View File
@@ -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",operations_flt:"right"},$title:null,$content:null,$buttons:null,$operations:null,$header: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");this.$header=this.$el.find(".portlet-header");var d=this.$el.find(".portlet-content");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(d,c){if(c){this.$content.append(d)}else{this.$content.append(a.wrap(d))}},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 class="portlet-header"><div class="operations" style="float: '+d.operations_flt+';"></div><div class="portlet-title">';if(d.icon){c+='<i class="icon fa '+d.icon+'">&nbsp;</i>'}c+='<span class="portlet-title-text">'+d.title+"</span></div></div>"}c+='<div class="portlet-content">';if(d.placement=="top"){c+='<div class="buttons"></div>'}c+='<div class="content"></div>';if(d.placement=="bottom"){c+='<div class="buttons"></div>'}c+="</div></div>";return c}});return{View:b}});
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,$header: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");this.$header=this.$el.find(".portlet-header");var d=this.$el.find(".portlet-content");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(".portlet-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(d,c){if(c){this.$content.append(d)}else{this.$content.append(a.wrap(d))}},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 class="portlet-header"><div class="portlet-operations" style="float: '+d.operations_flt+';"></div><div class="portlet-title">';if(d.icon){c+='<i class="icon fa '+d.icon+'">&nbsp;</i>'}c+='<span class="portlet-title-text">'+d.title+"</span></div></div>"}c+='<div class="portlet-content">';if(d.placement=="top"){c+='<div class="buttons"></div>'}c+='<div class="content"></div>';if(d.placement=="bottom"){c+='<div class="buttons"></div>'}c+="</div></div>";return c}});return{View:b}});
+20 -15
View File
@@ -1395,22 +1395,21 @@ label{font-weight:normal}
.upload-header .header-selection{width:200px;min-width:200px;font-size:11px;padding-right:10px}
.upload-header .select2-choice{max-height:20px;line-height:18px;background:transparent;text-align:center;font-weight:normal}.upload-header .select2-choice .select2-arrow b{background-position:0 -3px}
.upload-top{height:5%;text-align:center}.upload-top .upload-info{margin-top:0px;font-weight:normal;text-align:center}
.no-highlight,.ui-button-icon,.ui-portlet,.ui-portlet-slim,.ui-portlet-repeat,.ui-portlet-section{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none;}
.no-highlight,.ui-button-icon,.ui-portlet,.ui-portlet-repeat,.ui-portlet-limited,.ui-portlet-section,.ui-portlet-narrow{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none;}
.ui-error{-moz-border-radius:3px;border-radius:3px;background:#f9c7c5;padding:5px}
.ui-table-form-error{display:none}.ui-table-form-error .ui-table-form-error-text{padding-left:5px}
.ui-table tbody{cursor:pointer}
.ui-table-plain{table-layout:fixed}.ui-table-plain tbody td{padding:5px 0px 5px 0px !important;border:none !important}
.ui-table-plain tbody{cursor:auto !important}
.ui-table tbody,.ui-table-plain tbody{cursor:pointer}
.ui-table .ui-table-form-section,.ui-table-plain .ui-table-form-section{border-left:solid 3px #ebd9b2;border-radius:5px !important;padding-left:10px}
.ui-table-plain{table-layout:fixed}.ui-table-plain tbody{cursor:auto !important}.ui-table-plain tbody td{padding:5px 0px 5px 0px !important;border:none !important}
.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-section{border-left:solid 3px #ebd9b2;border-radius:5px !important;padding-left:10px}
.ui-table-form-title-strong{font-weight:bold}
.ui-table-form-info{clear:both !important}
.ui-table-form-separator{font-weight:bold;font-size:0.9em}
.ui-label{font-weight:bold}
.ui-message{padding:2px 10px 2px 10px;margin-bottom:5px}
.ui-icon{font-size:1.2em}
.ui-button-icon{margin-right:5px;height:auto !important}.ui-button-icon ul i{font-size:1.2em;margin-right:5px;position:relative;top:1px}
.ui-button-icon{height:auto !important}.ui-button-icon ul i{font-size:1.2em;margin-right:5px;position:relative;top:1px}
.ui-button-icon .button{margin-right:5px;margin-left:5px}.ui-button-icon .button .title{position:relative;font-size:0.8em;font-weight:normal;top:-1px}
.ui-button-icon .button.disabled{filter:alpha(opacity=65);opacity:.65;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);filter:alpha(opacity=65)}
.ui-button-menu .dropdown-menu{min-width:50px}
@@ -1418,14 +1417,20 @@ label{font-weight:normal}
.ui-button-icon-plain{border:none !important;background:none !important;height:inherit !important;width:inherit !important;padding-right:3px !important}
.ui-tabs .ui-tabs-add{font-size:0.8em;margin-right:5px}
.ui-tabs .ui-tabs-delete{font-size:0.8em;margin-left:5px;cursor:pointer}
.ui-portlet,.ui-portlet-slim,.ui-portlet-repeat,.ui-portlet-section,.ui-portlet-slim,.ui-portlet-repeat,.ui-portlet-section{border:solid #d6b161 1px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;position:relative;clear:both;width:auto;height:100%}.ui-portlet .portlet-header,.ui-portlet-slim .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-slim .portlet-header .portlet-title{display:inline;vertical-align:middle}.ui-portlet .portlet-header .portlet-title .portlet-title-text,.ui-portlet-slim .portlet-header .portlet-title .portlet-title-text{vertical-align:middle;line-height:20px}
.ui-portlet .portlet-header .portlet-title .icon,.ui-portlet-slim .portlet-header .portlet-title .icon{font-size:1.2em;vertical-align:middle}
.ui-portlet .portlet-buttons,.ui-portlet-slim .portlet-buttons{height:50px;padding:10px}
.ui-portlet .portlet-content,.ui-portlet-slim .portlet-content{height:inherit;padding:10px;clear:both}.ui-portlet .portlet-content .content,.ui-portlet-slim .portlet-content .content{padding:10px;height:100%;width:100%}.ui-portlet .portlet-content .content .buttons,.ui-portlet-slim .portlet-content .content .buttons{height:50px;padding:10px}
.ui-portlet-slim{max-width:900px}
.ui-portlet-repeat,.ui-portlet-section,.ui-portlet-section{border:none;border-left:solid 3px #ebd9b2;border-radius:5px}.ui-portlet-repeat .portlet-header,.ui-portlet-section .portlet-header{background:#ebd9b2;border-radius:3px;border-bottom-left-radius:0px;padding:0px 2px}
.ui-portlet-repeat .portlet-content,.ui-portlet-section .portlet-content{padding:0px}.ui-portlet-repeat .portlet-content .content,.ui-portlet-section .portlet-content .content{padding:0px;padding-left:10px}
.ui-portlet-section{border-left:solid 3px #dfe5f9;border-radius:5px}.ui-portlet-section .portlet-header{background:#dfe5f9;border-bottom:solid #b4c2f1 1px}
.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}
.ui-portlet .portlet-header .portlet-title .icon,.ui-portlet-limited .portlet-header .portlet-title .icon,.ui-portlet-narrow .portlet-header .portlet-title .icon{font-size:1.2em;vertical-align:middle}
.ui-portlet .portlet-header .portlet-operations .ui-button-icon,.ui-portlet-limited .portlet-header .portlet-operations .ui-button-icon,.ui-portlet-narrow .portlet-header .portlet-operations .ui-button-icon{margin-left:5px}
.ui-portlet .portlet-buttons,.ui-portlet-limited .portlet-buttons,.ui-portlet-narrow .portlet-buttons{height:50px;padding:10px}
.ui-portlet .portlet-content,.ui-portlet-limited .portlet-content,.ui-portlet-narrow .portlet-content{height:inherit;padding:10px;clear:both}.ui-portlet .portlet-content .content,.ui-portlet-limited .portlet-content .content,.ui-portlet-narrow .portlet-content .content{padding:0px;height:100%;width:100%}.ui-portlet .portlet-content .content .buttons,.ui-portlet-limited .portlet-content .content .buttons,.ui-portlet-narrow .portlet-content .content .buttons{height:50px;padding:10px}
.ui-portlet-repeat,.ui-portlet-section,.ui-portlet-section{border:none;border-left:solid 3px #ebd9b2;border-radius:5px}.ui-portlet-repeat .portlet-header,.ui-portlet-section .portlet-header{background:#ebd9b2;border-radius:5px;border-bottom-left-radius:0px;border-top-left-radius:0px;padding:0px 2px}.ui-portlet-repeat .portlet-header .portlet-title-text,.ui-portlet-section .portlet-header .portlet-title-text{vertical-align:middle;line-height:20px !important}
.ui-portlet-repeat .portlet-content,.ui-portlet-section .portlet-content{padding-left:10px}
.ui-portlet-section{border-left:solid 3px #dfe5f9}.ui-portlet-section .portlet-header{background:#dfe5f9;border-bottom:solid #b4c2f1 1px}
.ui-portlet-narrow{border:none}.ui-portlet-narrow .portlet-header{border-radius:3px;margin-bottom:5px}.ui-portlet-narrow .portlet-header .portlet-operations .ui-button-icon{margin-left:3px}
.ui-portlet-narrow .portlet-content{padding:0px}
.ui-portlet-narrow .ui-table-form-section{padding-left:5px}
.ui-portlet-narrow .ui-portlet-repeat .portlet-header,.ui-portlet-narrow .ui-portlet-section .portlet-header{border-radius:5px;border-bottom-left-radius:0px;border-top-left-radius:0px;margin-bottom:0px}
.ui-portlet-narrow .ui-portlet-repeat .portlet-content,.ui-portlet-narrow .ui-portlet-section .portlet-content{padding:0px;padding-left:5px}
.ui-portlet-limited,.ui-portlet-narrow,.ui-portlet-narrow{max-width:900px}
.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}
.ui-input,.ui-textarea,.ui-options,.ui-form-slider .ui-form-slider-text,.ui-select-multiple,.ui-textarea,.ui-options,.ui-form-slider .ui-form-slider-text,.ui-select-multiple{background:transparent}
@@ -1852,7 +1857,7 @@ div.debug{margin:10px;padding:5px;background:#FFFF99;border:solid #FFFF33 1px;co
.grid-header h2{margin:0;margin-bottom:0.5em}
.grid-header .title{font-weight:bold}
.grid,.ui-table,.ui-table-plain{padding-top:1em;border-collapse:collapse;width:100%}
.grid tbody td,.ui-table tbody td{line-height:1.428571429;border-top:solid #DDDDDD 1px;border-bottom:solid #DDDDDD 1px;padding:5px}
.grid tbody td,.ui-table tbody td,.ui-table-plain tbody td{line-height:1.428571429;border-top:solid #DDDDDD 1px;border-bottom:solid #DDDDDD 1px;padding:5px}
.grid tbody td:empty{padding:0}
.grid thead tr{height:2em}
.grid thead th{line-height:1.428571429;background:#ebd9b2;color:#000;border-top:solid #d6b161 1px;border-bottom:solid #d6b161 1px;padding:5px;text-align:left;white-space:nowrap}
+67 -34
View File
@@ -22,26 +22,30 @@
.ui-table {
&:extend(.grid);
tbody td {
&:extend(.grid tbody td);
}
tbody {
cursor: pointer;
td {
&:extend(.grid tbody td);
}
}
.ui-table-form-section {
border-left: solid 3px @form-heading-bg;
border-radius: @border-radius-large !important;
padding-left: 10px;
}
}
.ui-table-plain {
&:extend(.grid);
&:extend(.ui-table all);
table-layout:fixed;
tbody td {
padding: 5px 0px 5px 0px !important;
border: none !important;
}
tbody {
cursor: auto !important;
td {
padding: 5px 0px 5px 0px !important;
border: none !important;
}
}
}
@@ -56,12 +60,6 @@
}
}
.ui-table-form-section {
border-left: solid 3px @form-heading-bg;
border-radius: 5px !important;
padding-left: 10px;
}
.ui-table-form-title-strong {
font-weight: bold;
}
@@ -92,7 +90,6 @@
.ui-button-icon {
&:extend(.icon-btn);
&:extend(.no-highlight);
margin-right: 5px;
height: auto !important;
ul {
i {
@@ -149,7 +146,7 @@
.ui-portlet {
&:extend(.no-highlight);
border: solid @form-border 1px;
.border-radius(@panel-border-radius);
border-radius: @border-radius-base;
position: relative;
clear: both;
@@ -163,19 +160,23 @@
overflow: visible;
float: right;
width:100%;
.portlet-title {
display: inline;
vertical-align: middle;
.portlet-title-text {
vertical-align: middle;
line-height: 20px;
line-height: 22px;
}
.icon {
font-size: 1.2em;
vertical-align: middle;
}
}
.portlet-operations {
.ui-button-icon {
margin-left: 5px;
}
}
}
.portlet-buttons {
@@ -189,7 +190,7 @@
clear: both;
.content {
padding : 10px;
padding : 0px;
height : 100%;
width : 100%;
@@ -201,42 +202,74 @@
}
}
.ui-portlet-slim {
&:extend(.ui-portlet all);
max-width: 900px;
}
.ui-portlet-repeat {
&:extend(.ui-portlet);
border: none;
border-left: solid 3px @form-heading-bg;
border-radius: 5px;
border-radius: @border-radius-large;
.portlet-header {
background: @form-heading-bg;
border-radius: 3px;
border-radius: @border-radius-large;
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
padding: 0px 2px;
.portlet-title-text {
vertical-align: middle;
line-height: 20px !important;
}
}
.portlet-content {
padding: 0px;
.content {
padding : 0px;
padding-left: 10px;
}
padding-left: 10px;
}
}
.ui-portlet-section {
&:extend(.ui-portlet-repeat all);
border-left: solid 3px @side-panel-bg;
border-radius: 5px;
.portlet-header {
background: @side-panel-bg;
border-bottom: solid darken(@side-panel-bg, 10%) 1px;
}
}
.ui-portlet-narrow {
&:extend(.ui-portlet-limited all);
border: none;
.portlet-header {
border-radius: @border-radius-base;
margin-bottom: 5px;
.portlet-operations {
.ui-button-icon {
margin-left: 3px;
}
}
}
.portlet-content {
padding: 0px;
}
.ui-table-form-section {
padding-left: 5px;
}
.ui-portlet-repeat {
.portlet-header {
border-radius: @border-radius-large;
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
margin-bottom: 0px;
}
.portlet-content {
padding: 0px;
padding-left: 5px;
}
}
}
.ui-portlet-limited {
&:extend(.ui-portlet all);
max-width: 900px;
}
.ui-popover {
max-width: 700px;
display: none;