1. Steve_njk
  2. POS Front End Updated UI

Commits

St...@Steve-PC  committed 4eace56

fixed branchinfo.html nav not selected

  • Participants
  • Parent commits 84b748f
  • Branches default

Comments (0)

Files changed (2)

File build/web/branchInfo.html

View file
  • Ignore whitespace
             function loadBranch(branchId)
             {
                 clearExistingBranch();
-                
+                setNavActive(branchId);
                 $.getJSON("http://lowe.jschua.com/DinoPos/api/branches/" + branchId,
                 function (val) {
        
                 
             }
             
+            function setNavActive(branchId) {
+                
+                var node = document.getElementById("branchNav").childNodes;
+                
+                for(i=0;i<node.length;i++)
+                {
+                    if(node[i].id != branchId)
+                        node[i].className = "";
+                    else
+                        node[i].className ="active";
+                }
+               
+            }
+            
             
         </script>
 

File web/branchInfo.html

View file
  • Ignore whitespace
             function loadBranch(branchId)
             {
                 clearExistingBranch();
-                
+                setNavActive(branchId);
                 $.getJSON("http://lowe.jschua.com/DinoPos/api/branches/" + branchId,
                 function (val) {
        
                 
             }
             
+            function setNavActive(branchId) {
+                
+                var node = document.getElementById("branchNav").childNodes;
+                
+                for(i=0;i<node.length;i++)
+                {
+                    if(node[i].id != branchId)
+                        node[i].className = "";
+                    else
+                        node[i].className ="active";
+                }
+               
+            }
+            
             
         </script>