Commits

Anonymous committed 4306668

updated the title for each page

Comments (0)

Files changed (13)

build/web/customerDetailTemplate.html

 <html>
     <head>
         <meta charset="utf-8">
-        <title>Mobile POS</title>
+        <title id="systemName">Mobile POS</title>
         <link href="css/bootstrap.css" rel="stylesheet">
     </head>
 
     <body>
         <div class="container">
-            <img src="img/banner.png" />
+            <img id ="mainBanner" src="img/banner.png" />
         </div>
         <br><br>
 
         <!-- Bootstrap JS: compiled and minified -->
         <script src="js/bootstrap.min.js"></script>
         <script src="js/json2.js"></script>
+        
+         <!-- config java script -->
+        <script src="js/mainConfig.js"></script>
 
 
         <script>
   
                             
             $(document).ready(function(){
-                
+                 runAtStartUp();
                
             });
   

build/web/indexTemplate.html

 <html>
     <head>
         <meta charset="utf-8">
-        <title>Mobile POS</title>
+        <title id="systemName">Mobile POS</title>
         <link href="css/bootstrap.css" rel="stylesheet">
     </head>
 
     <body>
         <div class="container">
-            <img src="img/banner.png" />
+            <img id ="mainBanner" />
         </div>
 
         <div class="container">
         <script src="js/jquery.chromatable.js"></script>
         <script src="js/json2.js"></script>
         <script src="js/jquery.paginate.js"></script>
