mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-23 21:22:48 +01:00
a lot of changes
This commit is contained in:
@@ -72,6 +72,24 @@
|
||||
|
||||
};
|
||||
|
||||
bindr.bindControllers = function (rootViewElement, controllers) {
|
||||
var elements = rootViewElement.querySelectorAll('[data-controller]'),
|
||||
i = 0, l = elements.length, name, ctrl;
|
||||
|
||||
for(;i<l;i++){
|
||||
name = elements[i].getAttribute('data-controller');
|
||||
ctrl = controllers[name];
|
||||
|
||||
if(ctrl == null) {
|
||||
console.warn(nam + ' controller wasn\'t found');
|
||||
continue;
|
||||
}
|
||||
|
||||
ctrl.bindView(elements[i]);
|
||||
console.log(name + ' Controller: view bound');
|
||||
}
|
||||
}
|
||||
|
||||
function bindInput(model, intput, propertyName) {
|
||||
intput.addEventListener('keyup', function(e){
|
||||
model[propertyName] = e.srcElement.value;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
}
|
||||
|
||||
Command.prototype.execute = function (cmdArgs) {
|
||||
cmdArgs = cmdArgs || {};
|
||||
cmdArgs.commandHandled = false;
|
||||
|
||||
for(var i=0; i<this.executionHandlers.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user