minor tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-12-08 19:11:53 +03:00
parent dfce671fff
commit 1eb79c37bf
2 changed files with 17 additions and 5 deletions

View File

@ -32,6 +32,7 @@ function makeConstructor(name, a, b){
obj.__proto__ = _constructor.prototype obj.__proto__ = _constructor.prototype
// XXX for some reason this does not resolve from .__proto__ // XXX for some reason this does not resolve from .__proto__
obj.constructor = _constructor obj.constructor = _constructor
//obj.__proto__.constructor = _constructor
} else { } else {
var obj = this var obj = this

View File

@ -837,6 +837,12 @@ actions.Actions(Client, {
this.ribbons.restoreTransitions() this.ribbons.restoreTransitions()
} }
}], }],
// NOTE: this will trigger .updateImage hooks...
refresh: ['A lighter version of reload',
function(gids){
gids = gids || '*'
this.ribbons.updateImage(gids)
}],
clear: [ clear: [
function(){ this.ribbons.clear() }], function(){ this.ribbons.clear() }],
@ -866,12 +872,18 @@ actions.Actions(Client, {
// This is called by .ribbons, the goal is to use it to hook into // This is called by .ribbons, the goal is to use it to hook into
// image updating from features and extensions... // image updating from features and extensions...
// //
// NOTE: not intended for calling manually. // NOTE: not intended for calling manually, use .refresh(..) instead...
// //
// XXX experimental... // XXX experimental...
// ...need this to get triggered by .ribbons // ...need this to get triggered by .ribbons
// at this point manually triggering this will not do anything... // at this point manually triggering this will not do anything...
updateImage: ['', function(gid, image){ }], // XXX problem: need to either redesign this or distinguish from
// other actions as I keep calling it expecting results...
// NOTE: calling this.ribbons.updateImage(gid, image) from within
// this will result in infinite recursion...
// ...we need this to be triggered from .ribbons
// XXX hide from user action list...
updateImage: ['This will do nothing', function(gid, image){ }],
// General UI stuff... // General UI stuff...
@ -1219,16 +1231,15 @@ actions.Actions(Client, {
// generate the view... // generate the view...
this.data = this.data.cropRibbons() this.data = this.data.cropRibbons()
this.reload()
} else { } else {
var data = this._full_data var data = this._full_data
delete this._full_data delete this._full_data
// restore... // restore...
this.data = data.mergeRibbonCrop(this.data) this.data = data.mergeRibbonCrop(this.data)
}
this.reload() this.reload()
}
}], }],
}) })