Subversion Repositories SmartDukaan

Rev

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

Rev 9064 Rev 9232
Line 27... Line 27...
27
				$('#adgroupName').attr({ maxLength : 255 });
27
				$('#adgroupName').attr({ maxLength : 255 });
28
				$('#headline').attr({ maxLength : 25 });
28
				$('#headline').attr({ maxLength : 25 });
29
				$('#description1').attr({ maxLength : 35 });
29
				$('#description1').attr({ maxLength : 35 });
30
				$('#description2').attr({ maxLength : 35 });
30
				$('#description2').attr({ maxLength : 35 });
31
				$('#displayUrl').attr({ maxLength : 35 });
31
				$('#displayUrl').attr({ maxLength : 35 });
-
 
32
				$('#catalogItemId').keypress(function(e) {
-
 
33
    				var a = [];
-
 
34
                        var k = e.which;
-
 
35
                    
-
 
36
                        for (i = 48; i < 58; i++){
-
 
37
                    		{
-
 
38
                            	a.push(i);
-
 
39
                    		}
-
 
40
                    	}
-
 
41
                    
-
 
42
                        if (!(a.indexOf(k)>=0)){
-
 
43
                            e.preventDefault();
-
 
44
                    	}
-
 
45
    			});
-
 
46
				$('#catalogItemIdUpdate').keypress(function(e) {
-
 
47
    				var a = [];
-
 
48
                        var k = e.which;
-
 
49
                    
-
 
50
                        for (i = 48; i < 58; i++){
-
 
51
                    		{
-
 
52
                            	a.push(i);
-
 
53
                    		}
-
 
54
                    	}
-
 
55
                    
-
 
56
                        if (!(a.indexOf(k)>=0)){
-
 
57
                            e.preventDefault();
-
 
58
                    	}
-
 
59
    			});
32
				$('#campaignAmount').keypress(function(e) {
60
				$('#campaignAmount').keypress(function(e) {
33
                    var a = [];
61
                    var a = [];
34
                    var k = e.which;
62
                    var k = e.which;
35
                
63
                
36
                    for (i = 46; i < 58; i++){
64
                    for (i = 46; i < 58; i++){
Line 146... Line 174...
146
                
174
                
147
                    if (!(a.indexOf(k)>=0)){
175
                    if (!(a.indexOf(k)>=0)){
148
                        e.preventDefault();
176
                        e.preventDefault();
149
                	}
177
                	}
150
    			});
178
    			});
-
 
179
				$('#campaignAmountUpdate').keypress(function(e) {
-
 
180
                    var a = [];
-
 
181
                    var k = e.which;
-
 
182
                
-
 
183
                    for (i = 46; i < 58; i++){
-
 
184
                		if(i == 47){
-
 
185
                			continue;
-
 
186
                		}
-
 
187
                		else{
-
 
188
                        	a.push(i);
-
 
189
                		}
-
 
190
                	}
-
 
191
                
-
 
192
                    if (!(a.indexOf(k)>=0)){
-
 
193
                        e.preventDefault();
-
 
194
                	}
-
 
195
    			});
-
 
196
				$('#bidAmountUpdate').keypress(function(e) {
-
 
197
                    var a = [];
-
 
198
                    var k = e.which;
-
 
199
                
-
 
200
                    for (i = 46; i < 58; i++){
-
 
201
                		if(i == 47){
-
 
202
                			continue;
-
 
203
                		}
-
 
204
                		else{
-
 
205
                        	a.push(i);
-
 
206
                		}
-
 
207
                	}
-
 
208
                
-
 
209
                    if (!(a.indexOf(k)>=0)){
-
 
210
                        e.preventDefault();
-
 
211
                	}
-
 
212
    			});
-
 
213
				$('#bidUpdate').keypress(function(e) {
-
 
214
                    var a = [];
-
 
215
                    var k = e.which;
-
 
216
                
-
 
217
                    for (i = 46; i < 58; i++){
-
 
218
                		if(i == 47){
-
 
219
                			continue;
-
 
220
                		}
-
 
221
                		else{
-
 
222
                        	a.push(i);
-
 
223
                		}
-
 
224
                	}
-
 
225
                
-
 
226
                    if (!(a.indexOf(k)>=0)){
-
 
227
                        e.preventDefault();
-
 
228
                	}
-
 
229
    			});
151
 			 });
