From 4b9336078bbfee89ced2f4c38d16c4ae8ebd976a Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 4 Mar 2013 12:53:13 +0000 Subject: [PATCH] api dialog: add switch button --- static/js/pandora/apiDialog.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/static/js/pandora/apiDialog.js b/static/js/pandora/apiDialog.js index 11bfcc66..bc344341 100644 --- a/static/js/pandora/apiDialog.js +++ b/static/js/pandora/apiDialog.js @@ -26,6 +26,15 @@ pandora.ui.apiDialog = function() { that = Ox.Dialog({ buttons: [ + Ox.Button({ + id: 'switch', + title: 'Help...' + }).bindEvent({ + click: function() { + pandora.UI.set({page: 'help', 'hash.anchor': ''}) + } + }), + {}, Ox.Button({ id: 'close', title: 'Close' @@ -48,7 +57,7 @@ pandora.ui.apiDialog = function() { }) .bindEvent({ close: function() { - pandora.UI.set({page: '', 'hash.anchor': ''}); + pandora.user.ui.page == 'api' && pandora.UI.set({page: '', 'hash.anchor': ''}); }, resize: function() { $list.size(); @@ -105,7 +114,6 @@ pandora.ui.apiDialog = function() { }) .html(overview); - $panel = Ox.SplitPanel({ elements: [ {element: $list, size: 192},