diff --git a/static/js/pandora/apiDialog.js b/static/js/pandora/apiDialog.js index b0dbd7298..747cf263f 100644 --- a/static/js/pandora/apiDialog.js +++ b/static/js/pandora/apiDialog.js @@ -3,8 +3,8 @@ pandora.ui.apiDialog = function() { - var selected = pandora.user.ui.hash && pandora.user.ui.hash.anchor - ? pandora.user.ui.hash.anchor : '', + var selected = pandora.user.ui.part.api, + actions, $panel, $list, $text, @@ -16,7 +16,7 @@ pandora.ui.apiDialog = function() { title: Ox._('Help...') }).bindEvent({ click: function() { - pandora.UI.set({page: 'help', 'hash.anchor': ''}); + pandora.UI.set({page: 'help'}); } }), {}, @@ -42,12 +42,12 @@ pandora.ui.apiDialog = function() { }) .bindEvent({ close: function() { - pandora.user.ui.page == 'api' && pandora.UI.set({page: '', 'hash.anchor': ''}); + pandora.user.ui.page == 'api' && pandora.UI.set({page: ''}); }, resize: function() { $list.size(); }, - 'pandora_hash.anchor': function(data) { + 'pandora_part.api': function(data) { pandora.user.ui.page == 'api' && that.select(data.value); } }); @@ -56,7 +56,7 @@ pandora.ui.apiDialog = function() { var items = [{ id: '', title: Ox._('API Documentation'), - sort: 'aaa' + sort: 'aaa' // FIXME: what's this? }]; actions = results.data.actions; Ox.forEach(results.data.actions, function(v, k) { @@ -87,7 +87,7 @@ pandora.ui.apiDialog = function() { .bindEvent({ select: function(data) { var id = data.ids[0]; - pandora.UI.set({'hash.anchor': id}); + pandora.UI.set({'part.api': id}); } }); @@ -199,7 +199,6 @@ pandora.ui.apiDialog = function() { borderWidth: '1px', }).appendTo($text); } else { - Ox.print('ELSE') $text.empty().append(getIndex()); } $text.scrollTop(0); diff --git a/static/js/pandora/helpDialog.js b/static/js/pandora/helpDialog.js index 014d72cc5..82f567527 100644 --- a/static/js/pandora/helpDialog.js +++ b/static/js/pandora/helpDialog.js @@ -14,7 +14,7 @@ pandora.ui.helpDialog = function() { title: Ox._('API Documentation...') }).bindEvent({ click: function() { - pandora.UI.set({page: 'api', 'hash.anchor': ''}); + pandora.UI.set({page: 'api'}); } }), {}, @@ -40,10 +40,10 @@ pandora.ui.helpDialog = function() { }) .bindEvent({ close: function() { - pandora.user.ui.page == 'help' && pandora.UI.set({page: '', 'hash.anchor': ''}); + pandora.user.ui.page == 'help' && pandora.UI.set({page: ''}); }, resize: resize, - 'pandora_help': function(data) { + 'pandora_part.help': function(data) { if (pandora.user.ui.page == 'help') { that.select(data.value == '' ? 'help' : data.value); } @@ -87,14 +87,14 @@ pandora.ui.helpDialog = function() { max: 1, min: 1, scrollbarVisible: true, - selected: [pandora.user.ui.help || 'help'], + selected: [pandora.user.ui.part.help || 'help'], sort: [{key: 'index', operator: '+'}], unique: 'id' }) .bindEvent({ select: function(data) { var id = data.ids[0] == 'help' ? '' : data.ids[0]; - pandora.UI.set({help: id, 'hash.anchor': id}); + pandora.UI.set({'part.help': id}); } });