230
 			 });
152
    		 
231
    		 
153
         </script>
232
         </script>
154
	</head>
233
	</head>
155
	<body>
234
	<body>
Line 272... Line 351...
272
					<input type='text' id='url' name='url'/>
351
					<input type='text' id='url' name='url'/>
273
						<br>
352
						<br>
274
					<span>Display Url: </span>
353
					<span>Display Url: </span>
275
					<input type='text' id='displayUrl' name='displayUrl'/><span style='font-size:12px;padding-left:5px;color:red;'>(Max. 35 Characters)</span>
354
					<input type='text' id='displayUrl' name='displayUrl'/><span style='font-size:12px;padding-left:5px;color:red;'>(Max. 35 Characters)</span>
276
						<br>
355
						<br>
-
 
356
					<span style='font-size:14px;padding-left:5px;color:red;'>* Use #price to include Item Price in Descrpition1.(Use once only) </span>
-
 
357
					<br>
277
                </div>
358
                </div>
278
				<div id='addKeywordDiv' class="hidden">
359
				<div id='addKeywordDiv' class="hidden">
279
					<span>Select Campaign: </span>
360
					<span>Select Campaign: </span>
280
					<select id='campaignList3' name='campaignList3'>
361
					<select id='campaignList3' name='campaignList3'>
281
							<option value='-1'>---Select Campaign--</option>
362
							<option value='-1'>---Select Campaign--</option>
Line 296... Line 377...
296
					<input type='text' id='keyword4' name='keyword4'/><span> Bid: </span><span style="color:red">*</span><input type='text' id='bid4' name='bid4'/><span> Match Type: </span><select id='matchType4' name='matchType4'><option value='1'>EXACT</option><option value='2'>PHRASE</option><option value='3' selected='selected'>BROAD</option></select><br>
377
					<input type='text' id='keyword4' name='keyword4'/><span> Bid: </span><span style="color:red">*</span><input type='text' id='bid4' name='bid4'/><span> Match Type: </span><select id='matchType4' name='matchType4'><option value='1'>EXACT</option><option value='2'>PHRASE</option><option value='3' selected='selected'>BROAD</option></select><br>
297
					<input type='text' id='keyword5' name='keyword5'/><span> Bid: </span><span style="color:red">*</span><input type='text' id='bid5' name='bid5'/><span> Match Type: </span><select id='matchType5' name='matchType5'><option value='1'>EXACT</option><option value='2'>PHRASE</option><option value='3' selected='selected'>BROAD</option></select><br>
378
					<input type='text' id='keyword5' name='keyword5'/><span> Bid: </span><span style="color:red">*</span><input type='text' id='bid5' name='bid5'/><span> Match Type: </span><select id='matchType5' name='matchType5'><option value='1'>EXACT</option><option value='2'>PHRASE</option><option value='3' selected='selected'>BROAD</option></select><br>
298
					<br>
379
					<br>
299
					<span style='font-size:14px;padding-left:5px;color:red;'>* Default AdGroup Bid Amount will be passed if Bid Details are empty.</span>
380
					<span style='font-size:14px;padding-left:5px;color:red;'>* Default AdGroup Bid Amount will be passed if Bid Details are empty.</span>
300
                </div>
381
                </div>
301
				<div id = 'addRecordsSubmitDiv'>
382
				
302
					<input disabled='disabled' type="submit" value = "Submit" id="addRecordSubmit"/>
-
 
303
					<input id='cancelAddRecords' type='button' value='Cancel'>
-
 
304
                </div>
-
 
305
        </div>
383
        </div>
