run submenu code only when #topmenu is present
todo update
This commit is contained in:
@@ -1,2 +1,9 @@
|
||||
restore cache'ing in phpmyadmin.css.php
|
||||
remove debug from user preferences header
|
||||
|
||||
marker for extension dependent options (SOAP for sql validation)
|
||||
|
||||
info about setup script in prefs manage, it seems many people still don't know it exists
|
||||
(and maybe some description in docs on making it work with live configuration?)
|
||||
|
||||
info for constrained values (eg. MaxDbList)?
|
||||
|
@@ -1795,6 +1795,10 @@ function menuResize()
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var topmenu = $('#topmenu');
|
||||
if (topmenu.length == 0) {
|
||||
return;
|
||||
}
|
||||
// create submenu container
|
||||
var link = $('<a />')
|
||||
.attr({href: '#', 'class': 'tab'})
|
||||
@@ -1802,7 +1806,7 @@ $(function() {
|
||||
.click(function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
var img = $('#topmenucontainer li:first-child').find('img');
|
||||
var img = topmenu.find('li:first-child').find('img');
|
||||
if (img.length) {
|
||||
img = img.clone();
|
||||
img.attr('src', img.attr('src').replace(/\/[^\/]+$/, '/b_more.png')).prependTo(link);
|
||||
@@ -1822,7 +1826,7 @@ $(function() {
|
||||
}
|
||||
})
|
||||
.hide();
|
||||
$('#topmenu').append(submenu);
|
||||
topmenu.append(submenu);
|
||||
|
||||
// populate submenu and register resize event
|
||||
$(window).resize(menuResize);
|
||||
|
Reference in New Issue
Block a user