Repository: ambari Updated Branches: refs/heads/trunk f95a23cf4 -> a6b1217e4
AMBARI-6268. step 6 pagination is slow (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a6b1217e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a6b1217e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a6b1217e Branch: refs/heads/trunk Commit: a6b1217e42f8bd6025f8b4ba3d77c9207a105749 Parents: f95a23c Author: Alex Antonenko <[email protected]> Authored: Wed Jun 25 19:26:05 2014 +0300 Committer: Alex Antonenko <[email protected]> Committed: Wed Jun 25 19:26:05 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/templates/wizard/step6.hbs | 4 +-- ambari-web/app/views/wizard/step6_view.js | 36 +++++--------------------- 2 files changed, 7 insertions(+), 33 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a6b1217e/ambari-web/app/templates/wizard/step6.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step6.hbs b/ambari-web/app/templates/wizard/step6.hbs index 821054f..10ce12a 100644 --- a/ambari-web/app/templates/wizard/step6.hbs +++ b/ambari-web/app/templates/wizard/step6.hbs @@ -52,9 +52,7 @@ {{#each checkbox in host.checkboxes}} <td> <label class="checkbox"> - {{#view view.checkboxView checkboxBinding="checkbox"}} - {{checkbox.title}} - {{/view}} + <input {{bindAttr checked = "checkbox.checked" disabled="checkbox.isInstalled"}} {{action "checkboxClick" checkbox target="view" }} type="checkbox"/>{{checkbox.title}} </label> </td> {{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/a6b1217e/ambari-web/app/views/wizard/step6_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step6_view.js b/ambari-web/app/views/wizard/step6_view.js index f5f8d73..39c37aa 100644 --- a/ambari-web/app/views/wizard/step6_view.js +++ b/ambari-web/app/views/wizard/step6_view.js @@ -91,35 +91,11 @@ App.WizardStep6View = App.TableView.extend({ this.set('label', label); }, - /** - * Binding host property with dynamic name - * @type {Ember.Checkbox} - */ - checkboxView: Em.Checkbox.extend({ - - /** - * Header object with host property name - * @type {object} - */ - checkbox: null, - - //if setAll true there is no need to check every checkbox whether all checked or not - - checkedBinding: 'checkbox.checked', - - disabledBinding: 'checkbox.isInstalled', - - /** - * Click-handler on checkbox - * @method click - */ - click: function () { - if ($.browser.mozilla) { - this.toggleProperty('checkbox.checked'); - } - this.get('controller').checkCallback(this.get('checkbox.component')); - } - }) + checkboxClick: function(e) { + var checkbox = e.context; + checkbox.toggleProperty('checked'); + this.get('controller').checkCallback(checkbox.component); + } }); App.WizardStep6HostView = Em.View.extend({ @@ -153,4 +129,4 @@ App.WizardStep6HostView = Em.View.extend({ }); } } -}); \ No newline at end of file +});
