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;
|
overflow: hidden;
|
||||||
|
|
||||||
|
|
||||||
box-shadow: rgba(0, 0, 0, 0.1) 0.3em 0.3em 5em;
|
box-shadow: rgba(0, 0, 0, 0.1) 0.3em 0.3em 5em;
|
||||||
}
|
}
|
||||||
.drawer-widget~.drawer-widget .content {
|
.drawer-widget~.drawer-widget .content {
|
||||||
|
|||||||
@ -14,6 +14,7 @@ var toggler = require('lib/toggler')
|
|||||||
var keyboard = require('lib/keyboard')
|
var keyboard = require('lib/keyboard')
|
||||||
|
|
||||||
var core = require('features/core')
|
var core = require('features/core')
|
||||||
|
var widgets = require('features/ui-widgets')
|
||||||
|
|
||||||
var widget = require('lib/widget/widget')
|
var widget = require('lib/widget/widget')
|
||||||
var browse = require('lib/widget/browse')
|
var browse = require('lib/widget/browse')
|
||||||
@ -395,19 +396,14 @@ var KeyboardActions = actions.Actions({
|
|||||||
// - insert the action name where not doc present...
|
// - insert the action name where not doc present...
|
||||||
// XXX cleanup CSS
|
// XXX cleanup CSS
|
||||||
showKeyboardBindings: ['Interface/Show keyboard bindings',
|
showKeyboardBindings: ['Interface/Show keyboard bindings',
|
||||||
function(){
|
widgets.makeUIDialog('Drawer',
|
||||||
var widget = drawer.Drawer($('body'),
|
function(){
|
||||||
keyboard.buildKeybindingsHelpHTML(this.__keyboard_config, this),
|
return keyboard.buildKeybindingsHelpHTML(this.__keyboard_config, this)
|
||||||
{
|
},
|
||||||
focusable: true,
|
{
|
||||||
})
|
background: 'white',
|
||||||
.dom.find('.content')
|
focusable: true,
|
||||||
// XXX move to CSS...
|
})],
|
||||||
.css({
|
|
||||||
background: 'white',
|
|
||||||
})
|
|
||||||
}],
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
var Keyboard =
|
var Keyboard =
|
||||||
|
|||||||
@ -416,8 +416,6 @@ var DialogsActions = actions.Actions({
|
|||||||
|
|
||||||
|
|
||||||
// container constructors...
|
// container constructors...
|
||||||
//
|
|
||||||
// XXX pass options...
|
|
||||||
Overlay: ['- Interface/',
|
Overlay: ['- Interface/',
|
||||||
makeUIContainer(function(dialog, options){
|
makeUIContainer(function(dialog, options){
|
||||||
var that = this
|
var that = this
|
||||||
@ -433,7 +431,11 @@ var DialogsActions = actions.Actions({
|
|||||||
Drawer: ['- Interface/',
|
Drawer: ['- Interface/',
|
||||||
makeUIContainer(function(dialog, options){
|
makeUIContainer(function(dialog, options){
|
||||||
return drawer.Drawer($('body'), 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/',
|
Panel: ['- Interface/',
|
||||||
makeUIContainer(function(dialog, options){
|
makeUIContainer(function(dialog, options){
|
||||||
// XXX
|
// XXX
|
||||||
@ -704,19 +706,20 @@ var WidgetTestActions = actions.Actions({
|
|||||||
makeUIDialog('Drawer',
|
makeUIDialog('Drawer',
|
||||||
function(h, txt){
|
function(h, txt){
|
||||||
return $('<div>')
|
return $('<div>')
|
||||||
.css({
|
.css({
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
background: 'white',
|
background: 'white',
|
||||||
height: '300px',
|
height: '300px',
|
||||||
padding: '20px',
|
padding: '20px',
|
||||||
})
|
})
|
||||||
.append($('<h1>')
|
.append($('<h1>')
|
||||||
.text(h || 'Drawer test...'))
|
.text(h || 'Drawer test...'))
|
||||||
.append($('<p>')
|
.append($('<p>')
|
||||||
.text(txt || 'With some text.'))
|
.text(txt || 'With some text.'))
|
||||||
},
|
},
|
||||||
// pass custom configuration to container...
|
// pass custom configuration to container...
|
||||||
{
|
{
|
||||||
|
background: 'white',
|
||||||
focusable: true,
|
focusable: true,
|
||||||
})],
|
})],
|
||||||
testBrowse: ['Test/Demo new style dialog...',
|
testBrowse: ['Test/Demo new style dialog...',
|
||||||
|
|||||||
@ -59,6 +59,8 @@ var DrawerPrototype = {
|
|||||||
'click',
|
'click',
|
||||||
'keydown',
|
'keydown',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
background: null,
|
||||||
},
|
},
|
||||||
|
|
||||||
keyboard: {
|
keyboard: {
|
||||||
@ -142,6 +144,10 @@ var DrawerPrototype = {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(options.background){
|
||||||
|
dom.find('.content').css('background', options.background)
|
||||||
|
}
|
||||||
|
|
||||||
// focus the client...
|
// focus the client...
|
||||||
if(client.dom && client.focus){
|
if(client.dom && client.focus){
|
||||||
client.focus()
|
client.focus()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user