pandora/static/js/pandora/iconDialog.js

37 lines
1.1 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: '',
width: 368,
}, options),
that = Ox.Dialog({
buttons: options.buttons,
content: Ox.Element()
.append(
$('<img>')
.attr({src: '/static/png/icon.png'})
.css({position: 'absolute', left: '16px', top: '16px', width: '64px', height: '64px'})
)
.append(
$('<div>')
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;
};