Slider by WD – Responsive Slider - Version 1.1.73

Version Description

  • Fixed: Deleting newly added slides and layers.
  • Fixed: Slider height with horizontal filmstrip.
  • Fixed: Share slides.
  • Fixed: Scroll load.
  • Fixed: Video slide and layer poster in backend.
  • Fixed: Image thumbnail in backend with single quote in name.
Download this release

Release Info

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

Code changes from version 1.1.72 to 1.1.73

admin/controllers/WDSControllerGoptions_wds.php CHANGED
@@ -46,14 +46,8 @@ class WDSControllerGoptions_wds {
46
  public function save() {
47
  $wds_register_scripts = (isset($_REQUEST['wds_register_scripts']) ? (int) $_REQUEST['wds_register_scripts'] : 0);
48
  $loading_gif = (isset($_REQUEST['loading_gif']) ? esc_html($_REQUEST['loading_gif']) : 0);
49
- if (get_option("wds_register_scripts") !== false) {
50
- update_option("wds_register_scripts", $wds_register_scripts);
51
- update_option("wds_loading_gif", $loading_gif);
52
- }
53
- else {
54
- add_option("wds_register_scripts", $wds_register_scripts, 0, 'no');
55
- add_option("wds_loading_gif", $loading_gif, 0, 'no');
56
- }
57
  $page = WDW_S_Library::get('page');
58
  WDW_S_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => 1), admin_url('admin.php')));
59
  }
46
  public function save() {
47
  $wds_register_scripts = (isset($_REQUEST['wds_register_scripts']) ? (int) $_REQUEST['wds_register_scripts'] : 0);
48
  $loading_gif = (isset($_REQUEST['loading_gif']) ? esc_html($_REQUEST['loading_gif']) : 0);
49
+ update_option("wds_register_scripts", $wds_register_scripts);
50
+ update_option("wds_loading_gif", $loading_gif);
 
 
 
 
 
 
51
  $page = WDW_S_Library::get('page');
52
  WDW_S_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => 1), admin_url('admin.php')));
53
  }
admin/models/WDSModelSliders_wds.php CHANGED
@@ -48,10 +48,8 @@ class WDSModelSliders_wds {
48
  }
49
  else {
50
  foreach ($rows as $row) {
51
- if ($row->type == 'image') {
52
- $row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WD_S_URL . '/images/no-image.png';
53
- $row->thumb_url = $row->thumb_url ? str_replace('{site_url}', site_url(), $row->thumb_url) : WD_S_URL . '/images/no-image.png';
54
- }
55
  }
56
  }
57
  return $rows;
@@ -61,20 +59,23 @@ class WDSModelSliders_wds {
61
  global $wpdb;
62
  $rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdslayer WHERE slide_id='%d' ORDER BY `depth` ASC", $slide_id));
63
  foreach ($rows as $row) {
64
- if ($row->type == 'image') {
65
- $row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WD_S_URL . '/images/no-image.png';
66
- }
67
  }
68
  return $rows;
69
  }
70
 
71
  public function get_slider_prev_img($slider_id) {
72
  global $wpdb;
73
- $slider = $wpdb->get_row($wpdb->prepare("SELECT `thumb_url`, `type` FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d' ORDER BY `order` ASC", $slider_id));
74
- $prev_img_url = $slider->type == 'video' && ctype_digit($slider->thumb_url) ? (wp_get_attachment_url(get_post_thumbnail_id($slider->thumb_url)) ? wp_get_attachment_url(get_post_thumbnail_id($slider->thumb_url)) : WD_S_URL . '/images/no-video.png' ) : $slider->thumb_url;
75
- $prev_img_url = $prev_img_url ? $prev_img_url : WD_S_URL . '/images/no-image.png';
76
- $prev_img_url = str_replace('{site_url}', site_url(), $prev_img_url);
77
- return $prev_img_url;
 
 
 
 
 
78
  }
79
 
80
  public function get_rows_data() {
48
  }
49
  else {
50
  foreach ($rows as $row) {
51
+ $row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WD_S_URL . '/images/no-image.png';
52
+ $row->thumb_url = $row->thumb_url ? str_replace('{site_url}', site_url(), $row->thumb_url) : WD_S_URL . '/images/no-image.png';
 
 
53
  }
54
  }
55
  return $rows;
59
  global $wpdb;
60
  $rows = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "wdslayer WHERE slide_id='%d' ORDER BY `depth` ASC", $slide_id));
61
  foreach ($rows as $row) {
62
+ $row->image_url = $row->image_url ? str_replace('{site_url}', site_url(), $row->image_url) : WD_S_URL . '/images/no-image.png';
 
 
63
  }
64
  return $rows;
65
  }
66
 
67
  public function get_slider_prev_img($slider_id) {
68
  global $wpdb;
69
+ $slider = $wpdb->get_row($wpdb->prepare("SELECT `thumb_url`, `type` FROM " . $wpdb->prefix . "wdsslide WHERE slider_id='%d' ORDER BY `order` ASC", $slider_id));
70
+ $preview_img_url = WD_S_URL . '/images/no-image.png';
71
+ if ($slider) {
72
+ $img_url = $slider->type == 'video' && ctype_digit($slider->thumb_url) ? (wp_get_attachment_url(get_post_thumbnail_id($slider->thumb_url)) ? wp_get_attachment_url(get_post_thumbnail_id($slider->thumb_url)) : WD_S_URL . '/images/no-video.png') : $slider->thumb_url;
73
+ if ($img_url) {
74
+ $preview_img_url = $img_url;
75
+ $preview_img_url = str_replace('{site_url}', site_url(), $preview_img_url);
76
+ }
77
+ }
78
+ return $preview_img_url;
79
  }
80
 
