Slider by WD – Responsive Slider - Version 1.1.72

Version Description

  • Fixed: Warrning in admin popups.
  • Fixed: Required field validation.
  • Changed: Scroll load in filemanager.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Slider by WD – Responsive Slider
Version 1.1.72
Comparing to
See all releases

Code changes from version 1.1.71 to 1.1.72

admin/controllers/WDSControllerSliders_wds.php CHANGED
@@ -951,8 +951,8 @@ class WDSControllerSliders_wds {
951
  'link_to_slide' => $layer_id->link_to_slide,
952
  'align_layer' => $layer_id->align_layer,
953
  'static_layer' => $layer_id->static_layer,
954
- 'infinite_in' => $infinite_in,
955
- 'infinite_out' => $infinite_out,
956
  ));
957
  }
958
  }
@@ -963,7 +963,7 @@ class WDSControllerSliders_wds {
963
  return $new_slider_id;
964
  }
965
 
966
- function bwg_hex2rgb($hex) {
967
  $hex = str_replace("#", "", $hex);
968
  if (strlen($hex) == 3) {
969
  $r = hexdec(substr($hex,0,1).substr($hex,0,1));
@@ -979,7 +979,7 @@ class WDSControllerSliders_wds {
979
  return $rgb;
980
  }
981
 
982
- function bwg_imagettfbboxdimensions($font_size, $font_angle, $font, $text) {
983
  $box = @ImageTTFBBox($font_size, $font_angle, $font, $text) or die;
984
  $max_x = max(array($box[0], $box[2], $box[4], $box[6]));
985
  $max_y = max(array($box[1], $box[3], $box[5], $box[7]));
@@ -999,12 +999,12 @@ class WDSControllerSliders_wds {
999
  list($width, $height, $type) = getimagesize($original_filename);
1000
  $watermark_image = imagecreatetruecolor($width, $height);
1001
 
1002
- $watermark_color = $this->bwg_hex2rgb($watermark_color);
1003
  $watermark_color = imagecolorallocatealpha($watermark_image, $watermark_color[0], $watermark_color[1], $watermark_color[2], $watermark_transparency);
1004
  $watermark_font = WD_S_DIR . '/fonts/' . $watermark_font;
1005
  $watermark_font_size = ($height * $watermark_font_size / 500);
1006
  $watermark_position = explode('-', $watermark_position);
1007
- $watermark_sizes = $this->bwg_imagettfbboxdimensions($watermark_font_size, 0, $watermark_font, $watermark_text);
1008
 
1009
  $top = $height - 5;
1010
  $left = $width - $watermark_sizes['width'] - 5;
@@ -1246,11 +1246,11 @@ class WDSControllerSliders_wds {
1246
  $this->display();
1247
  }
1248
 
1249
- public function merge_sliders($id) {
1250
- global $wpdb;
1251
  $flag = FALSE;
1252
  $check_sliders = array();
1253
  $sliders_names = array();
 
1254
  $sliders_ids_col = $wpdb->get_results('SELECT id, name FROM ' . $wpdb->prefix . 'wdsslider ORDER BY id');
1255
  $name = "Merged sliders of ";
1256
  foreach ($sliders_ids_col as $slider_id) {
@@ -1260,7 +1260,7 @@ class WDSControllerSliders_wds {
1260
  }
1261
  }
1262
  if (count($check_sliders) > 1) {
1263
- $name .= implode(",",$sliders_names);
1264
  if (isset($_POST["select_slider_merge"])) {
1265
  $select_slider_merge = (int) $_POST["select_slider_merge"];
1266
  $new_slider_id = $this->duplicate_tables($select_slider_merge, $name);
951
  'link_to_slide' => $layer_id->link_to_slide,
952
  'align_layer' => $layer_id->align_layer,
953
  'static_layer' => $layer_id->static_layer,
954
+ 'infinite_in' => $layer_id->infinite_in,
955
+ 'infinite_out' => $layer_id->infinite_out,
956
  ));
957
  }
958
  }
963
  return $new_slider_id;
964
  }
965
 
966
+ function wds_hex2rgb($hex) {
967
  $hex = str_replace("#", "", $hex);
968
  if (strlen($hex) == 3) {
969
  $r = hexdec(substr($hex,0,1).substr($hex,0,1));
979
  return $rgb;
980
  }
981
 
982
+ function wds_imagettfbboxdimensions($font_size, $font_angle, $font, $text) {
983
  $box = @ImageTTFBBox($font_size, $font_angle, $font, $text) or die;
984
  $max_x = max(array($box[0], $box[2], $box[4], $box[6]));
985
  $max_y = max(array($box[1], $box[3], $box[5], $box[7]));
999
  list($width, $height, $type) = getimagesize($original_filename);
1000
  $watermark_image = imagecreatetruecolor($width, $height);
1001
 
1002
+ $watermark_color = $this->wds_hex2rgb($watermark_color);
1003
  $watermark_color = imagecolorallocatealpha($watermark_image, $watermark_color[0], $watermark_color[1], $watermark_color[2], $watermark_transparency);
1004
  $watermark_font = WD_S_DIR . '/fonts/' . $watermark_font;
1005
  $watermark_font_size = ($height * $watermark_font_size / 500);
1006
  $watermark_position = explode('-', $watermark_position);
1007
+ $watermark_sizes = $this->wds_imagettfbboxdimensions($watermark_font_size, 0, $watermark_font, $watermark_text);
1008
 
1009
  $top = $height - 5;
1010
  $left = $width - $watermark_sizes['width'] - 5;
1246
  $this->display();
1247
  }
1248
 
1249
+ public function merge_sliders() {
 
1250
  $flag = FALSE;
1251
  $check_sliders = array();
1252
  $sliders_names = array();
1253
+ global $wpdb;
1254
  $sliders_ids_col = $wpdb->get_results('SELECT id, name FROM ' . $wpdb->prefix . 'wdsslider ORDER BY id');
1255
  $name = "Merged sliders of ";
1256
  foreach ($sliders_ids_col as $slider_id) {
1260
  }
1261
  }
1262
  if (count($check_sliders) > 1) {
1263
+ $name .= implode(",", $sliders_names);
1264
  if (isset($_POST["select_slider_merge"])) {
1265
  $select_slider_merge = (int) $_POST["select_slider_merge"];
1266
  $new_slider_id = $this->duplicate_tables($select_slider_merge, $name);
admin/models/WDSModelSliders_wds.php CHANGED
@@ -40,6 +40,11 @@ class WDSModelSliders_wds {
40
  $rows[0]->link = '';
41
  $rows[0]->order = 1;
42
  $rows[0]->target_attr_slide = 1;
 
 
 
 
 
43
  }
44
  else {
45
  foreach ($rows as $row) {
40
  $rows[0]->link = '';
41
  $rows[0]->order = 1;
42
  $rows[0]->target_attr_slide = 1;
43
+ $rows[0]->att_width = 0;
44
+ $rows[0]->att_height = 0;
45
+ $rows[0]->youtube_rel_video = 0;
46
+ $rows[0]->video_loop = 0;
47
+ $rows[0]->video_duration = 0;
48
  }
49
  else {
50
  foreach ($rows as $row) {
admin/views/WDSViewGoptions_wds.php CHANGED
@@ -58,7 +58,7 @@ class WDSViewGoptions_wds {
58
  <table>
59
  <tbody>
60
  <tr>
61
- <td class="spider_label"><label><?php _e('Include scripts only on necessary pages', 'wds'); ?>:</label></td>
62
  <td>
63
  <input type="radio" id="wds_register_scripts1" name="wds_register_scripts" <?php echo (($register_scripts == 1)? "checked='checked'" : ""); ?> value="1" /><label <?php echo ($register_scripts ? 'class="selected_color"' : ''); ?> for="wds_register_scripts1"><?php _e('Yes', 'wds'); ?></label>
64
  <input type="radio" id="wds_register_scripts0" name="wds_register_scripts" <?php echo (($register_scripts == 0)? "checked='checked'" : ""); ?> value="0" /><label <?php echo ($register_scripts ? '' : 'class="selected_color"'); ?> for="wds_register_scripts0"><?php _e('No', 'wds'); ?></label>
58
  <table>
59
  <tbody>
60
  <tr>
61
+ <td class="spider_label"><label><?php _e('Include scripts/styles only on necessary pages', 'wds'); ?>:</label></td>
62
  <td>
63
  <input type="radio" id="wds_register_scripts1" name="wds_register_scripts" <?php echo (($register_scripts == 1)? "checked='checked'" : ""); ?> value="1" /><label <?php echo ($register_scripts ? 'class="selected_color"' : ''); ?> for="wds_register_scripts1"><?php _e('Yes', 'wds'); ?></label>
64
  <input type="radio" id="wds_register_scripts0" name="wds_register_scripts" <?php echo (($register_scripts == 0)? "checked='checked'" : ""); ?> value="0" /><label <?php echo ($register_scripts ? '' : 'class="selected_color"'); ?> for="wds_register_scripts0"><?php _e('No', 'wds'); ?></label>
admin/views/WDSViewSliders_wds.php CHANGED
@@ -587,30 +587,25 @@ class WDSViewSliders_wds {
587
  <h2><?php echo $page_title; ?></h2>
588
  <div class="buttons_conteiner">
589
  <div class="slider_title_conteiner">
590
- <span class="spider_label"><label for="name"><?php _e('Slider Title:','wds_back'); ?> <span style="color:#FF0000;">*</span> </label></span>
591
- <span><input type="text" id="name" name="name" value="<?php echo $row->name; ?>" size="20" /></span>
592
  </div>
593
  <div class="wds_buttons">
594
  <div class="wds_button_wrap">
595
- <input class="wds_button-secondary wds_save_slider" type="button" onclick="if (wds_check_required('name', 'Name')) {return false;};
596
- spider_set_input_value('task', 'save');
597
- spider_ajax_save('sliders_form', event);" value="Save" />
598
  </div>
599
  <div class="wds_button_wrap">
600
- <input class="wds_button-secondary wds_apply_slider" type="button" onclick="if (wds_check_required('name', 'Name')) {return false;};
601
- spider_set_input_value('task', 'apply');
602
- spider_ajax_save('sliders_form', event);" value="Apply" />
603
  </div>
604
  <div class="wds_button_wrap">
605
- <input class="wds_button-secondary wds_dublicate_slide" type="button" onclick="if (wds_check_required('name', 'Name')) {return false;};
606
  spider_set_input_value('current_id', '0' );
607
  spider_set_input_value('save_as_copy', '1');
608
  spider_set_input_value('task', 'apply');
609
  spider_ajax_save('sliders_form', event);" value="Save as Copy" />
610
- </div>
611
- <div class="wds_button_wrap">
612
- <input id="wds_preview" type="button" class="action_buttons" value="Preview"
613
- onclick="if (wds_check_required('name', 'Name')) { return false;}; spider_set_input_value('task', 'preview'); spider_ajax_save('sliders_form', event); return false;" />
614
  </div>
615
  <div class="wds_button_wrap">
616
  <input type="button" class="wds_button-secondary wds_export_one" onclick="alert('This functionality is disabled in free version.')" value="Export" />
@@ -623,9 +618,7 @@ class WDSViewSliders_wds {
623
  </div>
624
  <div>
625
  <div class="wds_reset_button">
626
- <input class="reset_settings" type="button" onclick="if (wds_check_required('name', 'Name')) {return false;};
627
- spider_set_input_value('task', 'reset');
628
- spider_ajax_save('sliders_form', event);" value="Reset Settings" />
629
  </div>
630
  <!--------------Settings tab----------->
631
  <div class="wds_box wds_settings_box">
@@ -649,7 +642,7 @@ class WDSViewSliders_wds {
649
  </td>
650
  </tr>
651
  </thead>
652
- </table>
653
  <div class="wds_nav_tabs">
654
  <div class="wds_menu_icon" onclick="jQuery('.wds_nav_tabs ul').slideToggle(500);"></div>
655
  <ul>
@@ -2205,25 +2198,20 @@ class WDSViewSliders_wds {
2205
  else {
2206
  ?>
2207
  <div class="wds_button_wrap">
2208
- <input type="button" class="action_buttons add_images" id="button_image_url" onclick="spider_media_uploader('button_image_url', event, true); return false;" value="Add Images" />
2209
  </div>
2210
  <?php
2211
  }
2212
  ?>
2213
  <div class="wds_button_wrap">
2214
- <input class="wds_buttons_320 action_buttons add_posts wds_free_button" type="button" value="Add Posts" onclick="alert('This functionality is disabled in free version.')" />
2215
- </div>
2216
  <div class="wds_button_wrap">
2217
- <input class="wds_buttons_320 action_buttons set_watermark" type="button" onclick="if (wds_check_required('name', 'Name')) {return false;};
2218
- spider_set_input_value('task', 'set_watermark');
2219
- spider_ajax_save('sliders_form', event);" value="Set Watermark" />
2220
- </div>
2221
- <div class="wds_button_wrap">
2222
- <input class="wds_buttons_320 action_buttons reset_watermark" type="button" onclick="if (wds_check_required('name', 'Name')) {return false;};
2223
- spider_set_input_value('task', 'reset_watermark');
2224
- spider_ajax_save('sliders_form', event);" value="Reset Watermark" />
2225
- </div>
2226
-
2227
  </div>
2228
  </td>
2229
  </tr>
@@ -2303,7 +2291,6 @@ class WDSViewSliders_wds {
2303
  <thead><tr><td colspan="4">&nbsp;</td></tr></thead>
2304
  <tbody>
2305
  <input type="hidden" name="type<?php echo $slide_row->id; ?>" id="type<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->type; ?>" />
2306
-
2307
  <tr class="bgcolor">
2308
  <td colspan="4">
2309
  <h2 class="titles">Edit Slide</h2>
@@ -2346,6 +2333,8 @@ class WDSViewSliders_wds {
2346
  </div>
2347
  <input type="hidden" id="image_url<?php echo $slide_row->id; ?>" name="image_url<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->image_url; ?>" />
2348
  <input type="hidden" id="thumb_url<?php echo $slide_row->id; ?>" name="thumb_url<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->thumb_url; ?>" />
 
 
2349
  </td>
2350
  </tr>
2351
  <tr class="bgcolor">
@@ -2632,7 +2621,7 @@ class WDSViewSliders_wds {
2632
  </td>
2633
  </tr>
2634
  </table>
2635
- <table class="layer_table_right" >
2636
  <tr class="wds_layer_tr" >
2637
  <td class="spider_label">
2638
  <label for="<?php echo $prefix; ?>_layer_effect_in">Effect In:</label>
@@ -2870,8 +2859,8 @@ class WDSViewSliders_wds {
2870
  <div class="spider_description"></div>
2871
  </td>
2872
  </tr>
2873
- </table class="layer_table_right">
2874
- <table>
2875
  <tr class="wds_layer_tr">
2876
  <td class="spider_label">
2877
  <label for="<?php echo $prefix; ?>_layer_effect_in">Effect In:</label>
587
  <h2><?php echo $page_title; ?></h2>
588
  <div class="buttons_conteiner">
589
  <div class="slider_title_conteiner">
590
+ <span class="spider_label"><label for="name"><?php _e('Slider Title', 'wds_back'); ?> <span style="color:#FF0000;">*</span> </label></span>
591
+ <span><input type="text" id="name" name="name" value="<?php echo $row->name; ?>" size="20" class="wds_requried" data-name="<?php _e('Slider title', 'wds_back'); ?>" /></span>
592
  </div>
593
  <div class="wds_buttons">
594
  <div class="wds_button_wrap">
595
+ <input class="wds_button-secondary wds_save_slider" type="button" onclick="spider_set_input_value('task', 'save'); spider_ajax_save('sliders_form', event);" value="Save" />
 
 
596
  </div>
597
  <div class="wds_button_wrap">
598
+ <input class="wds_button-secondary wds_apply_slider" type="button" onclick="spider_set_input_value('task', 'apply'); spider_ajax_save('sliders_form', event);" value="Apply" />
 
 
599
  </div>
600
  <div class="wds_button_wrap">
601
+ <input class="wds_button-secondary wds_dublicate_slide" type="button" onclick="if (!wds_check_required()) {return false;};
602
  spider_set_input_value('current_id', '0' );
603
  spider_set_input_value('save_as_copy', '1');
604
  spider_set_input_value('task', 'apply');
605
  spider_ajax_save('sliders_form', event);" value="Save as Copy" />
606
+ </div>
607
+ <div class="wds_button_wrap">
608
+ <input id="wds_preview" type="button" class="action_buttons" value="Preview" onclick="spider_set_input_value('task', 'preview'); spider_ajax_save('sliders_form', event); return false;" />
 
609
  </div>
610
  <div class="wds_button_wrap">
611
  <input type="button" class="wds_button-secondary wds_export_one" onclick="alert('This functionality is disabled in free version.')" value="Export" />
618
  </div>
619
  <div>
620
  <div class="wds_reset_button">
621
+ <input class="reset_settings" type="button" onclick="spider_set_input_value('task', 'reset'); spider_ajax_save('sliders_form', event);" value="Reset Settings" />
 
 
622
  </div>
623
  <!--------------Settings tab----------->
624
  <div class="wds_box wds_settings_box">
642
  </td>
643
  </tr>
644
  </thead>
645
+ </table>
646
  <div class="wds_nav_tabs">
647
  <div class="wds_menu_icon" onclick="jQuery('.wds_nav_tabs ul').slideToggle(500);"></div>
648
  <ul>
2198
  else {
2199
  ?>
2200
  <div class="wds_button_wrap">
2201
+ <input type="button" class="action_buttons add_images" id="button_image_url" onclick="spider_media_uploader('button_image_url', event, true); return false;" value="Add Images" />
2202
  </div>
2203
  <?php
2204
  }
2205
  ?>
2206
  <div class="wds_button_wrap">
2207
+ <input class="wds_buttons_320 action_buttons add_posts wds_free_button" type="button" value="Add Posts" onclick="alert('This functionality is disabled in free version.')" />
2208
+ </div>
2209
  <div class="wds_button_wrap">
2210
+ <input class="wds_buttons_320 action_buttons set_watermark" type="button" onclick="spider_set_input_value('task', 'set_watermark'); spider_ajax_save('sliders_form', event);" value="Set Watermark" />
2211
+ </div>
2212
+ <div class="wds_button_wrap">
2213
+ <input class="wds_buttons_320 action_buttons reset_watermark" type="button" onclick="spider_set_input_value('task', 'reset_watermark'); spider_ajax_save('sliders_form', event);" value="Reset Watermark" />
2214
+ </div>
 
 
 
 
 
2215
  </div>
2216
  </td>
2217
  </tr>
2291
  <thead><tr><td colspan="4">&nbsp;</td></tr></thead>
2292
  <tbody>
2293
  <input type="hidden" name="type<?php echo $slide_row->id; ?>" id="type<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->type; ?>" />
 
2294
  <tr class="bgcolor">
2295
  <td colspan="4">
2296
  <h2 class="titles">Edit Slide</h2>
2333
  </div>
2334
  <input type="hidden" id="image_url<?php echo $slide_row->id; ?>" name="image_url<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->image_url; ?>" />
2335
  <input type="hidden" id="thumb_url<?php echo $slide_row->id; ?>" name="thumb_url<?php echo $slide_row->id; ?>" value="<?php echo $slide_row->thumb_url; ?>" />
2336
+ <div class="clear"></div>
2337
+ </div>
2338
  </td>
2339
  </tr>
2340
  <tr class="bgcolor">
2621
  </td>
2622
  </tr>
2623
  </table>
2624
+ <table class="layer_table_right">
2625
  <tr class="wds_layer_tr" >
2626
  <td class="spider_label">
2627
  <label for="<?php echo $prefix; ?>_layer_effect_in">Effect In:</label>
2859
  <div class="spider_description"></div>
2860
  </td>
2861
  </tr>
2862
+ </table>
2863
+ <table class="layer_table_right">
2864
  <tr class="wds_layer_tr">
2865
  <td class="spider_label">
2866
  <label for="<?php echo $prefix; ?>_layer_effect_in">Effect In:</label>
admin/views/WDSViewUninstall_wds.php CHANGED
@@ -102,15 +102,6 @@ class WDSViewUninstall_wds {
102
  <p><?php echo $prefix; ?>wdsslide,</p>
103
  <p><?php echo $prefix; ?>wdslayer.</p>
104
  </div>
105
- <?php
106
- if (isset($_POST['bwg_delete_files'])) {
107
- ?>
108
- <div class="<?php echo ($flag) ? 'wd_updated' : 'wd_error'?>">
109
- <p><?php echo ($flag) ? 'The folder was successfully deleted.' : 'An error occurred when deleting the folder.'?></p>
110
- </div>
111
- <?php
112
- }
113
- ?>
114
  <div class="wrap">
115
  <h2>Uninstall Slider WD</h2>
116
  <p><strong><a href="<?php echo $deactivate_url; ?>">Click Here</a> To Finish the Uninstallation and Slider WD will be Deactivated Automatically.</strong></p>
102
  <p><?php echo $prefix; ?>wdsslide,</p>
103
  <p><?php echo $prefix; ?>wdslayer.</p>
104
  </div>
 
 
 
 
 
 
 
 
 
105
  <div class="wrap">
106
  <h2>Uninstall Slider WD</h2>
107
  <p><strong><a href="<?php echo $deactivate_url; ?>">Click Here</a> To Finish the Uninstallation and Slider WD will be Deactivated Automatically.</strong></p>
css/wds_shortcode.css CHANGED
@@ -11,15 +11,6 @@
11
  font-size: 11px;
12
  }
13
 
14
- .bwg_short_div * {
15
- font-size: 10px;
16
- }
17
-
18
- .bwg_short_div input[type=radio],
19
- .bwg_short_div label {
20
- vertical-align: middle;
21
- }
22
-
23
  .spider_label {
24
  font-weight: bold;
25
  font-family: Verdana;
@@ -37,23 +28,3 @@
37
  box-shadow: 0 0 7px black;
38
  line-height: 10px;
39
  }
40
-
41
- .panel_wrapper .bwg_short_div {
42
- float: left;
43
- height: 300px;
44
- padding: 15px;
45
- width: 30%;
46
- }
47
-
48
- .bwg_short_div {
49
- float: left;
50
- height: 530px;
51
- padding: 15px;
52
- width: 30%;
53
- }
54
-
55
- .bws_position_table td,
56
- .bws_position_table input{
57
- border: 1px solid #CCCCCC;
58
- margin: 2px;
59
- }
11
  font-size: 11px;
12
  }
13
 
 
 
 
 
 
 
 
 
 
14
  .spider_label {
15
  font-weight: bold;
16
  font-family: Verdana;
28
  box-shadow: 0 0 7px black;
29
  line-height: 10px;
30
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
filemanager/controller.php CHANGED
@@ -37,19 +37,13 @@ class FilemanagerController {
37
  // Public Methods //
38
  ////////////////////////////////////////////////////////////////////////////////////////
39
 
40
- public function get_options_data() {
41
- global $wpdb;
42
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'bwg_option WHERE id="%d"', 1));
43
- return $row;
44
- }
45
-
46
- public function execute() {
47
  $task = isset($_REQUEST['task']) ? stripslashes(esc_html($_REQUEST['task'])) : 'display';
48
  if (method_exists($this, $task)) {
49
- $this->$task();
50
  }
51
  else {
52
- $this->display();
53
  }
54
  }
55
 
@@ -61,13 +55,20 @@ class FilemanagerController {
61
  return $this->uploads_url;
62
  }
63
 
64
- public function display() {
65
  require_once WD_S_DIR . '/filemanager/model.php';
66
  $model = new FilemanagerModel($this);
67
 
68
  require_once WD_S_DIR . '/filemanager/view.php';
69
  $view = new FilemanagerView($this, $model);
70
- $view->display();
 
 
 
 
 
 
 
71
  }
72
 
73
  public function make_dir() {
37
  // Public Methods //
38
  ////////////////////////////////////////////////////////////////////////////////////////
39
 
40
+ public function execute($ajax = false, $load_count = 0) {
 
 
 
 
 
 
41
  $task = isset($_REQUEST['task']) ? stripslashes(esc_html($_REQUEST['task'])) : 'display';
42
  if (method_exists($this, $task)) {
43
+ $this->$task($ajax, $load_count);
44
  }
45
  else {
46
+ $this->display($ajax, $load_count);
47
  }
48
  }
49
 
55
  return $this->uploads_url;
56
  }
57
 
58
+ public function display($ajax = false, $load_count = 0) {
59
  require_once WD_S_DIR . '/filemanager/model.php';
60
  $model = new FilemanagerModel($this);
61
 
62
  require_once WD_S_DIR . '/filemanager/view.php';
63
  $view = new FilemanagerView($this, $model);
64
+ $view->display($ajax, $load_count);
65
+ }
66
+
67
+ public function get_images($load_count) {
68
+ require_once WD_S_DIR . '/filemanager/model.php';
69
+ $model = new FilemanagerModel($this);
70
+ $file_manager_data = $model->get_file_manager_data(true, $load_count);
71
+ return $file_manager_data;
72
  }
73
 
74
  public function make_dir() {
filemanager/js/default.js CHANGED
@@ -21,7 +21,8 @@ var filesSelectedML;
21
  var dragFiles;
22
  var isUploading;
23
 
24
-
 
25
  ////////////////////////////////////////////////////////////////////////////////////////
26
  // Constructor //
27
  ////////////////////////////////////////////////////////////////////////////////////////
@@ -29,6 +30,40 @@ var isUploading;
29
  // Public Methods //
30
  ////////////////////////////////////////////////////////////////////////////////////////
31
  jQuery(document).ready(function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  var all_images_count = jQuery(".item_thumb img").length;
33
  if(!all_images_count) {
34
  setTimeout(function(){jQuery(document).trigger("onUpload")});
@@ -588,4 +623,76 @@ function onBtnSelectAllMediLibraryClick() {
588
  keyFileSelectedML = this;
589
  }
590
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
591
  }
21
  var dragFiles;
22
  var isUploading;
23
 
24
+ var ajax = true;
25
+ var item_number = 100;
26
  ////////////////////////////////////////////////////////////////////////////////////////
27
  // Constructor //
28
  ////////////////////////////////////////////////////////////////////////////////////////
30
  // Public Methods //
31
  ////////////////////////////////////////////////////////////////////////////////////////
32
  jQuery(document).ready(function () {
33
+ var wds_elements = 1;
34
+ var all_item_count = jQuery("#explorer_body_container #explorer_body").data("files_count");
35
+ jQuery("#explorer_body_container").scroll(function () {
36
+ var explorer_item_count = jQuery("#explorer_body .explorer_item").length;
37
+ if ((explorer_item_count < all_item_count) && ajax) {
38
+ var scroll_position = jQuery(this).scrollTop() + jQuery(this).innerHeight();
39
+ var scroll_Height = jQuery(this)[0].scrollHeight;
40
+ if (scroll_position >= scroll_Height) {
41
+ jQuery('#loading_div').show();
42
+ jQuery('#opacity_div').show();
43
+ wds_elements++;
44
+ jQuery.ajax({
45
+ type: "POST",
46
+ url: ajaxurl,
47
+ dataType: 'json',
48
+ data: {
49
+ action: 'addImage',
50
+ load_count: wds_elements,
51
+ addImages_ajax: 'addImages_ajax'
52
+ },
53
+ success: function (response) {
54
+ if (response.files.length === 0) {
55
+ jQuery('#loading_div').hide();
56
+ jQuery('#opacity_div').hide();
57
+ ajax = false;
58
+ return;
59
+ } else {
60
+ ajax_print_images(response);
61
+ }
62
+ }
63
+ });
64
+ }
65
+ }
66
+ });
67
  var all_images_count = jQuery(".item_thumb img").length;
68
  if(!all_images_count) {
69
  setTimeout(function(){jQuery(document).trigger("onUpload")});
623
  keyFileSelectedML = this;
624
  }
625
  });
626
+ }
627
+
628
+ function ajax_print_images(response) {
629
+ for (i in response.files) {
630
+ var corent_file = response.files[i];
631
+ var name = corent_file["name"];
632
+ var filename = corent_file["filename"];
633
+ var filethumb = corent_file["thumb"];
634
+ var filesize = corent_file["size"];
635
+ var filetype = corent_file["type"];
636
+ var date_modified = corent_file["date_modified"];
637
+ var fileresolution = corent_file["resolution"];
638
+ var fileCredit = corent_file["credit"];
639
+ var fileAperture = corent_file["aperture"];
640
+ var fileCamera = corent_file["camera"];
641
+ var fileCaption = corent_file["caption"];
642
+ var fileIso = corent_file["iso"];
643
+ var fileOrientation = corent_file["orientation"];
644
+ var fileCopyright = corent_file["copyright"];
645
+ var onmouseover = "onFileMOver(event, this);";
646
+ var onmouseout = "onFileMOut(event, this);";
647
+ var onclick = "onFileClick(event, this);";
648
+ var ondblclick = "onFileDblClick(event, this);";
649
+ var ondragstart = "onFileDragStart(event, this);";
650
+ var ondragover = "";
651
+ var ondrop = "";
652
+ if (corent_file['is_dir'] == true) {
653
+ ondragover="onFileDragOver(event, this);";
654
+ ondrop="onFileDrop(event, this);";
655
+ }
656
+ var isDir = false;
657
+ if (corent_file['is_dir'] === true) {
658
+ isDir = 'true';
659
+ }
660
+
661
+ item_number = item_number+i;
662
+ var item_thumb = '<span class="item_thumb"><img src="' + corent_file['thumb'] + '"/></span>';
663
+ var item_icon = '<span class="item_icon"><img src="'+corent_file['icon']+'"/> </span>';
664
+ var item_name = '<span class="item_name">'+corent_file['name']+'</span>';
665
+ var item_size = '<span class="item_size">'+corent_file['size']+'</span>';
666
+ var item_date_modified = '<span class="item_date_modified">'+corent_file['date_modified']+'</span>';
667
+ var item_numbering = '<span class="item_numbering">'+item_number+'</span>';
668
+
669
+ var explorer_item = '<div class="explorer_item" ' +
670
+ 'name="' + name + '" ' +
671
+ 'filename="' + filename + '" ' +
672
+ 'filethumb="' + filethumb + '" ' +
673
+ 'filesize="' + filesize + '" ' +
674
+ 'filetype="' + filetype + '" ' +
675
+ 'date_modified="' + date_modified + '" ' +
676
+ 'fileresolution="' + fileresolution + '" ' +
677
+ 'fileresolution="' + fileresolution + '" ' +
678
+ 'fileCredit="' + fileCredit + '" ' +
679
+ 'fileAperture="' + fileAperture + '" ' +
680
+ 'fileCamera="' + fileCamera + '" ' +
681
+ 'fileCaption="' + fileCaption + '" ' +
682
+ 'fileIso="' + fileIso + '" ' +
683
+ 'fileOrientation="' + fileOrientation + '" ' +
684
+ 'fileCopyright="' + fileCopyright + '" ' +
685
+ 'isDir="' + isDir + '" ' +
686
+ 'onmouseover="' + onmouseover + '" ' +
687
+ 'onmouseout="' + onmouseout + '" ' +
688
+ 'onclick="' + onclick + '" ' +
689
+ 'ondblclick="' + ondblclick + '" ' +
690
+ 'ondragstart="' + ondragstart + '" ' +
691
+ 'ondragover="' + ondragover + '" ' +
692
+ 'ondrop="' + ondrop + '" ' +
693
+ 'draggable="true" >'+item_numbering + item_thumb + item_icon+item_name+item_size+item_date_modified+'</div>';
694
+ jQuery("#explorer_body").append(explorer_item);
695
+ jQuery('#loading_div').hide();
696
+ jQuery('#opacity_div').hide();
697
+ }
698
  }
filemanager/model.php CHANGED
@@ -30,7 +30,7 @@ class FilemanagerModel {
30
  ////////////////////////////////////////////////////////////////////////////////////////
31
  // Public Methods //
32
  ////////////////////////////////////////////////////////////////////////////////////////
33
- public function get_file_manager_data() {
34
  $session_data = array();
35
  $session_data['sort_by'] = $this->get_from_session('sort_by', 'date_modified');
36
  $session_data['sort_order'] = $this->get_from_session('sort_order', 'desc');
@@ -44,7 +44,9 @@ class FilemanagerModel {
44
  $data['session_data'] = $session_data;
45
  $data['path_components'] = $this->get_path_components();
46
  $data['dir'] = $this->controller->get_uploads_dir() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '');
47
- $data['files'] = $this->get_files($session_data['sort_by'], $session_data['sort_order']);
 
 
48
  $data['extensions'] = (isset($_REQUEST['extensions']) ? esc_html($_REQUEST['extensions']) : '');
49
  $data['callback'] = (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : '');
50
  $data['image_for'] = (isset($_REQUEST['image_for']) ? esc_html($_REQUEST['image_for']) : '');
@@ -93,7 +95,7 @@ class FilemanagerModel {
93
  return $components;
94
  }
95
 
96
- function get_files($sort_by, $sort_order) {
97
  $icons_dir_path = WD_S_DIR . '/filemanager/images/file_icons';
98
  $icons_dir_url = WD_S_URL . '/filemanager/images/file_icons';
99
  $valid_types = explode(',', isset($_REQUEST['extensions']) ? strtolower(esc_html($_REQUEST['extensions'])) : '*');
@@ -158,7 +160,13 @@ class FilemanagerModel {
158
 
159
  // $result = $sort_order == 'asc' ? array_merge($dirs, $files) : array_merge($files, $dirs);
160
  $result = array_merge($dirs, $files);
161
- return $result;
 
 
 
 
 
 
162
  }
163
 
164
  private function get_sorted_file_names($parent_dir, $sort_by, $sort_order) {
30
  ////////////////////////////////////////////////////////////////////////////////////////
31
  // Public Methods //
32
  ////////////////////////////////////////////////////////////////////////////////////////
33
+ public function get_file_manager_data($ajax = false, $load_count = 0) {
34
  $session_data = array();
35
  $session_data['sort_by'] = $this->get_from_session('sort_by', 'date_modified');
36
  $session_data['sort_order'] = $this->get_from_session('sort_order', 'desc');
44
  $data['session_data'] = $session_data;
45
  $data['path_components'] = $this->get_path_components();
46
  $data['dir'] = $this->controller->get_uploads_dir() . (isset($_REQUEST['dir']) ? esc_html($_REQUEST['dir']) : '');
47
+ $get_files_data = $this->get_files($session_data['sort_by'], $session_data['sort_order'],$ajax, $load_count);
48
+ $data['files'] = $get_files_data['files'];
49
+ $data['files_count'] = $get_files_data['files_count'];
50
  $data['extensions'] = (isset($_REQUEST['extensions']) ? esc_html($_REQUEST['extensions']) : '');
51
  $data['callback'] = (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : '');
52
  $data['image_for'] = (isset($_REQUEST['image_for']) ? esc_html($_REQUEST['image_for']) : '');
95
  return $components;
96
  }
97
 
98
+ function get_files($sort_by, $sort_order, $ajax = false, $load_count = 0) {
99
  $icons_dir_path = WD_S_DIR . '/filemanager/images/file_icons';
100
  $icons_dir_url = WD_S_URL . '/filemanager/images/file_icons';
101
  $valid_types = explode(',', isset($_REQUEST['extensions']) ? strtolower(esc_html($_REQUEST['extensions'])) : '*');
160
 
161
  // $result = $sort_order == 'asc' ? array_merge($dirs, $files) : array_merge($files, $dirs);
162
  $result = array_merge($dirs, $files);
163
+ $files_count = count($result);
164
+ if ($ajax && $load_count > 0) {
165
+ $images_count = 100;
166
+ $min_count = $images_count * ($load_count - 1);
167
+ $result = array_slice($result, $min_count, $images_count, true);
168
+ }
169
+ return array("files" => $result, "files_count" => $files_count) ;
170
  }
171
 
172
  private function get_sorted_file_names($parent_dir, $sort_by, $sort_order) {
filemanager/view.php CHANGED
@@ -29,7 +29,7 @@ class FilemanagerView {
29
  ////////////////////////////////////////////////////////////////////////////////////////
30
  // Public Methods //
31
  ////////////////////////////////////////////////////////////////////////////////////////
32
- public function display() {
33
  if (isset($_GET['filemanager_msg']) && esc_html($_GET['filemanager_msg']) != '') {
34
  ?>
35
  <div id="file_manager_message" style="height:40px;">
@@ -40,7 +40,7 @@ class FilemanagerView {
40
  <?php
41
  $_GET['filemanager_msg'] = '';
42
  }
43
- $file_manager_data = $this->model->get_file_manager_data();
44
  $items_view = $file_manager_data['session_data']['items_view'];
45
  $sort_by = $file_manager_data['session_data']['sort_by'];
46
  $sort_order = $file_manager_data['session_data']['sort_order'];
@@ -56,13 +56,12 @@ class FilemanagerView {
56
  <script src="<?php echo WD_S_URL; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js"></script>
57
  <script src="<?php echo WD_S_URL; ?>/filemanager/js/jq_uploader/jquery.fileupload.js"></script>
58
  <script>
 
59
  var DS = "<?php echo addslashes('/'); ?>";
60
 
61
  var errorLoadingFile = "<?php echo 'File loading failed'; ?>";
62
-
63
  var warningRemoveItems = "<?php echo 'Are you sure you want to permanently remove selected items?'; ?>";
64
  var warningCancelUploads = "<?php echo 'This will cancel uploads. Continue?'; ?>";
65
-
66
  var messageEnterDirName = "<?php echo 'Enter directory name'; ?>";
67
  var messageEnterNewName = "<?php echo 'Enter new name'; ?>";
68
  var messageFilesUploadComplete = "<?php echo 'Files upload complete'; ?>";
@@ -77,27 +76,26 @@ class FilemanagerView {
77
  var sortBy = "<?php echo $sort_by; ?>";
78
  var sortOrder = "<?php echo $sort_order; ?>";
79
  </script>
80
- <script src="<?php echo WD_S_URL; ?>/filemanager/js/default.js?ver=<?php echo get_option("wd_bwg_version"); ?>"></script>
81
- <link href="<?php echo WD_S_URL; ?>/filemanager/css/default.css?ver=<?php echo get_option("wd_bwg_version"); ?>" type="text/css" rel="stylesheet">
82
- <link href="<?php echo WD_S_URL; ?>/css/wds_tables_320.css?ver=<?php echo get_option("wd_bwg_version"); ?>" type="text/css" rel="stylesheet">
83
  <?php
84
  switch ($items_view) {
85
  case 'list':
86
  ?>
87
- <link href="<?php echo WD_S_URL; ?>/filemanager/css/default_view_list.css?ver=<?php echo get_option("wd_bwg_version"); ?>" type="text/css" rel="stylesheet">
88
  <?php
89
  break;
90
  case 'thumbs':
91
  ?>
92
- <link href="<?php echo WD_S_URL; ?>/filemanager/css/default_view_thumbs.css?ver=<?php echo get_option("wd_bwg_version"); ?>" type="text/css" rel="stylesheet">
93
  <?php
94
  break;
95
  }
96
  $i = 0;
97
  ?>
98
-
99
  <form id="adminForm" name="adminForm" action="" method="post">
100
- <?php wp_nonce_field('', 'nonce_wd'); ?>
101
  <div id="wrapper">
102
  <div id="opacity_div" style="background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
103
  <div id="loading_div" style="text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
@@ -119,7 +117,7 @@ class FilemanagerView {
119
  <span class="ctrl_bar_btn">
120
  <a id="upload_images" class="ctrl_bar_btn wd-btn wd-btn-primary wd-btn-icon wd-btn-uplaod" onclick="onBtnShowUploaderClick(event, this);"><?php _e('Upload files', 'wds'); ?></a>
121
  </span>
122
- <span class="ctrl_bar_divider"></span>
123
  <span id="search_by_name" class="ctrl_bar_btn">
124
  <input type="search" placeholder="Search" class="ctrl_bar_btn search_by_name">
125
  </span>
@@ -190,7 +188,7 @@ class FilemanagerView {
190
  </div>
191
  <div id="explorer_body_wrapper">
192
  <div id="explorer_body_container">
193
- <div id="explorer_body">
194
  <?php
195
  foreach ($file_manager_data['files'] as $key => $file) {
196
  $file['name'] = esc_html($file['name']);
@@ -263,8 +261,8 @@ class FilemanagerView {
263
  <div class="ctrls_bar ctrls_bar_header">
264
  <div class="ctrls_left upload_thumb">
265
  Thumbnail Maximum Dimensions:
266
- <input type="text" class="upload_thumb_dim" name="upload_thumb_width" id="upload_thumb_width" value="<?php echo /*$bwg_options->upload_thumb_width;*/ 300; ?>" /> x
267
- <input type="text" class="upload_thumb_dim" name="upload_thumb_height" id="upload_thumb_height" value="<?php echo /*$bwg_options->upload_thumb_height;*/ 300; ?>" /> px
268
  </div>
269
  <div class="ctrls_right">
270
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo 'Back'; ?>"></a>
29
  ////////////////////////////////////////////////////////////////////////////////////////
30
  // Public Methods //
31
  ////////////////////////////////////////////////////////////////////////////////////////
32
+ public function display($ajax = false, $load_count = 0) {
33
  if (isset($_GET['filemanager_msg']) && esc_html($_GET['filemanager_msg']) != '') {
34
  ?>
35
  <div id="file_manager_message" style="height:40px;">
40
  <?php
41
  $_GET['filemanager_msg'] = '';
42
  }
43
+ $file_manager_data = $this->model->get_file_manager_data($ajax, $load_count);
44
  $items_view = $file_manager_data['session_data']['items_view'];
45
  $sort_by = $file_manager_data['session_data']['sort_by'];
46
  $sort_order = $file_manager_data['session_data']['sort_order'];
56
  <script src="<?php echo WD_S_URL; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js"></script>
57
  <script src="<?php echo WD_S_URL; ?>/filemanager/js/jq_uploader/jquery.fileupload.js"></script>
58
  <script>
59
+ var ajaxurl = "<?php echo wp_nonce_url( admin_url('admin-ajax.php'), 'addImage', 'nonce_wd' ); ?>";
60
  var DS = "<?php echo addslashes('/'); ?>";
61
 
62
  var errorLoadingFile = "<?php echo 'File loading failed'; ?>";
 
63
  var warningRemoveItems = "<?php echo 'Are you sure you want to permanently remove selected items?'; ?>";
64
  var warningCancelUploads = "<?php echo 'This will cancel uploads. Continue?'; ?>";
 
65
  var messageEnterDirName = "<?php echo 'Enter directory name'; ?>";
66
  var messageEnterNewName = "<?php echo 'Enter new name'; ?>";
67
  var messageFilesUploadComplete = "<?php echo 'Files upload complete'; ?>";
76
  var sortBy = "<?php echo $sort_by; ?>";
77
  var sortOrder = "<?php echo $sort_order; ?>";
78
  </script>
79
+ <script src="<?php echo WD_S_URL; ?>/filemanager/js/default.js?ver=<?php echo WD_S_VERSION; ?>"></script>
80
+ <link href="<?php echo WD_S_URL; ?>/filemanager/css/default.css?ver=<?php echo WD_S_VERSION; ?>" type="text/css" rel="stylesheet">
81
+ <link href="<?php echo WD_S_URL; ?>/css/wds_tables_320.css?ver=<?php echo WD_S_VERSION; ?>" type="text/css" rel="stylesheet">
82
  <?php
83
  switch ($items_view) {
84
  case 'list':
85
  ?>
86
+ <link href="<?php echo WD_S_URL; ?>/filemanager/css/default_view_list.css?ver=<?php echo WD_S_VERSION; ?>" type="text/css" rel="stylesheet">
87
  <?php
88
  break;
89
  case 'thumbs':
90
  ?>
91
+ <link href="<?php echo WD_S_URL; ?>/filemanager/css/default_view_thumbs.css?ver=<?php echo WD_S_VERSION; ?>" type="text/css" rel="stylesheet">
92
  <?php
93
  break;
94
  }
95
  $i = 0;
96
  ?>
 
97
  <form id="adminForm" name="adminForm" action="" method="post">
98
+ <?php wp_nonce_field('', 'nonce_wd'); ?>
99
  <div id="wrapper">
100
  <div id="opacity_div" style="background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
101
  <div id="loading_div" style="text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
117
  <span class="ctrl_bar_btn">
118
  <a id="upload_images" class="ctrl_bar_btn wd-btn wd-btn-primary wd-btn-icon wd-btn-uplaod" onclick="onBtnShowUploaderClick(event, this);"><?php _e('Upload files', 'wds'); ?></a>
119
  </span>
120
+ <span class="ctrl_bar_divider"></span>
121
  <span id="search_by_name" class="ctrl_bar_btn">
122
  <input type="search" placeholder="Search" class="ctrl_bar_btn search_by_name">
123
  </span>
188
  </div>
189
  <div id="explorer_body_wrapper">
190
  <div id="explorer_body_container">
191
+ <div id="explorer_body" data-files_count="<?php echo $file_manager_data["files_count"];?>">
192
  <?php
193
  foreach ($file_manager_data['files'] as $key => $file) {
194
  $file['name'] = esc_html($file['name']);
261
  <div class="ctrls_bar ctrls_bar_header">
262
  <div class="ctrls_left upload_thumb">
263
  Thumbnail Maximum Dimensions:
264
+ <input type="text" class="upload_thumb_dim" name="upload_thumb_width" id="upload_thumb_width" value="<?php echo 300; ?>" /> x
265
+ <input type="text" class="upload_thumb_dim" name="upload_thumb_height" id="upload_thumb_height" value="<?php echo 300; ?>" /> px
266
  </div>
267
  <div class="ctrls_right">
268
  <a class="ctrl_bar_btn btn_back" onclick="onBtnBackClick(event, this);" title="<?php echo 'Back'; ?>"></a>
js/wds.js CHANGED
@@ -1,8 +1,16 @@
1
  jQuery(document).ready(function () {
2
  jQuery(".wds_form .colspanchange").attr("colspan", jQuery(".wds_form table>thead>tr>th").length);
 
 
 
 
 
3
  });
4
 
5
  function spider_ajax_save(form_id, event) {
 
 
 
6
  /* Loading.*/
7
  jQuery(".spider_load").show();
8
  set_ffamily_value();
@@ -589,36 +597,23 @@ function spider_form_submit(event, form_id) {
589
  }
590
  }
591
 
592
- // Check if required field is empty.
593
- function spider_check_required(id, name) {
594
- if (jQuery('#' + id).val() == '') {
595
- alert(name + '* field is required.');
596
- jQuery('#' + id).attr('style', 'border-color: #FF0000;');
597
- jQuery('#' + id).focus();
598
- jQuery('html, body').animate({
599
- scrollTop:jQuery('#' + id).offset().top - 200
600
- }, 500);
601
- return true;
602
- }
603
- else {
604
- return false;
605
- }
606
- }
607
-
608
- function wds_check_required(id, name) {
609
- if (jQuery('#' + id).val() == '') {
610
- alert(name + '* field is required.');
611
- wds_change_tab(jQuery(".wds_tab_label[tab_type='slides']"), 'wds_slides_box');
612
- jQuery('#' + id).attr('style', 'border-color: #FF0000;');
613
- jQuery('#' + id).focus();
614
- jQuery('html, body').animate({
615
- scrollTop:jQuery('#' + id).offset().top - 200
616
- }, 500);
617
- return true;
618
- }
619
- else {
620
- return false;
621
- }
622
  }
623
 
624
  // Show/hide order column and drag and drop column.
1
  jQuery(document).ready(function () {
2
  jQuery(".wds_form .colspanchange").attr("colspan", jQuery(".wds_form table>thead>tr>th").length);
3
+ jQuery(".wds_requried").each(function () {
4
+ jQuery(this).on("keypress", function () {
5
+ jQuery(this).removeAttr("style");
6
+ });
7
+ });
8
  });
9
 
10
  function spider_ajax_save(form_id, event) {
11
+ if (!wds_check_required()) {
12
+ return false;
13
+ }
14
  /* Loading.*/
15
  jQuery(".spider_load").show();
16
  set_ffamily_value();
597
  }
598
  }
599
 
600
+ // Check required fields.
601
+ function wds_check_required() {
602
+ var flag = true;
603
+ jQuery(".wds_requried").each(function () {
604
+ if (jQuery(this).val() == '') {
605
+ alert(jQuery(this).data('name') + ' is required.');
606
+ wds_change_tab(jQuery(".wds_tab_label[tab_type='slides']"), 'wds_slides_box');
607
+ jQuery(this).css({borderColor: '#FF0000'});
608
+ jQuery(this).focus();
609
+ jQuery('html, body').animate({
610
+ scrollTop:jQuery(this).offset().top - 200
611
+ }, 500);
612
+ flag = false;
613
+ return;
614
+ }
615
+ });
616
+ return flag;
 
 
 
 
 
 
 
 
 
 
 
 
 
617
  }
618
 
619
  // Show/hide order column and drag and drop column.
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-slider-plugin.html
4
  Tags: easy slider, gallery slider, image slider, images slider, Photo Slider, post slider, responsive slider, slider, slider plugin, video slider, wordpress slider, youtube slider
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
- Stable tag: 1.1.71
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -125,6 +125,11 @@ After downloading the ZIP file of the slider plugin,
125
 
126
  == Changelog ==
127
 
 
 
 
 
 
128
  = 1.1.71 =
129
  * Fixed: Save as copy.
130
 
4
  Tags: easy slider, gallery slider, image slider, images slider, Photo Slider, post slider, responsive slider, slider, slider plugin, video slider, wordpress slider, youtube slider
5
  Requires at least: 3.4
6
  Tested up to: 4.7
7
+ Stable tag: 1.1.72
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
125
 
126
  == Changelog ==
127
 
128
+ = 1.1.72 =
129
+ * Fixed: Warrning in admin popups.
130
+ * Fixed: Required field validation.
131
+ * Changed: Scroll load in filemanager.
132
+
133
  = 1.1.71 =
134
  * Fixed: Save as copy.
135
 
slider-wd.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Slider WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-slider-plugin.html
6
  * Description: This is a responsive plugin, which allows adding sliders to your posts/pages and to custom location. It uses large number of transition effects and supports various types of layers.
7
- * Version: 1.1.71
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -14,7 +14,7 @@ define('WD_S_NAME', plugin_basename(dirname(__FILE__)));
14
  define('WD_S_DIR', WP_PLUGIN_DIR . "/" . WD_S_NAME);
15
  define('WD_S_URL', plugins_url(WD_S_NAME));
16
 
17
- define('WD_S_VERSION', '1.1.71');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
@@ -308,12 +308,22 @@ function wds_filemanager_ajax() {
308
  global $wpdb;
309
  require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
310
  $page = WDW_S_Library::get('action');
 
311
  if (($page != '') && (($page == 'addImage') || ($page == 'addMusic'))) {
312
  WDW_S_Library::verify_nonce($page);
313
  require_once(WD_S_DIR . '/filemanager/controller.php');
314
  $controller_class = 'FilemanagerController';
315
  $controller = new $controller_class();
316
- $controller->execute();
 
 
 
 
 
 
 
 
 
317
  }
318
  }
319
  // Slider Widget.
@@ -530,6 +540,7 @@ function wds_front_end_scripts() {
530
  wp_enqueue_script('wds_jquery_mobile', WD_S_FRONT_URL . '/js/jquery.mobile.js', array('jquery'), WD_S_VERSION);
531
 
532
  wp_enqueue_script('wds_frontend', WD_S_FRONT_URL . '/js/wds_frontend.js', array('jquery'), WD_S_VERSION);
 
533
  wp_enqueue_style('wds_frontend', WD_S_FRONT_URL . '/css/wds_frontend.css', array(), WD_S_VERSION);
534
  wp_enqueue_style('wds_effects', WD_S_FRONT_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
535
 
@@ -542,6 +553,7 @@ function wds_front_end_scripts() {
542
  wp_register_script('wds_jquery_mobile', WD_S_FRONT_URL . '/js/jquery.mobile.js', array('jquery'), WD_S_VERSION);
543
 
544
  wp_register_script('wds_frontend', WD_S_FRONT_URL . '/js/wds_frontend.js', array('jquery'), WD_S_VERSION);
 
545
  wp_register_style('wds_frontend', WD_S_FRONT_URL . '/css/wds_frontend.css', array(), WD_S_VERSION);
546
  wp_register_style('wds_effects', WD_S_FRONT_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
547
 
4
  * Plugin Name: Slider WD
5
  * Plugin URI: https://web-dorado.com/products/wordpress-slider-plugin.html
6
  * Description: This is a responsive plugin, which allows adding sliders to your posts/pages and to custom location. It uses large number of transition effects and supports various types of layers.
7
+ * Version: 1.1.72
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
14
  define('WD_S_DIR', WP_PLUGIN_DIR . "/" . WD_S_NAME);
15
  define('WD_S_URL', plugins_url(WD_S_NAME));
16
 
17
+ define('WD_S_VERSION', '1.1.72');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
308
  global $wpdb;
309
  require_once(WD_S_DIR . '/framework/WDW_S_Library.php');
310
  $page = WDW_S_Library::get('action');
311
+
312
  if (($page != '') && (($page == 'addImage') || ($page == 'addMusic'))) {
313
  WDW_S_Library::verify_nonce($page);
314
  require_once(WD_S_DIR . '/filemanager/controller.php');
315
  $controller_class = 'FilemanagerController';
316
  $controller = new $controller_class();
317
+ $addImages_ajax = WDW_S_Library::get('addImages_ajax');
318
+ if ($addImages_ajax == 'addImages_ajax') {
319
+ $load_count = WDW_S_Library::get('load_count');
320
+ $images_list = $controller->get_images(intval($load_count));
321
+ echo (json_encode($images_list, true));
322
+ die;
323
+ }
324
+ else {
325
+ $controller->execute(true, 1);
326
+ }
327
  }
328
  }
329
  // Slider Widget.
540
  wp_enqueue_script('wds_jquery_mobile', WD_S_FRONT_URL . '/js/jquery.mobile.js', array('jquery'), WD_S_VERSION);
541
 
542
  wp_enqueue_script('wds_frontend', WD_S_FRONT_URL . '/js/wds_frontend.js', array('jquery'), WD_S_VERSION);
543
+
544
  wp_enqueue_style('wds_frontend', WD_S_FRONT_URL . '/css/wds_frontend.css', array(), WD_S_VERSION);
545
  wp_enqueue_style('wds_effects', WD_S_FRONT_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
546
 
553
  wp_register_script('wds_jquery_mobile', WD_S_FRONT_URL . '/js/jquery.mobile.js', array('jquery'), WD_S_VERSION);
554
 
555
  wp_register_script('wds_frontend', WD_S_FRONT_URL . '/js/wds_frontend.js', array('jquery'), WD_S_VERSION);
556
+
557
  wp_register_style('wds_frontend', WD_S_FRONT_URL . '/css/wds_frontend.css', array(), WD_S_VERSION);
558
  wp_register_style('wds_effects', WD_S_FRONT_URL . '/css/wds_effects.css', array(), WD_S_VERSION);
559