Subversion Repositories SmartDukaan

Rev

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

Rev 24882 Rev 26218
Line 12... Line 12...
12
											tentativeAmount : {
12
											tentativeAmount : {
13
												required : true
13
												required : true
14
											},
14
											},
15
											typeaheaditem : {
15
											typeaheaditem : {
16
												required : true
16
												required : true
17
											}
17
											},
-
 
18
											placementPolicy : {
-
 
19
												required : true
-
 
20
											},
-
 
21
											activationPolicy : {
-
 
22
												required : true
-
 
23
											},
-
 
24
											startDate : {
-
 
25
												required : true
-
 
26
											},
-
 
27
											endDate : {
-
 
28
												required : true
-
 
29
											},
18
 
30
 
19
										},
31
										},
20
										messages : {
32
										messages : {
21
											advanceAmount : {
33
											advanceAmount : {
22
												required : "Please enter advance amount"
34
												required : "Please enter advance amount"
Line 25... Line 37...
25
												required : "Please enter the tentative amount"
37
												required : "Please enter the tentative amount"
26
											},
38
											},
27
 
39
 
28
											typeaheaditem : {
40
											typeaheaditem : {
29
												required : "Please enter the item"
41
												required : "Please enter the item"
30
											}
42
											},
-
 
43
											placementPolicy : {
-
 
44
												required : "Please enter the Placement Policy"
-
 
45
											},
-
 
46
											activationPolicy : {
-
 
47
												required : "Please enter the Activation Policy"
-
 
48
											},
-
 
49
											startDate : {
-
 
50
												require : "Please choose start date"
-
 
51
											},
-
 
52
											endDate : {
-
 
53
												require : "Please choose end date"
-
 
54
											},
31
 
55
 
32
										},
56
										},
33
										submitHandler : function(form, event) {
57
										submitHandler : function(form, event) {
34
											event.preventDefault();
58
											event.preventDefault();
35
											if (validatePrebookingListingDetails()) {
59
											if (validatePrebookingListingDetails()) {
Line 50... Line 74...
50
															$('#main-content')
74
															$('#main-content')
51
																	.html(
75
																	.html(
52
																			response);
76
																			response);
53
														});
77
														});
54
												return false; // required to
78
												return false; // required to
55
																// block normal
79
												// block normal
56
																// submit since
80
												// submit since
57
																// you used ajax
81
												// you used ajax
58
											}
82
											}
59
										}
83
										}
60
									});
84
									});
61
 
85
 
62
				});
86
				});
Line 119... Line 143...
119
	console.log("validation prebooking listing error = " + error);
143
	console.log("validation prebooking listing error = " + error);
120
	return error;
144
	return error;
121
}
145
}
122
 
146
 
123
function prebookingListingDetailsJson() {
147
function prebookingListingDetailsJson() {
124
	console.log("prebookingListingDetailsJson")
-
 
125
	var prebookingListingObject = {};
148
	var prebookingListingObject = {};
126
	prebookingListingObject['advanceAmount'] = $("#advanceAmount").val();
149
	prebookingListingObject['advanceAmount'] = $("#advanceAmount").val();
127
	prebookingListingObject['tentativeAmount'] = $('#tentativeAmount').val();
150
	prebookingListingObject['tentativeAmount'] = $('#tentativeAmount').val();
128
	prebookingListingObject['catalogId'] = itemCatalogId;
151
	prebookingListingObject['catalogId'] = itemCatalogId;
-
 
152
	prebookingListingObject['placementPolicy'] = $('#placementPolicy').val();
-
 
153
	prebookingListingObject['activationPolicy'] = $('#activationPolicy').val();
-
 
154
	prebookingListingObject['activeTimestamp'] = startDate;
-
 
155
	prebookingListingObject['expireTimestamp'] = endDate;
129
	return JSON.stringify(prebookingListingObject);
156
	return JSON.stringify(prebookingListingObject);
130
}
157
}
131
158