]> _ Git - fluidbook-html5.git/commitdiff
Done #1499 @0.25
authorStephen Cameron <stephen@cubedesigners.com>
Tue, 11 Jul 2017 13:20:04 +0000 (15:20 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Tue, 11 Jul 2017 13:20:04 +0000 (15:20 +0200)
js/libs/fluidbook/fluidbook.nav.js

index 2552f23a3f720468762b94efa0e123b3083a4111..0d2f60aa7b4ff5930a996db77d07648c7ab1437d 100644 (file)
@@ -182,10 +182,9 @@ FluidbookNav.prototype = {
             // Add holder list element for menu items
             $nav.append('<ul id="menuList"></ul>');
 
-            // Add Search form
-            if (this.fluidbook.datas.search) {
-                $('#menuList').prepend('<li id="menuSearch">' + this.getSearch() + '</li>');
-            }
+            // Add Search form, or if disabled, add "Menu" label in its place
+            var searchElement = (this.fluidbook.datas.search) ? this.getSearch() : '<span>' + this.fluidbook.l10n.__('Menu') + '</span>';
+            $('#menuList').prepend('<li id="menuSearch">' + searchElement + '</li>');
 
         // Horizontal icon nav
         } else if (navType == 'horizontalNav') {