Subversion Repositories SmartDukaan

Rev

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

Rev 17413 Rev 17424
Line 175... Line 175...
175
        if (!(a.indexOf(k)>=0)){
175
        if (!(a.indexOf(k)>=0)){
176
            e.preventDefault();
176
            e.preventDefault();
177
    	}
177
    	}
178
    });*/
178
    });*/
179
    
179
    
180
    $('#productLabelLink').live('click', function() {
180
    $('.link-requiring-itemid-for-productlabel').live('click', function(){
181
		$("div#productLabelDiv").show();
181
    	var linkurl = $(this).attr('href');
-
 
182
    	$('<form id = "tempForm" target=_blank onsubmit = "closeColorBox() "style = "text-align:center" method = "GET" action = "'+ linkurl +'">').appendTo('body');
-
 
183
    	
182
		$('#productLabelItemId').val('');
184
    	$('form#tempForm').append($('<span>Specify Item Id: </span><input type = "text" name = "productLabelItemId" />'));
-
 
185
    	$('form#tempForm').append($('<span>Specify Item No: </span><input type = "text" name = "productLabelItemNo" />'));
183
		$('#productLabelItemNo').val('');
186
    	$('form#tempForm').append($('<input type = "submit"  value = "Submit"/>'));
-
 
187
    	
184
		$.colorbox({
188
    	$.colorbox({
185
            inline : true,
189
    		inline : true,
186
            width : "350px",
190
            width : "325px",
187
            height : "200px",
191
            height : "200px",
-
 
192
            opacity : "0.30",
-
 
193
            overlayClose :	true,
-
 
194
            escKey :	true,
188
            href : "div#productLabelDiv",
195
            href : "#tempForm",
189
            onClosed : function() {
196
            onClosed : function() {
190
                $("div#productLabelDiv").hide();
197
                $('#tempForm').remove();
191
            }
198
            }
192
		});
199
    	});
-
 
200
    	event.preventDefault();
-
 
201
    	return false;
193
	});
202
    	
194
    
203
    });
-
 
204
 
195
    $('#productLabelForm').live('submit', function() {
205
    function closeColorBox(){
196
		var productLabelItemId = $("input[name='productLabelItemId']").val();
206
    	var productLabelItemId = $("input[name='productLabelItemId']").val();
197
		if(productLabelItemId==null || productLabelItemId=="")
207
		if(productLabelItemId==null || productLabelItemId=="")
198
		{
208
		{
199
			alert("Please enter Item Id");
209
			alert("Please enter Item Id");
200
			$('input[name=productLabelItemId]').focus();
210
			$('input[name=productLabelItemId]').focus();
201
			return false;
211
			return false;
Line 205... Line 215...
205
		{
215
		{
206
			alert("Please enter Item Number");
216
			alert("Please enter Item Number");
207
			$('input[name=productLabelItemNo]').focus();
217
			$('input[name=productLabelItemNo]').focus();
208
			return false;
218
			return false;
209
		}
219
		}
210
		generateProductLabel(productLabelItemId, productLabelItemNo);
-
 
211
		return false;
220
		$.colorbox.close();
212
	});
221
    }
213
});
222
});