wizard_menu_view.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. var App = require('app');
  19. App.WizardMenuMixin = Em.Mixin.create({
  20. isStepDisabled: function (index) {
  21. return this.get('controller.isStepDisabled').findProperty('step', index).get('value');
  22. },
  23. isStep0Disabled: function () {
  24. return this.isStepDisabled(0);
  25. }.property('controller.isStepDisabled.@each.value').cacheable(),
  26. isStep1Disabled: function () {
  27. return this.isStepDisabled(1);
  28. }.property('controller.isStepDisabled.@each.value').cacheable(),
  29. isStep2Disabled: function () {
  30. return this.isStepDisabled(2);
  31. }.property('controller.isStepDisabled.@each.value').cacheable(),
  32. isStep3Disabled: function () {
  33. return this.isStepDisabled(3);
  34. }.property('controller.isStepDisabled.@each.value').cacheable(),
  35. isStep4Disabled: function () {
  36. return this.isStepDisabled(4);
  37. }.property('controller.isStepDisabled.@each.value').cacheable(),
  38. isStep5Disabled: function () {
  39. return this.isStepDisabled(5);
  40. }.property('controller.isStepDisabled.@each.value').cacheable(),
  41. isStep6Disabled: function () {
  42. return this.isStepDisabled(6);
  43. }.property('controller.isStepDisabled.@each.value').cacheable(),
  44. isStep7Disabled: function () {
  45. return this.isStepDisabled(7);
  46. }.property('controller.isStepDisabled.@each.value').cacheable(),
  47. isStep8Disabled: function () {
  48. return this.isStepDisabled(8);
  49. }.property('controller.isStepDisabled.@each.value').cacheable(),
  50. isStep9Disabled: function () {
  51. return this.isStepDisabled(9);
  52. }.property('controller.isStepDisabled.@each.value').cacheable(),
  53. isStep10Disabled: function () {
  54. return this.isStepDisabled(10);
  55. }.property('controller.isStepDisabled.@each.value').cacheable()
  56. });