Browse Source

Added esc handling

master
Igor Zhukov 10 years ago
parent
commit
191d7514d8
  1. 5
      app/js/controllers.js
  2. 3
      app/js/directives.js

5
app/js/controllers.js

@ -336,6 +336,10 @@ angular.module('myApp.controllers', ['myApp.i18n'])
} }
}); });
$scope.$on('esc_no_more', function () {
$location.url('/im');
});
$scope.isLoggedIn = true; $scope.isLoggedIn = true;
$scope.isEmpty = {}; $scope.isEmpty = {};
@ -1145,6 +1149,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
} }
function showEmptyHistory () { function showEmptyHistory () {
safeReplaceObject($scope.historyPeer, {});
safeReplaceObject($scope.state, {notSelected: true}); safeReplaceObject($scope.state, {notSelected: true});
peerHistory = false; peerHistory = false;
hasMore = false; hasMore = false;

3
app/js/directives.js

@ -459,6 +459,9 @@ angular.module('myApp.directives', ['myApp.filters'])
else if (searchField.value) { else if (searchField.value) {
$(searchClear).trigger('click'); $(searchClear).trigger('click');
} }
else {
$scope.$emit('esc_no_more');
}
return cancelEvent(e); return cancelEvent(e);
} }

Loading…
Cancel
Save