| @@ -85,8 +85,26 @@ | ||
| 85 | 85 | margin-top: 10px; |
| 86 | 86 | color: red; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | + .toggle_icon{ | |
| 90 | + background: url(<?php echo $this->plugin_url.'img/arrow_right_32.png' ?>) no-repeat; | |
| 91 | + background-size:contain; | |
| 92 | + width:24px; | |
| 93 | + height:24px; | |
| 94 | + display:inline-block; | |
| 95 | + vertical-align: middle; | |
| 96 | + } | |
| 97 | + | |
| 98 | + .toggle_icon_on{ | |
| 99 | + -ms-transform: rotate(90deg); /* IE 9 */ | |
| 100 | + -webkit-transform: rotate(90deg); /* Chrome, Safari, Opera */ | |
| 101 | + transform: rotate(90deg); | |
| 102 | + } | |
| 103 | + .apply_button{ | |
| 104 | + margin-top: 20px !important; | |
| 105 | + } | |
| 106 | + | |
| 89 | 107 | </style> |
| 90 | 108 | |
| 91 | 109 | <div class="taboola-container"> |
| 92 | 110 | <img src='<?php echo $this->plugin_url.'img/taboola.png' ?>' style='width:200px;'/> |
| @@ -152,9 +170,40 @@ | ||
| 152 | 170 | |
| 153 | 171 | </table> |
| 154 | 172 | <hr style='border-bottom: 1px solid #fafafa;'> |
| 155 | 173 | |
| 156 | - <input class='button-secondary' type="submit" value="Apply Changes ✔"/> | |
| 174 | + <?php $location_defined = (htmlspecialchars($settings->location_string) != ""); ?> | |
| 175 | + | |
| 176 | + | |
| 177 | + <div class='toggle_intercept checkbox'> | |
| 178 | + <?php if ($location_defined): ?> | |
| 179 | + <div class='toggle_icon toggle_icon_on'></div> | |
| 180 | + Advanced Settings | |
| 181 | + </div> | |
| 182 | + <table class='location_section'> | |
| 183 | + | |
| 184 | + <?php else: ?> | |
| 185 | + <div class='toggle_icon'></div> | |
| 186 | + Advanced Settings | |
| 187 | + </div> | |
| 188 | + <table class='location_section' style='display:none'> | |
| 189 | + | |
| 190 | + <?php endif; ?> | |
| 191 | + | |
| 192 | + | |
| 193 | + <tr> | |
| 194 | + <td>Location</td> | |
| 195 | + <td> | |
| 196 | + <input type="text" value="<?php echo htmlspecialchars($settings->location_string) ?>" name="location_string" placeholder="" /> | |
| 197 | + </td> | |
| 198 | + <td class='tooltip'> | |
| 199 | + <img src='<?php echo $this->plugin_url.'img/question-mark.png' ?>'/> | |
| 200 | + <div>This field controls the location of these widgets on the page. If you would like to move your widget from its default location directly below the article a Taboola representative will provide you with the necessary information.</div> | |
| 201 | + </td> | |
| 202 | + </tr> | |
| 203 | + | |
| 204 | + </table> | |
| 205 | + <input class='button-secondary apply_button' type="submit" value="Apply Changes ✔"/> | |
| 157 | 206 | <!-- <a class='request_link' href=' http://taboola.com/contact' target='_blank'>Request Widget</a> --> |
| 158 | 207 | </form> |
| 159 | 208 | <div style='clear:both'></div> |
| 160 | 209 | <?php |
| @@ -170,12 +219,12 @@ | ||
| 170 | 219 | </div> |
| 171 | 220 | <script> |
| 172 | 221 | function sync_checkboxes(){ |
| 173 | 222 | if(jQuery('#first_bc_enabled').attr("checked")){ |
| 174 | - jQuery('#second_bc_enabled').prop('disabled',false) | |
| 223 | + jQuery('#second_bc_enabled').attr('disabled',false) | |
| 175 | 224 | } else { |
| 176 | - jQuery('#second_bc_enabled').prop('checked', false); | |
| 177 | - jQuery('#second_bc_enabled').prop('disabled',true) | |
| 225 | + jQuery('#second_bc_enabled').attr('checked', false); | |
| 226 | + jQuery('#second_bc_enabled').attr('disabled',true) | |
| 178 | 227 | } |
| 179 | 228 | } |
| 180 | 229 | jQuery('#first_bc_enabled').change(sync_checkboxes); |
| 181 | 230 | setTimeout(function(){jQuery('.label-success').fadeOut()}, 6000); |
| @@ -180,5 +229,14 @@ | ||
| 180 | 229 | jQuery('#first_bc_enabled').change(sync_checkboxes); |
| 181 | 230 | setTimeout(function(){jQuery('.label-success').fadeOut()}, 6000); |
| 182 | 231 | setTimeout(function(){jQuery('.label-error').fadeOut()}, 6000); |
| 183 | 232 | sync_checkboxes() |
| 233 | + | |
| 234 | + jQuery('.toggle_intercept').click(function(){ | |
| 235 | + if (jQuery('.location_section').fadeToggle != undefined){ | |
| 236 | + jQuery('.location_section').fadeToggle('fast'); | |
| 237 | + }else{ | |
| 238 | + jQuery('.location_section').toggle(); | |
| 239 | + } | |
| 240 | + jQuery('.toggle_icon').toggleClass('toggle_icon_on'); | |
| 241 | + }); | |
| 184 | 242 | </script> |