Subversion Repositories SmartDukaan

Rev

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

Rev 26218 Rev 27754
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
 
2
 
3
	$(".create-prebooking-listing").live('click', function() {
3
	$(document).on('click', ".create-prebooking-listing", function() {
4
		console.log("Create Prebooking Listing Button Clicked...")
4
		console.log("Create Prebooking Listing Button Clicked...")
5
		loadCreatePrebookingListing("main-content");
5
		loadCreatePrebookingListing("main-content");
6
	});
6
	});
7
 
7
 
8
	$(".prebooking-listings").live('click', function() {
8
	$(document).on('click', ".prebooking-listings", function() {
9
		console.log("Prebooking Listings Button Clicked...")
9
		console.log("Prebooking Listings Button Clicked...")
10
		loadPrebookingListings("main-content");
10
		loadPrebookingListings("main-content");
11
	});
11
	});
12
 
12
 
13
	$(".create-prebooking-order").live('click', function() {
13
	$(document).on('click', ".create-prebooking-order", function() {
14
		console.log("Create Prebooking Order Button Clicked...")
14
		console.log("Create Prebooking Order Button Clicked...")
15
		loadCreatePrebookingListings("main-content");
15
		loadCreatePrebookingListings("main-content");
16
	});
16
	});
17
 
17
 
18
	$(".prebooking-orders").live('click', function() {
18
	$(document).on('click', ".prebooking-orders", function() {
19
		console.log("Prebooking Orders Button Clicked...")
19
		console.log("Prebooking Orders Button Clicked...")
20
		loadPrebookingOrders("main-content");
20
		loadPrebookingOrders("main-content");
21
	});
21
	});
22
 
22
 
23
	$("#prebooking-listings-paginated .next").live(
23
	$("#prebooking-listings-paginated .next").live(
Line 59... Line 59...
59
						'prebooking-order-details-container');
59
						'prebooking-order-details-container');
60
				$(this).blur();
60
				$(this).blur();
61
			});
61
			});
62
 
62
 
63
	/*
63
	/*
64
	 * $('#brands li a').live('click', function(){
64
	 * $(document).on('click', '#brands li a', function(){
65
	 * $('#brand-value').text($(this).text());
65
	 * $('#brand-value').text($(this).text());
66
	 * loadItemsDescriptionByBrand("items-description-container",
66
	 * loadItemsDescriptionByBrand("items-description-container",
67
	 * $(this).text()); console.log($(this).text()); });
67
	 * $(this).text()); console.log($(this).text()); });
68
	 */
68
	 */
69
 
69
 
Line 125... Line 125...
125
							updatePrebookingListing(prebookingListingId,
125
							updatePrebookingListing(prebookingListingId,
126
									offset, "prebooking-listings-table");
126
									offset, "prebooking-listings-table");
127
						}
127
						}
128
					});
128
					});
129
 
129
 
130
	$("#quantity").live("change paste keyup", function() {
130
	$(document).on("change paste keyup", "#quantity", function() {
131
		var quantity = parseFloat($(this).val());
131
		var quantity = parseFloat($(this).val());
132
		if (quantity <= 0) {
132
		if (quantity <= 0) {
133
			alert("Quantity must be greater than zero");
133
			alert("Quantity must be greater than zero");
134
			$(this).val(1);
134
			$(this).val(1);
135
		} else if (quantity > 0) {
135
		} else if (quantity > 0) {
Line 140... Line 140...
140
 
140
 
141
});
141
});
142
 
142
 
143
$(document).ready(function() {
143
$(document).ready(function() {
144
 
144
 
145
	$("#quantity").live("blur", function() {
145
	$(document).on("blur", "#quantity", function() {
146
		console.log("quantity blur called");
146
		console.log("quantity blur called");
147
		if ($(this).val() == "") {
147
		if ($(this).val() == "") {
148
			$(this).val(1);
148
			$(this).val(1);
149
			$('#totalAmount').val($('#advanceAmount').val());
149
			$('#totalAmount').val($('#advanceAmount').val());
150
		}
150
		}