add export dialog; use it in manage places/events/users

This commit is contained in:
rolux 2013-08-14 18:22:12 +00:00
commit e1913a1d05
4 changed files with 125 additions and 27 deletions

51
static/js/exportDialog.js Normal file
View file

@ -0,0 +1,51 @@
'use strict';
pandora.ui.exportDialog = function(options) {
var $content = Ox.Input({
height: 256,
style: 'square',
type: 'textarea',
value: options.data,
width: 512 - Ox.UI.SCROLLBAR_SIZE
}),
that = Ox.Dialog({
buttons: [
Ox.Button({
title: Ox._('Select All')
})
.bindEvent({
click: function() {
$content.focusInput(true);
}
}),
{},
Ox.Button({
title: Ox._('Close')
})
.bindEvent({
click: function() {
that.close();
}
})
],
content: $content,
fixedSize: true,
height: 256,
removeOnClose: true,
title: options.title,
width: 512
});
that.superOpen = that.open;
that.open = function() {
that.superOpen();
that.find('.OxContent').css({overflow: 'hidden'});
$content.find('textarea').addClass('OxMonospace');
$content.focusInput(true);
};
return that;
};