Repository: ambari
Updated Branches:
  refs/heads/trunk dcbd2c07c -> c3f87d413


http://git-wip-us.apache.org/repos/asf/ambari/blob/c3f87d41/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js 
b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
index 83950e6..ebcd423 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
@@ -305,7 +305,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
    * @param App.RepositoryVersion
    * */
   getStackVersionNumber: function(repository){
-    var stackVersion = null; 
+    var stackVersion = null;
     var systems = repository.get('operatingSystems');
 
     systems.forEach(function (os) {
@@ -316,7 +316,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
       });
     });
 
-    return stackVersion; 
+    return stackVersion;
   },
 
   /**
@@ -360,10 +360,11 @@ App.UpgradeVersionBoxView = Em.View.extend({
       serverValidationFailed: false,
       bodyClass: Ember.View.extend({
         content: repo,
-        skipCheckBox: Ember.Checkbox.extend({
-          classNames: ["align-checkbox"],
+        skipCheckBox: App.CheckboxView.extend({
+          repoBinding: 'parentView.content',
+          checkboxClassNames: ["align-checkbox"],
           change: function() {
-            
this.get('parentView.content.operatingSystems').forEach(function(os) {
+            this.get('parentView.repo').forEach(function(os) {
               os.get('repositories').forEach(function(repo) {
                 repo.set('skipValidation', this.get('checked'));
               }, this);

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3f87d41/ambari-web/app/views/wizard/step1_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step1_view.js 
b/ambari-web/app/views/wizard/step1_view.js
index 04cd28f..dc313dd 100644
--- a/ambari-web/app/views/wizard/step1_view.js
+++ b/ambari-web/app/views/wizard/step1_view.js
@@ -92,18 +92,15 @@ App.WizardStep1View = Em.View.extend({
   },
 
   /**
-   * Checkbox for use Public repo
+   * Radio button for use Public repo
    *
-   * @type {Ember.Checkbox}
+   * @type {App.RadioButtonView}
    */
-  usePublicRepoRadioButton: Em.Checkbox.extend({
-    tagName: 'input',
-    attributeBindings: [ 'type', 'checked' ],
-    classNames: [''],
+  usePublicRepoRadioButton: App.RadioButtonView.extend({
+    labelTranslate: 'installer.step1.selectUseRepoOptions.public',
     checked: Em.computed.alias('controller.selectedStack.usePublicRepo'),
-    type: 'radio',
 
-    click: function () {
+    change: function () {
       this.get('controller').usePublicRepo();
     }
   }),
@@ -111,16 +108,13 @@ App.WizardStep1View = Em.View.extend({
   /**
    * Checkbox for use Public repo
    *
-   * @type {Ember.Checkbox}
+   * @type {App.RadioButtonView}
    */
-  useLocalRepoRadioButton: Em.Checkbox.extend({
-    tagName: 'input',
-    attributeBindings: [ 'type', 'checked' ],
-    classNames: [''],
+  useLocalRepoRadioButton: App.RadioButtonView.extend({
+    labelTranslate: 'installer.step1.selectUseRepoOptions.local',
     checked: Em.computed.alias('controller.selectedStack.useLocalRepo'),
-    type: 'radio',
 
-    click: function () {
+    change: function () {
       this.get('controller').useLocalRepo();
     }
   }),
@@ -217,12 +211,12 @@ App.WizardStep1View = Em.View.extend({
   /**
    * @type {Em.Checkbox}
    */
-  redhatCheckBoxView: Em.Checkbox.extend({
-    attributeBindings: [ 'type', 'checked' ],
+  redhatCheckBoxView: App.CheckboxView.extend({
     checkedBinding: 'controller.selectedStack.useRedhatSatellite',
     disabledBinding: 'controller.selectedStack.usePublicRepo',
     click: function () {
       // click triggered before value is toggled, so if-statement is inverted
+      if (this.get('disabled')) return;
       if (!this.get('controller.selectedStack.useRedhatSatellite')) {
         App.ModalPopup.show({
           header: Em.I18n.t('common.important'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3f87d41/ambari-web/app/views/wizard/step2_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step2_view.js 
b/ambari-web/app/views/wizard/step2_view.js
index 1988f4e..719227d 100644
--- a/ambari-web/app/views/wizard/step2_view.js
+++ b/ambari-web/app/views/wizard/step2_view.js
@@ -74,22 +74,15 @@ App.WizardStep2View = Em.View.extend({
   }.property(),
 
   /**
-   * Checkbox for activate SSH fields
-   * @type {Ember.Checkbox}
+   * Radio button for activate SSH fields
+   * @type {App.RadioButtonView}
    * TODO: replace next 2 properties with new one used in both places
    */
-  providingSSHKeyRadioButton: Em.Checkbox.extend({
-
-    tagName: 'input',
-
-    attributeBindings: ['type', 'checked'],
-
-    classNames: ['radio-btn-provide-ssh-key'],
-
+  providingSSHKeyRadioButton: App.RadioButtonView.extend({
+    classNames: ['radio'],
+    checkboxClassNames: ['radio-btn-provide-ssh-key'],
     checked: Em.computed.alias('controller.content.installOptions.useSsh'),
 
-    type: 'radio',
-
     click: function () {
       this.set('controller.content.installOptions.useSsh', true);
       this.set('controller.content.installOptions.manualInstall', false);
@@ -97,18 +90,12 @@ App.WizardStep2View = Em.View.extend({
   }),
 
   /**
-   * Checkbox for manual registration
-   * @type {Ember.Checkbox}
+   * Radio button for manual registration
+   * @type {App.RadioButtonView}
    */
-  manualRegistrationRadioButton: Em.Checkbox.extend({
-    tagName: 'input',
-
-    attributeBindings: ['type', 'checked'],
-
-    classNames: ['radio-btn-manual-reg'],
-
-    type: 'radio',
-
+  manualRegistrationRadioButton: App.RadioButtonView.extend({
+    classNames: ['radio'],
+    checkboxClassNames: ['radio-btn-manual-reg'],
     checked: 
Em.computed.alias('controller.content.installOptions.manualInstall'),
 
     click: function () {
@@ -131,5 +118,3 @@ App.WizardStep2View = Em.View.extend({
   })
 
 });
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3f87d41/ambari-web/brunch-config.js
----------------------------------------------------------------------
diff --git a/ambari-web/brunch-config.js b/ambari-web/brunch-config.js
index feb4828..27a6057 100644
--- a/ambari-web/brunch-config.js
+++ b/ambari-web/brunch-config.js
@@ -50,7 +50,6 @@ module.exports.config = {
           'vendor/scripts/ember-i18n-1.4.1.js',
           'vendor/scripts/bootstrap.js',
           'vendor/scripts/bootstrap-combobox.js',
-          'vendor/scripts/bootstrap-checkbox.js',
           'vendor/scripts/bootstrap-slider.min.js',
           'vendor/scripts/bootstrap-switch.min.js',
           'vendor/scripts/d3.v2.js',
@@ -100,7 +99,6 @@ module.exports.config = {
           'vendor/styles/cubism.css',
           'vendor/styles/rickshaw.css',
           'vendor/styles/bootstrap-combobox.css',
-          'vendor/styles/bootstrap-checkbox.css',
           'vendor/styles/bootstrap-slider.min.css',
           'vendor/styles/bootstrap-switch.min.css',
           'vendor/styles/diffview.css',
@@ -132,4 +130,4 @@ module.exports.config = {
   },
 
   sourceMaps: false
-};
\ No newline at end of file
+};

Reply via email to