editor: separate editor menu from the actual editor form
This commit is contained in:
parent
117c7cdd95
commit
8f5a594464
4 changed files with 48 additions and 44 deletions
|
|
@ -143,7 +143,7 @@ module.exports = {
|
|||
document.documentElement.style.setProperty("--grid-width",GRIDWIDTH)
|
||||
})
|
||||
})
|
||||
$('.editor').append(f)
|
||||
$('.editor-menu').append(f)
|
||||
},
|
||||
editorDisable: function(){
|
||||
$('.widget.ui-resizable').resizable('destroy')
|
||||
|
|
@ -158,8 +158,8 @@ module.exports = {
|
|||
EDITING = false
|
||||
if (READ_ONLY) {
|
||||
module.exports.editorEnable = ()=>{}
|
||||
$('.editor .btn').remove()
|
||||
$('.editor .title').html($('.editor .title').html() + ' (disabled)').addClass('disabled')
|
||||
$('.editor-menu .btn').remove()
|
||||
$('.editor-menu .title').html($('.editor-menu .title').html() + ' (disabled)').addClass('disabled')
|
||||
}
|
||||
},
|
||||
traversingDisable: function(){
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ var editObject = function(container, data, refresh){
|
|||
$(container).parent().addClass('editing')
|
||||
}
|
||||
|
||||
$('.editor').append('<div class="editor-container"></div>')
|
||||
$('#editor').append('<div class="editor-container"></div>')
|
||||
var form = $('<div class="form"></div>').appendTo('.editor-container')
|
||||
|
||||
|
||||
|
|
@ -276,7 +276,7 @@ var editSession = function(container,data,refresh){
|
|||
|
||||
$('.editor-root, #container').addClass('editing')
|
||||
|
||||
$('.editor').append('<div class="editor-container"></div>')
|
||||
$('#editor').append('<div class="editor-container"></div>')
|
||||
|
||||
|
||||
var form = $('<div class="form"></div>').appendTo('.editor-container')
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ var data = [
|
|||
},
|
||||
{
|
||||
title: icon('edit') + ' Editor',
|
||||
class:'editor',
|
||||
class:'editor-menu',
|
||||
actions: [
|
||||
{
|
||||
title:'On',
|
||||
|
|
@ -148,6 +148,7 @@ module.exports = {
|
|||
<div class="navigation"><ul><li><a>${PACKAGE.productName.toUpperCase()}</a></li></ul></div>
|
||||
`)
|
||||
$('#sidepanel').append(sidepanel)
|
||||
$('#sidepanel').append('<div id="editor"></div>')
|
||||
toggle()
|
||||
},
|
||||
createToggle:toggle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue