Add feature hint for scrolltop feature

This commit is contained in:
J.M 2012-12-05 20:14:38 +01:00
parent 9b711a6e42
commit ee41bacc91
3 changed files with 9 additions and 1 deletions

View File

@ -635,6 +635,7 @@ AJAX.cache = {
// TODO: don't send it in the response
.children().first().remove();
$('#topmenu').menuResizer(PMA_mainMenuResizerCallback);
PMA_createqTip($("#serverinfo"), 'x' + PMA_messages['strScrollTopFeatureHint']);
}
}
};

View File

@ -3673,12 +3673,18 @@ $(function () {
* Scrolls the page to the top if clicking the serverinfo bar
*/
$(function () {
var $serverinfo = $("#serverinfo");
$(document).delegate("#serverinfo", "click", function () {
$('html, body').animate({scrollTop: 0}, 'fast');
});
$(document).delegate("#serverinfo > *", "click", function (e) {
$(document).delegate("#serverinfo > *", "click mouseover", function (e) {
e.stopPropagation();
$serverinfo.qtip("hide");
});
$(document).delegate("#serverinfo > *", "mouseout", function () {
$serverinfo.qtip("show");
});
PMA_createqTip($("#serverinfo"), PMA_messages['strScrollTopFeatureHint']);
});
/**

View File

@ -379,6 +379,7 @@ $js_messages['strChangePassword'] = __('Change Password');
/* navigation tabs */
$js_messages['strMore'] = __('More');
$js_messages['strScrollTopFeatureHint'] = __('You may click this navigation bar to scroll the page to the top.');
/* navigation panel */
$js_messages['strShowPanel'] = __('Show Panel');