Subversion Repositories SmartDukaan

Rev

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

Rev 10645 Rev 10651
Line 1... Line 1...
1
 
1
 
2
var lastId;
2
var lastId;
3
function failedDetails(e){
3
// function failedDetails(e){
4
	debugger;
4
	// debugger;
5
	var currentId = e.currentTarget;
5
	// var currentId = e.currentTarget;
6
	currentId = currentId.getAttribute('data-key');
6
	// currentId = currentId.getAttribute('data-key');
7
	document.getElementById(currentId).style.display = 'block';
7
	// //document.getElementById(currentId).style.display = 'block';
8
	if(lastId == undefined){
8
	// if(lastId == undefined){
9
		//document.getElementById(lastId).style.display = 'none';
9
		// //document.getElementById(lastId).style.display = 'none';
10
		lastId = currentId;
10
		// lastId = currentId;
11
	}else if(currentId != lastId){
11
	// }else if(currentId != lastId){
12
		document.getElementById(lastId).style.display = 'none';
12
		// document.getElementById(lastId).style.display = 'none';
13
		lastId = currentId;
13
		// lastId = currentId;
14
	}else if(currentId == lastId){
14
	// }else if(currentId == lastId){
15
		document.getElementById(currentId).style.display = 'none';
15
		// document.getElementById(currentId).style.display = 'none';
16
		lastId = undefined;
16
		// lastId = undefined;
17
	}
17
	// }
18
}
18
// }
19
  function myWallet(){
19
  function myWallet(){
20
  window.location.href = base_url+'my-wallet';
20
  window.location.href = base_url+'my-wallet';
21
  }
21
  }
22
  function Order(){
22
  function Order(){
23
  window.location.href = base_url+'my-orders';
23
  window.location.href = base_url+'my-orders';
Line 99... Line 99...
99
      if(res!='')
99
      if(res!='')
100
      {
100
      {
101
        data = JSON.parse(res);
101
        data = JSON.parse(res);
102
        days = data.business_days;
102
        days = data.business_days;
103
        if(parseInt(days) < 0){
103
        if(parseInt(days) < 0){
104
        	alert('This location is not servicable')
104
        	alert('This location is not servicable');
105
        }else if(parseInt(days) > 0){
105
        }else if(parseInt(days) > 0){
106
        	Days = days;
106
        	Days = days;
-
 
107
        	document.getElementsByClassName('delivery_info_cont')[0].style.display = 'block';
107
            document.getElementById('deliverinfo').innerHTML = 'Delivery to this address will take '+days+' business days. Delivery esitmate '+data.delivery_estimate;
108
            document.getElementById('deliverinfo').innerHTML = 'Delivery to this address will take '+days+' business days. Delivery esitmate '+data.delivery_estimate;
108
            document.getElementById('deliverinfo').style.display = 'block';
109
            document.getElementById('deliverinfo').style.display = 'block';
109
            document.getElementById('deliverSubmit').style.display = 'block';
110
            document.getElementById('deliverSubmit').style.display = 'block';
-
 
111
            document.getElementsByClassName('address-form')[0].style.display = 'none';
110
        } 
112
        } 
111
      }
113
      }
112
    });
114
    });
113
}
115
}
114
function deliveryAddress(){
116
function deliveryAddress(){
Line 129... Line 131...
129
		}
131
		}
130
      }
132
      }
131
    });
133
    });
132
}
134
}
133
 
135
 
-
 
136
function closeAddress(){
-
 
137
  document.getElementsByClassName('delivery_info_cont')[0].style.display = 'none';
-
 
138
}
-
 
139
 
134
function showAddressForm(){
140
function showAddressForm(){
135
  if(document.getElementsByClassName('update-address')[0].style.display == 'block'){
141
  if(document.getElementsByClassName('update-address')[0].style.display == 'block'){
136
    document.getElementsByClassName('update-address')[0].style.display = 'none';
142
    document.getElementsByClassName('update-address')[0].style.display = 'none';
137
    document.getElementsByClassName('address-form')[0].style.display = 'block';
143
    document.getElementsByClassName('address-form')[0].style.display = 'block';
138
  }else{
144
  }else{