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

3
app/js/directives.js

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

Loading…
Cancel
Save