Ui: Revise portlet margins

This commit is contained in:
Aysam Guerler
2015-02-06 11:05:23 -05:00
parent 2fed958e86
commit 836b3bb913
27 changed files with 167 additions and 179 deletions
@@ -306,7 +306,7 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc',
});
// append message
this.portlet.append(this.message.$el, true);
this.portlet.append(this.message.$el);
// append tool section
this.portlet.append(this.section.$el);
@@ -44,7 +44,7 @@ var View = Backbone.View.extend({
this.$el.append(this.table.$el);
// add button
this.$el.append(Utils.wrap(this.button_new.$el));
this.$el.append($('<div/>').append(this.button_new.$el));
// clear list
this.list = {};
@@ -139,7 +139,7 @@ define(['utils/utils', 'mvc/ui/ui-table', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet',
});
// displays as grouped subsection
sub_section.$el.addClass('ui-table-form-section');
sub_section.$el.addClass('ui-table-section');
// create table row
this.table.add(sub_section.$el);
@@ -110,7 +110,7 @@ var View = Backbone.View.extend({
// add elements to dom
if (_.size(this.list) > 1) {
this.$el.append(Utils.wrap(this.button_type.$el));
this.$el.append(this.button_type.$el.addClass('ui-bottom-margin'));
}
for (var i in this.list) {
this.$el.append(this.list[i].field.$el);
+2 -6
View File
@@ -84,12 +84,8 @@ var View = Backbone.View.extend({
},
// append
append: function($el, unwrapped) {
if (unwrapped) {
this.$content.append($el);
} else {
this.$content.append(Utils.wrap($el));
}
append: function($el) {
this.$content.append($el);
},
// content
-11
View File
@@ -218,16 +218,6 @@ function uuid(){
return 'x' + Math.random().toString(36).substring(2, 9);
};
/**
* Wrap an dom element into a paragraph
* @param{Element} $el - DOM element to be wrapped
*/
function wrap($el) {
var wrapper = $('<p></p>');
wrapper.append($el);
return wrapper;
};
/**
* Create a time stamp
*/
@@ -256,7 +246,6 @@ return {
bytesToString: bytesToString,
uuid: uuid,
time: time,
wrap: wrap,
request: request,
sanitize: sanitize,
textify: textify,
@@ -58,7 +58,7 @@
.charts-viewport .info {
position: absolute;
margin: 10px 20px 50px 10px;
margin: 20px 20px 50px 10px;
}
.charts-viewport .text {
File diff suppressed because one or more lines are too long
@@ -32,9 +32,9 @@ var View = Backbone.View.extend({
// create element
var $view = $('<div class="ui-table-form"/>');
if (this.options.title) {
$view.append(Utils.wrap(this.table_title.$el));
$view.append(this.table_title.$el);
}
$view.append(Utils.wrap(this.table.$el));
$view.append(this.table.$el);
// add element
this.setElement($view);
@@ -107,11 +107,10 @@ return Backbone.View.extend({
// append element
var $main = $('<div/>');
$main.append(Utils.wrap((new Ui.Label({ title : 'Provide a chart title:'})).$el));
$main.append((new Ui.Label({ title : 'Provide a chart title:'}).$el));
$main.append(this.title.$el);
$main.append($('<div/>').addClass('ui-table-form-info').html('This title will appear in the list of \'Saved Visualizations\'. Charts are saved upon creation.'));
$main.append(Utils.wrap());
$main.append(Utils.wrap(this.types.$el));
$main.append(this.types.$el.addClass('ui-top-margin'));
// add tab
this.tabs.add({
@@ -135,8 +134,8 @@ return Backbone.View.extend({
});
// append tabs
this.portlet.append(this.message.$el);
this.portlet.append(this.tabs.$el);
this.portlet.append(this.message.$el.addClass('ui-top-margin'));
this.portlet.append(this.tabs.$el.addClass('ui-top-margin'));
// elements
this.setElement(this.portlet.$el);
@@ -31,10 +31,10 @@ return Backbone.View.extend({
// create element
var $view = $('<div/>');
$view.append(Utils.wrap((new Ui.Label({title: 'Provide a label:'})).$el));
$view.append(Utils.wrap(this.group_key.$el));
$view.append(Utils.wrap((new Ui.Label({title: 'Select columns:'})).$el));
$view.append(Utils.wrap(this.table.$el));
$view.append((new Ui.Label({title: 'Provide a label:'})).$el);
$view.append(this.group_key.$el.addClass('ui-bottom-margin'));
$view.append((new Ui.Label({title: 'Select columns:'})).$el.addClass('ui-top-margin'));
$view.append(this.table.$el.addClass('ui-bottom-margin'));
// add element
this.setElement($view);
@@ -32,7 +32,7 @@ return Backbone.View.extend({
var $el = $('<div class="charts-grid"/>');
// add label
$el.append(Utils.wrap((new Ui.Label({ title : 'How many data points would you like to analyze?'})).$el));
$el.append((new Ui.Label({ title : 'How many data points would you like to analyze?'})).$el);
// construct chart type subset selection buttons
this.library = new Ui.RadioButton.View({
@@ -43,7 +43,7 @@ return Backbone.View.extend({
self._filter(value);
}
});
$el.append(Utils.wrap(this.library.$el));
$el.append(this.library.$el.addClass('ui-bottom-margin'));
// set element
this.setElement($el);
@@ -28,7 +28,7 @@ return Backbone.View.extend({
this.setElement($(this._template()));
// use full screen for viewer
this._fullscreen(this.$el, 90);
this._fullscreen(this.$el, 50);
// prevent window scrolling
var initial_overflow = $('body').css('overflow');
+1 -1
View File
@@ -306,7 +306,7 @@ define(['utils/utils', 'utils/deferred', 'mvc/ui/ui-portlet', 'mvc/ui/ui-misc',
});
// append message
this.portlet.append(this.message.$el, true);
this.portlet.append(this.message.$el);
// append tool section
this.portlet.append(this.section.$el);
+1 -1
View File
@@ -44,7 +44,7 @@ var View = Backbone.View.extend({
this.$el.append(this.table.$el);
// add button
this.$el.append(Utils.wrap(this.button_new.$el));
this.$el.append($('<div/>').append(this.button_new.$el));
// clear list
this.list = {};
+1 -1
View File
@@ -139,7 +139,7 @@ define(['utils/utils', 'mvc/ui/ui-table', 'mvc/ui/ui-misc', 'mvc/ui/ui-portlet',
});
// displays as grouped subsection
sub_section.$el.addClass('ui-table-form-section');
sub_section.$el.addClass('ui-table-section');
// create table row
this.table.add(sub_section.$el);
@@ -110,7 +110,7 @@ var View = Backbone.View.extend({
// add elements to dom
if (_.size(this.list) > 1) {
this.$el.append(Utils.wrap(this.button_type.$el));
this.$el.append(this.button_type.$el.addClass('ui-bottom-margin'));
}
for (var i in this.list) {
this.$el.append(this.list[i].field.$el);
+2 -6
View File
@@ -84,12 +84,8 @@ var View = Backbone.View.extend({
},
// append
append: function($el, unwrapped) {
if (unwrapped) {
this.$content.append($el);
} else {
this.$content.append(Utils.wrap($el));
}
append: function($el) {
this.$content.append($el);
},
// content
@@ -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,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})}}})});
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);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/ui/ui-table","mvc/ui/ui-portlet","mvc/ui/ui-misc"],function(c,a,b,e){var d=Backbone.View.extend({optionsDefault:{max:null},initialize:function(g){this.options=c.merge(g,this.optionsDefault);this.setElement("<div/>");var f=this;this.button_new=new e.ButtonIcon({icon:"fa-plus",title:"Insert "+g.title_new,tooltip:"Add new "+g.title_new+" block",floating:"clear",onclick:function(){if(g.onnew){g.onnew()}}});this.table=new a.View({cls:"ui-table-plain",content:""});this.$el.append(this.table.$el);this.$el.append(c.wrap(this.button_new.$el));this.list={}},size:function(){return _.size(this.list)},add:function(g){var f=new e.ButtonIcon({icon:"fa-trash-o",tooltip:"Delete this repeat block",cls:"ui-button-icon-plain",onclick:function(){if(g.ondel){g.ondel()}}});var h=new b.View({id:g.id,title:"<b>"+g.title+"</b>",cls:"ui-portlet-repeat",operations:{button_delete:f}});if(!g.ondel){f.remove()}h.append(g.$el);h.$el.addClass("section-row");this.list[g.id]=h;this.table.add(h.$el);this.table.append("row_"+g.id,true);if(this.options.max>0&&this.size()>=this.options.max){this.button_new.disable()}},del:function(g){if(this.list[g]){var f=this.table.get("row_"+g);f.remove();delete this.list[g];this.button_new.enable()}},retitle:function(g){var f=0;for(var h in this.list){this.list[h].title(++f+": "+g)}}});return{View:d}});
define(["utils/utils","mvc/ui/ui-table","mvc/ui/ui-portlet","mvc/ui/ui-misc"],function(c,a,b,e){var d=Backbone.View.extend({optionsDefault:{max:null},initialize:function(g){this.options=c.merge(g,this.optionsDefault);this.setElement("<div/>");var f=this;this.button_new=new e.ButtonIcon({icon:"fa-plus",title:"Insert "+g.title_new,tooltip:"Add new "+g.title_new+" block",floating:"clear",onclick:function(){if(g.onnew){g.onnew()}}});this.table=new a.View({cls:"ui-table-plain",content:""});this.$el.append(this.table.$el);this.$el.append($("<div/>").append(this.button_new.$el));this.list={}},size:function(){return _.size(this.list)},add:function(g){var f=new e.ButtonIcon({icon:"fa-trash-o",tooltip:"Delete this repeat block",cls:"ui-button-icon-plain",onclick:function(){if(g.ondel){g.ondel()}}});var h=new b.View({id:g.id,title:"<b>"+g.title+"</b>",cls:"ui-portlet-repeat",operations:{button_delete:f}});if(!g.ondel){f.remove()}h.append(g.$el);h.$el.addClass("section-row");this.list[g.id]=h;this.table.add(h.$el);this.table.append("row_"+g.id,true);if(this.options.max>0&&this.size()>=this.options.max){this.button_new.disable()}},del:function(g){if(this.list[g]){var f=this.table.get("row_"+g);f.remove();delete this.list[g];this.button_new.enable()}},retitle:function(g){var f=0;for(var h in this.list){this.list[h].title(++f+": "+g)}}});return{View:d}});
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(l,g){this.app=l;this.options=g;var f=this;this.setElement("<div/>");this.list={};var j=[];if(g.type=="data_collection"){this.mode="collection"}else{if(g.multiple){this.mode="multiple"}else{this.mode="single"}}this.current=this.mode;this.list={};var k=c.textify(g.extensions);var n="No dataset available.";if(k){n="No "+k+" dataset available."}var m="No dataset list available.";if(k){m="No "+k+" dataset collection available."}if(this.mode=="single"){j.push({icon:"fa-file-o",label:"Single dataset",value:"single"});this.select_single=new e.Select.View({optional:g.optional,error_text:n,onchange:function(){f.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"){j.push({icon:"fa-files-o",label:"Multiple datasets",value:"multiple"});this.select_multiple=new e.Select.View({multiple:true,error_text:n,onchange:function(){f.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"}}if(this.mode=="single"||this.mode=="collection"){j.push({icon:"fa-folder-o",label:"Dataset collection",value:"collection"});this.select_collection=new e.Select.View({error_text:m,optional:g.optional,onchange:function(){f.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"}}this.button_type=new e.RadioButton.View({value:this.current,data:j,onchange:function(i){f.current=i;f.refresh();f.trigger("change")}});this.$batch=$(a.batchMode());if(_.size(this.list)>1){this.$el.append(c.wrap(this.button_type.$el))}for(var h in this.list){this.$el.append(this.list[h].field.$el)}this.$el.append(this.$batch);this.update(g.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(g.onchange){g.onchange(f.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){var l=[];for(var j in g.hda){var k=g.hda[j];l.push({label:k.hid+": "+k.name,value:k.id})}var f=[];for(var j in g.hdca){var h=g.hdca[j];f.push({label:h.hid+": "+h.name,value:h.id})}this.select_single&&this.select_single.update(l);this.select_multiple&&this.select_multiple.update(l);this.select_collection&&this.select_collection.update(f);this.app.content.add(g)},value:function(h){if(h!==undefined){if(h&&h.values){try{var l=[];for(var g in h.values){l.push(h.values[g].id)}if(h&&h.values.length>0&&h.values[0].src=="hcda"){this.current="collection";this.select_collection.value(l[0])}else{if(this.mode=="multiple"){this.current="multiple";this.select_multiple.value(l)}else{this.current="single";this.select_single.value(l[0])}}}catch(k){console.debug("tools-select-content::value() - Skipped.")}}else{this.select_single&&this.select_single.value("__null__");this.select_multiple&&this.select_multiple.value("__null__");this.select_collection&&this.select_collection.value("__null__")}this.refresh()}var j=this._select().value();if(!(j instanceof Array)){j=[j]}var f={batch:this.mode=="single"&&this.current!="single",values:[]};for(var g in j){f.values.push({id:j[g],src:this.list[this.current].type})}return f},validate:function(){return this._select().validate()},refresh:function(){this.button_type.value(this.current);for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this.mode=="single"&&this.current!="single"){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field}});return{View:d}});
define(["utils/utils","mvc/ui/ui-misc","mvc/ui/ui-tabs","mvc/tools/tools-template"],function(c,e,b,a){var d=Backbone.View.extend({initialize:function(l,g){this.app=l;this.options=g;var f=this;this.setElement("<div/>");this.list={};var j=[];if(g.type=="data_collection"){this.mode="collection"}else{if(g.multiple){this.mode="multiple"}else{this.mode="single"}}this.current=this.mode;this.list={};var k=c.textify(g.extensions);var n="No dataset available.";if(k){n="No "+k+" dataset available."}var m="No dataset list available.";if(k){m="No "+k+" dataset collection available."}if(this.mode=="single"){j.push({icon:"fa-file-o",label:"Single dataset",value:"single"});this.select_single=new e.Select.View({optional:g.optional,error_text:n,onchange:function(){f.trigger("change")}});this.list.single={field:this.select_single,type:"hda"}}if(this.mode=="single"||this.mode=="multiple"){j.push({icon:"fa-files-o",label:"Multiple datasets",value:"multiple"});this.select_multiple=new e.Select.View({multiple:true,error_text:n,onchange:function(){f.trigger("change")}});this.list.multiple={field:this.select_multiple,type:"hda"}}if(this.mode=="single"||this.mode=="collection"){j.push({icon:"fa-folder-o",label:"Dataset collection",value:"collection"});this.select_collection=new e.Select.View({error_text:m,optional:g.optional,onchange:function(){f.trigger("change")}});this.list.collection={field:this.select_collection,type:"hdca"}}this.button_type=new e.RadioButton.View({value:this.current,data:j,onchange:function(i){f.current=i;f.refresh();f.trigger("change")}});this.$batch=$(a.batchMode());if(_.size(this.list)>1){this.$el.append(this.button_type.$el.addClass("ui-bottom-margin"))}for(var h in this.list){this.$el.append(this.list[h].field.$el)}this.$el.append(this.$batch);this.update(g.data);if(this.options.value!==undefined){this.value(this.options.value)}this.refresh();this.on("change",function(){if(g.onchange){g.onchange(f.value())}})},wait:function(){for(var f in this.list){this.list[f].field.wait()}},unwait:function(){for(var f in this.list){this.list[f].field.unwait()}},update:function(g){var l=[];for(var j in g.hda){var k=g.hda[j];l.push({label:k.hid+": "+k.name,value:k.id})}var f=[];for(var j in g.hdca){var h=g.hdca[j];f.push({label:h.hid+": "+h.name,value:h.id})}this.select_single&&this.select_single.update(l);this.select_multiple&&this.select_multiple.update(l);this.select_collection&&this.select_collection.update(f);this.app.content.add(g)},value:function(h){if(h!==undefined){if(h&&h.values){try{var l=[];for(var g in h.values){l.push(h.values[g].id)}if(h&&h.values.length>0&&h.values[0].src=="hcda"){this.current="collection";this.select_collection.value(l[0])}else{if(this.mode=="multiple"){this.current="multiple";this.select_multiple.value(l)}else{this.current="single";this.select_single.value(l[0])}}}catch(k){console.debug("tools-select-content::value() - Skipped.")}}else{this.select_single&&this.select_single.value("__null__");this.select_multiple&&this.select_multiple.value("__null__");this.select_collection&&this.select_collection.value("__null__")}this.refresh()}var j=this._select().value();if(!(j instanceof Array)){j=[j]}var f={batch:this.mode=="single"&&this.current!="single",values:[]};for(var g in j){f.values.push({id:j[g],src:this.list[this.current].type})}return f},validate:function(){return this._select().validate()},refresh:function(){this.button_type.value(this.current);for(var g in this.list){var f=this.list[g].field.$el;if(this.current==g){f.show()}else{f.hide()}}if(this.mode=="single"&&this.current!="single"){this.$batch.show()}else{this.$batch.hide()}},_select:function(){return this.list[this.current].field}});return{View:d}});
+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(".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}});
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(c){this.$content.append(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 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}});
+1 -1
View File
@@ -1 +1 @@
define(["libs/underscore"],function(m){function n(r,q){for(var o in r){var p=r[o];if(p&&typeof(p)=="object"){q(p);n(p,q)}}}function d(o){return $("<div/>").text(o).html()}function l(p){if(!(p instanceof Array)){p=[p]}for(var o in p){if(["__null__","__undefined__","None",null,undefined].indexOf(p[o])>-1){return false}}return true}function h(o){var o=o.toString();if(o){o=o.replace(/,/g,", ");var p=o.lastIndexOf(", ");if(p!=-1){o=o.substr(0,p)+" or "+o.substr(p+1)}return o}return""}function e(o){top.__utils__get__=top.__utils__get__||{};if(o.cache&&top.__utils__get__[o.url]){o.success&&o.success(top.__utils__get__[o.url]);console.debug("utils.js::get() - Fetching from cache ["+o.url+"].")}else{i({url:o.url,data:o.data,success:function(p){top.__utils__get__[o.url]=p;o.success&&o.success(p)},error:function(p){o.error&&o.error(p)}})}}function i(p){var o={contentType:"application/json",type:p.type||"GET",data:p.data||{},url:p.url};if(o.type=="GET"||o.type=="DELETE"){if(o.url.indexOf("?")==-1){o.url+="?"}else{o.url+="&"}o.url=o.url+$.param(o.data,true);o.data=null}else{o.dataType="json";o.url=o.url;o.data=JSON.stringify(o.data)}$.ajax(o).done(function(q){if(typeof q==="string"){try{q=q.replace("Infinity,",'"Infinity",');q=jQuery.parseJSON(q)}catch(r){console.debug(r)}}p.success&&p.success(q)}).fail(function(r){var q=null;try{q=jQuery.parseJSON(r.responseText)}catch(s){q=r.responseText}p.error&&p.error(q,r)})}function j(r,o){var p=$('<div class="'+r+'"></div>');p.appendTo(":eq(0)");var q=p.css(o);p.remove();return q}function g(o){if(!$('link[href^="'+o+'"]').length){$('<link href="'+galaxy_config.root+o+'" rel="stylesheet">').appendTo("head")}}function k(o,p){if(o){return m.defaults(o,p)}else{return p}}function b(p,r){var q="";if(p>=100000000000){p=p/100000000000;q="TB"}else{if(p>=100000000){p=p/100000000;q="GB"}else{if(p>=100000){p=p/100000;q="MB"}else{if(p>=100){p=p/100;q="KB"}else{if(p>0){p=p*10;q="b"}else{return"<strong>-</strong>"}}}}}var o=(Math.round(p)/10);if(r){return o+" "+q}else{return"<strong>"+o+"</strong> "+q}}function a(){return"x"+Math.random().toString(36).substring(2,9)}function c(o){var p=$("<p></p>");p.append(o);return p}function f(){var q=new Date();var o=(q.getHours()<10?"0":"")+q.getHours();var p=(q.getMinutes()<10?"0":"")+q.getMinutes();var r=q.getDate()+"/"+(q.getMonth()+1)+"/"+q.getFullYear()+", "+o+":"+p;return r}return{cssLoadFile:g,cssGetAttribute:j,get:e,merge:k,bytesToString:b,uuid:a,time:f,wrap:c,request:i,sanitize:d,textify:h,validate:l,deepeach:n}});
define(["libs/underscore"],function(l){function m(q,p){for(var n in q){var o=q[n];if(o&&typeof(o)=="object"){p(o);m(o,p)}}}function c(n){return $("<div/>").text(n).html()}function k(o){if(!(o instanceof Array)){o=[o]}for(var n in o){if(["__null__","__undefined__","None",null,undefined].indexOf(o[n])>-1){return false}}return true}function g(n){var n=n.toString();if(n){n=n.replace(/,/g,", ");var o=n.lastIndexOf(", ");if(o!=-1){n=n.substr(0,o)+" or "+n.substr(o+1)}return n}return""}function d(n){top.__utils__get__=top.__utils__get__||{};if(n.cache&&top.__utils__get__[n.url]){n.success&&n.success(top.__utils__get__[n.url]);console.debug("utils.js::get() - Fetching from cache ["+n.url+"].")}else{h({url:n.url,data:n.data,success:function(o){top.__utils__get__[n.url]=o;n.success&&n.success(o)},error:function(o){n.error&&n.error(o)}})}}function h(o){var n={contentType:"application/json",type:o.type||"GET",data:o.data||{},url:o.url};if(n.type=="GET"||n.type=="DELETE"){if(n.url.indexOf("?")==-1){n.url+="?"}else{n.url+="&"}n.url=n.url+$.param(n.data,true);n.data=null}else{n.dataType="json";n.url=n.url;n.data=JSON.stringify(n.data)}$.ajax(n).done(function(p){if(typeof p==="string"){try{p=p.replace("Infinity,",'"Infinity",');p=jQuery.parseJSON(p)}catch(q){console.debug(q)}}o.success&&o.success(p)}).fail(function(q){var p=null;try{p=jQuery.parseJSON(q.responseText)}catch(r){p=q.responseText}o.error&&o.error(p,q)})}function i(q,n){var o=$('<div class="'+q+'"></div>');o.appendTo(":eq(0)");var p=o.css(n);o.remove();return p}function f(n){if(!$('link[href^="'+n+'"]').length){$('<link href="'+galaxy_config.root+n+'" rel="stylesheet">').appendTo("head")}}function j(n,o){if(n){return l.defaults(n,o)}else{return o}}function b(o,q){var p="";if(o>=100000000000){o=o/100000000000;p="TB"}else{if(o>=100000000){o=o/100000000;p="GB"}else{if(o>=100000){o=o/100000;p="MB"}else{if(o>=100){o=o/100;p="KB"}else{if(o>0){o=o*10;p="b"}else{return"<strong>-</strong>"}}}}}var n=(Math.round(o)/10);if(q){return n+" "+p}else{return"<strong>"+n+"</strong> "+p}}function a(){return"x"+Math.random().toString(36).substring(2,9)}function e(){var p=new Date();var n=(p.getHours()<10?"0":"")+p.getHours();var o=(p.getMinutes()<10?"0":"")+p.getMinutes();var q=p.getDate()+"/"+(p.getMonth()+1)+"/"+p.getFullYear()+", "+n+":"+o;return q}return{cssLoadFile:f,cssGetAttribute:i,get:d,merge:j,bytesToString:b,uuid:a,time:e,request:h,sanitize:c,textify:g,validate:k,deepeach:m}});
-11
View File
@@ -218,16 +218,6 @@ function uuid(){
return 'x' + Math.random().toString(36).substring(2, 9);
};
/**
* Wrap an dom element into a paragraph
* @param{Element} $el - DOM element to be wrapped
*/
function wrap($el) {
var wrapper = $('<p></p>');
wrapper.append($el);
return wrapper;
};
/**
* Create a time stamp
*/
@@ -256,7 +246,6 @@ return {
bytesToString: bytesToString,
uuid: uuid,
time: time,
wrap: wrap,
request: request,
sanitize: sanitize,
textify: textify,
+19 -18
View File
@@ -1396,18 +1396,11 @@ label{font-weight:normal}
.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-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-top-margin,.ui-both-margin{padding-top:5px !important}
.ui-bottom-margin,.ui-both-margin{margin-bottom:5px !important}
.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,.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-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-message{padding:2px 10px 2px 10px;margin:0px}
.ui-icon{font-size:1.2em}
.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}
@@ -1417,19 +1410,27 @@ 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-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}.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-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}
.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 .portlet-content,.ui-portlet-limited .portlet-content,.ui-portlet-narrow .portlet-content{height:inherit;padding-left:10px;padding-right: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 .buttons,.ui-portlet-limited .portlet-content .buttons,.ui-portlet-narrow .portlet-content .buttons{margin-top:5px;margin-bottom:5px}
.ui-portlet-repeat,.ui-portlet-section,.ui-portlet-section{border:none;border-left:solid 3px #ebd9b2;border-radius:5px;margin-bottom: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-right:0px}
.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{border:none}.ui-portlet-narrow .portlet-header{border-radius:3px}.ui-portlet-narrow .portlet-header .portlet-operations .ui-button-icon{margin-left:3px}
.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}
.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-narrow .ui-table-section,.ui-portlet-narrow .ui-portlet-repeat .portlet-content,.ui-portlet-narrow .ui-portlet-section .portlet-content{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}
+115 -97
View File
@@ -1,3 +1,4 @@
// prevents highlighting i.e. text selection on double click
.no-highlight {
-webkit-user-select: none; /* webkit (safari, chrome) browsers */
-moz-user-select: none; /* mozilla browsers */
@@ -5,73 +6,30 @@
-ms-user-select: none; /* IE10+ */
}
// default margins
@ui-margin-vertical: 5px;
@ui-margin-horizontal: 5px;
// margins
.ui-top-margin {
padding-top: @ui-margin-vertical !important;
}
.ui-bottom-margin {
margin-bottom: @ui-margin-vertical !important;
}
.ui-both-margin {
&:extend(.ui-top-margin);
&:extend(.ui-bottom-margin);
}
// non-interactive elements
.ui-error {
-moz-border-radius: @border-radius-base;
border-radius: @border-radius-base;
background: @state-danger-bg;
padding: 5px;
}
.ui-table-form-error {
display: none;
.ui-table-form-error-text {
padding-left: 5px;
}
}
.ui-table {
&:extend(.grid);
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(.ui-table all);
table-layout:fixed;
tbody {
cursor: auto !important;
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-field {
margin-top: 5px;
}
}
.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;
padding: @ui-margin-vertical;
}
.ui-label {
@@ -80,25 +38,26 @@
.ui-message {
padding: 2px 10px 2px 10px;
margin-bottom: 5px;
margin: 0px;
}
.ui-icon {
font-size: 1.2em;
}
// buttons
.ui-button-icon {
&:extend(.icon-btn);
&:extend(.no-highlight);
height: auto !important;
ul {
i {
font-size: 1.2em; margin-right: 5px; position: relative; top: 1px;
font-size: 1.2em; margin-right: @ui-margin-horizontal; position: relative; top: 1px;
}
}
.button {
margin-right: 5px;
margin-left: 5px;
margin-right: @ui-margin-horizontal;
margin-left: @ui-margin-horizontal;
.title {
position: relative;
@@ -130,19 +89,88 @@
padding-right: 3px !important;
}
// tabs
.ui-tabs {
.ui-tabs-add {
font-size : 0.8em;
margin-right : 5px;
margin-right : @ui-margin-horizontal;
}
.ui-tabs-delete {
font-size : 0.8em;
margin-left : 5px;
margin-left : @ui-margin-horizontal;
cursor : pointer;
}
}
// tables
.ui-table {
&:extend(.grid);
tbody {
cursor: pointer;
td {
&:extend(.grid tbody td);
}
}
}
.ui-table-plain {
&:extend(.ui-table all);
table-layout:fixed;
tbody {
cursor: auto !important;
td {
padding: 0px !important;
border: none !important;
}
}
.ui-table-section {
border-left: solid 3px @form-heading-bg;
border-radius: @border-radius-large !important;
margin-bottom: @ui-margin-vertical;
padding-left: 10px;
}
}
// table form elements
.ui-table-form-element {
.ui-table-form-title-optional {
font-weight: bold;
text-decoration: underline;
cursor: pointer;
}
.ui-table-form-field {
margin-top: @ui-margin-vertical;
}
margin-top: @ui-margin-vertical;
margin-bottom: @ui-margin-vertical;
}
.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;
}
.ui-table-form-error {
display: none;
.ui-table-form-error-text {
padding-left: @ui-margin-horizontal;
}
}
// portlets
.ui-portlet {
&:extend(.no-highlight);
border: solid @form-border 1px;
@@ -174,30 +202,24 @@
}
.portlet-operations {
.ui-button-icon {
margin-left: 5px;
margin-left: @ui-margin-horizontal;
}
}
}
.portlet-buttons {
height: 50px;
padding: 10px;
}
.portlet-content {
height: inherit;
padding: 10px;
padding-left: 10px;
padding-right: 10px;
clear: both;
.content {
padding : 0px;
height : 100%;
width : 100%;
.buttons {
height: 50px;
padding: 10px;
}
}
.buttons {
margin-top: @ui-margin-vertical;
margin-bottom: @ui-margin-vertical;
}
}
}
@@ -207,6 +229,7 @@
border: none;
border-left: solid 3px @form-heading-bg;
border-radius: @border-radius-large;
margin-bottom: @ui-margin-vertical;
.portlet-header {
background: @form-heading-bg;
border-radius: @border-radius-large;
@@ -218,9 +241,8 @@
line-height: 20px !important;
}
}
.portlet-content {
padding-left: 10px;
padding-right: 0px;
}
}
@@ -238,31 +260,25 @@
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;
}
}
.portlet-content {
padding: 0px;
}
.ui-table-section, .ui-portlet-repeat .portlet-content {
padding-left: @ui-margin-horizontal;
}
}
.ui-portlet-limited {
@@ -270,6 +286,7 @@
max-width: 900px;
}
// popovers
.ui-popover {
max-width: 700px;
display: none;
@@ -287,6 +304,7 @@
}
}
// input elements
.ui-input {
&:extend(.form-control);
background: transparent;
@@ -328,7 +346,7 @@
}
i {
padding-right: 5px;
padding-right: @ui-margin-horizontal;
}
}