initial commit
This commit is contained in:
commit
4b60ece582
327 changed files with 28286 additions and 0 deletions
28
libjs/wController/localModel.js
Normal file
28
libjs/wController/localModel.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
"use strict";
|
||||
var counter = 0;
|
||||
var Subscribable = require("../utils/subscribable");
|
||||
|
||||
var LocalModel = Subscribable.inherit({
|
||||
"className": "LocalModel",
|
||||
"constructor": function(properties) {
|
||||
Subscribable.fn.constructor.call(this);
|
||||
|
||||
this.properties = [];
|
||||
this._controllers = [];
|
||||
|
||||
if (properties) {
|
||||
for (var key in properties) {
|
||||
if (properties.hasOwnProperty(key)) {
|
||||
var pair = {p: key, k: properties[key]};
|
||||
this.properties.push(pair);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"setData": function(data) {
|
||||
this.data = data;
|
||||
this.trigger("data");
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = LocalModel;
|
Loading…
Add table
Add a link
Reference in a new issue