adding pending notification model file
This commit is contained in:
parent
40d9a5d437
commit
5f6f004de7
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,6 +11,7 @@
|
||||
*.zip
|
||||
*.psd
|
||||
*.pdf
|
||||
*~
|
||||
|
||||
# config and specific files
|
||||
include/config/config.xml
|
||||
|
||||
36
www/assets/js/notification.js
Normal file
36
www/assets/js/notification.js
Normal 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 = {};
|
||||
Loading…
x
Reference in New Issue
Block a user