mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
more refactoring and cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b79b4595dd
commit
a2c75dd5be
@ -32,7 +32,6 @@
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
box-shadow: rgba(0, 0, 0, 0.1) 0.3em 0.3em 5em;
|
||||
}
|
||||
.drawer-widget~.drawer-widget .content {
|
||||
|
||||
@ -14,6 +14,7 @@ var toggler = require('lib/toggler')
|
||||
var keyboard = require('lib/keyboard')
|
||||
|
||||
var core = require('features/core')
|
||||
var widgets = require('features/ui-widgets')
|
||||
|
||||
var widget = require('lib/widget/widget')
|
||||
var browse = require('lib/widget/browse')
|
||||
@ -395,19 +396,14 @@ var KeyboardActions = actions.Actions({
|
||||
// - insert the action name where not doc present...
|
||||
// XXX cleanup CSS
|
||||
showKeyboardBindings: ['Interface/Show keyboard bindings',
|
||||
function(){
|
||||
var widget = drawer.Drawer($('body'),
|
||||
keyboard.buildKeybindingsHelpHTML(this.__keyboard_config, this),
|
||||
{
|
||||
focusable: true,
|
||||
})
|
||||
.dom.find('.content')
|
||||
// XXX move to CSS...
|
||||
.css({
|
||||
background: 'white',
|
||||
})
|
||||
}],
|
||||
|
||||
widgets.makeUIDialog('Drawer',
|
||||
function(){
|
||||
return keyboard.buildKeybindingsHelpHTML(this.__keyboard_config, this)
|
||||
},
|
||||
{
|
||||
background: 'white',
|
||||
focusable: true,
|
||||
})],
|
||||
})
|
||||
|
||||
var Keyboard =
|
||||
|
||||
@ -416,8 +416,6 @@ var DialogsActions = actions.Actions({
|
||||
|
||||
|
||||
// container constructors...
|
||||
//
|
||||
// XXX pass options...
|
||||
Overlay: ['- Interface/',
|
||||
makeUIContainer(function(dialog, options){
|
||||
var that = this
|
||||
@ -433,7 +431,11 @@ var DialogsActions = actions.Actions({
|
||||
Drawer: ['- Interface/',
|
||||
makeUIContainer(function(dialog, options){
|
||||
return drawer.Drawer($('body'), dialog, options) })],
|
||||
// XXX
|
||||
|
||||
// XXX need to:
|
||||
// - dock panels
|
||||
// - save panel state (position, collapse, dock, ...)
|
||||
// - restore panel state
|
||||
Panel: ['- Interface/',
|
||||
makeUIContainer(function(dialog, options){
|
||||
// XXX
|
||||
@ -704,19 +706,20 @@ var WidgetTestActions = actions.Actions({
|
||||
makeUIDialog('Drawer',
|
||||
function(h, txt){
|
||||
return $('<div>')
|
||||
.css({
|
||||
position: 'relative',
|
||||
background: 'white',
|
||||
height: '300px',
|
||||
padding: '20px',
|
||||
})
|
||||
.append($('<h1>')
|
||||
.text(h || 'Drawer test...'))
|
||||
.append($('<p>')
|
||||
.text(txt || 'With some text.'))
|
||||
.css({
|
||||
position: 'relative',
|
||||
background: 'white',
|
||||
height: '300px',
|
||||
padding: '20px',
|
||||
})
|
||||
.append($('<h1>')
|
||||
.text(h || 'Drawer test...'))
|
||||
.append($('<p>')
|
||||
.text(txt || 'With some text.'))
|
||||
},
|
||||
// pass custom configuration to container...
|
||||
{
|
||||
background: 'white',
|
||||
focusable: true,
|
||||
})],
|
||||
testBrowse: ['Test/Demo new style dialog...',
|
||||
|
||||
@ -59,6 +59,8 @@ var DrawerPrototype = {
|
||||
'click',
|
||||
'keydown',
|
||||
],
|
||||
|
||||
background: null,
|
||||
},
|
||||
|
||||
keyboard: {
|
||||
@ -142,6 +144,10 @@ var DrawerPrototype = {
|
||||
})
|
||||
})
|
||||
|
||||
if(options.background){
|
||||
dom.find('.content').css('background', options.background)
|
||||
}
|
||||
|
||||
// focus the client...
|
||||
if(client.dom && client.focus){
|
||||
client.focus()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user