help dialog
This commit is contained in:
parent
ab581b79f6
commit
23904e4d9b
2 changed files with 37 additions and 1 deletions
35
static/js/pandora/ui/helpDialog.js
Normal file
35
static/js/pandora/ui/helpDialog.js
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||||
|
pandora.ui.helpDialog = function() {
|
||||||
|
var content = Ox.Element(),
|
||||||
|
that = Ox.Dialog({
|
||||||
|
buttons: [
|
||||||
|
Ox.Button({
|
||||||
|
id: 'close',
|
||||||
|
title: 'Close'
|
||||||
|
}).bindEvent({
|
||||||
|
click: function() {
|
||||||
|
that.close();
|
||||||
|
//fixme: this should be using URL.push / UI.set
|
||||||
|
//but that currenlty causes a reload
|
||||||
|
history.pushState({}, '', '/');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
],
|
||||||
|
//closeButton: true,
|
||||||
|
content: content,
|
||||||
|
height: Math.round((window.innerHeight - 24) * 0.75),
|
||||||
|
keys: {
|
||||||
|
'escape': 'close'
|
||||||
|
},
|
||||||
|
//maximizeButton: true,
|
||||||
|
minHeight: 256,
|
||||||
|
minWidth: 640,
|
||||||
|
title: 'Help',
|
||||||
|
width: Math.round(window.innerWidth * 0.75)
|
||||||
|
});
|
||||||
|
pandora.api.getPage({name: 'help'}, function(response) {
|
||||||
|
content.html(response.data.body);
|
||||||
|
});
|
||||||
|
return that;
|
||||||
|
|
||||||
|
};
|
|
@ -51,5 +51,6 @@
|
||||||
"js/pandora/ui/toolbar.js",
|
"js/pandora/ui/toolbar.js",
|
||||||
"js/pandora/ui/usersDialog.js",
|
"js/pandora/ui/usersDialog.js",
|
||||||
"js/pandora/ui/videoPreview.js",
|
"js/pandora/ui/videoPreview.js",
|
||||||
"js/pandora/ui/viewSelect.js"
|
"js/pandora/ui/viewSelect.js",
|
||||||
|
"js/pandora/ui/helpDialog.js"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue