updated editor panels...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-12-05 06:13:45 +04:00
parent d16e3795a5
commit 2361dd4221
2 changed files with 7 additions and 3 deletions

View File

@ -21,7 +21,6 @@ var toggleEditor = createCSSClassToggler(
$('.viewer') $('.viewer')
.append(makeEditorControls('.current.image') .append(makeEditorControls('.current.image')
//.draggable('option', 'snap', '.viewer') //.draggable('option', 'snap', '.viewer')
.addClass('noScroll')
.css({ .css({
// prevent the editor from moving under // prevent the editor from moving under
// the title bar, that will prevent us from // the title bar, that will prevent us from

View File

@ -246,19 +246,22 @@ function makeLogRange(text, filter, target){
} }
function makePanel(title, open){ function makePanel(title, open, editable_title){
title = title == null ? '&nbsp;' : title title = title == null ? '&nbsp;' : title
// tool panel... // tool panel...
var panel = $('<details/>') var panel = $('<details/>')
.prop('open', open == null ? true : open) .prop('open', open == null ? true : open)
.addClass('panel') .addClass('panel noScroll')
.css({ .css({
position: 'absolute', position: 'absolute',
top: '100px', top: '100px',
left: '100px', left: '100px',
}) })
.append($('<summary>'+title+'</summary>') .append($('<summary>'+title+'</summary>')
.attr({
contenteditable: editable_title == null ? 'false' : 'true',
})
.append($('<span/>') .append($('<span/>')
.addClass('close-button') .addClass('close-button')
.click(function(){ .click(function(){
@ -282,6 +285,7 @@ function makePanel(title, open){
ui.placeholder.width(ui.helper.outerWidth()); ui.placeholder.width(ui.helper.outerWidth());
}, },
opacity: 0.7, opacity: 0.7,
connectWith: '.panel-content',
}) })
.appendTo(panel) .appendTo(panel)
return panel return panel
@ -292,6 +296,7 @@ function makeSubPanel(title, open, parent){
title = title == null ? '&nbsp;' : title title = title == null ? '&nbsp;' : title
var sub_panel = $('<details/>') var sub_panel = $('<details/>')
.addClass('sub-panel noScroll')
.prop('open', open == null ? true : open) .prop('open', open == null ? true : open)
.append($('<summary>'+title+'</summary>')) .append($('<summary>'+title+'</summary>'))
.append($('<div class="sub-panel-content"/>')) .append($('<div class="sub-panel-content"/>'))