ソースを参照

Fix #275 condition help not being shown in SwitchProfile.

FelisCatus 11 年 前
コミット
5ed8b5b41c

+ 2 - 1
omega-web/src/omega/controllers/switch_profile.coffee

@@ -52,7 +52,8 @@ angular.module('omega').controller 'SwitchProfileCtrl', ($scope, $rootScope,
     saveAs(blob, "SwitchyRules_#{fileName}.ssrl")
 
   # == Condition types ==
-  $scope.showConditionHelp = ($location.search().help == 'condition')
+  $scope.conditionHelp =
+    show: ($location.search().help == 'condition')
 
   $scope.basicConditionTypes = [
     {

+ 3 - 3
omega-web/src/partials/profile_switch.jade

@@ -1,8 +1,8 @@
 div(ng-controller='SwitchProfileCtrl')
-  section.condition-help-section.settings-group(ng-show='showConditionHelp' ng-init='expandedSection = {id: 0}')
+  section.condition-help-section.settings-group(ng-show='conditionHelp.show' ng-init='expandedSection = {id: 0}')
     h3
       | {{'options_group_conditionHelp' | tr}}
-      button.close.close-condition-help(type='button' ng-click='showConditionHelp = false')
+      button.close.close-condition-help(type='button' ng-click='conditionHelp.show = false')
         span(aria-hidden='true') ×
         span.sr-only {{'dialog_close' | tr}}
     div.condition-help(ng-repeat='group in (showConditionTypes == 0 ? basicConditionTypes : advancedConditionTypes)')
@@ -44,7 +44,7 @@ div(ng-controller='SwitchProfileCtrl')
               = ' '
               button.btn.btn-link.btn-sm.clear-padding.toggle-condition-help(
                 title='{{"options_showConditionTypeHelp" | tr}}'
-                ng-click='showConditionHelp = !showConditionHelp')
+                ng-click='conditionHelp.show = !conditionHelp.show')
                 span.glyphicon.glyphicon-question-sign
             th {{'options_conditionDetails' | tr}}
             th {{'options_resultProfile' | tr}}