Gallery – Photo Gallery – Image Gallery - Version 1.3.1

Version Description

  • Changed lightbox script
Download this release

Release Info

Developer machothemes
Plugin Icon wp plugin Gallery – Photo Gallery – Image Gallery
Version 1.3.1
Comparing to
See all releases

Code changes from version 1.2.1 to 1.3.1

Modula.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Modula is one of the best & most creative WordPress gallery plugins. Use it to create a great grid or
6
  * masonry image gallery.
7
  * Author: Macho Themes
8
- * Version: 1.2.1
9
  * Author URI: https://www.machothemes.com/
10
  */
11
 
@@ -21,8 +21,9 @@ if ( ! class_exists( "ModulaLite" ) ) {
21
  class ModulaLite {
22
 
23
  private $loadedData;
 
24
 
25
- private $version = "1.2.1";
26
 
27
  private $defaultValues = array(
28
  'width' => 100,
@@ -61,6 +62,8 @@ if ( ! class_exists( "ModulaLite" ) ) {
61
  'hoverEffect' => 'pufrobo',
62
  'hasResizedImages' => false,
63
  'importedFrom' => '',
 
 
64
  );
65
 
66
  public function __construct() {
@@ -71,6 +74,9 @@ if ( ! class_exists( "ModulaLite" ) ) {
71
  $this->define_hover_effects();
72
  $this->ModulaDB = $this->create_db_conn();
73
 
 
 
 
74
  add_filter( 'widget_text', 'do_shortcode' );
75
  add_filter( 'mce_buttons', array( $this, 'editor_button' ) );
76
  add_filter( 'mce_external_plugins', array( $this, 'register_editor_plugin' ) );
@@ -82,7 +88,8 @@ if ( ! class_exists( "ModulaLite" ) ) {
82
  add_action( 'admin_menu', array( $this, 'add_gallery_admin_menu' ) );
83
 
84
  add_shortcode( 'Modula', array( $this, 'gallery_shortcode_handler' ) );
85
-
 
86
  add_action( 'wp_ajax_modula_save_gallery', array( $this, 'save_gallery' ) );
87
  add_action( 'wp_ajax_modula_save_image', array( $this, 'save_image' ) );
88
  add_action( 'wp_ajax_modula_add_image', array( $this, 'add_image' ) );
@@ -101,6 +108,350 @@ if ( ! class_exists( "ModulaLite" ) ) {
101
 
102
  add_filter( 'plugin_row_meta', array( $this, 'register_links' ), 10, 2 );
103
  add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  }
105
 
106
  //Define textdomain
@@ -266,7 +617,7 @@ if ( ! class_exists( "ModulaLite" ) ) {
266
  public function register_links( $links, $file ) {
267
  $base = plugin_basename( __FILE__ );
268
  if ( $file == $base ) {
269
- $links[] = '<a href="admin.php?page=modula-lite-admin" title="Modula Grid Gallery Dashboard">Dashboard</a>';
270
  $links[] = '<a href="https://twitter.com/MachoThemez" title="@MachoThemez on Twitter">Twitter</a>';
271
  $links[] = '<a href="https://www.facebook.com/machothemes" title="MachoThemes on Facebook">Facebook</a>';
272
  }
@@ -420,15 +771,14 @@ if ( ! class_exists( "ModulaLite" ) ) {
420
  wp_register_script( 'modula', plugins_url() . '/modula-best-grid-gallery/scripts/jquery.modula.js', array( 'jquery' ) );
421
  wp_enqueue_script( 'modula' );
422
 
423
-
424
- wp_register_style( 'modula_stylesheet', plugins_url() . '/modula-best-grid-gallery/scripts/modula.css' );
425
  wp_enqueue_style( 'modula_stylesheet' );
426
 
427
  wp_register_style( 'effects_stylesheet', plugins_url() . '/modula-best-grid-gallery/scripts/effects.css', null, $this->version );
428
  wp_enqueue_style( 'effects_stylesheet' );
429
 
430
- wp_register_script( 'lightbox2_script', plugins_url() . '/modula-best-grid-gallery/lightbox/lightbox2/js/script.js', array( 'jquery' ) );
431
- wp_register_style( 'lightbox2_stylesheet', plugins_url() . '/modula-best-grid-gallery/lightbox/lightbox2/css/style.css' );
432
  }
433
 
434
  //Admin Section - register scripts and styles
@@ -482,7 +832,7 @@ if ( ! class_exists( "ModulaLite" ) ) {
482
 
483
  //Create Admin Menu
484
  public function add_gallery_admin_menu() {
485
- $overview = add_menu_page( 'Manage Galleries', 'Modula', 'edit_posts', 'modula-lite-admin', array(
486
  $this,
487
  'add_overview',
488
  ), plugins_url() . '/modula-best-grid-gallery/admin/icon.png' );
@@ -502,7 +852,7 @@ if ( ! class_exists( "ModulaLite" ) ) {
502
 
503
  if ( $imageUrl ) {
504
  if ( strncmp( strtolower( $imageUrl ), strtolower( site_url() ), strlen( site_url() ) ) != 0 ) {
505
- $fix = add_submenu_page( 'modula-lite-admin', __( 'Modula >> Fix', 'Modula' ), '❗️ ' . __( 'Fix', 'Modula' ), 'edit_posts', 'modula-lite-gallery-fix', array(
506
  $this,
507
  'fix',
508
  ) );
@@ -513,15 +863,15 @@ if ( ! class_exists( "ModulaLite" ) ) {
513
  add_option( 'Modula_skip_fix', true );
514
  }
515
 
516
- $add_gallery = add_submenu_page( 'modula-lite-admin', __( 'Modula - Add Gallery', 'Modula' ), __( 'Add Gallery', 'Modula' ), 'edit_posts', 'modula-lite-add', array(
517
  $this,
518
  'add_gallery',
519
  ) );
520
- $edit_gallery = add_submenu_page( NULL, __( 'Modula - Edit Gallery', 'Modula' ), __( 'Edit Gallery', 'Modula' ), 'edit_posts', 'modula-lite-edit', array(
521
  $this,
522
  'edit_gallery',
523
  ) );
524
- $upgrade = add_submenu_page( 'modula-lite-admin', __( 'Modula - Upgrade to PRO', 'Modula' ), __( 'Upgrade to PRO', 'Modula' ), 'edit_posts', 'modula-lite-gallery-upgrade', array(
525
  $this,
526
  'upgrade',
527
  ) );
@@ -603,9 +953,9 @@ if ( ! class_exists( "ModulaLite" ) ) {
603
  if ( check_admin_referer( 'Modula', 'Modula' ) ) {
604
  $result = false;
605
  // $type = $_POST['type'];
606
- $imageUrl = stripslashes( $_POST['img_url'] );
607
  $imageCaption = stripslashes( $_POST['description'] );
608
- $title = $_POST['title'];
609
  $target = $_POST['target'];
610
  $link = isset( $_POST['link'] ) ? stripslashes( $_POST['link'] ) : null;
611
  $imageId = intval( $_POST['img_id'] );
@@ -682,6 +1032,8 @@ if ( ! class_exists( "ModulaLite" ) ) {
682
  $lightbox = $_POST['tg_lightbox'];
683
  $wp_field_caption = $_POST['tg_wp_field_caption'];
684
  $wp_field_title = $_POST['tg_wp_field_title'];
 
 
685
  $captionColor = $_POST['tg_captionColor'];
686
  $borderSize = intval( $_POST['tg_borderSize'] );
687
  $loadedScale = intval( $_POST['tg_loadedScale'] );
@@ -710,6 +1062,8 @@ if ( ! class_exists( "ModulaLite" ) ) {
710
  'hasResizedImages' => true,
711
  'wp_field_caption' => $wp_field_caption,
712
  'wp_field_title' => $wp_field_title,
 
 
713
  'margin' => $margin,
714
  'randomFactor' => $_POST['tg_randomFactor'],
715
  'shuffle' => $shuffle,
@@ -812,337 +1166,30 @@ if ( ! class_exists( "ModulaLite" ) ) {
812
  case "lightbox2":
813
  wp_enqueue_style( 'lightbox2_stylesheet' );
814
  wp_enqueue_script( 'lightbox2_script' );
 
815
  break;
816
  }
817
 
818
  return $Modula->render();
819
  } else {
820
- return "Gallery not found.";
821
  }
822
  }
823
 
824
- var $fields = array(
825
 
826
- "General" => array(
827
- "icon" => "mdi mdi-settings",
828
- "fields" => array(
829
- "name" => array(
830
- "name" => "Name",
831
- "type" => "text",
832
- "description" => "Name of the gallery, for internal use.",
833
- "excludeFrom" => array(),
834
- ),
835
- "description" => array(
836
- "name" => "Description",
837
- "type" => "text",
838
- "description" => "This description is for internal use.",
839
- "excludeFrom" => array(),
840
- ),
841
- "width" => array(
842
- "name" => "Width",
843
- "type" => "text",
844
- "description" => "Width of the gallery (i.e.: 100% or 500px)",
845
- "mu" => "px or %",
846
- "excludeFrom" => array(),
847
- ),
848
- "height" => array(
849
- "name" => "Height",
850
- "type" => "number",
851
- "description" => "Height of the gallery in pixels",
852
- "mu" => "px",
853
- "excludeFrom" => array(),
854
- ),
855
- "img_size" => array(
856
- "name" => "Minimum image size",
857
- "type" => "number",
858
- "description" => "Minimum width or height of the images",
859
- "mu" => "px or %",
860
- "excludeFrom" => array(),
861
- ),
862
- "margin" => array(
863
- "name" => "Margin",
864
- "type" => "number",
865
- "description" => "Margin between images",
866
- "mu" => "px",
867
- "excludeFrom" => array(),
868
- ),
869
- "randomFactor" => array(
870
- "name" => "Random factor",
871
- "type" => "ui-slider",
872
- "description" => "",
873
- "min" => 0,
874
- "max" => 100,
875
- "mu" => "%",
876
- "default" => 20,
877
- "excludeFrom" => array(),
878
- ),
879
- "filters" => array(
880
- "name" => "Filters",
881
- "type" => "PRO_FEATURE",
882
- "description" => "Add your own filters here. Each image can have one or more filters.",
883
- "excludeFrom" => array(),
884
- ),
885
- "filterClick" => array(
886
- "name" => "Reload Page on filter click",
887
- "type" => "PRO_FEATURE",
888
- "description" => "Turn this feature ON if you want to use filters with most lightboxes",
889
- "excludeFrom" => array(),
890
- ),
891
- "allFilterLabel" => array(
892
- "name" => "Text for 'All' filter",
893
- "type" => "PRO_FEATURE",
894
- "description" => "Write here the label for the 'All' filter",
895
- "default" => "All",
896
- "excludeFrom" => array(),
897
- ),
898
- "lightbox" => array(
899
- "name" => "Lightbox &amp; Links",
900
- "type" => "select",
901
- "description" => "Define here what happens when user click on the images.",
902
- "values" => array(
903
- "Link" => array( "|No link", "direct|Direct link to image", "|Attachment page" ),
904
- "Lightboxes" => array( "lightbox2|Lightbox" ),
905
- ),
906
- "disabled" => array(
907
- "Lightboxes with PRO license" => array(
908
- "magnific|Magnific popup",
909
- "prettyphoto|PrettyPhoto",
910
- "fancybox|FancyBox",
911
- "swipebox|SwipeBox",
912
- "lightbox2|Lightbox",
913
- ),
914
- ),
915
- "excludeFrom" => array(),
916
- ),
917
- "shuffle" => array(
918
- "name" => "Shuffle images",
919
- "type" => "toggle",
920
- "default" => "T",
921
- "description" => "Flag it if you want to shuffle the gallery at each page load",
922
- "excludeFrom" => array(),
923
- ),
924
- ),
925
- ),
926
- "Captions" => array(
927
- "icon" => "mdi mdi-comment-text-outline",
928
- "fields" => array(
929
- "captionColor" => array(
930
- "name" => "Caption color",
931
- "type" => "color",
932
- "description" => "Color of the caption.",
933
- "default" => "#ffffff",
934
- "excludeFrom" => array(),
935
- ),
936
- "wp_field_caption" => array(
937
- "name" => "WordPress caption field",
938
- "type" => "select",
939
- "description" => "WordPress field used for captions. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore captions just set it to '<i>Don't use captions</i>'.",
940
- "values" => array(
941
- "Field" => array(
942
- "none|Don't use captions",
943
- "title|Title",
944
- "caption|Caption",
945
- "description|Description",
946
- ),
947
- ),
948
- "excludeFrom" => array( "shortcode" ),
949
- ),
950
- "wp_field_title" => array(
951
- "name" => "WordPress title field",
952
- "type" => "select",
953
- "description" => "WordPress field used for titles. <strong>This field is used ONLY when images are added to the gallery, </strong> however, if you want to ignore titles just set it to '<i>Don't use titles</i>'.",
954
- "values" => array(
955
- "Field" => array( "none|Don't use titles", "title|Title", "description|Description" ),
956
- ),
957
- "excludeFrom" => array( "shortcode" ),
958
- ),
959
- "captionFontSize" => array(
960
- "name" => "Caption Font Size",
961
- "type" => "number",
962
- "description" => "",
963
- "mu" => "px",
964
- "excludeFrom" => array(),
965
- ),
966
- "titleFontSize" => array(
967
- "name" => "Title Font Size",
968
- "type" => "number",
969
- "description" => "",
970
- "mu" => "px",
971
- "excludeFrom" => array(),
972
- ),
973
- ),
974
 
975
- ),
976
- "Social" => array(
977
- "icon" => "mdi mdi-link-variant",
978
- "fields" => array(
979
- "enableTwitter" => array(
980
- "name" => "Add Twitter icon",
981
- "type" => "toggle",
982
- "default" => "T",
983
- "description" => "Enable Twitter Sharing",
984
- "excludeFrom" => array(),
985
- ),
986
- "enableFacebook" => array(
987
- "name" => "Add Facebook icon",
988
- "type" => "toggle",
989
- "default" => "T",
990
- "description" => "Enable Facebook Sharing",
991
- "excludeFrom" => array(),
992
- ),
993
- "enableGplus" => array(
994
- "name" => "Add Google Plus icon",
995
- "type" => "toggle",
996
- "default" => "T",
997
- "description" => "Enable Google Plus Sharing",
998
- "excludeFrom" => array(),
999
- ),
1000
- "enablePinterest" => array(
1001
- "name" => "Add Pinterest icon",
1002
- "type" => "toggle",
1003
- "default" => "T",
1004
- "description" => "Enable Pinterest Sharing",
1005
- "excludeFrom" => array(),
1006
- ),
1007
- "socialIconColor" => array(
1008
- "name" => "Color of social sharing icons",
1009
- "type" => "color",
1010
- "description" => "Set the color of the social sharing icons",
1011
- "default" => "#ffffff",
1012
- "excludeFrom" => array(),
1013
- ),
1014
- ),
1015
-
1016
- ),
1017
- "Image loaded effects" => array(
1018
- "icon" => "mdi mdi-reload",
1019
- "fields" => array(
1020
- "loadedScale" => array(
1021
- "name" => "Scale",
1022
- "description" => "Choose a value below 100% for a zoom-in effect. Choose a value over 100% for a zoom-out effect",
1023
- "type" => "ui-slider",
1024
- "min" => 0,
1025
- "max" => 200,
1026
- "mu" => "%",
1027
- "default" => 100,
1028
- "excludeFrom" => array(),
1029
- ),
1030
- "loadedRotate" => array(
1031
- "name" => "Rotate",
1032
- "description" => "",
1033
- "type" => "PRO_FEATURE",
1034
- "min" => - 180,
1035
- "max" => 180,
1036
- "default" => 0,
1037
- "mu" => "deg",
1038
- "excludeFrom" => array(),
1039
- ),
1040
- "loadedHSlide" => array(
1041
- "name" => "Horizontal slide",
1042
- "description" => "",
1043
- "type" => "PRO_FEATURE",
1044
- "min" => - 100,
1045
- "max" => 100,
1046
- "mu" => "px",
1047
- "default" => 0,
1048
- "excludeFrom" => array(),
1049
- ),
1050
- "loadedVSlide" => array(
1051
- "name" => "Vertical slide",
1052
- "description" => "",
1053
- "type" => "PRO_FEATURE",
1054
- "min" => - 100,
1055
- "max" => 100,
1056
- "mu" => "px",
1057
- "default" => 0,
1058
- "excludeFrom" => array(),
1059
- ),
1060
-
1061
- ),
1062
- ),
1063
- "Hover effect" => array(
1064
- "icon" => "mdi mdi-blur",
1065
- "fields" => array(
1066
- "Effect" => array(
1067
- "name" => "Effect",
1068
- "description" => "Select an hover effect",
1069
- "type" => "hover-effect",
1070
- "excludeFrom" => array(),
1071
- ),
1072
- ),
1073
- ),
1074
- "Style" => array(
1075
- "icon" => "mdi mdi-format-paint",
1076
- "fields" => array(
1077
- "borderSize" => array(
1078
- "name" => "Border Size",
1079
- "type" => "ui-slider",
1080
- "description" => "",
1081
- "mu" => "px",
1082
- "min" => 0,
1083
- "max" => 10,
1084
- "default" => 0,
1085
- "excludeFrom" => array(),
1086
- ),
1087
- "borderRadius" => array(
1088
- "name" => "Border Radius",
1089
- "type" => "ui-slider",
1090
- "description" => "",
1091
- "mu" => "px",
1092
- "min" => 0,
1093
- "max" => 100,
1094
- "default" => 0,
1095
- "excludeFrom" => array(),
1096
- ),
1097
- "borderColor" => array(
1098
- "name" => "Border Color",
1099
- "type" => "color",
1100
- "description" => "",
1101
- "default" => "#ffffff",
1102
- "excludeFrom" => array(),
1103
- ),
1104
- "shadowSize" => array(
1105
- "name" => "Shadow Size",
1106
- "type" => "ui-slider",
1107
- "description" => "",
1108
- "mu" => "px",
1109
- "min" => 0,
1110
- "max" => 20,
1111
- "default" => 0,
1112
- "excludeFrom" => array(),
1113
- ),
1114
- "shadowColor" => array(
1115
- "name" => "Shadow Color",
1116
- "type" => "color",
1117
- "description" => "",
1118
- "default" => "#ffffff",
1119
- "excludeFrom" => array(),
1120
- ),
1121
 
1122
- ),
1123
- ),
1124
- "Customizations" => array(
1125
- "icon" => "mdi mdi-puzzle",
1126
- "fields" => array(
1127
- "script" => array(
1128
- "name" => "Custom scripts",
1129
- "type" => "textarea",
1130
- "description" => "This script will be called after the gallery initialization. Useful for custom lightboxes.
1131
- <br />
1132
- <br />
1133
- <strong>Write just the code without using the &lt;script&gt;&lt;/script&gt; tags</strong>",
1134
- "excludeFrom" => array( "shortcode" ),
1135
- ),
1136
- "style" => array(
1137
- "name" => "Custom css",
1138
- "type" => "textarea",
1139
- "description" => "<strong>Write just the code without using the &lt;style&gt;&lt;/style&gt; tags</strong>",
1140
- "excludeFrom" => array( "shortcode" ),
1141
- ),
1142
- ),
1143
- ),
1144
 
1145
- );
1146
  }
1147
 
1148
  class ModulaLiteHoverEffect {
5
  * Description: Modula is one of the best & most creative WordPress gallery plugins. Use it to create a great grid or
6
  * masonry image gallery.
7
  * Author: Macho Themes
8
+ * Version: 1.3.1
9
  * Author URI: https://www.machothemes.com/
10
  */
11
 
21
  class ModulaLite {
22
 
23
  private $loadedData;
24
+ private $fields = array();
25
 
26
+ private $version = "1.3.1";
27
 
28
  private $defaultValues = array(
29
  'width' => 100,
62
  'hoverEffect' => 'pufrobo',
63
  'hasResizedImages' => false,
64
  'importedFrom' => '',
65
+ 'hide_title' => false,
66
+ 'hide_description' => false,
67
  );
68
 
69
  public function __construct() {
74
  $this->define_hover_effects();
75
  $this->ModulaDB = $this->create_db_conn();
76
 
77
+ require_once 'lib/class-modula-feedback.php';
78
+ new Modula_Feedback( __FILE__ );
79
+
80
  add_filter( 'widget_text', 'do_shortcode' );
81
  add_filter( 'mce_buttons', array( $this, 'editor_button' ) );
82
  add_filter( 'mce_external_plugins', array( $this, 'register_editor_plugin' ) );
88
  add_action( 'admin_menu', array( $this, 'add_gallery_admin_menu' ) );
89
 
90
  add_shortcode( 'Modula', array( $this, 'gallery_shortcode_handler' ) );
91
+ add_filter( 'the_content', array( $this, 'shortcode_empty_paragraph_fix' ), 99 );
92
+
93
  add_action( 'wp_ajax_modula_save_gallery', array( $this, 'save_gallery' ) );
94
  add_action( 'wp_ajax_modula_save_image', array( $this, 'save_image' ) );
95
  add_action( 'wp_ajax_modula_add_image', array( $this, 'add_image' ) );
108
 
109
  add_filter( 'plugin_row_meta', array( $this, 'register_links' ), 10, 2 );
110
  add_filter( 'admin_footer_text', array( $this, 'admin_footer' ), 1, 2 );
111
+
112
+
113
+ // Set fields
114
+ $this->fields[ __( 'General', 'modula-gallery' ) ] = array(
115
+ "icon" => "mdi mdi-settings",
116
+ "fields" => array(
117
+ "name" => array(
118
+ "name" => esc_html__( 'Name', 'modula-gallery' ),
119
+ "type" => "text",
120
+ "description" => esc_html__( 'Name of the gallery, for internal use.', 'modula-gallery' ),
121
+ "excludeFrom" => array(),
122
+ ),
123
+ "description" => array(
124
+ "name" => esc_html__( 'Description', 'modula-gallery' ),
125
+ "type" => "text",
126
+ "description" => esc_html__( 'This description is for internal use.', 'modula-gallery' ),
127
+ "excludeFrom" => array(),
128
+ ),
129
+ "width" => array(
130
+ "name" => esc_html__( 'Width', 'modula-gallery' ),
131
+ "type" => "text",
132
+ "description" => esc_html__( 'Width of the gallery (i.e.: 100% or 500px)', 'modula-gallery' ),
133
+ "mu" => "px or %",
134
+ "excludeFrom" => array(),
135
+ ),
136
+ "height" => array(
137
+ "name" => esc_html__( 'Height', 'modula-gallery' ),
138
+ "type" => "number",
139
+ "description" => esc_html__( 'Height of the gallery in pixels', 'modula-gallery' ),
140
+ "mu" => "px",
141
+ "excludeFrom" => array(),
142
+ ),
143
+ "img_size" => array(
144
+ "name" => esc_html__( 'Minimum image size', 'modula-gallery' ),
145
+ "type" => "number",
146
+ "description" => esc_html__( 'Minimum width or height of the images', 'modula-gallery' ),
147
+ "mu" => "px or %",
148
+ "excludeFrom" => array(),
149
+ ),
150
+ "margin" => array(
151
+ "name" => esc_html__( 'Margin', 'modula-gallery' ),
152
+ "type" => "number",
153
+ "description" => esc_html__( 'Margin between images', 'modula-gallery' ),
154
+ "mu" => "px",
155
+ "excludeFrom" => array(),
156
+ ),
157
+ "randomFactor" => array(
158
+ "name" => esc_html__( 'Random factor', 'modula-gallery' ),
159
+ "type" => "ui-slider",
160
+ "description" => "",
161
+ "min" => 0,
162
+ "max" => 100,
163
+ "mu" => "%",
164
+ "default" => 20,
165
+ "excludeFrom" => array(),
166
+ ),
167
+ "filters" => array(
168
+ "name" => esc_html__( 'Filters', 'modula-gallery' ),
169
+ "type" => "PRO_FEATURE",
170
+ "description" => esc_html__( 'Add your own filters here. Each image can have one or more filters.', 'modula-gallery' ),
171
+ "excludeFrom" => array(),
172
+ ),
173
+ "filterClick" => array(
174
+ "name" => esc_html__( 'Reload Page on filter click', 'modula-gallery' ),
175
+ "type" => "PRO_FEATURE",
176
+ "description" => esc_html__( 'Turn this feature ON if you want to use filters with most lightboxes', 'modula-gallery' ),
177
+ "excludeFrom" => array(),
178
+ ),
179
+ "allFilterLabel" => array(
180
+ "name" => esc_html__( 'Text for "All" filter', 'modula-gallery' ),
181
+ "type" => "PRO_FEATURE",
182
+ "description" => esc_html__( 'Write here the label for the "All" filter', 'modula-gallery' ),
183
+ "default" => "All",
184
+ "excludeFrom" => array(),
185
+ ),
186
+ "lightbox" => array(
187
+ "name" => esc_html__( 'Lightbox &amp; Links', 'modula-gallery' ),
188
+ "type" => "select",
189
+ "description" => esc_html__( 'Define here what happens when user click on the images.', 'modula-gallery' ),
190
+ "values" => array(
191
+ "Link" => array(
192
+ "|" . esc_html__( 'No link', 'modula-gallery' ),
193
+ "direct|" . esc_html__( 'Direct link to image', 'modula-gallery' ),
194
+ "|" . esc_html__( 'Attachment page', 'modula-gallery' )
195
+ ),
196
+ "Lightboxes" => array( "lightbox2|Lightbox" ),
197
+ ),
198
+ "disabled" => array(
199
+ "Lightboxes with PRO license" => array(
200
+ "magnific|Magnific popup",
201
+ "prettyphoto|PrettyPhoto",
202
+ "fancybox|FancyBox",
203
+ "swipebox|SwipeBox",
204
+ "lightbox2|Lightbox",
205
+ ),
206
+ ),
207
+ "excludeFrom" => array(),
208
+ ),
209
+ "shuffle" => array(
210
+ "name" => esc_html__( 'Shuffle images', 'modula-gallery' ),
211
+ "type" => "toggle",
212
+ "default" => "T",
213
+ "description" => esc_html__( 'Flag it if you want to shuffle the gallery at each page load', 'modula-gallery' ),
214
+ "excludeFrom" => array(),
215
+ ),
216
+ ),
217
+ );
218
+ $this->fields[ esc_html__( 'Captions', 'modula-gallery' ) ] = array(
219
+ "icon" => "mdi mdi-comment-text-outline",
220
+ "fields" => array(
221
+ "captionColor" => array(
222
+ "name" => esc_html__( 'Caption color', 'modula-gallery' ),
223
+ "type" => "color",
224
+ "description" => esc_html__( 'Color of the caption.', 'modula-gallery' ),
225
+ "default" => "#ffffff",
226
+ "excludeFrom" => array(),
227
+ ),
228
+ "wp_field_caption" => array(
229
+ "name" => esc_html__( 'Populate caption from', 'modula-gallery' ),
230
+ "type" => "select",
231
+ "description" => __( '<strong>This field is used ONLY when images are added to the gallery. </strong> If you don\'t want to automatically populate the caption field select <i>Don\'t Populate</i>', 'modula-gallery' ),
232
+ "values" => array(
233
+ "Field" => array(
234
+ "none|" . esc_html__( 'Don\'t Populate', 'modula-gallery' ),
235
+ "title|" . esc_html__( 'WP Image title', 'modula-gallery' ),
236
+ "caption|" . esc_html__( 'WP Image caption', 'modula-gallery' ),
237
+ "description|" . esc_html__( 'WP Image description', 'modula-gallery' ),
238
+ ),
239
+ ),
240
+ "excludeFrom" => array( "shortcode" ),
241
+ ),
242
+ "wp_field_title" => array(
243
+ "name" => esc_html__( 'Populate title from', 'modula-gallery' ),
244
+ "type" => "select",
245
+ "description" => __( '<strong>This field is used ONLY when images are added to the gallery. </strong> If you don\'t want to automatically populate the title field select <i>Don\'t Populate</i>', 'modula-gallery' ),
246
+ "values" => array(
247
+ "Field" => array(
248
+ "none|" . esc_html__( 'Don\'t Populate', 'modula-gallery' ),
249
+ "title|" . esc_html__( 'WP Image title', 'modula-gallery' ),
250
+ "description|" . esc_html__( 'WP Image description', 'modula-gallery' ),
251
+ ),
252
+ ),
253
+ "excludeFrom" => array( "shortcode" ),
254
+ ),
255
+ "hide_title" => array(
256
+ "name" => esc_html__( 'Image Title', 'modula-gallery' ),
257
+ "type" => "toggle",
258
+ "default" => "T",
259
+ "description" => esc_html__( 'Hide image title from frontend', 'modula-gallery' ),
260
+ "excludeFrom" => array(),
261
+ ),
262
+ "hide_description" => array(
263
+ "name" => esc_html__( 'Image Description', 'modula-gallery' ),
264
+ "type" => "toggle",
265
+ "default" => "T",
266
+ "description" => esc_html__( 'Hide image description from frontend', 'modula-gallery' ),
267
+ "excludeFrom" => array(),
268
+ ),
269
+ "captionFontSize" => array(
270
+ "name" => esc_html__( 'Caption Font Size', 'modula-gallery' ),
271
+ "type" => "number",
272
+ "description" => "",
273
+ "mu" => "px",
274
+ "excludeFrom" => array(),
275
+ ),
276
+ "titleFontSize" => array(
277
+ "name" => esc_html__( 'Title Font Size', 'modula-gallery' ),
278
+ "type" => "number",
279
+ "description" => "",
280
+ "mu" => "px",
281
+ "excludeFrom" => array(),
282
+ ),
283
+ ),
284
+ );
285
+
286
+ $this->fields[ esc_html__( 'Social', 'modula-gallery' ) ] = array(
287
+ "icon" => "mdi mdi-link-variant",
288
+ "fields" => array(
289
+ "enableTwitter" => array(
290
+ "name" => esc_html__( 'Add Twitter icon', 'modula-gallery' ),
291
+ "type" => "toggle",
292
+ "default" => "T",
293
+ "description" => esc_html__( 'Enable Twitter Sharing', 'modula-gallery' ),
294
+ "excludeFrom" => array(),
295
+ ),
296
+ "enableFacebook" => array(
297
+ "name" => esc_html__( 'Add Facebook icon', 'modula-gallery' ),
298
+ "type" => "toggle",
299
+ "default" => "T",
300
+ "description" => esc_html__( 'Enable Facebook Sharing', 'modula-gallery' ),
301
+ "excludeFrom" => array(),
302
+ ),
303
+ "enableGplus" => array(
304
+ "name" => esc_html__( 'Add Google Plus icon', 'modula-gallery' ),
305
+ "type" => "toggle",
306
+ "default" => "T",
307
+ "description" => esc_html__( 'Enable Google Plus Sharing', 'modula-gallery' ),
308
+ "excludeFrom" => array(),
309
+ ),
310
+ "enablePinterest" => array(
311
+ "name" => esc_html__( 'Add Pinterest icon', 'modula-gallery' ),
312
+ "type" => "toggle",
313
+ "default" => "T",
314
+ "description" => esc_html__( 'Enable Pinterest Sharing', 'modula-gallery' ),
315
+ "excludeFrom" => array(),
316
+ ),
317
+ "socialIconColor" => array(
318
+ "name" => esc_html__( 'Color of social sharing icons', 'modula-gallery' ),
319
+ "type" => "color",
320
+ "description" => esc_html__( 'Set the color of the social sharing icons', 'modula-gallery' ),
321
+ "default" => "#ffffff",
322
+ "excludeFrom" => array(),
323
+ ),
324
+ ),
325
+
326
+ );
327
+ $this->fields[ esc_html__( 'Image loaded effects', 'modula-gallery' ) ] = array(
328
+ "icon" => "mdi mdi-reload",
329
+ "fields" => array(
330
+ "loadedScale" => array(
331
+ "name" => esc_html__( 'Scale', 'modula-gallery' ),
332
+ "description" => esc_html__( 'Choose a value below 100% for a zoom-in effect. Choose a value over 100% for a zoom-out effect', 'modula-gallery' ),
333
+ "type" => "ui-slider",
334
+ "min" => 0,
335
+ "max" => 200,
336
+ "mu" => "%",
337
+ "default" => 100,
338
+ "excludeFrom" => array(),
339
+ ),
340
+ "loadedRotate" => array(
341
+ "name" => esc_html__( 'Rotate', 'modula-gallery' ),
342
+ "description" => "",
343
+ "type" => "PRO_FEATURE",
344
+ "min" => - 180,
345
+ "max" => 180,
346
+ "default" => 0,
347
+ "mu" => "deg",
348
+ "excludeFrom" => array(),
349
+ ),
350
+ "loadedHSlide" => array(
351
+ "name" => esc_html__( 'Horizontal slide', 'modula-gallery' ),
352
+ "description" => "",
353
+ "type" => "PRO_FEATURE",
354
+ "min" => - 100,
355
+ "max" => 100,
356
+ "mu" => "px",
357
+ "default" => 0,
358
+ "excludeFrom" => array(),
359
+ ),
360
+ "loadedVSlide" => array(
361
+ "name" => esc_html__( 'Vertical slide', 'modula-gallery' ),
362
+ "description" => "",
363
+ "type" => "PRO_FEATURE",
364
+ "min" => - 100,
365
+ "max" => 100,
366
+ "mu" => "px",
367
+ "default" => 0,
368
+ "excludeFrom" => array(),
369
+ ),
370
+
371
+ ),
372
+ );
373
+ $this->fields[ esc_html__( 'Hover effect', 'modula-gallery' ) ] = array(
374
+ "icon" => "mdi mdi-blur",
375
+ "fields" => array(
376
+ "Effect" => array(
377
+ "name" => esc_html__( 'Effect', 'modula-gallery' ),
378
+ "description" => esc_html__( 'Select an hover effect', 'modula-gallery' ),
379
+ "type" => "hover-effect",
380
+ "excludeFrom" => array(),
381
+ ),
382
+ ),
383
+ );
384
+ $this->fields[ esc_html__( 'Style', 'modula-gallery' ) ] = array(
385
+ "icon" => "mdi mdi-format-paint",
386
+ "fields" => array(
387
+ "borderSize" => array(
388
+ "name" => esc_html__( 'Border Size', 'modula-gallery' ),
389
+ "type" => "ui-slider",
390
+ "description" => "",
391
+ "mu" => "px",
392
+ "min" => 0,
393
+ "max" => 10,
394
+ "default" => 0,
395
+ "excludeFrom" => array(),
396
+ ),
397
+ "borderRadius" => array(
398
+ "name" => esc_html__( 'Border Radius', 'modula-gallery' ),
399
+ "type" => "ui-slider",
400
+ "description" => "",
401
+ "mu" => "px",
402
+ "min" => 0,
403
+ "max" => 100,
404
+ "default" => 0,
405
+ "excludeFrom" => array(),
406
+ ),
407
+ "borderColor" => array(
408
+ "name" => esc_html__( 'Border Color', 'modula-gallery' ),
409
+ "type" => "color",
410
+ "description" => "",
411
+ "default" => "#ffffff",
412
+ "excludeFrom" => array(),
413
+ ),
414
+ "shadowSize" => array(
415
+ "name" => esc_html__( 'Shadow Size', 'modula-gallery' ),
416
+ "type" => "ui-slider",
417
+ "description" => "",
418
+ "mu" => "px",
419
+ "min" => 0,
420
+ "max" => 20,
421
+ "default" => 0,
422
+ "excludeFrom" => array(),
423
+ ),
424
+ "shadowColor" => array(
425
+ "name" => esc_html__( 'Shadow Color', 'modula-gallery' ),
426
+ "type" => "color",
427
+ "description" => "",
428
+ "default" => "#ffffff",
429
+ "excludeFrom" => array(),
430
+ ),
431
+
432
+ ),
433
+ );
434
+ $this->fields[ esc_html__( 'Customizations', 'modula-gallery' ) ] = array(
435
+ "icon" => "mdi mdi-puzzle",
436
+ "fields" => array(
437
+ "script" => array(
438
+ "name" => esc_html__( 'Custom scripts', 'modula-gallery' ),
439
+ "type" => "textarea",
440
+ "description" => esc_html__( 'This script will be called after the gallery initialization. Useful for custom lightboxes.', 'modula-gallery' ) . "
441
+ <br />
442
+ <br />
443
+ <strong>Write just the code without using the &lt;script&gt;&lt;/script&gt; tags</strong>",
444
+ "excludeFrom" => array( "shortcode" ),
445
+ ),
446
+ "style" => array(
447
+ "name" => esc_html__( 'Custom css', 'modula-gallery' ),
448
+ "type" => "textarea",
449
+ "description" => '<strong>' . esc_html__( 'Write just the code without using the &lt;style&gt;&lt;/style&gt; tags', 'modula-gallery' ) . '</strong>',
450
+ "excludeFrom" => array( "shortcode" ),
451
+ ),
452
+ ),
453
+ );
454
+
455
  }
456
 
457
  //Define textdomain
617
  public function register_links( $links, $file ) {
618
  $base = plugin_basename( __FILE__ );
619
  if ( $file == $base ) {
620
+ $links[] = '<a href="admin.php?page=modula-lite-admin" title="' . esc_html__( 'Modula Grid Gallery Dashboard', 'modula-gallery' ) . '">' . esc_html__( 'Dashboard', 'modula-gallery' ) . '</a>';
621
  $links[] = '<a href="https://twitter.com/MachoThemez" title="@MachoThemez on Twitter">Twitter</a>';
622
  $links[] = '<a href="https://www.facebook.com/machothemes" title="MachoThemes on Facebook">Facebook</a>';
623
  }
771
  wp_register_script( 'modula', plugins_url() . '/modula-best-grid-gallery/scripts/jquery.modula.js', array( 'jquery' ) );
772
  wp_enqueue_script( 'modula' );
773
 
774
+ wp_register_style( 'modula_stylesheet', plugins_url() . '/modula-best-grid-gallery/scripts/modula.css', null, $this->version );
 
775
  wp_enqueue_style( 'modula_stylesheet' );
776
 
777
  wp_register_style( 'effects_stylesheet', plugins_url() . '/modula-best-grid-gallery/scripts/effects.css', null, $this->version );
778
  wp_enqueue_style( 'effects_stylesheet' );
779
 
780
+ wp_register_script( 'lightbox2_script', plugins_url() . '/modula-best-grid-gallery/lightbox/lightbox2/js/lightbox.min.js', array( 'jquery' ), $this->version, true );
781
+ wp_register_style( 'lightbox2_stylesheet', plugins_url() . '/modula-best-grid-gallery/lightbox/lightbox2/css/lightbox.min.css' );
782
  }
783
 
784
  //Admin Section - register scripts and styles
832
 
833
  //Create Admin Menu
834
  public function add_gallery_admin_menu() {
835
+ $overview = add_menu_page( esc_html__( 'Manage Galleries', 'modula-gallery' ), esc_html__( 'Modula', 'modula-gallery' ), 'edit_posts', 'modula-lite-admin', array(
836
  $this,
837
  'add_overview',
838
  ), plugins_url() . '/modula-best-grid-gallery/admin/icon.png' );
852
 
853
  if ( $imageUrl ) {
854
  if ( strncmp( strtolower( $imageUrl ), strtolower( site_url() ), strlen( site_url() ) ) != 0 ) {
855
+ $fix = add_submenu_page( 'modula-lite-admin', __( 'Modula >> Fix', 'modula-gallery' ), '❗️ ' . __( 'Fix', 'modula-gallery' ), 'edit_posts', 'modula-lite-gallery-fix', array(
856
  $this,
857
  'fix',
858
  ) );
863
  add_option( 'Modula_skip_fix', true );
864
  }
865
 
866
+ $add_gallery = add_submenu_page( 'modula-lite-admin', __( 'Modula - Add Gallery', 'modula-gallery' ), __( 'Add Gallery', 'modula-gallery' ), 'edit_posts', 'modula-lite-add', array(
867
  $this,
868
  'add_gallery',
869
  ) );
870
+ $edit_gallery = add_submenu_page( NULL, __( 'Modula - Edit Gallery', 'modula-gallery' ), __( 'Edit Gallery', 'modula-gallery' ), 'edit_posts', 'modula-lite-edit', array(
871
  $this,
872
  'edit_gallery',
873
  ) );
874
+ $upgrade = add_submenu_page( 'modula-lite-admin', __( 'Modula - Upgrade to PRO', 'modula-gallery' ), __( 'Upgrade to PRO', 'modula-gallery' ), 'edit_posts', 'modula-lite-gallery-upgrade', array(
875
  $this,
876
  'upgrade',
877
  ) );
953
  if ( check_admin_referer( 'Modula', 'Modula' ) ) {
954
  $result = false;
955
  // $type = $_POST['type'];
956
+ $imageUrl = esc_url( $_POST['img_url'] );
957
  $imageCaption = stripslashes( $_POST['description'] );
958
+ $title = stripslashes( $_POST['title'] );
959
  $target = $_POST['target'];
960
  $link = isset( $_POST['link'] ) ? stripslashes( $_POST['link'] ) : null;
961
  $imageId = intval( $_POST['img_id'] );
1032
  $lightbox = $_POST['tg_lightbox'];
1033
  $wp_field_caption = $_POST['tg_wp_field_caption'];
1034
  $wp_field_title = $_POST['tg_wp_field_title'];
1035
+ $hide_title = $this->checkboxVal( 'tg_hide_title' );
1036
+ $hide_description = $this->checkboxVal( 'tg_hide_description' );
1037
  $captionColor = $_POST['tg_captionColor'];
1038
  $borderSize = intval( $_POST['tg_borderSize'] );
1039
  $loadedScale = intval( $_POST['tg_loadedScale'] );
1062
  'hasResizedImages' => true,
1063
  'wp_field_caption' => $wp_field_caption,
1064
  'wp_field_title' => $wp_field_title,
1065
+ 'hide_title' => $hide_title,
1066
+ 'hide_description' => $hide_description,
1067
  'margin' => $margin,
1068
  'randomFactor' => $_POST['tg_randomFactor'],
1069
  'shuffle' => $shuffle,
1166
  case "lightbox2":
1167
  wp_enqueue_style( 'lightbox2_stylesheet' );
1168
  wp_enqueue_script( 'lightbox2_script' );
1169
+ wp_add_inline_script( 'lightbox2_script', 'jQuery(document).ready(function(){lightbox.option({albumLabel: "' . esc_html__( 'Image %1 of %2', 'modula-gallery' ) . '"});});' );
1170
  break;
1171
  }
1172
 
1173
  return $Modula->render();
1174
  } else {
1175
+ return esc_html__( 'Gallery not found.', 'modula-gallery' );
1176
  }
1177
  }
1178
 
1179
+ public function shortcode_empty_paragraph_fix( $content ) {
1180
 
1181
+ $array = array (
1182
+ '<p>[Modula' => '[Modula' ,
1183
+ '<p>[/Modula' => '[/Modula',
1184
+ 'Modula]</p>' => 'Modula]',
1185
+ 'Modula]<br />' => 'Modula]'
1186
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1187
 
1188
+ $content = strtr( $content, $array );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1189
 
1190
+ return $content;
1191
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1192
 
 
1193
  }
1194
 
1195
  class ModulaLiteHoverEffect {
README.txt CHANGED
@@ -1,9 +1,9 @@
1
- === Gallery - Photo Gallery - Image Gallery ===
2
- Contributors: machothemes, imagegallery, xphotogallery
3
  Tags: image gallery, photo gallery, responsive gallery, wordpress gallery plugin, wordpress portfolio plugin, lightbox gallery, masonry gallery, envira, envira gallery, nextgen, nextgen gallery, album, content gallery, fancy gallery, gallery widget, media gallery, mosaic gallery, photo album, polaroid gallery, portfolio gallery, post gallery, thumbnail gallery, video gallery, youtube gallery, filterable portfolio, portfolio gallery, responsive portfolio, wordpress portfolio plugin
4
  Requires at least: 3.8
5
  Tested up to: 4.9
6
- Stable tag: 1.2.1
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -157,6 +157,16 @@ Free support is included only with a PRO license: [Buy Modula PRO](https://wp-mo
157
 
158
  == Changelog ==
159
 
 
 
 
 
 
 
 
 
 
 
160
  = 1.2.1 =
161
  * Fixed the broken link
162
  * Hid the Edit gallery menu item
1
+ === Gallery - Photo Gallery - Image Gallery ===
2
+ Contributors: machothemes, imagegallery, xphotogallery, silkalns
3
  Tags: image gallery, photo gallery, responsive gallery, wordpress gallery plugin, wordpress portfolio plugin, lightbox gallery, masonry gallery, envira, envira gallery, nextgen, nextgen gallery, album, content gallery, fancy gallery, gallery widget, media gallery, mosaic gallery, photo album, polaroid gallery, portfolio gallery, post gallery, thumbnail gallery, video gallery, youtube gallery, filterable portfolio, portfolio gallery, responsive portfolio, wordpress portfolio plugin
4
  Requires at least: 3.8
5
  Tested up to: 4.9
6
+ Stable tag: 1.3.1
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
157
 
158
  == Changelog ==
159
 
160
+ = 1.3.1 =
161
+ * Changed lightbox script
162
+
163
+ = 1.3.0 =
164
+ * Added compatibility with : WPML/Visual Composer/Page Builder by SiteOrigin
165
+ * Fixed bugs with captions & titles
166
+ * Localized all text strings
167
+ * Fixed lightbox bug
168
+ * For a more detailed changelog check : https://github.com/MachoThemes/modula-lite/milestone/2?closed=1
169
+
170
  = 1.2.1 =
171
  * Fixed the broken link
172
  * Hid the Edit gallery menu item
admin/add-gallery.php CHANGED
@@ -9,7 +9,7 @@ $tg_subtitle = "New Gallery";
9
  <?php include( "header.php" ) ?>
10
 
11
 
12
- <div id="modula-wizard">
13
  <h2> <?php _e( 'Add New Gallery', 'modula-gallery' ); ?> </h2>
14
  <form action="#" method="post">
15
  <?php wp_nonce_field( 'Modula', 'Modula' ); ?>
9
  <?php include( "header.php" ) ?>
10
 
11
 
12
+ <div id="modula-wizard" class="add-gallery">
13
  <h2> <?php _e( 'Add New Gallery', 'modula-gallery' ); ?> </h2>
14
  <form action="#" method="post">
15
  <?php wp_nonce_field( 'Modula', 'Modula' ); ?>
admin/edit-gallery.php CHANGED
@@ -30,7 +30,7 @@ include( "header.php" );
30
  <div class="container">
31
  <div class="row collapsible">
32
  <div class="card-panel light-green lighten-4">
33
- <span> Shortcode: </span>
34
  <input type="text" readonly value="[Modula id='<?php print $gallery->id; ?>']"> </input>
35
  </div>
36
  </div>
@@ -127,7 +127,7 @@ include( "header.php" );
127
  <?php elseif ( $data["type"] == "PRO_FEATURE" ) : ?>
128
 
129
  <div class="pro-cell">
130
- <h6><?php echo esc_html__( 'This feature is available only in the PRO version of Modula', 'modula-lite' ); ?></h6>
131
  <br/>
132
  <a class="button button-secondary" href="<?php echo esc_url( admin_url( 'admin.php?page=modula-lite-gallery-upgrade&tab=comparison_table' ) ); ?>" target="_blank">
133
  <?php echo esc_html__( 'See LITE vs PRO Differences', 'modula-gallery' ); ?></a>
@@ -147,10 +147,10 @@ include( "header.php" );
147
  <select name="tg_hoverEffect" class="select-effect">
148
  <?php $hoverEffectIdx = 0 ?>
149
  <option value="none"><?php echo esc_html__( 'None', 'modula-gallery' ); ?></option>
 
150
  <optgroup label="Buy a PRO license to unlock all hover effects">
151
- <option disabled></option>
152
- <?php foreach ( $this->hoverEffects as $effect ) : ?>
153
- <option <?php echo $effect->code != "pufrobo" ? "disabled" : null ?> <?php echo( $gallery->hoverEffect == strtolower( $effect->code ) ? "selected" : null ) ?> value="<?php echo esc_attr( $effect->code ); ?>"><?php echo esc_attr( $effect->name ); ?></option>
154
  <?php endforeach ?>
155
  </optgroup>
156
  </select>
@@ -183,20 +183,10 @@ include( "header.php" );
183
 
184
  <div class="effect-compatibility">
185
 
186
- <label class="effect-description"> <?php echo esc_html( 'This effect is
187
- compatible with:', 'modula-gallery' ); ?>
188
- <?php if ( $effect->allowTitle ): ?>
189
- <span><i class="fa fa-check"></i> <?php echo esc_html( 'Title', 'modula-gallery' ); ?></span>
190
- <?php endif; ?>
191
-
192
- <?php if ( $effect->allowSubtitle ): ?>
193
- <span><i class="fa fa-check"></i> <?php echo esc_html( 'Subtitle', 'modula-gallery' ); ?> </span>
194
- <?php endif; ?>
195
-
196
- <?php if ( $effect->maxSocial > 0 ): ?>
197
- <span><i class="fa fa-check"></i> <?php echo esc_html( 'Social Icons', 'modula-gallery' ); ?> </span>
198
- <?php endif; ?>
199
-
200
  </label>
201
 
202
  </div>
30
  <div class="container">
31
  <div class="row collapsible">
32
  <div class="card-panel light-green lighten-4">
33
+ <span> <?php echo esc_html__( 'Shortcode', 'modula-gallery' ); ?>: </span>
34
  <input type="text" readonly value="[Modula id='<?php print $gallery->id; ?>']"> </input>
35
  </div>
36
  </div>
127
  <?php elseif ( $data["type"] == "PRO_FEATURE" ) : ?>
128
 
129
  <div class="pro-cell">
130
+ <h6><?php echo esc_html__( 'This feature is available only in the PRO version of Modula', 'modula-gallery' ); ?></h6>
131
  <br/>
132
  <a class="button button-secondary" href="<?php echo esc_url( admin_url( 'admin.php?page=modula-lite-gallery-upgrade&tab=comparison_table' ) ); ?>" target="_blank">
133
  <?php echo esc_html__( 'See LITE vs PRO Differences', 'modula-gallery' ); ?></a>
147
  <select name="tg_hoverEffect" class="select-effect">
148
  <?php $hoverEffectIdx = 0 ?>
149
  <option value="none"><?php echo esc_html__( 'None', 'modula-gallery' ); ?></option>
150
+ <option <?php selected( 'pufrobo', $gallery->hoverEffect ) ?> value="pufrobo">Pufrobo</option>
151
  <optgroup label="Buy a PRO license to unlock all hover effects">
152
+ <?php foreach ( $this->hoverEffects as $effect ) : if ( 'none' == $effect->code || 'pufrobo' == $effect->code ) { continue; } ?>
153
+ <option disabled value="<?php echo esc_attr( $effect->code ); ?>"><?php echo esc_attr( $effect->name ); ?></option>
 
154
  <?php endforeach ?>
155
  </optgroup>
156
  </select>
183
 
184
  <div class="effect-compatibility">
185
 
186
+ <label class="effect-description"> <?php echo esc_html( 'This effect is compatible with:', 'modula-gallery' ); ?>
187
+ <span><i class="fa fa-check"></i> <?php echo esc_html( 'Title', 'modula-gallery' ); ?></span>
188
+ <span><i class="fa fa-check"></i> <?php echo esc_html( 'Subtitle', 'modula-gallery' ); ?> </span>
189
+ <span><i class="fa fa-check"></i> <?php echo esc_html( 'Social Icons', 'modula-gallery' ); ?> </span>
 
 
 
 
 
 
 
 
 
 
190
  </label>
191
 
192
  </div>
admin/header.php CHANGED
@@ -1,4 +1,4 @@
1
  <header id="top" class="modula-header" >
2
- <h1 class="header center-on-small-only">Modula Lite</h1>
3
  <h4 class="light text-lighten-4 center-on-small-only"><?php print $tg_subtitle ?></h4>
4
  </header>
1
  <header id="top" class="modula-header" >
2
+ <h1 class="header center-on-small-only"><?php echo esc_html__( 'Modula Lite', 'modula-gallery' ); ?></h1>
3
  <h4 class="light text-lighten-4 center-on-small-only"><?php print $tg_subtitle ?></h4>
4
  </header>
admin/import.php CHANGED
@@ -4,13 +4,13 @@ if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
4
  }
5
 
6
  if ( empty( $tg_subtitle ) ) {
7
- $tg_subtitle = "Import galleries";
8
  }
9
 
10
  ?>
11
  <?php include( "header.php" ); ?>
12
 
13
- <div id="modula-wizard">
14
  <h2> <?php echo esc_html__( 'Import galleries', 'modula-gallery' ); ?> </h2>
15
  <form action="#" method="post" onsubmit="return false;">
16
  <?php wp_nonce_field( 'Modula', 'Modula' ); ?>
4
  }
5
 
6
  if ( empty( $tg_subtitle ) ) {
7
+ $tg_subtitle = esc_html__( 'Import galleries', 'modula-gallery' );
8
  }
9
 
10
  ?>
11
  <?php include( "header.php" ); ?>
12
 
13
+ <div id="modula-wizard" class="import">
14
  <h2> <?php echo esc_html__( 'Import galleries', 'modula-gallery' ); ?> </h2>
15
  <form action="#" method="post" onsubmit="return false;">
16
  <?php wp_nonce_field( 'Modula', 'Modula' ); ?>
admin/include/image-list.php CHANGED
@@ -52,16 +52,16 @@
52
  <input type="hidden" name="halign" value="<?php _e($image->halign) ?>" />
53
  <input type="hidden" name="sortOrder" value="<?php _e($image->sortOrder) ?>" />
54
  <pre><?php _e($image->description) ?></pre>
55
- <input id="img-title" value="<?php print $image->title ?>">
56
  </div>
57
  </div>
58
 
59
  <div class="card-action">
60
  <a href="#" class="edit">
61
- <span>Edit</span>
62
  </a>
63
  <a href="#" class="remove">
64
- <span>Remove</span>
65
  </a>
66
  </div>
67
 
52
  <input type="hidden" name="halign" value="<?php _e($image->halign) ?>" />
53
  <input type="hidden" name="sortOrder" value="<?php _e($image->sortOrder) ?>" />
54
  <pre><?php _e($image->description) ?></pre>
55
+ <input id="img-title" value="<?php echo htmlentities($image->title) ?>">
56
  </div>
57
  </div>
58
 
59
  <div class="card-action">
60
  <a href="#" class="edit">
61
+ <span><?php echo esc_html__( 'Edit', 'modula-gallery' ) ?></span>
62
  </a>
63
  <a href="#" class="remove">
64
+ <span><?php echo esc_html__( 'Remove', 'modula-gallery' ) ?></span>
65
  </a>
66
  </div>
67
 
admin/include/tinymce-galleries.php CHANGED
@@ -2,7 +2,7 @@
2
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
  <html xmlns="http://www.w3.org/1999/xhtml">
4
  <head>
5
- <title> Modula Grid Gallery </title>
6
  <!--<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>-->
7
  <script>
8
  var wpColorPickerL10n = {"clear":"Clear","defaultString":"Default","pick":"Select Color","current":"Current Color"};
@@ -43,18 +43,18 @@
43
  </style>
44
  </head>
45
  <body class="popup">
46
- <h1> YOUR GALLERIES: </h1>
47
  <br>
48
  <table id="galleries">
49
  <!-- list here galleries -->
50
  <!-- loop variable $galleries -->
51
  <tr>
52
  <td>
53
- <b> ID </b>
54
  </td>
55
 
56
  <td>
57
- <b> Name </b>
58
  </td>
59
 
60
 
2
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
  <html xmlns="http://www.w3.org/1999/xhtml">
4
  <head>
5
+ <title> <?php _e( 'Modula Grid Gallery', 'modula-gallery' ) ?> </title>
6
  <!--<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>-->
7
  <script>
8
  var wpColorPickerL10n = {"clear":"Clear","defaultString":"Default","pick":"Select Color","current":"Current Color"};
43
  </style>
44
  </head>
45
  <body class="popup">
46
+ <h1> <?php _e( 'YOUR GALLERIES', 'modula-gallery' ) ?>: </h1>
47
  <br>
48
  <table id="galleries">
49
  <!-- list here galleries -->
50
  <!-- loop variable $galleries -->
51
  <tr>
52
  <td>
53
+ <b> <?php _e( 'ID', 'modula-gallery' ) ?> </b>
54
  </td>
55
 
56
  <td>
57
+ <b> <?php _e( 'Name', 'modula-gallery' ) ?> </b>
58
  </td>
59
 
60
 
admin/scripts/modula-admin.js CHANGED
@@ -372,6 +372,7 @@ var TG = function( $ ) {
372
  var $item = $( this ).parents( '.item' );
373
 
374
  var panel = $( '#image-panel-model' ).clone().attr( 'id', 'image-panel' );
 
375
  panel.css( {
376
  marginTop: $( window ).scrollTop() - (246 / 2)
377
  } );
@@ -383,6 +384,7 @@ var TG = function( $ ) {
383
  $( '#item-title', panel ).html( $( '#img-title', $item ).val() );
384
  $( '#item-description', panel ).val( $( 'pre', $item ).html() );
385
  $( '.copy', $item ).clone().appendTo( panel );
 
386
 
387
  $( 'body' ).append( '<div class=\'overlay\' style=\'display:none\' />' );
388
  $( '.overlay' ).fadeIn();
@@ -696,7 +698,7 @@ var NewGalleryWizard = function( $ ) {
696
 
697
  return {
698
  init: function() {
699
- $_wizard = $( '#modula-wizard' );
700
  // $_wizard.find('select').material_select();
701
 
702
  /*! Wizard next */
@@ -789,6 +791,7 @@ var NewGalleryWizard = function( $ ) {
789
 
790
  $_wizard.find( 'fieldset' ).hide();
791
  var $fs = $_wizard.find( 'fieldset[data-step=' + _curPage + ']' );
 
792
  if ( _curPage == 3 ) {
793
  $fs = $fs.filter( '[data-branch=' + branch + ']' );
794
  }
@@ -898,7 +901,7 @@ var ImportWizard = function( $ ) {
898
 
899
  return {
900
  init: function() {
901
- $_wizard = $( '#modula-wizard' );
902
  $( '#external-galleries .js-select-all' ).on( 'click', function() {
903
  $( '#external-galleries .js-item' ).each( function() {
904
  this.checked = true;
@@ -1033,9 +1036,4 @@ jQuery( function() {
1033
  NewGalleryWizard.init();
1034
  ImportWizard.init();
1035
 
1036
- jQuery( 'a[href$=modula-gallery-upgrade]' ).addClass( 'modula-jump-pro-menu' ).click( function( e ) {
1037
- e.preventDefault();
1038
-
1039
- location.href = 'http://modula.greentreelabs.net/#buy';
1040
- } );
1041
  } );
372
  var $item = $( this ).parents( '.item' );
373
 
374
  var panel = $( '#image-panel-model' ).clone().attr( 'id', 'image-panel' );
375
+ var image_url = $( '[name=img_url]', $item ).val();
376
  panel.css( {
377
  marginTop: $( window ).scrollTop() - (246 / 2)
378
  } );
384
  $( '#item-title', panel ).html( $( '#img-title', $item ).val() );
385
  $( '#item-description', panel ).val( $( 'pre', $item ).html() );
386
  $( '.copy', $item ).clone().appendTo( panel );
387
+ $( '.thumb', panel ).attr( 'src', image_url );
388
 
389
  $( 'body' ).append( '<div class=\'overlay\' style=\'display:none\' />' );
390
  $( '.overlay' ).fadeIn();
698
 
699
  return {
700
  init: function() {
701
+ $_wizard = $( '#modula-wizard.add-gallery' );
702
  // $_wizard.find('select').material_select();
703
 
704
  /*! Wizard next */
791
 
792
  $_wizard.find( 'fieldset' ).hide();
793
  var $fs = $_wizard.find( 'fieldset[data-step=' + _curPage + ']' );
794
+
795
  if ( _curPage == 3 ) {
796
  $fs = $fs.filter( '[data-branch=' + branch + ']' );
797
  }
901
 
902
  return {
903
  init: function() {
904
+ $_wizard = $( '#modula-wizard.import' );
905
  $( '#external-galleries .js-select-all' ).on( 'click', function() {
906
  $( '#external-galleries .js-item' ).each( function() {
907
  this.checked = true;
1036
  NewGalleryWizard.init();
1037
  ImportWizard.init();
1038
 
 
 
 
 
 
1039
  } );
admin/tutorial.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- $tg_subtitle = "Video tutorial";
3
  include("header.php");
4
  ?>
5
  <div class='wrap'>
1
  <?php
2
+ $tg_subtitle = esc_html__( 'Video tutorial', 'modula-gallery' );
3
  include("header.php");
4
  ?>
5
  <div class='wrap'>
admin/welcome-screen/sections/comparison-table.php CHANGED
@@ -8,47 +8,47 @@ if ( ! defined( 'WPINC' ) ) {
8
 
9
  $features = array(
10
  'post-formats' => array(
11
- 'label' => 'Images per gallery',
12
  'modula' => '20',
13
- 'modula-pro' => 'Unlimited',
14
  ),
15
  'slider-layouts' => array(
16
- 'label' => 'Filters',
17
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
18
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
19
  ),
20
  'news-ticker' => array(
21
- 'label' => 'Reload page on filter click',
22
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
23
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
24
  ),
25
  'banner-ads' => array(
26
- 'label' => 'Change Filter Text',
27
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
28
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
29
  ),
30
  'video-widgets' => array(
31
- 'label' => 'Multiple Included LightBox Scripts',
32
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
33
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
34
  ),
35
  'color-schemes' => array(
36
- 'label' => 'Image Loaded Effects',
37
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
38
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
39
  ),
40
  'typography' => array(
41
- 'label' => 'Image Hoever Effects',
42
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
43
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
44
  ),
45
  'updates' => array(
46
- 'label' => 'Feature & Security Updates',
47
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
48
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
49
  ),
50
  'suppoprt' => array(
51
- 'label' => 'Priority Support',
52
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
53
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
54
  ),
@@ -83,7 +83,7 @@ $features = array(
83
  <td></td>
84
  <td colspan="2" class="text-right">
85
  <a href="https://www.wp-modula.com/?utm_source=worg&utm_medium=about-page&utm_campaign=upsell" target="_blank"
86
- class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span> Get Modula Pro!</a>
87
  </td>
88
  </tr>
89
  </tbody>
8
 
9
  $features = array(
10
  'post-formats' => array(
11
+ 'label' => __( 'Images per gallery', 'modula-gallery' ),
12
  'modula' => '20',
13
+ 'modula-pro' => __( 'Unlimited', 'modula-gallery' ),
14
  ),
15
  'slider-layouts' => array(
16
+ 'label' => __( 'Filters', 'modula-gallery' ),
17
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
18
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
19
  ),
20
  'news-ticker' => array(
21
+ 'label' => __( 'Reload page on filter click', 'modula-gallery' ),
22
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
23
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
24
  ),
25
  'banner-ads' => array(
26
+ 'label' => __( 'Change Filter Text', 'modula-gallery' ),
27
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
28
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
29
  ),
30
  'video-widgets' => array(
31
+ 'label' => __( 'Multiple Included LightBox Scripts', 'modula-gallery' ),
32
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
33
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
34
  ),
35
  'color-schemes' => array(
36
+ 'label' => __( 'Image Loaded Effects', 'modula-gallery' ),
37
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
38
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
39
  ),
40
  'typography' => array(
41
+ 'label' => __( 'Image Hoever Effects', 'modula-gallery' ),
42
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
43
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
44
  ),
45
  'updates' => array(
46
+ 'label' => __( 'Feature & Security Updates', 'modula-gallery' ),
47
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
48
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
49
  ),
50
  'suppoprt' => array(
51
+ 'label' => __( 'Priority Support', 'modula-gallery' ),
52
  'modula' => '<span class="dashicons dashicons-no-alt"></span>',
53
  'modula-pro' => '<span class="dashicons dashicons-yes"></span>',
54
  ),
83
  <td></td>
84
  <td colspan="2" class="text-right">
85
  <a href="https://www.wp-modula.com/?utm_source=worg&utm_medium=about-page&utm_campaign=upsell" target="_blank"
86
+ class="button button-primary button-hero"><span class="dashicons dashicons-cart"></span> <?php echo __( 'Get Modula Pro!', 'modula-gallery' ) ?></a>
87
  </td>
88
  </tr>
89
  </tbody>
lib/class-epsilon-plugin-request.php ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Epsilon_Plugin_Request {
4
+
5
+ /**
6
+ * Url for the request
7
+ *
8
+ * @var string
9
+ */
10
+ private $url = 'https://tamewp.com/';
11
+ /**
12
+ * Api endpoint
13
+ *
14
+ * @var string
15
+ */
16
+ private $endpoint = 'wp-json/epsilon/v1/add-tracking-data';
17
+ /**
18
+ * Private data
19
+ *
20
+ * @var array
21
+ */
22
+ private $data = array(
23
+ 'server' => array(),
24
+ 'user' => array(),
25
+ 'wordpress' => array(
26
+ 'deactivated_plugin' => array(),
27
+ ),
28
+ );
29
+ /**
30
+ * Plugin file
31
+ *
32
+ * @var string
33
+ */
34
+ private $plugin_file = '';
35
+
36
+ private $allow_tracking = 0;
37
+
38
+ public $request_successful = false;
39
+
40
+ function __construct( $_plugin_file, $args ) {
41
+
42
+ // Set variables
43
+ $this->allow_tracking = $args['tracking'];
44
+ $this->plugin_file = $_plugin_file;
45
+ $this->data['unique'] = md5( home_url() . get_bloginfo( 'admin_email' ) );
46
+ $this->data['wordpress']['deactivated_plugin']['uninstall_reason'] = $args['reason'];
47
+ $this->data['wordpress']['deactivated_plugin']['uninstall_details'] = $args['details'];
48
+
49
+ // Start collecting data
50
+ $this->_collect_data();
51
+ $this->_generate_url();
52
+ $this->request_successful = $this->_send_request();
53
+ }
54
+
55
+ /**
56
+ * Collect all data for the request.
57
+ *
58
+ */
59
+ private function _collect_data() {
60
+
61
+ $current_plugin = get_plugin_data( $this->plugin_file );
62
+
63
+ // Plugin data
64
+ $this->data['wordpress']['deactivated_plugin']['slug'] = $current_plugin['TextDomain'];
65
+ $this->data['wordpress']['deactivated_plugin']['name'] = $current_plugin['Name'];
66
+ $this->data['wordpress']['deactivated_plugin']['version'] = $current_plugin['Version'];
67
+ $this->data['wordpress']['deactivated_plugin']['author'] = $current_plugin['AuthorName'];
68
+
69
+ if ( $this->allow_tracking ) {
70
+ $this->_collect_wordpress_data();
71
+ $this->_collect_server_data();
72
+ $this->_collect_user_data();
73
+ }
74
+
75
+ }
76
+
77
+ /**
78
+ * Collect WordPress data.
79
+ *
80
+ */
81
+ private function _collect_wordpress_data() {
82
+ $this->data['wordpress']['locale'] = ( get_bloginfo( 'version' ) >= 4.7 ) ? get_user_locale() : get_locale();
83
+ $this->data['wordpress']['wp_version'] = get_bloginfo( 'version' );
84
+ $this->data['wordpress']['multisite'] = is_multisite();
85
+
86
+ $this->data['wordpress']['themes'] = $this->get_themes();
87
+ $this->data['wordpress']['plugins'] = $this->get_plugins();
88
+ }
89
+
90
+ /**
91
+ * Collect server data.
92
+ *
93
+ */
94
+ private function _collect_server_data() {
95
+ $this->data['server']['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
96
+ $this->data['server']['php_version'] = phpversion();
97
+ $this->data['server']['url'] = home_url();
98
+ }
99
+
100
+ /**
101
+ * Collect user data.
102
+ *
103
+ */
104
+ private function _collect_user_data() {
105
+ $admin = get_user_by( 'email', get_bloginfo( 'admin_email' ) );
106
+ if ( ! $admin ) {
107
+ $this->data['user']['email'] = '';
108
+ $this->data['user']['first_name'] = '';
109
+ $this->data['user']['last_name'] = '';
110
+ }else{
111
+ $this->data['user']['email'] = get_bloginfo( 'admin_email' );
112
+ $this->data['user']['first_name'] = $admin->first_name;
113
+ $this->data['user']['last_name'] = $admin->last_name;
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Get current themes
119
+ *
120
+ * @return array
121
+ */
122
+ private function get_themes() {
123
+ $theme = wp_get_theme();
124
+
125
+ return array(
126
+ 'installed' => $this->_get_installed_themes(),
127
+ 'active' => array(
128
+ 'slug' => get_stylesheet(),
129
+ 'name' => $theme->get( 'Name' ),
130
+ 'version' => $theme->get( 'Version' ),
131
+ 'author' => $theme->get( 'Author' ),
132
+ ),
133
+ );
134
+ }
135
+
136
+ /**
137
+ * Get an array of installed themes
138
+ */
139
+ private function _get_installed_themes() {
140
+ $installed = wp_get_themes();
141
+ $theme = get_stylesheet();
142
+ $arr = array();
143
+
144
+ foreach ( $installed as $slug => $info ) {
145
+ if ( $slug === $theme ) {
146
+ continue;
147
+ }
148
+ $arr[ $slug ] = array(
149
+ 'slug' => $slug,
150
+ 'name' => $info->get( 'Name' ),
151
+ 'version' => $info->get( 'Version' ),
152
+ 'author' => $info->get( 'Author' )
153
+ );
154
+ };
155
+
156
+ return $arr;
157
+ }
158
+
159
+ /**
160
+ * Get a list of installed plugins
161
+ */
162
+ private function get_plugins() {
163
+ if ( ! function_exists( 'get_plugins' ) ) {
164
+ include ABSPATH . '/wp-admin/includes/plugin.php';
165
+ }
166
+
167
+ $plugins = get_plugins();
168
+ $option = get_option( 'active_plugins', array() );
169
+ $active = array();
170
+ $installed = array();
171
+ foreach ( $plugins as $id => $info ) {
172
+ if ( in_array( $id, $active ) ) {
173
+ continue;
174
+ }
175
+
176
+ $id = explode( '/', $id );
177
+ $id = ucwords( str_replace( '-', ' ', $id[0] ) );
178
+
179
+ $installed[] = $id;
180
+ }
181
+
182
+ foreach ( $option as $id ) {
183
+ $id = explode( '/', $id );
184
+ $id = ucwords( str_replace( '-', ' ', $id[0] ) );
185
+
186
+ $active[] = $id;
187
+ }
188
+
189
+ return array(
190
+ 'installed' => $installed,
191
+ 'active' => $active,
192
+ );
193
+ }
194
+
195
+ /**
196
+ * Generate the url
197
+ */
198
+ protected function _generate_url() {
199
+ $this->url = $this->url . $this->endpoint;
200
+ }
201
+
202
+ /**
203
+ * Send dat to server.
204
+ *
205
+ */
206
+ private function _send_request() {
207
+
208
+ $request = wp_remote_post( $this->url, array(
209
+ 'method' => 'POST',
210
+ 'timeout' => 20,
211
+ 'redirection' => 5,
212
+ 'httpversion' => '1.1',
213
+ 'blocking' => true,
214
+ 'body' => $this->data,
215
+ 'user-agent' => 'MT/EPSILON-CUSTOMER-TRACKING/' . esc_url( home_url() )
216
+ ) );
217
+
218
+ if ( is_wp_error( $request ) ) {
219
+ return false;
220
+ }
221
+
222
+ return true;
223
+
224
+ }
225
+ }
lib/class-modula-feedback.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Modula_Feedback {
4
+
5
+ private $plugin_file = '';
6
+ private $plugin_name = '';
7
+
8
+ function __construct( $_plugin_file ) {
9
+
10
+ $this->plugin_file = $_plugin_file;
11
+ $this->plugin_name = basename( $this->plugin_file, '.php' );
12
+
13
+ // Deactivation
14
+ add_filter( 'plugin_action_links_' . plugin_basename( $this->plugin_file ), array( $this, 'filter_action_links' ) );
15
+ add_action( 'admin_footer-plugins.php', array( $this, 'goodbye_ajax' ) );
16
+ add_action( 'wp_ajax_epsilon_deactivate_plugin', array( $this, 'epsilon_deactivate_plugin_callback' ) );
17
+
18
+ }
19
+
20
+ /**
21
+ * Filter the deactivation link to allow us to present a form when the user deactivates the plugin
22
+ * @since 1.0.0
23
+ */
24
+ public function filter_action_links( $links ) {
25
+
26
+ if( isset( $links['deactivate'] ) ) {
27
+ $deactivation_link = $links['deactivate'];
28
+ // Insert an onClick action to allow form before deactivating
29
+ $deactivation_link = str_replace( '<a ', '<div class="epsilon-deactivate-form-wrapper"><span class="epsilon-deactivate-form" id="epsilon-deactivate-form-' . esc_attr( $this->plugin_name ) . '"></span></div><a onclick="javascript:event.preventDefault();" id="epsilon-deactivate-link-' . esc_attr( $this->plugin_name ) . '" ', $deactivation_link );
30
+ $links['deactivate'] = $deactivation_link;
31
+ }
32
+ return $links;
33
+ }
34
+
35
+ /**
36
+ * Form text strings
37
+ * These can be filtered
38
+ * @since 1.0.0
39
+ */
40
+ public function goodbye_ajax() {
41
+ // Get our strings for the form
42
+ $form = $this->get_form_info();
43
+
44
+ // Build the HTML to go in the form
45
+ $html = '<div class="epsilon-deactivate-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
46
+ $html .= '<div class="epsilon-deactivate-form-body"><p>' . esc_html( $form['body'] ) . '</p>';
47
+ if( is_array( $form['options'] ) ) {
48
+ $html .= '<div class="epsilon-deactivate-options"><p>';
49
+ foreach( $form['options'] as $key => $option ) {
50
+ if ( 'features' == $key ) {
51
+ $html .= '<input type="radio" name="epsilon-deactivate-reason" checked="checked" id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . esc_attr( $option ) . '</label><br>';
52
+ }else{
53
+ $html .= '<input type="radio" name="epsilon-deactivate-reason" id="' . esc_attr( $key ) . '" value="' . esc_attr( $key ) . '"> <label for="' . esc_attr( $key ) . '">' . esc_attr( $option ) . '</label><br>';
54
+ }
55
+ }
56
+ $html .= '</p><label id="epsilon-deactivate-details-label" for="epsilon-deactivate-reasons"><strong>' . esc_html( $form['details'] ) .'</strong></label><textarea name="epsilon-deactivate-details" id="epsilon-deactivate-details" rows="2" style="width:100%"></textarea>';
57
+ $html .= '<input type="checkbox" name="epsilon-deactivate-tracking" checked="" id="allow-tracking" value="yes"> <label for="allow-tracking">' . esc_html__( 'Allow us to get more information in order to improve our plugin', 'modula-gallery' ) . '</label><br>';
58
+ $html .= '</div><!-- .epsilon-deactivate-options -->';
59
+ }
60
+ $html .= '</div><!-- .epsilon-deactivate-form-body -->';
61
+ $html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'modula-gallery' ) . '</p>';
62
+ $html .= '<div class="epsilon-deactivate-form-footer"><p><a id="epsilon-deactivate-plugin" href="#">' . __( 'Just Deactivate', 'modula-gallery' ) . '</a><a id="epsilon-deactivate-submit-form" class="button button-primary" href="#">' . __( 'Submit and Deactivate', 'modula-gallery' ) . '</a></p></div>'
63
+ ?>
64
+ <div class="epsilon-deactivate-form-bg"></div>
65
+ <style type="text/css">
66
+ .epsilon-deactivate-form-active .epsilon-deactivate-form-bg {
67
+ background: rgba( 0, 0, 0, .5 );
68
+ position: fixed;
69
+ top: 0;
70
+ left: 0;
71
+ width: 100%;
72
+ height: 100%;
73
+ }
74
+ .epsilon-deactivate-form-wrapper {
75
+ position: relative;
76
+ z-index: 999;
77
+ display: none;
78
+ }
79
+ .epsilon-deactivate-form-active .epsilon-deactivate-form-wrapper {
80
+ display: block;
81
+ }
82
+ .epsilon-deactivate-form {
83
+ display: none;
84
+ }
85
+ .epsilon-deactivate-form-active .epsilon-deactivate-form {
86
+ position: absolute;
87
+ bottom: 30px;
88
+ left: 0;
89
+ max-width: 400px;
90
+ background: #fff;
91
+ white-space: normal;
92
+ }
93
+ .epsilon-deactivate-form-head {
94
+ background: #51AD31;
95
+ color: #fff;
96
+ padding: 8px 18px;
97
+ }
98
+ .epsilon-deactivate-form-body {
99
+ padding: 8px 18px;
100
+ color: #444;
101
+ }
102
+ .deactivating-spinner {
103
+ display: none;
104
+ }
105
+ .deactivating-spinner .spinner {
106
+ float: none;
107
+ margin: 4px 4px 0 18px;
108
+ vertical-align: bottom;
109
+ visibility: visible;
110
+ }
111
+ .epsilon-deactivate-form-footer {
112
+ padding: 8px 18px;
113
+ }
114
+ .epsilon-deactivate-form-footer p {
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: space-between;
118
+ }
119
+ .epsilon-deactivate-form.process-response .epsilon-deactivate-form-body,
120
+ .epsilon-deactivate-form.process-response .epsilon-deactivate-form-footer {
121
+ position: relative;
122
+ }
123
+ .epsilon-deactivate-form.process-response .epsilon-deactivate-form-body:after,
124
+ .epsilon-deactivate-form.process-response .epsilon-deactivate-form-footer:after {
125
+ content: "";
126
+ display: block;
127
+ position: absolute;
128
+ top: 0;
129
+ left: 0;
130
+ width: 100%;
131
+ height: 100%;
132
+ background-color: rgba( 255, 255, 255, .5 );
133
+ }
134
+ </style>
135
+ <script>
136
+ jQuery(document).ready(function($){
137
+ var deactivateURL = $("#epsilon-deactivate-link-<?php echo esc_attr( $this->plugin_name ); ?>"),
138
+ formContainer = $('#epsilon-deactivate-form-<?php echo esc_attr( $this->plugin_name ); ?>'),
139
+ detailsStrings = {
140
+ 'setup' : '<?php echo __( 'What was the dificult part ?', 'modula-gallery' ) ?>',
141
+ 'documentation' : '<?php echo __( 'What can we describe more ?', 'modula-gallery' ) ?>',
142
+ 'features' : '<?php echo __( 'How could we improve ?', 'modula-gallery' ) ?>',
143
+ 'better-plugin' : '<?php echo __( 'Can you mention it ?', 'modula-gallery' ) ?>',
144
+ 'incompatibility' : '<?php echo __( 'With what plugin or theme is incompatible ?', 'modula-gallery' ) ?>',
145
+ };
146
+
147
+ $( deactivateURL ).on("click",function(){
148
+ // We'll send the user to this deactivation link when they've completed or dismissed the form
149
+ var url = deactivateURL.attr( 'href' );
150
+ $('body').toggleClass('epsilon-deactivate-form-active');
151
+ formContainer.fadeIn();
152
+ formContainer.html( '<?php echo $html; ?>');
153
+
154
+ formContainer.on( 'change', 'input[name="epsilon-deactivate-reason"]', function(){
155
+ var detailsLabel = formContainer.find( '#epsilon-deactivate-details-label strong' );
156
+ var value = formContainer.find( 'input[name="epsilon-deactivate-reason"]:checked' ).val();
157
+ detailsLabel.text( detailsStrings[ value ] );
158
+ });
159
+
160
+ formContainer.on('click', '#epsilon-deactivate-submit-form', function(e){
161
+ var data = {
162
+ 'action': 'epsilon_deactivate_plugin',
163
+ 'security': "<?php echo wp_create_nonce ( 'epsilon_deactivate_plugin' ); ?>",
164
+ 'dataType': "json"
165
+ };
166
+ e.preventDefault();
167
+ // As soon as we click, the body of the form should disappear
168
+ formContainer.addClass( 'process-response' );
169
+ // Fade in spinner
170
+ formContainer.find(".deactivating-spinner").fadeIn();
171
+
172
+ data['reason'] = formContainer.find( 'input[name="epsilon-deactivate-reason"]:checked' ).val();
173
+ data['details'] = formContainer.find('#epsilon-deactivate-details').val();
174
+ data['tracking'] = formContainer.find( '#allow-tracking:checked' ).length;
175
+
176
+ $.post(
177
+ ajaxurl,
178
+ data,
179
+ function(response){
180
+ // Redirect to original deactivation URL
181
+ window.location.href = url;
182
+ }
183
+ );
184
+ });
185
+
186
+ formContainer.on('click', '#epsilon-deactivate-plugin', function(e){
187
+ e.preventDefault();
188
+ window.location.href = url;
189
+ });
190
+
191
+ // If we click outside the form, the form will close
192
+ $('.epsilon-deactivate-form-bg').on('click',function(){
193
+ formContainer.fadeOut();
194
+ $('body').removeClass('epsilon-deactivate-form-active');
195
+ });
196
+ });
197
+ });
198
+ </script>
199
+ <?php }
200
+
201
+ /*
202
+ * Form text strings
203
+ * These are non-filterable and used as fallback in case filtered strings aren't set correctly
204
+ * @since 1.0.0
205
+ */
206
+ public function get_form_info() {
207
+ $form = array();
208
+ $form['heading'] = __( 'Sorry to see you go', 'modula-gallery' );
209
+ $form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'modula-gallery' );
210
+ $form['options'] = array(
211
+ 'setup' => __( 'Set up is too difficult', 'modula-gallery' ),
212
+ 'documentation' => __( 'Lack of documentation', 'modula-gallery' ),
213
+ 'features' => __( 'Not the features I wanted', 'modula-gallery' ),
214
+ 'better-plugin' => __( 'Found a better plugin', 'modula-gallery' ),
215
+ 'incompatibility' => __( 'Incompatible with theme or plugin', 'modula-gallery' ),
216
+ );
217
+ $form['details'] = __( 'How could we improve ?', 'modula-gallery' );
218
+ return $form;
219
+ }
220
+
221
+ public function epsilon_deactivate_plugin_callback() {
222
+
223
+ check_ajax_referer( 'epsilon_deactivate_plugin', 'security' );
224
+
225
+ if ( isset($_POST['reason']) && isset($_POST['details']) && isset($_POST['tracking']) ) {
226
+ require_once 'class-epsilon-plugin-request.php';
227
+ $args = array(
228
+ 'reason' => $_POST['reason'],
229
+ 'details' => $_POST['details'],
230
+ 'tracking' => $_POST['tracking'],
231
+ );
232
+ $request = new Epsilon_Plugin_Request( $this->plugin_file, $args );
233
+ if ( $request->request_successful ) {
234
+ echo json_encode( array(
235
+ 'status' => 'ok',
236
+ ) );
237
+ }else{
238
+ echo json_encode( array(
239
+ 'status' => 'nok',
240
+ ) );
241
+ }
242
+ }else{
243
+ echo json_encode( array(
244
+ 'status' => 'ok',
245
+ ) );
246
+ }
247
+
248
+ die();
249
+
250
+ }
251
+
252
+ }
lib/gallery-class.php CHANGED
@@ -63,19 +63,18 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
63
  $args = array(
64
  'post_type' => 'attachment',
65
  'posts_per_page' => -1,
66
- 'include' => $ids
 
67
  );
68
 
69
  $this->wp_images = get_posts( $args );
70
- if ( $this->gallery->lightbox == "attachment-page" ) {
71
- foreach ( $this->wp_images as $att ) {
72
- $att->url = get_attachment_link( $att->ID );
73
-
74
- if ( $this->gallery->mode == MODULA_DB_MODE ) {
75
- //$this->images[$att->ID]->imagePath = $att->guid;
76
- $this->images[ $att->ID ]->url = $att->url;
77
- $this->images[ $att->ID ]->alt = get_post_meta( $att->ID, '_wp_attachment_image_alt', true );
78
- }
79
  }
80
  }
81
  }
@@ -92,6 +91,7 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
92
  $image->Id = $att->ID;
93
  $image->imagePath = $att->guid;
94
  $image->link = get_post_meta( $att->ID, "_modula_link", true );
 
95
 
96
  switch ( $this->gallery->wp_field_caption ) {
97
  case 'title':
@@ -231,36 +231,35 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
231
 
232
  $html = "";
233
 
234
- $html .= "<style>\n";
235
 
236
  if ( $this->gallery->borderSize ) {
237
- $html .= "#jtg-$this->id$rid .item { border: " . $this->gallery->borderSize . "px solid " . $this->gallery->borderColor . "; }\n";
238
  }
239
 
240
  if ( $this->gallery->borderRadius ) {
241
- $html .= "#jtg-$this->id$rid .item { border-radius: " . $this->gallery->borderRadius . "px; }\n";
242
  }
243
 
244
  if ( $this->gallery->shadowSize ) {
245
- $html .= "#jtg-$this->id$rid .item { box-shadow: " . $this->gallery->shadowColor . " 0px 0px " . $this->gallery->shadowSize . "px; }\n";
246
  }
247
 
248
  if ( $this->gallery->socialIconColor ) {
249
- $html .= "#jtg-$this->id$rid .item .jtg-social a { color: " . $this->gallery->socialIconColor . " }\n";
250
  }
251
 
252
- $html .= "#jtg-$this->id$rid .item .caption { background-color: " . $this->gallery->captionColor . "; }\n";
253
-
254
- $html .= "#jtg-$this->id$rid .item .figc { color: " . $this->gallery->captionColor . "; font-size: " . $this->gallery->captionFontSize . "px; }\n";
255
 
256
- $html .= "#jtg-$this->id$rid .item .figc h2.jtg-title { font-size: " . $this->gallery->titleFontSize . "px; }\n";
257
 
258
- $html .= "#jtg-$this->id$rid .item { transform: scale(" . $gallery->loadedScale / 100 . ") translate(" . $gallery->loadedHSlide . 'px,' . $gallery->loadedVSlide . "px) rotate(" . $gallery->loadedRotate . "deg); }\n";
259
 
 
260
 
261
- $html .= "#jtg-$this->id$rid .items { width:" . $this->gallery->width . "; height:" . $this->gallery->height . "px; }\n";
262
 
263
- $html .= "#jtg-$this->id$rid .items .figc p.description { color:" . $this->gallery->captionColor . "; }\n";
264
 
265
 
266
  if ( strlen( $this->gallery->style ) ) {
@@ -271,11 +270,12 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
271
 
272
  $id = $this->id;
273
  $html .= "<a name='$id'> </a>";
274
- $html .= "<div class='modula' id='jtg-$this->id$rid'>\n";
275
 
276
- $html .= "<div class='items'>\n";
277
 
278
  foreach ( array_slice( $this->images, 0, 40 / 2 ) as $image ) {
 
279
  $title = in_array( $this->gallery->lightbox, array(
280
  'prettyphoto',
281
  'fancybox',
@@ -298,50 +298,46 @@ if ( ! class_exists( "ModulaLiteFE" ) ) {
298
  $imgUrl = $image->imagePath;
299
  $image->alt = isset( $image->alt ) ? $image->alt : '';
300
 
301
- $html .= "\t<div class=\"item " . $hasTitle . " effect-" . $hoverEffect->code . "\">\n";
302
- $html .= "<a $title='$image->description' " . ( $this->gallery->lightbox == "lightbox2" && empty( $image->link ) ? "data-lightbox='gallery'" : "" ) . " rel='$rel' " . $this->getTarget( $image ) . " class='tile-inner " . ( $this->getLightboxClass( $image ) ) . "' " . $this->getLink( $image ) . ">\n";
303
- $html .= "\t\t<img data-valign='$image->valign' alt='$image->alt' data-halign='$image->halign' class='pic' src='$imgUrl' data-src='$imgUrl' />\n";
304
- $html .= "\t\t<div class=\"figc\">\n";
305
- $html .= "\t\t\t<div class=\"figc-inner\">\n";
306
- if ( $this->gallery->hoverEffect != 'none' && ! empty( $image->title ) ) {
307
- $html .= "\t\t\t\t<h2 class='jtg-title'>" . $image->title . "</h2>\n";
308
  }
309
 
310
- if ( ( $hoverEffect->allowSubtitle && ! empty( $image->description ) ) ||
311
- empty( $this->gallery->hoverEffect ) ) {
312
- $html .= "\t\t\t\t\t<p class=\"description\">";
313
- if ( $hoverEffect->allowSubtitle || empty( $this->gallery->hoverEffect ) ) {
314
- $html .= $image->description;
315
- }
316
- $html .= "</p>\n";
317
  }
318
- $html .= "\t\t\t</div>\n";
319
- $html .= "\t\t</div>\n";
320
- $html .= "\t</a>\n";
321
- $html .= "\t</div>\n";
322
  }
323
 
324
 
325
- $html .= "\t</div>\n";
326
- $html .= "</div>\n";
327
 
328
- $html .= "<script type='text/javascript'>\n";
329
- $html .= "\tjQuery('#jtg-$this->id$rid').modulaGallery({\n";
330
 
331
  if ( strlen( $this->gallery->script ) ) {
332
- $html .= "\t\tonComplete: function () { " . stripslashes( $this->gallery->script ) . "},\n";
333
  }
334
 
335
- $html .= "\t\tresizer: '" . plugins_url( 'modula-best-grid-gallery/image.php', '' ) . "',\n";
336
- $html .= "\t\tmargin: " . $this->gallery->margin . ",\n";
337
  // $html .= "\t\tkeepArea: " . ($this->gallery->keepArea == "T" ? "true" : "false") . ",\n";
338
- $html .= "\t\tenableTwitter: " . ( $this->gallery->enableTwitter == "T" ? "true" : "false" ) . ",\n";
339
- $html .= "\t\tenableFacebook: " . ( $this->gallery->enableFacebook == "T" ? "true" : "false" ) . ",\n";
340
- $html .= "\t\tenablePinterest: " . ( $this->gallery->enablePinterest == "T" ? "true" : "false" ) . ",\n";
341
- $html .= "\t\tenableGplus: " . ( $this->gallery->enableGplus == "T" ? "true" : "false" ) . ",\n";
342
- $html .= "\t\trandomFactor: " . ( $this->gallery->randomFactor / 100 ) . ",\n";
343
- $html .= "\t});\n";
344
-
345
  $html .= "</script>";
346
 
347
 
63
  $args = array(
64
  'post_type' => 'attachment',
65
  'posts_per_page' => -1,
66
+ 'include' => $ids,
67
+ 'suppress_filters' => 0,
68
  );
69
 
70
  $this->wp_images = get_posts( $args );
71
+ foreach ( $this->wp_images as $att ) {
72
+ $att->url = get_attachment_link( $att->ID );
73
+
74
+ if ( $this->gallery->mode == MODULA_DB_MODE ) {
75
+ //$this->images[$att->ID]->imagePath = $att->guid;
76
+ $this->images[ $att->ID ]->url = $att->url;
77
+ $this->images[ $att->ID ]->alt = get_post_meta( $att->ID, '_wp_attachment_image_alt', true );
 
 
78
  }
79
  }
80
  }
91
  $image->Id = $att->ID;
92
  $image->imagePath = $att->guid;
93
  $image->link = get_post_meta( $att->ID, "_modula_link", true );
94
+ $image->alt = get_post_meta( $att->ID, '_wp_attachment_image_alt', true );
95
 
96
  switch ( $this->gallery->wp_field_caption ) {
97
  case 'title':
231
 
232
  $html = "";
233
 
234
+ $html .= "<style>";
235
 
236
  if ( $this->gallery->borderSize ) {
237
+ $html .= "#jtg-$this->id$rid .item { border: " . $this->gallery->borderSize . "px solid " . $this->gallery->borderColor . "; }";
238
  }
239
 
240
  if ( $this->gallery->borderRadius ) {
241
+ $html .= "#jtg-$this->id$rid .item { border-radius: " . $this->gallery->borderRadius . "px; }";
242
  }
243
 
244
  if ( $this->gallery->shadowSize ) {
245
+ $html .= "#jtg-$this->id$rid .item { box-shadow: " . $this->gallery->shadowColor . " 0px 0px " . $this->gallery->shadowSize . "px; }";
246
  }
247
 
248
  if ( $this->gallery->socialIconColor ) {
249
+ $html .= "#jtg-$this->id$rid .item .jtg-social a { color: " . $this->gallery->socialIconColor . " }";
250
  }
251
 
252
+ $html .= "#jtg-$this->id$rid .item .caption { background-color: " . $this->gallery->captionColor . "; }";
 
 
253
 
254
+ $html .= "#jtg-$this->id$rid .item .figc { color: " . $this->gallery->captionColor . "; font-size: " . $this->gallery->captionFontSize . "px; }";
255
 
256
+ $html .= "#jtg-$this->id$rid .item .figc h2.jtg-title { font-size: " . $this->gallery->titleFontSize . "px; }";
257
 
258
+ $html .= "#jtg-$this->id$rid .item { transform: scale(" . $gallery->loadedScale / 100 . ") translate(" . $gallery->loadedHSlide . 'px,' . $gallery->loadedVSlide . "px) rotate(" . $gallery->loadedRotate . "deg); }";
259
 
260
+ $html .= "#jtg-$this->id$rid .items { width:" . $this->gallery->width . "; height:" . $this->gallery->height . "px; }";
261
 
262
+ $html .= "#jtg-$this->id$rid .items .figc p.description { color:" . $this->gallery->captionColor . "; }";
263
 
264
 
265
  if ( strlen( $this->gallery->style ) ) {
270
 
271
  $id = $this->id;
272
  $html .= "<a name='$id'> </a>";
273
+ $html .= "<div class='modula' id='jtg-$this->id$rid'>";
274
 
275
+ $html .= "<div class='items'>";
276
 
277
  foreach ( array_slice( $this->images, 0, 40 / 2 ) as $image ) {
278
+
279
  $title = in_array( $this->gallery->lightbox, array(
280
  'prettyphoto',
281
  'fancybox',
298
  $imgUrl = $image->imagePath;
299
  $image->alt = isset( $image->alt ) ? $image->alt : '';
300
 
301
+ $html .= "<div class=\"item " . $hasTitle . " effect-" . $hoverEffect->code . "\">";
302
+ $html .= "<a $title='$image->description' " . ( $this->gallery->lightbox == "lightbox2" && empty( $image->link ) ? "data-lightbox='$rel'" : "" ) . " rel='$rel' " . $this->getTarget( $image ) . " class='tile-inner " . ( $this->getLightboxClass( $image ) ) . "' " . $this->getLink( $image ) . "></a>";
303
+ $html .= "<img data-valign='$image->valign' alt='$image->alt' data-halign='$image->halign' class='pic' src='$imgUrl' data-src='$imgUrl' />";
304
+ $html .= "<div class=\"figc\">";
305
+ $html .= "<div class=\"figc-inner\">";
306
+ if ( $this->gallery->hoverEffect != 'none' && ! empty( $image->title ) && 'T' != $this->gallery->hide_title ) {
307
+ $html .= "<h2 class='jtg-title'>" . $image->title . "</h2>";
308
  }
309
 
310
+ if ( ( $this->gallery->hoverEffect != 'none' && ! empty( $image->description ) ) && 'T' != $this->gallery->hide_description ) {
311
+ $html .= "<p class=\"description\">";
312
+ $html .= $image->description;
313
+ $html .= "</p>";
 
 
 
314
  }
315
+ $html .= "</div>";
316
+ $html .= "</div>";
317
+ $html .= "</a>";
318
+ $html .= "</div>";
319
  }
320
 
321
 
322
+ $html .= "</div>";
323
+ $html .= "</div>";
324
 
325
+ $html .= "<script type='text/javascript'>";
326
+ $html .= "jQuery('#jtg-$this->id$rid').modulaGallery({";
327
 
328
  if ( strlen( $this->gallery->script ) ) {
329
+ $html .= "onComplete: function () { " . stripslashes( $this->gallery->script ) . "},";
330
  }
331
 
332
+ $html .= "resizer: '" . plugins_url( 'modula-best-grid-gallery/image.php', '' ) . "',";
333
+ $html .= "margin: " . $this->gallery->margin . ",";
334
  // $html .= "\t\tkeepArea: " . ($this->gallery->keepArea == "T" ? "true" : "false") . ",\n";
335
+ $html .= "enableTwitter: " . ( $this->gallery->enableTwitter == "T" ? "true" : "false" ) . ",";
336
+ $html .= "enableFacebook: " . ( $this->gallery->enableFacebook == "T" ? "true" : "false" ) . ",";
337
+ $html .= "enablePinterest: " . ( $this->gallery->enablePinterest == "T" ? "true" : "false" ) . ",";
338
+ $html .= "enableGplus: " . ( $this->gallery->enableGplus == "T" ? "true" : "false" ) . ",";
339
+ $html .= "randomFactor: " . ( $this->gallery->randomFactor / 100 ) . ",";
340
+ $html .= "});";
 
341
  $html .= "</script>";
342
 
343
 
lightbox/lightbox2/css/lightbox.css ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html.lb-disable-scrolling {
2
+ overflow: hidden;
3
+ /* Position fixed required for iOS. Just putting overflow: hidden; on the body is not enough. */
4
+ position: fixed;
5
+ height: 100vh;
6
+ width: 100vw;
7
+ }
8
+
9
+ .lightboxOverlay {
10
+ position: absolute;
11
+ top: 0;
12
+ left: 0;
13
+ z-index: 9999;
14
+ background-color: black;
15
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
16
+ opacity: 0.8;
17
+ display: none;
18
+ }
19
+
20
+ .lightbox {
21
+ position: absolute;
22
+ left: 0;
23
+ width: 100%;
24
+ z-index: 10000;
25
+ text-align: center;
26
+ line-height: 0;
27
+ font-weight: normal;
28
+ }
29
+
30
+ .lightbox .lb-image {
31
+ display: block;
32
+ height: auto;
33
+ max-width: inherit;
34
+ max-height: none;
35
+ border-radius: 3px;
36
+
37
+ /* Image border */
38
+ border: 4px solid white;
39
+ }
40
+
41
+ .lightbox a img {
42
+ border: none;
43
+ }
44
+
45
+ .lb-outerContainer {
46
+ position: relative;
47
+ *zoom: 1;
48
+ width: 250px;
49
+ height: 250px;
50
+ margin: 0 auto;
51
+ border-radius: 4px;
52
+
53
+ /* Background color behind image.
54
+ This is visible during transitions. */
55
+ background-color: white;
56
+ }
57
+
58
+ .lb-outerContainer:after {
59
+ content: "";
60
+ display: table;
61
+ clear: both;
62
+ }
63
+
64
+ .lb-loader {
65
+ position: absolute;
66
+ top: 43%;
67
+ left: 0;
68
+ height: 25%;
69
+ width: 100%;
70
+ text-align: center;
71
+ line-height: 0;
72
+ }
73
+
74
+ .lb-cancel {
75
+ display: block;
76
+ width: 32px;
77
+ height: 32px;
78
+ margin: 0 auto;
79
+ background: url(../images/loading.gif) no-repeat;
80
+ }
81
+
82
+ .lb-nav {
83
+ position: absolute;
84
+ top: 0;
85
+ left: 0;
86
+ height: 100%;
87
+ width: 100%;
88
+ z-index: 10;
89
+ }
90
+
91
+ .lb-container > .nav {
92
+ left: 0;
93
+ }
94
+
95
+ .lb-nav a {
96
+ outline: none;
97
+ background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
98
+ }
99
+
100
+ .lb-prev, .lb-next {
101
+ height: 100%;
102
+ cursor: pointer;
103
+ display: block;
104
+ }
105
+
106
+ .lb-nav a.lb-prev {
107
+ width: 34%;
108
+ left: 0;
109
+ float: left;
110
+ background: url(../images/prev.png) left 48% no-repeat;
111
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
112
+ opacity: 0;
113
+ -webkit-transition: opacity 0.6s;
114
+ -moz-transition: opacity 0.6s;
115
+ -o-transition: opacity 0.6s;
116
+ transition: opacity 0.6s;
117
+ }
118
+
119
+ .lb-nav a.lb-prev:hover {
120
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
121
+ opacity: 1;
122
+ }
123
+
124
+ .lb-nav a.lb-next {
125
+ width: 64%;
126
+ right: 0;
127
+ float: right;
128
+ background: url(../images/next.png) right 48% no-repeat;
129
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
130
+ opacity: 0;
131
+ -webkit-transition: opacity 0.6s;
132
+ -moz-transition: opacity 0.6s;
133
+ -o-transition: opacity 0.6s;
134
+ transition: opacity 0.6s;
135
+ }
136
+
137
+ .lb-nav a.lb-next:hover {
138
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
139
+ opacity: 1;
140
+ }
141
+
142
+ .lb-dataContainer {
143
+ margin: 0 auto;
144
+ padding-top: 5px;
145
+ *zoom: 1;
146
+ width: 100%;
147
+ border-bottom-left-radius: 4px;
148
+ border-bottom-right-radius: 4px;
149
+ }
150
+
151
+ .lb-dataContainer:after {
152
+ content: "";
153
+ display: table;
154
+ clear: both;
155
+ }
156
+
157
+ .lb-data {
158
+ padding: 0 4px;
159
+ color: #ccc;
160
+ }
161
+
162
+ .lb-data .lb-details {
163
+ width: 85%;
164
+ float: left;
165
+ text-align: left;
166
+ line-height: 1.1em;
167
+ }
168
+
169
+ .lb-data .lb-caption {
170
+ font-size: 13px;
171
+ font-weight: bold;
172
+ line-height: 1em;
173
+ }
174
+
175
+ .lb-data .lb-caption a {
176
+ color: #4ae;
177
+ }
178
+
179
+ .lb-data .lb-number {
180
+ display: block;
181
+ clear: left;
182
+ padding-bottom: 1em;
183
+ font-size: 12px;
184
+ color: #999999;
185
+ }
186
+
187
+ .lb-data .lb-close {
188
+ display: block;
189
+ float: right;
190
+ width: 30px;
191
+ height: 30px;
192
+ background: url(../images/close.png) top right no-repeat;
193
+ text-align: right;
194
+ outline: none;
195
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
196
+ opacity: 0.7;
197
+ -webkit-transition: opacity 0.2s;
198
+ -moz-transition: opacity 0.2s;
199
+ -o-transition: opacity 0.2s;
200
+ transition: opacity 0.2s;
201
+ }
202
+
203
+ .lb-data .lb-close:hover {
204
+ cursor: pointer;
205
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
206
+ opacity: 1;
207
+ }
lightbox/lightbox2/css/lightbox.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .lb-loader,.lightbox{text-align:center;line-height:0}.lb-dataContainer:after,.lb-outerContainer:after{content:"";clear:both}html.lb-disable-scrolling{overflow:hidden;position:fixed;height:100vh;width:100vw}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{position:absolute;left:0;width:100%;z-index:10000;font-weight:400}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-loader,.lb-nav{position:absolute;left:0}.lb-outerContainer:after{display:table}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../images/loading.gif) no-repeat}.lb-nav{top:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../images/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{display:table}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}
lightbox/lightbox2/css/style.css DELETED
@@ -1,203 +0,0 @@
1
- /* line 7, ../sass/lightbox.sass */
2
- body:after {
3
- content: url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png);
4
- display: none;
5
- }
6
-
7
- /* line 11, ../sass/lightbox.sass */
8
- .lightboxOverlay {
9
- position: absolute;
10
- top: 0;
11
- left: 0;
12
- z-index: 9999;
13
- background-color: black;
14
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
15
- opacity: 0.8;
16
- display: none;
17
- }
18
-
19
- /* line 20, ../sass/lightbox.sass */
20
- .lightbox {
21
- position: absolute;
22
- left: 0;
23
- width: 100%;
24
- z-index: 10000;
25
- text-align: center;
26
- line-height: 0;
27
- font-weight: normal;
28
- }
29
- /* line 28, ../sass/lightbox.sass */
30
- .lightbox .lb-image {
31
- display: block;
32
- height: auto;
33
- -webkit-border-radius: 3px;
34
- -moz-border-radius: 3px;
35
- -ms-border-radius: 3px;
36
- -o-border-radius: 3px;
37
- border-radius: 3px;
38
- font-size:10px !important;
39
- }
40
- /* line 32, ../sass/lightbox.sass */
41
- .lightbox a img {
42
- border: none;
43
- }
44
-
45
- /* line 35, ../sass/lightbox.sass */
46
- .lb-outerContainer {
47
- position: relative;
48
- background-color: white;
49
- *zoom: 1;
50
- width: 250px;
51
- height: 250px;
52
- margin: 0 auto;
53
- -webkit-border-radius: 4px;
54
- -moz-border-radius: 4px;
55
- -ms-border-radius: 4px;
56
- -o-border-radius: 4px;
57
- border-radius: 4px;
58
- }
59
- /* line 38, ../../../../.rvm/gems/ruby-1.9.3-p392/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
60
- .lb-outerContainer:after {
61
- content: "";
62
- display: table;
63
- clear: both;
64
- }
65
-
66
- /* line 44, ../sass/lightbox.sass */
67
- .lb-container {
68
- padding: 4px;
69
- }
70
-
71
- /* line 47, ../sass/lightbox.sass */
72
- .lb-loader {
73
- position: absolute;
74
- top: 43%;
75
- left: 0%;
76
- height: 25%;
77
- width: 100%;
78
- text-align: center;
79
- line-height: 0;
80
- }
81
-
82
- /* line 56, ../sass/lightbox.sass */
83
- .lb-cancel {
84
- display: block;
85
- width: 32px;
86
- height: 32px;
87
- margin: 0 auto;
88
- background: url(../img/loading.gif) no-repeat;
89
- }
90
-
91
- /* line 63, ../sass/lightbox.sass */
92
- .lb-nav {
93
- position: absolute;
94
- top: 0;
95
- left: 0;
96
- height: 100%;
97
- width: 100%;
98
- z-index: 10;
99
- }
100
-
101
- /* line 71, ../sass/lightbox.sass */
102
- .lb-container > .nav {
103
- left: 0;
104
- }
105
-
106
- /* line 74, ../sass/lightbox.sass */
107
- .lb-nav a {
108
- outline: none;
109
- }
110
-
111
- /* line 77, ../sass/lightbox.sass */
112
- .lb-prev, .lb-next {
113
- width: 49%;
114
- height: 100%;
115
- cursor: pointer;
116
- /* Trick IE into showing hover */
117
- display: block;
118
- }
119
-
120
- /* line 84, ../sass/lightbox.sass */
121
- .lb-prev {
122
- left: 0;
123
- float: left;
124
- }
125
- /* line 87, ../sass/lightbox.sass */
126
- .lb-prev:hover {
127
- background: url(../img/prev.png) left 48% no-repeat;
128
- }
129
-
130
- /* line 90, ../sass/lightbox.sass */
131
- .lb-next {
132
- right: 0;
133
- float: right;
134
- }
135
- /* line 93, ../sass/lightbox.sass */
136
- .lb-next:hover {
137
- background: url(../img/next.png) right 48% no-repeat;
138
- }
139
-
140
- /* line 96, ../sass/lightbox.sass */
141
- .lb-dataContainer {
142
- margin: 0 auto;
143
- padding-top: 5px;
144
- *zoom: 1;
145
- width: 100%;
146
- -moz-border-radius-bottomleft: 4px;
147
- -webkit-border-bottom-left-radius: 4px;
148
- border-bottom-left-radius: 4px;
149
- -moz-border-radius-bottomright: 4px;
150
- -webkit-border-bottom-right-radius: 4px;
151
- border-bottom-right-radius: 4px;
152
- }
153
- /* line 38, ../../../../.rvm/gems/ruby-1.9.3-p392/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
154
- .lb-dataContainer:after {
155
- content: "";
156
- display: table;
157
- clear: both;
158
- }
159
-
160
- /* line 103, ../sass/lightbox.sass */
161
- .lb-data {
162
- padding: 0 4px;
163
- color: #bbbbbb;
164
- }
165
- /* line 106, ../sass/lightbox.sass */
166
- .lb-data .lb-details {
167
- width: 85%;
168
- float: left;
169
- text-align: left;
170
- line-height: 1.1em;
171
- }
172
- /* line 111, ../sass/lightbox.sass */
173
- .lb-data .lb-caption {
174
- font-size: 13px;
175
- font-weight: bold;
176
- line-height: 1em;
177
- }
178
- /* line 115, ../sass/lightbox.sass */
179
- .lb-data .lb-number {
180
- display: block;
181
- clear: left;
182
- padding-bottom: 1em;
183
- font-size: 12px;
184
- color: #999999;
185
- }
186
- /* line 121, ../sass/lightbox.sass */
187
- .lb-data .lb-close {
188
- display: block;
189
- float: right;
190
- width: 30px;
191
- height: 30px;
192
- background: url(../img/close.png) top right no-repeat;
193
- text-align: right;
194
- outline: none;
195
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
196
- opacity: 0.7;
197
- }
198
- /* line 130, ../sass/lightbox.sass */
199
- .lb-data .lb-close:hover {
200
- cursor: pointer;
201
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
202
- opacity: 1;
203
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lightbox/lightbox2/{img → images}/close.png RENAMED
File without changes
lightbox/lightbox2/{img → images}/loading.gif RENAMED
File without changes
lightbox/lightbox2/{img → images}/next.png RENAMED
File without changes
lightbox/lightbox2/{img → images}/prev.png RENAMED
File without changes
lightbox/lightbox2/js/lightbox.js ADDED
@@ -0,0 +1,519 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Lightbox v2.10.0
3
+ * by Lokesh Dhakar
4
+ *
5
+ * More info:
6
+ * http://lokeshdhakar.com/projects/lightbox2/
7
+ *
8
+ * Copyright 2007, 2018 Lokesh Dhakar
9
+ * Released under the MIT license
10
+ * https://github.com/lokesh/lightbox2/blob/master/LICENSE
11
+ *
12
+ * @preserve
13
+ */
14
+
15
+ // Uses Node, AMD or browser globals to create a module.
16
+ (function (root, factory) {
17
+ if (typeof define === 'function' && define.amd) {
18
+ // AMD. Register as an anonymous module.
19
+ define(['jquery'], factory);
20
+ } else if (typeof exports === 'object') {
21
+ // Node. Does not work with strict CommonJS, but
22
+ // only CommonJS-like environments that support module.exports,
23
+ // like Node.
24
+ module.exports = factory(require('jquery'));
25
+ } else {
26
+ // Browser globals (root is window)
27
+ root.lightbox = factory(root.jQuery);
28
+ }
29
+ }(this, function ($) {
30
+
31
+ function Lightbox(options) {
32
+ this.album = [];
33
+ this.currentImageIndex = void 0;
34
+ this.init();
35
+
36
+ // options
37
+ this.options = $.extend({}, this.constructor.defaults);
38
+ this.option(options);
39
+ }
40
+
41
+ // Descriptions of all options available on the demo site:
42
+ // http://lokeshdhakar.com/projects/lightbox2/index.html#options
43
+ Lightbox.defaults = {
44
+ albumLabel: 'Image %1 of %2',
45
+ alwaysShowNavOnTouchDevices: false,
46
+ fadeDuration: 600,
47
+ fitImagesInViewport: true,
48
+ imageFadeDuration: 600,
49
+ // maxWidth: 800,
50
+ // maxHeight: 600,
51
+ positionFromTop: 50,
52
+ resizeDuration: 700,
53
+ showImageNumberLabel: true,
54
+ wrapAround: false,
55
+ disableScrolling: false,
56
+ /*
57
+ Sanitize Title
58
+ If the caption data is trusted, for example you are hardcoding it in, then leave this to false.
59
+ This will free you to add html tags, such as links, in the caption.
60
+
61
+ If the caption data is user submitted or from some other untrusted source, then set this to true
62
+ to prevent xss and other injection attacks.
63
+ */
64
+ sanitizeTitle: false
65
+ };
66
+
67
+ Lightbox.prototype.option = function(options) {
68
+ $.extend(this.options, options);
69
+ };
70
+
71
+ Lightbox.prototype.imageCountLabel = function(currentImageNum, totalImages) {
72
+ return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages);
73
+ };
74
+
75
+ Lightbox.prototype.init = function() {
76
+ var self = this;
77
+ // Both enable and build methods require the body tag to be in the DOM.
78
+ $(document).ready(function() {
79
+ self.enable();
80
+ self.build();
81
+ });
82
+ };
83
+
84
+ // Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes
85
+ // that contain 'lightbox'. When these are clicked, start lightbox.
86
+ Lightbox.prototype.enable = function() {
87
+ var self = this;
88
+ $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) {
89
+ self.start($(event.currentTarget));
90
+ return false;
91
+ });
92
+ };
93
+
94
+ // Build html for the lightbox and the overlay.
95
+ // Attach event handlers to the new DOM elements. click click click
96
+ Lightbox.prototype.build = function() {
97
+ if ($('#lightbox').length > 0) {
98
+ return;
99
+ }
100
+
101
+ var self = this;
102
+ $('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body'));
103
+
104
+ // Cache jQuery objects
105
+ this.$lightbox = $('#lightbox');
106
+ this.$overlay = $('#lightboxOverlay');
107
+ this.$outerContainer = this.$lightbox.find('.lb-outerContainer');
108
+ this.$container = this.$lightbox.find('.lb-container');
109
+ this.$image = this.$lightbox.find('.lb-image');
110
+ this.$nav = this.$lightbox.find('.lb-nav');
111
+
112
+ // Store css values for future lookup
113
+ this.containerPadding = {
114
+ top: parseInt(this.$container.css('padding-top'), 10),
115
+ right: parseInt(this.$container.css('padding-right'), 10),
116
+ bottom: parseInt(this.$container.css('padding-bottom'), 10),
117
+ left: parseInt(this.$container.css('padding-left'), 10)
118
+ };
119
+
120
+ this.imageBorderWidth = {
121
+ top: parseInt(this.$image.css('border-top-width'), 10),
122
+ right: parseInt(this.$image.css('border-right-width'), 10),
123
+ bottom: parseInt(this.$image.css('border-bottom-width'), 10),
124
+ left: parseInt(this.$image.css('border-left-width'), 10)
125
+ };
126
+
127
+ // Attach event handlers to the newly minted DOM elements
128
+ this.$overlay.hide().on('click', function() {
129
+ self.end();
130
+ return false;
131
+ });
132
+
133
+ this.$lightbox.hide().on('click', function(event) {
134
+ if ($(event.target).attr('id') === 'lightbox') {
135
+ self.end();
136
+ }
137
+ return false;
138
+ });
139
+
140
+ this.$outerContainer.on('click', function(event) {
141
+ if ($(event.target).attr('id') === 'lightbox') {
142
+ self.end();
143
+ }
144
+ return false;
145
+ });
146
+
147
+ this.$lightbox.find('.lb-prev').on('click', function() {
148
+ if (self.currentImageIndex === 0) {
149
+ self.changeImage(self.album.length - 1);
150
+ } else {
151
+ self.changeImage(self.currentImageIndex - 1);
152
+ }
153
+ return false;
154
+ });
155
+
156
+ this.$lightbox.find('.lb-next').on('click', function() {
157
+ if (self.currentImageIndex === self.album.length - 1) {
158
+ self.changeImage(0);
159
+ } else {
160
+ self.changeImage(self.currentImageIndex + 1);
161
+ }
162
+ return false;
163
+ });
164
+
165
+ /*
166
+ Show context menu for image on right-click
167
+
168
+ There is a div containing the navigation that spans the entire image and lives above of it. If
169
+ you right-click, you are right clicking this div and not the image. This prevents users from
170
+ saving the image or using other context menu actions with the image.
171
+
172
+ To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we
173
+ set pointer-events to none on the nav div. This is so that the upcoming right-click event on
174
+ the next mouseup will bubble down to the image. Once the right-click/contextmenu event occurs
175
+ we set the pointer events back to auto for the nav div so it can capture hover and left-click
176
+ events as usual.
177
+ */
178
+ this.$nav.on('mousedown', function(event) {
179
+ if (event.which === 3) {
180
+ self.$nav.css('pointer-events', 'none');
181
+
182
+ self.$lightbox.one('contextmenu', function() {
183
+ setTimeout(function() {
184
+ this.$nav.css('pointer-events', 'auto');
185
+ }.bind(self), 0);
186
+ });
187
+ }
188
+ });
189
+
190
+
191
+ this.$lightbox.find('.lb-loader, .lb-close').on('click', function() {
192
+ self.end();
193
+ return false;
194
+ });
195
+ };
196
+
197
+ // Show overlay and lightbox. If the image is part of a set, add siblings to album array.
198
+ Lightbox.prototype.start = function($link) {
199
+ var self = this;
200
+ var $window = $(window);
201
+
202
+ $window.on('resize', $.proxy(this.sizeOverlay, this));
203
+
204
+ $('select, object, embed').css({
205
+ visibility: 'hidden'
206
+ });
207
+
208
+ this.sizeOverlay();
209
+
210
+ this.album = [];
211
+ var imageNumber = 0;
212
+
213
+ function addToAlbum($link) {
214
+ self.album.push({
215
+ alt: $link.attr('data-alt'),
216
+ link: $link.attr('href'),
217
+ title: $link.attr('data-title') || $link.attr('title')
218
+ });
219
+ }
220
+
221
+ // Support both data-lightbox attribute and rel attribute implementations
222
+ var dataLightboxValue = $link.attr('data-lightbox');
223
+ var $links;
224
+
225
+ if (dataLightboxValue) {
226
+ $links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]');
227
+ for (var i = 0; i < $links.length; i = ++i) {
228
+ addToAlbum($($links[i]));
229
+ if ($links[i] === $link[0]) {
230
+ imageNumber = i;
231
+ }
232
+ }
233
+ } else {
234
+ if ($link.attr('rel') === 'lightbox') {
235
+ // If image is not part of a set
236
+ addToAlbum($link);
237
+ } else {
238
+ // If image is part of a set
239
+ $links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]');
240
+ for (var j = 0; j < $links.length; j = ++j) {
241
+ addToAlbum($($links[j]));
242
+ if ($links[j] === $link[0]) {
243
+ imageNumber = j;
244
+ }
245
+ }
246
+ }
247
+ }
248
+
249
+ // Position Lightbox
250
+ var top = $window.scrollTop() + this.options.positionFromTop;
251
+ var left = $window.scrollLeft();
252
+ this.$lightbox.css({
253
+ top: top + 'px',
254
+ left: left + 'px'
255
+ }).fadeIn(this.options.fadeDuration);
256
+
257
+ // Disable scrolling of the page while open
258
+ if (this.options.disableScrolling) {
259
+ $('html').addClass('lb-disable-scrolling');
260
+ }
261
+
262
+ this.changeImage(imageNumber);
263
+ };
264
+
265
+ // Hide most UI elements in preparation for the animated resizing of the lightbox.
266
+ Lightbox.prototype.changeImage = function(imageNumber) {
267
+ var self = this;
268
+
269
+ this.disableKeyboardNav();
270
+ var $image = this.$lightbox.find('.lb-image');
271
+
272
+ this.$overlay.fadeIn(this.options.fadeDuration);
273
+
274
+ $('.lb-loader').fadeIn('slow');
275
+ this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
276
+
277
+ this.$outerContainer.addClass('animating');
278
+
279
+ // When image to show is preloaded, we send the width and height to sizeContainer()
280
+ var preloader = new Image();
281
+ preloader.onload = function() {
282
+ var $preloader;
283
+ var imageHeight;
284
+ var imageWidth;
285
+ var maxImageHeight;
286
+ var maxImageWidth;
287
+ var windowHeight;
288
+ var windowWidth;
289
+
290
+ $image.attr({
291
+ 'alt': self.album[imageNumber].alt,
292
+ 'src': self.album[imageNumber].link
293
+ });
294
+
295
+ $preloader = $(preloader);
296
+
297
+ $image.width(preloader.width);
298
+ $image.height(preloader.height);
299
+
300
+ if (self.options.fitImagesInViewport) {
301
+ // Fit image inside the viewport.
302
+ // Take into account the border around the image and an additional 10px gutter on each side.
303
+
304
+ windowWidth = $(window).width();
305
+ windowHeight = $(window).height();
306
+ maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20;
307
+ maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - 120;
308
+
309
+ // Check if image size is larger then maxWidth|maxHeight in settings
310
+ if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) {
311
+ maxImageWidth = self.options.maxWidth;
312
+ }
313
+ if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) {
314
+ maxImageHeight = self.options.maxHeight;
315
+ }
316
+
317
+ // Is the current image's width or height is greater than the maxImageWidth or maxImageHeight
318
+ // option than we need to size down while maintaining the aspect ratio.
319
+ if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) {
320
+ if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) {
321
+ imageWidth = maxImageWidth;
322
+ imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10);
323
+ $image.width(imageWidth);
324
+ $image.height(imageHeight);
325
+ } else {
326
+ imageHeight = maxImageHeight;
327
+ imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10);
328
+ $image.width(imageWidth);
329
+ $image.height(imageHeight);
330
+ }
331
+ }
332
+ }
333
+ self.sizeContainer($image.width(), $image.height());
334
+ };
335
+
336
+ preloader.src = this.album[imageNumber].link;
337
+ this.currentImageIndex = imageNumber;
338
+ };
339
+
340
+ // Stretch overlay to fit the viewport
341
+ Lightbox.prototype.sizeOverlay = function() {
342
+ this.$overlay
343
+ .width($(document).width())
344
+ .height($(document).height());
345
+ };
346
+
347
+ // Animate the size of the lightbox to fit the image we are showing
348
+ Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
349
+ var self = this;
350
+
351
+ var oldWidth = this.$outerContainer.outerWidth();
352
+ var oldHeight = this.$outerContainer.outerHeight();
353
+ var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right;
354
+ var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom;
355
+
356
+ function postResize() {
357
+ self.$lightbox.find('.lb-dataContainer').width(newWidth);
358
+ self.$lightbox.find('.lb-prevLink').height(newHeight);
359
+ self.$lightbox.find('.lb-nextLink').height(newHeight);
360
+ self.showImage();
361
+ }
362
+
363
+ if (oldWidth !== newWidth || oldHeight !== newHeight) {
364
+ this.$outerContainer.animate({
365
+ width: newWidth,
366
+ height: newHeight
367
+ }, this.options.resizeDuration, 'swing', function() {
368
+ postResize();
369
+ });
370
+ } else {
371
+ postResize();
372
+ }
373
+ };
374
+
375
+ // Display the image and its details and begin preload neighboring images.
376
+ Lightbox.prototype.showImage = function() {
377
+ this.$lightbox.find('.lb-loader').stop(true).hide();
378
+ this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration);
379
+
380
+ this.updateNav();
381
+ this.updateDetails();
382
+ this.preloadNeighboringImages();
383
+ this.enableKeyboardNav();
384
+ };
385
+
386
+ // Display previous and next navigation if appropriate.
387
+ Lightbox.prototype.updateNav = function() {
388
+ // Check to see if the browser supports touch events. If so, we take the conservative approach
389
+ // and assume that mouse hover events are not supported and always show prev/next navigation
390
+ // arrows in image sets.
391
+ var alwaysShowNav = false;
392
+ try {
393
+ document.createEvent('TouchEvent');
394
+ alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false;
395
+ } catch (e) {}
396
+
397
+ this.$lightbox.find('.lb-nav').show();
398
+
399
+ if (this.album.length > 1) {
400
+ if (this.options.wrapAround) {
401
+ if (alwaysShowNav) {
402
+ this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1');
403
+ }
404
+ this.$lightbox.find('.lb-prev, .lb-next').show();
405
+ } else {
406
+ if (this.currentImageIndex > 0) {
407
+ this.$lightbox.find('.lb-prev').show();
408
+ if (alwaysShowNav) {
409
+ this.$lightbox.find('.lb-prev').css('opacity', '1');
410
+ }
411
+ }
412
+ if (this.currentImageIndex < this.album.length - 1) {
413
+ this.$lightbox.find('.lb-next').show();
414
+ if (alwaysShowNav) {
415
+ this.$lightbox.find('.lb-next').css('opacity', '1');
416
+ }
417
+ }
418
+ }
419
+ }
420
+ };
421
+
422
+ // Display caption, image number, and closing button.
423
+ Lightbox.prototype.updateDetails = function() {
424
+ var self = this;
425
+
426
+ // Enable anchor clicks in the injected caption html.
427
+ // Thanks Nate Wright for the fix. @https://github.com/NateWr
428
+ if (typeof this.album[this.currentImageIndex].title !== 'undefined' &&
429
+ this.album[this.currentImageIndex].title !== '') {
430
+ var $caption = this.$lightbox.find('.lb-caption');
431
+ if (this.options.sanitizeTitle) {
432
+ $caption.text(this.album[this.currentImageIndex].title);
433
+ } else {
434
+ $caption.html(this.album[this.currentImageIndex].title);
435
+ }
436
+ $caption.fadeIn('fast')
437
+ .find('a').on('click', function(event) {
438
+ if ($(this).attr('target') !== undefined) {
439
+ window.open($(this).attr('href'), $(this).attr('target'));
440
+ } else {
441
+ location.href = $(this).attr('href');
442
+ }
443
+ });
444
+ }
445
+
446
+ if (this.album.length > 1 && this.options.showImageNumberLabel) {
447
+ var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length);
448
+ this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast');
449
+ } else {
450
+ this.$lightbox.find('.lb-number').hide();
451
+ }
452
+
453
+ this.$outerContainer.removeClass('animating');
454
+
455
+ this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() {
456
+ return self.sizeOverlay();
457
+ });
458
+ };
459
+
460
+ // Preload previous and next images in set.
461
+ Lightbox.prototype.preloadNeighboringImages = function() {
462
+ if (this.album.length > this.currentImageIndex + 1) {
463
+ var preloadNext = new Image();
464
+ preloadNext.src = this.album[this.currentImageIndex + 1].link;
465
+ }
466
+ if (this.currentImageIndex > 0) {
467
+ var preloadPrev = new Image();
468
+ preloadPrev.src = this.album[this.currentImageIndex - 1].link;
469
+ }
470
+ };
471
+
472
+ Lightbox.prototype.enableKeyboardNav = function() {
473
+ $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this));
474
+ };
475
+
476
+ Lightbox.prototype.disableKeyboardNav = function() {
477
+ $(document).off('.keyboard');
478
+ };
479
+
480
+ Lightbox.prototype.keyboardAction = function(event) {
481
+ var KEYCODE_ESC = 27;
482
+ var KEYCODE_LEFTARROW = 37;
483
+ var KEYCODE_RIGHTARROW = 39;
484
+
485
+ var keycode = event.keyCode;
486
+ var key = String.fromCharCode(keycode).toLowerCase();
487
+ if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) {
488
+ this.end();
489
+ } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) {
490
+ if (this.currentImageIndex !== 0) {
491
+ this.changeImage(this.currentImageIndex - 1);
492
+ } else if (this.options.wrapAround && this.album.length > 1) {
493
+ this.changeImage(this.album.length - 1);
494
+ }
495
+ } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) {
496
+ if (this.currentImageIndex !== this.album.length - 1) {
497
+ this.changeImage(this.currentImageIndex + 1);
498
+ } else if (this.options.wrapAround && this.album.length > 1) {
499
+ this.changeImage(0);
500
+ }
501
+ }
502
+ };
503
+
504
+ // Closing time. :-(
505
+ Lightbox.prototype.end = function() {
506
+ this.disableKeyboardNav();
507
+ $(window).off('resize', this.sizeOverlay);
508
+ this.$lightbox.fadeOut(this.options.fadeDuration);
509
+ this.$overlay.fadeOut(this.options.fadeDuration);
510
+ $('select, object, embed').css({
511
+ visibility: 'visible'
512
+ });
513
+ if (this.options.disableScrolling) {
514
+ $('html').removeClass('lb-disable-scrolling');
515
+ }
516
+ };
517
+
518
+ return new Lightbox();
519
+ }));
lightbox/lightbox2/js/lightbox.min.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Lightbox v2.10.0
3
+ * by Lokesh Dhakar
4
+ *
5
+ * More info:
6
+ * http://lokeshdhakar.com/projects/lightbox2/
7
+ *
8
+ * Copyright 2007, 2018 Lokesh Dhakar
9
+ * Released under the MIT license
10
+ * https://github.com/lokesh/lightbox2/blob/master/LICENSE
11
+ *
12
+ * @preserve
13
+ */
14
+ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){if(!(a("#lightbox").length>0)){var b=this;a('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)},this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})}},b.prototype.start=function(b){function c(a){d.album.push({alt:a.attr("data-alt"),link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&a("html").addClass("lb-disable-scrolling"),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var f,g,h,i,j,k;d.attr({alt:c.album[b].alt,src:c.album[b].link}),a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(k=a(window).width(),j=a(window).height(),i=k-c.containerPadding.left-c.containerPadding.right-c.imageBorderWidth.left-c.imageBorderWidth.right-20,h=j-c.containerPadding.top-c.containerPadding.bottom-c.imageBorderWidth.top-c.imageBorderWidth.bottom-120,c.options.maxWidth&&c.options.maxWidth<i&&(i=c.options.maxWidth),c.options.maxHeight&&c.options.maxHeight<i&&(h=c.options.maxHeight),(e.width>i||e.height>h)&&(e.width/i>e.height/h?(g=i,f=parseInt(e.height/(e.width/g),10),d.width(g),d.height(f)):(f=h,g=parseInt(e.width/(e.height/f),10),d.width(g),d.height(f)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerPadding.left+this.containerPadding.right+this.imageBorderWidth.left+this.imageBorderWidth.right,h=b+this.containerPadding.top+this.containerPadding.bottom+this.imageBorderWidth.top+this.imageBorderWidth.bottom;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn(this.options.imageFadeDuration),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=!!this.options.alwaysShowNavOnTouchDevices}catch(a){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),a&&this.$lightbox.find(".lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;if(void 0!==this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title){var c=this.$lightbox.find(".lb-caption");this.options.sanitizeTitle?c.text(this.album[this.currentImageIndex].title):c.html(this.album[this.currentImageIndex].title),c.fadeIn("fast").find("a").on("click",function(b){void 0!==a(this).attr("target")?window.open(a(this).attr("href"),a(this).attr("target")):location.href=a(this).attr("href")})}if(this.album.length>1&&this.options.showImageNumberLabel){var d=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(d).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){(new Image).src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){(new Image).src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=a.keyCode,c=String.fromCharCode(b).toLowerCase();27===b||c.match(/x|o|c/)?this.end():"p"===c||37===b?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):"n"!==c&&39!==b||(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("html").removeClass("lb-disable-scrolling")},new b});
15
+ //# sourceMappingURL=lightbox.min.map
lightbox/lightbox2/js/lightbox.min.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["../../src/js/lightbox.js"],"names":["root","factory","define","amd","exports","module","require","lightbox","jQuery","this","$","Lightbox","options","album","currentImageIndex","init","extend","constructor","defaults","option","albumLabel","alwaysShowNavOnTouchDevices","fadeDuration","fitImagesInViewport","imageFadeDuration","positionFromTop","resizeDuration","showImageNumberLabel","wrapAround","disableScrolling","sanitizeTitle","prototype","imageCountLabel","currentImageNum","totalImages","replace","self","document","ready","enable","build","on","event","start","currentTarget","length","appendTo","$lightbox","$overlay","$outerContainer","find","$container","$image","$nav","containerPadding","top","parseInt","css","right","bottom","left","imageBorderWidth","hide","end","target","attr","changeImage","which","one","setTimeout","bind","$link","addToAlbum","push","alt","link","title","$window","window","proxy","sizeOverlay","visibility","$links","imageNumber","dataLightboxValue","prop","i","j","scrollTop","scrollLeft","fadeIn","addClass","disableKeyboardNav","preloader","Image","onload","imageHeight","imageWidth","maxImageHeight","maxImageWidth","windowHeight","windowWidth","src","width","height","maxWidth","maxHeight","sizeContainer","postResize","newWidth","newHeight","showImage","oldWidth","outerWidth","oldHeight","outerHeight","animate","stop","updateNav","updateDetails","preloadNeighboringImages","enableKeyboardNav","alwaysShowNav","createEvent","e","show","$caption","text","html","undefined","open","location","href","labelText","removeClass","keyboardAction","off","keycode","keyCode","key","String","fromCharCode","toLowerCase","match","fadeOut"],"mappings":";;;;;;;;;;;;;CAeC,SAAUA,EAAMC,GACS,kBAAXC,SAAyBA,OAAOC,IAEvCD,QAAQ,UAAWD,GACO,gBAAZG,SAIdC,OAAOD,QAAUH,EAAQK,QAAQ,WAGjCN,EAAKO,SAAWN,EAAQD,EAAKQ,SAEnCC,KAAM,SAAUC,GAEhB,QAASC,GAASC,GAChBH,KAAKI,SACLJ,KAAKK,sBAAoB,GACzBL,KAAKM,OAGLN,KAAKG,QAAUF,EAAEM,UAAWP,KAAKQ,YAAYC,UAC7CT,KAAKU,OAAOP,GAged,MA3dAD,GAASO,UACPE,WAAY,iBACZC,6BAA6B,EAC7BC,aAAc,IACdC,qBAAqB,EACrBC,kBAAmB,IAGnBC,gBAAiB,GACjBC,eAAgB,IAChBC,sBAAsB,EACtBC,YAAY,EACZC,kBAAkB,EASlBC,eAAe,GAGjBnB,EAASoB,UAAUZ,OAAS,SAASP,GACnCF,EAAEM,OAAOP,KAAKG,QAASA,IAGzBD,EAASoB,UAAUC,gBAAkB,SAASC,EAAiBC,GAC7D,MAAOzB,MAAKG,QAAQQ,WAAWe,QAAQ,MAAOF,GAAiBE,QAAQ,MAAOD,IAGhFvB,EAASoB,UAAUhB,KAAO,WACxB,GAAIqB,GAAO3B,IAEXC,GAAE2B,UAAUC,MAAM,WAChBF,EAAKG,SACLH,EAAKI,WAMT7B,EAASoB,UAAUQ,OAAS,WAC1B,GAAIH,GAAO3B,IACXC,GAAE,QAAQ+B,GAAG,QAAS,+EAAgF,SAASC,GAE7G,MADAN,GAAKO,MAAMjC,EAAEgC,EAAME,iBACZ,KAMXjC,EAASoB,UAAUS,MAAQ,WACzB,KAAI9B,EAAE,aAAamC,OAAS,GAA5B,CAIA,GAAIT,GAAO3B,IACXC,GAAE,qoBAAqoBoC,SAASpC,EAAE,SAGlpBD,KAAKsC,UAAkBrC,EAAE,aACzBD,KAAKuC,SAAkBtC,EAAE,oBACzBD,KAAKwC,gBAAkBxC,KAAKsC,UAAUG,KAAK,sBAC3CzC,KAAK0C,WAAkB1C,KAAKsC,UAAUG,KAAK,iBAC3CzC,KAAK2C,OAAkB3C,KAAKsC,UAAUG,KAAK,aAC3CzC,KAAK4C,KAAkB5C,KAAKsC,UAAUG,KAAK,WAG3CzC,KAAK6C,kBACHC,IAAKC,SAAS/C,KAAK0C,WAAWM,IAAI,eAAgB,IAClDC,MAAOF,SAAS/C,KAAK0C,WAAWM,IAAI,iBAAkB,IACtDE,OAAQH,SAAS/C,KAAK0C,WAAWM,IAAI,kBAAmB,IACxDG,KAAMJ,SAAS/C,KAAK0C,WAAWM,IAAI,gBAAiB,KAGtDhD,KAAKoD,kBACHN,IAAKC,SAAS/C,KAAK2C,OAAOK,IAAI,oBAAqB,IACnDC,MAAOF,SAAS/C,KAAK2C,OAAOK,IAAI,sBAAuB,IACvDE,OAAQH,SAAS/C,KAAK2C,OAAOK,IAAI,uBAAwB,IACzDG,KAAMJ,SAAS/C,KAAK2C,OAAOK,IAAI,qBAAsB,KAIvDhD,KAAKuC,SAASc,OAAOrB,GAAG,QAAS,WAE/B,MADAL,GAAK2B,OACE,IAGTtD,KAAKsC,UAAUe,OAAOrB,GAAG,QAAS,SAASC,GAIzC,MAHmC,aAA/BhC,EAAEgC,EAAMsB,QAAQC,KAAK,OACvB7B,EAAK2B,OAEA,IAGTtD,KAAKwC,gBAAgBR,GAAG,QAAS,SAASC,GAIxC,MAHmC,aAA/BhC,EAAEgC,EAAMsB,QAAQC,KAAK,OACvB7B,EAAK2B,OAEA,IAGTtD,KAAKsC,UAAUG,KAAK,YAAYT,GAAG,QAAS,WAM1C,MAL+B,KAA3BL,EAAKtB,kBACPsB,EAAK8B,YAAY9B,EAAKvB,MAAMgC,OAAS,GAErCT,EAAK8B,YAAY9B,EAAKtB,kBAAoB,IAErC,IAGTL,KAAKsC,UAAUG,KAAK,YAAYT,GAAG,QAAS,WAM1C,MALIL,GAAKtB,oBAAsBsB,EAAKvB,MAAMgC,OAAS,EACjDT,EAAK8B,YAAY,GAEjB9B,EAAK8B,YAAY9B,EAAKtB,kBAAoB,IAErC,IAgBTL,KAAK4C,KAAKZ,GAAG,YAAa,SAASC,GACb,IAAhBA,EAAMyB,QACR/B,EAAKiB,KAAKI,IAAI,iBAAkB,QAEhCrB,EAAKW,UAAUqB,IAAI,cAAe,WAChCC,WAAW,WACP5D,KAAK4C,KAAKI,IAAI,iBAAkB,SAClCa,KAAKlC,GAAO,QAMpB3B,KAAKsC,UAAUG,KAAK,yBAAyBT,GAAG,QAAS,WAEvD,MADAL,GAAK2B,OACE,MAKXpD,EAASoB,UAAUY,MAAQ,SAAS4B,GAelC,QAASC,GAAWD,GAClBnC,EAAKvB,MAAM4D,MACTC,IAAKH,EAAMN,KAAK,YAChBU,KAAMJ,EAAMN,KAAK,QACjBW,MAAOL,EAAMN,KAAK,eAAiBM,EAAMN,KAAK,WAlBlD,GAAI7B,GAAU3B,KACVoE,EAAUnE,EAAEoE,OAEhBD,GAAQpC,GAAG,SAAU/B,EAAEqE,MAAMtE,KAAKuE,YAAavE,OAE/CC,EAAE,yBAAyB+C,KACzBwB,WAAY,WAGdxE,KAAKuE,cAELvE,KAAKI,QACL,IAYIqE,GAZAC,EAAc,EAWdC,EAAoBb,EAAMN,KAAK,gBAGnC,IAAImB,EAAmB,CACrBF,EAASxE,EAAE6D,EAAMc,KAAK,WAAa,mBAAqBD,EAAoB,KAC5E,KAAK,GAAIE,GAAI,EAAGA,EAAIJ,EAAOrC,OAAQyC,IAAMA,EACvCd,EAAW9D,EAAEwE,EAAOI,KAChBJ,EAAOI,KAAOf,EAAM,KACtBY,EAAcG,OAIlB,IAA0B,aAAtBf,EAAMN,KAAK,OAEbO,EAAWD,OACN,CAELW,EAASxE,EAAE6D,EAAMc,KAAK,WAAa,SAAWd,EAAMN,KAAK,OAAS,KAClE,KAAK,GAAIsB,GAAI,EAAGA,EAAIL,EAAOrC,OAAQ0C,IAAMA,EACvCf,EAAW9D,EAAEwE,EAAOK,KAChBL,EAAOK,KAAOhB,EAAM,KACtBY,EAAcI,GAOtB,GAAIhC,GAAOsB,EAAQW,YAAc/E,KAAKG,QAAQa,gBAC1CmC,EAAOiB,EAAQY,YACnBhF,MAAKsC,UAAUU,KACbF,IAAKA,EAAM,KACXK,KAAMA,EAAO,OACZ8B,OAAOjF,KAAKG,QAAQU,cAGnBb,KAAKG,QAAQiB,kBACfnB,EAAE,QAAQiF,SAAS,wBAGrBlF,KAAKyD,YAAYiB,IAInBxE,EAASoB,UAAUmC,YAAc,SAASiB,GACxC,GAAI/C,GAAO3B,IAEXA,MAAKmF,oBACL,IAAIxC,GAAS3C,KAAKsC,UAAUG,KAAK,YAEjCzC,MAAKuC,SAAS0C,OAAOjF,KAAKG,QAAQU,cAElCZ,EAAE,cAAcgF,OAAO,QACvBjF,KAAKsC,UAAUG,KAAK,uFAAuFY,OAE3GrD,KAAKwC,gBAAgB0C,SAAS,YAG9B,IAAIE,GAAY,GAAIC,MACpBD,GAAUE,OAAS,WACjB,GACIC,GACAC,EACAC,EACAC,EACAC,EACAC,CAEJjD,GAAOa,MACLS,IAAOtC,EAAKvB,MAAMsE,GAAaT,IAC/B4B,IAAOlE,EAAKvB,MAAMsE,GAAaR,OAGpBjE,EAAEmF,GAEfzC,EAAOmD,MAAMV,EAAUU,OACvBnD,EAAOoD,OAAOX,EAAUW,QAEpBpE,EAAKxB,QAAQW,sBAIf8E,EAAiB3F,EAAEoE,QAAQyB,QAC3BH,EAAiB1F,EAAEoE,QAAQ0B,SAC3BL,EAAiBE,EAAcjE,EAAKkB,iBAAiBM,KAAOxB,EAAKkB,iBAAiBI,MAAQtB,EAAKyB,iBAAiBD,KAAOxB,EAAKyB,iBAAiBH,MAAQ,GACrJwC,EAAiBE,EAAehE,EAAKkB,iBAAiBC,IAAMnB,EAAKkB,iBAAiBK,OAASvB,EAAKyB,iBAAiBN,IAAMnB,EAAKyB,iBAAiBF,OAAS,IAGlJvB,EAAKxB,QAAQ6F,UAAYrE,EAAKxB,QAAQ6F,SAAWN,IACnDA,EAAgB/D,EAAKxB,QAAQ6F,UAE3BrE,EAAKxB,QAAQ8F,WAAatE,EAAKxB,QAAQ8F,UAAYP,IACrDD,EAAiB9D,EAAKxB,QAAQ8F,YAK3Bb,EAAUU,MAAQJ,GAAmBN,EAAUW,OAASN,KACtDL,EAAUU,MAAQJ,EAAkBN,EAAUW,OAASN,GAC1DD,EAAcE,EACdH,EAAcxC,SAASqC,EAAUW,QAAUX,EAAUU,MAAQN,GAAa,IAC1E7C,EAAOmD,MAAMN,GACb7C,EAAOoD,OAAOR,KAEdA,EAAcE,EACdD,EAAazC,SAASqC,EAAUU,OAASV,EAAUW,OAASR,GAAc,IAC1E5C,EAAOmD,MAAMN,GACb7C,EAAOoD,OAAOR,MAIpB5D,EAAKuE,cAAcvD,EAAOmD,QAASnD,EAAOoD,WAG5CX,EAAUS,IAAe7F,KAAKI,MAAMsE,GAAaR,KACjDlE,KAAKK,kBAAoBqE,GAI3BxE,EAASoB,UAAUiD,YAAc,WAC/BvE,KAAKuC,SACFuD,MAAM7F,EAAE2B,UAAUkE,SAClBC,OAAO9F,EAAE2B,UAAUmE,WAIxB7F,EAASoB,UAAU4E,cAAgB,SAASV,EAAYD,GAQtD,QAASY,KACPxE,EAAKW,UAAUG,KAAK,qBAAqBqD,MAAMM,GAC/CzE,EAAKW,UAAUG,KAAK,gBAAgBsD,OAAOM,GAC3C1E,EAAKW,UAAUG,KAAK,gBAAgBsD,OAAOM,GAC3C1E,EAAK2E,YAXP,GAAI3E,GAAO3B,KAEPuG,EAAYvG,KAAKwC,gBAAgBgE,aACjCC,EAAYzG,KAAKwC,gBAAgBkE,cACjCN,EAAYZ,EAAaxF,KAAK6C,iBAAiBM,KAAOnD,KAAK6C,iBAAiBI,MAAQjD,KAAKoD,iBAAiBD,KAAOnD,KAAKoD,iBAAiBH,MACvIoD,EAAYd,EAAcvF,KAAK6C,iBAAiBC,IAAM9C,KAAK6C,iBAAiBK,OAASlD,KAAKoD,iBAAiBN,IAAM9C,KAAKoD,iBAAiBF,MASvIqD,KAAaH,GAAYK,IAAcJ,EACzCrG,KAAKwC,gBAAgBmE,SACnBb,MAAOM,EACPL,OAAQM,GACPrG,KAAKG,QAAQc,eAAgB,QAAS,WACvCkF,MAGFA,KAKJjG,EAASoB,UAAUgF,UAAY,WAC7BtG,KAAKsC,UAAUG,KAAK,cAAcmE,MAAK,GAAMvD,OAC7CrD,KAAKsC,UAAUG,KAAK,aAAawC,OAAOjF,KAAKG,QAAQY,mBAErDf,KAAK6G,YACL7G,KAAK8G,gBACL9G,KAAK+G,2BACL/G,KAAKgH,qBAIP9G,EAASoB,UAAUuF,UAAY,WAI7B,GAAII,IAAgB,CACpB,KACErF,SAASsF,YAAY,cACrBD,IAAiBjH,KAAKG,QAAmC,4BACzD,MAAOgH,IAETnH,KAAKsC,UAAUG,KAAK,WAAW2E,OAE3BpH,KAAKI,MAAMgC,OAAS,IAClBpC,KAAKG,QAAQgB,YACX8F,GACFjH,KAAKsC,UAAUG,KAAK,sBAAsBO,IAAI,UAAW,KAE3DhD,KAAKsC,UAAUG,KAAK,sBAAsB2E,SAEtCpH,KAAKK,kBAAoB,IAC3BL,KAAKsC,UAAUG,KAAK,YAAY2E,OAC5BH,GACFjH,KAAKsC,UAAUG,KAAK,YAAYO,IAAI,UAAW,MAG/ChD,KAAKK,kBAAoBL,KAAKI,MAAMgC,OAAS,IAC/CpC,KAAKsC,UAAUG,KAAK,YAAY2E,OAC5BH,GACFjH,KAAKsC,UAAUG,KAAK,YAAYO,IAAI,UAAW,SAQzD9C,EAASoB,UAAUwF,cAAgB,WACjC,GAAInF,GAAO3B,IAIX,QAAwD,KAA7CA,KAAKI,MAAMJ,KAAKK,mBAAmB8D,OACC,KAA7CnE,KAAKI,MAAMJ,KAAKK,mBAAmB8D,MAAc,CACjD,GAAIkD,GAAWrH,KAAKsC,UAAUG,KAAK,cAC/BzC,MAAKG,QAAQkB,cACfgG,EAASC,KAAKtH,KAAKI,MAAMJ,KAAKK,mBAAmB8D,OAEjDkD,EAASE,KAAKvH,KAAKI,MAAMJ,KAAKK,mBAAmB8D,OAEnDkD,EAASpC,OAAO,QACbxC,KAAK,KAAKT,GAAG,QAAS,SAASC,OACCuF,KAA3BvH,EAAED,MAAMwD,KAAK,UACfa,OAAOoD,KAAKxH,EAAED,MAAMwD,KAAK,QAASvD,EAAED,MAAMwD,KAAK,WAE/CkE,SAASC,KAAO1H,EAAED,MAAMwD,KAAK,UAKrC,GAAIxD,KAAKI,MAAMgC,OAAS,GAAKpC,KAAKG,QAAQe,qBAAsB,CAC9D,GAAI0G,GAAY5H,KAAKuB,gBAAgBvB,KAAKK,kBAAoB,EAAGL,KAAKI,MAAMgC,OAC5EpC,MAAKsC,UAAUG,KAAK,cAAc6E,KAAKM,GAAW3C,OAAO,YAEzDjF,MAAKsC,UAAUG,KAAK,cAAcY,MAGpCrD,MAAKwC,gBAAgBqF,YAAY,aAEjC7H,KAAKsC,UAAUG,KAAK,qBAAqBwC,OAAOjF,KAAKG,QAAQc,eAAgB,WAC3E,MAAOU,GAAK4C,iBAKhBrE,EAASoB,UAAUyF,yBAA2B,WAC5C,GAAI/G,KAAKI,MAAMgC,OAASpC,KAAKK,kBAAoB,EAAG,EAChC,GAAIgF,QACVQ,IAAM7F,KAAKI,MAAMJ,KAAKK,kBAAoB,GAAG6D,KAE3D,GAAIlE,KAAKK,kBAAoB,EAAG,EACZ,GAAIgF,QACVQ,IAAM7F,KAAKI,MAAMJ,KAAKK,kBAAoB,GAAG6D,OAI7DhE,EAASoB,UAAU0F,kBAAoB,WACrC/G,EAAE2B,UAAUI,GAAG,iBAAkB/B,EAAEqE,MAAMtE,KAAK8H,eAAgB9H,QAGhEE,EAASoB,UAAU6D,mBAAqB,WACtClF,EAAE2B,UAAUmG,IAAI,cAGlB7H,EAASoB,UAAUwG,eAAiB,SAAS7F,GAC3C,GAII+F,GAAU/F,EAAMgG,QAChBC,EAAUC,OAAOC,aAAaJ,GAASK,aALlB,MAMrBL,GAA2BE,EAAII,MAAM,SACvCtI,KAAKsD,MACY,MAAR4E,GAPc,KAOCF,EACO,IAA3BhI,KAAKK,kBACPL,KAAKyD,YAAYzD,KAAKK,kBAAoB,GACjCL,KAAKG,QAAQgB,YAAcnB,KAAKI,MAAMgC,OAAS,GACxDpC,KAAKyD,YAAYzD,KAAKI,MAAMgC,OAAS,GAEtB,MAAR8F,GAZc,KAYCF,IACpBhI,KAAKK,oBAAsBL,KAAKI,MAAMgC,OAAS,EACjDpC,KAAKyD,YAAYzD,KAAKK,kBAAoB,GACjCL,KAAKG,QAAQgB,YAAcnB,KAAKI,MAAMgC,OAAS,GACxDpC,KAAKyD,YAAY,KAMvBvD,EAASoB,UAAUgC,IAAM,WACvBtD,KAAKmF,qBACLlF,EAAEoE,QAAQ0D,IAAI,SAAU/H,KAAKuE,aAC7BvE,KAAKsC,UAAUiG,QAAQvI,KAAKG,QAAQU,cACpCb,KAAKuC,SAASgG,QAAQvI,KAAKG,QAAQU,cACnCZ,EAAE,yBAAyB+C,KACzBwB,WAAY,YAEVxE,KAAKG,QAAQiB,kBACfnB,EAAE,QAAQ4H,YAAY,yBAInB,GAAI3H","file":"lightbox.min.js"}
lightbox/lightbox2/js/script.js DELETED
@@ -1 +0,0 @@
1
- (function(){var b,d,c;b=jQuery;c=(function(){function b(){this.fadeDuration=500;this.fitImagesInViewport=true;this.resizeDuration=700;this.showImageNumberLabel=true;this.wrapAround=false}b.prototype.albumLabel=function(b,c){return"Image "+b+" of "+c};return b})();d=(function(){function c(b){this.options=b;this.album=[];this.currentImageIndex=void 0;this.init()}c.prototype.init=function(){this.enable();return this.build()};c.prototype.enable=function(){var c=this;return b('body').on('click','a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]',function(d){c.start(b(d.currentTarget));return false})};c.prototype.build=function(){var c=this;b("<div id='lightboxOverlay' class='lightboxOverlay'></div><div id='lightbox' class='lightbox'><div class='lb-outerContainer'><div class='lb-container'><img class='lb-image' src='' /><div class='lb-nav'><a class='lb-prev' href='' ></a><a class='lb-next' href='' ></a></div><div class='lb-loader'><a class='lb-cancel'></a></div></div></div><div class='lb-dataContainer'><div class='lb-data'><div class='lb-details'><span class='lb-caption'></span><span class='lb-number'></span></div><div class='lb-closeContainer'><a class='lb-close'></a></div></div></div></div>").appendTo(b('body'));this.$lightbox=b('#lightbox');this.$overlay=b('#lightboxOverlay');this.$outerContainer=this.$lightbox.find('.lb-outerContainer');this.$container=this.$lightbox.find('.lb-container');this.containerTopPadding=parseInt(this.$container.css('padding-top'),10);this.containerRightPadding=parseInt(this.$container.css('padding-right'),10);this.containerBottomPadding=parseInt(this.$container.css('padding-bottom'),10);this.containerLeftPadding=parseInt(this.$container.css('padding-left'),10);this.$overlay.hide().on('click',function(){c.end();return false});this.$lightbox.hide().on('click',function(d){if(b(d.target).attr('id')==='lightbox'){c.end()}return false});this.$outerContainer.on('click',function(d){if(b(d.target).attr('id')==='lightbox'){c.end()}return false});this.$lightbox.find('.lb-prev').on('click',function(){if(c.currentImageIndex===0){c.changeImage(c.album.length-1)}else{c.changeImage(c.currentImageIndex-1)}return false});this.$lightbox.find('.lb-next').on('click',function(){if(c.currentImageIndex===c.album.length-1){c.changeImage(0)}else{c.changeImage(c.currentImageIndex+1)}return false});return this.$lightbox.find('.lb-loader, .lb-close').on('click',function(){c.end();return false})};c.prototype.start=function(c){var f,e,j,d,g,n,o,k,l,m,p,h,i;b(window).on("resize",this.sizeOverlay);b('select, object, embed').css({visibility:"hidden"});this.$overlay.width(b(document).width()).height(b(document).height()).fadeIn(this.options.fadeDuration);this.album=[];g=0;j=c.attr('data-lightbox');if(j){h=b(c.prop("tagName")+'[data-lightbox="'+j+'"]');for(d=k=0,m=h.length;k<m;d=++k){e=h[d];this.album.push({link:b(e).attr('href'),title:b(e).attr('title')});if(b(e).attr('href')===c.attr('href')){g=d}}}else{if(c.attr('rel')==='lightbox'){this.album.push({link:c.attr('href'),title:c.attr('title')})}else{i=b(c.prop("tagName")+'[rel="'+c.attr('rel')+'"]');for(d=l=0,p=i.length;l<p;d=++l){e=i[d];this.album.push({link:b(e).attr('href'),title:b(e).attr('title')});if(b(e).attr('href')===c.attr('href')){g=d}}}}f=b(window);o=f.scrollTop()+f.height()/10;n=f.scrollLeft();this.$lightbox.css({top:o+'px',left:n+'px'}).fadeIn(this.options.fadeDuration);this.changeImage(g)};c.prototype.changeImage=function(f){var d,c,e=this;this.disableKeyboardNav();d=this.$lightbox.find('.lb-image');this.sizeOverlay();this.$overlay.fadeIn(this.options.fadeDuration);b('.lb-loader').fadeIn('slow');this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();this.$outerContainer.addClass('animating');c=new Image();c.onload=function(){var m,g,h,i,j,k,l;d.attr('src',e.album[f].link);m=b(c);d.width(c.width);d.height(c.height);if(e.options.fitImagesInViewport){l=b(window).width();k=b(window).height();j=l-e.containerLeftPadding-e.containerRightPadding-20;i=k-e.containerTopPadding-e.containerBottomPadding-110;if((c.width>j)||(c.height>i)){if((c.width/j)>(c.height/i)){h=j;g=parseInt(c.height/(c.width/h),10);d.width(h);d.height(g)}else{g=i;h=parseInt(c.width/(c.height/g),10);d.width(h);d.height(g)}}}return e.sizeContainer(d.width(),d.height())};c.src=this.album[f].link;this.currentImageIndex=f};c.prototype.sizeOverlay=function(){return b('#lightboxOverlay').width(b(document).width()).height(b(document).height())};c.prototype.sizeContainer=function(f,g){var b,d,e,h,c=this;h=this.$outerContainer.outerWidth();e=this.$outerContainer.outerHeight();d=f+this.containerLeftPadding+this.containerRightPadding;b=g+this.containerTopPadding+this.containerBottomPadding;this.$outerContainer.animate({width:d,height:b},this.options.resizeDuration,'swing');setTimeout(function(){c.$lightbox.find('.lb-dataContainer').width(d);c.$lightbox.find('.lb-prevLink').height(b);c.$lightbox.find('.lb-nextLink').height(b);c.showImage()},this.options.resizeDuration)};c.prototype.showImage=function(){this.$lightbox.find('.lb-loader').hide();this.$lightbox.find('.lb-image').fadeIn('slow');this.updateNav();this.updateDetails();this.preloadNeighboringImages();this.enableKeyboardNav()};c.prototype.updateNav=function(){this.$lightbox.find('.lb-nav').show();if(this.album.length>1){if(this.options.wrapAround){this.$lightbox.find('.lb-prev, .lb-next').show()}else{if(this.currentImageIndex>0){this.$lightbox.find('.lb-prev').show()}if(this.currentImageIndex<this.album.length-1){this.$lightbox.find('.lb-next').show()}}}};c.prototype.updateDetails=function(){var b=this;if(typeof this.album[this.currentImageIndex].title!=='undefined'&&this.album[this.currentImageIndex].title!==""){this.$lightbox.find('.lb-caption').html(this.album[this.currentImageIndex].title).fadeIn('fast')}if(this.album.length>1&&this.options.showImageNumberLabel){this.$lightbox.find('.lb-number').text(this.options.albumLabel(this.currentImageIndex+1,this.album.length)).fadeIn('fast')}else{this.$lightbox.find('.lb-number').hide()}this.$outerContainer.removeClass('animating');this.$lightbox.find('.lb-dataContainer').fadeIn(this.resizeDuration,function(){return b.sizeOverlay()})};c.prototype.preloadNeighboringImages=function(){var c,b;if(this.album.length>this.currentImageIndex+1){c=new Image();c.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){b=new Image();b.src=this.album[this.currentImageIndex-1].link}};c.prototype.enableKeyboardNav=function(){b(document).on('keyup.keyboard',b.proxy(this.keyboardAction,this))};c.prototype.disableKeyboardNav=function(){b(document).off('.keyboard')};c.prototype.keyboardAction=function(g){var d,e,f,c,b;d=27;e=37;f=39;b=g.keyCode;c=String.fromCharCode(b).toLowerCase();if(b===d||c.match(/x|o|c/)){this.end()}else if(c==='p'||b===e){if(this.currentImageIndex!==0){this.changeImage(this.currentImageIndex-1)}}else if(c==='n'||b===f){if(this.currentImageIndex!==this.album.length-1){this.changeImage(this.currentImageIndex+1)}}};c.prototype.end=function(){this.disableKeyboardNav();b(window).off("resize",this.sizeOverlay);this.$lightbox.fadeOut(this.options.fadeDuration);this.$overlay.fadeOut(this.options.fadeDuration);return b('select, object, embed').css({visibility:"visible"})};return c})();b(function(){var e,b;b=new c();return e=new d(b)})}).call(this);
 
scripts/jquery.modula.js CHANGED
@@ -10,6 +10,13 @@ function tg_getURLParameter(name) {
10
  return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
11
  }
12
 
 
 
 
 
 
 
 
13
  ; (function ($, window, document, undefined) {
14
 
15
 
@@ -336,6 +343,10 @@ function tg_getURLParameter(name) {
336
  instance.onResize(instance);
337
  });
338
 
 
 
 
 
339
  this.setupFilters();
340
  this.setupSocial();
341
 
@@ -374,8 +385,6 @@ function tg_getURLParameter(name) {
374
  $(this).show();
375
  }
376
  });
377
-
378
- instance.reset();
379
  }
380
  };
381
 
10
  return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
11
  }
12
 
13
+ // Compatibility with WPBakery Page Builder
14
+ jQuery(document).on( 'vc-full-width-row-single', function( event, element ){
15
+ if( jQuery( element.el ).find( '.modula' ).length > 0 ){
16
+ jQuery( window ).trigger( 'modula-update' );
17
+ }
18
+ });
19
+
20
  ; (function ($, window, document, undefined) {
21
 
22
 
343
  instance.onResize(instance);
344
  });
345
 
346
+ $(window).on( 'modula-update', function () {
347
+ instance.onResize(instance);
348
+ });
349
+
350
  this.setupFilters();
351
  this.setupSocial();
352
 
385
  $(this).show();
386
  }
387
  });
 
 
388
  }
389
  };
390
 
scripts/modula.css CHANGED
@@ -57,6 +57,18 @@
57
  transition: transform .3s ease-out, opacity .2s linear, top .3s, left .6s;
58
  opacity: 0;
59
  }
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  .modula .items .item.tg-loaded {
62
  transform: scale(1) translate(0, 0) rotate(0deg) !important;
57
  transition: transform .3s ease-out, opacity .2s linear, top .3s, left .6s;
58
  opacity: 0;
59
  }
60
+ .modula .items .item > a {
61
+ display: block;
62
+ position: absolute;
63
+ top: 0;
64
+ left: 0;
65
+ width: 100%;
66
+ height: 100%;
67
+ z-index: 10;
68
+ }
69
+ .modula .items .item .jtg-social {
70
+ z-index: 10;
71
+ }
72
 
73
  .modula .items .item.tg-loaded {
74
  transform: scale(1) translate(0, 0) rotate(0deg) !important;