Version Description
- Added: Open lightbox from slideshow and carousel views.
- Changed: Download original image from frontend.
- Changed: Preload images in slideshow view.
- Fixed: Scroll load in filemanager.
- Added: Header for deleted image on shared image open.
Download this release
Release Info
Developer | webdorado |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.3.31 |
Comparing to | |
See all releases |
Code changes from version 1.3.30 to 1.3.31
- admin/views/BWGViewBWGShortcode.php +132 -113
- admin/views/BWGViewGalleries_bwg.php +1 -1
- admin/views/BWGViewOptions_bwg.php +1 -1
- css/bwg_frontend.css +4 -0
- css/bwg_tables.css +1 -1
- filemanager/UploadHandler.php +3 -3
- filemanager/controller.php +5 -12
- filemanager/css/default.css +96 -90
- filemanager/js/default.js +181 -94
- filemanager/model.php +31 -26
- filemanager/view.php +6 -3
- frontend/views/BWGViewGalleryBox.php +2 -2
- frontend/views/BWGViewSlideshow.php +276 -30
- images/icons/best-wordpress-gallery.png +0 -0
- images/icons/bwg_shortcode.png +0 -0
- images/icons/gallery-icon.png +0 -0
- js/bwg.js +9 -13
- js/bwg_editor_button.js +1 -1
- js/bwg_embed.js +1 -1
- js/bwg_shortcode.js +1 -2
- js/images/bwg_edit_but.png +0 -0
- photo-gallery.php +6 -8
- readme.txt +8 -1
admin/views/BWGViewBWGShortcode.php
CHANGED
@@ -673,14 +673,7 @@ class BWGViewBWGShortcode {
|
|
673 |
<td class="spider_label spider_free_version_label"><label for="slideshow_filmstrip_height"><?php _e("Slideshow Filmstrip size:", 'bwg_back'); ?> </label></td>
|
674 |
<td class="spider_free_version_label"><input disabled="disabled" type="text" name="slideshow_filmstrip_height" id="slideshow_filmstrip_height" value="<?php echo $wd_bwg_options->slideshow_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
|
675 |
</tr>
|
676 |
-
|
677 |
-
</table>
|
678 |
-
</div>
|
679 |
-
<div class="bwg_short_div" style="border-right: 1px solid #000000;">
|
680 |
-
<table>
|
681 |
-
<!--Slideshow view-->
|
682 |
-
<tbody id="tbody_slideshow">
|
683 |
-
<tr id="tr_slideshow_enable_title">
|
684 |
<td class="spider_label"><label><?php _e("Enable Image Title:", 'bwg_back'); ?> </label></td>
|
685 |
<td>
|
686 |
<input type="radio" name="slideshow_enable_title" id="slideshow_title_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_title) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes')" /><label for="slideshow_title_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
@@ -767,11 +760,15 @@ class BWGViewBWGShortcode {
|
|
767 |
</td>
|
768 |
</tr>
|
769 |
</tbody>
|
|
|
|
|
|
|
|
|
770 |
|
771 |
<!--Lightbox view-->
|
772 |
<tbody id="tbody_popup_other">
|
773 |
<tr id="tr_thumb_click_action">
|
774 |
-
<td class="spider_label"><label><?php _e("
|
775 |
<td>
|
776 |
<input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($wd_bwg_options->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label><br />
|
777 |
<input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($wd_bwg_options->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label><br />
|
@@ -1479,127 +1476,150 @@ class BWGViewBWGShortcode {
|
|
1479 |
}
|
1480 |
}
|
1481 |
// Lightbox.
|
1482 |
-
|
1483 |
-
|
1484 |
-
jQuery("#popup_height").val(short_code['popup_height']);
|
1485 |
-
jQuery("select[id=popup_effect] option[value='" + short_code['popup_effect'] + "']").attr('selected', 'selected');
|
1486 |
-
jQuery("#popup_interval").val(short_code['popup_interval']);
|
1487 |
-
jQuery("#popup_effect_duration").val(short_code['popup_effect_duration']);
|
1488 |
-
if (short_code['popup_fullscreen'] == 1) {
|
1489 |
-
jQuery("#popup_fullscreen_1").attr('checked', 'checked');
|
1490 |
-
jQuery("#tr_popup_width_height").css('display', 'none');
|
1491 |
-
}
|
1492 |
-
else {
|
1493 |
-
jQuery("#popup_fullscreen_0").attr('checked', 'checked');
|
1494 |
-
jQuery("#tr_popup_width_height").css('display', '');
|
1495 |
}
|
1496 |
-
if (short_code['
|
1497 |
-
jQuery("#
|
1498 |
}
|
1499 |
-
|
1500 |
-
jQuery("
|
1501 |
}
|
1502 |
-
if (short_code['
|
1503 |
-
jQuery("#
|
1504 |
-
jQuery("#popup_filmstrip_height").val(short_code['popup_filmstrip_height']);
|
1505 |
-
bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_filmstrip_yes');
|
1506 |
}
|
1507 |
-
|
1508 |
-
jQuery("#
|
1509 |
}
|
1510 |
-
if
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
jQuery("#popup_fullscreen_yes").attr('checked', 'checked');
|
1515 |
-
}
|
1516 |
-
else {
|
1517 |
-
jQuery("#popup_fullscreen_no").attr('checked', 'checked');
|
1518 |
-
}
|
1519 |
-
if (short_code['popup_enable_info'] == 1 || !short_code['popup_enable_info']) {
|
1520 |
-
jQuery("#popup_info_yes").attr('checked', 'checked');
|
1521 |
-
}
|
1522 |
-
else {
|
1523 |
-
jQuery("#popup_info_no").attr('checked', 'checked');
|
1524 |
-
}
|
1525 |
-
if (short_code['show_tag_box'] == 0 || !short_code['show_tag_box']) {
|
1526 |
-
jQuery("#show_tag_box_0").attr('checked', 'checked');
|
1527 |
-
}
|
1528 |
-
else {
|
1529 |
-
jQuery("#show_tag_box_1").attr('checked', 'checked');
|
1530 |
-
}
|
1531 |
-
if (short_code['popup_info_full_width'] == 1) {
|
1532 |
-
jQuery("#popup_info_full_width_1").attr('checked', 'checked');
|
1533 |
-
}
|
1534 |
-
else {
|
1535 |
-
jQuery("#popup_info_full_width_0").attr('checked', 'checked');
|
1536 |
-
}
|
1537 |
-
if (short_code['popup_info_always_show'] == 1 && short_code['popup_info_always_show']) {
|
1538 |
-
jQuery("#popup_info_always_show_yes").attr('checked', 'checked');
|
1539 |
}
|
1540 |
else {
|
1541 |
-
jQuery("#
|
|
|
1542 |
}
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
jQuery("#popup_rate_no").attr('checked', 'checked');
|
1548 |
-
}
|
1549 |
-
if (short_code['popup_enable_comment'] == 1) {
|
1550 |
-
jQuery("#popup_comment_yes").attr('checked', 'checked');
|
1551 |
-
}
|
1552 |
-
else {
|
1553 |
-
jQuery("#popup_comment_no").attr('checked', 'checked');
|
1554 |
-
}
|
1555 |
-
if (short_code['popup_hit_counter'] == 1 && short_code['popup_hit_counter']) {
|
1556 |
-
jQuery("#popup_hit_counter_yes").attr('checked', 'checked');
|
1557 |
-
}
|
1558 |
-
else {
|
1559 |
-
jQuery("#popup_hit_counter_no").attr('checked', 'checked');
|
1560 |
-
}
|
1561 |
-
if (short_code['popup_enable_facebook'] == 1) {
|
1562 |
-
jQuery("#popup_facebook_yes").attr('checked', 'checked');
|
1563 |
-
}
|
1564 |
-
else {
|
1565 |
-
jQuery("#popup_facebook_no").attr('checked', 'checked');
|
1566 |
-
}
|
1567 |
-
if (short_code['popup_enable_twitter'] == 1) {
|
1568 |
-
jQuery("#popup_twitter_yes").attr('checked', 'checked');
|
1569 |
-
}
|
1570 |
-
else {
|
1571 |
-
jQuery("#popup_twitter_no").attr('checked', 'checked');
|
1572 |
-
}
|
1573 |
-
if (short_code['popup_enable_google'] == 1) {
|
1574 |
-
jQuery("#popup_google_yes").attr('checked', 'checked');
|
1575 |
}
|
1576 |
else {
|
1577 |
-
jQuery("#
|
1578 |
}
|
1579 |
-
|
1580 |
-
|
|
|
|
|
|
|
|
|
1581 |
}
|
1582 |
else {
|
1583 |
-
jQuery("#
|
1584 |
-
}
|
1585 |
-
|
1586 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1587 |
}
|
1588 |
else {
|
1589 |
-
jQuery("#
|
1590 |
}
|
1591 |
}
|
1592 |
-
|
1593 |
-
jQuery("#
|
1594 |
-
}
|
1595 |
-
if (!short_code['thumb_click_action'] || short_code['thumb_click_action'] == 'undefined' || short_code['thumb_click_action'] == 'open_lightbox') {
|
1596 |
-
jQuery("#thumb_click_action_1").attr('checked', 'checked');
|
1597 |
}
|
1598 |
else if (short_code['thumb_click_action'] == 'redirect_to_url') {
|
1599 |
jQuery("#thumb_click_action_2").attr('checked', 'checked');
|
1600 |
}
|
1601 |
-
else if (short_code['thumb_click_action'] == '
|
1602 |
-
jQuery("#
|
1603 |
}
|
1604 |
if (short_code['thumb_link_target'] == 1 || !short_code['thumb_link_target'] || short_code['thumb_link_target'] == 'undefined') {
|
1605 |
jQuery("#thumb_link_target_yes").attr('checked', 'checked');
|
@@ -1608,7 +1628,7 @@ class BWGViewBWGShortcode {
|
|
1608 |
jQuery("#thumb_link_target_no").attr('checked', 'checked');
|
1609 |
}
|
1610 |
bwg_thumb_click_action();
|
1611 |
-
|
1612 |
// Watermark.
|
1613 |
if (short_code['watermark_type'] == 'text') {
|
1614 |
jQuery("#watermark_type_text").attr('checked', 'checked');
|
@@ -1829,7 +1849,6 @@ class BWGViewBWGShortcode {
|
|
1829 |
}
|
1830 |
}
|
1831 |
// Lightbox paramteres.
|
1832 |
-
if (gallery_type != 'slideshow') {
|
1833 |
tagtext += ' thumb_click_action="' + jQuery("input[name=thumb_click_action]:checked").val() + '"';
|
1834 |
tagtext += ' thumb_link_target="' + jQuery("input[name=thumb_link_target]:checked").val() + '"';
|
1835 |
tagtext += ' popup_fullscreen="' + jQuery("input[name=popup_fullscreen]:checked").val() + '"';
|
@@ -1855,7 +1874,7 @@ class BWGViewBWGShortcode {
|
|
1855 |
tagtext += ' popup_enable_tumblr="' + jQuery("input[name=popup_enable_tumblr]:checked").val() + '"';
|
1856 |
tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
|
1857 |
tagtext += ' popup_effect_duration="' + jQuery("#popup_effect_duration").val() + '"';
|
1858 |
-
|
1859 |
// Watermark parameters.
|
1860 |
tagtext += ' watermark_type="' + jQuery("input[name=watermark_type]:checked").val() + '"';
|
1861 |
tagtext += ' watermark_link="' + (jQuery("#watermark_link").val()) + '"';
|
@@ -1877,7 +1896,7 @@ class BWGViewBWGShortcode {
|
|
1877 |
short_code += ' id="' + shortcode_id + '"' + title + ']';
|
1878 |
var short_id = ' id="' + shortcode_id + '"' + title;
|
1879 |
short_code = short_code.replace(/\[Best_Wordpress_Gallery([^\]]*)\]/g, function(d, c) {
|
1880 |
-
return "<img src='<?php echo WD_BWG_URL; ?>/images/icons/
|
1881 |
});
|
1882 |
<?php if (!$from_menu) { ?>
|
1883 |
jQuery("#task").val("save");
|
673 |
<td class="spider_label spider_free_version_label"><label for="slideshow_filmstrip_height"><?php _e("Slideshow Filmstrip size:", 'bwg_back'); ?> </label></td>
|
674 |
<td class="spider_free_version_label"><input disabled="disabled" type="text" name="slideshow_filmstrip_height" id="slideshow_filmstrip_height" value="<?php echo $wd_bwg_options->slideshow_filmstrip_height; ?>" class="spider_int_input spider_free_version_label" /> px</td>
|
675 |
</tr>
|
676 |
+
<tr id="tr_slideshow_enable_title">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
677 |
<td class="spider_label"><label><?php _e("Enable Image Title:", 'bwg_back'); ?> </label></td>
|
678 |
<td>
|
679 |
<input type="radio" name="slideshow_enable_title" id="slideshow_title_yes" value="1" <?php echo ($wd_bwg_options->slideshow_enable_title) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes')" /><label for="slideshow_title_yes"><?php _e('Yes', 'bwg_back'); ?></label>
|
760 |
</td>
|
761 |
</tr>
|
762 |
</tbody>
|
763 |
+
</table>
|
764 |
+
</div>
|
765 |
+
<div class="bwg_short_div" style="border-right: 1px solid #000000;">
|
766 |
+
<table>
|
767 |
|
768 |
<!--Lightbox view-->
|
769 |
<tbody id="tbody_popup_other">
|
770 |
<tr id="tr_thumb_click_action">
|
771 |
+
<td class="spider_label"><label><?php _e("Image click action:", 'bwg_back'); ?> </label></td>
|
772 |
<td>
|
773 |
<input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($wd_bwg_options->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label><br />
|
774 |
<input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($wd_bwg_options->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onchange="bwg_thumb_click_action()" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label><br />
|
1476 |
}
|
1477 |
}
|
1478 |
// Lightbox.
|
1479 |
+
if (short_code['popup_width'] != undefined) {
|
1480 |
+
jQuery("#popup_width").val(short_code['popup_width']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1481 |
}
|
1482 |
+
if (short_code['popup_height'] != undefined) {
|
1483 |
+
jQuery("#popup_height").val(short_code['popup_height']);
|
1484 |
}
|
1485 |
+
if (short_code['popup_effect'] != undefined) {
|
1486 |
+
jQuery("select[id=popup_effect] option[value='" + short_code['popup_effect'] + "']").attr('selected', 'selected');
|
1487 |
}
|
1488 |
+
if (short_code['popup_interval'] != undefined) {
|
1489 |
+
jQuery("#popup_interval").val(short_code['popup_interval']);
|
|
|
|
|
1490 |
}
|
1491 |
+
if (short_code['popup_effect_duration'] != undefined){
|
1492 |
+
jQuery("#popup_effect_duration").val(short_code['popup_effect_duration']);
|
1493 |
}
|
1494 |
+
if(short_code['popup_fullscreen'] != undefined) {
|
1495 |
+
if (short_code['popup_fullscreen'] == 1) {
|
1496 |
+
jQuery("#popup_fullscreen_1").attr('checked', 'checked');
|
1497 |
+
jQuery("#tr_popup_width_height").css('display', 'none');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1498 |
}
|
1499 |
else {
|
1500 |
+
jQuery("#popup_fullscreen_0").attr('checked', 'checked');
|
1501 |
+
jQuery("#tr_popup_width_height").css('display', '');
|
1502 |
}
|
1503 |
+
}
|
1504 |
+
if(short_code['popup_autoplay'] != undefined) {
|
1505 |
+
if (short_code['popup_autoplay'] == 1) {
|
1506 |
+
jQuery("#popup_autoplay_1").attr('checked', 'checked');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1507 |
}
|
1508 |
else {
|
1509 |
+
jQuery("#popup_autoplay_0").attr('checked', 'checked');
|
1510 |
}
|
1511 |
+
}
|
1512 |
+
if(short_code['popup_enable_filmstrip'] != undefined) {
|
1513 |
+
if (short_code['popup_enable_filmstrip'] == 1) {
|
1514 |
+
jQuery("#popup_filmstrip_yes").attr('checked', 'checked');
|
1515 |
+
jQuery("#popup_filmstrip_height").val(short_code['popup_filmstrip_height']);
|
1516 |
+
bwg_enable_disable('', 'tr_popup_filmstrip_height', 'popup_filmstrip_yes');
|
1517 |
}
|
1518 |
else {
|
1519 |
+
jQuery("#popup_filmstrip_no").attr('checked', 'checked');
|
1520 |
+
}
|
1521 |
+
}
|
1522 |
+
if (short_code['popup_enable_ctrl_btn'] != undefined){
|
1523 |
+
if (short_code['popup_enable_ctrl_btn'] == 1) {
|
1524 |
+
jQuery("#popup_ctrl_btn_yes").attr('checked', 'checked');
|
1525 |
+
bwg_enable_disable('', 'tbody_popup_ctrl_btn', 'popup_ctrl_btn_yes');
|
1526 |
+
if (short_code['popup_enable_fullscreen'] == 1) {
|
1527 |
+
jQuery("#popup_fullscreen_yes").attr('checked', 'checked');
|
1528 |
+
}
|
1529 |
+
else {
|
1530 |
+
jQuery("#popup_fullscreen_no").attr('checked', 'checked');
|
1531 |
+
}
|
1532 |
+
if (short_code['popup_enable_info'] == 1 || !short_code['popup_enable_info']) {
|
1533 |
+
jQuery("#popup_info_yes").attr('checked', 'checked');
|
1534 |
+
}
|
1535 |
+
else {
|
1536 |
+
jQuery("#popup_info_no").attr('checked', 'checked');
|
1537 |
+
}
|
1538 |
+
if (short_code['show_tag_box'] == 0 || !short_code['show_tag_box']) {
|
1539 |
+
jQuery("#show_tag_box_0").attr('checked', 'checked');
|
1540 |
+
}
|
1541 |
+
else {
|
1542 |
+
jQuery("#show_tag_box_1").attr('checked', 'checked');
|
1543 |
+
}
|
1544 |
+
if (short_code['popup_info_full_width'] == 1) {
|
1545 |
+
jQuery("#popup_info_full_width_1").attr('checked', 'checked');
|
1546 |
+
}
|
1547 |
+
else {
|
1548 |
+
jQuery("#popup_info_full_width_0").attr('checked', 'checked');
|
1549 |
+
}
|
1550 |
+
if (short_code['popup_info_always_show'] == 1 && short_code['popup_info_always_show']) {
|
1551 |
+
jQuery("#popup_info_always_show_yes").attr('checked', 'checked');
|
1552 |
+
}
|
1553 |
+
else {
|
1554 |
+
jQuery("#popup_info_always_show_no").attr('checked', 'checked');
|
1555 |
+
}
|
1556 |
+
if (short_code['popup_enable_rate'] == 1 && short_code['popup_enable_rate']) {
|
1557 |
+
jQuery("#popup_rate_yes").attr('checked', 'checked');
|
1558 |
+
}
|
1559 |
+
else {
|
1560 |
+
jQuery("#popup_rate_no").attr('checked', 'checked');
|
1561 |
+
}
|
1562 |
+
if (short_code['popup_enable_comment'] == 1) {
|
1563 |
+
jQuery("#popup_comment_yes").attr('checked', 'checked');
|
1564 |
+
}
|
1565 |
+
else {
|
1566 |
+
jQuery("#popup_comment_no").attr('checked', 'checked');
|
1567 |
+
}
|
1568 |
+
if (short_code['popup_hit_counter'] == 1 && short_code['popup_hit_counter']) {
|
1569 |
+
jQuery("#popup_hit_counter_yes").attr('checked', 'checked');
|
1570 |
+
}
|
1571 |
+
else {
|
1572 |
+
jQuery("#popup_hit_counter_no").attr('checked', 'checked');
|
1573 |
+
}
|
1574 |
+
if (short_code['popup_enable_facebook'] == 1) {
|
1575 |
+
jQuery("#popup_facebook_yes").attr('checked', 'checked');
|
1576 |
+
}
|
1577 |
+
else {
|
1578 |
+
jQuery("#popup_facebook_no").attr('checked', 'checked');
|
1579 |
+
}
|
1580 |
+
if (short_code['popup_enable_twitter'] == 1) {
|
1581 |
+
jQuery("#popup_twitter_yes").attr('checked', 'checked');
|
1582 |
+
}
|
1583 |
+
else {
|
1584 |
+
jQuery("#popup_twitter_no").attr('checked', 'checked');
|
1585 |
+
}
|
1586 |
+
if (short_code['popup_enable_google'] == 1) {
|
1587 |
+
jQuery("#popup_google_yes").attr('checked', 'checked');
|
1588 |
+
}
|
1589 |
+
else {
|
1590 |
+
jQuery("#popup_google_no").attr('checked', 'checked');
|
1591 |
+
}
|
1592 |
+
if (short_code['popup_enable_ecommerce'] == 1) {
|
1593 |
+
jQuery("#popup_ecommerce_yes").attr('checked', 'checked');
|
1594 |
+
}
|
1595 |
+
else {
|
1596 |
+
jQuery("#popup_ecommerce_no").attr('checked', 'checked');
|
1597 |
+
}
|
1598 |
+
if (short_code['popup_enable_pinterest'] == 1) {
|
1599 |
+
jQuery("#popup_pinterest_yes").attr('checked', 'checked');
|
1600 |
+
}
|
1601 |
+
else {
|
1602 |
+
jQuery("#popup_pinterest_no").attr('checked', 'checked');
|
1603 |
+
}
|
1604 |
+
if (short_code['popup_enable_tumblr'] == 1) {
|
1605 |
+
jQuery("#popup_tumblr_yes").attr('checked', 'checked');
|
1606 |
+
}
|
1607 |
+
else {
|
1608 |
+
jQuery("#popup_tumblr_no").attr('checked', 'checked');
|
1609 |
+
}
|
1610 |
}
|
1611 |
else {
|
1612 |
+
jQuery("#popup_ctrl_btn_no").attr('checked', 'checked');
|
1613 |
}
|
1614 |
}
|
1615 |
+
if (!short_code['thumb_click_action'] || short_code['thumb_click_action'] == 'undefined' || short_code['thumb_click_action'] == 'do_nothing') {
|
1616 |
+
jQuery("#thumb_click_action_3").attr('checked', 'checked');
|
|
|
|
|
|
|
1617 |
}
|
1618 |
else if (short_code['thumb_click_action'] == 'redirect_to_url') {
|
1619 |
jQuery("#thumb_click_action_2").attr('checked', 'checked');
|
1620 |
}
|
1621 |
+
else if (short_code['thumb_click_action'] == 'open_lightbox') {
|
1622 |
+
jQuery("#thumb_click_action_1").attr('checked', 'checked');
|
1623 |
}
|
1624 |
if (short_code['thumb_link_target'] == 1 || !short_code['thumb_link_target'] || short_code['thumb_link_target'] == 'undefined') {
|
1625 |
jQuery("#thumb_link_target_yes").attr('checked', 'checked');
|
1628 |
jQuery("#thumb_link_target_no").attr('checked', 'checked');
|
1629 |
}
|
1630 |
bwg_thumb_click_action();
|
1631 |
+
|
1632 |
// Watermark.
|
1633 |
if (short_code['watermark_type'] == 'text') {
|
1634 |
jQuery("#watermark_type_text").attr('checked', 'checked');
|
1849 |
}
|
1850 |
}
|
1851 |
// Lightbox paramteres.
|
|
|
1852 |
tagtext += ' thumb_click_action="' + jQuery("input[name=thumb_click_action]:checked").val() + '"';
|
1853 |
tagtext += ' thumb_link_target="' + jQuery("input[name=thumb_link_target]:checked").val() + '"';
|
1854 |
tagtext += ' popup_fullscreen="' + jQuery("input[name=popup_fullscreen]:checked").val() + '"';
|
1874 |
tagtext += ' popup_enable_tumblr="' + jQuery("input[name=popup_enable_tumblr]:checked").val() + '"';
|
1875 |
tagtext += ' show_tag_box="' + jQuery("input[name=show_tag_box]:checked").val() + '"';
|
1876 |
tagtext += ' popup_effect_duration="' + jQuery("#popup_effect_duration").val() + '"';
|
1877 |
+
|
1878 |
// Watermark parameters.
|
1879 |
tagtext += ' watermark_type="' + jQuery("input[name=watermark_type]:checked").val() + '"';
|
1880 |
tagtext += ' watermark_link="' + (jQuery("#watermark_link").val()) + '"';
|
1896 |
short_code += ' id="' + shortcode_id + '"' + title + ']';
|
1897 |
var short_id = ' id="' + shortcode_id + '"' + title;
|
1898 |
short_code = short_code.replace(/\[Best_Wordpress_Gallery([^\]]*)\]/g, function(d, c) {
|
1899 |
+
return "<img src='<?php echo WD_BWG_URL; ?>/images/icons/gallery-icon.png' class='bwg_shortcode mceItem' title='Best_Wordpress_Gallery" + short_id + "' />";
|
1900 |
});
|
1901 |
<?php if (!$from_menu) { ?>
|
1902 |
jQuery("#task").val("save");
|
admin/views/BWGViewGalleries_bwg.php
CHANGED
@@ -660,7 +660,7 @@ class BWGViewGalleries_bwg {
|
|
660 |
<input type="hidden" id="preview_image" name="preview_image" value="<?php echo $row->preview_image; ?>" style="display:inline-block;"/>
|
661 |
<img id="img_preview_image"
|
662 |
style="max-height:90px; max-width:120px; vertical-align:middle;"
|
663 |
-
src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row->preview_image; ?>"
|
664 |
<span id="delete_preview_image" class="spider_delete_img"
|
665 |
onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')"></span>
|
666 |
</td>
|
660 |
<input type="hidden" id="preview_image" name="preview_image" value="<?php echo $row->preview_image; ?>" style="display:inline-block;"/>
|
661 |
<img id="img_preview_image"
|
662 |
style="max-height:90px; max-width:120px; vertical-align:middle;"
|
663 |
+
src="<?php echo $row->preview_image ? (site_url() . '/' . $WD_BWG_UPLOAD_DIR . $row->preview_image) : ''; ?>" />
|
664 |
<span id="delete_preview_image" class="spider_delete_img"
|
665 |
onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')"></span>
|
666 |
</td>
|
admin/views/BWGViewOptions_bwg.php
CHANGED
@@ -218,7 +218,7 @@ class BWGViewOptions_bwg {
|
|
218 |
</td>
|
219 |
</tr>
|
220 |
<tr>
|
221 |
-
<td class="spider_label_options"><label><?php _e("
|
222 |
<td>
|
223 |
<input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($row->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_thumb_link_target', 'thumb_click_action_1')" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label>
|
224 |
<input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($row->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_thumb_link_target', 'thumb_click_action_2')" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label>
|
218 |
</td>
|
219 |
</tr>
|
220 |
<tr>
|
221 |
+
<td class="spider_label_options"><label><?php _e("Image click action:", 'bwg_back'); ?> </label></td>
|
222 |
<td>
|
223 |
<input type="radio" name="thumb_click_action" id="thumb_click_action_1" value="open_lightbox" <?php if ($row->thumb_click_action == 'open_lightbox') echo 'checked="checked"'; ?> onClick="bwg_enable_disable('none', 'tr_thumb_link_target', 'thumb_click_action_1')" /><label for="thumb_click_action_1"><?php _e("Open lightbox", 'bwg_back'); ?></label>
|
224 |
<input type="radio" name="thumb_click_action" id="thumb_click_action_2" value="redirect_to_url" <?php if ($row->thumb_click_action == 'redirect_to_url') echo 'checked="checked"'; ?> onClick="bwg_enable_disable('', 'tr_thumb_link_target', 'thumb_click_action_2')" /><label for="thumb_click_action_2"><?php _e("Redirect to url", 'bwg_back'); ?></label>
|
css/bwg_frontend.css
CHANGED
@@ -360,3 +360,7 @@ div[id^="bwg_search_container_1_"] div[id^="bwg_search_container_2_"] .bwg_searc
|
|
360 |
max-width: 100%;
|
361 |
}
|
362 |
/* end sort */
|
|
|
|
|
|
|
|
360 |
max-width: 100%;
|
361 |
}
|
362 |
/* end sort */
|
363 |
+
|
364 |
+
.spider_popup_wrap .wd_error {
|
365 |
+
color: #CCCCCC;
|
366 |
+
}
|
css/bwg_tables.css
CHANGED
@@ -248,7 +248,7 @@
|
|
248 |
background-repeat: no-repeat;
|
249 |
border: none;
|
250 |
float: left;
|
251 |
-
height:
|
252 |
margin: 7px 8px 0 0;
|
253 |
width: 36px;
|
254 |
}
|
248 |
background-repeat: no-repeat;
|
249 |
border: none;
|
250 |
float: left;
|
251 |
+
height: 36px;
|
252 |
margin: 7px 8px 0 0;
|
253 |
width: 36px;
|
254 |
}
|
filemanager/UploadHandler.php
CHANGED
@@ -508,7 +508,7 @@ class bwg_UploadHandler {
|
|
508 |
// into different directories or replacing hidden system files.
|
509 |
// Also remove control characters and spaces (\x00..\x20) around the filename:
|
510 |
$name = trim(stripslashes($name), ".\x00..\x20");
|
511 |
-
$name = str_replace(" ", "_", $name);
|
512 |
// Use a timestamp for empty filenames:
|
513 |
if (!$name) {
|
514 |
$name = str_replace('.', '-', microtime(true));
|
@@ -643,6 +643,8 @@ class bwg_UploadHandler {
|
|
643 |
foreach ($extracted_files as $ex_file) {
|
644 |
if ($ex_file != '.' && $ex_file != '..') {
|
645 |
$ex_file = $target_dir . '/' . $ex_file;
|
|
|
|
|
646 |
if (is_file($ex_file)) {
|
647 |
$type = filetype($ex_file);
|
648 |
$name = basename($ex_file);
|
@@ -655,12 +657,10 @@ class bwg_UploadHandler {
|
|
655 |
$file->type = $type;
|
656 |
$file->url = $this->get_download_url($file->name);
|
657 |
list($img_width, $img_height) = @getimagesize(htmlspecialchars_decode($ex_file, ENT_COMPAT | ENT_QUOTES));
|
658 |
-
|
659 |
if ($this->options['max_width'] && $this->options['max_height']) {
|
660 |
// Zip Upload.
|
661 |
$this->create_scaled_image($file->name, 'main', $this->options);
|
662 |
}
|
663 |
-
|
664 |
if (is_int($img_width)) {
|
665 |
$this->handle_image_file($ex_file, $file);
|
666 |
}
|
508 |
// into different directories or replacing hidden system files.
|
509 |
// Also remove control characters and spaces (\x00..\x20) around the filename:
|
510 |
$name = trim(stripslashes($name), ".\x00..\x20");
|
511 |
+
$name = str_replace(array(" ",'%'), array("_",''), $name);
|
512 |
// Use a timestamp for empty filenames:
|
513 |
if (!$name) {
|
514 |
$name = str_replace('.', '-', microtime(true));
|
643 |
foreach ($extracted_files as $ex_file) {
|
644 |
if ($ex_file != '.' && $ex_file != '..') {
|
645 |
$ex_file = $target_dir . '/' . $ex_file;
|
646 |
+
rename($ex_file, str_replace(array( " ", "%" ), array( "_", "" ), $ex_file));
|
647 |
+
$ex_file = str_replace(array( " ", "%" ), array( "_", "" ), $ex_file);
|
648 |
if (is_file($ex_file)) {
|
649 |
$type = filetype($ex_file);
|
650 |
$name = basename($ex_file);
|
657 |
$file->type = $type;
|
658 |
$file->url = $this->get_download_url($file->name);
|
659 |
list($img_width, $img_height) = @getimagesize(htmlspecialchars_decode($ex_file, ENT_COMPAT | ENT_QUOTES));
|
|
|
660 |
if ($this->options['max_width'] && $this->options['max_height']) {
|
661 |
// Zip Upload.
|
662 |
$this->create_scaled_image($file->name, 'main', $this->options);
|
663 |
}
|
|
|
664 |
if (is_int($img_width)) {
|
665 |
$this->handle_image_file($ex_file, $file);
|
666 |
}
|
filemanager/controller.php
CHANGED
@@ -36,13 +36,13 @@ class FilemanagerController {
|
|
36 |
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
// Public Methods //
|
38 |
////////////////////////////////////////////////////////////////////////////////////////
|
39 |
-
public function execute(
|
40 |
$task = isset($_REQUEST['task']) ? stripslashes(esc_html($_REQUEST['task'])) : 'display';
|
41 |
if (method_exists($this, $task)) {
|
42 |
-
$this->$task(
|
43 |
}
|
44 |
else {
|
45 |
-
$this->display(
|
46 |
}
|
47 |
}
|
48 |
|
@@ -54,20 +54,13 @@ class FilemanagerController {
|
|
54 |
return $this->uploads_url;
|
55 |
}
|
56 |
|
57 |
-
public function display(
|
58 |
require_once WD_BWG_DIR . '/filemanager/model.php';
|
59 |
$model = new FilemanagerModel($this);
|
60 |
|
61 |
require_once WD_BWG_DIR . '/filemanager/view.php';
|
62 |
$view = new FilemanagerView($this, $model);
|
63 |
-
$view->display(
|
64 |
-
}
|
65 |
-
|
66 |
-
public function get_images($load_count){
|
67 |
-
require_once WD_BWG_DIR . '/filemanager/model.php';
|
68 |
-
$model = new FilemanagerModel($this);
|
69 |
-
$file_manager_data = $model->get_file_manager_data(true, $load_count);
|
70 |
-
return $file_manager_data;
|
71 |
}
|
72 |
|
73 |
public function make_dir() {
|
36 |
////////////////////////////////////////////////////////////////////////////////////////
|
37 |
// Public Methods //
|
38 |
////////////////////////////////////////////////////////////////////////////////////////
|
39 |
+
public function execute() {
|
40 |
$task = isset($_REQUEST['task']) ? stripslashes(esc_html($_REQUEST['task'])) : 'display';
|
41 |
if (method_exists($this, $task)) {
|
42 |
+
$this->$task();
|
43 |
}
|
44 |
else {
|
45 |
+
$this->display();
|
46 |
}
|
47 |
}
|
48 |
|
54 |
return $this->uploads_url;
|
55 |
}
|
56 |
|
57 |
+
public function display() {
|
58 |
require_once WD_BWG_DIR . '/filemanager/model.php';
|
59 |
$model = new FilemanagerModel($this);
|
60 |
|
61 |
require_once WD_BWG_DIR . '/filemanager/view.php';
|
62 |
$view = new FilemanagerView($this, $model);
|
63 |
+
$view->display();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
65 |
|
66 |
public function make_dir() {
|
filemanager/css/default.css
CHANGED
@@ -51,114 +51,109 @@
|
|
51 |
}
|
52 |
|
53 |
html {
|
54 |
-
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
}
|
65 |
|
66 |
-
/* set joomla messages margin to 0 */
|
67 |
body {
|
68 |
-
|
69 |
}
|
70 |
|
71 |
#system-message, #system-message ul {
|
72 |
-
|
73 |
}
|
74 |
|
75 |
-
|
76 |
/* font-size */
|
77 |
html, body, div, span, th, td, a {
|
78 |
-
|
79 |
}
|
80 |
|
81 |
-
|
82 |
/* default tags */
|
83 |
.clickable {
|
84 |
-
|
85 |
}
|
86 |
|
87 |
-
|
88 |
/* wrapper */
|
89 |
#wrapper {
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
}
|
96 |
|
97 |
#file_manager,
|
98 |
#uploader,
|
99 |
#importer {
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
}
|
108 |
|
109 |
-
|
110 |
/* file manager */
|
111 |
/* ctrls bar */
|
112 |
.ctrls_bar {
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
}
|
124 |
|
125 |
.ctrls_bar_header {
|
126 |
-
|
127 |
}
|
128 |
|
129 |
.ctrls_bar_footer {
|
130 |
-
|
131 |
}
|
132 |
|
133 |
.ctrls_bar .ctrls_left {
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
}
|
138 |
|
139 |
.ctrls_bar .ctrls_right {
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
}
|
144 |
|
145 |
.ctrls_bar .ctrls_right_img {
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
margin-right: 10px;
|
150 |
}
|
151 |
|
152 |
.ctrl_bar_divider {
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
}
|
163 |
|
164 |
.upload_thumb_dim {
|
@@ -192,20 +187,20 @@ html, body, div, span, th, td, a {
|
|
192 |
}
|
193 |
|
194 |
.ctrl_bar_btn:hover {
|
195 |
-
|
196 |
-
|
197 |
}
|
198 |
|
199 |
.ctrl_bar_btn.btn_up {
|
200 |
-
|
201 |
}
|
202 |
|
203 |
.ctrl_bar_btn.btn_make_dir {
|
204 |
-
|
205 |
}
|
206 |
|
207 |
.ctrl_bar_btn.btn_rename_item {
|
208 |
-
|
209 |
}
|
210 |
|
211 |
.ctrl_bar_btn.btn_copy {
|
@@ -305,7 +300,6 @@ html, body, div, span, th, td, a {
|
|
305 |
background-image: url("../images/btn_icons/back.png");
|
306 |
}
|
307 |
|
308 |
-
|
309 |
/* sort icons */
|
310 |
.sort_order_asc {
|
311 |
display: inline-block !important;
|
@@ -337,7 +331,6 @@ html, body, div, span, th, td, a {
|
|
337 |
cursor: pointer;
|
338 |
}
|
339 |
|
340 |
-
|
341 |
/* path */
|
342 |
#path {
|
343 |
display: table-row;
|
@@ -373,7 +366,6 @@ html, body, div, span, th, td, a {
|
|
373 |
text-decoration: none;
|
374 |
}
|
375 |
|
376 |
-
|
377 |
#file_names_span {
|
378 |
display: none;
|
379 |
padding: 0 4px;
|
@@ -394,7 +386,6 @@ html, body, div, span, th, td, a {
|
|
394 |
overflow: hidden;
|
395 |
}
|
396 |
|
397 |
-
|
398 |
/* uploader */
|
399 |
#uploader,
|
400 |
#importer {
|
@@ -559,7 +550,8 @@ html, body, div, span, th, td, a {
|
|
559 |
.wp-pointer-aligned-center .wp-pointer-arrow {
|
560 |
margin-top:30px;
|
561 |
}
|
562 |
-
|
|
|
563 |
padding: 0 10px 0px 10px !important;
|
564 |
margin: 0;
|
565 |
text-decoration: none;
|
@@ -572,53 +564,67 @@ html, body, div, span, th, td, a {
|
|
572 |
-moz-box-sizing: border-box;
|
573 |
box-sizing: border-box;
|
574 |
line-height: 13px;
|
575 |
-
|
576 |
}
|
577 |
-
|
578 |
-
|
|
|
579 |
line-height: 28px;
|
580 |
}
|
581 |
-
|
582 |
-
|
|
|
|
|
|
|
583 |
}
|
584 |
-
|
|
|
585 |
background-color: #FFFFFF;
|
586 |
color: #686;
|
587 |
border: 1px solid #ddd;
|
588 |
}
|
589 |
|
590 |
-
.wd-btn-primary{
|
591 |
background-color: #00A0D2;
|
592 |
color: #fff;
|
593 |
border: 1px solid #00A0D2;
|
594 |
}
|
595 |
-
|
596 |
-
|
|
|
|
|
|
|
597 |
}
|
598 |
-
|
|
|
599 |
padding: 0px 10px 1px 36px !important;
|
600 |
-
color
|
601 |
background-repeat: no-repeat;
|
602 |
background-position: 10% 50%;
|
603 |
}
|
|
|
604 |
.wd-btn-icon-add {
|
605 |
padding: 0px 10px 1px 42px !important;
|
606 |
background-repeat: no-repeat;
|
607 |
background-position: 10% 50%;
|
608 |
}
|
609 |
-
|
610 |
-
|
|
|
611 |
}
|
612 |
-
|
613 |
-
|
|
|
614 |
}
|
615 |
-
|
616 |
-
|
|
|
617 |
}
|
618 |
-
|
619 |
-
|
|
|
620 |
}
|
621 |
-
|
|
|
622 |
padding: 0px 10px 1px 10px !important;
|
623 |
background-repeat: no-repeat;
|
624 |
background-position: 10% 50%;
|
51 |
}
|
52 |
|
53 |
html {
|
54 |
+
overflow: hidden !important;
|
55 |
|
56 |
+
/*deny selecting text*/
|
57 |
+
cursor: default;
|
58 |
+
-webkit-touch-callout: none;
|
59 |
+
-webkit-user-select: none;
|
60 |
+
-khtml-user-select: none;
|
61 |
+
-moz-user-select: none;
|
62 |
+
-ms-user-select: none;
|
63 |
+
user-select: none;
|
64 |
}
|
65 |
|
|
|
66 |
body {
|
67 |
+
margin: 0 !important;
|
68 |
}
|
69 |
|
70 |
#system-message, #system-message ul {
|
71 |
+
margin: 0;
|
72 |
}
|
73 |
|
|
|
74 |
/* font-size */
|
75 |
html, body, div, span, th, td, a {
|
76 |
+
font-size: 12px !important;
|
77 |
}
|
78 |
|
|
|
79 |
/* default tags */
|
80 |
.clickable {
|
81 |
+
cursor: pointer !important;
|
82 |
}
|
83 |
|
|
|
84 |
/* wrapper */
|
85 |
#wrapper {
|
86 |
+
position: absolute;
|
87 |
+
top: 0;
|
88 |
+
bottom: 0;
|
89 |
+
left: 0;
|
90 |
+
right: 0;
|
91 |
}
|
92 |
|
93 |
#file_manager,
|
94 |
#uploader,
|
95 |
#importer {
|
96 |
+
position: absolute;
|
97 |
+
top: 0;
|
98 |
+
bottom: 0;
|
99 |
+
left: 0;
|
100 |
+
right: 0;
|
101 |
+
margin: 0;
|
102 |
+
padding: 0;
|
103 |
}
|
104 |
|
|
|
105 |
/* file manager */
|
106 |
/* ctrls bar */
|
107 |
.ctrls_bar {
|
108 |
+
display: table-row;
|
109 |
+
position: absolute;
|
110 |
+
z-index: 1;
|
111 |
+
left: 0;
|
112 |
+
right: 0;
|
113 |
+
margin: 0;
|
114 |
+
border: solid 1px #e8e9ea;
|
115 |
+
background-color: #f5f6f7;
|
116 |
+
padding: 4px;
|
117 |
+
height: 32px;
|
118 |
}
|
119 |
|
120 |
.ctrls_bar_header {
|
121 |
+
top: 0;
|
122 |
}
|
123 |
|
124 |
.ctrls_bar_footer {
|
125 |
+
bottom: 0;
|
126 |
}
|
127 |
|
128 |
.ctrls_bar .ctrls_left {
|
129 |
+
float: left;
|
130 |
+
margin: 0;
|
131 |
+
padding: 0;
|
132 |
}
|
133 |
|
134 |
.ctrls_bar .ctrls_right {
|
135 |
+
float: right;
|
136 |
+
margin: 0 auto;
|
137 |
+
padding: 0;
|
138 |
}
|
139 |
|
140 |
.ctrls_bar .ctrls_right_img {
|
141 |
+
float: right;
|
142 |
+
margin: 0;
|
143 |
+
padding: 0;
|
144 |
margin-right: 10px;
|
145 |
}
|
146 |
|
147 |
.ctrl_bar_divider {
|
148 |
+
display: table-cell;
|
149 |
+
margin: 0;
|
150 |
+
background-image: url("../images/btn_icons/divider.png");
|
151 |
+
background-repeat: no-repeat;
|
152 |
+
width: 16px !important;
|
153 |
+
height: 32px !important;
|
154 |
+
padding: 0;
|
155 |
+
vertical-align: middle;
|
156 |
+
cursor: default;
|
157 |
}
|
158 |
|
159 |
.upload_thumb_dim {
|
187 |
}
|
188 |
|
189 |
.ctrl_bar_btn:hover {
|
190 |
+
outline: solid 1px #C6C6C6;
|
191 |
+
text-decoration: none;
|
192 |
}
|
193 |
|
194 |
.ctrl_bar_btn.btn_up {
|
195 |
+
background-image: url("../images/btn_icons/up.png");
|
196 |
}
|
197 |
|
198 |
.ctrl_bar_btn.btn_make_dir {
|
199 |
+
background-image: url("../images/btn_icons/create_dir.png");
|
200 |
}
|
201 |
|
202 |
.ctrl_bar_btn.btn_rename_item {
|
203 |
+
background-image: url("../images/btn_icons/rename.png");
|
204 |
}
|
205 |
|
206 |
.ctrl_bar_btn.btn_copy {
|
300 |
background-image: url("../images/btn_icons/back.png");
|
301 |
}
|
302 |
|
|
|
303 |
/* sort icons */
|
304 |
.sort_order_asc {
|
305 |
display: inline-block !important;
|
331 |
cursor: pointer;
|
332 |
}
|
333 |
|
|
|
334 |
/* path */
|
335 |
#path {
|
336 |
display: table-row;
|
366 |
text-decoration: none;
|
367 |
}
|
368 |
|
|
|
369 |
#file_names_span {
|
370 |
display: none;
|
371 |
padding: 0 4px;
|
386 |
overflow: hidden;
|
387 |
}
|
388 |
|
|
|
389 |
/* uploader */
|
390 |
#uploader,
|
391 |
#importer {
|
550 |
.wp-pointer-aligned-center .wp-pointer-arrow {
|
551 |
margin-top:30px;
|
552 |
}
|
553 |
+
|
554 |
+
.wd-btn {
|
555 |
padding: 0 10px 0px 10px !important;
|
556 |
margin: 0;
|
557 |
text-decoration: none;
|
564 |
-moz-box-sizing: border-box;
|
565 |
box-sizing: border-box;
|
566 |
line-height: 13px;
|
|
|
567 |
}
|
568 |
+
|
569 |
+
a.wd-btn {
|
570 |
+
color: #fff;
|
571 |
line-height: 28px;
|
572 |
}
|
573 |
+
|
574 |
+
.wd-btn:focus,
|
575 |
+
.wd-search-btn:focus,
|
576 |
+
.wd-reset-btn:focus {
|
577 |
+
outline: none !important;
|
578 |
}
|
579 |
+
|
580 |
+
.wd-btn-secondary {
|
581 |
background-color: #FFFFFF;
|
582 |
color: #686;
|
583 |
border: 1px solid #ddd;
|
584 |
}
|
585 |
|
586 |
+
.wd-btn-primary {
|
587 |
background-color: #00A0D2;
|
588 |
color: #fff;
|
589 |
border: 1px solid #00A0D2;
|
590 |
}
|
591 |
+
|
592 |
+
a.wd-btn-primary:hover,
|
593 |
+
a.wd-btn-primary:active,
|
594 |
+
a.wd-btn-primary:link {
|
595 |
+
color: #fff;
|
596 |
}
|
597 |
+
|
598 |
+
.wd-btn-icon {
|
599 |
padding: 0px 10px 1px 36px !important;
|
600 |
+
color: #fff;
|
601 |
background-repeat: no-repeat;
|
602 |
background-position: 10% 50%;
|
603 |
}
|
604 |
+
|
605 |
.wd-btn-icon-add {
|
606 |
padding: 0px 10px 1px 42px !important;
|
607 |
background-repeat: no-repeat;
|
608 |
background-position: 10% 50%;
|
609 |
}
|
610 |
+
|
611 |
+
.wd-btn-uplaod {
|
612 |
+
background-image: url("../images/btn_icons/upload.png");
|
613 |
}
|
614 |
+
|
615 |
+
.wd-btn-add {
|
616 |
+
background-image: url("../images/icons/add-new.png");
|
617 |
}
|
618 |
+
|
619 |
+
.wd-btn-apply {
|
620 |
+
background-image: url("../images/icons/apply.png");
|
621 |
}
|
622 |
+
|
623 |
+
.wd-btn-cancel {
|
624 |
+
background-image: url("../images/icons/cancel.png");
|
625 |
}
|
626 |
+
|
627 |
+
.wd-not-image {
|
628 |
padding: 0px 10px 1px 10px !important;
|
629 |
background-repeat: no-repeat;
|
630 |
background-position: 10% 50%;
|
filemanager/js/default.js
CHANGED
@@ -4,15 +4,6 @@
|
|
4 |
* Time: 3:56 PM
|
5 |
*/
|
6 |
|
7 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
8 |
-
// Events //
|
9 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
10 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
11 |
-
// Constants //
|
12 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
13 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
14 |
-
// Variables //
|
15 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
16 |
var keyFileSelected;
|
17 |
var keyFileSelectedML;
|
18 |
var filesSelected;
|
@@ -21,15 +12,14 @@ var dragFiles;
|
|
21 |
var isUploading;
|
22 |
|
23 |
var ajax = true;
|
24 |
-
var
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
jQuery(document).ready(function () {
|
32 |
-
var elements =
|
33 |
var all_item_count = jQuery("#explorer_body_container #explorer_body").data("files_count");
|
34 |
jQuery("#explorer_body_container").scroll(function () {
|
35 |
var explorer_item_count = jQuery("#explorer_body .explorer_item").length;
|
@@ -38,29 +28,27 @@ jQuery(document).ready(function () {
|
|
38 |
var scroll_position = jQuery(this).scrollTop() + jQuery(this).innerHeight();
|
39 |
var scroll_Height = jQuery(this)[0].scrollHeight;
|
40 |
if (scroll_position >= scroll_Height) {
|
41 |
-
|
42 |
-
|
|
|
|
|
43 |
elements++;
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
ajax_print_images(response);
|
61 |
-
}
|
62 |
-
}
|
63 |
-
});
|
64 |
}
|
65 |
}
|
66 |
});
|
@@ -71,7 +59,7 @@ jQuery(document).ready(function () {
|
|
71 |
else {
|
72 |
var all_images_count = jQuery("#file_manager .item_thumb img").length;
|
73 |
}
|
74 |
-
if(!all_images_count) {
|
75 |
setTimeout(function(){jQuery(document).trigger("onUpload")});
|
76 |
}
|
77 |
else {
|
@@ -118,12 +106,6 @@ jQuery(document).ready(function () {
|
|
118 |
});
|
119 |
});
|
120 |
|
121 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
122 |
-
// Getters & Setters //
|
123 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
124 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
125 |
-
// Private Methods //
|
126 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
127 |
function loaded() {
|
128 |
jQuery("#opacity_div").hide();
|
129 |
jQuery("#loading_div").hide();
|
@@ -134,8 +116,31 @@ function getClipboardFiles() {
|
|
134 |
}
|
135 |
|
136 |
function submit(task, sortBy, sortOrder, itemsView, destDir, fileNewName, newDirName, clipboardTask, clipboardFiles, clipboardSrc, clipboardDest) {
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
switch (task) {
|
140 |
case "rename_item":
|
141 |
destDir = dir;
|
@@ -227,43 +232,73 @@ function updateFileNames() {
|
|
227 |
jQuery("#file_names_span span").html(result);
|
228 |
}
|
229 |
|
230 |
-
|
231 |
-
// submit file
|
232 |
function submitFiles() {
|
233 |
if (filesSelected.length == 0) {
|
234 |
return;
|
235 |
}
|
236 |
var filesValid = [];
|
237 |
-
|
238 |
-
|
239 |
-
if (jQuery(file_object).attr("isDir") == "false") {
|
240 |
var fileData = [];
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
}
|
260 |
}
|
|
|
261 |
window.parent[callback](filesValid);
|
262 |
window.parent.tb_remove();
|
263 |
}
|
264 |
|
265 |
function importFiles() {
|
266 |
if (filesSelectedML.length == 0) {
|
|
|
267 |
alert("Select at least one file to import.");
|
268 |
return;
|
269 |
}
|
@@ -309,9 +344,6 @@ function getFileExtension(file) {
|
|
309 |
}
|
310 |
|
311 |
|
312 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
313 |
-
// Listeners //
|
314 |
-
////////////////////////////////////////////////////////////////////////////////////////
|
315 |
//ctrls bar handlers
|
316 |
function onBtnUpClick(event, obj) {
|
317 |
var destDir = dir.substring(0, dir.lastIndexOf(DS));
|
@@ -321,7 +353,7 @@ function onBtnUpClick(event, obj) {
|
|
321 |
function onBtnMakeDirClick(event, obj) {
|
322 |
var newDirName = prompt(messageEnterDirName);
|
323 |
if ((newDirName) && (newDirName != "")) {
|
324 |
-
submit("make_dir", null, null, null, null, null, newDirName, null, null, null, null);
|
325 |
}
|
326 |
}
|
327 |
|
@@ -329,20 +361,45 @@ function onBtnRenameItemClick(event, obj) {
|
|
329 |
if (filesSelected.length != 0) {
|
330 |
var newName = prompt(messageEnterNewName, getFileName(filesSelected[0]));
|
331 |
if ((newName != null) && (newName != "")) {
|
332 |
-
submit("rename_item", null, null, null, null, newName, null, null, null, null, null);
|
333 |
}
|
334 |
}
|
335 |
}
|
336 |
|
337 |
function onBtnCopyClick(event, obj) {
|
338 |
if (filesSelected.length != 0) {
|
339 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
}
|
341 |
}
|
342 |
|
343 |
function onBtnCutClick(event, obj) {
|
344 |
if (filesSelected.length != 0) {
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
}
|
347 |
}
|
348 |
|
@@ -392,6 +449,7 @@ function onPathComponentClick(event, obj, key) {
|
|
392 |
}
|
393 |
|
394 |
function onBtnShowImportClick(event, obj) {
|
|
|
395 |
jQuery("#importer").fadeIn();
|
396 |
}
|
397 |
|
@@ -416,6 +474,7 @@ function onKeyDown(e) {
|
|
416 |
var e = e || window.event;
|
417 |
var chCode1 = e.which || e.paramlist_keyCode;
|
418 |
if ((e.ctrlKey || e.metaKey) && chCode1 == 65) {
|
|
|
419 |
jQuery(".explorer_item").addClass("explorer_item_select");
|
420 |
jQuery(".importer_item").addClass("importer_item_select");
|
421 |
filesSelected = [];
|
@@ -458,6 +517,17 @@ function onFileClick(event, obj) {
|
|
458 |
jQuery(".explorer_item").removeClass("explorer_item_select");
|
459 |
var objName = jQuery(obj).attr("name");
|
460 |
if (event.ctrlKey == true || event.metaKey == true) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
if (filesSelected.indexOf(objName) == -1) {
|
462 |
filesSelected.push(objName);
|
463 |
keyFileSelected = obj;
|
@@ -620,6 +690,7 @@ function onBtnSelectAllClick() {
|
|
620 |
keyFileSelected = this;
|
621 |
}
|
622 |
});
|
|
|
623 |
}
|
624 |
|
625 |
function onBtnSelectAllMediLibraryClick() {
|
@@ -634,10 +705,32 @@ function onBtnSelectAllMediLibraryClick() {
|
|
634 |
});
|
635 |
}
|
636 |
|
637 |
-
function ajax_print_images(
|
638 |
-
|
639 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
var name = corent_file["name"];
|
|
|
|
|
|
|
|
|
641 |
var filename = corent_file["filename"];
|
642 |
var filethumb = corent_file["thumb"];
|
643 |
var filesize = corent_file["size"];
|
@@ -651,11 +744,7 @@ function ajax_print_images(response) {
|
|
651 |
var fileIso = corent_file["iso"];
|
652 |
var fileOrientation = corent_file["orientation"];
|
653 |
var fileCopyright = corent_file["copyright"];
|
654 |
-
|
655 |
-
var onmouseout = "onFileMOut(event, this);";
|
656 |
-
var onclick = "onFileClick(event, this);";
|
657 |
-
var ondblclick = "onFileDblClick(event, this);";
|
658 |
-
var ondragstart = "onFileDragStart(event, this);";
|
659 |
var ondragover = "";
|
660 |
var ondrop = "";
|
661 |
if (corent_file['is_dir'] == true) {
|
@@ -667,23 +756,23 @@ function ajax_print_images(response) {
|
|
667 |
isDir = 'true';
|
668 |
}
|
669 |
|
670 |
-
item_number =
|
|
|
671 |
var item_thumb = '<span class="item_thumb"><img src="' + corent_file['thumb'] + '"/></span>';
|
672 |
var item_icon = '<span class="item_icon"><img src="'+corent_file['icon']+'"/> </span>';
|
673 |
var item_name = '<span class="item_name">'+corent_file['name']+'</span>';
|
674 |
var item_size = '<span class="item_size">'+corent_file['size']+'</span>';
|
675 |
var item_date_modified = '<span class="item_date_modified">'+corent_file['date_modified']+'</span>';
|
676 |
var item_numbering = '<span class="item_numbering">'+item_number+'</span>';
|
677 |
-
|
678 |
-
var explorer_item = '<div class="explorer_item" ' +
|
679 |
'name="' + name + '" ' +
|
|
|
680 |
'filename="' + filename + '" ' +
|
681 |
'filethumb="' + filethumb + '" ' +
|
682 |
'filesize="' + filesize + '" ' +
|
683 |
'filetype="' + filetype + '" ' +
|
684 |
'date_modified="' + date_modified + '" ' +
|
685 |
'fileresolution="' + fileresolution + '" ' +
|
686 |
-
'fileresolution="' + fileresolution + '" ' +
|
687 |
'fileCredit="' + fileCredit + '" ' +
|
688 |
'fileAperture="' + fileAperture + '" ' +
|
689 |
'fileCamera="' + fileCamera + '" ' +
|
@@ -699,9 +788,7 @@ function ajax_print_images(response) {
|
|
699 |
'ondragstart="' + ondragstart + '" ' +
|
700 |
'ondragover="' + ondragover + '" ' +
|
701 |
'ondrop="' + ondrop + '" ' +
|
702 |
-
'draggable="true"
|
703 |
-
|
704 |
-
jQuery('#loading_div').hide();
|
705 |
-
jQuery('#opacity_div').hide();
|
706 |
}
|
707 |
}
|
4 |
* Time: 3:56 PM
|
5 |
*/
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
var keyFileSelected;
|
8 |
var keyFileSelectedML;
|
9 |
var filesSelected;
|
12 |
var isUploading;
|
13 |
|
14 |
var ajax = true;
|
15 |
+
var importer_ajax = true;
|
16 |
+
var media_lib_images = false;
|
17 |
+
|
18 |
+
var all_files_selected = false;
|
19 |
+
var no_selected_files = [];
|
20 |
+
|
|
|
21 |
jQuery(document).ready(function () {
|
22 |
+
var elements = 2;
|
23 |
var all_item_count = jQuery("#explorer_body_container #explorer_body").data("files_count");
|
24 |
jQuery("#explorer_body_container").scroll(function () {
|
25 |
var explorer_item_count = jQuery("#explorer_body .explorer_item").length;
|
28 |
var scroll_position = jQuery(this).scrollTop() + jQuery(this).innerHeight();
|
29 |
var scroll_Height = jQuery(this)[0].scrollHeight;
|
30 |
if (scroll_position >= scroll_Height) {
|
31 |
+
var start_count = (elements-1)*element_load_count;
|
32 |
+
var end_count = elements*element_load_count;
|
33 |
+
var next_files = wdb_all_files.slice(start_count, end_count);
|
34 |
+
ajax_print_images(next_files, jQuery("#explorer_body"), 'explorer_item', start_count);
|
35 |
elements++;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
});
|
39 |
+
var media_lib_elements = 2;
|
40 |
+
var media_lib_item_count = jQuery("#importer_body_container #importer_body").data("files_count");
|
41 |
+
jQuery("#importer_body_container").scroll(function () {
|
42 |
+
var importer_item_count = jQuery("#importer_body .importer_item").length;
|
43 |
+
if (importer_ajax && importer_item_count < media_lib_item_count) {
|
44 |
+
var scroll_position = jQuery(this).scrollTop() + jQuery(this).innerHeight();
|
45 |
+
var scroll_Height = jQuery(this)[0].scrollHeight;
|
46 |
+
if (scroll_position >= scroll_Height) {
|
47 |
+
var start_count = (media_lib_elements-1)*element_load_count;
|
48 |
+
var end_count = media_lib_elements*element_load_count;
|
49 |
+
var next_files = media_library_files.slice(start_count, end_count);
|
50 |
+
ajax_print_images(next_files , jQuery("#importer_body"), 'importer_item', start_count);
|
51 |
+
media_lib_elements++;
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
}
|
54 |
});
|
59 |
else {
|
60 |
var all_images_count = jQuery("#file_manager .item_thumb img").length;
|
61 |
}
|
62 |
+
if (!all_images_count) {
|
63 |
setTimeout(function(){jQuery(document).trigger("onUpload")});
|
64 |
}
|
65 |
else {
|
106 |
});
|
107 |
});
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
function loaded() {
|
110 |
jQuery("#opacity_div").hide();
|
111 |
jQuery("#loading_div").hide();
|
116 |
}
|
117 |
|
118 |
function submit(task, sortBy, sortOrder, itemsView, destDir, fileNewName, newDirName, clipboardTask, clipboardFiles, clipboardSrc, clipboardDest) {
|
119 |
+
var names_array = [];
|
120 |
+
var lib_names_array = [];
|
121 |
+
if (all_files_selected === true) {
|
122 |
+
for (i in wdb_all_files) {
|
123 |
+
var index = no_selected_files.indexOf(wdb_all_files[i]["name"]);
|
124 |
+
if (index < 0) {
|
125 |
+
var all_names = wdb_all_files[i]["name"];
|
126 |
+
names_array.push(all_names);
|
127 |
+
}
|
128 |
+
}
|
129 |
+
for (i in media_library_files) {
|
130 |
+
var lib_index = no_selected_files.indexOf(media_library_files[i]["name"]);
|
131 |
+
if (lib_index < 0) {
|
132 |
+
var lib_all_names = media_library_files[i]["path"];
|
133 |
+
lib_names_array.push(lib_all_names);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
fileNames = names_array.join("**#**");
|
137 |
+
fileNamesML = lib_names_array.join("**@**");
|
138 |
+
}
|
139 |
+
else {
|
140 |
+
fileNames = filesSelected.join("**#**");
|
141 |
+
fileNamesML = filesSelectedML.join("**@**");
|
142 |
+
}
|
143 |
+
|
144 |
switch (task) {
|
145 |
case "rename_item":
|
146 |
destDir = dir;
|
232 |
jQuery("#file_names_span span").html(result);
|
233 |
}
|
234 |
|
|
|
|
|
235 |
function submitFiles() {
|
236 |
if (filesSelected.length == 0) {
|
237 |
return;
|
238 |
}
|
239 |
var filesValid = [];
|
240 |
+
if (all_files_selected === true) {
|
241 |
+
for (i in wdb_all_files) {
|
|
|
242 |
var fileData = [];
|
243 |
+
if (wdb_all_files[i]["is_dir"] === false) {
|
244 |
+
var index = no_selected_files.indexOf(wdb_all_files[i]["name"]);
|
245 |
+
if (index < 0) {
|
246 |
+
fileData['name'] = wdb_all_files[i]["name"];
|
247 |
+
fileData['filename'] = wdb_all_files[i]["filename"];;
|
248 |
+
fileData['url'] = dir + "/" + wdb_all_files[i]["name"];
|
249 |
+
fileData['reliative_url'] = dirUrl + "/" + wdb_all_files[i]["name"];
|
250 |
+
fileData['thumb_url'] = dir + "/thumb/" + wdb_all_files[i]["name"];
|
251 |
+
fileData['thumb'] = wdb_all_files[i]["thumb"];
|
252 |
+
fileData['size'] = wdb_all_files[i]["size"];
|
253 |
+
fileData['filetype'] = wdb_all_files[i]["type"];
|
254 |
+
fileData['date_modified'] = wdb_all_files[i]["date_modified"];
|
255 |
+
fileData['resolution'] = wdb_all_files[i]["resolution"];
|
256 |
+
fileData['aperture'] = wdb_all_files[i]["aperture"];
|
257 |
+
fileData['credit'] = wdb_all_files[i]["credit"];
|
258 |
+
fileData['camera'] =wdb_all_files[i]["camera"];
|
259 |
+
fileData['caption'] = wdb_all_files[i]["caption"];
|
260 |
+
fileData['iso'] = wdb_all_files[i]["iso"];
|
261 |
+
fileData['orientation'] = wdb_all_files[i]["orientation"];
|
262 |
+
fileData['copyright'] = wdb_all_files[i]["copyright"];
|
263 |
+
filesValid.push(fileData);
|
264 |
+
}
|
265 |
+
}
|
266 |
+
}
|
267 |
+
}
|
268 |
+
else {
|
269 |
+
for (var i = 0; i < filesSelected.length; i++) {
|
270 |
+
var file_object = jQuery('.explorer_item[name="' + filesSelected[i] + '"]');
|
271 |
+
if (jQuery(file_object).attr("isDir") == "false") {
|
272 |
+
var fileData = [];
|
273 |
+
fileData['name'] = filesSelected[i];
|
274 |
+
fileData['filename'] = jQuery(file_object).attr("filename");
|
275 |
+
fileData['url'] = dir + "/" + filesSelected[i];
|
276 |
+
fileData['reliative_url'] = dirUrl + "/" + filesSelected[i];
|
277 |
+
fileData['thumb_url'] = dir + "/thumb/" + filesSelected[i];
|
278 |
+
fileData['thumb'] = jQuery(file_object).attr("filethumb");
|
279 |
+
fileData['size'] = jQuery(file_object).attr("filesize");
|
280 |
+
fileData['filetype'] = jQuery(file_object).attr("filetype");
|
281 |
+
fileData['date_modified'] = jQuery(file_object).attr("date_modified");
|
282 |
+
fileData['resolution'] = jQuery(file_object).attr("fileresolution");
|
283 |
+
fileData['aperture'] = jQuery(file_object).attr("fileAperture");
|
284 |
+
fileData['credit'] = jQuery(file_object).attr("fileCredit");
|
285 |
+
fileData['camera'] = jQuery(file_object).attr("fileCamera");
|
286 |
+
fileData['caption'] = jQuery(file_object).attr("fileCaption");
|
287 |
+
fileData['iso'] = jQuery(file_object).attr("fileIso");
|
288 |
+
fileData['orientation'] = jQuery(file_object).attr("fileOrientation");
|
289 |
+
fileData['copyright'] = jQuery(file_object).attr("fileCopyright");
|
290 |
+
filesValid.push(fileData);
|
291 |
+
}
|
292 |
}
|
293 |
}
|
294 |
+
|
295 |
window.parent[callback](filesValid);
|
296 |
window.parent.tb_remove();
|
297 |
}
|
298 |
|
299 |
function importFiles() {
|
300 |
if (filesSelectedML.length == 0) {
|
301 |
+
alert();
|
302 |
alert("Select at least one file to import.");
|
303 |
return;
|
304 |
}
|
344 |
}
|
345 |
|
346 |
|
|
|
|
|
|
|
347 |
//ctrls bar handlers
|
348 |
function onBtnUpClick(event, obj) {
|
349 |
var destDir = dir.substring(0, dir.lastIndexOf(DS));
|
353 |
function onBtnMakeDirClick(event, obj) {
|
354 |
var newDirName = prompt(messageEnterDirName);
|
355 |
if ((newDirName) && (newDirName != "")) {
|
356 |
+
submit("make_dir", null, null, null, null, null, newDirName.replace(/ /g, "_"), null, null, null, null);
|
357 |
}
|
358 |
}
|
359 |
|
361 |
if (filesSelected.length != 0) {
|
362 |
var newName = prompt(messageEnterNewName, getFileName(filesSelected[0]));
|
363 |
if ((newName != null) && (newName != "")) {
|
364 |
+
submit("rename_item", null, null, null, null, newName.replace(/ /g, "_").replace(/%/g, ""), null, null, null, null, null);
|
365 |
}
|
366 |
}
|
367 |
}
|
368 |
|
369 |
function onBtnCopyClick(event, obj) {
|
370 |
if (filesSelected.length != 0) {
|
371 |
+
var names_list = filesSelected.join("**#**");
|
372 |
+
var names_array = [];
|
373 |
+
if (all_files_selected === true) {
|
374 |
+
for (i in wdb_all_files) {
|
375 |
+
var index = no_selected_files.indexOf(wdb_all_files[i]["name"]);
|
376 |
+
if (index < 0) {
|
377 |
+
var all_names = wdb_all_files[i]["name"];
|
378 |
+
names_array.push(all_names);
|
379 |
+
}
|
380 |
+
}
|
381 |
+
names_list = names_array.join("**#**");
|
382 |
+
}
|
383 |
+
|
384 |
+
submit("", null, null, null, null, null, null, "copy", names_list, dir, null);
|
385 |
}
|
386 |
}
|
387 |
|
388 |
function onBtnCutClick(event, obj) {
|
389 |
if (filesSelected.length != 0) {
|
390 |
+
var names_list = filesSelected.join("**#**");
|
391 |
+
var names_array = [];
|
392 |
+
if (all_files_selected === true) {
|
393 |
+
for (i in wdb_all_files) {
|
394 |
+
var index = no_selected_files.indexOf(wdb_all_files[i]["name"]);
|
395 |
+
if (index < 0) {
|
396 |
+
var all_names = wdb_all_files[i]["name"];
|
397 |
+
names_array.push(all_names);
|
398 |
+
}
|
399 |
+
}
|
400 |
+
names_list = names_array.join("**#**");
|
401 |
+
}
|
402 |
+
submit("", null, null, null, null, null, null, "cut", names_list, dir, null);
|
403 |
}
|
404 |
}
|
405 |
|
449 |
}
|
450 |
|
451 |
function onBtnShowImportClick(event, obj) {
|
452 |
+
media_lib_images = true;
|
453 |
jQuery("#importer").fadeIn();
|
454 |
}
|
455 |
|
474 |
var e = e || window.event;
|
475 |
var chCode1 = e.which || e.paramlist_keyCode;
|
476 |
if ((e.ctrlKey || e.metaKey) && chCode1 == 65) {
|
477 |
+
all_files_selected = true;
|
478 |
jQuery(".explorer_item").addClass("explorer_item_select");
|
479 |
jQuery(".importer_item").addClass("importer_item_select");
|
480 |
filesSelected = [];
|
517 |
jQuery(".explorer_item").removeClass("explorer_item_select");
|
518 |
var objName = jQuery(obj).attr("name");
|
519 |
if (event.ctrlKey == true || event.metaKey == true) {
|
520 |
+
if (all_files_selected === true) {
|
521 |
+
if (filesSelected.indexOf(objName) == -1) {
|
522 |
+
var index = no_selected_files.indexOf(objName);
|
523 |
+
if (index >= 0) {
|
524 |
+
no_selected_files.splice( index, 1 );
|
525 |
+
}
|
526 |
+
}
|
527 |
+
else {
|
528 |
+
no_selected_files.push(objName);
|
529 |
+
}
|
530 |
+
}
|
531 |
if (filesSelected.indexOf(objName) == -1) {
|
532 |
filesSelected.push(objName);
|
533 |
keyFileSelected = obj;
|
690 |
keyFileSelected = this;
|
691 |
}
|
692 |
});
|
693 |
+
all_files_selected = true;
|
694 |
}
|
695 |
|
696 |
function onBtnSelectAllMediLibraryClick() {
|
705 |
});
|
706 |
}
|
707 |
|
708 |
+
function ajax_print_images(files, element, view_type, count) {
|
709 |
+
var element_class;
|
710 |
+
if (view_type === "explorer_item") {
|
711 |
+
element_class = "explorer_item";
|
712 |
+
var onmouseover = "onFileMOver(event, this);";
|
713 |
+
var onmouseout = "onFileMOut(event, this);";
|
714 |
+
var onclick = "onFileClick(event, this);";
|
715 |
+
var ondblclick = "onFileDblClick(event, this);";
|
716 |
+
var ondragstart = "onFileDragStart(event, this);";
|
717 |
+
}
|
718 |
+
else {
|
719 |
+
element_class = "importer_item";
|
720 |
+
var onmouseover = "onFileMOverML(event, this);";
|
721 |
+
var onmouseout = "onFileMOutML(event, this);";
|
722 |
+
var onclick = "onFileClickML(event, this);";
|
723 |
+
var ondblclick = "onFileDblClickML(event, this);";
|
724 |
+
var ondragstart = "";
|
725 |
+
}
|
726 |
+
|
727 |
+
for (i in files) {
|
728 |
+
var corent_file = files[i];
|
729 |
var name = corent_file["name"];
|
730 |
+
var path = "";
|
731 |
+
if (view_type === "importer_item") {
|
732 |
+
path = corent_file["path"];
|
733 |
+
}
|
734 |
var filename = corent_file["filename"];
|
735 |
var filethumb = corent_file["thumb"];
|
736 |
var filesize = corent_file["size"];
|
744 |
var fileIso = corent_file["iso"];
|
745 |
var fileOrientation = corent_file["orientation"];
|
746 |
var fileCopyright = corent_file["copyright"];
|
747 |
+
|
|
|
|
|
|
|
|
|
748 |
var ondragover = "";
|
749 |
var ondrop = "";
|
750 |
if (corent_file['is_dir'] == true) {
|
756 |
isDir = 'true';
|
757 |
}
|
758 |
|
759 |
+
var item_number = count;
|
760 |
+
count++;
|
761 |
var item_thumb = '<span class="item_thumb"><img src="' + corent_file['thumb'] + '"/></span>';
|
762 |
var item_icon = '<span class="item_icon"><img src="'+corent_file['icon']+'"/> </span>';
|
763 |
var item_name = '<span class="item_name">'+corent_file['name']+'</span>';
|
764 |
var item_size = '<span class="item_size">'+corent_file['size']+'</span>';
|
765 |
var item_date_modified = '<span class="item_date_modified">'+corent_file['date_modified']+'</span>';
|
766 |
var item_numbering = '<span class="item_numbering">'+item_number+'</span>';
|
767 |
+
var explorer_item = '<div class="' + element_class + '" ' +
|
|
|
768 |
'name="' + name + '" ' +
|
769 |
+
'path="' + path + '" ' +
|
770 |
'filename="' + filename + '" ' +
|
771 |
'filethumb="' + filethumb + '" ' +
|
772 |
'filesize="' + filesize + '" ' +
|
773 |
'filetype="' + filetype + '" ' +
|
774 |
'date_modified="' + date_modified + '" ' +
|
775 |
'fileresolution="' + fileresolution + '" ' +
|
|
|
776 |
'fileCredit="' + fileCredit + '" ' +
|
777 |
'fileAperture="' + fileAperture + '" ' +
|
778 |
'fileCamera="' + fileCamera + '" ' +
|
788 |
'ondragstart="' + ondragstart + '" ' +
|
789 |
'ondragover="' + ondragover + '" ' +
|
790 |
'ondrop="' + ondrop + '" ' +
|
791 |
+
'draggable="true">'+item_numbering + item_thumb + item_icon+item_name+item_size+item_date_modified+'</div>';
|
792 |
+
element.append(explorer_item);
|
|
|
|
|
793 |
}
|
794 |
}
|
filemanager/model.php
CHANGED
@@ -19,7 +19,7 @@ class FilemanagerModel {
|
|
19 |
// Variables //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
private $controller;
|
22 |
-
|
23 |
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
// Constructor & Destructor //
|
25 |
////////////////////////////////////////////////////////////////////////////////////////
|
@@ -30,7 +30,7 @@ class FilemanagerModel {
|
|
30 |
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
// Public Methods //
|
32 |
////////////////////////////////////////////////////////////////////////////////////////
|
33 |
-
public function get_file_manager_data(
|
34 |
global $wd_bwg_options;
|
35 |
$session_data = array();
|
36 |
$session_data['sort_by'] = $this->get_from_session('sort_by', 'date_modified');
|
@@ -45,10 +45,22 @@ class FilemanagerModel {
|
|
45 |
$data['session_data'] = $session_data;
|
46 |
$data['path_components'] = $this->get_path_components();
|
47 |
$data['dir'] = $this->controller->get_uploads_dir() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '');
|
48 |
-
$get_files_data = $this->get_files($session_data['sort_by'], $session_data['sort_order']
|
49 |
$data['files'] = $get_files_data['files'];
|
50 |
$data['files_count'] = $get_files_data['files_count'];
|
51 |
-
$data['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
$data['extensions'] = (isset($_REQUEST['extensions']) ? esc_html($_REQUEST['extensions']) : '');
|
53 |
$data['callback'] = (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : '');
|
54 |
return $data;
|
@@ -61,20 +73,13 @@ class FilemanagerModel {
|
|
61 |
// Private Methods //
|
62 |
////////////////////////////////////////////////////////////////////////////////////////
|
63 |
private function get_from_session($key, $default) {
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
// $_SESSION[$key] = $default;
|
72 |
-
$_REQUEST[$key] = stripslashes($default);
|
73 |
-
}
|
74 |
-
// return $_SESSION[$key];
|
75 |
-
return esc_html(stripslashes($_REQUEST[$key]));
|
76 |
-
// }
|
77 |
-
// return '';
|
78 |
}
|
79 |
|
80 |
public function get_path_components() {
|
@@ -101,7 +106,7 @@ class FilemanagerModel {
|
|
101 |
return $components;
|
102 |
}
|
103 |
|
104 |
-
function get_files($sort_by, $sort_order
|
105 |
$icons_dir_path = WD_BWG_DIR . '/filemanager/images/file_icons';
|
106 |
$icons_dir_url = WD_BWG_URL . '/filemanager/images/file_icons';
|
107 |
$valid_types = explode(',', isset($_REQUEST['extensions']) ? strtolower(esc_html($_REQUEST['extensions'])) : '*');
|
@@ -169,12 +174,9 @@ class FilemanagerModel {
|
|
169 |
// $result = $sort_order == 'asc' ? array_merge($dirs, $files) : array_merge($files, $dirs);
|
170 |
$result = array_merge($dirs, $files);
|
171 |
$files_count = count($result);
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
$result = array_slice($result, $min_count, $images_count, true);
|
176 |
-
}
|
177 |
-
return array("files" => $result, "files_count" => $files_count);
|
178 |
}
|
179 |
|
180 |
function get_media_library_files($sort_by, $sort_order) {
|
@@ -235,7 +237,10 @@ class FilemanagerModel {
|
|
235 |
$files[] = $file;
|
236 |
}
|
237 |
}
|
238 |
-
|
|
|
|
|
|
|
239 |
}
|
240 |
|
241 |
private function bwg_wp_read_image_metadata( $file ) {
|
19 |
// Variables //
|
20 |
////////////////////////////////////////////////////////////////////////////////////////
|
21 |
private $controller;
|
22 |
+
private $element_load_count = 100;
|
23 |
////////////////////////////////////////////////////////////////////////////////////////
|
24 |
// Constructor & Destructor //
|
25 |
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
////////////////////////////////////////////////////////////////////////////////////////
|
31 |
// Public Methods //
|
32 |
////////////////////////////////////////////////////////////////////////////////////////
|
33 |
+
public function get_file_manager_data() {
|
34 |
global $wd_bwg_options;
|
35 |
$session_data = array();
|
36 |
$session_data['sort_by'] = $this->get_from_session('sort_by', 'date_modified');
|
45 |
$data['session_data'] = $session_data;
|
46 |
$data['path_components'] = $this->get_path_components();
|
47 |
$data['dir'] = $this->controller->get_uploads_dir() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '');
|
48 |
+
$get_files_data = $this->get_files($session_data['sort_by'], $session_data['sort_order']);
|
49 |
$data['files'] = $get_files_data['files'];
|
50 |
$data['files_count'] = $get_files_data['files_count'];
|
51 |
+
$data['all_files'] = $get_files_data['all_files'];
|
52 |
+
$data['element_load_count'] = $this->element_load_count;
|
53 |
+
$media_library_files = ($wd_bwg_options->enable_ML_import ? $this->get_media_library_files($session_data['sort_by'], $session_data['sort_order']) : array());
|
54 |
+
if(!empty($media_library_files)){
|
55 |
+
$data['media_library_files'] = $media_library_files["files"];
|
56 |
+
$data['importer_files_count'] = $media_library_files["importer_files_count"];
|
57 |
+
$data['media_library_files_all'] = $media_library_files["media_library_files_all"];
|
58 |
+
}
|
59 |
+
else{
|
60 |
+
$data['media_library_files'] = array();
|
61 |
+
$data['importer_files_count'] = array();
|
62 |
+
$data['media_library_files_all'] = array();
|
63 |
+
}
|
64 |
$data['extensions'] = (isset($_REQUEST['extensions']) ? esc_html($_REQUEST['extensions']) : '');
|
65 |
$data['callback'] = (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : '');
|
66 |
return $data;
|
73 |
// Private Methods //
|
74 |
////////////////////////////////////////////////////////////////////////////////////////
|
75 |
private function get_from_session($key, $default) {
|
76 |
+
if (isset($_REQUEST[$key])) {
|
77 |
+
$_REQUEST[$key] = stripslashes($_REQUEST[$key]);
|
78 |
+
}
|
79 |
+
else {
|
80 |
+
$_REQUEST[$key] = stripslashes($default);
|
81 |
+
}
|
82 |
+
return esc_html(stripslashes($_REQUEST[$key]));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
|
85 |
public function get_path_components() {
|
106 |
return $components;
|
107 |
}
|
108 |
|
109 |
+
function get_files($sort_by, $sort_order) {
|
110 |
$icons_dir_path = WD_BWG_DIR . '/filemanager/images/file_icons';
|
111 |
$icons_dir_url = WD_BWG_URL . '/filemanager/images/file_icons';
|
112 |
$valid_types = explode(',', isset($_REQUEST['extensions']) ? strtolower(esc_html($_REQUEST['extensions'])) : '*');
|
174 |
// $result = $sort_order == 'asc' ? array_merge($dirs, $files) : array_merge($files, $dirs);
|
175 |
$result = array_merge($dirs, $files);
|
176 |
$files_count = count($result);
|
177 |
+
$all_files = $result;
|
178 |
+
$result = array_slice($result, 0, $this->element_load_count, true);
|
179 |
+
return array("files" => $result, "all_files"=>$all_files, "files_count" => $files_count);
|
|
|
|
|
|
|
180 |
}
|
181 |
|
182 |
function get_media_library_files($sort_by, $sort_order) {
|
237 |
$files[] = $file;
|
238 |
}
|
239 |
}
|
240 |
+
$files_count = count($files);
|
241 |
+
$all_files = $files;
|
242 |
+
$files = array_slice($files, 0, $this->element_load_count, true);
|
243 |
+
return array("files" => $files, 'media_library_files_all' => $all_files, "importer_files_count" => $files_count);
|
244 |
}
|
245 |
|
246 |
private function bwg_wp_read_image_metadata( $file ) {
|
filemanager/view.php
CHANGED
@@ -29,7 +29,7 @@ class FilemanagerView {
|
|
29 |
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
// Public Methods //
|
31 |
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
-
public function display(
|
33 |
if (isset($_GET['filemanager_msg']) && esc_html($_GET['filemanager_msg']) != '') {
|
34 |
?>
|
35 |
<div id="file_manager_message" style="height:40px;">
|
@@ -41,7 +41,7 @@ class FilemanagerView {
|
|
41 |
$_GET['filemanager_msg'] = '';
|
42 |
}
|
43 |
global $wd_bwg_options;
|
44 |
-
$file_manager_data = $this->model->get_file_manager_data(
|
45 |
$items_view = $file_manager_data['session_data']['items_view'];
|
46 |
$sort_by = $file_manager_data['session_data']['sort_by'];
|
47 |
$sort_order = $file_manager_data['session_data']['sort_order'];
|
@@ -82,6 +82,9 @@ class FilemanagerView {
|
|
82 |
var callback = "<?php echo (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : ''); ?>";
|
83 |
var sortBy = "<?php echo $sort_by; ?>";
|
84 |
var sortOrder = "<?php echo $sort_order; ?>";
|
|
|
|
|
|
|
85 |
</script>
|
86 |
<script src="<?php echo WD_BWG_URL; ?>/filemanager/js/default.js?ver=<?php echo wd_bwg_version(); ?>"></script>
|
87 |
<link href="<?php echo WD_BWG_URL; ?>/filemanager/css/default.css?ver=<?php echo wd_bwg_version(); ?>" type="text/css" rel="stylesheet">
|
@@ -292,7 +295,7 @@ class FilemanagerView {
|
|
292 |
</div>
|
293 |
<div id="importer_body_wrapper">
|
294 |
<div id="importer_body_container">
|
295 |
-
<div id="importer_body">
|
296 |
<?php
|
297 |
foreach ($file_manager_data['media_library_files'] as $key => $file) {
|
298 |
$file['name'] = esc_html($file['name']);
|
29 |
////////////////////////////////////////////////////////////////////////////////////////
|
30 |
// Public Methods //
|
31 |
////////////////////////////////////////////////////////////////////////////////////////
|
32 |
+
public function display() {
|
33 |
if (isset($_GET['filemanager_msg']) && esc_html($_GET['filemanager_msg']) != '') {
|
34 |
?>
|
35 |
<div id="file_manager_message" style="height:40px;">
|
41 |
$_GET['filemanager_msg'] = '';
|
42 |
}
|
43 |
global $wd_bwg_options;
|
44 |
+
$file_manager_data = $this->model->get_file_manager_data();
|
45 |
$items_view = $file_manager_data['session_data']['items_view'];
|
46 |
$sort_by = $file_manager_data['session_data']['sort_by'];
|
47 |
$sort_order = $file_manager_data['session_data']['sort_order'];
|
82 |
var callback = "<?php echo (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : ''); ?>";
|
83 |
var sortBy = "<?php echo $sort_by; ?>";
|
84 |
var sortOrder = "<?php echo $sort_order; ?>";
|
85 |
+
var wdb_all_files = <?php echo (json_encode($file_manager_data["all_files"], true)); ?>;
|
86 |
+
var media_library_files = <?php echo (json_encode($file_manager_data["media_library_files_all"], true)); ?>;
|
87 |
+
var element_load_count = <?php echo (json_encode($file_manager_data["element_load_count"], true)); ?>;
|
88 |
</script>
|
89 |
<script src="<?php echo WD_BWG_URL; ?>/filemanager/js/default.js?ver=<?php echo wd_bwg_version(); ?>"></script>
|
90 |
<link href="<?php echo WD_BWG_URL; ?>/filemanager/css/default.css?ver=<?php echo wd_bwg_version(); ?>" type="text/css" rel="stylesheet">
|
295 |
</div>
|
296 |
<div id="importer_body_wrapper">
|
297 |
<div id="importer_body_container">
|
298 |
+
<div id="importer_body" data-files_count="<?php echo $file_manager_data['importer_files_count'];?>">
|
299 |
<?php
|
300 |
foreach ($file_manager_data['media_library_files'] as $key => $file) {
|
301 |
$file['name'] = esc_html($file['name']);
|
frontend/views/BWGViewGalleryBox.php
CHANGED
@@ -801,7 +801,7 @@ class BWGViewGalleryBox {
|
|
801 |
$style = 'none';
|
802 |
$current_image_arr = explode('/', $current_image_url);
|
803 |
if (!$is_embed) {
|
804 |
-
$download_href = site_url() . '/' . $WD_BWG_UPLOAD_DIR . $
|
805 |
$style = 'inline-block';
|
806 |
}
|
807 |
elseif (preg_match('/FLICKR/', $current_filetype) == 1) {
|
@@ -1423,7 +1423,7 @@ class BWGViewGalleryBox {
|
|
1423 |
jQuery("#bwg_download").show();
|
1424 |
if (!is_embed) {
|
1425 |
jQuery("#bwg_fullsize_image").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
|
1426 |
-
jQuery("#bwg_download").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['
|
1427 |
}
|
1428 |
else {
|
1429 |
jQuery("#bwg_fullsize_image").attr("href", data[key]['image_url']);
|
801 |
$style = 'none';
|
802 |
$current_image_arr = explode('/', $current_image_url);
|
803 |
if (!$is_embed) {
|
804 |
+
$download_href = site_url() . '/' . $WD_BWG_UPLOAD_DIR . str_replace('/thumb/', '/.original/', $current_thumb_url);
|
805 |
$style = 'inline-block';
|
806 |
}
|
807 |
elseif (preg_match('/FLICKR/', $current_filetype) == 1) {
|
1423 |
jQuery("#bwg_download").show();
|
1424 |
if (!is_embed) {
|
1425 |
jQuery("#bwg_fullsize_image").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['image_url']);
|
1426 |
+
jQuery("#bwg_download").attr("href", "<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>" + data[key]['thumb_url'].replace('/thumb/', '/.original/'));
|
1427 |
}
|
1428 |
else {
|
1429 |
jQuery("#bwg_fullsize_image").attr("href", data[key]['image_url']);
|
frontend/views/BWGViewSlideshow.php
CHANGED
@@ -3,7 +3,7 @@ class BWGViewSlideshow {
|
|
3 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
4 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
5 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
6 |
-
|
7 |
global $WD_BWG_UPLOAD_DIR;
|
8 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
9 |
global $wd_bwg_options;
|
@@ -19,6 +19,58 @@ class BWGViewSlideshow {
|
|
19 |
if (!isset($params['tag'])) {
|
20 |
$params['tag'] = 0;
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
$image_right_click = $wd_bwg_options->image_right_click;
|
23 |
if (!$from) {
|
24 |
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
|
@@ -145,6 +197,17 @@ class BWGViewSlideshow {
|
|
145 |
wp_enqueue_style('bwg_mCustomScrollbar');
|
146 |
$google_fonts = WDWLibrary::get_google_fonts();
|
147 |
wp_enqueue_style('bwg_googlefonts');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
if (!wp_script_is('bwg_frontend', 'done')) {
|
149 |
wp_print_scripts('bwg_frontend');
|
150 |
}
|
@@ -170,6 +233,8 @@ class BWGViewSlideshow {
|
|
170 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["id"] = "<?php echo $image_row->id; ?>";
|
171 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["alt"] = "<?php echo $image_row->alt; ?>";
|
172 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["description"] = "<?php echo str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description); ?>";
|
|
|
|
|
173 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["image_url"] = "<?php echo $image_row->image_url; ?>";
|
174 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["thumb_url"] = "<?php echo $image_row->thumb_url; ?>";
|
175 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
|
@@ -225,20 +290,12 @@ class BWGViewSlideshow {
|
|
225 |
<span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
|
226 |
<?php
|
227 |
if (!$is_embed) {
|
228 |
-
|
229 |
-
|
230 |
-
<a href='<?php echo $image_row->redirect_url; ?>' target="<?php echo $wd_bwg_options->thumb_link_target ? '_blank' : '';?>">
|
231 |
-
<?php
|
232 |
-
}
|
233 |
-
?>
|
234 |
<img id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" image_id="<?php echo $image_row->id; ?>" alt="<?php echo $image_row->alt; ?>"/>
|
235 |
-
<?php
|
236 |
-
if ($wd_bwg_options->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url) {
|
237 |
-
?>
|
238 |
</a>
|
239 |
<?php
|
240 |
}
|
241 |
-
}
|
242 |
else{ /*$is_embed*/?>
|
243 |
<span id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_embed_<?php echo $bwg; ?>" image_id="<?php echo $image_row->id; ?>">
|
244 |
<?php
|
@@ -274,8 +331,11 @@ class BWGViewSlideshow {
|
|
274 |
</span>
|
275 |
</span>
|
276 |
</span>
|
|
|
|
|
277 |
<input type="hidden" id="bwg_current_image_key_<?php echo $bwg; ?>" value="<?php echo $key; ?>" />
|
278 |
<?php
|
|
|
279 |
}
|
280 |
else {
|
281 |
?>
|
@@ -284,19 +344,11 @@ class BWGViewSlideshow {
|
|
284 |
<span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
|
285 |
<?php
|
286 |
if (!$is_embed) {
|
287 |
-
if ($wd_bwg_options->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url) {
|
288 |
-
?>
|
289 |
-
<a href='<?php echo $image_row->redirect_url; ?>' target="<?php echo $wd_bwg_options->thumb_link_target ? '_blank' : '';?>">
|
290 |
-
<?php
|
291 |
-
}
|
292 |
?>
|
293 |
-
<
|
294 |
-
<?php
|
295 |
-
if($wd_bwg_options->thumb_click_action == 'redirect_to_url' && $image_row->redirect_url){
|
296 |
-
?>
|
297 |
</a>
|
298 |
-
<?php
|
299 |
-
}
|
300 |
}
|
301 |
else { /*$is_embed*/ ?>
|
302 |
<span class="bwg_slideshow_embed_<?php echo $bwg; ?>">
|
@@ -414,10 +466,63 @@ class BWGViewSlideshow {
|
|
414 |
}
|
415 |
?>
|
416 |
</div>
|
|
|
|
|
417 |
</div>
|
418 |
</div>
|
419 |
-
|
420 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
var bwg_trans_in_progress_<?php echo $bwg; ?> = false;
|
422 |
var bwg_transition_duration_<?php echo $bwg; ?> = <?php echo (($slideshow_interval < 4) && ($slideshow_interval != 0)) ? ($slideshow_interval * 1000) / 4 : ($slideshow_effect_duration * 1000); ?>;
|
423 |
var bwg_playInterval_<?php echo $bwg; ?>;
|
@@ -813,6 +918,7 @@ class BWGViewSlideshow {
|
|
813 |
}
|
814 |
return iterator;
|
815 |
}
|
|
|
816 |
function bwg_change_image_<?php echo $bwg; ?>(current_key, key, data_<?php echo $bwg; ?>, from_effect) {
|
817 |
/* Pause videos.*/
|
818 |
jQuery("#bwg_slideshow_image_container_<?php echo $bwg; ?>").find("iframe").each(function () {
|
@@ -855,8 +961,57 @@ class BWGViewSlideshow {
|
|
855 |
jQuery("#bwg_slideshow_image_<?php echo $bwg; ?>").attr('image_id', data_<?php echo $bwg; ?>[key]["id"]);
|
856 |
jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").html(jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[key]["alt"]).text());
|
857 |
jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").html(jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[key]["description"]).text());
|
858 |
-
var current_image_class = "#image_id_<?php echo $bwg; ?>_" + data_<?php echo $bwg; ?>[current_key]["id"];
|
859 |
-
var next_image_class = "#image_id_<?php echo $bwg; ?>_" + data_<?php echo $bwg; ?>[key]["id"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
860 |
bwg_<?php echo $slideshow_effect; ?>_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
|
861 |
<?php
|
862 |
if ($enable_slideshow_filmstrip) {
|
@@ -878,6 +1033,35 @@ class BWGViewSlideshow {
|
|
878 |
}
|
879 |
}
|
880 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
881 |
function bwg_popup_resize_<?php echo $bwg; ?>() {
|
882 |
var parent_width = jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").parent().width();
|
883 |
if (parent_width >= <?php echo $image_width; ?>) {
|
@@ -927,11 +1111,17 @@ class BWGViewSlideshow {
|
|
927 |
jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({fontSize: ((parent_width) * <?php echo 2 * $theme_row->slideshow_description_font_size / $image_width; ?>)});
|
928 |
jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({'display':'inline-block'});
|
929 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
930 |
}
|
931 |
-
jQuery(
|
932 |
bwg_popup_resize_<?php echo $bwg; ?>();
|
933 |
});
|
934 |
-
jQuery(
|
935 |
jQuery('#ajax_loading_<?php echo $bwg; ?>').hide();
|
936 |
<?php
|
937 |
if ($image_right_click) {
|
@@ -988,7 +1178,7 @@ class BWGViewSlideshow {
|
|
988 |
}
|
989 |
return false;
|
990 |
});
|
991 |
-
jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").
|
992 |
jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
|
993 |
if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left >= -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())) {
|
994 |
jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
|
@@ -1006,7 +1196,7 @@ class BWGViewSlideshow {
|
|
1006 |
}
|
1007 |
}, 500);
|
1008 |
});
|
1009 |
-
jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").
|
1010 |
jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
|
1011 |
if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < 0) {
|
1012 |
jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
|
@@ -1027,7 +1217,7 @@ class BWGViewSlideshow {
|
|
1027 |
/* Set filmstrip initial position.*/
|
1028 |
bwg_set_filmstrip_pos_<?php echo $bwg; ?>(jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width());
|
1029 |
/* Play/pause.*/
|
1030 |
-
jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").
|
1031 |
if (jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
|
1032 |
bwg_play_<?php echo $bwg; ?>();
|
1033 |
jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
|
@@ -1054,6 +1244,11 @@ class BWGViewSlideshow {
|
|
1054 |
document.getElementById("bwg_audio_<?php echo $bwg; ?>").play();
|
1055 |
}
|
1056 |
}
|
|
|
|
|
|
|
|
|
|
|
1057 |
jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").removeAttr("width");
|
1058 |
jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").removeAttr("height");
|
1059 |
});
|
@@ -1103,6 +1298,52 @@ class BWGViewSlideshow {
|
|
1103 |
event_stack_<?php echo $bwg; ?> = [];
|
1104 |
window.clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
|
1105 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1106 |
</script>
|
1107 |
<?php
|
1108 |
if ($from_shortcode) {
|
@@ -1568,6 +1809,11 @@ class BWGViewSlideshow {
|
|
1568 |
vertical-align: middle;
|
1569 |
text-align: center;
|
1570 |
}
|
|
|
|
|
|
|
|
|
|
|
1571 |
<?php
|
1572 |
return ob_get_clean();
|
1573 |
}
|
3 |
public function display($params, $from_shortcode = 0, $bwg = 0) {
|
4 |
require_once(WD_BWG_DIR . '/framework/WDWLibrary.php');
|
5 |
require_once(WD_BWG_DIR . '/framework/WDWLibraryEmbed.php');
|
6 |
+
$current_url = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
7 |
global $WD_BWG_UPLOAD_DIR;
|
8 |
$from = (isset($params['from']) ? esc_html($params['from']) : 0);
|
9 |
global $wd_bwg_options;
|
19 |
if (!isset($params['tag'])) {
|
20 |
$params['tag'] = 0;
|
21 |
}
|
22 |
+
if (!isset($params['popup_enable_pinterest'])) {
|
23 |
+
$params['popup_enable_pinterest'] = 0;
|
24 |
+
}
|
25 |
+
if (!isset($params['popup_enable_tumblr'])) {
|
26 |
+
$params['popup_enable_tumblr'] = 0;
|
27 |
+
}
|
28 |
+
if (!isset($params['show_search_box'])) {
|
29 |
+
$params['show_search_box'] = 0;
|
30 |
+
}
|
31 |
+
if (!isset($params['search_box_width'])) {
|
32 |
+
$params['search_box_width'] = 180;
|
33 |
+
}
|
34 |
+
if (!isset($params['popup_enable_info'])) {
|
35 |
+
$params['popup_enable_info'] = 1;
|
36 |
+
}
|
37 |
+
if (!isset($params['popup_info_always_show'])) {
|
38 |
+
$params['popup_info_always_show'] = 0;
|
39 |
+
}
|
40 |
+
if (!isset($params['popup_info_full_width'])) {
|
41 |
+
$params['popup_info_full_width'] = 0;
|
42 |
+
}
|
43 |
+
if (!isset($params['popup_enable_rate'])) {
|
44 |
+
$params['popup_enable_rate'] = 0;
|
45 |
+
}
|
46 |
+
if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
|
47 |
+
$params['thumb_click_action'] = 'do_nothing';
|
48 |
+
}
|
49 |
+
if (!isset($params['thumb_link_target'])) {
|
50 |
+
$params['thumb_link_target'] = 1;
|
51 |
+
}
|
52 |
+
if (!isset($params['popup_hit_counter'])) {
|
53 |
+
$params['popup_hit_counter'] = 0;
|
54 |
+
}
|
55 |
+
$params['popup_enable_google'] = $wd_bwg_options->popup_enable_google;
|
56 |
+
$params['popup_enable_twitter'] = $wd_bwg_options->popup_enable_twitter;
|
57 |
+
$params['popup_enable_facebook'] = $wd_bwg_options->popup_enable_facebook;
|
58 |
+
$params['popup_interval'] = $wd_bwg_options->popup_interval;
|
59 |
+
$params['popup_enable_comment'] = $wd_bwg_options->popup_enable_comment;
|
60 |
+
$params['popup_enable_filmstrip'] = $wd_bwg_options->popup_enable_filmstrip;
|
61 |
+
$params['popup_filmstrip_height'] = $wd_bwg_options->popup_filmstrip_height;
|
62 |
+
$params['popup_enable_ctrl_btn'] = $wd_bwg_options->popup_enable_ctrl_btn;
|
63 |
+
$params['popup_enable_fullscreen'] = $wd_bwg_options->popup_enable_fullscreen;
|
64 |
+
$params['popup_enable_info'] = $wd_bwg_options->popup_enable_info;
|
65 |
+
$params['popup_info_always_show'] = $wd_bwg_options->popup_info_always_show;
|
66 |
+
$params['popup_hit_counter'] = $wd_bwg_options->popup_hit_counter;
|
67 |
+
$params['popup_enable_rate'] = $wd_bwg_options->popup_enable_rate;
|
68 |
+
$params['popup_effect'] = $wd_bwg_options->popup_type;
|
69 |
+
$params['popup_width'] = $wd_bwg_options->popup_width;
|
70 |
+
$params['popup_height'] = $wd_bwg_options->popup_height;
|
71 |
+
$params['popup_fullscreen'] = $wd_bwg_options->popup_fullscreen;
|
72 |
+
$params['popup_autoplay'] = $wd_bwg_options->popup_autoplay;
|
73 |
+
$params['popup_effect_duration'] = isset($wd_bwg_options->popup_effect_duration) ? $wd_bwg_options->popup_effect_duration : 1;
|
74 |
$image_right_click = $wd_bwg_options->image_right_click;
|
75 |
if (!$from) {
|
76 |
$theme_id = (isset($params['theme_id']) ? esc_html($params['theme_id']) : 1);
|
197 |
wp_enqueue_style('bwg_mCustomScrollbar');
|
198 |
$google_fonts = WDWLibrary::get_google_fonts();
|
199 |
wp_enqueue_style('bwg_googlefonts');
|
200 |
+
if ($params['thumb_click_action'] == 'open_lightbox') {
|
201 |
+
if (!wp_script_is('bwg_mCustomScrollbar', 'done')) {
|
202 |
+
wp_print_scripts('bwg_mCustomScrollbar');
|
203 |
+
}
|
204 |
+
if (!wp_script_is('jquery-fullscreen', 'done')) {
|
205 |
+
wp_print_scripts('jquery-fullscreen');
|
206 |
+
}
|
207 |
+
if (!wp_script_is('bwg_gallery_box', 'done')) {
|
208 |
+
wp_print_scripts('bwg_gallery_box');
|
209 |
+
}
|
210 |
+
}
|
211 |
if (!wp_script_is('bwg_frontend', 'done')) {
|
212 |
wp_print_scripts('bwg_frontend');
|
213 |
}
|
233 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["id"] = "<?php echo $image_row->id; ?>";
|
234 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["alt"] = "<?php echo $image_row->alt; ?>";
|
235 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["description"] = "<?php echo str_replace(array("\r\n", "\n", "\r"), esc_html('<br />'), $image_row->description); ?>";
|
236 |
+
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["filetype"] = "<?php echo $image_row->filetype; ?>";
|
237 |
+
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["filename"] = "<?php echo $image_row->filename; ?>";
|
238 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["image_url"] = "<?php echo $image_row->image_url; ?>";
|
239 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["thumb_url"] = "<?php echo $image_row->thumb_url; ?>";
|
240 |
data_<?php echo $bwg; ?>["<?php echo $key; ?>"]["date"] = "<?php echo $image_row->date; ?>";
|
290 |
<span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
|
291 |
<?php
|
292 |
if (!$is_embed) {
|
293 |
+
?>
|
294 |
+
<a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($wd_bwg_options->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
|
|
|
|
|
|
|
|
|
295 |
<img id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" image_id="<?php echo $image_row->id; ?>" alt="<?php echo $image_row->alt; ?>"/>
|
|
|
|
|
|
|
296 |
</a>
|
297 |
<?php
|
298 |
}
|
|
|
299 |
else{ /*$is_embed*/?>
|
300 |
<span id="bwg_slideshow_image_<?php echo $bwg; ?>" class="bwg_slideshow_embed_<?php echo $bwg; ?>" image_id="<?php echo $image_row->id; ?>">
|
301 |
<?php
|
331 |
</span>
|
332 |
</span>
|
333 |
</span>
|
334 |
+
<span class="bwg_slideshow_image_second_spun_<?php echo $bwg; ?>">
|
335 |
+
</span>
|
336 |
<input type="hidden" id="bwg_current_image_key_<?php echo $bwg; ?>" value="<?php echo $key; ?>" />
|
337 |
<?php
|
338 |
+
break;
|
339 |
}
|
340 |
else {
|
341 |
?>
|
344 |
<span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>">
|
345 |
<?php
|
346 |
if (!$is_embed) {
|
|
|
|
|
|
|
|
|
|
|
347 |
?>
|
348 |
+
<a <?php echo ($params['thumb_click_action'] == 'open_lightbox' ? (' class="bwg_lightbox_' . $bwg . '"' . ($wd_bwg_options->enable_seo ? ' href="' . ($is_embed ? $image_row->thumb_url : site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url) . '"' : '') . ' data-image-id="' . $image_row->id . '"') : ($params['thumb_click_action'] == 'redirect_to_url' && $image_row->redirect_url ? 'href="' . $image_row->redirect_url . '" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '')) ?>>
|
349 |
+
<img class="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR . $image_row->image_url; ?>" alt="<?php echo $image_row->alt; ?>"/>
|
|
|
|
|
350 |
</a>
|
351 |
+
<?php
|
|
|
352 |
}
|
353 |
else { /*$is_embed*/ ?>
|
354 |
<span class="bwg_slideshow_embed_<?php echo $bwg; ?>">
|
466 |
}
|
467 |
?>
|
468 |
</div>
|
469 |
+
<div id="bwg_spider_popup_loading_<?php echo $bwg; ?>" class="bwg_spider_popup_loading"></div>
|
470 |
+
<div id="spider_popup_overlay_<?php echo $bwg; ?>" class="spider_popup_overlay" onclick="spider_destroypopup(1000)"></div>
|
471 |
</div>
|
472 |
</div>
|
473 |
+
<script language="javascript" type="text/javascript" src="<?php echo WD_BWG_URL . '/js/bwg_embed.js?ver=' . wd_bwg_version(); ?>"></script>
|
474 |
<script>
|
475 |
+
<?php
|
476 |
+
$params_array = array(
|
477 |
+
'action' => 'GalleryBox',
|
478 |
+
'current_view' => $bwg,
|
479 |
+
'gallery_id' => $params['gallery_id'],
|
480 |
+
'theme_id' => $params['theme_id'],
|
481 |
+
'open_with_fullscreen' => $params['popup_fullscreen'],
|
482 |
+
'open_with_autoplay' => $params['popup_autoplay'],
|
483 |
+
'image_width' => $params['popup_width'],
|
484 |
+
'image_height' => $params['popup_height'],
|
485 |
+
'image_effect' => $params['popup_effect'],
|
486 |
+
'wd_sor' => $params['sort_by'],
|
487 |
+
'wd_ord' => $order_by,
|
488 |
+
'enable_image_filmstrip' => $params['popup_enable_filmstrip'],
|
489 |
+
'image_filmstrip_height' => $params['popup_filmstrip_height'],
|
490 |
+
'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'],
|
491 |
+
'enable_image_fullscreen' => $params['popup_enable_fullscreen'],
|
492 |
+
'popup_enable_info' => $params['popup_enable_info'],
|
493 |
+
'popup_info_always_show' => $params['popup_info_always_show'],
|
494 |
+
'popup_info_full_width' => $params['popup_info_full_width'],
|
495 |
+
'popup_hit_counter' => $params['popup_hit_counter'],
|
496 |
+
'popup_enable_rate' => $params['popup_enable_rate'],
|
497 |
+
'slideshow_interval' => $params['popup_interval'],
|
498 |
+
'enable_comment_social' => $params['popup_enable_comment'],
|
499 |
+
'enable_image_facebook' => $params['popup_enable_facebook'],
|
500 |
+
'enable_image_twitter' => $params['popup_enable_twitter'],
|
501 |
+
'enable_image_google' => $params['popup_enable_google'],
|
502 |
+
'enable_image_pinterest' => $params['popup_enable_pinterest'],
|
503 |
+
'enable_image_tumblr' => $params['popup_enable_tumblr'],
|
504 |
+
'watermark_type' => $params['watermark_type'],
|
505 |
+
'slideshow_effect_duration' => isset($params['popup_effect_duration']) ? $params['popup_effect_duration'] : 1,
|
506 |
+
'tag' => (isset($params['tag']) ? $params['tag'] : 0),
|
507 |
+
'current_url' => urlencode($current_url)
|
508 |
+
);
|
509 |
+
if ($params['watermark_type'] != 'none') {
|
510 |
+
$params_array['watermark_link'] = urlencode($params['watermark_link']);
|
511 |
+
$params_array['watermark_opacity'] = $params['watermark_opacity'];
|
512 |
+
$params_array['watermark_position'] = $params['watermark_position'];
|
513 |
+
}
|
514 |
+
if ($params['watermark_type'] == 'text') {
|
515 |
+
$params_array['watermark_text'] = urlencode($params['watermark_text']);
|
516 |
+
$params_array['watermark_font_size'] = $params['watermark_font_size'];
|
517 |
+
$params_array['watermark_font'] = $params['watermark_font'];
|
518 |
+
$params_array['watermark_color'] = $params['watermark_color'];
|
519 |
+
}
|
520 |
+
elseif ($params['watermark_type'] == 'image') {
|
521 |
+
$params_array['watermark_url'] = urlencode($params['watermark_url']);
|
522 |
+
$params_array['watermark_width'] = $params['watermark_width'];
|
523 |
+
$params_array['watermark_height'] = $params['watermark_height'];
|
524 |
+
}
|
525 |
+
?>
|
526 |
var bwg_trans_in_progress_<?php echo $bwg; ?> = false;
|
527 |
var bwg_transition_duration_<?php echo $bwg; ?> = <?php echo (($slideshow_interval < 4) && ($slideshow_interval != 0)) ? ($slideshow_interval * 1000) / 4 : ($slideshow_effect_duration * 1000); ?>;
|
528 |
var bwg_playInterval_<?php echo $bwg; ?>;
|
918 |
}
|
919 |
return iterator;
|
920 |
}
|
921 |
+
|
922 |
function bwg_change_image_<?php echo $bwg; ?>(current_key, key, data_<?php echo $bwg; ?>, from_effect) {
|
923 |
/* Pause videos.*/
|
924 |
jQuery("#bwg_slideshow_image_container_<?php echo $bwg; ?>").find("iframe").each(function () {
|
961 |
jQuery("#bwg_slideshow_image_<?php echo $bwg; ?>").attr('image_id', data_<?php echo $bwg; ?>[key]["id"]);
|
962 |
jQuery(".bwg_slideshow_title_text_<?php echo $bwg; ?>").html(jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[key]["alt"]).text());
|
963 |
jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").html(jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[key]["description"]).text());
|
964 |
+
/*var current_image_class = "#image_id_<?php echo $bwg; ?>_" + data_<?php echo $bwg; ?>[current_key]["id"];
|
965 |
+
var next_image_class = "#image_id_<?php echo $bwg; ?>_" + data_<?php echo $bwg; ?>[key]["id"];*/
|
966 |
+
var current_image_class = jQuery(".bwg_slideshow_image_spun_<?php echo $bwg; ?>").css("zIndex") == 2 ? ".bwg_slideshow_image_spun_<?php echo $bwg; ?>" : ".bwg_slideshow_image_second_spun_<?php echo $bwg; ?>";
|
967 |
+
var next_image_class = current_image_class == ".bwg_slideshow_image_second_spun_<?php echo $bwg; ?>" ? ".bwg_slideshow_image_spun_<?php echo $bwg; ?>" : ".bwg_slideshow_image_second_spun_<?php echo $bwg; ?>";
|
968 |
+
|
969 |
+
var is_embed = data_<?php echo $bwg; ?>[key]['filetype'].indexOf("EMBED_") > -1 ? true : false;
|
970 |
+
var is_embed_instagram_post = data_<?php echo $bwg; ?>[key]['filetype'].indexOf('INSTAGRAM_POST') > -1 ? true :false;
|
971 |
+
var cur_height = jQuery(current_image_class).height();
|
972 |
+
var cur_width = jQuery(current_image_class).width();
|
973 |
+
var innhtml = '<span class="bwg_slideshow_image_spun1_<?php echo $bwg; ?>"><span class="bwg_slideshow_image_spun2_<?php echo $bwg; ?>" style="display:table-cell;">';
|
974 |
+
if (!is_embed) {
|
975 |
+
<?php
|
976 |
+
if ($params['thumb_click_action'] != 'do_nothing' ) {
|
977 |
+
?>
|
978 |
+
innhtml += '<a' + <?php if ($params['thumb_click_action'] == 'open_lightbox') { echo '\' class="bwg_lightbox_' . $bwg . '" data-image-id="\' + data_' . $bwg . '[key][\'id\'] + \'"'; } else { echo ($params['thumb_click_action'] == 'redirect_to_url' && 'data_' . $bwg . '[key][\'redirect_url\']') ? '\' href="\'+ data_' . $bwg . '[key][\'redirect_url\']+\'" target="' . ($params['thumb_link_target'] ? '_blank' : '') . '"' : '';} ?> '+'>';
|
979 |
+
<?php
|
980 |
+
}
|
981 |
+
?>
|
982 |
+
innhtml += '<img style="max-height: ' + cur_height + 'px !important; max-width: ' + cur_width + 'px !important; display:inline-block;" class="bwg_slideshow_image_<?php echo $bwg; ?>" id="bwg_slideshow_image_<?php echo $bwg; ?>" src="<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[key]["image_url"]).text() + '" alt="' + data_<?php echo $bwg; ?>[key]["alt"] + '" image_id="' + data_<?php echo $bwg; ?>[key]["id"] + '" />';
|
983 |
+
}
|
984 |
+
else { /*is_embed*/
|
985 |
+
innhtml += '<span style="height: ' + cur_height + 'px; width: ' + cur_width + 'px;" class="bwg_popup_embed bwg_popup_watermark">';
|
986 |
+
if (is_embed_instagram_post) {
|
987 |
+
var post_width = 0;
|
988 |
+
var post_height = 0;
|
989 |
+
if (cur_height < cur_width + 88) {
|
990 |
+
post_height = cur_height;
|
991 |
+
post_width = post_height - 88;
|
992 |
+
}
|
993 |
+
else {
|
994 |
+
post_width = cur_width;
|
995 |
+
post_height = post_width + 88;
|
996 |
+
}
|
997 |
+
innhtml += spider_display_embed(data_<?php echo $bwg; ?>[key]['filetype'], data_<?php echo $bwg; ?>[key]['filename'], {class:"bwg_embed_frame", 'data-width': data_<?php echo $bwg; ?>[key]['image_width'], 'data-height': data_<?php echo $bwg; ?>[key]['image_height'], frameborder: "0", allowfullscreen: "allowfullscreen", style: "width:" + post_width + "px; height:" + post_height + "px; vertical-align:middle; display:inline-block; position:relative;"});
|
998 |
+
|
999 |
+
}
|
1000 |
+
else {
|
1001 |
+
innhtml += spider_display_embed(data_<?php echo $bwg; ?>[key]['filetype'], data_<?php echo $bwg; ?>[key]['filename'], {class:"bwg_embed_frame", frameborder:"0", allowfullscreen:"allowfullscreen", style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;" });
|
1002 |
+
}
|
1003 |
+
innhtml += "</span>";
|
1004 |
+
}
|
1005 |
+
innhtml += '</span></span>';
|
1006 |
+
jQuery(next_image_class).html(innhtml);
|
1007 |
+
if ('<?php echo $params['thumb_click_action']; ?>' == 'open_lightbox' || <?php echo $image_right_click; ?>) {
|
1008 |
+
bwg_document_ready_<?php echo $bwg; ?>();
|
1009 |
+
}
|
1010 |
+
<?php
|
1011 |
+
if ($wd_bwg_options->preload_images) {
|
1012 |
+
echo "bwg_preload_images_" . $bwg . "(key);";
|
1013 |
+
}
|
1014 |
+
?>
|
1015 |
bwg_<?php echo $slideshow_effect; ?>_<?php echo $bwg; ?>(current_image_class, next_image_class, direction);
|
1016 |
<?php
|
1017 |
if ($enable_slideshow_filmstrip) {
|
1033 |
}
|
1034 |
}
|
1035 |
}
|
1036 |
+
function bwg_preload_images_<?php echo $bwg; ?>(key) {
|
1037 |
+
count = <?php echo (int) $wd_bwg_options->preload_images_count / 2; ?>;
|
1038 |
+
var count_all = data_<?php echo $bwg; ?>.length;
|
1039 |
+
if (count_all < <?php echo $wd_bwg_options->preload_images_count; ?>) {
|
1040 |
+
count = 0;
|
1041 |
+
}
|
1042 |
+
if (count != 0) {
|
1043 |
+
for (var i = key - count; i < key + count; i++) {
|
1044 |
+
var index = parseInt((i + count_all) % count_all);
|
1045 |
+
var is_embed = data_<?php echo $bwg; ?>[index]['filetype'].indexOf("EMBED_") > -1 ? true : false;
|
1046 |
+
if (typeof data_<?php echo $bwg; ?>[index] != "undefined") {
|
1047 |
+
if (!is_embed) {
|
1048 |
+
jQuery("<img/>").attr("src", '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[index]["image_url"]).text());
|
1049 |
+
}
|
1050 |
+
}
|
1051 |
+
}
|
1052 |
+
}
|
1053 |
+
else {
|
1054 |
+
for (var i = 0; i < data_<?php echo $bwg; ?>.length; i++) {
|
1055 |
+
var is_embed = data_<?php echo $bwg; ?>[i]['filetype'].indexOf("EMBED_") > -1 ? true : false;
|
1056 |
+
if (typeof data_<?php echo $bwg; ?>[index] != "undefined") {
|
1057 |
+
if (!is_embed) {
|
1058 |
+
jQuery("<img/>").attr("src", '<?php echo site_url() . '/' . $WD_BWG_UPLOAD_DIR; ?>' + jQuery('<span style="display: block;" />').html(data_<?php echo $bwg; ?>[i]["image_url"]).text());
|
1059 |
+
}
|
1060 |
+
}
|
1061 |
+
}
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
}
|
1065 |
function bwg_popup_resize_<?php echo $bwg; ?>() {
|
1066 |
var parent_width = jQuery(".bwg_slideshow_image_wrap_<?php echo $bwg; ?>").parent().width();
|
1067 |
if (parent_width >= <?php echo $image_width; ?>) {
|
1111 |
jQuery(".bwg_slideshow_description_text_<?php echo $bwg; ?>").css({fontSize: ((parent_width) * <?php echo 2 * $theme_row->slideshow_description_font_size / $image_width; ?>)});
|
1112 |
jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").css({'display':'inline-block'});
|
1113 |
}
|
1114 |
+
if (data_<?php echo $bwg; ?>[parseInt(jQuery("#bwg_current_image_key_<?php echo $bwg; ?>").val())]["is_embed_video"]) {
|
1115 |
+
jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").css({display: 'none'});
|
1116 |
+
}
|
1117 |
+
else {
|
1118 |
+
jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").css({display: ''});
|
1119 |
+
}
|
1120 |
}
|
1121 |
+
jQuery(document).ready(function() {
|
1122 |
bwg_popup_resize_<?php echo $bwg; ?>();
|
1123 |
});
|
1124 |
+
jQuery(document).ready(function () {
|
1125 |
jQuery('#ajax_loading_<?php echo $bwg; ?>').hide();
|
1126 |
<?php
|
1127 |
if ($image_right_click) {
|
1178 |
}
|
1179 |
return false;
|
1180 |
});
|
1181 |
+
jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").click(function () {
|
1182 |
jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
|
1183 |
if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left >= -(jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").width() - jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width())) {
|
1184 |
jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
|
1196 |
}
|
1197 |
}, 500);
|
1198 |
});
|
1199 |
+
jQuery(".bwg_slideshow_filmstrip_left_<?php echo $bwg; ?>").click(function () {
|
1200 |
jQuery( ".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>" ).stop(true, false);
|
1201 |
if (jQuery(".bwg_slideshow_filmstrip_thumbnails_<?php echo $bwg; ?>").position().left < 0) {
|
1202 |
jQuery(".bwg_slideshow_filmstrip_right_<?php echo $bwg; ?>").css({opacity: 1, filter: "Alpha(opacity=100)"});
|
1217 |
/* Set filmstrip initial position.*/
|
1218 |
bwg_set_filmstrip_pos_<?php echo $bwg; ?>(jQuery(".bwg_slideshow_filmstrip_<?php echo $bwg; ?>").width());
|
1219 |
/* Play/pause.*/
|
1220 |
+
jQuery("#bwg_slideshow_play_pause_<?php echo $bwg; ?>").click(function () {
|
1221 |
if (jQuery(".bwg_ctrl_btn_<?php echo $bwg; ?>").hasClass("fa-play")) {
|
1222 |
bwg_play_<?php echo $bwg; ?>();
|
1223 |
jQuery(".bwg_slideshow_play_pause_<?php echo $bwg; ?>").attr("title", "<?php echo __('Pause', 'bwg'); ?>");
|
1244 |
document.getElementById("bwg_audio_<?php echo $bwg; ?>").play();
|
1245 |
}
|
1246 |
}
|
1247 |
+
<?php
|
1248 |
+
if ($wd_bwg_options->preload_images) {
|
1249 |
+
echo "bwg_preload_images_" . $bwg . "(parseInt(jQuery('#bwg_current_image_key_" . $bwg . "').val()));";
|
1250 |
+
}
|
1251 |
+
?>
|
1252 |
jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").removeAttr("width");
|
1253 |
jQuery(".bwg_slideshow_image_<?php echo $bwg; ?>").removeAttr("height");
|
1254 |
});
|
1298 |
event_stack_<?php echo $bwg; ?> = [];
|
1299 |
window.clearInterval(bwg_playInterval_<?php echo $bwg; ?>);
|
1300 |
});
|
1301 |
+
function bwg_gallery_box_<?php echo $bwg; ?>(image_id, openEcommerce) {
|
1302 |
+
if(typeof openEcommerce == undefined){
|
1303 |
+
openEcommerce = false;
|
1304 |
+
}
|
1305 |
+
var ecommerce = openEcommerce == true ? "&open_ecommerce=1" : "";
|
1306 |
+
var filterTags = jQuery("#bwg_tags_id_bwg_standart_thumbnails_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_tags_id_bwg_standart_thumbnails_<?php echo $bwg; ?>" ).val() : 0;
|
1307 |
+
var filtersearchname = jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() ? jQuery("#bwg_search_input_<?php echo $bwg; ?>" ).val() : '';
|
1308 |
+
spider_createpopup('<?php echo addslashes(add_query_arg($params_array, admin_url('admin-ajax.php'))); ?>&image_id=' + image_id + "&filter_tag_<?php echo $bwg; ?>=" + filterTags + ecommerce + "&filter_search_name_<?php echo $bwg; ?>=" + filtersearchname, '<?php echo $bwg; ?>', '<?php echo $params['popup_width']; ?>', '<?php echo $params['popup_height']; ?>', 1, 'testpopup', 5, "<?php echo $theme_row->lightbox_ctrl_btn_pos ;?>");
|
1309 |
+
}
|
1310 |
+
function bwg_document_ready_<?php echo $bwg; ?>() {
|
1311 |
+
|
1312 |
+
var bwg_touch_flag = false;
|
1313 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?>").on("click", function () {
|
1314 |
+
if (!bwg_touch_flag) {
|
1315 |
+
bwg_touch_flag = true;
|
1316 |
+
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
1317 |
+
bwg_gallery_box_<?php echo $bwg; ?>(jQuery(this).attr("data-image-id"));
|
1318 |
+
return false;
|
1319 |
+
}
|
1320 |
+
});
|
1321 |
+
|
1322 |
+
jQuery(".bwg_lightbox_<?php echo $bwg; ?> .bwg_ecommerce").on("click", function (event) {
|
1323 |
+
event.stopPropagation();
|
1324 |
+
if (!bwg_touch_flag) {
|
1325 |
+
bwg_touch_flag = true;
|
1326 |
+
setTimeout(function(){ bwg_touch_flag = false; }, 100);
|
1327 |
+
var image_id = jQuery(this).closest(".bwg_lightbox_<?php echo $bwg; ?>").attr("data-image-id");
|
1328 |
+
bwg_gallery_box_<?php echo $bwg; ?>(image_id, true);
|
1329 |
+
return false;
|
1330 |
+
}
|
1331 |
+
});
|
1332 |
+
<?php
|
1333 |
+
if ($image_right_click) {
|
1334 |
+
?>
|
1335 |
+
/* Disable right click.*/
|
1336 |
+
jQuery('div[id^="bwg_container"]').bind("contextmenu", function () {
|
1337 |
+
return false;
|
1338 |
+
});
|
1339 |
+
jQuery('div[id^="bwg_container"]').css('webkitTouchCallout','none');
|
1340 |
+
<?php
|
1341 |
+
}
|
1342 |
+
?>
|
1343 |
+
}
|
1344 |
+
jQuery(document).ready(function () {
|
1345 |
+
bwg_document_ready_<?php echo $bwg; ?>();
|
1346 |
+
});
|
1347 |
</script>
|
1348 |
<?php
|
1349 |
if ($from_shortcode) {
|
1809 |
vertical-align: middle;
|
1810 |
text-align: center;
|
1811 |
}
|
1812 |
+
#bwg_container1_<?php echo $bwg; ?> #bwg_container2_<?php echo $bwg; ?> #spider_popup_overlay_<?php echo $bwg; ?> {
|
1813 |
+
background-color: #<?php echo $theme_row->lightbox_overlay_bg_color; ?>;
|
1814 |
+
opacity: <?php echo number_format($theme_row->lightbox_overlay_bg_transparent / 100, 2, ".", ""); ?>;
|
1815 |
+
filter: Alpha(opacity=<?php echo $theme_row->lightbox_overlay_bg_transparent; ?>);
|
1816 |
+
}
|
1817 |
<?php
|
1818 |
return ob_get_clean();
|
1819 |
}
|
images/icons/best-wordpress-gallery.png
CHANGED
Binary file
|
images/icons/bwg_shortcode.png
DELETED
Binary file
|
images/icons/gallery-icon.png
CHANGED
Binary file
|
js/bwg.js
CHANGED
@@ -67,12 +67,6 @@ function save_tag(tag_id) {
|
|
67 |
var bwg_save_count = 50;
|
68 |
function spider_ajax_save(form_id, tr_group) {
|
69 |
var ajax_task = jQuery("#ajax_task").val();
|
70 |
-
if (!tr_group) {
|
71 |
-
var tr_group = 1;
|
72 |
-
}
|
73 |
-
else if (ajax_task == 'ajax_apply' || ajax_task == 'ajax_save') {
|
74 |
-
ajax_task = '';
|
75 |
-
}
|
76 |
var bwg_nonce = jQuery("#bwg_nonce").val();
|
77 |
var name = jQuery("#name").val();
|
78 |
var slug = jQuery("#slug").val();
|
@@ -100,6 +94,12 @@ function spider_ajax_save(form_id, tr_group) {
|
|
100 |
var image_current_id = jQuery("#image_current_id").val();
|
101 |
ids_array = ids_string.split(",");
|
102 |
var tr_count = ids_array.length;
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
if (tr_count > bwg_save_count) {
|
104 |
// Remove items form begin and end of array.
|
105 |
ids_array.splice(tr_group * bwg_save_count, ids_array.length);
|
@@ -262,19 +262,15 @@ function spider_ajax_save(form_id, tr_group) {
|
|
262 |
jQuery('#draganddrop').show();
|
263 |
}
|
264 |
if (ajax_task == "ajax_save") {
|
265 |
-
|
266 |
var $form = jQuery('#' + form_id),
|
267 |
-
|
268 |
-
|
269 |
-
if ( formAction.indexOf( "?" ) != -1 ) {
|
270 |
formAction += "&show_pointer=true";
|
271 |
}
|
272 |
else {
|
273 |
formAction += "?show_pointer=true";
|
274 |
}
|
275 |
-
|
276 |
-
$form.attr( "action", formAction );
|
277 |
-
|
278 |
$form.submit();
|
279 |
}
|
280 |
jQuery('#opacity_div').hide();
|
67 |
var bwg_save_count = 50;
|
68 |
function spider_ajax_save(form_id, tr_group) {
|
69 |
var ajax_task = jQuery("#ajax_task").val();
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
var bwg_nonce = jQuery("#bwg_nonce").val();
|
71 |
var name = jQuery("#name").val();
|
72 |
var slug = jQuery("#slug").val();
|
94 |
var image_current_id = jQuery("#image_current_id").val();
|
95 |
ids_array = ids_string.split(",");
|
96 |
var tr_count = ids_array.length;
|
97 |
+
if (!tr_group) {
|
98 |
+
var tr_group = 1;
|
99 |
+
}
|
100 |
+
else if ((tr_count > bwg_save_count * tr_group) && (ajax_task == 'ajax_apply' || ajax_task == 'ajax_save')) {
|
101 |
+
ajax_task = '';
|
102 |
+
}
|
103 |
if (tr_count > bwg_save_count) {
|
104 |
// Remove items form begin and end of array.
|
105 |
ids_array.splice(tr_group * bwg_save_count, ids_array.length);
|
262 |
jQuery('#draganddrop').show();
|
263 |
}
|
264 |
if (ajax_task == "ajax_save") {
|
|
|
265 |
var $form = jQuery('#' + form_id),
|
266 |
+
formAction = $form.attr("action");
|
267 |
+
if (formAction.indexOf("?") != -1) {
|
|
|
268 |
formAction += "&show_pointer=true";
|
269 |
}
|
270 |
else {
|
271 |
formAction += "?show_pointer=true";
|
272 |
}
|
273 |
+
$form.attr("action", formAction);
|
|
|
|
|
274 |
$form.submit();
|
275 |
}
|
276 |
jQuery('#opacity_div').hide();
|
js/bwg_editor_button.js
CHANGED
@@ -59,7 +59,7 @@ jQuery(window).load(function(){
|
|
59 |
},
|
60 |
_do_bwg:function (ed) {
|
61 |
return ed.replace(/\[Best_Wordpress_Gallery([^\]]*)\]/g, function (d, c) {
|
62 |
-
return '<img src="' + bwg_plugin_url + '/images/icons/
|
63 |
})
|
64 |
},
|
65 |
_get_bwg:function (b) {
|
59 |
},
|
60 |
_do_bwg:function (ed) {
|
61 |
return ed.replace(/\[Best_Wordpress_Gallery([^\]]*)\]/g, function (d, c) {
|
62 |
+
return '<img src="' + bwg_plugin_url + '/images/icons/gallery-icon.png" class="bwg_shortcode mceItem" title="Best_Wordpress_Gallery' + tinymce.DOM.encode(c) + '" />';
|
63 |
})
|
64 |
},
|
65 |
_get_bwg:function (b) {
|
js/bwg_embed.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
*/
|
7 |
|
8 |
function spider_display_embed(embed_type, embed_id, attrs){
|
9 |
-
|
10 |
var html_to_insert = '';
|
11 |
|
12 |
switch(embed_type) {
|
6 |
*/
|
7 |
|
8 |
function spider_display_embed(embed_type, embed_id, attrs){
|
9 |
+
|
10 |
var html_to_insert = '';
|
11 |
|
12 |
switch(embed_type) {
|
js/bwg_shortcode.js
CHANGED
@@ -665,7 +665,7 @@ function bwg_gallery_type(gallery_type) {
|
|
665 |
}
|
666 |
|
667 |
}
|
668 |
-
|
669 |
jQuery("#tbody_popup_other").css('display', '');
|
670 |
jQuery("#tbody_popup").css('display', '');
|
671 |
jQuery("#tr_popup_width_height").css('display', '');
|
@@ -698,7 +698,6 @@ function bwg_gallery_type(gallery_type) {
|
|
698 |
jQuery("#tr_popup_info_always_show").css('display', '');
|
699 |
bwg_popup_fullscreen();
|
700 |
bwg_thumb_click_action();
|
701 |
-
}
|
702 |
bwg_loadmore();
|
703 |
}
|
704 |
|
665 |
}
|
666 |
|
667 |
}
|
668 |
+
|
669 |
jQuery("#tbody_popup_other").css('display', '');
|
670 |
jQuery("#tbody_popup").css('display', '');
|
671 |
jQuery("#tr_popup_width_height").css('display', '');
|
698 |
jQuery("#tr_popup_info_always_show").css('display', '');
|
699 |
bwg_popup_fullscreen();
|
700 |
bwg_thumb_click_action();
|
|
|
701 |
bwg_loadmore();
|
702 |
}
|
703 |
|
js/images/bwg_edit_but.png
CHANGED
Binary file
|
photo-gallery.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Photo Gallery
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
6 |
* Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
|
7 |
-
* Version: 1.3.
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -456,8 +456,7 @@ function bwg_shortcode($params) {
|
|
456 |
die();
|
457 |
}
|
458 |
}
|
459 |
-
|
460 |
-
if ($params['gallery_type'] != 'slideshow') {
|
461 |
shortcode_atts(array(
|
462 |
'popup_fullscreen' => 0,
|
463 |
'popup_autoplay' => 0,
|
@@ -483,7 +482,6 @@ function bwg_shortcode($params) {
|
|
483 |
'watermark_type' => 'none',
|
484 |
'popup_effect_duration' => 1,
|
485 |
), $params);
|
486 |
-
}
|
487 |
|
488 |
switch ($params['watermark_type']) {
|
489 |
case 'text': {
|
@@ -523,8 +521,8 @@ function bwg_shortcode($params) {
|
|
523 |
}
|
524 |
ob_start();
|
525 |
bwg_front_end($params);
|
526 |
-
return str_replace(array("\r\n", "\n", "\r"), '', ob_get_clean());
|
527 |
-
|
528 |
}
|
529 |
add_shortcode('Best_Wordpress_Gallery', 'bwg_shortcode');
|
530 |
|
@@ -1619,7 +1617,7 @@ function bwg_activate() {
|
|
1619 |
));
|
1620 |
}
|
1621 |
$version = get_option('wd_bwg_version');
|
1622 |
-
$new_version = '1.3.
|
1623 |
if ($version && version_compare($version, $new_version, '<')) {
|
1624 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
1625 |
bwg_update($version);
|
@@ -1671,7 +1669,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
|
|
1671 |
|
1672 |
function bwg_update_hook() {
|
1673 |
$version = get_option('wd_bwg_version');
|
1674 |
-
$new_version = '1.3.
|
1675 |
if ($version && version_compare($version, $new_version, '<')) {
|
1676 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
1677 |
bwg_update($version);
|
4 |
* Plugin Name: Photo Gallery
|
5 |
* Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
6 |
* Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
|
7 |
+
* Version: 1.3.31
|
8 |
* Author: WebDorado
|
9 |
* Author URI: https://web-dorado.com/
|
10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
456 |
die();
|
457 |
}
|
458 |
}
|
459 |
+
|
|
|
460 |
shortcode_atts(array(
|
461 |
'popup_fullscreen' => 0,
|
462 |
'popup_autoplay' => 0,
|
482 |
'watermark_type' => 'none',
|
483 |
'popup_effect_duration' => 1,
|
484 |
), $params);
|
|
|
485 |
|
486 |
switch ($params['watermark_type']) {
|
487 |
case 'text': {
|
521 |
}
|
522 |
ob_start();
|
523 |
bwg_front_end($params);
|
524 |
+
// return str_replace(array("\r\n", "\n", "\r"), '', ob_get_clean());
|
525 |
+
return ob_get_clean();
|
526 |
}
|
527 |
add_shortcode('Best_Wordpress_Gallery', 'bwg_shortcode');
|
528 |
|
1617 |
));
|
1618 |
}
|
1619 |
$version = get_option('wd_bwg_version');
|
1620 |
+
$new_version = '1.3.31';
|
1621 |
if ($version && version_compare($version, $new_version, '<')) {
|
1622 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
1623 |
bwg_update($version);
|
1669 |
|
1670 |
function bwg_update_hook() {
|
1671 |
$version = get_option('wd_bwg_version');
|
1672 |
+
$new_version = '1.3.31';
|
1673 |
if ($version && version_compare($version, $new_version, '<')) {
|
1674 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
1675 |
bwg_update($version);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
|
4 |
Tags: content gallery, gallery, gallery image, image gallery, images gallery, lightbox gallery, media gallery, photo gallery, responsive gallery, thumbnail gallery, wordpress gallery, youtube gallery
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -175,6 +175,13 @@ To enable the feature of adding Media Library images, go to Photo Gallery > Opti
|
|
175 |
|
176 |
== Changelog ==
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
= 1.3.30 =
|
179 |
* Changed: Scroll load in filemanager.
|
180 |
* Fixed: Image dimensions on images reset.
|
4 |
Tags: content gallery, gallery, gallery image, image gallery, images gallery, lightbox gallery, media gallery, photo gallery, responsive gallery, thumbnail gallery, wordpress gallery, youtube gallery
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 1.3.31
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
175 |
|
176 |
== Changelog ==
|
177 |
|
178 |
+
= 1.3.31 =
|
179 |
+
* Added: Open lightbox from slideshow and carousel views.
|
180 |
+
* Changed: Download original image from frontend.
|
181 |
+
* Changed: Preload images in slideshow view.
|
182 |
+
* Fixed: Scroll load in filemanager.
|
183 |
+
* Added: Header for deleted image on shared image open.
|
184 |
+
|
185 |
= 1.3.30 =
|
186 |
* Changed: Scroll load in filemanager.
|
187 |
* Fixed: Image dimensions on images reset.
|