306
		<div id='updateRecordDataDiv' class='hidden'>
384
		<div id='updateRecordDataDiv' class='hidden'>
-
 
385
			<input type = 'radio' id = 'campaignRdoUpdate' name = 'adwordUpdateRadio' value = 'campaignRdoUpdate' />Campaign
-
 
386
			<input type = 'radio' id = 'adgroupRdoUpdate' name = 'adwordUpdateRadio' value = 'adgroupRdoUpdate' />AdGroup
-
 
387
			<input type = 'radio' id = 'keywordRdoUpdate' name = 'adwordUpdateRadio' value = 'keywordRdoUpdate' />Keyword
-
 
388
			
-
 
389
			<div id='updateCampaignDiv' class="hidden">
-
 
390
					<span>Select Campaign: </span>
-
 
391
					<select id='campaignListUpdate1' name='campaignListUpdate1'>
-
 
392
						<option value='-1'>---Select Campaign--</option>
-
 
393
						#foreach($campaign in $campaigns)
-
 
394
							<option value='$campaign.getCampaignId()'>$campaign.getName()</option>
-
 
395
						#end 
-
 
396
                    </select><br>
-
 
397
					<span>Name: </span>
-
 
398
					<input type="text" id="campaignNameUpdate" name="campaignNameUpdate"/>
-
 
399
						<br>
-
 
400
                    <span>Status: </span>
-
 
401
					<select id='campaignStatusUpdate' name='campaignStatusUpdate'>
-
 
402
						<option value='1'>ACTIVE</option>
-
 
403
						<option value='2' selected='selected'>PAUSED</option>
-
 
404
						<option value='3'>DELETED</option>
-
 
405
                    </select>
-
 
406
						<br>
-
 
407
                    <!-- <span>Start Date: </span><span style="color:red">*</span>
-
 
408
					<input id="startDateUpdate" name="startDate" type="text" size="25">
-
 
409
						<br>
-
 
410
					<span>End Date: </span><span style="color:red">*</span>
-
 
411
					<input id="endDateUpdate" name="endDateUpdate" type="text" size="25">
-
 
412
						<br> -->
-
 
413
					<span>Budget Amount: </span>
-
 
414
					<input type="text" id="campaignAmountUpdate" name="campaignAmountUpdate"/>
-
 
415
						<br>
-
 
416
					
-
 
417
					</div>
-
 
418
					
-
 
419
			<div id='updateAdgroupDiv' class="hidden">
-
 
420
					<span>Select Campaign: </span>
-
 
421
					<select id='campaignListUpdate2' name='campaignListUpdate2'>
-
 
422
						<option value='-1'>---Select Campaign--</option>
-
 
423
						#foreach($campaign in $campaigns)
-
 
424
							<option value='$campaign.getCampaignId()'>$campaign.getName()</option>
-
 
425
						#end 
-
 
426
                    </select>
-
 
427
						<br>
-
 
428
					<span>Select Adgroup: </span>
-
 
429
					<select id='adgroupListUpdate1' name='adgroupListUpdate1'>
-
 
430
							<option value='-1'>---Select Adgroup--</option>
-
 
431
                    </select>
-
 
432
						<br>
-
 
433
                    <span>Adgroup Name: </span>
-
 
434
					<input type='text' id='adgroupNameUpdate' name='adgroupNameUpdate'/><span style='font-size:12px;padding-left:5px;color:red;'>(Max. 255 Characters)</span>
-
 
435
						<br>
-
 
436
					<span>Status: </span>
-
 
437
					<select id='adgroupStatusUpdate' name='adgroupStatusUpdate'>
-
 
438
						<option value='1'>ENABLED</option>
-
 
439
						<option value='2' selected='selected'>PAUSED</option>
-
 
440
						<option value='3'>DELETED</option>
-
 
441
                    </select>
-
 
442
						<br>
-
 
443
					<span>Catalog Item Id: </span>
-
 
444
					<input type='text' id='catalogItemIdUpdate' name='catalogItemIdUpdate'/>
