Skip to content

Commit

Permalink
Added support for extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-spinelli committed Dec 17, 2015
1 parent 9472553 commit 6e76e2d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
13 changes: 12 additions & 1 deletion dist/ng-virtual-keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,18 @@ angular.module('ng-virtual-keyboard', [])

newConfig.accepted = config.accepted || inputCallback;

$(element).keyboard(newConfig);
var keyboard = $(element).keyboard(newConfig);

if (keyboard && newConfig.extensions) {
for (var extension in newConfig.extensions) {
var extConfig = newConfig.extensions[extension];
if (extConfig) {
keyboard[extension](extConfig);
} else {
keyboard[extension]();
}
}
}
},
getKeyboard: function(elementReference){
return executeGetKeyboard(elementReference);
Expand Down
2 changes: 1 addition & 1 deletion dist/ng-virtual-keyboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion src/ng-virtual-keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,18 @@ angular.module('ng-virtual-keyboard', [])

newConfig.accepted = config.accepted || inputCallback;

$(element).keyboard(newConfig);
var keyboard = $(element).keyboard(newConfig);

if (keyboard && newConfig.extensions) {
for (var extension in newConfig.extensions) {
var extConfig = newConfig.extensions[extension];
if (extConfig) {
keyboard[extension](extConfig);
} else {
keyboard[extension]();
}
}
}
},
getKeyboard: function(elementReference){
return executeGetKeyboard(elementReference);
Expand Down

0 comments on commit 6e76e2d

Please sign in to comment.