diff --git a/web/app/ui/toolkit.js b/web/app/ui/toolkit.js index bd495ddc..a8e1c97f 100644 --- a/web/app/ui/toolkit.js +++ b/web/app/ui/toolkit.js @@ -21,20 +21,20 @@ TCAD.toolkit.Box.prototype.close = function() { }; TCAD.toolkit.Folder = function(title) { - this.root = $('
', {class: 'tc-folder'}); + this.root = $('
', {'class': 'tc-folder'}); this.content = $('
'); - this.root.append($('
', {text: title, class: 'tc-row tc-title'})); + this.root.append($('
', {text: title, 'class': 'tc-row tc-title'})); this.root.append(this.content); }; TCAD.toolkit.Button = function(title) { this.root = $('
', - {class: 'tc-row tc-ctrl tc-ctrl-btn', text: title}); + {'class': 'tc-row tc-ctrl tc-ctrl-btn', text: title}); }; TCAD.toolkit.CheckBox = function(title, checked) { this.root = $('
', - {class: 'tc-row tc-ctrl'}); + {'class': 'tc-row tc-ctrl'}); this.root.append('') this.input = this.root.find("input"); this.input.prop('checked', !!checked); @@ -43,7 +43,7 @@ TCAD.toolkit.CheckBox = function(title, checked) { TCAD.toolkit.InlineRadio = function(choiceLabels, choiceValues, checkedIndex) { var name = 'TCAD.toolkit.InlineRadio_' + (TCAD.toolkit.InlineRadio.COUNTER++) this.root = $('
', - {class: 'tc-row tc-ctrl tc-inline-radio'}); + {'class': 'tc-row tc-ctrl tc-inline-radio'}); this.inputs = []; for (var i = 0; i < choiceLabels.length; i++) { var checked = checkedIndex === i ? "checked" : ''; @@ -66,13 +66,13 @@ TCAD.toolkit.InlineRadio.prototype.getValue = function() { TCAD.toolkit.InlineRadio.COUNTER = 0; TCAD.toolkit.propLayout = function(root, name, valueEl) { - root.append($('', {class: 'tc-prop-name', text: name})) - .append($('
', {class: 'tc-prop-value'}) + root.append($('', {'class': 'tc-prop-name', text: name})) + .append($('
', {'class': 'tc-prop-value'}) .append(valueEl)); }; TCAD.toolkit.Number = function(name, initValue, baseStep, round) { - this.root = $('
', {class: 'tc-row tc-ctrl tc-ctrl-number'}); + this.root = $('
', {'class': 'tc-row tc-ctrl tc-ctrl-number'}); this.input = $(""); this.slide = false; baseStep = baseStep || 1; @@ -125,22 +125,22 @@ TCAD.toolkit.Number = function(name, initValue, baseStep, round) { }; TCAD.toolkit.Combo = function(id, label) { - this.root = $('
', {class: 'tc-row tc-ctrl tc-ctrl-combo'}); - var label = $('', {class: 'tc-prop-name', text: label}); + this.root = $('
', {'class': 'tc-row tc-ctrl tc-ctrl-combo'}); + var label = $('', {'class': 'tc-prop-name', text: label}); this.select = $('')); }; TCAD.toolkit.ButtonRow = function(captions, actions) { this.root = $('
', - {class: 'tc-row tc-ctrl tc-buttons-block'}); + {'class': 'tc-row tc-ctrl tc-buttons-block'}); function withAction(btn, action) { return btn.click(function(){ @@ -151,7 +151,7 @@ TCAD.toolkit.ButtonRow = function(captions, actions) { var caption = captions[i]; var btn = $('', { text: caption, - class: 'tc-buttons-block-item' + 'class': 'tc-buttons-block-item' }); withAction(btn, actions[i]); this.root.append(btn); @@ -159,12 +159,12 @@ TCAD.toolkit.ButtonRow = function(captions, actions) { }; TCAD.toolkit.List = function() { - this.root = $('
', {class: 'tc-tree'}); + this.root = $('
', {'class': 'tc-tree'}); }; TCAD.toolkit.List.prototype.addRow = function(name) { var row = $('
', { - text: name, class: 'tc-row tc-pseudo-btn', + text: name, 'class': 'tc-row tc-pseudo-btn', css: {'margin-left': '10px'} }); this.root.append(row); @@ -172,7 +172,7 @@ TCAD.toolkit.List.prototype.addRow = function(name) { }; TCAD.toolkit.Tree = function() { - this.root = $('
', {class: 'tc-tree'}); + this.root = $('
', {'class': 'tc-tree'}); }; TCAD.toolkit.Tree.prototype.set = function(data) { @@ -184,7 +184,7 @@ TCAD.toolkit.Tree.prototype._fill = function(data, level) { var notLeaf = data.children !== undefined && data.children.length !== 0; if (data.name !== undefined) { this.root.append($('
', { - text: data.name, class: 'tc-row' + (notLeaf ? ' tc-chevron-open' : ''), + text: data.name, 'class': 'tc-row' + (notLeaf ? ' tc-chevron-open' : ''), css: {'margin-left': level * (notLeaf ? 10 : 16) + 'px'} })); }