diff --git a/js/ajax.js b/js/ajax.js index d4adfc3e12..57e5edfadc 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -155,6 +155,10 @@ var AJAX = { AJAX.scriptHandler.reset(); + if (data._title) { + $('title').replaceWith(data._title); + } + if (data._menu) { $('#floating_menubar').html(data._menu) .children().first().remove(); // Remove duplicate wrapper (TODO: don't send it in the response) diff --git a/js/common.js b/js/common.js index 305cb40914..1cb6743df6 100644 --- a/js/common.js +++ b/js/common.js @@ -267,21 +267,3 @@ function openDb(new_db) refreshMain(opendb_url); return true; } - -function updateTableTitle( table_link_id, new_title ) -{ - //alert('updateTableTitle'); - if ( window.parent.frame_navigation.document && window.parent.frame_navigation.document.getElementById(table_link_id) ) { - var left = window.parent.frame_navigation.document; - - var link = left.getElementById(table_link_id); - link.title = window.parent.pma_text_default_tab + ': ' + new_title; - - var link = left.getElementById('quick_' + table_link_id); - link.title = window.parent.pma_text_left_default_tab + ': ' + new_title; - - return true; - } - - return false; -} diff --git a/libraries/Header.class.php b/libraries/Header.class.php index 37bcbcb915..9c11020afc 100644 --- a/libraries/Header.class.php +++ b/libraries/Header.class.php @@ -293,7 +293,7 @@ class PMA_Header $retval .= $this->_getHtmlStart(); $retval .= $this->_getMetaTags(); $retval .= $this->_getLinkTags(); - $retval .= $this->_getTitleTag(); + $retval .= $this->getTitleTag(); $title = PMA_sanitize( PMA_escapeJsString($this->_getPageTitle()), false, @@ -452,7 +452,7 @@ class PMA_Header * * @return string the TITLE tag */ - private function _getTitleTag() + public function getTitleTag() { $retval = "