| 
					
				 | 
			
			
				@@ -1,6 +1,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 $(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     var App = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         init : function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (localStorage.getItem('deviceId') !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.state.inputStream.constraints.deviceId = localStorage.getItem('deviceId'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Quagga.init(this.state, function(err) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (err) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     console.log(err); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -92,6 +95,7 @@ $(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     name = $target.attr("name"), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     state = self._convertNameToState(name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                localStorage.setItem('deviceId', value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 console.log("Value of "+ state + " changed to " + value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 self.setState(state, value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -104,6 +108,14 @@ $(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $("#bag").on("click", function(e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                e.preventDefault(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var code = "123-456"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (self.addCode(code)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    $("input[name='123-456']").val("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             $("#submit_button").on("click", function(e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $(".price input").each(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if ($(this).val() <= 0 || $(this).val() == "") { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -190,6 +202,8 @@ $(function() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 $(".btn-close").on("click", function(e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     e.preventDefault(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     e.target.parentNode.parentNode.parentNode.remove(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    App.results = $(".price input").map(function () { return this.name; }).get(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    console.log(App.results); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 |