-
 
445
						<br>
-
 
446
                    <span>Bid Amount: </span>
-
 
447
					<input type='text' id='bidAmountUpdate' name='bidAmountUpdate'/><br>
-
 
448
                </div>
-
 
449
				<div id='updateKeywordDiv' class="hidden">
-
 
450
					<span>Select Campaign: </span>
-
 
451
					<select id='campaignListUpdate3' name='campaignListUpdate3'>
-
 
452
							<option value='-1'>---Select Campaign--</option>
-
 
453
					    #foreach($campaign in $campaigns)
-
 
454
							<option value='$campaign.getCampaignId()'>$campaign.getName()</option>
-
 
455
						#end
-
 
456
                    </select>
-
 
457
						<br>
-
 
458
					<span>Select Adgroup: </span>
-
 
459
					<select id='adgroupListUpdate2' name='adgroupListUpdate2'>
-
 
460
							<option value='-1'>---Select Adgroup--</option>
-
 
461
                    </select>
-
 
462
						<br>
-
 
463
					<span>Select Keyword: </span>
-
 
464
					<select id='keywordListUpdate1' name='keywordListUpdate1'>
-
 
465
							<option value='-1'>---Select Keyword--</option>
-
 
466
                    </select>
-
 
467
						<br>
-
 
468
                    <span> Text: </span><input type='text' id='keywordUpdate' name='keywordUpdate'/>
-
 
469
					<br>
-
 
470
					<span> Bid: </span><input type='text' id='bidUpdate' name='bidUpdate'/>
-
 
471
					<br>
-
 
472
					<span> Match Type: </span><select id='matchTypeUpdate' name='matchTypeUpdate'><option value='1'>EXACT</option><option value='2'>PHRASE</option><option value='3' selected='selected'>BROAD</option></select><br>
-
 
473
                </div>
307
			<div>
474
				</div>
-
 
475
			<div id = 'addUpdateRecordsSubmitDiv'>
-
 
476
					<input disabled='disabled' type="submit" value = "Submit" id="addUpdateRecordSubmit"/>
-
 
477
					<input id='cancelAddUpdateRecords' type='button' value='Cancel'>
-
 
478
                </div>
-
 
479
		<!-- <div>
308
            <span style='font-size:14px;padding-left:5px;color:red;'>Coming Soon</span></div>
480
            <span style='font-size:14px;padding-left:5px;color:red;'>Coming Soon</span></div>
-
 
481
			</div> -->
309
        </div>
482
            </div>
310
         </form>
483
         </form>
311
		 <br><br>
484
		 <br><br>
312
			<a href='$request.getContextPath()/reports'>
485
			<a href='$request.getContextPath()/reports'>
313
    		Back to Dashboard
486
    		Back to Dashboard
314
    	</a>
487
    	</a>
Line 428... Line 601...
428
					$('input[name=keyword1]').focus();
601
					$('input[name=keyword1]').focus();
429
					return false;
602
					return false;
430
				}
603
				}
431
			}
604
			}
432
		}
605
		}
-
 
