|
|
@ -281,25 +281,23 @@ input[readonly] { |
|
|
|
function setEditorSize (delta) { |
|
|
|
function setEditorSize (delta) { |
|
|
|
$('#righthand-panel').css("width", delta); |
|
|
|
$('#righthand-panel').css("width", delta); |
|
|
|
$('#editor').css("right", delta); |
|
|
|
$('#editor').css("right", delta); |
|
|
|
|
|
|
|
onResize(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$(document).mouseup(function(e){ |
|
|
|
$(document).mouseup(function(e){ |
|
|
|
if (dragging) { |
|
|
|
if (dragging) { |
|
|
|
var delta = $body.width() - e.pageX+2; |
|
|
|
var delta = $body.width() - e.pageX+2; |
|
|
|
setEditorSize( delta ) |
|
|
|
|
|
|
|
$('#ghostbar').remove(); |
|
|
|
$('#ghostbar').remove(); |
|
|
|
$(document).unbind('mousemove'); |
|
|
|
$(document).unbind('mousemove'); |
|
|
|
dragging = false; |
|
|
|
dragging = false; |
|
|
|
|
|
|
|
setEditorSize( delta ) |
|
|
|
window.localStorage.setItem( EDITOR_SIZE_CACHE_KEY, delta ); |
|
|
|
window.localStorage.setItem( EDITOR_SIZE_CACHE_KEY, delta ); |
|
|
|
onResize(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// set cached defaults |
|
|
|
// set cached defaults |
|
|
|
var cachedSize = window.localStorage.getItem( EDITOR_SIZE_CACHE_KEY ); |
|
|
|
var cachedSize = window.localStorage.getItem( EDITOR_SIZE_CACHE_KEY ); |
|
|
|
if (cachedSize) { |
|
|
|
if (cachedSize) setEditorSize( cachedSize ); |
|
|
|
setEditorSize( cachedSize ) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ----------------- editor ---------------------- |
|
|
|
// ----------------- editor ---------------------- |
|
|
|
|
|
|
|
|
|
|
|