+        
+         <!-- config java script -->
+        <script src="js/mainConfig.js"></script>
 
         <script>
             
             }
   
             $(document).ready(function(){
-
+                
+                 runAtStartUp();
                 console.log("shopping cart cookies =="+readCookie('shoppingCart'));
                     
                 var hehe = new Array();

build/web/js/loginTemplate.js

  * and open the template in the editor.
  */
 
-var pageTitleName = "Wei Xin";
-var bannerURL ="img/banner.png";
-//var bannerURL ="http://placehold.it/940x150";

build/web/loginTemplate.html

 <html>
 
     <head>
-
-
         <meta charset="utf-8">
         <title id="systemName">Mobile POS</title>
 
 
     <body>
         <div class="container">
-            <img id ="loginBanner" src=""/>
+            <img id ="mainBanner" src=""/>
         </div>
         <br><br>
         <div class="container">
 
         <!-- Bootstrap JS: compiled and minified -->
         <script src="js/bootstrap.min.js"></script>
+        
+        <!-- config java script -->
         <script src="js/loginTemplate.js"></script>
-
+        <script src="js/mainConfig.js"></script>
+        
         <script>
    
             $(document).ready(function(){
-                document.title = pageTitleName;
-                var d = document.getElementById("loginBanner")
-                d.setAttribute("src",bannerURL); 
-                
+                runAtStartUp();
                 
                 if(readCookie("rememberLogin")=="true")
                 {

build/web/paymentFormTemplate.html

 <html>
     <head>
         <meta charset="utf-8">
-        <title>Mobile POS</title>
+        <title id="systemName">Mobile POS</title>
 
         <link href="css/bootstrap.css" rel="stylesheet">
 
 
     <body>
         <div class="container">
-            <img src="img/banner.png" />
+            <img id ="mainBanner" src="img/banner.png" />
         </div>
 
         <div class="container">
             <script src="js/bootstrap.min.js"></script>
             <script src="js/json2.js"></script>
 
+            <!-- config java script -->
+            <script src="js/mainConfig.js"></script>
 
             <script>
             
             
             
                 $(document).ready(function(){
-                
+                     runAtStartUp();
+                     
                     getProductDataFromCookieAndDisplay();
                     var orderId = readCookie('orderId');
             

build/web/paymentSummaryTemplate.html

 <html>
     <head>
         <meta charset="utf-8">
-        <title>Mobile POS</title>
+        <title id="systemName">Mobile POS</title>
 
         <link href="css/bootstrap.css" rel="stylesheet">
 
 
     <body>
         <div class="container">
-            <img src="img/banner.png" />
+            <img id ="mainBanner" src="img/banner.png" />
         </div>
 
         <div class="container">
         <script src="js/bootstrap.min.js"></script>
         <script src="js/json2.js"></script>
 
+         <!-- config java script -->
+        <script src="js/mainConfig.js"></script>
 
         <script>
             
-            
-          
-            
-            
             $(document).ready(function(){
                 
+                 runAtStartUp();
+                
                 getProductDataFromCookieAndDisplay();
                 var orderId = readCookie('orderId');
             

web/confirmOrderTemplate.html

-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="utf-8">
-        <title>Mobile POS</title>
-
-        <!-- Le styles -->
-        <link href="css/bootstrap.css" rel="stylesheet">
-        <link href="css/pageNatestyle.css" rel="stylesheet">
-        <style>
-            .demo{
-                width:580px;
-                padding:10px;
-                margin:10px auto;
-                border: 1px solid #fff;
-                background-color:#f7f7f7;
-            }
-        </style>
-    </head>
-
-    <body>
-        <div class="container">
-            <img src="http://placehold.it/940x150" />
-        </div>
-        <br><br>
-
-        <div class="container">
-            <div class="row">
-
-
-                <div class="span12" id="divMainProductCol">  <!--start of second col for product search -->
-
-                    <h5> Enter Product ID or name to search </h5>
-                    <p/>
-
-                    <input id="productSearchKey" type="text" placeholder="Product ID or name" class="input-large search-query">
-                    <button type="submit" onclick=searchProduct() class="btn" id="btnProductSearch">Search</button>
-
-                    <div class="row"  id="divSubProductCol">
-
-                    </div>
-
-                    <div class ="pagination" id="productPagination">
-                        <!--
-                          <ul>
-  
-                          <li>Prev</li>
-                          <li><a href="#">1</a></li>
-                          <li><a href="#">2</a></li>
-                          <li><a href="#">3</a></li>
-                          <li><a href="#">4</a></li>
-                          <li><a href="#">Next</a></li>
-                           </ul>
-                        -->
-                    </div>
-
-                    <!--  <div class ="row demo" id ="demo11232">
-                      </div> -->
-
-
-                </div> <!--end of second col -->
-
-
-            </div>
-
-
-
-            <div class="row">
-                <h4> Items added </h4>
-                <table class ="table table-striped" style="background-color:white" id="productTable"  >
-                    <thead>
-                        <tr>
-                            <th >Name &nbsp&nbsp&nbsp&nbsp</th>
-                            <th>Qty</th>
-                            <th>Each</th>
-                            <th>Total</th>
-                            <th></th>
-                        </tr>
-                    </thead>
-                    <tbody>
-                    </tbody>
-                </table>
-
-                <br/>
-
-                <div class="row"> <!--start of row-->
-                    <div class="span2">
-                        Tax:      Total:
-                    </div>
-
-
-                </div> <!--end of row-->
-
-                <br/><br/>
-
-                <div class="row"> <!--start of btm row for pay and cancel order -->
-                    <div class="span3">
-                        <button class="btn btn-large btn-danger" type="button" id="clearFormBtn">Remove all products</button>
-                    </div>
-                    <div class="span3">  
-                        <button class="btn btn-large btn-primary" type="button" id="PayBtn" > Pay </button>
-                    </div>
-
-                </div> <!-- end of btm row for pay and cancel order -->
-
-
-
-            </div> <!--end of first col -->
-        </div>
-
-        <!-- jQuery via Google + local fallback, see h5bp.com -->
-        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
-
-        <!-- Bootstrap JS: compiled and minified -->
-        <script src="js/bootstrap.min.js"></script>
-
-        <script src="js/jquery.chromatable.js"></script>
-
-        <script src="js/json2.js"></script>
-
-        <script src="js/jquery.paginate.js"></script>
-
-        <script>
-            
-            function validateSearchField() {
-                 
-                var productSearch = $('#productSearchKey').val();
-                if(productSearch.length==0)
-                {
-                    alert("Please do not leave product ID hehe or name blank!");
-                    return false;
-                }
-                
-            }
-            
-            function searchProduct() {
-                
-                var ifFieldValid = validateSearchField();
-                if(ifFieldValid == false)
-                    return;
-                
-                var searchKeyword = $('#productSearchKey').val();
-                
-                console.log("product searchKey val =="+searchKeyword);
-                
-                var url; 
-                if(isNumber(searchKeyword))
-                    url = "http://lowe.jschua.com/DinoPos/api/products/" +searchKeyword;
-                else
-                    url = "http://lowe.jschua.com/DinoPos/api/products/?name=" +searchKeyword;
-                
-                // console.log(url);
-                
-                var totalProductFound = 0;
-                
-                $.ajax({
-                    url: url,
-                    dataType:'json',
-                    async:false,
-                    success:function(data){
-                        clearSearchResult();
-                    
-                        if(data!=null)
-                        {
-                            if(data instanceof Array)
-                            {
-                                // On success, 'data' contains a list of products.
-                                $.each(data, function (key, val) {
-                                    console.log(val.Name);
-                                
-                                    displayProductInfo(val,totalProductFound);
-                                    totalProductFound++;
-                                });
-                            }
-                            else
-                            {
-                                for(var i =0;i<7;i++)
-                                {
-                                    displayProductInfo(data,totalProductFound);
-                                    totalProductFound++;
-                                }
-                                console.log(data.Name);
-                            }
-                        }
-                    }
-                    
-                }).done(createPagnation(totalProductFound));
-               
-            }
-            
-            //global var 
-            var currentPage=1; //edited in showPage
-            var totalPage=0; //set in createPagnation
-             
-            function createPagnation(totalElement)
-            {
-                totalPage = Math.ceil(totalElement/2);
-                
-                var mainUl = document.createElement("ul");
-                console.log("number==!"+totalElement);
-                
-                var subUl = document.createElement("li");
-                subUl.className ="prev disabled"
-                subUl.innerHTML ="<a href=\"#\" onClick=\"showPage(-1)\">Prev</a>";
-                mainUl.appendChild(subUl);
-                //for(var i =1;i<=number;i++)
-                for(var x=1;x<=Math.ceil(totalElement/2);x++)
-                {
-                   
-                    var subUl = document.createElement("li");
-                    subUl.className =x;
-                    if(x==1)
-                        subUl.className = subUl.className +" active";
-                    subUl.innerHTML ="<a href=\"#\" onClick=\"showPage("+x+")\">"+x+"</a>";
-                    // subUl.onclick = showPage(subUl.innerHTML);
-                    //subUl.on("click",showPage(subUl.innerHTML));
-                    mainUl.appendChild(subUl);
-                }
-                var subUl = document.createElement("li");
-                subUl.innerHTML ="<a href=\"#\" onClick=\"showPage(0)\">Next</a>";
-                subUl.className = "next";
-                mainUl.appendChild(subUl);
-                
-                var test = document.getElementById("productPagination");
-                test.appendChild(mainUl);
-                
-            }
-            
-            /**
-             *Method take in the page number depending on what user selected.
-             *if pageNumber == 0, it means user clicked next button
-             *if pageNumber ==-1, it means user clicked previous button
-             */
-            function showPage(pageNumber)
-            {
-            
-                $('#productPagination ul li.'+currentPage).removeClass('active');
-                
-                //-1 = prev, 0 = next
-                if(pageNumber!=-1 && pageNumber!=0){
-                    currentPage = pageNumber;
-                }
-                else if(pageNumber==-1) //prev was selected
-                {
-                    if(currentPage!=1)
-                    {
-                        currentPage = currentPage-1;
-                        pageNumber = currentPage;
-                    }else{
-                        pageNumber=1;
-                    }
-                }
-                else if(pageNumber==0) //next was selected
-                {
-                    if(currentPage!=totalPage){
-                        currentPage = currentPage+1;
-                        pageNumber = currentPage;
-                    }else{
-                        pageNumber=totalPage;
-                    }
-                }
-                
-                
-                $('._current','#divSubProductCol').removeClass('_current').hide();
-                
-                var productNo1;
-                if(pageNumber==1){    
-                    productNo1 = 0;
-                }
-                else{    
-                    productNo1 = (pageNumber-1)*2;
-                }
-                var productNo2 = productNo1+1;
-               
-                
-                $('#productNo_'+productNo1).addClass('_current').show();
-                $('#productNo_'+productNo2).addClass('_current').show();
-              
-              
-              
-                /**
-                 *below code to disable the pageNumber button
-                 */
-                //console.log($('#productPagination ul li.next'));
-                //$('#productPagination ul li.next').addClass('disabled');
-                if(pageNumber!=0 && pageNumber!=-1){
-                    $('#productPagination ul li.'+pageNumber).addClass('active');
-                    $('#productPagination ul li.next').removeClass('disabled');
-                    $('#productPagination ul li.prev').removeClass('disabled');
-                }
-                if(pageNumber ==totalPage){
-                    $('#productPagination ul li.next').addClass('disabled');
-                }
-                if(pageNumber ==1){
-                    $('#productPagination ul li.previous').addClass('disabled');
-                }   
-              
-              
-              
-            }
-            
-            
-            /**
-             *function clear the pagnation and the searchresult
-             */
-            function clearSearchResult()
-            {
-         
-                if($('#divSubProductCol').children().length >0)
-                {
-                    $('#divSubProductCol').empty();
-                }
-                if($('#productPagination').children().length >0)
-                {
-                    $('#productPagination').empty();
-                }
-            }
-            
-            function displayProductInfo(val,productNumbering)
-            {
-                var divInPlace =  document.getElementById("divSubProductCol"); // $('#divSubProductCol');
-                  
-                var mainDiv = document.createElement("div");
-                //mainDiv.className ="row";
-                mainDiv.id = "productNo_"+productNumbering;
-                
-               
-                if(productNumbering >1)
-                {
-                    mainDiv.setAttribute("style", "display:none")
-                    mainDiv.className ="pagedemo";
-                }
-                else
-                {
-                    mainDiv.className ="pagedemo _current";
-                }
-                    
-            
-                var divForImage = document.createElement("div");
-                divForImage.className ="span2";
-                divForImage.innerHTML ="<img src=\""+val.ImageUrl+"\" height=150 width=150>"
-                               
-                var divForProductInfo = document.createElement("div");
-                divForProductInfo.className ="span4";
-                divForProductInfo.setAttribute("id", "div_"+val.Product_ID);
-                var productBrand = "<h3> <span id=\"productBrand\">"+val.Brand+"</span></h4>";
-                var productTitle = "<h4> <span id=\"productTitle\">"+val.Name+"</span></h4>";
-                var productDescription ="<h6> <span id=\"productDescription\">"+val.Description+"</span></h6>";
-                var productPrice = "<h6> Price $<span id=\"productPrice\">"+val.Pricesell+"</span> </h6>";
-                var qtyText ="Qty"
-                //var qtyText = "</p><p class=\"span1\" align=\"left\"> Qty </p>";
-                divForProductInfo.innerHTML= productBrand+productTitle+productDescription+productPrice+qtyText;
-                                
-                var addToCartButton = document.createElement("input");
-                addToCartButton.setAttribute("id",val.Product_ID);
-                addToCartButton.setAttribute("type","button");
-                var info = "addItemToTable("+val.Product_ID+")"
-                addToCartButton.setAttribute("onClick",info);
-                addToCartButton.setAttribute("value","Add this item to cart!");
-                addToCartButton.className ="btn span4";
-                                
-                var qtyTextField = document.createElement("input")
-                qtyTextField.setAttribute("type", "text");
-                qtyTextField.setAttribute("id","qty");
-                qtyTextField.setAttribute("text","1");
-                qtyTextField.className ="input-small";
-                                
-                divForProductInfo.appendChild(qtyTextField);
-                divForProductInfo.appendChild(addToCartButton);
-                                
-                mainDiv.appendChild(divForImage);
-                mainDiv.appendChild(divForProductInfo); 
-               
-                divInPlace.appendChild(mainDiv);
-            }
-            
-            function isNumber (o){
-                return ! isNaN (o-0) && o != null;
-            }
-   
-            function checkFormValidation(){
-                console.log("check form validation");
-  		
-                if($("#textCustomerName").val().length==0)
-                {
-                    alert("Customer name cannot be blank");
-                    return false;
-                }
-                if($("#textCustomerAddress").val().length==0)
-                {
-                    alert("Customer address cannot be blank");
-                    return false;
-                }
-                if($("#textCustomerContact").val().length==0)
-                {
-                    alert("Customer contact cannot be blank");
-                    return false;
-                }
-                if($("#textCustomerEmail").val().length==0)
-                {
-                    alert("Customer email cannot be blank");
-                    return false;
-                }
-                if($("#textCreditCard").val().length==0)
-                {
-                    alert("Customer credit card no cannot be blank");
-                    return false;
-                }
-                if($("#textCW2").val().length==0)
-                {
-                    alert("Customer cw2 cannot be blank");
-                    return false;
-                }
-                if($("#textCreditCardExpiry").val().length==0)
-                {
-                    alert("Customer expiry cannot be blank");
-                    return false;
-                }
-		
-                return false;
-            }
-   
-
-        
-
-  
-            function readCookie(name) {
-                var nameEQ = name + "=";
-                var ca = document.cookie.split(';');
-                for(var i=0;i < ca.length;i++) {
-                    var c = ca[i];
-                    while (c.charAt(0)==' ') c = c.substring(1,c.length);
-                    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
-                }
-                return null;
-            }
-  
-  
-            function createCookie(name,value,days) {
-                if (days) {
-                    var date = new Date();
-                    date.setTime(date.getTime()+(days*24*60*60*1000));
-                    var expires = "; expires="+date.toGMTString();
-                }
-                else var expires = "";
-                document.cookie = name+"="+value+expires+"; path=/";
-            }
-            
-            function readCookie(name) {
-                var nameEQ = name + "=";
-                var ca = document.cookie.split(';');
-                for(var i=0;i < ca.length;i++) {
-                    var c = ca[i];
-                    while (c.charAt(0)==' ') c = c.substring(1,c.length);
-                    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
-                }
-                return null;
-            }
-  
-  
-  
-  
-  
-  
-            $(document).ready(function(){
-                
-                /*  Cookie checking code
-                console.log("readCookie=="+readCookie('login'));
-                
-                if(readCookie('login') ==null)
-                    window.location.replace("login.html");
-   
-                loadContent();
-                 */
-                console.log(readCookie('shoppingCart'));
-                
-                var hehe = new Array();
-                hehe = $.parseJSON(readCookie('shoppingCart'));
-                if(hehe!=null)
-                {
-                    for(var i=0;i<hehe.length;i++)
-                    {        
-                        console.log("productID =="+hehe[i].productId);
-                        console.log("productQty =="+hehe[i].productQty);
-                    }
-                } 
-        
-   
-                
-                var payBtn = $("#PayBtn");
-                var clearFormBtn = $("#clearFormBtn");
-		
-                //either product or payment page
-                var divProduct = $("#divMainProductCol");
-                var divPayment = $("#divPayment");
-		
-                //product info span
-                var productTitle = $("#productTitle");
-       	
-	   
-                clearFormBtn.click(function() {
-                    $("#productTable > tbody").empty();
-                });
-		
-		
-		
-                payBtn.click(function() {
-			
-               	
-                    var allProducts = new Array();
-                    //allProduct[i] = ..
-			
-                  	
-                    $("#productTable tbody tr").each(function() {
-                        
-                        var object = new productBought;
-                        object.productId = $(this).find("#productId").attr('class');
-                        object.productQty = $(this).find("#productQty").html();
-			object.productName= $(this).find("#productId").html();
-                        object.productTotal = $(this).find('#productTotal').html();
-                        object.productEach = $(this).find('#productEach').html();
-                        allProducts.push(object);
-                    });
-			
-			
-                    for(i=0;i<allProducts.length;i++)
-                    {
-                        console.log(allProducts[i]);
-                    }
-                    
-                    
-                    function productBought(productTitle,qty)
-                    {
-                        this.productTitle = productTitle;
-                        this.qty = qty;
-                    }
-		
-                    createCookie('shoppingCart',JSON.stringify(allProducts),0);
-                    
-                    window.location.replace("paymentFormTemplate.html");
-			
-                });
-		
-		
-		
-                //hide the payment at the start
-                divPayment.hide();
-		
-             
-                reinitChromaTable();
-		
-            });
-	
-            function reinitChromaTable()
-            {
-                $('#productTable').chromatable({
-                    width: "100%",
-                    //width: "450px",
-                    height: "300px",
-                    scrolling: "yes"
-	
-                });
-            }
-        
-            function deleteRowItem(o)
-            {
-                //o = button, parent = htmltablecell -> htmltablerow -> htmltablesection 
-                var p = o.parentNode.parentNode;
-                p.parentNode.removeChild(p);
-            };
-            
-            function addItemToTable(productId)
-            {
-                
-                /**
-                 * Check first if existing element exist already
-                 */
-                
-                var totalRowInTable = $('#productTable tbody').children().length;
-                
-                var whetherExistProduct = false;
-            
-                $('#productTable >tbody >tr').each(function(){
-                    var inTableProductId = $(this).find('#productId').attr('class') 
-                
-                    if(inTableProductId == productId ) //item wanted to add already exist in table
-                    {
-                            
-                        //update the qty and total instead
-                        var currentProductQty = $(this).find("#productQty").html();
-                        var currentProductEach = $(this).find('#productEach').html();
-                     
-                        console.log(currentProductQty + " <-- Qty, Each -->"+currentProductEach);
-                     
-                        //finding out the new quantity by adding old quantity + new quantity
-                        var oldProductQty = $('#div_'+productId).find('#qty').val();
-                        var newProductQty = Number(currentProductQty) + Number(oldProductQty);
-                     
-                        //finding out the total by multiplying new qty and product price each
-                        var newTotal = newProductQty * currentProductEach;
-                     
-                        //update the qty field with new qty
-                        $(this).find('#productQty').html(newProductQty);
-                     
-                        //update the total with new total
-                        $(this).find('#productTotal').html('$'+newTotal);
-                     
-                        whetherExistProduct=true;
-                        return;
-                    }
-                    
-                });
-                
-                
-                //product added is a new product
-                if(whetherExistProduct==false)
-                {
-                
-                    var productName = $('#div_'+productId).find('#productTitle').text();
-                    var productPrice = $('#div_'+productId).find('#productPrice').text();
-                    var qtySelected = $('#div_'+productId).find('#qty').val();
-                  
-                    var totalPrice = qtySelected * productPrice;
-                
-                    var tableDetailHeader ="<tr>";
-                    var tableProductTitle ="<td class=\""+productId+"\" id=\"productId\">"+productName+"</td>";
-                    var tableQty = "<td id=\"productQty\">"+qtySelected+"</td>";
-                    var tableEach = "<td id=\"productEach\">"+productPrice+"</td>";
-                    var tableTotal = "<td id=\"productTotal\" >$"+totalPrice+"</td>";
-                    var tableRemoveItemBtn = "<td> <button class=\"btn btn-mini\" onclick=\"deleteRowItem(this)\"> x</button></td>"
-                    var tableDetailFooter ="</tr>";
-                    var entireTable = tableDetailHeader + tableProductTitle + tableQty + tableEach + tableTotal + tableRemoveItemBtn+tableDetailFooter;
-                
-                    $("#productTable > tbody:last").append(entireTable);
-                }  
-                
-               
-                reinitChromaTable();
-            }
-            
-        </script>
-
-    </body>
-
-</html>

web/customerDetailTemplate.html

 <html>
     <head>
         <meta charset="utf-8">
-        <title>Mobile POS</title>
+        <title id="systemName">Mobile POS</title>
         <link href="css/bootstrap.css" rel="stylesheet">
     </head>
 
     <body>
         <div class="container">
-            <img src="img/banner.png" />
+            <img id ="mainBanner" src="img/banner.png" />
         </div>
         <br><br>
 
         <!-- Bootstrap JS: compiled and minified -->
         <script src="js/bootstrap.min.js"></script>
         <script src="js/json2.js"></script>
+        
+         <!-- config java script -->
+        <script src="js/mainConfig.js"></script>
 
 
         <script>
   
                             
             $(document).ready(function(){
-                
+                 runAtStartUp();
                
             });
   

web/indexTemplate.html

 <html>
     <head>
         <meta charset="utf-8">
-        <title>Mobile POS</title>
+        <title id="systemName">Mobile POS</title>
         <link href="css/bootstrap.css" rel="stylesheet">
     </head>
 
     <body>
         <div class="container">
-            <img src="img/banner.png" />
+            <img id ="mainBanner" />
         </div>
 
         <div class="container">
         <script src="js/jquery.chromatable.js"></script>
         <script src="js/json2.js"></script>
         <script src="js/jquery.paginate.js"></script>
+        
+         <!-- config java script -->
+        <script src="js/mainConfig.js"></script>
 
         <script>
             
             }
   
             $(document).ready(function(){
-
+                
+                 runAtStartUp();
                 console.log("shopping cart cookies =="+readCookie('shoppingCart'));
                     
                 var hehe = new Array();

web/js/loginTemplate.js

  * and open the template in the editor.
  */
 
-var pageTitleName = "Wei Xin";
-var bannerURL ="img/banner.png";
-//var bannerURL ="http://placehold.it/940x150";

web/loginTemplate.html

 <html>
 
     <head>
-
-
         <meta charset="utf-8">
         <title id="systemName">Mobile POS</title>
 
 
     <body>
         <div class="container">
-            <img id ="loginBanner" src=""/>
+            <img id ="mainBanner" src=""/>
         </div>
         <br><br>
         <div class="container">
 
         <!-- Bootstrap JS: compiled and minified -->
         <script src="js/bootstrap.min.js"></script>
+        
+        <!-- config java script -->
         <script src="js/loginTemplate.js"></script>
-
+        <script src="js/mainConfig.js"></script>
+        
         <script>
    
             $(document).ready(function(){
-                document.title = pageTitleName;
-                var d = document.getElementById("loginBanner")
-                d.setAttribute("src",bannerURL); 
-                
+                runAtStartUp();
                 
                 if(readCookie("rememberLogin")=="true")
                 {

web/paymentFormTemplate.html

 <html>
     <head>
         <meta charset="utf-8">
-        <title>Mobile POS</title>
+        <title id="systemName">Mobile POS</title>
 
         <link href="css/bootstrap.css" rel="stylesheet">
 
 
     <body>
         <div class="container">
-            <img src="img/banner.png" />
+            <img id ="mainBanner" src="img/banner.png" />
         </div>
 
         <div class="container">
             <script src="js/bootstrap.min.js"></script>
             <script src="js/json2.js"></script>
 
+            <!-- config java script -->
+            <script src="js/mainConfig.js"></script>
 
             <script>
             
             
             
                 $(document).ready(function(){
-                
+                     runAtStartUp();
+                     
                     getProductDataFromCookieAndDisplay();
                     var orderId = readCookie('orderId');
             

web/paymentSummaryTemplate.html

 <html>
     <head>
         <meta charset="utf-8">
-        <title>Mobile POS</title>
+        <title id="systemName">Mobile POS</title>
 
         <link href="css/bootstrap.css" rel="stylesheet">
 
 
     <body>
         <div class="container">
-            <img src="img/banner.png" />
+            <img id ="mainBanner" src="img/banner.png" />
         </div>
 
         <div class="container">
         <script src="js/bootstrap.min.js"></script>
         <script src="js/json2.js"></script>
 
+         <!-- config java script -->
+        <script src="js/mainConfig.js"></script>
 
         <script>
             
-            
-          
-            
-            
             $(document).ready(function(){
                 
+                 runAtStartUp();
+                
                 getProductDataFromCookieAndDisplay();
                 var orderId = readCookie('orderId');
             
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.