mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 02:40:08 +00:00
some minor tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
66863fb825
commit
2e2ddce373
@ -2597,33 +2597,34 @@ module.RibbonsPlacement = core.ImageGridFeatures.Feature({
|
|||||||
depends: [ 'ui' ],
|
depends: [ 'ui' ],
|
||||||
|
|
||||||
config: {
|
config: {
|
||||||
'ui-ribbons-placement-mode': 'legacy',
|
// NOTE: the adapter names bust be registered in the ribbons module
|
||||||
|
// ...not sure if this is good, but it's how it works now...
|
||||||
|
'ui-ribbons-placement-modes': {
|
||||||
|
'legacy': 'legacyDOMAdapter',
|
||||||
|
'new': 'DOMAdapter',
|
||||||
|
},
|
||||||
|
'ui-ribbons-placement-mode': 'new',
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: actions.Actions({
|
actions: actions.Actions({
|
||||||
toggleRibbonsPlacementMode: ['Interfcae/',
|
toggleRibbonsPlacementMode: ['Interface/',
|
||||||
Toggler(null, function(_, state){
|
Toggler(null, function(_, state){
|
||||||
if(state == null){
|
if(state == null){
|
||||||
return this.config['ui-ribbons-placement-mode']
|
return this.config['ui-ribbons-placement-mode']
|
||||||
}
|
}
|
||||||
|
|
||||||
this.config['ui-ribbons-placement-mode'] = state
|
this.config['ui-ribbons-placement-mode'] = state
|
||||||
if(state == 'legacy'){
|
var modes = this.config['ui-ribbons-placement-modes']
|
||||||
this.ribbons.dom = ribbons.legacyDOMAdapter
|
|
||||||
|
|
||||||
} else {
|
this.ribbons.dom = ribbons[modes[state]]
|
||||||
this.ribbons.dom = ribbons.DOMAdapter
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE: this will lose any state/configuration that
|
// NOTE: this will lose any state/configuration that
|
||||||
// was stored in ribbon dom...
|
// was stored in ribbon dom...
|
||||||
this.ribbons.clear('full')
|
this.ribbons.clear('full')
|
||||||
this.reload(true)
|
this.reload(true)
|
||||||
},
|
},
|
||||||
[
|
function(){
|
||||||
'legacy',
|
return Object.keys(this.config['ui-ribbons-placement-modes']) } )],
|
||||||
'new',
|
|
||||||
])],
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
handlers: [
|
handlers: [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user