forked from 0x2620/pandora
handle statistics dialog resize, fixes #710
This commit is contained in:
parent
e8414967b4
commit
581c28bab6
1 changed files with 16 additions and 6 deletions
|
@ -75,7 +75,18 @@ pandora.ui.statisticsDialog = function() {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
||||||
title: 'Statistics',
|
title: 'Statistics',
|
||||||
width: dialogWidth
|
width: dialogWidth
|
||||||
});
|
})
|
||||||
|
.bindEvent({
|
||||||
|
resizeend: function(data) {
|
||||||
|
dialogWidth = data.width;
|
||||||
|
Ox.print('WIDTH:::', dialogWidth)
|
||||||
|
$tabPanel.$element.replaceElement(1,
|
||||||
|
$tabPanel.options('content')($tabPanel.selected())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
|
||||||
|
$tabPanel;
|
||||||
|
|
||||||
//Ox.getJSON('/static/json/deleteme.json', function(result) {
|
//Ox.getJSON('/static/json/deleteme.json', function(result) {
|
||||||
pandora.api.findUsers({
|
pandora.api.findUsers({
|
||||||
|
@ -84,11 +95,9 @@ pandora.ui.statisticsDialog = function() {
|
||||||
sort: [{key: 'username', operator: '+'}]
|
sort: [{key: 'username', operator: '+'}]
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
|
|
||||||
var chartWidth = dialogWidth - 32 - Ox.UI.SCROLLBAR_SIZE,
|
var data = {},
|
||||||
data = {},
|
|
||||||
flagCountry = {},
|
flagCountry = {},
|
||||||
$guestsCheckbox,
|
$guestsCheckbox;
|
||||||
$tabPanel;
|
|
||||||
|
|
||||||
['all', 'registered'].forEach(function(mode) {
|
['all', 'registered'].forEach(function(mode) {
|
||||||
|
|
||||||
|
@ -226,7 +235,8 @@ pandora.ui.statisticsDialog = function() {
|
||||||
|
|
||||||
$tabPanel = Ox.TabPanel({
|
$tabPanel = Ox.TabPanel({
|
||||||
content: function(id) {
|
content: function(id) {
|
||||||
var mode = $guestsCheckbox.options('value') ? 'all' : 'registered',
|
var chartWidth = dialogWidth - 32 - Ox.UI.SCROLLBAR_SIZE,
|
||||||
|
mode = $guestsCheckbox.options('value') ? 'all' : 'registered',
|
||||||
top = 16,
|
top = 16,
|
||||||
$content = Ox.Element()
|
$content = Ox.Element()
|
||||||
.css({
|
.css({
|
||||||
|
|
Loading…
Reference in a new issue