in icon dialog, allow for passing an element (not just text), and rename the option to 'content'

This commit is contained in:
rolux 2013-08-08 13:04:51 +00:00
commit 00739a024c
13 changed files with 33 additions and 27 deletions

View file

@ -4,9 +4,9 @@ pandora.ui.iconDialog = function(options) {
var options = Ox.extend({
closeButton: false,
content: '',
height: 128,
keys: null,
text: '',
title: '',
width: 368,
}, options),
@ -21,10 +21,13 @@ pandora.ui.iconDialog = function(options) {
.css({position: 'absolute', left: '16px', top: '16px', width: '64px', height: '64px'})
)
.append(
$('<div>')
Ox.isObject(options.content)
? options.content
.css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'})
: $('<div>')
.addClass('OxTextPage')
.css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'})
.html(options.text)
.html(options.content)
),
fixedSize: true,
height: options.height,