Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_getViewDescriptor: function() {
if (this.cachedViewDescriptor !== undefined)
return this.cachedViewDescriptor;
this.cachedViewDescriptor = elm.Layout({
file: EUI.defaults._theme['app'],
content: {
view: this.viewDescriptor,
toolbar: elm.Toolbar({
select_mode: 'none',
elements: {}
})
}
});
return this.cachedViewDescriptor;
},
willInitialize: function() {
this.viewDescriptor = elm.Layout({
expand: 'both',
fill: 'both',
resize: true,
file: EUI.defaults._theme['app'],
content: {}
});
},
_createPopup: function() {
EUI.window.elements.popup = elm.Notify({
visible: false,
orient: 'center',
expand: 'both',
fill: 'both',
resize: true,
allow_events: false,
content: elm.Layout({
expand: 'both',
fill: 'both',
resize: true,
file: EUI.defaults._theme['popup'],
content: {}
})
});
this.popup = EUI.window.elements.popup;
},
var image = item && item[part.replace('elm.swallow.', '')];
if ((item.badge == undefined) || (part != 'elm.swallow.end'))
return image && elm.Icon({ image: image });
var bg = elm.Background({
weight: { x: 1.0, y: 1.0 },
resize: true
});
var color = item.badge.color;
if(color) {
bg.red = color.red;
bg.green = color.green;
bg.blue = color.blue;
}
if(item.badge.image)
bg.image = item.badge.image;
return elm.Layout({
file: {name: 'themes/eui.edj', group: 'badge'},
content: {
text: item.badge.text || '',
badge_bg: bg
}
});
}.bind(this),
state: function(part, data) {