]> _ Git - fluidbook-html5.git/commitdiff
Force locales icon to end of list. WIP #807 @0:05
authorStephen Cameron <stephen@cubedesigners.com>
Tue, 3 Oct 2017 16:33:45 +0000 (18:33 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Tue, 3 Oct 2017 16:33:45 +0000 (18:33 +0200)
js/libs/fluidbook/fluidbook.nav.js

index 216732048ff24925cc1dc4da3417d019c45d03a2..28f3d406b004a99fba895618eedbef81c51526f0 100644 (file)
@@ -298,11 +298,10 @@ FluidbookNav.prototype = {
         }
 
         // If the locales icon is included, it should always be placed last in the list for formatting reasons
-        // Update: disabled this to allow it to be set anywhere in the list
-        // var localeIconIndex;
-        // if ((localeIconIndex = navOrder.indexOf('lang')) !== -1) {
-        //     navOrder.push(navOrder.splice(localeIconIndex, 1)[0]); // Push to end of array
-        // }
+        var localeIconIndex;
+        if ((localeIconIndex = navOrder.indexOf('lang')) !== -1) {
+            navOrder.push(navOrder.splice(localeIconIndex, 1)[0]); // Push to end of array
+        }
 
 
         // Backwards compatibility for old "afterSearch" setting to work with new "extra" link