2013-03-03 05:04:25 +00:00
|
|
|
'use strict';
|
|
|
|
|
2013-03-03 05:06:37 +00:00
|
|
|
pandora.ui.iconDialog = function(options) {
|
2013-03-03 05:04:25 +00:00
|
|
|
|
|
|
|
var options = Ox.extend({
|
|
|
|
closeButton: false,
|
2013-08-08 13:04:51 +00:00
|
|
|
content: '',
|
2013-03-03 05:04:25 +00:00
|
|
|
height: 128,
|
|
|
|
keys: null,
|
|
|
|
title: '',
|
2013-03-08 09:43:23 +00:00
|
|
|
width: 368,
|
2013-03-03 05:04:25 +00:00
|
|
|
}, options),
|
|
|
|
|
|
|
|
that = Ox.Dialog({
|
|
|
|
buttons: options.buttons,
|
2013-03-03 05:34:44 +00:00
|
|
|
closeButton: options.closeButton,
|
2013-03-03 05:04:25 +00:00
|
|
|
content: Ox.Element()
|
|
|
|
.append(
|
|
|
|
$('<img>')
|
|
|
|
.attr({src: '/static/png/icon.png'})
|
|
|
|
.css({position: 'absolute', left: '16px', top: '16px', width: '64px', height: '64px'})
|
|
|
|
)
|
|
|
|
.append(
|
2013-08-08 13:04:51 +00:00
|
|
|
Ox.isObject(options.content)
|
|
|
|
? options.content
|
|
|
|
.css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'})
|
|
|
|
: $('<div>')
|
2013-03-08 03:49:55 +00:00
|
|
|
.addClass('OxTextPage')
|
2013-03-03 05:08:57 +00:00
|
|
|
.css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'})
|
2013-08-08 13:04:51 +00:00
|
|
|
.html(options.content)
|
2013-03-03 05:04:25 +00:00
|
|
|
),
|
2013-03-03 05:07:53 +00:00
|
|
|
fixedSize: true,
|
2013-03-03 05:04:25 +00:00
|
|
|
height: options.height,
|
|
|
|
keys: options.keys,
|
|
|
|
removeOnClose: true,
|
|
|
|
title: options.title,
|
|
|
|
width: options.width
|
|
|
|
});
|
|
|
|
|
|
|
|
return that;
|
|
|
|
|
|
|
|
};
|