add export dialog; use it in manage places/events/users
This commit is contained in:
parent
4754f86909
commit
e1913a1d05
4 changed files with 125 additions and 27 deletions
51
static/js/exportDialog.js
Normal file
51
static/js/exportDialog.js
Normal 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;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue