don't write auto determinated label in session

This commit is contained in:
jean-emmanuel 2016-03-21 16:25:21 +01:00
parent 1193bc7733
commit 5d1ff32694

View file

@ -100,7 +100,6 @@ module.exports.widgets = function(data,parent) {
widgetData.id = widgetData.id.replace(' ','_')
}
widgetData.label = widgetData.label=='auto'?widgetData.id:widgetData.label
widgetData.path = widgetData.path=='auto'?'/' + widgetData.id:widgetData.path
widgetData.target = widgetData.target?(Array.isArray(widgetData.target)?widgetData.target:[widgetData.target]):false
@ -136,10 +135,11 @@ module.exports.widgets = function(data,parent) {
styleL = widgetData.left&&widgetData.left!='auto'||widgetData.left==0?`left:${left};`:'',
styleT = widgetData.top&&widgetData.top!='auto'||widgetData.top==0?`top:${top};`:''
var label = widgetData.label == 'auto'?widgetData.id:widgetData.label
var widgetContainer = $(`
<div class="widget ${widgetData.type}-container ${styleL.length || styleT.length?'absolute-position':''}" style="${styleW + styleH + styleL + styleT + widgetData.css}">
<div class="label"><span>${widgetData.label}</span></div>
<div class="label"><span>${label}</span></div>
</div>
`)