| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * @package VikWP - Libraries |
| 4 | 4 | * @subpackage adapter.html |
| 5 | 5 | * @author E4J s.r.l. |
| 6 | - * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved. | |
| 6 | + * @copyright Copyright (C) 2023 E4J s.r.l. All Rights Reserved. | |
| 7 | 7 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL |
| 8 | 8 | * @link https://vikwp.com |
| 9 | 9 | */ |
| 10 | 10 | |
| @@ -209,10 +209,10 @@ | ||
| 209 | 209 | |
| 210 | 210 | $loaded = 1; |
| 211 | 211 | |
| 212 | 212 | JFactory::getDocument()->addScriptDeclaration( |
| 213 | -<<<JS | |
| 214 | -jQuery(document).ready(function() { | |
| 213 | +<<<JAVASCRIPT | |
| 214 | +jQuery(function() { | |
| 215 | 215 | jQuery('.wrap a.modal[target="_blank"]').on('click', function(e) { |
| 216 | 216 | // get link HREF |
| 217 | 217 | var href = jQuery(this).attr('href'); |
| 218 | 218 | |
| @@ -229,9 +229,9 @@ | ||
| 229 | 229 | |
| 230 | 230 | // otherwise fallback to default browser opening |
| 231 | 231 | }); |
| 232 | 232 | }); |
| 233 | -JS | |
| 233 | +JAVASCRIPT | |
| 234 | 234 | ); |
| 235 | 235 | |
| 236 | 236 | // display modal to preview the images |
| 237 | 237 | echo JHtml::fetch( |
| @@ -283,9 +283,9 @@ | ||
| 283 | 283 | // clone DOM wrapper |
| 284 | 284 | var clone = $('.wrap.plugin-container').detach(); |
| 285 | 285 | |
| 286 | 286 | // remove all body elements and attach the wrapper |
| 287 | - $('body').children().not('script,style,link').remove(); | |
| 287 | + $('body').children().not('script,style,link,.colorpicker').remove(); | |
| 288 | 288 | $('body').append(clone); |
| 289 | 289 | |
| 290 | 290 | // adjust wrapper margin |
| 291 | 291 | $('.wrap.plugin-container').css('margin', '10px'); |