- editor paste menu lets you choose between Same ID (cloned widgets) or New ID
- example update - minor style updates
This commit is contained in:
parent
3cc2ae446e
commit
b234ebdc89
5 changed files with 34 additions and 13 deletions
|
|
@ -73,10 +73,22 @@ var init = function(){
|
|||
|
||||
if (((type=='widget'&&widgetOptions[data.type].widgets) || (type=='tab')) && (!data.tabs||!data.tabs.length)) {
|
||||
|
||||
if (CLIPBOARD!=null) actions['<i class="fa fa-paste"></i> Paste'] = function(){
|
||||
data.widgets = data.widgets || []
|
||||
data.widgets.push(JSON.parse(JSON.stringify(CLIPBOARD)))
|
||||
updateDom(container,data)
|
||||
if (CLIPBOARD!=null) {
|
||||
actions['<i class="fa fa-paste"></i> Paste'] = {
|
||||
'<i class="fa fa-object-ungroup"></i> New ID':function(){
|
||||
data.widgets = data.widgets || []
|
||||
var newData = JSON.parse(JSON.stringify(CLIPBOARD))
|
||||
delete newData.id
|
||||
delete newData.label
|
||||
data.widgets.push(newData)
|
||||
updateDom(container,data)
|
||||
},
|
||||
'<i class="fa fa-object-group"></i> Same ID':function(){
|
||||
data.widgets = data.widgets || []
|
||||
data.widgets.push(JSON.parse(JSON.stringify(CLIPBOARD)))
|
||||
updateDom(container,data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
actions['<i class="fa fa-plus"></i> Add widget'] = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue