- init: function() {},
-
- getData: function(callback) {
- console.log('get:', documentsUrl + fileId);
- $.ajax({
- cache: false,
- url: documentsUrl + fileId,
- dataType: 'json',
- success: this.successfulGetData.bind(this, callback)
- });
- },
-
- successfulGetData: function(callback, data) {
- this.data = data;
- this.signal('changed');
- if (callback) {
- (callback.bind(this))(data);
+ notifyObservers: function(property) {
+ var currentValue = this[property];
+ for (var guid in this._observers[property]) {
+ // console.log(this._observers[property][guid]);
+ // console.log('Notifying', guid, 'of', this.description(), '[', property, ']');
+ this._observers[property][guid](property, currentValue, this);