refactoring and tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-12-27 00:29:07 +04:00
parent 04044785ff
commit e8fcd3ae74
4 changed files with 29 additions and 12 deletions

View File

@ -48,8 +48,8 @@
min-height: 15px; min-height: 15px;
} }
.sub-panel, .sub-panel,
.panel button, .sub-panel button,
.panel .state { .sub-panel .state {
margin: 1px; margin: 1px;
font-size: 11px; font-size: 11px;
border: solid 1px #aaa; border: solid 1px #aaa;
@ -71,12 +71,15 @@
*/ */
} }
.sub-panel .sub-panel-content { .sub-panel .sub-panel-content {
margin: 10px;
/*
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
*/
} }
.panel button:active, .sub-panel button:active,
.panel .state:active { .sub-panel .state:active {
background: silver; background: silver;
} }

View File

@ -62,6 +62,10 @@ $(function(){
makeSubPanel('Test Sub Panel C', $('<h3>Panel C</h3>'), panel, false) makeSubPanel('Test Sub Panel C', $('<h3>Panel C</h3>'), panel, false)
makeFilterPanel(panel, '.moo')
makeSnapshotsPanel(panel, '.moo')
$('body') $('body')
.append(panel) .append(panel)

View File

@ -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',
$('<div>')
.append($('<div class="filter-list"/>') .append($('<div class="filter-list"/>')
//.append(makeLogRange('Gamma:', 'gamma', target)) //.append(makeLogRange('Gamma:', 'gamma', target))
.append(makeLogRange('Brightness:', 'brightness', target)) .append(makeLogRange('Brightness:', 'brightness', target))
@ -268,7 +273,7 @@ function makeFilterPanel(parent, target){
img.css('-webkit-filter', sortFilterStr(img.css('-webkit-filter'))) img.css('-webkit-filter', sortFilterStr(img.css('-webkit-filter')))
})) }))
.append($('<hr>')) .append($('<hr>'))
.append('Reset: ') .append('<span>Reset: <span>')
.append($('<button>Values</button>') .append($('<button>Values</button>')
.click(function(){ .click(function(){
$('.reset').click() $('.reset').click()
@ -282,11 +287,13 @@ function makeFilterPanel(parent, target){
$('.reset').click() $('.reset').click()
sortFilterSliders(DEFAULT_FILTER_ORDER) sortFilterSliders(DEFAULT_FILTER_ORDER)
})) }))
.children(),
parent, open)
} }
function makeSnapshotsPanel(parent, target){ function makeSnapshotsPanel(parent, target, open){
return makeSubPanel('Edit: Snapshots', true, parent) return makeSubPanel('Edit: Snapshots',
.find('.sub-panel-content') $('<div>')
.append($('<div class="states"/>')) .append($('<div class="states"/>'))
.append($('<hr>')) .append($('<hr>'))
.append($('<button/>') .append($('<button/>')
@ -309,6 +316,8 @@ function makeSnapshotsPanel(parent, target){
} }
})) }))
.children(),
parent, open)
} }

View File

@ -248,9 +248,10 @@ function makeSidePanel(side, autohide){
} }
//function makeSubPanel(title, open, parent, content_resizable){ // NOTE: if parent is not given this will create a new panel...
function makeSubPanel(title, content, parent, open, content_resizable){ function makeSubPanel(title, content, parent, open, content_resizable){
title = title == null || title.trim() == '' ? '&nbsp;' : title title = title == null || title.trim() == '' ? '&nbsp;' : title
parent = parent == null ? makePanel() : parent
open = open == null ? true : open open = open == null ? true : open
content_resizable = content_resizable == null content_resizable = content_resizable == null