From a1df41ad8165cd9eb6d2d5d59c7fe404edde716c Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sat, 18 Jan 2014 14:15:45 -0700 Subject: [PATCH] fix(spells): to cancel spell-casting --- public/js/controllers/rootCtrl.js | 9 ++++----- views/index.jade | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/public/js/controllers/rootCtrl.js b/public/js/controllers/rootCtrl.js index 7b08e0aab8..e5a848a69f 100644 --- a/public/js/controllers/rootCtrl.js +++ b/public/js/controllers/rootCtrl.js @@ -180,10 +180,9 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$ $rootScope.applyingAction = false; } -// $rootScope.castCancel = function(){ -// debugger -// $rootScope.applyingAction = false; -// $scope.spell = null; -// } + $rootScope.castCancel = function(){ + $rootScope.applyingAction = false; + $scope.spell = null; + } } ]); diff --git a/views/index.jade b/views/index.jade index 261dc76c7b..48fcae33aa 100644 --- a/views/index.jade +++ b/views/index.jade @@ -1,6 +1,6 @@ doctype 5 //html(ng-app="habitrpg", ng-controller="RootCtrl", ng-class='{"applying-action":applyingAction}', ui-keypress="{27:'castCancel()'}") -html(ng-app="habitrpg", ng-controller="RootCtrl", ng-class='{"applying-action":applyingAction}', ui-keypress="{27:'castCancel()'}") +html(ng-app="habitrpg", ng-controller="RootCtrl", ng-class='{"applying-action":applyingAction}', ui-keyup="{27:'castCancel()'}") head title=env.t('titleIndex')