| Line 1... |
Line 1... |
| 1 |
$(function() {
|
1 |
$(function() {
|
| 2 |
$('#addOpRadio').live('click', function() {
|
2 |
$('#addOpRadio').live('click', function() {
|
| 3 |
$('#addUpdateRecordSubmit').attr('disabled', 'true');
|
3 |
$('#addUpdateRecordSubmit').attr('disabled', 'true');
|
| 4 |
$('div#addRecordDataDiv').show();
|
4 |
$('div#addRecordDataDiv').show();
|
| 5 |
$('div#updateRecordDataDiv').hide();
|
5 |
$('div#updateRecordDataDiv').hide();
|
| 6 |
|
6 |
|
| 7 |
$('div#updateCampaignDiv').hide();
|
7 |
$('div#updateCampaignDiv').hide();
|
| 8 |
$('div#updateKeywordDiv').hide();
|
8 |
$('div#updateKeywordDiv').hide();
|
| 9 |
$('div#updateAdgroupDiv').hide();
|
9 |
$('div#updateAdgroupDiv').hide();
|
| 10 |
|
10 |
|
| 11 |
$('#campaignRdoUpdate').attr("checked",false);
|
11 |
$('#campaignRdoUpdate').attr("checked",false);
|
| 12 |
$('#adgroupRdoUpdate').attr("checked",false);
|
12 |
$('#adgroupRdoUpdate').attr("checked",false);
|
| 13 |
$('#keywordRdoUpdate').attr("checked",false);
|
13 |
$('#keywordRdoUpdate').attr("checked",false);
|
| 14 |
$('#campaignListUpdate1').val('-1');
|
14 |
$('#campaignListUpdate1').val('-1');
|
| 15 |
$('#campaignNameUpdate').val('');
|
15 |
$('#campaignNameUpdate').val('');
|
| 16 |
$('#campaignStatusUpdate').val('2');
|
16 |
$('#campaignStatusUpdate').val('2');
|
| 17 |
|
17 |
|
| 18 |
$('#campaignListUpdate2').val('-1');
|
18 |
$('#campaignListUpdate2').val('-1');
|
| 19 |
$('#adgroupListUpdate1').find("option").remove();
|
19 |
$('#adgroupListUpdate1').find("option").remove();
|
| 20 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
20 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 21 |
$('#adgroupNameUpdate').val('');
|
21 |
$('#adgroupNameUpdate').val('');
|
| 22 |
$('#adgroupStatusUpdate').val('2');
|
22 |
$('#adgroupStatusUpdate').val('2');
|
| 23 |
$('#catalogItemIdUpdate').val('');
|
23 |
$('#catalogItemIdUpdate').val('');
|
| 24 |
$('#bidAmountUpdate').val('');
|
24 |
$('#bidAmountUpdate').val('');
|
| 25 |
|
25 |
|
| 26 |
$('#campaignListUpdate3').val('-1');
|
26 |
$('#campaignListUpdate3').val('-1');
|
| 27 |
$('#adgroupListUpdate2').find("option").remove();
|
27 |
$('#adgroupListUpdate2').find("option").remove();
|
| 28 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
28 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 29 |
$('#keywordListUpdate1').find("option").remove();
|
29 |
$('#keywordListUpdate1').find("option").remove();
|
| 30 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
30 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
| 31 |
$('#keywordUpdate').val('');
|
31 |
$('#keywordUpdate').val('');
|
| 32 |
$('#bidUpdate').val('');
|
32 |
$('#bidUpdate').val('');
|
| 33 |
$('#matchTypeUpdate').val('2');
|
33 |
$('#matchTypeUpdate').val('2');
|
| 34 |
|
34 |
|
| 35 |
});
|
35 |
});
|
| 36 |
|
36 |
|
| 37 |
$('#updateOpRadio').live('click', function() {
|
37 |
$('#updateOpRadio').live('click', function() {
|
| 38 |
$('div#addRecordDataDiv').hide();
|
38 |
$('div#addRecordDataDiv').hide();
|
| 39 |
$('div#updateRecordDataDiv').show();
|
39 |
$('div#updateRecordDataDiv').show();
|
| 40 |
$('#addUpdateRecordSubmit').attr('disabled', 'true');
|
40 |
$('#addUpdateRecordSubmit').attr('disabled', 'true');
|
| 41 |
|
41 |
|
| 42 |
$("#campaignRdo").attr("checked", false);
|
42 |
$("#campaignRdo").attr("checked", false);
|
| 43 |
$("#adgroupRdo").attr("checked", false);
|
43 |
$("#adgroupRdo").attr("checked", false);
|
| 44 |
$("#textAdRdo").attr("checked", false);
|
44 |
$("#textAdRdo").attr("checked", false);
|
| 45 |
$("#keywordRdo").attr("checked", false);
|
45 |
$("#keywordRdo").attr("checked", false);
|
| 46 |
$('div#addCampaignDiv').hide();
|
46 |
$('div#addCampaignDiv').hide();
|
| 47 |
$('div#addAdgroupDiv').hide();
|
47 |
$('div#addAdgroupDiv').hide();
|
| 48 |
$('div#addAdgroupAdDiv').hide();
|
48 |
$('div#addAdgroupAdDiv').hide();
|
| 49 |
$('div#addKeywordDiv').hide();
|
49 |
$('div#addKeywordDiv').hide();
|
| 50 |
$('#campaignName').val('');
|
50 |
$('#campaignName').val('');
|
| 51 |
$("#campaignStatus").val('2');
|
51 |
$("#campaignStatus").val('2');
|
| 52 |
$('#startDate').val('');
|
52 |
$('#startDate').val('');
|
| 53 |
$('#endDate').val('');
|
53 |
$('#endDate').val('');
|
| 54 |
$("#googleSearchNetwork").attr("checked", false);
|
54 |
$("#googleSearchNetwork").attr("checked", false);
|
| 55 |
$("#displayNetwork").attr("checked", false);
|
55 |
$("#displayNetwork").attr("checked", false);
|
| 56 |
$("#partnerSearchNetwork").attr("checked", false);
|
56 |
$("#partnerSearchNetwork").attr("checked", false);
|
| 57 |
$("#campaignAmount").val('');
|
57 |
$("#campaignAmount").val('');
|
| 58 |
$("#adgroupList1").find("option").remove();
|
58 |
$("#adgroupList1").find("option").remove();
|
| 59 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
59 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 60 |
$("#adgroupList2").find("option").remove();
|
60 |
$("#adgroupList2").find("option").remove();
|
| 61 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
61 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 62 |
$("#campaignList1").val('-1');
|
62 |
$("#campaignList1").val('-1');
|
| 63 |
$('#adgroupName').val('');
|
63 |
$('#adgroupName').val('');
|
| 64 |
$('#adgroupStatus').val('2');
|
64 |
$('#adgroupStatus').val('2');
|
| 65 |
$('#bidAmount').val('');
|
65 |
$('#bidAmount').val('');
|
| 66 |
$('#catalogItemId').val('');
|
66 |
$('#catalogItemId').val('');
|
| 67 |
$("#campaignList2").val('-1');
|
67 |
$("#campaignList2").val('-1');
|
| 68 |
$("#adgroupList1").val('-1');
|
68 |
$("#adgroupList1").val('-1');
|
| 69 |
$("#headline").val('');
|
69 |
$("#headline").val('');
|
| 70 |
$("#description1").val('');
|
70 |
$("#description1").val('');
|
| 71 |
$("#description2").val('');
|
71 |
$("#description2").val('');
|
| 72 |
$("#url").val('');
|
72 |
$("#url").val('');
|
| 73 |
$("#displayUrl").val('');
|
73 |
$("#displayUrl").val('');
|
| 74 |
$("#campaignList3").val('-1');
|
74 |
$("#campaignList3").val('-1');
|
| 75 |
$("#adgroupList2").val('-1');
|
75 |
$("#adgroupList2").val('-1');
|
| 76 |
$("#keyword1").val('');
|
76 |
$("#keyword1").val('');
|
| 77 |
$("#keyword2").val('');
|
77 |
$("#keyword2").val('');
|
| 78 |
$("#keyword3").val('');
|
78 |
$("#keyword3").val('');
|
| 79 |
$("#keyword4").val('');
|
79 |
$("#keyword4").val('');
|
| 80 |
$("#keyword5").val('');
|
80 |
$("#keyword5").val('');
|
| 81 |
$("#bid1").val('');
|
81 |
$("#bid1").val('');
|
| 82 |
$("#bid2").val('');
|
82 |
$("#bid2").val('');
|
| 83 |
$("#bid3").val('');
|
83 |
$("#bid3").val('');
|
| 84 |
$("#bid4").val('');
|
84 |
$("#bid4").val('');
|
| 85 |
$("#bid5").val('');
|
85 |
$("#bid5").val('');
|
| 86 |
$("#matchType1").val('3');
|
86 |
$("#matchType1").val('3');
|
| 87 |
$("#matchType2").val('3');
|
87 |
$("#matchType2").val('3');
|
| 88 |
$("#matchType3").val('3');
|
88 |
$("#matchType3").val('3');
|
| 89 |
$("#matchType4").val('3');
|
89 |
$("#matchType4").val('3');
|
| 90 |
$("#matchType5").val('3');
|
90 |
$("#matchType5").val('3');
|
| 91 |
});
|
91 |
});
|
| 92 |
|
92 |
|
| 93 |
$('#campaignRdo').live('click', function() {
|
93 |
$('#campaignRdo').live('click', function() {
|
| 94 |
$('div#addCampaignDiv').show();
|
94 |
$('div#addCampaignDiv').show();
|
| 95 |
$('div#addAdgroupDiv').hide();
|
95 |
$('div#addAdgroupDiv').hide();
|
| 96 |
$('div#addAdgroupAdDiv').hide();
|
96 |
$('div#addAdgroupAdDiv').hide();
|
| 97 |
$('div#addKeywordDiv').hide();
|
97 |
$('div#addKeywordDiv').hide();
|
| 98 |
|
98 |
|
| 99 |
$("#adgroupList1").find("option").remove();
|
99 |
$("#adgroupList1").find("option").remove();
|
| 100 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
100 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 101 |
$("#adgroupList2").find("option").remove();
|
101 |
$("#adgroupList2").find("option").remove();
|
| 102 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
102 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 103 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
103 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
| 104 |
$("#campaignList1").val('-1');
|
104 |
$("#campaignList1").val('-1');
|
| 105 |
$('#adgroupName').val('');
|
105 |
$('#adgroupName').val('');
|
| 106 |
$('#adgroupStatus').val('2');
|
106 |
$('#adgroupStatus').val('2');
|
| 107 |
$('#bidAmount').val('');
|
107 |
$('#bidAmount').val('');
|
| 108 |
$('#catalogItemId').val('');
|
108 |
$('#catalogItemId').val('');
|
| 109 |
$("#campaignList2").val('-1');
|
109 |
$("#campaignList2").val('-1');
|
| 110 |
$("#adgroupList1").val('-1');
|
110 |
$("#adgroupList1").val('-1');
|
| 111 |
$("#headline").val('');
|
111 |
$("#headline").val('');
|
| 112 |
$("#description1").val('');
|
112 |
$("#description1").val('');
|
| 113 |
$("#description2").val('');
|
113 |
$("#description2").val('');
|
| 114 |
$("#url").val('');
|
114 |
$("#url").val('');
|
| 115 |
$("#displayUrl").val('');
|
115 |
$("#displayUrl").val('');
|
| 116 |
$("#campaignList3").val('-1');
|
116 |
$("#campaignList3").val('-1');
|
| 117 |
$("#adgroupList2").val('-1');
|
117 |
$("#adgroupList2").val('-1');
|
| 118 |
$("#keyword1").val('');
|
118 |
$("#keyword1").val('');
|
| 119 |
$("#keyword2").val('');
|
119 |
$("#keyword2").val('');
|
| 120 |
$("#keyword3").val('');
|
120 |
$("#keyword3").val('');
|
| 121 |
$("#keyword4").val('');
|
121 |
$("#keyword4").val('');
|
| 122 |
$("#keyword5").val('');
|
122 |
$("#keyword5").val('');
|
| 123 |
$("#bid1").val('');
|
123 |
$("#bid1").val('');
|
| 124 |
$("#bid2").val('');
|
124 |
$("#bid2").val('');
|
| 125 |
$("#bid3").val('');
|
125 |
$("#bid3").val('');
|
| 126 |
$("#bid4").val('');
|
126 |
$("#bid4").val('');
|
| 127 |
$("#bid5").val('');
|
127 |
$("#bid5").val('');
|
| 128 |
$("#matchType1").val('3');
|
128 |
$("#matchType1").val('3');
|
| 129 |
$("#matchType2").val('3');
|
129 |
$("#matchType2").val('3');
|
| 130 |
$("#matchType3").val('3');
|
130 |
$("#matchType3").val('3');
|
| 131 |
$("#matchType4").val('3');
|
131 |
$("#matchType4").val('3');
|
| 132 |
$("#matchType5").val('3');
|
132 |
$("#matchType5").val('3');
|
| 133 |
$('#campaignName').val('');
|
133 |
$('#campaignName').val('');
|
| 134 |
$("#campaignStatus").val('2');
|
134 |
$("#campaignStatus").val('2');
|
| 135 |
$('#startDate').val('');
|
135 |
$('#startDate').val('');
|
| 136 |
$('#endDate').val('');
|
136 |
$('#endDate').val('');
|
| 137 |
$("#googleSearchNetwork").attr("checked", false);
|
137 |
$("#googleSearchNetwork").attr("checked", false);
|
| 138 |
$("#displayNetwork").attr("checked", false);
|
138 |
$("#displayNetwork").attr("checked", false);
|
| 139 |
$("#partnerSearchNetwork").attr("checked", false);
|
139 |
$("#partnerSearchNetwork").attr("checked", false);
|
| 140 |
$("#campaignAmount").val('');
|
140 |
$("#campaignAmount").val('');
|
| 141 |
});
|
141 |
});
|
| 142 |
|
142 |
|
| 143 |
$('#adgroupRdo').live('click', function() {
|
143 |
$('#adgroupRdo').live('click', function() {
|
| 144 |
$('div#addCampaignDiv').hide();
|
144 |
$('div#addCampaignDiv').hide();
|
| 145 |
$('div#addAdgroupDiv').show();
|
145 |
$('div#addAdgroupDiv').show();
|
| 146 |
$('div#addAdgroupAdDiv').hide();
|
146 |
$('div#addAdgroupAdDiv').hide();
|
| 147 |
$('div#addKeywordDiv').hide();
|
147 |
$('div#addKeywordDiv').hide();
|
| 148 |
$("#adgroupList1").find("option").remove();
|
148 |
$("#adgroupList1").find("option").remove();
|
| 149 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
149 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 150 |
$("#adgroupList2").find("option").remove();
|
150 |
$("#adgroupList2").find("option").remove();
|
| 151 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
151 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 152 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
152 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
| - |
|
153 |
|
| - |
|
154 |
$("#campaignList1").find("option:gt(0)").remove();
|
| - |
|
155 |
$.ajax({
|
| - |
|
156 |
type : 'GET',
|
| - |
|
157 |
url : '/Support/google-adwords!getCampaigns',
|
| - |
|
158 |
dataType : 'json',
|
| - |
|
159 |
success : function(reply) {
|
| - |
|
160 |
$("#campaignList1").find("option").remove();
|
| - |
|
161 |
$('#campaignList1').append($("<option></option>").val('-1').html('---Select Campaign---'));
|
| - |
|
162 |
$.each(reply.CampaignData, function(i,obj) {
|
| - |
|
163 |
$('#campaignList1').append($("<option></option>").val(obj.CampaignId).html(obj.Name));
|
| - |
|
164 |
});
|
| - |
|
165 |
}
|
| - |
|
166 |
});
|
| - |
|
167 |
|
| 153 |
$("#campaignList1").val('-1');
|
168 |
$("#campaignList1").val('-1');
|
| 154 |
$('#adgroupName').val('');
|
169 |
$('#adgroupName').val('');
|
| 155 |
$('#adgroupStatus').val('2');
|
170 |
$('#adgroupStatus').val('2');
|
| 156 |
$('#bidAmount').val('');
|
171 |
$('#bidAmount').val('');
|
| 157 |
$('#catalogItemId').val('');
|
172 |
$('#catalogItemId').val('');
|
| 158 |
$("#campaignList2").val('-1');
|
173 |
$("#campaignList2").val('-1');
|
| 159 |
$("#adgroupList1").val('-1');
|
174 |
$("#adgroupList1").val('-1');
|
| 160 |
$("#headline").val('');
|
175 |
$("#headline").val('');
|
| 161 |
$("#description1").val('');
|
176 |
$("#description1").val('');
|
| 162 |
$("#description2").val('');
|
177 |
$("#description2").val('');
|
| 163 |
$("#url").val('');
|
178 |
$("#url").val('');
|
| 164 |
$("#displayUrl").val('');
|
179 |
$("#displayUrl").val('');
|
| 165 |
$("#campaignList3").val('-1');
|
180 |
$("#campaignList3").val('-1');
|
| 166 |
$("#adgroupList2").val('-1');
|
181 |
$("#adgroupList2").val('-1');
|
| 167 |
$("#keyword1").val('');
|
182 |
$("#keyword1").val('');
|
| 168 |
$("#keyword2").val('');
|
183 |
$("#keyword2").val('');
|
| 169 |
$("#keyword3").val('');
|
184 |
$("#keyword3").val('');
|
| 170 |
$("#keyword4").val('');
|
185 |
$("#keyword4").val('');
|
| 171 |
$("#keyword5").val('');
|
186 |
$("#keyword5").val('');
|
| 172 |
$("#bid1").val('');
|
187 |
$("#bid1").val('');
|
| 173 |
$("#bid2").val('');
|
188 |
$("#bid2").val('');
|
| 174 |
$("#bid3").val('');
|
189 |
$("#bid3").val('');
|
| 175 |
$("#bid4").val('');
|
190 |
$("#bid4").val('');
|
| 176 |
$("#bid5").val('');
|
191 |
$("#bid5").val('');
|
| 177 |
$("#matchType1").val('3');
|
192 |
$("#matchType1").val('3');
|
| 178 |
$("#matchType2").val('3');
|
193 |
$("#matchType2").val('3');
|
| 179 |
$("#matchType3").val('3');
|
194 |
$("#matchType3").val('3');
|
| 180 |
$("#matchType4").val('3');
|
195 |
$("#matchType4").val('3');
|
| 181 |
$("#matchType5").val('3');
|
196 |
$("#matchType5").val('3');
|
| 182 |
$('#campaignName').val('');
|
197 |
$('#campaignName').val('');
|
| 183 |
$("#campaignStatus").val('2');
|
198 |
$("#campaignStatus").val('2');
|
| 184 |
$('#startDate').val('');
|
199 |
$('#startDate').val('');
|
| 185 |
$('#endDate').val('');
|
200 |
$('#endDate').val('');
|
| 186 |
$("#googleSearchNetwork").attr("checked", false);
|
201 |
$("#googleSearchNetwork").attr("checked", false);
|
| 187 |
$("#displayNetwork").attr("checked", false);
|
202 |
$("#displayNetwork").attr("checked", false);
|
| 188 |
$("#partnerSearchNetwork").attr("checked", false);
|
203 |
$("#partnerSearchNetwork").attr("checked", false);
|
| 189 |
$("#campaignAmount").val('');
|
204 |
$("#campaignAmount").val('');
|
| 190 |
});
|
205 |
});
|
| 191 |
|
206 |
|
| 192 |
$('#textAdRdo').live('click', function() {
|
207 |
$('#textAdRdo').live('click', function() {
|
| 193 |
$('div#addCampaignDiv').hide();
|
208 |
$('div#addCampaignDiv').hide();
|
| 194 |
$('div#addAdgroupDiv').hide();
|
209 |
$('div#addAdgroupDiv').hide();
|
| 195 |
$('div#addAdgroupAdDiv').show();
|
210 |
$('div#addAdgroupAdDiv').show();
|
| 196 |
$('div#addKeywordDiv').hide();
|
211 |
$('div#addKeywordDiv').hide();
|
| 197 |
$("#adgroupList1").find("option").remove();
|
212 |
$("#adgroupList1").find("option").remove();
|
| 198 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
213 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 199 |
$("#adgroupList2").find("option").remove();
|
214 |
$("#adgroupList2").find("option").remove();
|
| 200 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
215 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 201 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
216 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
| 202 |
$("#campaignList1").val('-1');
|
217 |
$("#campaignList1").val('-1');
|
| 203 |
$('#adgroupName').val('');
|
218 |
$('#adgroupName').val('');
|
| 204 |
$('#adgroupStatus').val('2');
|
219 |
$('#adgroupStatus').val('2');
|
| 205 |
$('#bidAmount').val('');
|
220 |
$('#bidAmount').val('');
|
| 206 |
$('#catalogItemId').val('');
|
221 |
$('#catalogItemId').val('');
|
| - |
|
222 |
$("#campaignList2").find("option:gt(0)").remove();
|
| - |
|
223 |
$.ajax({
|
| - |
|
224 |
type : 'GET',
|
| - |
|
225 |
url : '/Support/google-adwords!getCampaigns',
|
| - |
|
226 |
dataType : 'json',
|
| - |
|
227 |
success : function(reply) {
|
| 207 |
$("#campaignList2").val('-1');
|
228 |
$("#campaignList2").find("option").remove();
|
| - |
|
229 |
$('#campaignList2').append($("<option></option>").val('-1').html('---Select Campaign---'));
|
| - |
|
230 |
$.each(reply.CampaignData, function(i,obj) {
|
| - |
|
231 |
$('#campaignList2').append($("<option></option>").val(obj.CampaignId).html(obj.Name));
|
| - |
|
232 |
});
|
| - |
|
233 |
}
|
| - |
|
234 |
});
|
| 208 |
$("#adgroupList1").val('-1');
|
235 |
$("#adgroupList1").val('-1');
|
| 209 |
$("#headline").val('');
|
236 |
$("#headline").val('');
|
| 210 |
$("#description1").val('');
|
237 |
$("#description1").val('');
|
| 211 |
$("#description2").val('');
|
238 |
$("#description2").val('');
|
| 212 |
$("#url").val('');
|
239 |
$("#url").val('');
|
| 213 |
$("#displayUrl").val('');
|
240 |
$("#displayUrl").val('');
|
| 214 |
$("#campaignList3").val('-1');
|
241 |
$("#campaignList3").val('-1');
|
| 215 |
$("#adgroupList2").val('-1');
|
242 |
$("#adgroupList2").val('-1');
|
| 216 |
$("#keyword1").val('');
|
243 |
$("#keyword1").val('');
|
| 217 |
$("#keyword2").val('');
|
244 |
$("#keyword2").val('');
|
| 218 |
$("#keyword3").val('');
|
245 |
$("#keyword3").val('');
|
| 219 |
$("#keyword4").val('');
|
246 |
$("#keyword4").val('');
|
| 220 |
$("#keyword5").val('');
|
247 |
$("#keyword5").val('');
|
| 221 |
$("#bid1").val('');
|
248 |
$("#bid1").val('');
|
| 222 |
$("#bid2").val('');
|
249 |
$("#bid2").val('');
|
| 223 |
$("#bid3").val('');
|
250 |
$("#bid3").val('');
|
| 224 |
$("#bid4").val('');
|
251 |
$("#bid4").val('');
|
| 225 |
$("#bid5").val('');
|
252 |
$("#bid5").val('');
|
| 226 |
$("#matchType1").val('3');
|
253 |
$("#matchType1").val('3');
|
| 227 |
$("#matchType2").val('3');
|
254 |
$("#matchType2").val('3');
|
| 228 |
$("#matchType3").val('3');
|
255 |
$("#matchType3").val('3');
|
| 229 |
$("#matchType4").val('3');
|
256 |
$("#matchType4").val('3');
|
| 230 |
$("#matchType5").val('3');
|
257 |
$("#matchType5").val('3');
|
| 231 |
$('#campaignName').val('');
|
258 |
$('#campaignName').val('');
|
| 232 |
$("#campaignStatus").val('2');
|
259 |
$("#campaignStatus").val('2');
|
| 233 |
$('#startDate').val('');
|
260 |
$('#startDate').val('');
|
| 234 |
$('#endDate').val('');
|
261 |
$('#endDate').val('');
|
| 235 |
$("#googleSearchNetwork").attr("checked", false);
|
262 |
$("#googleSearchNetwork").attr("checked", false);
|
| 236 |
$("#displayNetwork").attr("checked", false);
|
263 |
$("#displayNetwork").attr("checked", false);
|
| 237 |
$("#partnerSearchNetwork").attr("checked", false);
|
264 |
$("#partnerSearchNetwork").attr("checked", false);
|
| 238 |
$("#campaignAmount").val('');
|
265 |
$("#campaignAmount").val('');
|
| 239 |
});
|
266 |
});
|
| 240 |
|
267 |
|
| 241 |
$('#keywordRdo').live('click', function() {
|
268 |
$('#keywordRdo').live('click', function() {
|
| 242 |
$('div#addCampaignDiv').hide();
|
269 |
$('div#addCampaignDiv').hide();
|
| 243 |
$('div#addAdgroupDiv').hide();
|
270 |
$('div#addAdgroupDiv').hide();
|
| 244 |
$('div#addAdgroupAdDiv').hide();
|
271 |
$('div#addAdgroupAdDiv').hide();
|
| 245 |
$('div#addKeywordDiv').show();
|
272 |
$('div#addKeywordDiv').show();
|
| 246 |
$("#adgroupList1").find("option").remove();
|
273 |
$("#adgroupList1").find("option").remove();
|
| 247 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
274 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 248 |
$("#adgroupList2").find("option").remove();
|
275 |
$("#adgroupList2").find("option").remove();
|
| 249 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
276 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 250 |
$("#campaignList1").val('-1');
|
277 |
$("#campaignList1").val('-1');
|
| 251 |
$('#adgroupName').val('');
|
278 |
$('#adgroupName').val('');
|
| 252 |
$('#adgroupStatus').val('2');
|
279 |
$('#adgroupStatus').val('2');
|
| 253 |
$('#bidAmount').val('');
|
280 |
$('#bidAmount').val('');
|
| 254 |
$('#catalogItemId').val('');
|
281 |
$('#catalogItemId').val('');
|
| 255 |
$("#campaignList2").val('-1');
|
282 |
$("#campaignList2").val('-1');
|
| 256 |
$("#adgroupList1").val('-1');
|
283 |
$("#adgroupList1").val('-1');
|
| 257 |
$("#headline").val('');
|
284 |
$("#headline").val('');
|
| 258 |
$("#description1").val('');
|
285 |
$("#description1").val('');
|
| 259 |
$("#description2").val('');
|
286 |
$("#description2").val('');
|
| 260 |
$("#url").val('');
|
287 |
$("#url").val('');
|
| 261 |
$("#displayUrl").val('');
|
288 |
$("#displayUrl").val('');
|
| - |
|
289 |
$("#campaignList3").find("option:gt(0)").remove();
|
| - |
|
290 |
$.ajax({
|
| - |
|
291 |
type : 'GET',
|
| - |
|
292 |
url : '/Support/google-adwords!getCampaigns',
|
| - |
|
293 |
dataType : 'json',
|
| - |
|
294 |
success : function(reply) {
|
| 262 |
$("#campaignList3").val('-1');
|
295 |
$("#campaignList3").find("option").remove();
|
| - |
|
296 |
$('#campaignList3').append($("<option></option>").val('-1').html('---Select Campaign---'));
|
| - |
|
297 |
$.each(reply.CampaignData, function(i,obj) {
|
| - |
|
298 |
$('#campaignList3').append($("<option></option>").val(obj.CampaignId).html(obj.Name));
|
| - |
|
299 |
});
|
| - |
|
300 |
}
|
| - |
|
301 |
});
|
| 263 |
$("#adgroupList2").val('-1');
|
302 |
$("#adgroupList2").val('-1');
|
| 264 |
$("#keyword1").val('');
|
303 |
$("#keyword1").val('');
|
| 265 |
$("#keyword2").val('');
|
304 |
$("#keyword2").val('');
|
| 266 |
$("#keyword3").val('');
|
305 |
$("#keyword3").val('');
|
| 267 |
$("#keyword4").val('');
|
306 |
$("#keyword4").val('');
|
| 268 |
$("#keyword5").val('');
|
307 |
$("#keyword5").val('');
|
| 269 |
$("#bid1").val('');
|
308 |
$("#bid1").val('');
|
| 270 |
$("#bid2").val('');
|
309 |
$("#bid2").val('');
|
| 271 |
$("#bid3").val('');
|
310 |
$("#bid3").val('');
|
| 272 |
$("#bid4").val('');
|
311 |
$("#bid4").val('');
|
| 273 |
$("#bid5").val('');
|
312 |
$("#bid5").val('');
|
| 274 |
$("#matchType1").val('3');
|
313 |
$("#matchType1").val('3');
|
| 275 |
$("#matchType2").val('3');
|
314 |
$("#matchType2").val('3');
|
| 276 |
$("#matchType3").val('3');
|
315 |
$("#matchType3").val('3');
|
| 277 |
$("#matchType4").val('3');
|
316 |
$("#matchType4").val('3');
|
| 278 |
$("#matchType5").val('3');
|
317 |
$("#matchType5").val('3');
|
| 279 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
318 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
| 280 |
$('#campaignName').val('');
|
319 |
$('#campaignName').val('');
|
| 281 |
$("#campaignStatus").val('2');
|
320 |
$("#campaignStatus").val('2');
|
| 282 |
$('#startDate').val('');
|
321 |
$('#startDate').val('');
|
| 283 |
$('#endDate').val('');
|
322 |
$('#endDate').val('');
|
| 284 |
$("#googleSearchNetwork").attr("checked", false);
|
323 |
$("#googleSearchNetwork").attr("checked", false);
|
| 285 |
$("#displayNetwork").attr("checked", false);
|
324 |
$("#displayNetwork").attr("checked", false);
|
| 286 |
$("#partnerSearchNetwork").attr("checked", false);
|
325 |
$("#partnerSearchNetwork").attr("checked", false);
|
| 287 |
$("#campaignAmount").val('');
|
326 |
$("#campaignAmount").val('');
|
| 288 |
});
|
327 |
});
|
| 289 |
|
328 |
|
| 290 |
$('#campaignRdoUpdate').live('click', function() {
|
329 |
$('#campaignRdoUpdate').live('click', function() {
|
| 291 |
$('div#updateCampaignDiv').show();
|
330 |
$('div#updateCampaignDiv').show();
|
| 292 |
$('div#updateKeywordDiv').hide();
|
331 |
$('div#updateKeywordDiv').hide();
|
| 293 |
$('div#updateAdgroupDiv').hide();
|
332 |
$('div#updateAdgroupDiv').hide();
|
| 294 |
|
333 |
|
| 295 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
334 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
| 296 |
|
335 |
|
| - |
|
336 |
$("#campaignListUpdate1").find("option:gt(0)").remove();
|
| - |
|
337 |
$.ajax({
|
| - |
|
338 |
type : 'GET',
|
| - |
|
339 |
url : '/Support/google-adwords!getCampaigns',
|
| - |
|
340 |
dataType : 'json',
|
| - |
|
341 |
success : function(reply) {
|
| 297 |
$('#campaignListUpdate1').val('-1');
|
342 |
$("#campaignListUpdate1").find("option").remove();
|
| - |
|
343 |
$('#campaignListUpdate1').append($("<option></option>").val('-1').html('---Select Campaign---'));
|
| - |
|
344 |
$.each(reply.CampaignData, function(i,obj) {
|
| - |
|
345 |
$('#campaignListUpdate1').append($("<option></option>").val(obj.CampaignId).html(obj.Name));
|
| - |
|
346 |
});
|
| - |
|
347 |
}
|
| - |
|
348 |
});
|
| 298 |
$('#campaignNameUpdate').val('');
|
349 |
$('#campaignNameUpdate').val('');
|
| 299 |
$('#campaignStatusUpdate').val('2');
|
350 |
$('#campaignStatusUpdate').val('2');
|
| 300 |
$('#campaignAmountUpdate').val('');
|
351 |
$('#campaignAmountUpdate').val('');
|
| 301 |
|
352 |
|
| 302 |
$('#campaignListUpdate2').val('-1');
|
353 |
$('#campaignListUpdate2').val('-1');
|
| 303 |
$('#adgroupListUpdate1').find("option").remove();
|
354 |
$('#adgroupListUpdate1').find("option").remove();
|
| 304 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
355 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 305 |
$('#adgroupNameUpdate').val('');
|
356 |
$('#adgroupNameUpdate').val('');
|
| 306 |
$('#adgroupStatusUpdate').val('2');
|
357 |
$('#adgroupStatusUpdate').val('2');
|
| 307 |
$('#catalogItemIdUpdate').val('');
|
358 |
$('#catalogItemIdUpdate').val('');
|
| 308 |
$('#bidAmountUpdate').val('');
|
359 |
$('#bidAmountUpdate').val('');
|
| 309 |
|
360 |
|
| 310 |
$('#campaignListUpdate3').val('-1');
|
361 |
$('#campaignListUpdate3').val('-1');
|
| 311 |
$('#adgroupListUpdate2').find("option").remove();
|
362 |
$('#adgroupListUpdate2').find("option").remove();
|
| 312 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
363 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 313 |
$('#keywordListUpdate1').find("option").remove();
|
364 |
$('#keywordListUpdate1').find("option").remove();
|
| 314 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
365 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
| 315 |
$('#keywordUpdate').val('');
|
366 |
$('#keywordUpdate').val('');
|
| 316 |
$('#bidUpdate').val('');
|
367 |
$('#bidUpdate').val('');
|
| 317 |
$('#matchTypeUpdate').val('3');
|
368 |
$('#matchTypeUpdate').val('3');
|
| 318 |
});
|
369 |
});
|
| 319 |
|
370 |
|
| 320 |
$('#keywordRdoUpdate').live('click', function() {
|
371 |
$('#keywordRdoUpdate').live('click', function() {
|
| 321 |
$('div#updateCampaignDiv').hide();
|
372 |
$('div#updateCampaignDiv').hide();
|
| 322 |
$('div#updateKeywordDiv').show();
|
373 |
$('div#updateKeywordDiv').show();
|
| 323 |
$('div#updateAdgroupDiv').hide();
|
374 |
$('div#updateAdgroupDiv').hide();
|
| 324 |
|
375 |
|
| 325 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
376 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
| 326 |
|
377 |
|
| 327 |
$('#campaignListUpdate1').val('-1');
|
378 |
$('#campaignListUpdate1').val('-1');
|
| 328 |
$('#campaignNameUpdate').val('');
|
379 |
$('#campaignNameUpdate').val('');
|
| 329 |
$('#campaignStatusUpdate').val('2');
|
380 |
$('#campaignStatusUpdate').val('2');
|
| 330 |
$('#campaignAmountUpdate').val('');
|
381 |
$('#campaignAmountUpdate').val('');
|
| 331 |
|
382 |
|
| 332 |
$('#campaignListUpdate2').val('-1');
|
383 |
$('#campaignListUpdate2').val('-1');
|
| 333 |
$('#adgroupListUpdate1').find("option").remove();
|
384 |
$('#adgroupListUpdate1').find("option").remove();
|
| 334 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
385 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 335 |
$('#adgroupNameUpdate').val('');
|
386 |
$('#adgroupNameUpdate').val('');
|
| 336 |
$('#adgroupStatusUpdate').val('2');
|
387 |
$('#adgroupStatusUpdate').val('2');
|
| 337 |
$('#catalogItemIdUpdate').val('');
|
388 |
$('#catalogItemIdUpdate').val('');
|
| 338 |
$('#bidAmountUpdate').val('');
|
389 |
$('#bidAmountUpdate').val('');
|
| - |
|
390 |
|
| - |
|
391 |
$("#campaignListUpdate3").find("option:gt(0)").remove();
|
| 339 |
|
392 |
$.ajax({
|
| - |
|
393 |
type : 'GET',
|
| - |
|
394 |
url : '/Support/google-adwords!getCampaigns',
|
| - |
|
395 |
dataType : 'json',
|
| - |
|
396 |
success : function(reply) {
|
| 340 |
$('#campaignListUpdate3').val('-1');
|
397 |
$("#campaignListUpdate3").find("option").remove();
|
| - |
|
398 |
$('#campaignListUpdate3').append($("<option></option>").val('-1').html('---Select Campaign---'));
|
| - |
|
399 |
$.each(reply.CampaignData, function(i,obj) {
|
| - |
|
400 |
$('#campaignListUpdate3').append($("<option></option>").val(obj.CampaignId).html(obj.Name));
|
| - |
|
401 |
});
|
| - |
|
402 |
}
|
| - |
|
403 |
});
|
| 341 |
$('#adgroupListUpdate2').find("option").remove();
|
404 |
$('#adgroupListUpdate2').find("option").remove();
|
| 342 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
405 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 343 |
$('#keywordListUpdate1').find("option").remove();
|
406 |
$('#keywordListUpdate1').find("option").remove();
|
| 344 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
407 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
| 345 |
$('#keywordUpdate').val('');
|
408 |
$('#keywordUpdate').val('');
|
| 346 |
$('#bidUpdate').val('');
|
409 |
$('#bidUpdate').val('');
|
| 347 |
$('#matchTypeUpdate').val('3');
|
410 |
$('#matchTypeUpdate').val('3');
|
| 348 |
});
|
411 |
});
|
| 349 |
|
412 |
|
| 350 |
$('#adgroupRdoUpdate').live('click', function() {
|
413 |
$('#adgroupRdoUpdate').live('click', function() {
|
| 351 |
$('div#updateCampaignDiv').hide();
|
414 |
$('div#updateCampaignDiv').hide();
|
| 352 |
$('div#updateKeywordDiv').hide();
|
415 |
$('div#updateKeywordDiv').hide();
|
| 353 |
$('div#updateAdgroupDiv').show();
|
416 |
$('div#updateAdgroupDiv').show();
|
| 354 |
|
417 |
|
| 355 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
418 |
$('#addUpdateRecordSubmit').removeAttr('disabled');
|
| 356 |
|
419 |
|
| 357 |
$('#campaignListUpdate1').val('-1');
|
420 |
$('#campaignListUpdate1').val('-1');
|
| 358 |
$('#campaignNameUpdate').val('');
|
421 |
$('#campaignNameUpdate').val('');
|
| 359 |
$('#campaignStatusUpdate').val('2');
|
422 |
$('#campaignStatusUpdate').val('2');
|
| 360 |
$('#campaignAmountUpdate').val('');
|
423 |
$('#campaignAmountUpdate').val('');
|
| - |
|
424 |
|
| - |
|
425 |
$("#campaignListUpdate2").find("option:gt(0)").remove();
|
| 361 |
|
426 |
$.ajax({
|
| - |
|
427 |
type : 'GET',
|
| - |
|
428 |
url : '/Support/google-adwords!getCampaigns',
|
| - |
|
429 |
dataType : 'json',
|
| - |
|
430 |
success : function(reply) {
|
| 362 |
$('#campaignListUpdate2').val('-1');
|
431 |
$("#campaignListUpdate2").find("option").remove();
|
| - |
|
432 |
$('#campaignListUpdate2').append($("<option></option>").val('-1').html('---Select Campaign---'));
|
| - |
|
433 |
$.each(reply.CampaignData, function(i,obj) {
|
| - |
|
434 |
$('#campaignListUpdate2').append($("<option></option>").val(obj.CampaignId).html(obj.Name));
|
| - |
|
435 |
});
|
| - |
|
436 |
}
|
| - |
|
437 |
});
|
| 363 |
$('#adgroupListUpdate1').find("option").remove();
|
438 |
$('#adgroupListUpdate1').find("option").remove();
|
| 364 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
439 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 365 |
$('#adgroupNameUpdate').val('');
|
440 |
$('#adgroupNameUpdate').val('');
|
| 366 |
$('#adgroupStatusUpdate').val('2');
|
441 |
$('#adgroupStatusUpdate').val('2');
|
| 367 |
$('#catalogItemIdUpdate').val('');
|
442 |
$('#catalogItemIdUpdate').val('');
|
| 368 |
$('#bidAmountUpdate').val('');
|
443 |
$('#bidAmountUpdate').val('');
|
| 369 |
|
444 |
|
| 370 |
$('#campaignListUpdate3').val('-1');
|
445 |
$('#campaignListUpdate3').val('-1');
|
| 371 |
$('#adgroupListUpdate2').find("option").remove();
|
446 |
$('#adgroupListUpdate2').find("option").remove();
|
| 372 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
447 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 373 |
$('#keywordListUpdate1').find("option").remove();
|
448 |
$('#keywordListUpdate1').find("option").remove();
|
| 374 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
449 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
| 375 |
$('#keywordUpdate').val('');
|
450 |
$('#keywordUpdate').val('');
|
| 376 |
$('#bidUpdate').val('');
|
451 |
$('#bidUpdate').val('');
|
| 377 |
$('#matchTypeUpdate').val('3');
|
452 |
$('#matchTypeUpdate').val('3');
|
| 378 |
});
|
453 |
});
|
| 379 |
|
454 |
|
| 380 |
$('#cancelAddUpdateRecords').live('click', function() {
|
455 |
$('#cancelAddUpdateRecords').live('click', function() {
|
| 381 |
$("#campaignRdo").attr("checked", false);
|
456 |
$("#campaignRdo").attr("checked", false);
|
| 382 |
$("#adgroupRdo").attr("checked", false);
|
457 |
$("#adgroupRdo").attr("checked", false);
|
| 383 |
$("#textAdRdo").attr("checked", false);
|
458 |
$("#textAdRdo").attr("checked", false);
|
| 384 |
$("#keywordRdo").attr("checked", false);
|
459 |
$("#keywordRdo").attr("checked", false);
|
| 385 |
$('div#addCampaignDiv').hide();
|
460 |
$('div#addCampaignDiv').hide();
|
| 386 |
$('div#addAdgroupDiv').hide();
|
461 |
$('div#addAdgroupDiv').hide();
|
| 387 |
$('div#addAdgroupAdDiv').hide();
|
462 |
$('div#addAdgroupAdDiv').hide();
|
| 388 |
$('div#addKeywordDiv').hide();
|
463 |
$('div#addKeywordDiv').hide();
|
| 389 |
$('#campaignName').val('');
|
464 |
$('#campaignName').val('');
|
| 390 |
$("#campaignStatus").val('2');
|
465 |
$("#campaignStatus").val('2');
|
| 391 |
$('#startDate').val('');
|
466 |
$('#startDate').val('');
|
| 392 |
$('#endDate').val('');
|
467 |
$('#endDate').val('');
|
| 393 |
$("#googleSearchNetwork").attr("checked", false);
|
468 |
$("#googleSearchNetwork").attr("checked", false);
|
| 394 |
$("#displayNetwork").attr("checked", false);
|
469 |
$("#displayNetwork").attr("checked", false);
|
| 395 |
$("#partnerSearchNetwork").attr("checked", false);
|
470 |
$("#partnerSearchNetwork").attr("checked", false);
|
| 396 |
$("#campaignAmount").val('');
|
471 |
$("#campaignAmount").val('');
|
| 397 |
$("#adgroupList1").find("option").remove();
|
472 |
$("#adgroupList1").find("option").remove();
|
| 398 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
473 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 399 |
$("#adgroupList2").find("option").remove();
|
474 |
$("#adgroupList2").find("option").remove();
|
| 400 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
475 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 401 |
$("#campaignList1").val('-1');
|
476 |
$("#campaignList1").val('-1');
|
| 402 |
$('#adgroupName').val('');
|
477 |
$('#adgroupName').val('');
|
| 403 |
$('#adgroupStatus').val('2');
|
478 |
$('#adgroupStatus').val('2');
|
| 404 |
$('#bidAmount').val('');
|
479 |
$('#bidAmount').val('');
|
| 405 |
$('#catalogItemId').val('');
|
480 |
$('#catalogItemId').val('');
|
| 406 |
$("#campaignList2").val('-1');
|
481 |
$("#campaignList2").val('-1');
|
| 407 |
$("#adgroupList1").val('-1');
|
482 |
$("#adgroupList1").val('-1');
|
| 408 |
$("#headline").val('');
|
483 |
$("#headline").val('');
|
| 409 |
$("#description1").val('');
|
484 |
$("#description1").val('');
|
| 410 |
$("#description2").val('');
|
485 |
$("#description2").val('');
|
| 411 |
$("#url").val('');
|
486 |
$("#url").val('');
|
| 412 |
$("#displayUrl").val('');
|
487 |
$("#displayUrl").val('');
|
| 413 |
$("#campaignList3").val('-1');
|
488 |
$("#campaignList3").val('-1');
|
| 414 |
$("#adgroupList2").val('-1');
|
489 |
$("#adgroupList2").val('-1');
|
| 415 |
$("#keyword1").val('');
|
490 |
$("#keyword1").val('');
|
| 416 |
$("#keyword2").val('');
|
491 |
$("#keyword2").val('');
|
| 417 |
$("#keyword3").val('');
|
492 |
$("#keyword3").val('');
|
| 418 |
$("#keyword4").val('');
|
493 |
$("#keyword4").val('');
|
| 419 |
$("#keyword5").val('');
|
494 |
$("#keyword5").val('');
|
| 420 |
$("#bid1").val('');
|
495 |
$("#bid1").val('');
|
| 421 |
$("#bid2").val('');
|
496 |
$("#bid2").val('');
|
| 422 |
$("#bid3").val('');
|
497 |
$("#bid3").val('');
|
| 423 |
$("#bid4").val('');
|
498 |
$("#bid4").val('');
|
| 424 |
$("#bid5").val('');
|
499 |
$("#bid5").val('');
|
| 425 |
$("#matchType1").val('3');
|
500 |
$("#matchType1").val('3');
|
| 426 |
$("#matchType2").val('3');
|
501 |
$("#matchType2").val('3');
|
| 427 |
$("#matchType3").val('3');
|
502 |
$("#matchType3").val('3');
|
| 428 |
$("#matchType4").val('3');
|
503 |
$("#matchType4").val('3');
|
| 429 |
$("#matchType5").val('3');
|
504 |
$("#matchType5").val('3');
|
| 430 |
$('#addUpdateRecordSubmit').attr('disabled', 'true');
|
505 |
$('#addUpdateRecordSubmit').attr('disabled', 'true');
|
| 431 |
|
506 |
|
| 432 |
$('div#updateCampaignDiv').hide();
|
507 |
$('div#updateCampaignDiv').hide();
|
| 433 |
$('div#updateKeywordDiv').hide();
|
508 |
$('div#updateKeywordDiv').hide();
|
| 434 |
$('div#updateAdgroupDiv').hide();
|
509 |
$('div#updateAdgroupDiv').hide();
|
| 435 |
$('#campaignRdoUpdate').attr("checked",false);
|
510 |
$('#campaignRdoUpdate').attr("checked",false);
|
| 436 |
$('#adgroupRdoUpdate').attr("checked",false);
|
511 |
$('#adgroupRdoUpdate').attr("checked",false);
|
| 437 |
$('#keywordRdoUpdate').attr("checked",false);
|
512 |
$('#keywordRdoUpdate').attr("checked",false);
|
| 438 |
$('#campaignListUpdate1').val('-1');
|
513 |
$('#campaignListUpdate1').val('-1');
|
| 439 |
$('#campaignNameUpdate').val('');
|
514 |
$('#campaignNameUpdate').val('');
|
| 440 |
$('#campaignStatusUpdate').val('2');
|
515 |
$('#campaignStatusUpdate').val('2');
|
| 441 |
$('#campaignAmountUpdate').val('');
|
516 |
$('#campaignAmountUpdate').val('');
|
| 442 |
|
517 |
|
| 443 |
$('#campaignListUpdate2').val('-1');
|
518 |
$('#campaignListUpdate2').val('-1');
|
| 444 |
$('#adgroupListUpdate1').find("option").remove();
|
519 |
$('#adgroupListUpdate1').find("option").remove();
|
| 445 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
520 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 446 |
$('#adgroupNameUpdate').val('');
|
521 |
$('#adgroupNameUpdate').val('');
|
| 447 |
$('#adgroupStatusUpdate').val('2');
|
522 |
$('#adgroupStatusUpdate').val('2');
|
| 448 |
$('#catalogItemIdUpdate').val('');
|
523 |
$('#catalogItemIdUpdate').val('');
|
| 449 |
$('#bidAmountUpdate').val('');
|
524 |
$('#bidAmountUpdate').val('');
|
| 450 |
|
525 |
|
| 451 |
$('#campaignListUpdate3').val('-1');
|
526 |
$('#campaignListUpdate3').val('-1');
|
| 452 |
$('#adgroupListUpdate2').find("option").remove();
|
527 |
$('#adgroupListUpdate2').find("option").remove();
|
| 453 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
528 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 454 |
$('#keywordListUpdate1').find("option").remove();
|
529 |
$('#keywordListUpdate1').find("option").remove();
|
| 455 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
530 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
| 456 |
$('#keywordUpdate').val('');
|
531 |
$('#keywordUpdate').val('');
|
| 457 |
$('#bidUpdate').val('');
|
532 |
$('#bidUpdate').val('');
|
| 458 |
$('#matchTypeUpdate').val('3');
|
533 |
$('#matchTypeUpdate').val('3');
|
| 459 |
|
534 |
|
| 460 |
});
|
535 |
});
|
| 461 |
$("#campaignList2").change(function () {
|
536 |
$("#campaignList2").change(function () {
|
| 462 |
$("#adgroupList1").find("option:gt(0)").remove();
|
537 |
$("#adgroupList1").find("option:gt(0)").remove();
|
| 463 |
|
538 |
|
| 464 |
$.ajax({
|
539 |
$.ajax({
|
| 465 |
type : 'GET',
|
540 |
type : 'GET',
|
| 466 |
url : '/Support/google-adwords!getAdgroupList',
|
541 |
url : '/Support/google-adwords!getAdgroupList',
|
| 467 |
data : 'campaignId=' + $(this).val(),
|
542 |
data : 'campaignId=' + $(this).val(),
|
| 468 |
dataType : 'json',
|
543 |
dataType : 'json',
|
| 469 |
success : function(reply) {
|
544 |
success : function(reply) {
|
| 470 |
$("#adgroupList1").find("option").remove();
|
545 |
$("#adgroupList1").find("option").remove();
|
| 471 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
546 |
$('#adgroupList1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 472 |
$.each(reply.AdGroupData, function(i,obj) {
|
547 |
$.each(reply.AdGroupData, function(i,obj) {
|
| 473 |
$('#adgroupList1').append($("<option></option>").val(obj.AdgroupId).html(obj.Name));
|
548 |
$('#adgroupList1').append($("<option></option>").val(obj.AdgroupId).html(obj.Name));
|
| 474 |
});
|
549 |
});
|
| 475 |
}
|
550 |
}
|
| 476 |
});
|
551 |
});
|
| 477 |
});
|
552 |
});
|
| 478 |
$("#campaignList3").change(function () {
|
553 |
$("#campaignList3").change(function () {
|
| 479 |
$("#adgroupList2").find("option:gt(0)").remove();
|
554 |
$("#adgroupList2").find("option:gt(0)").remove();
|
| 480 |
|
555 |
|
| 481 |
$.ajax({
|
556 |
$.ajax({
|
| 482 |
type : 'GET',
|
557 |
type : 'GET',
|
| 483 |
url : '/Support/google-adwords!getAdgroupList',
|
558 |
url : '/Support/google-adwords!getAdgroupList',
|
| 484 |
data : 'campaignId=' + $(this).val(),
|
559 |
data : 'campaignId=' + $(this).val(),
|
| 485 |
dataType : 'json',
|
560 |
dataType : 'json',
|
| 486 |
success : function(reply) {
|
561 |
success : function(reply) {
|
| 487 |
$("#adgroupList2").find("option").remove();
|
562 |
$("#adgroupList2").find("option").remove();
|
| 488 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
563 |
$('#adgroupList2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 489 |
$.each(reply.AdGroupData, function(i,obj) {
|
564 |
$.each(reply.AdGroupData, function(i,obj) {
|
| 490 |
$('#adgroupList2').append($("<option></option>").val(obj.AdgroupId).html(obj.Name));
|
565 |
$('#adgroupList2').append($("<option></option>").val(obj.AdgroupId).html(obj.Name));
|
| 491 |
});
|
566 |
});
|
| 492 |
}
|
567 |
}
|
| 493 |
});
|
568 |
});
|
| 494 |
});
|
569 |
});
|
| 495 |
|
570 |
|
| 496 |
$("#campaignListUpdate1").change(function () {
|
571 |
$("#campaignListUpdate1").change(function () {
|
| 497 |
$('#campaignNameUpdate').val('');
|
572 |
$('#campaignNameUpdate').val('');
|
| 498 |
$('#campaignStatusUpdate').val('2');
|
573 |
$('#campaignStatusUpdate').val('2');
|
| 499 |
$('#campaignAmountUpdate').val('');
|
574 |
$('#campaignAmountUpdate').val('');
|
| 500 |
$.ajax({
|
575 |
$.ajax({
|
| 501 |
type : 'GET',
|
576 |
type : 'GET',
|
| 502 |
url : '/Support/google-adwords!getCampaignDetails',
|
577 |
url : '/Support/google-adwords!getCampaignDetails',
|
| 503 |
data : 'campaignId=' + $(this).val(),
|
578 |
data : 'campaignId=' + $(this).val(),
|
| 504 |
dataType : 'json',
|
579 |
dataType : 'json',
|
| 505 |
success : function(reply) {
|
580 |
success : function(reply) {
|
| 506 |
$('#campaignNameUpdate').val(reply.Name);
|
581 |
$('#campaignNameUpdate').val(reply.Name);
|
| 507 |
$('#campaignStatusUpdate').val(reply.Status);
|
582 |
$('#campaignStatusUpdate').val(reply.Status);
|
| 508 |
$('#campaignAmountUpdate').val(reply.BudgetAmount);
|
583 |
$('#campaignAmountUpdate').val(reply.BudgetAmount);
|
| 509 |
}
|
584 |
}
|
| 510 |
});
|
585 |
});
|
| 511 |
});
|
586 |
});
|
| 512 |
|
587 |
|
| 513 |
$("#campaignListUpdate2").change(function () {
|
588 |
$("#campaignListUpdate2").change(function () {
|
| 514 |
$("#adgroupListUpdate1").find("option:gt(0)").remove();
|
589 |
$("#adgroupListUpdate1").find("option:gt(0)").remove();
|
| 515 |
$('#adgroupNameUpdate').val('');
|
590 |
$('#adgroupNameUpdate').val('');
|
| 516 |
$('#adgroupStatusUpdate').val('2');
|
591 |
$('#adgroupStatusUpdate').val('2');
|
| 517 |
$('#catalogItemIdUpdate').val('');
|
592 |
$('#catalogItemIdUpdate').val('');
|
| 518 |
$('#bidAmountUpdate').val('');
|
593 |
$('#bidAmountUpdate').val('');
|
| 519 |
|
594 |
|
| 520 |
$.ajax({
|
595 |
$.ajax({
|
| 521 |
type : 'GET',
|
596 |
type : 'GET',
|
| 522 |
url : '/Support/google-adwords!getAdgroupList',
|
597 |
url : '/Support/google-adwords!getAdgroupList',
|
| 523 |
data : 'campaignId=' + $(this).val(),
|
598 |
data : 'campaignId=' + $(this).val(),
|
| 524 |
dataType : 'json',
|
599 |
dataType : 'json',
|
| 525 |
success : function(reply) {
|
600 |
success : function(reply) {
|
| 526 |
$("#adgroupListUpdate1").find("option").remove();
|
601 |
$("#adgroupListUpdate1").find("option").remove();
|
| 527 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
602 |
$('#adgroupListUpdate1').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 528 |
$.each(reply.AdGroupData, function(i,obj) {
|
603 |
$.each(reply.AdGroupData, function(i,obj) {
|
| 529 |
$('#adgroupListUpdate1').append($("<option></option>").val(obj.AdgroupId).html(obj.Name));
|
604 |
$('#adgroupListUpdate1').append($("<option></option>").val(obj.AdgroupId).html(obj.Name));
|
| 530 |
});
|
605 |
});
|
| 531 |
}
|
606 |
}
|
| 532 |
});
|
607 |
});
|
| 533 |
});
|
608 |
});
|
| 534 |
|
609 |
|
| 535 |
$("#adgroupListUpdate1").change(function () {
|
610 |
$("#adgroupListUpdate1").change(function () {
|
| 536 |
$('#adgroupNameUpdate').val('');
|
611 |
$('#adgroupNameUpdate').val('');
|
| 537 |
$('#adgroupStatusUpdate').val('2');
|
612 |
$('#adgroupStatusUpdate').val('2');
|
| 538 |
$('#catalogItemIdUpdate').val('');
|
613 |
$('#catalogItemIdUpdate').val('');
|
| 539 |
$('#bidAmountUpdate').val('');
|
614 |
$('#bidAmountUpdate').val('');
|
| 540 |
$.ajax({
|
615 |
$.ajax({
|
| 541 |
type : 'GET',
|
616 |
type : 'GET',
|
| 542 |
url : '/Support/google-adwords!getAdGroupDetails',
|
617 |
url : '/Support/google-adwords!getAdGroupDetails',
|
| 543 |
data : 'adgroupId=' + $(this).val(),
|
618 |
data : 'adgroupId=' + $(this).val(),
|
| 544 |
dataType : 'json',
|
619 |
dataType : 'json',
|
| 545 |
success : function(reply) {
|
620 |
success : function(reply) {
|
| 546 |
$('#adgroupNameUpdate').val(reply.Name);
|
621 |
$('#adgroupNameUpdate').val(reply.Name);
|
| 547 |
$('#adgroupStatusUpdate').val(reply.Status);
|
622 |
$('#adgroupStatusUpdate').val(reply.Status);
|
| 548 |
$('#catalogItemIdUpdate').val(reply.CatalogItemId);
|
623 |
$('#catalogItemIdUpdate').val(reply.CatalogItemId);
|
| 549 |
$('#bidAmountUpdate').val(reply.BidAmount);
|
624 |
$('#bidAmountUpdate').val(reply.BidAmount);
|
| 550 |
|
625 |
|
| 551 |
}
|
626 |
}
|
| 552 |
});
|
627 |
});
|
| 553 |
});
|
628 |
});
|
| 554 |
|
629 |
|
| 555 |
$("#campaignListUpdate3").change(function () {
|
630 |
$("#campaignListUpdate3").change(function () {
|
| 556 |
$("#adgroupListUpdate2").find("option:gt(0)").remove();
|
631 |
$("#adgroupListUpdate2").find("option:gt(0)").remove();
|
| 557 |
$("#keywordListUpdate1").find("option:gt(0)").remove();
|
632 |
$("#keywordListUpdate1").find("option:gt(0)").remove();
|
| 558 |
$('#keywordUpdate').val('');
|
633 |
$('#keywordUpdate').val('');
|
| 559 |
$('#matchTypeUpdate').val('2');
|
634 |
$('#matchTypeUpdate').val('2');
|
| 560 |
$('#bidUpdate').val('');
|
635 |
$('#bidUpdate').val('');
|
| 561 |
$.ajax({
|
636 |
$.ajax({
|
| 562 |
type : 'GET',
|
637 |
type : 'GET',
|
| 563 |
url : '/Support/google-adwords!getAdgroupList',
|
638 |
url : '/Support/google-adwords!getAdgroupList',
|
| 564 |
data : 'campaignId=' + $(this).val(),
|
639 |
data : 'campaignId=' + $(this).val(),
|
| 565 |
dataType : 'json',
|
640 |
dataType : 'json',
|
| 566 |
success : function(reply) {
|
641 |
success : function(reply) {
|
| 567 |
$("#adgroupListUpdate2").find("option").remove();
|
642 |
$("#adgroupListUpdate2").find("option").remove();
|
| 568 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
643 |
$('#adgroupListUpdate2').append($("<option></option>").val('-1').html('---Select AdGroup---'));
|
| 569 |
$.each(reply.AdGroupData, function(i,obj) {
|
644 |
$.each(reply.AdGroupData, function(i,obj) {
|
| 570 |
$('#adgroupListUpdate2').append($("<option></option>").val(obj.AdgroupId).html(obj.Name));
|
645 |
$('#adgroupListUpdate2').append($("<option></option>").val(obj.AdgroupId).html(obj.Name));
|
| 571 |
});
|
646 |
});
|
| 572 |
}
|
647 |
}
|
| 573 |
});
|
648 |
});
|
| 574 |
});
|
649 |
});
|
| 575 |
|
650 |
|
| 576 |
$("#adgroupListUpdate2").change(function () {
|
651 |
$("#adgroupListUpdate2").change(function () {
|
| 577 |
$("#keywordListUpdate1").find("option:gt(0)").remove();
|
652 |
$("#keywordListUpdate1").find("option:gt(0)").remove();
|
| 578 |
$('#keywordUpdate').val('');
|
653 |
$('#keywordUpdate').val('');
|
| 579 |
$('#matchTypeUpdate').val('2');
|
654 |
$('#matchTypeUpdate').val('2');
|
| 580 |
$('#bidUpdate').val('');
|
655 |
$('#bidUpdate').val('');
|
| 581 |
$.ajax({
|
656 |
$.ajax({
|
| 582 |
type : 'GET',
|
657 |
type : 'GET',
|
| 583 |
url : '/Support/google-adwords!getKeywordList',
|
658 |
url : '/Support/google-adwords!getKeywordList',
|
| 584 |
data : 'adgroupId=' + $(this).val(),
|
659 |
data : 'adgroupId=' + $(this).val(),
|
| 585 |
dataType : 'json',
|
660 |
dataType : 'json',
|
| 586 |
success : function(reply) {
|
661 |
success : function(reply) {
|
| 587 |
$("#keywordListUpdate1").find("option").remove();
|
662 |
$("#keywordListUpdate1").find("option").remove();
|
| 588 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
663 |
$('#keywordListUpdate1').append($("<option></option>").val('-1').html('---Select Keyword---'));
|
| 589 |
$.each(reply.AdKeywordData, function(i,obj) {
|
664 |
$.each(reply.AdKeywordData, function(i,obj) {
|
| 590 |
$('#keywordListUpdate1').append($("<option></option>").val(obj.KeywordId).html(obj.Text));
|
665 |
$('#keywordListUpdate1').append($("<option></option>").val(obj.KeywordId).html(obj.Text));
|
| 591 |
});
|
666 |
});
|
| 592 |
}
|
667 |
}
|
| 593 |
});
|
668 |
});
|
| 594 |
});
|
669 |
});
|
| 595 |
|
670 |
|
| 596 |
$("#keywordListUpdate1").change(function () {
|
671 |
$("#keywordListUpdate1").change(function () {
|
| 597 |
$('#keywordUpdate').val('');
|
672 |
$('#keywordUpdate').val('');
|
| 598 |
$('#matchTypeUpdate').val('2');
|
673 |
$('#matchTypeUpdate').val('2');
|
| 599 |
$('#bidUpdate').val('');
|
674 |
$('#bidUpdate').val('');
|
| 600 |
$.ajax({
|
675 |
$.ajax({
|
| 601 |
type : 'GET',
|
676 |
type : 'GET',
|
| 602 |
url : '/Support/google-adwords!getKeywordDetails',
|
677 |
url : '/Support/google-adwords!getKeywordDetails',
|
| 603 |
data : 'keywordId=' + $(this).val() + '&adgroupId=' + $("#adgroupListUpdate2").val(),
|
678 |
data : 'keywordId=' + $(this).val() + '&adgroupId=' + $("#adgroupListUpdate2").val(),
|
| 604 |
dataType : 'json',
|
679 |
dataType : 'json',
|
| 605 |
success : function(reply) {
|
680 |
success : function(reply) {
|
| 606 |
$('#keywordUpdate').val(reply.Text);
|
681 |
$('#keywordUpdate').val(reply.Text);
|
| 607 |
$('#matchTypeUpdate').val(reply.MatchType);
|
682 |
$('#matchTypeUpdate').val(reply.MatchType);
|
| 608 |
$('#bidUpdate').val(reply.Bid);
|
683 |
$('#bidUpdate').val(reply.Bid);
|
| 609 |
|
- |
|
| 610 |
}
|
- |
|
| 611 |
});
|
- |
|
| 612 |
});
|
- |
|
| 613 |
|
684 |
|
| 614 |
$('#sendProductFeedForm').live('submit', function() {
|
- |
|
| 615 |
var catalogItemId = $("input[name='cataLogItemId']").val();
|
- |
|
| 616 |
if(catalogItemId==null || catalogItemId=="")
|
- |
|
| 617 |
{
|
- |
|
| 618 |
alert("Please enter Catalog Item Id");
|
- |
|
| 619 |
$('input[name=cataLogitemId]').focus();
|
- |
|
| 620 |
return false;
|
- |
|
| 621 |
}
|
685 |
}
|
| 622 |
sendProductFeeds($(this).serialize());
|
- |
|
| 623 |
return false;
|
- |
|
| 624 |
});
|
- |
|
| 625 |
|
- |
|
| 626 |
$('#sendProductFeedLink').live('click', function() {
|
- |
|
| 627 |
$("div#sendProductFeedDiv").show();
|
- |
|
| 628 |
$.colorbox({
|
- |
|
| 629 |
inline : true,
|
- |
|
| 630 |
width : "400px",
|
- |
|
| 631 |
height : "140px",
|
- |
|
| 632 |
href : "div#sendProductFeedDiv",
|
- |
|
| 633 |
onClosed : function() {
|
- |
|
| 634 |
$("div#sendProductFeedDiv").hide();
|
- |
|
| 635 |
}
|
- |
|
| 636 |
});
|
686 |
});
|
| 637 |
});
|
- |
|
| 638 |
|
- |
|
| 639 |
});
|
- |
|
| 640 |
|
- |
|
| 641 |
function sendProductFeeds(params) {
|
- |
|
| 642 |
$.ajax({
|
- |
|
| 643 |
type : "POST",
|
- |
|
| 644 |
url : "/Support/google-adwords!sendProductFeeds",
|
- |
|
| 645 |
data : params,
|
- |
|
| 646 |
success : function(response) {
|
- |
|
| 647 |
alert(response);
|
- |
|
| 648 |
$.colorbox.close();
|
- |
|
| 649 |
},
|
- |
|
| 650 |
error : function() {
|
- |
|
| 651 |
alert("Error in sending products feeds");
|
- |
|
| 652 |
$.colorbox.close();
|
- |
|
| 653 |
}
|
- |
|
| 654 |
});
|
687 |
});
|
| 655 |
}
|
- |
|
| 656 |
|
688 |
|
| - |
|
689 |
});
|
| - |
|
690 |
|
| 657 |
|
691 |
|