more refactoring and cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-04-30 18:39:14 +03:00
parent b79b4595dd
commit a2c75dd5be
4 changed files with 31 additions and 27 deletions

View File

@ -32,7 +32,6 @@
overflow: hidden;
box-shadow: rgba(0, 0, 0, 0.1) 0.3em 0.3em 5em;
}
.drawer-widget~.drawer-widget .content {

View File

@ -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',
widgets.makeUIDialog('Drawer',
function(){
var widget = drawer.Drawer($('body'),
keyboard.buildKeybindingsHelpHTML(this.__keyboard_config, this),
return keyboard.buildKeybindingsHelpHTML(this.__keyboard_config, this)
},
{
focusable: true,
})
.dom.find('.content')
// XXX move to CSS...
.css({
background: 'white',
})
}],
focusable: true,
})],
})
var Keyboard =

View File

@ -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
@ -717,6 +719,7 @@ var WidgetTestActions = actions.Actions({
},
// pass custom configuration to container...
{
background: 'white',
focusable: true,
})],
testBrowse: ['Test/Demo new style dialog...',

View File

@ -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()