adding pending notification model file

This commit is contained in:
Stuardo Rodríguez 2013-01-25 14:28:54 -05:00
parent 40d9a5d437
commit 5f6f004de7
2 changed files with 37 additions and 0 deletions

1
.gitignore vendored
View File

@ -11,6 +11,7 @@
*.zip
*.psd
*.pdf
*~
# config and specific files
include/config/config.xml

View File

@ -0,0 +1,36 @@
var Notification = function(id) {
// this.type = 'Dish'; //why?
var self = this;
$.extend(this, Orm);
// shouldn't this be part of the ORM?
this.loadType = function(cls, data) {
if (!self['__' + data]) {
self['__' + data] = [];
for (x in self['_' + data]) {
self['__' + data][self['__' + data].length] = App.cache(cls, self['_' + data][x]);
}
self['_' + data] = null;
}
return self['__' + data];
}
// move this to a private method?
if (typeof(id) == 'object') {
for (x in id) {
self[x] = id[x];
}
// self.dishes(); // huh?
} else {
App.request(App.service + '/notification/' + id, function(json) {
for (x in json) {
self[x] = json[x];
}
self.options();
});
}
}
// huh?
App.cached.Notification = {};