From 5ed8b5b41c094cf22e32f0f7d56a73aa27354290 Mon Sep 17 00:00:00 2001 From: FelisCatus Date: Wed, 11 Feb 2015 11:24:35 +0800 Subject: [PATCH] Fix #275 condition help not being shown in SwitchProfile. --- omega-web/src/omega/controllers/switch_profile.coffee | 3 ++- omega-web/src/partials/profile_switch.jade | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/omega-web/src/omega/controllers/switch_profile.coffee b/omega-web/src/omega/controllers/switch_profile.coffee index 026d517..04d7ce4 100644 --- a/omega-web/src/omega/controllers/switch_profile.coffee +++ b/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 = [ { diff --git a/omega-web/src/partials/profile_switch.jade b/omega-web/src/partials/profile_switch.jade index c698d56..37ed0ab 100644 --- a/omega-web/src/partials/profile_switch.jade +++ b/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}}