606
		if(adwordsOpRadioBtnValue == 'updateOpRadio'){
-
 
607
			if(adwordUpdateRadio =='campaignRdoUpdate'){
-
 
608
				var campaignSelectedUpdate1 = $("select[id='campaignListUpdate1']").val();
-
 
609
				var campaignNameUpdate = $("input[name='campaignNameUpdate']").val();
-
 
610
				var campaignAmountUpdate = $("select[id='campaignAmountUpdate']").val();
-
 
611
				if(campaignSelectedUpdate1 =='-1'){
-
 
612
					alert('Please Select a Campaign');
-
 
613
					$("select[id='campaignListUpdate1']").focus();
-
 
614
					return false;
-
 
615
				}
-
 
616
				if(campaignNameUpdate == null || campaignNameUpdate == ""){
-
 
617
					alert('Campaign Name is Mandatory');
-
 
618
					$("input[name='campaignNameUpdate']").focus();
-
 
619
					return false;
-
 
620
				}
-
 
621
				if(campaignAmountUpdate == null || campaignAmountUpdate == ""){
-
 
622
					alert('Campaign Amount is Mandatory');
-
 
623
					$("input[name='campaignAmountUpdate']").focus();
-
 
624
					return false;
-
 
625
				}
-
 
626
			}
-
 
627
			if(adwordUpdateRadio =='adgroupRdoUpdate'){
-
 
628
				var campaignSelectedUpdate2 = $("select[id='campaignListUpdate2']").val();
-
 
629
				var adgroupSelectUpdate1 = $("select[id='adgroupListUpdate1']").val();
-
 
630
				var adgroupNameUpdate = $("select[id='adgroupNameUpdate']").val();
-
 
631
				var bidAmountUpdate = $("select[id='bidAmountUpdate']").val();
-
 
632
				if(campaignSelectedUpdate2 =='-1'){
-
 
633
					alert('Please Select a Campaign');
-
 
634
					$("select[id='campaignListUpdate2']").focus();
-
 
635
					return false;
-
 
636
				}
-
 
637
				if(adgroupSelectUpdate1 =='-1'){
-
 
638
					alert('Please Select a Ad Group');
-
 
639
					$("select[id='adgroupListUpdate1']").focus();
-
 
640
					return false;
-
 
641
				}
-
 
642
				if(adgroupNameUpdate == null || adgroupNameUpdate == ""){
-
 
643
					alert('Ad Group Name is Mandatory');
-
 
644
					$("input[name='adgroupNameUpdate']").focus();
-
 
645
					return false;
-
 
646
				}
-
 
647
				if(bidAmountUpdate == null || bidAmountUpdate == ""){
-
 
648
					alert('Bid Amount is Mandatory');
-
 
649
					$("input[name='bidAmountUpdate']").focus();
-
 
650
					return false;
-
 
651
				}
-
 
652
			}
-
 
653
			if(adwordUpdateRadio =='keywordRdoUpdate'){
-
 
654
				var campaignSelectedUpdate3 = $("select[id='campaignListUpdate3']").val();
-
 
655
				var adgroupSelectUpdate2 = $("select[id='adgroupListUpdate2']").val();
-
 
656
				var keywordSelectUpdate1 = $("select[id='keywordListUpdate1']").val();
-
 
657
				var keywordUpdate = $("select[id='keywordUpdate']").val();
-
 
658
				var bidUpdate = $("select[id='bidUpdate']").val();
-
 
659
				if(campaignSelectedUpdate3 == '-1'){
-
 
660
					alert('Please Select a Campaign');
-
 
661
					$("select[id='campaignListUpdate3']").focus();
-
 
662
					return false;
-
 
663
				}
-
 
664
				if(adgroupSelectUpdate2 =='-1'){
-
 
665
					alert('Please Select a Ad Group');
-
 
666
					$("select[id='adgroupListUpdate2']").focus();
-
 
667
					return false;
-
 
668
				}
-
 
669
				if(keywordSelectUpdate1 =='-1'){
-
 
670
					alert('Please Select a Keyword');
-
 
671
					$("select[id='keywordListUpdate1']").focus();
-
 
672
					return false;
-
 
673
				}
-
 
674
				if(keywordUpdate == null || keywordUpdate == ""){
-
 
675
					alert('Keyword Text is Mandatory');
-
 
676
					$("input[name='keywordUpdate']").focus();
-
 
677
					return false;
-
 
678
				}
-
 
679
				if(bidUpdate == null || bidUpdate == ""){
-
 
680
					alert('Bid Amount is Mandatory');
-
 
681
					$("input[name='bidUpdate']").focus();
-
 
682
					return false;
-
 
683
				}
-
 
684
			}
-
 
685
		}
433
		return true;
686
		return true;
434
    }
687
    }
435
</script>
688
</script>
436
</html>
689
</html>
437
690