From e8fcd3ae7423792ff8d39e1d8bc6445b68ee7235 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 27 Dec 2013 00:29:07 +0400 Subject: [PATCH] refactoring and tweaking... Signed-off-by: Alex A. Naanou --- ui/css/editor.css | 11 +++++++---- ui/experiments/panels.html | 4 ++++ ui/lib/editor.js | 23 ++++++++++++++++------- ui/lib/panels.js | 3 ++- 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/ui/css/editor.css b/ui/css/editor.css index ed53f914..8d17953d 100755 --- a/ui/css/editor.css +++ b/ui/css/editor.css @@ -48,8 +48,8 @@ min-height: 15px; } .sub-panel, -.panel button, -.panel .state { +.sub-panel button, +.sub-panel .state { margin: 1px; font-size: 11px; border: solid 1px #aaa; @@ -71,12 +71,15 @@ */ } .sub-panel .sub-panel-content { + margin: 10px; + /* margin-left: 10px; margin-right: 10px; + */ } -.panel button:active, -.panel .state:active { +.sub-panel button:active, +.sub-panel .state:active { background: silver; } diff --git a/ui/experiments/panels.html b/ui/experiments/panels.html index 9ce52df3..eb593d37 100755 --- a/ui/experiments/panels.html +++ b/ui/experiments/panels.html @@ -62,6 +62,10 @@ $(function(){ makeSubPanel('Test Sub Panel C', $('

Panel C

'), panel, false) + makeFilterPanel(panel, '.moo') + + makeSnapshotsPanel(panel, '.moo') + $('body') .append(panel) diff --git a/ui/lib/editor.js b/ui/lib/editor.js index 41491c44..f6f091a9 100755 --- a/ui/lib/editor.js +++ b/ui/lib/editor.js @@ -246,9 +246,14 @@ function makeLogRange(text, filter, target){ } -function makeFilterPanel(parent, target){ - return makeSubPanel('Edit: Filters', true, parent) - .find('.sub-panel-content') + +/********************************************************************** +* Panels... +*/ + +function makeFilterPanel(parent, target, open){ + return makeSubPanel('Edit: Filters', + $('
') .append($('
') //.append(makeLogRange('Gamma:', 'gamma', target)) .append(makeLogRange('Brightness:', 'brightness', target)) @@ -268,7 +273,7 @@ function makeFilterPanel(parent, target){ img.css('-webkit-filter', sortFilterStr(img.css('-webkit-filter'))) })) .append($('
')) - .append('Reset: ') + .append('Reset: ') .append($('') .click(function(){ $('.reset').click() @@ -282,11 +287,13 @@ function makeFilterPanel(parent, target){ $('.reset').click() sortFilterSliders(DEFAULT_FILTER_ORDER) })) + .children(), + parent, open) } -function makeSnapshotsPanel(parent, target){ - return makeSubPanel('Edit: Snapshots', true, parent) - .find('.sub-panel-content') +function makeSnapshotsPanel(parent, target, open){ + return makeSubPanel('Edit: Snapshots', + $('
') .append($('
')) .append($('
')) .append($('