Subversion Repositories SmartDukaan

Rev

Rev 8527 | Rev 13296 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8527 Rev 13014
Line 7... Line 7...
7
	<script language="javascript" type="text/javascript" src="js/jquery-1.4.2.js"></script>
7
	<script language="javascript" type="text/javascript" src="js/jquery-1.4.2.js"></script>
8
    <script language="javascript" type="text/javascript" src="js/jquery.colorbox-min.js"></script>
8
    <script language="javascript" type="text/javascript" src="js/jquery.colorbox-min.js"></script>
9
    <script language="javascript" type="text/javascript" src="js/jquery.validate.js"></script>
9
    <script language="javascript" type="text/javascript" src="js/jquery.validate.js"></script>
10
    <script language="javascript" type="text/javascript" src="js/jquery.dataTables.min.js"></script>
10
    <script language="javascript" type="text/javascript" src="js/jquery.dataTables.min.js"></script>
11
    <script language="javascript" type="text/javascript" src="js/rechargewebapp_21102013.js"></script>
11
    <script language="javascript" type="text/javascript" src="js/rechargewebapp_21102013.js"></script>
-
 
12
	<script language="javascript" type="text/javascript" src="js/jquery.countdown360.js"></script>
12
</head>
13
</head>
13
 
14
 
14
<body style="margin: 0;">
15
<body style="margin: 0;">
15
 
16
 
16
<div style="min-width:900px;line-height:37px;height:37px;background-color:#333;color:white;">
17
<div style="min-width:900px;line-height:37px;height:37px;background-color:#333;color:white;">
Line 36... Line 37...
36
	
37
	
37
	<div class='padding-row'>
38
	<div class='padding-row'>
38
    </div>
39
    </div>
39
	
40
	
40
	<div class="row">
41
	<div class="row">
41
    	<div class="text">$action.getResultMessage()</div>
42
    	<div>$action.getResultMessage()</div>
42
    </div>
43
    </div>
43
	#if($action.showPrintButton())
44
	#if($action.showPrintButton())
44
		
45
		
45
	<div class="row">
46
	<div class="row">
46
    	<div class="text">Net Payable amount: </div>
47
    	<div class="text">Net Payable amount: </div>
Line 62... Line 63...
62
    </div>
63
    </div>
63
	
64
	
64
	
65
	
65
	<div class='padding-row'>
66
	<div class='padding-row'>
66
    </div>
67
    </div>
-
 
68
	<div id="countdown" style="margin:10px auto auto;width:125px;display:block;"></div>
67
</div>
69
</div>
68
 
70
 
-
 
71
	#set($order = $action.getRecharge())
-
 
72
	#if($order.getStatus().name()=="RECHARGE_IN_PROCESS")	
-
 
73
	<script src="/js/jquery.countdown360.js" type="text/javascript" charset="utf-8"></script>
-
 
74
    <script type="text/javascript" charset="utf-8">
-
 
75
		var callCounter = 0;
-
 
76
    	$("#countdown").countdown360({
-
 
77
	         radius      : 50,
-
 
78
    	     seconds     : 60,
-
 
79
        	 fontColor   : 'white',
-
 
80
         	fillStyle   : '#6699ff',
-
 
81
         	strokeStyle : '#F6F47A',
-
 
82
         	autostart   : true,
-
 
83
         	onComplete  : function () { hideCountDown()}
-
 
84
     	})
-
 
85
		function hideCountDown(){
-
 
86
			$('#countdown').hide();
-
 
87
			jQuery.ajax({
-
 
88
                type : "GET",
-
 
89
                url : "/rch/recharge-result!getRechargeStatus?rechargeId="+$order.getId()+"&isFinal=true",
-
 
90
                success : function(response) {
-
 
91
                },
-
 
92
                error : function() {
-
 
93
                }
-
 
94
           });
-
 
95
		   window.setTimeout(reload, 5000);
-
 
96
		}
-
 
97
		function checkUnknownTransactions(){
-
 
98
			jQuery.ajax({
-
 
99
				type : "GET",
-
 
100
				url : "/rch/recharge-result!getRechargeStatus?rechargeId="+$order.getId()+"&isFinal=false",
-
 
101
				success : function(response) {
-
 
102
					if (response=='RECHARGE_SUCCESSFUL' || response == 'RECHARGE_FAILED' || response == 'RECHARGE_UNKNOWN'){
-
 
103
						reload();
-
 
104
					}
-
 
105
					incrementCounter();
-
 
106
					if ($('#countdown').is(':visible')){
-
 
107
						window.setTimeout(checkUnknownTransactions, 5000);
-
 
108
					}
-
 
109
				},
-
 
110
				error : function() {
-
 
111
				incrementCounter();
-
 
112
					if ($('#countdown').is(':visible')) {
-
 
113
						if (callCounter < 3) {
-
 
114
							window.setTimeout(checkUnknownTransactions, 5000);
-
 
115
						}
-
 
116
					}
-
 
117
				}
-
 
118
			});
-
 
119
		}
-
 
120
		function incrementCounter() {
-
 
121
			callCounter++;
-
 
122
		}
-
 
123
 
-
 
124
		function reload() {
-
 
125
			location.reload();
-
 
126
		}
-
 
127
</script>
-
 
128
<script type="text/javascript">
-
 
129
  $(function(){	
-
 
130
  	window.setTimeout(checkUnknownTransactions, 40000);
-
 
131
	});
-
 
132
</script>
-
 
133
#end
-
 
134
 
69
 
135
 
70
</body>
136
</body>
71
 
137
 
72
</html>
138
</html>
73
139