81
  public function get_rows_data() {
admin/views/WDSViewSliders_wds.php CHANGED
@@ -116,9 +116,9 @@ class WDSViewSliders_wds {
116
  <a href="" class="add-new-h2" onclick="spider_set_input_value('task', 'add');
117
  spider_form_submit(event, 'sliders_form')">Add new</a>
118
  </h2>
119
- <div class="buttons_div_right">
120
- <input type="button" class="wds_button-secondary wds_import" onclick="alert('This functionality is disabled in free version.')" value="Import" />
121
- </div>
122
  </div>
123
  <?php WDW_S_Library::search('Name', $search_value, 'sliders_form'); ?>
124
  <div class="tablenav bottom buttons_div buttons_div_left">
@@ -584,7 +584,7 @@ class WDSViewSliders_wds {
584
  <form class="wrap wds_form" method="post" id="sliders_form" action="admin.php?page=sliders_wds" style="float: left; width: 99%;">
585
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
586
  <span class="slider-icon"></span>
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>
@@ -2220,7 +2220,7 @@ class WDSViewSliders_wds {
2220
  <tr style="display: block;">
2221
  <td colspan="4" style="display: block;">
2222
  <div class="bgcolor wds_tabs wbs_subtab aui-sortable">
2223
- <h2 class="titles">Slides<h2>
2224
  <?php
2225
  foreach ($slides_row as $key => $slide_row) {
2226
  ?>
@@ -2240,7 +2240,7 @@ class WDSViewSliders_wds {
2240
  </script>
2241
  <div id="wds_subtab_wrap<?php echo $slide_row->id; ?>" class="wds_subtab_wrap connectedSortable">
2242
  <div id="wbs_subtab<?php echo $slide_row->id; ?>" class="tab_link <?php echo (((($id == 0 || !$sub_tab_type) || (strpos($sub_tab_type, 'pr') !== FALSE)) && $key == 0) || ('slide' . $slide_row->id == $sub_tab_type)) ? 'wds_sub_active' : ''; ?>" href="#" >
2243
- <div style="background-image:url('<?php echo $slide_row->type != 'image' ? ($slide_row->type == 'video' && ctype_digit($slide_row->thumb_url) ? (wp_get_attachment_url(get_post_thumbnail_id($slide_row->thumb_url)) ? wp_get_attachment_url(get_post_thumbnail_id($slide_row->thumb_url)) : WD_S_URL . '/images/no-video.png') : $slide_row->thumb_url) : $slide_row->thumb_url ?>');background-position: center" class="tab_image" id="wds_tab_image<?php echo $slide_row->id; ?>" >
2244
  <div class="tab_buttons">
2245
  <div class="handle_wrap">
2246
  <div class="handle" title="Drag to re-order"></div>
@@ -2278,8 +2278,7 @@ class WDSViewSliders_wds {
2278
  }
2279
  ?>
2280
  <div class="wds_subtab_wrap new_tab_image">
2281
- <div class="new_tab_link" onclick="wds_add_slide()">
2282
- </div>
2283
  </div>
2284
  <div class="wds_clear"></div>
2285
  </div>
@@ -2424,7 +2423,7 @@ class WDSViewSliders_wds {
2424
  </tr>
2425
  <tr class="bgcolor">
2426
  <td colspan="4">
2427
- <h2 class="titles">Layers<h2>
2428
  <div id="layer_add_buttons">
2429
  <div class="layer_add_buttons_wrap">
2430
  <button class="action_buttons add_text_layer <?php echo !$fv ? "" : "wds_free_button"; ?> button-small" onclick="<?php echo !$fv ? "wds_add_layer('text', '" . $slide_row->id . "')" : "alert('This functionality is disabled in free version.')"; ?>; return false;" >Add Text Layer</button>
116
  <a href="" class="add-new-h2" onclick="spider_set_input_value('task', 'add');
117
  spider_form_submit(event, 'sliders_form')">Add new</a>
118
  </h2>
119
+ </div>
120
+ <div class="buttons_div_right">
121
+ <input type="button" class="wds_button-secondary wds_import" onclick="alert('This functionality is disabled in free version.')" value="Import" />
122
  </div>
123
  <?php WDW_S_Library::search('Name', $search_value, 'sliders_form'); ?>
124
  <div class="tablenav bottom buttons_div buttons_div_left">
584
  <form class="wrap wds_form" method="post" id="sliders_form" action="admin.php?page=sliders_wds" style="float: left; width: 99%;">
585
  <?php wp_nonce_field('nonce_wd', 'nonce_wd'); ?>
586
  <span class="slider-icon"></span>
587
+ <h2 class="wds_default"><?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>
2220
  <tr style="display: block;">
2221
  <td colspan="4" style="display: block;">
2222
  <div class="bgcolor wds_tabs wbs_subtab aui-sortable">
2223
+ <h2 class="titles">Slides</h2>
2224
  <?php
2225
  foreach ($slides_row as $key => $slide_row) {
2226
  ?>
2240
  </script>
2241
  <div id="wds_subtab_wrap<?php echo $slide_row->id; ?>" class="wds_subtab_wrap connectedSortable">
2242
  <div id="wbs_subtab<?php echo $slide_row->id; ?>" class="tab_link <?php echo (((($id == 0 || !$sub_tab_type) || (strpos($sub_tab_type, 'pr') !== FALSE)) && $key == 0) || ('slide' . $slide_row->id == $sub_tab_type)) ? 'wds_sub_active' : ''; ?>" href="#" >
2243
+ <div style='background-image:url("<?php echo $slide_row->type != 'image' ? ($slide_row->type == 'video' && ctype_digit($slide_row->thumb_url) ? (wp_get_attachment_url(get_post_thumbnail_id($slide_row->thumb_url)) ? wp_get_attachment_url(get_post_thumbnail_id($slide_row->thumb_url)) : WD_S_URL . '/images/no-video.png') : $slide_row->thumb_url) : $slide_row->thumb_url ?>");background-position: center' class="tab_image" id="wds_tab_image<?php echo $slide_row->id; ?>" >
2244
  <div class="tab_buttons">
2245
  <div class="handle_wrap">
2246
  <div class="handle" title="Drag to re-order"></div>
2278
  }
2279
  ?>
2280
  <div class="wds_subtab_wrap new_tab_image">
2281
+ <div class="new_tab_link" onclick="wds_add_slide()"></div>
 
2282
  </div>
2283
  <div class="wds_clear"></div>
2284
  </div>
2423
  </tr>
2424
  <tr class="bgcolor">
2425
  <td colspan="4">
2426
+ <h2 class="titles">Layers</h2>
2427
  <div id="layer_add_buttons">
2428
  <div class="layer_add_buttons_wrap">
2429
  <button class="action_buttons add_text_layer <?php echo !$fv ? "" : "wds_free_button"; ?> button-small" onclick="<?php echo !$fv ? "wds_add_layer('text', '" . $slide_row->id . "')" : "alert('This functionality is disabled in free version.')"; ?>; return false;" >Add Text Layer</button>
css/wds_tables.css CHANGED
@@ -1,7 +1,16 @@
1
- .wds_form h2 {
2
  font-size: 23px;
3
  font-weight: normal;
4
- padding: 5px 15px 4px 0;
 
 
 
 
 
 
 
 
 
5
  margin: 0;
6
  }
7
 
@@ -234,9 +243,9 @@
234
  background-repeat: no-repeat;
235
  border: none;
236
  float: left;
237
- height: 30px;
238
- margin: 0 8px 0 0;
239
- width: 30px;
240
  }
241
 
242
  .spider_label {
@@ -1050,7 +1059,7 @@ span[data-type="wds_text_parent"] * {
1050
  color:#FFFFFF;
1051
  }
1052
 
1053
- #tbody_arr .action_buttons{
1054
  padding: 0 7px 1px 32px;
1055
  margin: 0 2px 0 0;
1056
  display: inline-block;
@@ -1068,42 +1077,34 @@ span[data-type="wds_text_parent"] * {
1068
  color:#FFFFFF;
1069
  }
1070
 
1071
- .wds_buttons .action_buttons{
1072
  padding: 0 7px 1px 30px;
1073
  line-height: 34px;
1074
  height: 34px
1075
  }
1076
 
1077
- /* .wrap a {
1078
- color: #000000 !important;
1079
  }
1080
 
1081
- .wrap a:hover {
1082
- color: #00A0D2 !important;
1083
- }
1084
- */
1085
- .buttons_conteiner{
1086
- margin:10px 0 0
1087
- }
1088
-
1089
- #wds_preview{
1090
  background-color:#00A2D0;
1091
  line-height: 30px;
1092
  height: 30px;
1093
  border-bottom: 3px solid #258AA6;
1094
  }
1095
 
1096
- tbody .action_buttons{
1097
  padding: 0 7px 1px 32px;
1098
  line-height: 34px;
1099
- height: 34px
1100
  }
1101
 
1102
- .layer_bgcolor{
1103
  background-color: #FFFFFF !important;
1104
  }
1105
 
1106
- .bgcolor td{
1107
  padding: 20px !important;
1108
  }
1109
 
@@ -1111,29 +1112,30 @@ tbody .action_buttons{
1111
  background-color: #FFFFFF !important;
1112
  padding: 20px !important;
1113
  }
1114
- .edit_slide{
 
1115
  color: white !important;
1116
  background-image:url('../images/sliderwdpng/add.png');
1117
  background-position: 5% 50%;
1118
  }
1119
 
1120
- .add_by_url{
1121
  background-image:url('../images/sliderwdpng/add_url.png');
1122
  background-position: 5% 50%;
1123
  }
1124
 
1125
- .embed_media{
1126
  background-image:url('../images/sliderwdpng/media.png');
1127
  background-position: 5% 50%;
1128
  }
1129
 
1130
- .add_post{
1131
  color: white !important;
1132
  background-image:url('../images/sliderwdpng/add_text_layer.png');
1133
  background-position: 10% 50%;
1134
  }
1135
 
1136
- .delete{
1137
  background-image:url('../images/sliderwdpng/delete.png');
1138
  background-position: 10% 50%;
1139
  background-color:#D14130 !important;
@@ -1141,31 +1143,31 @@ tbody .action_buttons{
1141
 
1142
  }
1143
 
1144
- .add_text_layer{
1145
  color: white !important;
1146
  background-image:url('../images/sliderwdpng/add_text_layer.png');
1147
  background-position: 5% 50%;
1148
  }
1149
 
1150
- .add_image_layer{
1151
  color: white !important;
1152
  background-image:url('../images/sliderwdpng/add_image_layer.png');
1153
  background-position: 5% 50%;
1154
  }
1155
 
1156
- .add_embed_layer{
1157
  color: white !important;
1158
  background-image:url('../images/sliderwdpng/media.png');
1159
  background-position: 5% 50%;
1160
  }
1161
 
1162
- .add_social_layer{
1163
  background-image:url('../images/sliderwdpng/add_social.png');
1164
  background-position: 5% 50%;
1165
  background-repeat:no-repeat;
1166
  }
1167
 
1168
- .add_hotspot_layer{
1169
  background-image:url('../images/sliderwdpng/add_hotspot.png');
1170
  background-position: 5% 50%;
1171
  }
@@ -1176,7 +1178,6 @@ tbody .action_buttons{
1176
  height:100%;
1177
  position:relative;
1178
  border:1px solid #B4AFAF;
1179
-
1180
  }
1181
 
1182
  .new_tab_image {
@@ -1190,18 +1191,19 @@ tbody .action_buttons{
1190
  height: 130px !important;
1191
  }
1192
 
1193
- .tab_buttons{
1194
- position:absolute;
1195
- bottom:0px;
1196
- background-color:#F1F1F1;
1197
- width:100%;
 
1198
  }
1199
 
1200
- .tab_link, .new_tab_link{
1201
- display:block !important;
1202
- width:100% !important;
1203
- height:100% !important;
1204
- padding:0 !important;
1205
  }
1206
 
1207
  .select_icon {
@@ -1231,25 +1233,25 @@ tbody .action_buttons{
1231
  }
1232
 
1233
  #hover_buttons {
1234
- position:absolute;
1235
- top:0;
1236
- bottom:0;
1237
- left:0;
1238
- right:0;
1239
- margin:auto;
1240
- width:86px;
1241
- height:19px;
1242
  }
1243
 
1244
- .layer_table_left{
1245
- float:left !important;
1246
- }
1247
- .layer_table_right{
1248
- float:right !important;
 
1249
  }
1250
 
1251
  .slider_title_conteiner {
1252
- /* background-color: white; */
1253
  padding: 2px 11px;
1254
  width: 35%;
1255
  float: left;
@@ -1259,21 +1261,21 @@ tbody .action_buttons{
1259
  width: 80%;
1260
  }
1261
 
1262
- .slider_title_conteiner input{
1263
- box-shadow:none;
1264
- height: 30px
1265
  }
1266
 
1267
- .tab_conteiner{
1268
- float:left ;
1269
- margin-bottom:2px;
1270
  }
1271
 
1272
- .wds_subtab_wrap{
1273
- width:12%;
1274
- height:130px;
1275
- float:left;
1276
- margin:12px
1277
  }
1278
 
1279
  .tab_button_wrap {
@@ -1726,6 +1728,7 @@ th.sorted a span {
1726
  float: right;
1727
  padding: 4px 0;
1728
  }
 
1729
  .wds_nav_buttons {
1730
  background-position-y: 22%;
1731
  color: #FFFFFF !important;
@@ -1747,6 +1750,7 @@ th.sorted a span {
1747
  -moz-box-sizing: border-box;
1748
  box-sizing: border-box;
1749
  }
 
1750
  .wds_bull_buttons {
1751
  background-position-y: 22%;
1752
  color: #FFFFFF !important;
@@ -1768,8 +1772,9 @@ th.sorted a span {
1768
  -moz-box-sizing: border-box;
1769
  box-sizing: border-box;
1770
  }
 
1771
  .wds_not_image_buttons {
1772
- background-position-y: 22%;
1773
  color: #FFFFFF !important;
1774
  background-repeat: no-repeat;
1775
  background-color: #00A0D2;
@@ -1790,6 +1795,7 @@ th.sorted a span {
1790
  -moz-box-sizing: border-box;
1791
  box-sizing: border-box;
1792
  }
 
1793
  .wds_reverse_buttons {
1794
  background-color: #FFFFFF;
1795
  padding: 0 7px;
@@ -1806,10 +1812,11 @@ th.sorted a span {
1806
  -webkit-box-sizing: border-box;
1807
  -moz-box-sizing: border-box;
1808
  box-sizing: border-box;
1809
- color:#666;
1810
  }
1811
- .wds_not_image_buttons_grey{
1812
- background-position-y: 22%;
 
1813
  color: #666 !important;
1814
  background-repeat: no-repeat;
1815
  background-color: #F0F0F0;
@@ -1839,4 +1846,8 @@ th.sorted a span {
1839
 
1840
  #select_slider_merge option {
1841
  display: none;
 
 
 
 
1842
  }
1
+ .wds_form .titles {
2
  font-size: 23px;
3
  font-weight: normal;
4
+ line-height: 29px;
5
+ padding: 0 0 10px 0;
6
+ margin: 0;
7
+ }
8
+
9
+ .wds_form .wds_default {
10
+ font-size: 23px;
11
+ font-weight: normal;
12
+ line-height: 60px;
13
+ padding: 0;
14
  margin: 0;
15
  }
16
 
243
  background-repeat: no-repeat;
244
  border: none;
245
  float: left;
246
+ height: 60px;
247
+ margin: 0 10px 0 0;
248
+ width: 60px;
249
  }
250
 
251
  .spider_label {
1059
  color:#FFFFFF;
1060
  }
1061
 
1062
+ #tbody_arr .action_buttons {
1063
  padding: 0 7px 1px 32px;
1064
  margin: 0 2px 0 0;
1065
  display: inline-block;
1077
  color:#FFFFFF;
1078
  }
1079
 
1080
+ .wds_buttons .action_buttons {
1081
  padding: 0 7px 1px 30px;
1082
  line-height: 34px;
1083
  height: 34px
1084
  }
1085
 
1086
+ .buttons_conteiner {
1087
+ margin: 10px 0 0;
1088
  }
1089
 
1090
+ #wds_preview {
 
 
 
 
 
 
 
 
1091
  background-color:#00A2D0;
1092
  line-height: 30px;
1093
  height: 30px;
1094
  border-bottom: 3px solid #258AA6;
1095
  }
1096
 
1097
+ tbody .action_buttons {
1098
  padding: 0 7px 1px 32px;
1099
  line-height: 34px;
1100
+ height: 34px;
1101
  }
1102
 
1103
+ .layer_bgcolor {
1104
  background-color: #FFFFFF !important;
1105
  }
1106
 
1107
+ .bgcolor td {
1108
  padding: 20px !important;
1109
  }
1110
 
1112
  background-color: #FFFFFF !important;
1113
  padding: 20px !important;
1114
  }
1115
+
1116
+ .edit_slide {
1117
  color: white !important;
1118
  background-image:url('../images/sliderwdpng/add.png');
1119
  background-position: 5% 50%;
1120
  }
1121
 
1122
+ .add_by_url {
1123
  background-image:url('../images/sliderwdpng/add_url.png');
1124
  background-position: 5% 50%;
1125
  }
1126
 
1127
+ .embed_media {
1128
  background-image:url('../images/sliderwdpng/media.png');
1129
  background-position: 5% 50%;
1130
  }
1131
 
1132
+ .add_post {
1133
  color: white !important;
1134
  background-image:url('../images/sliderwdpng/add_text_layer.png');
1135
  background-position: 10% 50%;
1136
  }
1137
 
1138
+ .delete {
1139
  background-image:url('../images/sliderwdpng/delete.png');
1140
  background-position: 10% 50%;
1141
  background-color:#D14130 !important;
1143
 
1144
  }
1145
 
1146
+ .add_text_layer {
1147
  color: white !important;
1148
  background-image:url('../images/sliderwdpng/add_text_layer.png');
1149
  background-position: 5% 50%;
1150
  }
1151
 
1152
+ .add_image_layer {
1153
  color: white !important;
1154
  background-image:url('../images/sliderwdpng/add_image_layer.png');
1155
  background-position: 5% 50%;
1156
  }
1157
 
1158
+ .add_embed_layer {
1159
  color: white !important;
1160
  background-image:url('../images/sliderwdpng/media.png');
1161
  background-position: 5% 50%;
1162
  }
1163
 
1164
+ .add_social_layer {
1165
  background-image:url('../images/sliderwdpng/add_social.png');
1166
  background-position: 5% 50%;
1167
  background-repeat:no-repeat;
1168
  }
1169
 
1170
+ .add_hotspot_layer {
1171
  background-image:url('../images/sliderwdpng/add_hotspot.png');
1172
  background-position: 5% 50%;
1173
  }
1178
  height:100%;
1179
  position:relative;
1180
  border:1px solid #B4AFAF;
 
1181
  }
1182
 
1183
  .new_tab_image {
1191
  height: 130px !important;
1192
  }
1193
 
1194
+ .tab_buttons {
1195
+ position: absolute;
1196
+ bottom: 0px;
1197
+ background-color: #F1F1F1;
1198
+ width: 100%;
1199
+ line-height: 29px;
1200
  }
1201
 
1202
+ .tab_link, .new_tab_link {
1203
+ display: block !important;
1204
+ width: 100% !important;
1205
+ height: 100% !important;
1206
+ padding: 0 !important;
1207
  }
1208
 
1209
  .select_icon {
1233
  }
1234
 
1235
  #hover_buttons {
1236
+ position: absolute;
1237
+ top: 0;
1238
+ bottom: 0;
1239
+ left: 0;
1240
+ right: 0;
1241
+ margin: auto;
1242
+ width: 86px;
1243
+ height: 19px;
1244
  }
1245
 
1246
+ .layer_table_left {
1247
+ float: left !important;
1248
+ }
1249
+
1250
+ .layer_table_right {
1251
+ float: right !important;
1252
  }
1253
 
1254
  .slider_title_conteiner {
 
1255
  padding: 2px 11px;
1256
  width: 35%;
1257
  float: left;
1261
  width: 80%;
1262
  }
1263
 
1264
+ .slider_title_conteiner input {
1265
+ box-shadow: none;
1266
+ height: 30px;
1267
  }
1268
 
1269
+ .tab_conteiner {
1270
+ float: left;
1271
+ margin-bottom: 2px;
1272
  }
1273
 
1274
+ .wds_subtab_wrap {
1275
+ width: 12%;
1276
+ height: 130px;
1277
+ float: left;
1278
+ margin: 5px;
1279
  }
1280
 
1281
  .tab_button_wrap {
1728
  float: right;
1729
  padding: 4px 0;
1730
  }
1731
+
1732
  .wds_nav_buttons {
1733
  background-position-y: 22%;
1734
  color: #FFFFFF !important;
1750
  -moz-box-sizing: border-box;
1751
  box-sizing: border-box;
1752
  }
1753
+
1754
  .wds_bull_buttons {
1755
  background-position-y: 22%;
1756
  color: #FFFFFF !important;
1772
  -moz-box-sizing: border-box;
1773
  box-sizing: border-box;
1774
  }
1775
+
1776
  .wds_not_image_buttons {
1777
+ background-position-y: 22%;
1778
  color: #FFFFFF !important;
1779
  background-repeat: no-repeat;
1780
  background-color: #00A0D2;
1795
  -moz-box-sizing: border-box;
1796
  box-sizing: border-box;
1797
  }
1798
+
1799
  .wds_reverse_buttons {
1800
  background-color: #FFFFFF;
1801
  padding: 0 7px;
1812
  -webkit-box-sizing: border-box;
1813
  -moz-box-sizing: border-box;
1814
  box-sizing: border-box;
1815
+ color: #666;
1816
  }
1817
+
1818
+ .wds_not_image_buttons_grey {
1819
+ background-position-y: 22%;
1820
  color: #666 !important;
1821
  background-repeat: no-repeat;
1822
  background-color: #F0F0F0;
1846
 
1847
  #select_slider_merge option {
1848
  display: none;
1849
+ }
1850
+
1851
+ .wds_category_name {
1852
+ height: 32px;
1853
  }
filemanager/UploadHandler.php CHANGED
@@ -498,7 +498,7 @@ class wds_UploadHandler {
498
  // into different directories or replacing hidden system files.
499
  // Also remove control characters and spaces (\x00..\x20) around the filename:
500
  $name = trim(stripslashes($name), ".\x00..\x20");
501
- $name = str_replace(" ", "_", $name);
502
  // Use a timestamp for empty filenames:
503
  if (!$name) {
504
  $name = str_replace('.', '-', microtime(true));
498
  // into different directories or replacing hidden system files.
499
  // Also remove control characters and spaces (\x00..\x20) around the filename:
500
  $name = trim(stripslashes($name), ".\x00..\x20");
501
+ $name = str_replace(array(" ",'%'), array("_",''), $name);
502
  // Use a timestamp for empty filenames:
503
  if (!$name) {
504
  $name = str_replace('.', '-', microtime(true));
filemanager/controller.php CHANGED
@@ -36,14 +36,13 @@ class FilemanagerController {
36
  ////////////////////////////////////////////////////////////////////////////////////////
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,20 +54,13 @@ class FilemanagerController {
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() {
36
  ////////////////////////////////////////////////////////////////////////////////////////
37
  // Public Methods //
38
  ////////////////////////////////////////////////////////////////////////////////////////
39
+ public function execute() {
 
40
  $task = isset($_REQUEST['task']) ? stripslashes(esc_html($_REQUEST['task'])) : 'display';
41
  if (method_exists($this, $task)) {
42
+ $this->$task();
43
  }
44
  else {
45
+ $this->display();
46
  }
47
  }
48
 
54
  return $this->uploads_url;
55
  }
56
 
57
+ public function display() {
58
  require_once WD_S_DIR . '/filemanager/model.php';
59
  $model = new FilemanagerModel($this);
60
 
61
  require_once WD_S_DIR . '/filemanager/view.php';
62
  $view = new FilemanagerView($this, $model);
63
+ $view->display();
 
 
 
 
 
 
 
64
  }
65
 
66
  public function make_dir() {
filemanager/js/default.js CHANGED
@@ -4,68 +4,40 @@
4
  * Time: 3:56 PM
5
  */
6
 
7
-
8
- ////////////////////////////////////////////////////////////////////////////////////////
9
- // Events //
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- ////////////////////////////////////////////////////////////////////////////////////////
12
- // Constants //
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- ////////////////////////////////////////////////////////////////////////////////////////
15
- // Variables //
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
  var keyFileSelected;
18
  var keyFileSelectedML;
19
  var filesSelected;
20
- var filesSelectedML;
21
  var dragFiles;
22
  var isUploading;
23
 
24
  var ajax = true;
25
- var item_number = 100;
26
- ////////////////////////////////////////////////////////////////////////////////////////
27
- // Constructor //
28
- ////////////////////////////////////////////////////////////////////////////////////////
29
- ////////////////////////////////////////////////////////////////////////////////////////
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")});
70
  }
71
  else {
@@ -76,7 +48,6 @@ jQuery(document).ready(function () {
76
  }
77
  setTimeout(function(){loaded()}, 10000);
78
  filesSelected = [];
79
- filesSelectedML = [];
80
  dragFiles = [];
81
 
82
  //file manager under system messages
@@ -112,12 +83,6 @@ jQuery(document).ready(function () {
112
  });
113
  });
114
 
115
- ////////////////////////////////////////////////////////////////////////////////////////
116
- // Getters & Setters //
117
- ////////////////////////////////////////////////////////////////////////////////////////
118
- ////////////////////////////////////////////////////////////////////////////////////////
119
- // Private Methods //
120
- ////////////////////////////////////////////////////////////////////////////////////////
121
  function loaded() {
122
  jQuery("#opacity_div").hide();
123
  jQuery("#loading_div").hide();
@@ -128,8 +93,22 @@ function getClipboardFiles() {
128
  }
129
 
130
  function submit(task, sortBy, sortOrder, itemsView, destDir, fileNewName, newDirName, clipboardTask, clipboardFiles, clipboardSrc, clipboardDest) {
131
- fileNames = filesSelected.join("**#**");
132
- fileNamesML = filesSelectedML.join("**@**");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  switch (task) {
134
  case "rename_item":
135
  destDir = dir;
@@ -184,9 +163,6 @@ function submit(task, sortBy, sortOrder, itemsView, destDir, fileNewName, newDir
184
  if (fileNames != null) {
185
  jQuery("form[name=adminForm]").find("input[name=file_names]").val(fileNames);
186
  }
187
- if (fileNamesML != null) {
188
- jQuery("form[name=adminForm]").find("input[name=file_namesML]").val(fileNamesML);
189
- }
190
  if (fileNewName != null) {
191
  jQuery("form[name=adminForm]").find("input[name=file_new_name]").val(fileNewName);
192
  }
@@ -221,8 +197,6 @@ function updateFileNames() {
221
  jQuery("#file_names_span span").html(result);
222
  }
223
 
224
-
225
- // submit file
226
  function submitFiles() {
227
  if (filesSelected.length == 0) {
228
  return;
@@ -232,6 +206,28 @@ function submitFiles() {
232
  return;
233
  }
234
  var filesValid = [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  for (var i = 0; i < filesSelected.length; i++) {
236
  var file_object = jQuery('.explorer_item[name="' + filesSelected[i] + '"]');
237
  if (jQuery(file_object).attr("isDir") == "false") {
@@ -247,22 +243,13 @@ function submitFiles() {
247
  fileData['date_modified'] = jQuery(file_object).attr("date_modified");
248
  fileData['resolution'] = jQuery(file_object).attr("fileresolution");
249
  filesValid.push(fileData);
 
250
  }
251
  }
252
  window.parent[callback](filesValid, image_for, slide_id, layer_id);
253
  window.parent.tb_remove();
254
  }
255
 
256
- function importFiles() {
257
- if (filesSelectedML.length == 0) {
258
- alert("Select at least one file to import.");
259
- return;
260
- }
261
- else {
262
- submit("import_items", null, null, null, null, null, null, null, null, null, dir);
263
- }
264
- }
265
-
266
  function getScrollBarWidth() {
267
  var inner = document.createElement("p");
268
  inner.style.width = "100%";
@@ -312,7 +299,7 @@ function onBtnUpClick(event, obj) {
312
  function onBtnMakeDirClick(event, obj) {
313
  var newDirName = prompt(messageEnterDirName);
314
  if ((newDirName) && (newDirName != "")) {
315
- submit("make_dir", null, null, null, null, null, newDirName, null, null, null, null);
316
  }
317
  }
318
 
@@ -320,20 +307,45 @@ function onBtnRenameItemClick(event, obj) {
320
  if (filesSelected.length != 0) {
321
  var newName = prompt(messageEnterNewName, getFileName(filesSelected[0]));
322
  if ((newName != null) && (newName != "")) {
323
- submit("rename_item", null, null, null, null, newName, null, null, null, null, null);
324
  }
325
  }
326
  }
327
 
328
  function onBtnCopyClick(event, obj) {
329
  if (filesSelected.length != 0) {
330
- submit("", null, null, null, null, null, null, "copy", filesSelected.join("**#**"), dir, null);
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  }
332
  }
333
 
334
  function onBtnCutClick(event, obj) {
335
  if (filesSelected.length != 0) {
336
- submit("", null, null, null, null, null, null, "cut", filesSelected.join("**#**"), dir, null);
 
 
 
 
 
 
 
 
 
 
 
 
337
  }
338
  }
339
 
@@ -407,10 +419,10 @@ function onKeyDown(e) {
407
  var e = e || window.event;
408
  var chCode1 = e.which || e.paramlist_keyCode;
409
  if ((e.ctrlKey || e.metaKey) && chCode1 == 65) {
 
410
  jQuery(".explorer_item").addClass("explorer_item_select");
411
  jQuery(".importer_item").addClass("importer_item_select");
412
  filesSelected = [];
413
- filesSelectedML = [];
414
  jQuery(".explorer_item").each(function() {
415
  var objName = jQuery(this).attr("name");
416
  if (filesSelected.indexOf(objName) == -1) {
@@ -418,13 +430,6 @@ function onKeyDown(e) {
418
  keyFileSelected = this;
419
  }
420
  });
421
- jQuery(".importer_item").each(function() {
422
- var objName = jQuery(this).attr("path");
423
- if (filesSelectedML.indexOf(objName) == -1) {
424
- filesSelectedML.push(objName);
425
- keyFileSelectedML = this;
426
- }
427
- });
428
  e.preventDefault();
429
  }
430
  }
@@ -449,6 +454,17 @@ function onFileClick(event, obj) {
449
  jQuery(".explorer_item").removeClass("explorer_item_select");
450
  var objName = jQuery(obj).attr("name");
451
  if (event.ctrlKey == true || event.metaKey == true) {
 
 
 
 
 
 
 
 
 
 
 
452
  if (filesSelected.indexOf(objName) == -1) {
453
  filesSelected.push(objName);
454
  keyFileSelected = obj;
@@ -480,41 +496,6 @@ function onFileClick(event, obj) {
480
  updateFileNames();
481
  }
482
 
483
- function onFileClickML(event, obj) {
484
- jQuery(".importer_item").removeClass("importer_item_select");
485
- var objName = jQuery(obj).attr("path");
486
- if (event.ctrlKey == true || event.metaKey == true) {
487
- if (filesSelectedML.indexOf(objName) == -1) {
488
- filesSelectedML.push(objName);
489
- keyFileSelectedML = obj;
490
- }
491
- else {
492
- filesSelectedML.splice(filesSelectedML.indexOf(objName), 1);
493
- jQuery(obj).removeClass("importer_item_select");
494
- }
495
- }
496
- else if (event.shiftKey == true) {
497
- filesSelectedML = [];
498
- var explorerItems = jQuery(".importer_item");
499
- var curFileIndex = explorerItems.index(jQuery(obj));
500
- var keyFileIndex = explorerItems.index(keyFileSelectedML);
501
- var startIndex = Math.min(keyFileIndex, curFileIndex);
502
- var endIndex = startIndex + Math.abs(curFileIndex - keyFileIndex);
503
- for (var i = startIndex; i < endIndex + 1; i++) {
504
- filesSelectedML.push(jQuery(explorerItems[i]).attr("path"));
505
- }
506
- }
507
- else {
508
- filesSelectedML = [jQuery(obj).attr("path")];
509
- keyFileSelectedML = obj;
510
- }
511
-
512
- for (var i = 0; i < filesSelectedML.length; i++) {
513
- jQuery('.importer_item[path="' + filesSelectedML[i] + '"]').addClass("importer_item_select");
514
- }
515
- updateFileNames();
516
- }
517
-
518
  function onFileDblClick(event, obj) {
519
  if (jQuery(obj).attr("isDir") == "true") {
520
  submit("", null, null, null, dir + DS + jQuery(obj).attr("name"), null, null, null, null, null, null);
@@ -526,12 +507,6 @@ function onFileDblClick(event, obj) {
526
  }
527
  }
528
 
529
- function onFileDblClickML(event, obj) {
530
- filesSelectedML = [];
531
- filesSelectedML.push(jQuery(obj).attr("path"));
532
- importFiles();
533
- }
534
-
535
  function onFileDragStart(event, obj) {
536
  var objName = jQuery(obj).attr("name");
537
  if (filesSelected.indexOf(objName) < 0) {
@@ -592,10 +567,6 @@ function onBtnOpenClick(event, obj) {
592
  }
593
  }
594
 
595
- function onBtnImportClick(event, obj) {
596
- importFiles();
597
- }
598
-
599
  function onBtnCancelClick(event, obj) {
600
  window.parent.tb_remove();
601
  }
@@ -611,23 +582,12 @@ function onBtnSelectAllClick() {
611
  keyFileSelected = this;
612
  }
613
  });
 
614
  }
615
 
616
- function onBtnSelectAllMediLibraryClick() {
617
- jQuery(".importer_item").addClass("importer_item_select");
618
- filesSelectedML = [];
619
- jQuery(".importer_item").each(function() {
620
- var objName = jQuery(this).attr("path");
621
- if (filesSelectedML.indexOf(objName) == -1) {
622
- filesSelectedML.push(objName);
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"];
@@ -650,22 +610,22 @@ function ajax_print_images(response) {
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 + '" ' +
@@ -674,7 +634,6 @@ function ajax_print_images(response) {
674
  'filetype="' + filetype + '" ' +
675
  'date_modified="' + date_modified + '" ' +
676
  'fileresolution="' + fileresolution + '" ' +
677
- 'fileresolution="' + fileresolution + '" ' +
678
  'fileCredit="' + fileCredit + '" ' +
679
  'fileAperture="' + fileAperture + '" ' +
680
  'fileCamera="' + fileCamera + '" ' +
@@ -690,9 +649,7 @@ function ajax_print_images(response) {
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
  }
4
  * Time: 3:56 PM
5
  */
6
 
 
 
 
 
 
 
 
 
 
 
7
  var keyFileSelected;
8
  var keyFileSelectedML;
9
  var filesSelected;
 
10
  var dragFiles;
11
  var isUploading;
12
 
13
  var ajax = true;
14
+ var importer_ajax = true;
15
+ var media_lib_images = false;
16
+
17
+ var all_files_selected = false;
18
+ var no_selected_files = [];
19
+
 
20
  jQuery(document).ready(function () {
21
+ var elements = 2;
22
  var all_item_count = jQuery("#explorer_body_container #explorer_body").data("files_count");
23
  jQuery("#explorer_body_container").scroll(function () {
24
  var explorer_item_count = jQuery("#explorer_body .explorer_item").length;
25
+ if (ajax && explorer_item_count < all_item_count) {
26
+ var scroll = jQuery(this).scrollTop();
27
  var scroll_position = jQuery(this).scrollTop() + jQuery(this).innerHeight();
28
  var scroll_Height = jQuery(this)[0].scrollHeight;
29
  if (scroll_position >= scroll_Height) {
30
+ var start_count = (elements-1)*element_load_count;
31
+ var end_count = elements*element_load_count;
32
+ var next_files = wdb_all_files.slice(start_count, end_count);
33
+ ajax_print_images(next_files, jQuery("#explorer_body"), 'explorer_item', start_count);
34
+ elements++;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
  }
37
  });
38
+
39
+ var all_images_count = jQuery("#file_manager .item_thumb img").length;
40
+ if (!all_images_count) {
41
  setTimeout(function(){jQuery(document).trigger("onUpload")});
42
  }
43
  else {
48
  }
49
  setTimeout(function(){loaded()}, 10000);
50
  filesSelected = [];
 
51
  dragFiles = [];
52
 
53
  //file manager under system messages
83
  });
84
  });
85
 
 
 
 
 
 
 
86
  function loaded() {
87
  jQuery("#opacity_div").hide();
88
  jQuery("#loading_div").hide();
93
  }
94
 
95
  function submit(task, sortBy, sortOrder, itemsView, destDir, fileNewName, newDirName, clipboardTask, clipboardFiles, clipboardSrc, clipboardDest) {
96
+ var names_array = [];
97
+ var lib_names_array = [];
98
+ if (all_files_selected === true) {
99
+ for (i in wdb_all_files) {
100
+ var index = no_selected_files.indexOf(wdb_all_files[i]["name"]);
101
+ if (index < 0) {
102
+ var all_names = wdb_all_files[i]["name"];
103
+ names_array.push(all_names);
104
+ }
105
+ }
106
+ fileNames = names_array.join("**#**");
107
+ }
108
+ else {
109
+ fileNames = filesSelected.join("**#**");
110
+ }
111
+
112
  switch (task) {
113
  case "rename_item":
114
  destDir = dir;
163
  if (fileNames != null) {
164
  jQuery("form[name=adminForm]").find("input[name=file_names]").val(fileNames);
165
  }
 
 
 
166
  if (fileNewName != null) {
167
  jQuery("form[name=adminForm]").find("input[name=file_new_name]").val(fileNewName);
168
  }
197
  jQuery("#file_names_span span").html(result);
198
  }
199
 
 
 
200
  function submitFiles() {
201
  if (filesSelected.length == 0) {
202
  return;
206
  return;
207
  }
208
  var filesValid = [];
209
+ if (all_files_selected === true) {
210
+ for (i in wdb_all_files) {
211
+ var fileData = [];
212
+ if (wdb_all_files[i]["is_dir"] === false) {
213
+ var index = no_selected_files.indexOf(wdb_all_files[i]["name"]);
214
+ if (index < 0) {
215
+ fileData['name'] = wdb_all_files[i]["name"];
216
+ fileData['filename'] = wdb_all_files[i]["filename"];;
217
+ fileData['url'] = dirUrl + "/" + wdb_all_files[i]["name"];
218
+ fileData['reliative_url'] = dirUrl + "/" + wdb_all_files[i]["name"];
219
+ fileData['thumb_url'] = dirUrl + "/thumb/" + wdb_all_files[i]["name"];
220
+ fileData['thumb'] = wdb_all_files[i]["thumb"];
221
+ fileData['size'] = wdb_all_files[i]["size"];
222
+ fileData['filetype'] = wdb_all_files[i]["type"];
223
+ fileData['date_modified'] = wdb_all_files[i]["date_modified"];
224
+ fileData['resolution'] = wdb_all_files[i]["resolution"];
225
+ filesValid.push(fileData);
226
+ }
227
+ }
228
+ }
229
+ }
230
+ else {
231
  for (var i = 0; i < filesSelected.length; i++) {
232
  var file_object = jQuery('.explorer_item[name="' + filesSelected[i] + '"]');
233
  if (jQuery(file_object).attr("isDir") == "false") {
243
  fileData['date_modified'] = jQuery(file_object).attr("date_modified");
244
  fileData['resolution'] = jQuery(file_object).attr("fileresolution");
245
  filesValid.push(fileData);
246
+ }
247
  }
248
  }
249
  window.parent[callback](filesValid, image_for, slide_id, layer_id);
250
  window.parent.tb_remove();
251
  }
252
 
 
 
 
 
 
 
 
 
 
 
253
  function getScrollBarWidth() {
254
  var inner = document.createElement("p");
255
  inner.style.width = "100%";
299
  function onBtnMakeDirClick(event, obj) {
300
  var newDirName = prompt(messageEnterDirName);
301
  if ((newDirName) && (newDirName != "")) {
302
+ submit("make_dir", null, null, null, null, null, newDirName.replace(/ /g, "_"), null, null, null, null);
303
  }
304
  }
305
 
307
  if (filesSelected.length != 0) {
308
  var newName = prompt(messageEnterNewName, getFileName(filesSelected[0]));
309
  if ((newName != null) && (newName != "")) {
310
+ submit("rename_item", null, null, null, null, newName.replace(/ /g, "_").replace(/%/g, ""), null, null, null, null, null);
311
  }
312
  }
313
  }
314
 
315
  function onBtnCopyClick(event, obj) {
316
  if (filesSelected.length != 0) {
317
+ var names_list = filesSelected.join("**#**");
318
+ var names_array = [];
319
+ if (all_files_selected === true) {
320
+ for (i in wdb_all_files) {
321
+ var index = no_selected_files.indexOf(wdb_all_files[i]["name"]);
322
+ if (index < 0) {
323
+ var all_names = wdb_all_files[i]["name"];
324
+ names_array.push(all_names);
325
+ }
326
+ }
327
+ names_list = names_array.join("**#**");
328
+ }
329
+
330
+ submit("", null, null, null, null, null, null, "copy", names_list, dir, null);
331
  }
332
  }
333
 
334
  function onBtnCutClick(event, obj) {
335
  if (filesSelected.length != 0) {
336
+ var names_list = filesSelected.join("**#**");
337
+ var names_array = [];
338
+ if (all_files_selected === true) {
339
+ for (i in wdb_all_files) {
340
+ var index = no_selected_files.indexOf(wdb_all_files[i]["name"]);
341
+ if (index < 0) {
342
+ var all_names = wdb_all_files[i]["name"];
343
+ names_array.push(all_names);
344
+ }
345
+ }
346
+ names_list = names_array.join("**#**");
347
+ }
348
+ submit("", null, null, null, null, null, null, "cut", names_list, dir, null);
349
  }
350
  }
351
 
419
  var e = e || window.event;
420
  var chCode1 = e.which || e.paramlist_keyCode;
421
  if ((e.ctrlKey || e.metaKey) && chCode1 == 65) {
422
+ all_files_selected = true;
423
  jQuery(".explorer_item").addClass("explorer_item_select");
424
  jQuery(".importer_item").addClass("importer_item_select");
425
  filesSelected = [];
 
426
  jQuery(".explorer_item").each(function() {
427
  var objName = jQuery(this).attr("name");
428
  if (filesSelected.indexOf(objName) == -1) {
430
  keyFileSelected = this;
431
  }
432
  });
 
 
 
 
 
 
 
433
  e.preventDefault();
434
  }
435
  }
454
  jQuery(".explorer_item").removeClass("explorer_item_select");
455
  var objName = jQuery(obj).attr("name");
456
  if (event.ctrlKey == true || event.metaKey == true) {
457
+ if (all_files_selected === true) {
458
+ if (filesSelected.indexOf(objName) == -1) {
459
+ var index = no_selected_files.indexOf(objName);
460
+ if (index >= 0) {
461
+ no_selected_files.splice( index, 1 );
462
+ }
463
+ }
464
+ else {
465
+ no_selected_files.push(objName);
466
+ }
467
+ }
468
  if (filesSelected.indexOf(objName) == -1) {
469
  filesSelected.push(objName);
470
  keyFileSelected = obj;
496
  updateFileNames();
497
  }
498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
499
  function onFileDblClick(event, obj) {
500
  if (jQuery(obj).attr("isDir") == "true") {
501
  submit("", null, null, null, dir + DS + jQuery(obj).attr("name"), null, null, null, null, null, null);
507
  }
508
  }
509
 
 
 
 
 
 
 
510
  function onFileDragStart(event, obj) {
511
  var objName = jQuery(obj).attr("name");
512
  if (filesSelected.indexOf(objName) < 0) {
567
  }
568
  }
569
 
 
 
 
 
570
  function onBtnCancelClick(event, obj) {
571
  window.parent.tb_remove();
572
  }
582
  keyFileSelected = this;
583
  }
584
  });
585
+ all_files_selected = true;
586
  }
587
 
588
+ function ajax_print_images(files, element, view_type, count) {
589
+ for (i in files) {
590
+ var corent_file = files[i];
 
 
 
 
 
 
 
 
 
 
 
 
591
  var name = corent_file["name"];
592
  var filename = corent_file["filename"];
593
  var filethumb = corent_file["thumb"];
610
  var ondragover = "";
611
  var ondrop = "";
612
  if (corent_file['is_dir'] == true) {
613
+ ondragover = "onFileDragOver(event, this);";
614
+ ondrop = "onFileDrop(event, this);";
615
  }
616
  var isDir = false;
617
  if (corent_file['is_dir'] === true) {
618
  isDir = 'true';
619
  }
620
 
621
+ var item_number = count;
622
+ count++;
623
  var item_thumb = '<span class="item_thumb"><img src="' + corent_file['thumb'] + '"/></span>';
624
  var item_icon = '<span class="item_icon"><img src="'+corent_file['icon']+'"/> </span>';
625
  var item_name = '<span class="item_name">'+corent_file['name']+'</span>';
626
  var item_size = '<span class="item_size">'+corent_file['size']+'</span>';
627
  var item_date_modified = '<span class="item_date_modified">'+corent_file['date_modified']+'</span>';
628
  var item_numbering = '<span class="item_numbering">'+item_number+'</span>';
 
629
  var explorer_item = '<div class="explorer_item" ' +
630
  'name="' + name + '" ' +
631
  'filename="' + filename + '" ' +
634
  'filetype="' + filetype + '" ' +
635
  'date_modified="' + date_modified + '" ' +
636
  'fileresolution="' + fileresolution + '" ' +
 
637
  'fileCredit="' + fileCredit + '" ' +
638
  'fileAperture="' + fileAperture + '" ' +
639
  'fileCamera="' + fileCamera + '" ' +
649
  'ondragstart="' + ondragstart + '" ' +
650
  'ondragover="' + ondragover + '" ' +
651
  'ondrop="' + ondrop + '" ' +
652
+ 'draggable="true">'+item_numbering + item_thumb + item_icon+item_name+item_size+item_date_modified+'</div>';
653
+ element.append(explorer_item);
 
 
654
  }
655
  }
filemanager/model.php CHANGED
@@ -19,7 +19,7 @@ class FilemanagerModel {
19
  // Variables //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  private $controller;
22
-
23
  ////////////////////////////////////////////////////////////////////////////////////////
24
  // Constructor & Destructor //
25
  ////////////////////////////////////////////////////////////////////////////////////////
@@ -30,7 +30,7 @@ class FilemanagerModel {
30
  ////////////////////////////////////////////////////////////////////////////////////////
31
  // Public Methods //
32
  ////////////////////////////////////////////////////////////////////////////////////////
33
- public function get_file_manager_data($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,9 +44,11 @@ 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
- $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,7 +97,7 @@ class FilemanagerModel {
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'])) : '*');
@@ -161,12 +163,9 @@ class FilemanagerModel {
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) {
19
  // Variables //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  private $controller;
22
+ private $element_load_count = 30;
23
  ////////////////////////////////////////////////////////////////////////////////////////
24
  // Constructor & Destructor //
25
  ////////////////////////////////////////////////////////////////////////////////////////
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
  $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']);
48
  $data['files'] = $get_files_data['files'];
49
  $data['files_count'] = $get_files_data['files_count'];
50
+ $data['all_files'] = $get_files_data['all_files'];
51
+ $data['element_load_count'] = $this->element_load_count;
52
  $data['extensions'] = (isset($_REQUEST['extensions']) ? esc_html($_REQUEST['extensions']) : '');
53
  $data['callback'] = (isset($_REQUEST['callback']) ? esc_html($_REQUEST['callback']) : '');
54
  $data['image_for'] = (isset($_REQUEST['image_for']) ? esc_html($_REQUEST['image_for']) : '');
97
  return $components;
98
  }
99
 
100
+ function get_files($sort_by, $sort_order) {
101
  $icons_dir_path = WD_S_DIR . '/filemanager/images/file_icons';
102
  $icons_dir_url = WD_S_URL . '/filemanager/images/file_icons';
103
  $valid_types = explode(',', isset($_REQUEST['extensions']) ? strtolower(esc_html($_REQUEST['extensions'])) : '*');
163
  // $result = $sort_order == 'asc' ? array_merge($dirs, $files) : array_merge($files, $dirs);
164
  $result = array_merge($dirs, $files);
165
  $files_count = count($result);
166
+ $all_files = $result;
167
+ $result = array_slice($result, 0, $this->element_load_count, true);
168
+ return array("files" => $result, "all_files" => $all_files, "files_count" => $files_count);
 
 
 
169
  }
170
 
171
  private function get_sorted_file_names($parent_dir, $sort_by, $sort_order) {
filemanager/view.php CHANGED
@@ -75,6 +75,8 @@ class FilemanagerView {
75
  var layer_id = "<?php echo (isset($_REQUEST['layer_id']) ? esc_html($_REQUEST['layer_id']) : ''); ?>";
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">
75
  var layer_id = "<?php echo (isset($_REQUEST['layer_id']) ? esc_html($_REQUEST['layer_id']) : ''); ?>";
76
  var sortBy = "<?php echo $sort_by; ?>";
77
  var sortOrder = "<?php echo $sort_order; ?>";
78
+ var wdb_all_files = <?php echo (json_encode($file_manager_data["all_files"], true)); ?>;
79
+ var element_load_count = <?php echo (json_encode($file_manager_data["element_load_count"], true)); ?>;
80
  </script>
81
  <script src="<?php echo WD_S_URL; ?>/filemanager/js/default.js?ver=<?php echo WD_S_VERSION; ?>"></script>
82
  <link href="<?php echo WD_S_URL; ?>/filemanager/css/default.css?ver=<?php echo WD_S_VERSION; ?>" type="text/css" rel="stylesheet">
images/slider-icon.png CHANGED
Binary file
images/wd_slider.png CHANGED
Binary file
js/wds.js CHANGED
@@ -1538,6 +1538,9 @@ function spider_media_uploader(id, e, multiple) {
1538
  }
1539
 
1540
  function wds_add_image(files, image_for, slide_id, layer_id) {
 
 
 
1541
  switch (image_for) {
1542
  case 'add_slides': {
1543
  /* Delete active slide if it has now image.*/
@@ -1764,12 +1767,14 @@ function wds_delete_layer(id, layerID) {
1764
  jQuery("#" + prefix).remove();
1765
  }
1766
  jQuery("#" + prefix + "_tbody").remove();
1767
-
1768
  var layerIDs = jQuery("#slide" + id + "_layer_ids_string").val();
1769
  layerIDs = layerIDs.replace(layerID + ",", "");
1770
  jQuery("#slide" + id + "_layer_ids_string").val(layerIDs);
1771
- var dellayerIds = jQuery("#slide" + id + "_del_layer_ids_string").val() + layerID + ",";
1772
- jQuery("#slide" + id + "_del_layer_ids_string").val(dellayerIds);
 
 
1773
  }
1774
  }
1775
 
@@ -2741,11 +2746,14 @@ function wds_remove_slide(slideID, conf) {
2741
  jQuery("#wbs_subtab" + slideID).remove();
2742
  jQuery("#wds_subtab_wrap" + slideID).remove();
2743
 
 
2744
  var slideIDs = jQuery("#slide_ids_string").val();
2745
  slideIDs = slideIDs.replace(slideID + ",", "");
2746
  jQuery("#slide_ids_string").val(slideIDs);
2747
- var delslideIds = jQuery("#del_slide_ids_string").val() + slideID + ",";
2748
- jQuery("#del_slide_ids_string").val(delslideIds);
 
 
2749
 
2750
  jQuery(".wbs_subtab div[id^='wbs_subtab']").each(function () {
2751
  var id = jQuery(this).attr("id");
1538
  }
1539
 
1540
  function wds_add_image(files, image_for, slide_id, layer_id) {
1541
+ if (typeof files == "undefined" || files.length == 0) {
1542
+ return;
1543
+ }
1544
  switch (image_for) {
1545
  case 'add_slides': {
1546
  /* Delete active slide if it has now image.*/
1767
  jQuery("#" + prefix).remove();
1768
  }
1769
  jQuery("#" + prefix + "_tbody").remove();
1770
+ var dellayerIds;
1771
  var layerIDs = jQuery("#slide" + id + "_layer_ids_string").val();
1772
  layerIDs = layerIDs.replace(layerID + ",", "");
1773
  jQuery("#slide" + id + "_layer_ids_string").val(layerIDs);
1774
+ if (layerID.indexOf("pr_") == -1) {
1775
+ dellayerIds = jQuery("#slide" + id + "_del_layer_ids_string").val() + layerID + ",";
1776
+ jQuery("#slide" + id + "_del_layer_ids_string").val(dellayerIds);
1777
+ }
1778
  }
1779
  }
1780
 
2746
  jQuery("#wbs_subtab" + slideID).remove();
2747
  jQuery("#wds_subtab_wrap" + slideID).remove();
2748
 
2749
+ var delslideIds;
2750
  var slideIDs = jQuery("#slide_ids_string").val();
2751
  slideIDs = slideIDs.replace(slideID + ",", "");
2752
  jQuery("#slide_ids_string").val(slideIDs);
2753
+ if (slideID.indexOf('pr_') == -1) {
2754
+ delslideIds = jQuery("#del_slide_ids_string").val() + slideID + ",";
2755
+ jQuery("#del_slide_ids_string").val(delslideIds);
2756
+ }
2757
 
2758
  jQuery(".wbs_subtab div[id^='wbs_subtab']").each(function () {
2759
  var id = jQuery(this).attr("id");
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.72
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -125,6 +125,14 @@ After downloading the ZIP file of the slider plugin,
125
 
126
  == Changelog ==
127
 
 
 
 
 
 
 
 
 
128
  = 1.1.72 =
129
  * Fixed: Warrning in admin popups.
130
  * Fixed: Required field validation.
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.73
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.73 =
129
+ * Fixed: Deleting newly added slides and layers.
130
+ * Fixed: Slider height with horizontal filmstrip.
131
+ * Fixed: Share slides.
132
+ * Fixed: Scroll load.
133
+ * Fixed: Video slide and layer poster in backend.
134
+ * Fixed: Image thumbnail in backend with single quote in name.
135
+
136
  = 1.1.72 =
137
  * Fixed: Warrning in admin popups.
138
  * Fixed: Required field validation.
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.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,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.72');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());
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.73
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.73');
18
 
19
  function wds_use_home_url() {
20
  $home_url = str_replace("http://", "", home_url());