From 738b6b6c9da034105e9d2d5230f13ba51649f873 Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Tue, 19 Jul 2016 21:32:41 -0700 Subject: [PATCH] fix yui compiler errors --- web/app/app-init.js | 2 +- web/app/sketcher/main2d.js | 2 +- web/app/ui.js | 32 ++++++++++++++++---------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/web/app/app-init.js b/web/app/app-init.js index 93a8b7a0..05b493ff 100644 --- a/web/app/app-init.js +++ b/web/app/app-init.js @@ -97,7 +97,7 @@ function start() { function configureConstraintsFilter() { var constraintsCaption = constraintsView.node.find('.tool-caption'); var constraintsFilterBtn = TCAD.App2D.faBtn("filter"); - constraintsFilterBtn.css({float: 'right', 'margin-right': '10px', cursor: 'pointer'}); + constraintsFilterBtn.css({'float': 'right', 'margin-right': '10px', cursor: 'pointer'}); constraintsCaption.append(constraintsFilterBtn); var constraintsFilterWin = new TCAD.ui.Window($('#constrFilter'), app.winManager); TCAD.ui.bindOpening(constraintsFilterBtn, constraintsFilterWin); diff --git a/web/app/sketcher/main2d.js b/web/app/sketcher/main2d.js index 6ff656f9..fda19628 100644 --- a/web/app/sketcher/main2d.js +++ b/web/app/sketcher/main2d.js @@ -240,7 +240,7 @@ TCAD.App2D.bottomViews = [ ]; TCAD.App2D.faBtn = function(iconName) { - return $('', {class : 'fa fa-'+iconName}); + return $('', {'class' : 'fa fa-'+iconName}); }; TCAD.App2D.prototype.fit = function() { diff --git a/web/app/ui.js b/web/app/ui.js index 6dcb6638..a165553f 100644 --- a/web/app/ui.js +++ b/web/app/ui.js @@ -281,7 +281,7 @@ TCAD.ui.openWin = function(win, mouseEvent) { /** @constructor */ TCAD.ui.List = function(id, model) { - this.ul = $('
    ', { class : 'tlist', id : id}); + this.ul = $('
      ', { 'class' : 'tlist', id : id}); this.model = model; this.template = '
    • $name$
    • '; }; @@ -311,9 +311,9 @@ TCAD.ui.List.prototype.refresh = function() { }; TCAD.ui.dockBtn = function(name, icon) { - var btn = $('', {class: 'dock-btn'}); + var btn = $('', {'class': 'dock-btn'}); btn.append(TCAD.App2D.faBtn(icon)); - btn.append($('', {class: 'txt'}).text(name)); + btn.append($('', {'class': 'txt'}).text(name)); return btn; }; @@ -333,22 +333,22 @@ TCAD.ui.Dock = function(dockEl, switcherEl, viewDefinitions) { var viewDef = viewDefinitions[i]; var view = {}; this.views[viewDef.name] = view; - view.node = $('
      ', {class: 'dock-node'}); - var caption = $('
      ', {class: 'tool-caption'}); - caption.append($('', {class: 'txt'}).text(viewDef.name.toUpperCase())); + view.node = $('
      ', {'class': 'dock-node'}); + var caption = $('
      ', {'class': 'tool-caption'}); + caption.append($('', {'class': 'txt'}).text(viewDef.name.toUpperCase())); caption.append(TCAD.App2D.faBtn(viewDef.icon)); view.node.append(caption); view.node.hide(); this.dockEl.append(view.node); - view.switch = TCAD.ui.dockBtn(viewDef.name, viewDef.icon); - bindClick(this, view.switch, viewDef.name); - switcherEl.append(view.switch); + view.switchBtn = TCAD.ui.dockBtn(viewDef.name, viewDef.icon); + bindClick(this, view.switchBtn, viewDef.name); + switcherEl.append(view.switchBtn); } }; TCAD.ui.Dock.prototype.show = function(viewName) { var view = this.views[viewName]; - if (view.switch.hasClass('selected')) { + if (view.switchBtn.hasClass('selected')) { return; } if (!this.dockEl.is(":visible")) { @@ -356,16 +356,16 @@ TCAD.ui.Dock.prototype.show = function(viewName) { $('body').trigger('layout'); } view.node.show(); - view.switch.addClass('selected'); + view.switchBtn.addClass('selected'); }; TCAD.ui.Dock.prototype.hide = function(viewName) { var view = this.views[viewName]; - if (!view.switch.hasClass('selected')) { + if (!view.switchBtn.hasClass('selected')) { return; } view.node.hide(); - view.switch.removeClass('selected'); + view.switchBtn.removeClass('selected'); if (this.dockEl.find('.dock-node:visible').length == 0) { this.dockEl.hide(); $('body').trigger('layout'); @@ -373,7 +373,7 @@ TCAD.ui.Dock.prototype.hide = function(viewName) { }; TCAD.ui.Dock.prototype.isVisible = function(viewName) { - return this.views[viewName].switch.hasClass('selected'); + return this.views[viewName].switchBtn.hasClass('selected'); }; TCAD.ui._maskTest = function (mask, value) { @@ -393,10 +393,10 @@ TCAD.ui.Terminal = function(win, commandProcessor) { var command = input.val(); var out = win.root.find('.terminal-output'); input.val(''); - out.append($('
      ', {text: '> '+command, class: 'terminal-commandText'})); + out.append($('
      ', {text: '> '+command, 'class': 'terminal-commandText'})); if (command != null && command.trim().length != 0) { var result = commandProcessor(command); - out.append($('
      ', {text: result, class: 'terminal-commandResult'})); + out.append($('
      ', {text: result, 'class': 'terminal-commandResult'})); } out.parent().scrollTop(out.height()); }