Repository: ambari Updated Branches: refs/heads/branch-1.6.1 eab9aa7d0 -> 07a96f75f
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/07a96f75 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/07a96f75 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/07a96f75 Branch: refs/heads/branch-1.6.1 Commit: 07a96f75f66e1e915d40a03e39f0ec51c4cace6b Parents: eab9aa7 Author: Alex Antonenko <[email protected]> Authored: Wed Jun 25 19:04:18 2014 +0300 Committer: Alex Antonenko <[email protected]> Committed: Wed Jun 25 19:04:18 2014 +0300 ---------------------------------------------------------------------- ambari-web/app/templates/wizard/step6.hbs | 4 +-- ambari-web/app/views/wizard/step6_view.js | 34 ++++---------------------- 2 files changed, 6 insertions(+), 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/07a96f75/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/07a96f75/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..474951e 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({
