pandora/static/js/iconDialog.js

39 lines
1.2 KiB
JavaScript
Raw Normal View History

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,
height: 128,
keys: null,
text: '',
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(
$('<div>')
.addClass('OxTextPage')
2013-03-03 05:08:57 +00:00
.css({position: 'absolute', left: '96px', top: '16px', width: options.width - 112 + 'px'})
2013-03-03 05:04:25 +00:00
.html(options.text)
),
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;
};