Let user specify the id of the input bar
Input bar id is not globally set, but passed to the directive through the input-id attribute.
This commit is contained in:
parent
f3f5330aed
commit
c04b6e64f6
3 changed files with 6 additions and 3 deletions
|
@ -1007,6 +1007,9 @@ weechat.directive('inputBar', function() {
|
|||
return {
|
||||
|
||||
templateUrl: 'directives/input.html',
|
||||
scope: {
|
||||
inputId: '@inputId',
|
||||
},
|
||||
controller: function($rootScope,
|
||||
$scope,
|
||||
$element,
|
||||
|
@ -1067,7 +1070,7 @@ weechat.directive('inputBar', function() {
|
|||
};
|
||||
|
||||
// Handle key presses in the input bar
|
||||
$scope.handleKeyPress = function($event) {
|
||||
$rootScope.handleKeyPress = function($event) {
|
||||
// don't do anything if not connected
|
||||
if (!$rootScope.connected) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue