Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager - Version 2.3.1

Version Description

We've added an indication for succesful actions (like moving elements into a folder, changing folders names etc)

Download this release

Release Info

Developer galdub
Plugin Icon wp plugin Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3 to 2.3.1

assets/css/design.css CHANGED
@@ -154,6 +154,7 @@ html[dir="rtl"] body.wp-admin #wpcontent {
154
  margin: 0;
155
  padding: 0 0 10px 0;
156
  line-height: 29px;
 
157
  }
158
  .form-operations {
159
  border: solid 1px #e5e5e5;
@@ -1093,6 +1094,143 @@ span.folder-loader-ajax {
1093
  .folder-loader-ajax.active {
1094
  display: inline-block;
1095
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1096
  @media screen and (max-width: 1300px) {
1097
  .tree-structure li {
1098
  width: 20%;
154
  margin: 0;
155
  padding: 0 0 10px 0;
156
  line-height: 29px;
157
+ min-height: 36px;
158
  }
159
  .form-operations {
160
  border: solid 1px #e5e5e5;
1094
  .folder-loader-ajax.active {
1095
  display: inline-block;
1096
  }
1097
+ @-webkit-keyframes scaleAnimation {
1098
+ 0% {
1099
+ opacity: 0;
1100
+ -webkit-transform: scale(1.5);
1101
+ transform: scale(1.5);
1102
+ }
1103
+ 100% {
1104
+ opacity: 1;
1105
+ -webkit-transform: scale(1);
1106
+ transform: scale(1);
1107
+ }
1108
+ }
1109
+
1110
+ @keyframes scaleAnimation {
1111
+ 0% {
1112
+ opacity: 0;
1113
+ -webkit-transform: scale(1.5);
1114
+ transform: scale(1.5);
1115
+ }
1116
+ 100% {
1117
+ opacity: 1;
1118
+ -webkit-transform: scale(1);
1119
+ transform: scale(1);
1120
+ }
1121
+ }
1122
+ @-webkit-keyframes drawCircle {
1123
+ 0% {
1124
+ stroke-dashoffset: 151px;
1125
+ }
1126
+ 100% {
1127
+ stroke-dashoffset: 0;
1128
+ }
1129
+ }
1130
+ @keyframes drawCircle {
1131
+ 0% {
1132
+ stroke-dashoffset: 151px;
1133
+ }
1134
+ 100% {
1135
+ stroke-dashoffset: 0;
1136
+ }
1137
+ }
1138
+ @-webkit-keyframes drawCheck {
1139
+ 0% {
1140
+ stroke-dashoffset: 36px;
1141
+ }
1142
+ 100% {
1143
+ stroke-dashoffset: 0;
1144
+ }
1145
+ }
1146
+ @keyframes drawCheck {
1147
+ 0% {
1148
+ stroke-dashoffset: 36px;
1149
+ }
1150
+ 100% {
1151
+ stroke-dashoffset: 0;
1152
+ }
1153
+ }
1154
+ @-webkit-keyframes fadeOut {
1155
+ 0% {
1156
+ opacity: 1;
1157
+ }
1158
+ 100% {
1159
+ opacity: 0;
1160
+ }
1161
+ }
1162
+ @keyframes fadeOut {
1163
+ 0% {
1164
+ opacity: 1;
1165
+ }
1166
+ 100% {
1167
+ opacity: 0;
1168
+ }
1169
+ }
1170
+ @-webkit-keyframes fadeIn {
1171
+ 0% {
1172
+ opacity: 0;
1173
+ }
1174
+ 100% {
1175
+ opacity: 1;
1176
+ }
1177
+ }
1178
+ @keyframes fadeIn {
1179
+ 0% {
1180
+ opacity: 0;
1181
+ }
1182
+ 100% {
1183
+ opacity: 1;
1184
+ }
1185
+ }
1186
+ #successAnimationCircle {
1187
+ stroke-dasharray: 151px 151px;
1188
+ stroke: #2CE0A7;
1189
+ }
1190
+
1191
+ #successAnimationCheck {
1192
+ stroke-dasharray: 36px 36px;
1193
+ stroke: #2CE0A7;
1194
+ }
1195
+
1196
+ #successAnimationResult {
1197
+ fill: #2CE0A7;
1198
+ opacity: 0;
1199
+ }
1200
+ svg#successAnimation {
1201
+ width: 34px;
1202
+ height: 34px;
1203
+ padding: 0 0 0px 0;
1204
+ display: none;
1205
+ float: left;
1206
+ }
1207
+ #successAnimation.active {
1208
+ display: inline-block;
1209
+ }
1210
+ .folder-loader-ajax img {
1211
+ display: none;
1212
+ }
1213
+ .folder-loader-ajax img.active {
1214
+ display: inline-block;
1215
+ }
1216
+
1217
+ #successAnimation.animated {
1218
+ -webkit-animation: 1s ease-out 0s 1 both scaleAnimation;
1219
+ animation: 1s ease-out 0s 1 both scaleAnimation;
1220
+ }
1221
+ #successAnimation.animated #successAnimationCircle {
1222
+ -webkit-animation: 1s cubic-bezier(0.77, 0, 0.175, 1) 0s 1 both drawCircle, 0.3s linear 0.9s 1 both fadeOut;
1223
+ animation: 1s cubic-bezier(0.77, 0, 0.175, 1) 0s 1 both drawCircle, 0.3s linear 0.9s 1 both fadeOut;
1224
+ }
1225
+ #successAnimation.animated #successAnimationCheck {
1226
+ -webkit-animation: 1s cubic-bezier(0.77, 0, 0.175, 1) 0s 1 both drawCheck, 0.3s linear 0.9s 1 both fadeOut;
1227
+ animation: 1s cubic-bezier(0.77, 0, 0.175, 1) 0s 1 both drawCheck, 0.3s linear 0.9s 1 both fadeOut;
1228
+ }
1229
+ #successAnimation.animated #successAnimationResult {
1230
+ -webkit-animation: 0.3s linear 0.9s both fadeIn;
1231
+ animation: 0.3s linear 0.9s both fadeIn;
1232
+ }
1233
+
1234
  @media screen and (max-width: 1300px) {
1235
  .tree-structure li {
1236
  width: 20%;
assets/images/premio-owner.png ADDED
Binary file
assets/js/custom.js CHANGED
@@ -66,6 +66,7 @@ jQuery(document).ready(function(){
66
  add_menu_to_list();
67
  jQuery(".folder-popup-form").hide();
68
  jQuery(".folder-popup-form").removeClass("disabled");
 
69
  if(jQuery("#media-attachment-taxonomy-filter").length) {
70
  resetMediaData(0)
71
  }
@@ -108,6 +109,7 @@ jQuery(document).ready(function(){
108
  add_menu_to_list();
109
  jQuery(".folder-popup-form").hide();
110
  jQuery(".folder-popup-form").removeClass("disabled");
 
111
  if(jQuery("#media-attachment-taxonomy-filter").length) {
112
  resetMediaData(0)
113
  }
@@ -142,7 +144,8 @@ jQuery(document).ready(function(){
142
  folderLimitation = totalFolders;
143
  }
144
  jQuery("#total-folder").text(folderLimitation);
145
- add_menu_to_list()
 
146
  jQuery(".folder-popup-form").hide();
147
  jQuery(".folder-popup-form").removeClass("disabled");
148
  resetMediaAndPosts();
@@ -161,6 +164,34 @@ jQuery(document).ready(function(){
161
  });
162
  });
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  function addFolder() {
165
  if(isKeyActive == 0 && totalFolders >= folderLimitation) {
166
  jQuery("#folder-limitation-message").html("You've reached the "+totalFolders+" folder limitation!");
@@ -227,13 +258,12 @@ function resetMediaAndPosts() {
227
  jQuery(".un-categorised-items .total-count").text(res.empty_items);
228
  }
229
  });
230
- jQuery(".folder-loader-ajax").addClass("active");
231
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", false, function (res) {
232
- jQuery(".folder-loader-ajax").removeClass("active");
233
  if (!jQuery(".tree-structure").length) {
234
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
235
  }
236
  add_active_item_to_list();
 
237
  });
238
  }
239
  }
@@ -242,6 +272,7 @@ function add_active_item_to_list() {
242
  folderId = 0;
243
  if(jQuery(".active-item").length) {
244
  folderId = jQuery(".active-item").data("folder-id");
 
245
  }
246
  jQuery(".tree-structure ul").html("");
247
  jQuery("#space_"+folderId).children().each(function(){
@@ -303,13 +334,13 @@ jQuery(document).ready(function(){
303
  activeRecordID = jQuery(this).closest("li.route").data("folder-id");
304
  if(!jQuery("#media-attachment-taxonomy-filter").length) {
305
  folderCurrentURL = wcp_settings.page_url + jQuery(this).closest("li.route").data("slug");
306
- jQuery(".folder-loader-ajax").addClass("active");
307
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", function () {
308
- jQuery(".folder-loader-ajax").removeClass("active");
309
  if (!jQuery(".tree-structure").length) {
310
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
311
  }
312
  add_active_item_to_list();
 
313
  });
314
  } else {
315
  var thisIndex = jQuery(this).closest("li.route").data("folder-id");
@@ -335,13 +366,13 @@ jQuery(document).ready(function(){
335
  jQuery(".wcp-container .route").removeClass("active-item");
336
  if(!jQuery("#media-attachment-taxonomy-filter").length) {
337
  folderCurrentURL = wcp_settings.page_url;
338
- jQuery(".folder-loader-ajax").addClass("active");
339
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", function () {
340
- jQuery(".folder-loader-ajax").removeClass("active");
341
  if (!jQuery(".tree-structure").length) {
342
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
343
  }
344
  add_active_item_to_list();
 
345
  });
346
  } else {
347
  jQuery("#media-attachment-taxonomy-filter").val("all");
@@ -373,6 +404,7 @@ jQuery(document).ready(function(){
373
  if(res.status == "1") {
374
  // window.location.reload();
375
  resetMediaAndPosts();
 
376
  } else {
377
  jQuery(".folder-popup-form").hide();
378
  jQuery(".folder-popup-form").removeClass("disabled");
@@ -394,6 +426,7 @@ jQuery(document).ready(function(){
394
  if(res.status == "1") {
395
  // window.location.reload();
396
  resetMediaAndPosts();
 
397
  } else {
398
  jQuery(".folder-popup-form").hide();
399
  jQuery(".folder-popup-form").removeClass("disabled");
@@ -419,6 +452,7 @@ jQuery(document).ready(function(){
419
  success: function (res) {
420
  // window.location.reload();
421
  resetMediaAndPosts();
 
422
  }
423
  });
424
  }
@@ -468,13 +502,14 @@ jQuery(document).ready(function(){
468
  jQuery(".header-posts a").addClass("active-item");
469
  if(!jQuery("#media-attachment-taxonomy-filter").length) {
470
  folderCurrentURL = wcp_settings.page_url;
471
- jQuery(".folder-loader-ajax").addClass("active");
472
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", function () {
473
- jQuery(".folder-loader-ajax").removeClass("active");
474
  if (!jQuery(".tree-structure").length) {
475
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
476
  }
477
  add_active_item_to_list();
 
478
  });
479
  } else {
480
  activeRecordID = "";
@@ -490,13 +525,14 @@ jQuery(document).ready(function(){
490
  jQuery(".un-categorised-items").addClass("active-item");
491
  if(!jQuery("#media-attachment-taxonomy-filter").length) {
492
  folderCurrentURL = wcp_settings.page_url+"-1";
493
- jQuery(".folder-loader-ajax").addClass("active");
494
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", function () {
495
- jQuery(".folder-loader-ajax").removeClass("active");
496
  if (!jQuery(".tree-structure").length) {
497
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
498
  }
499
  add_active_item_to_list();
 
500
  });
501
  } else {
502
  jQuery("#media-attachment-taxonomy-filter").val("unassigned");
@@ -527,6 +563,7 @@ jQuery(document).ready(function(){
527
  success: function (res) {
528
  //window.location.reload();
529
  resetMediaAndPosts();
 
530
  }
531
  });
532
  }
@@ -539,6 +576,7 @@ jQuery(document).ready(function(){
539
  success: function (res) {
540
  //window.location.reload();
541
  resetMediaAndPosts();
 
542
  }
543
  });
544
  } else if (ui.draggable.hasClass('attachment')) {
@@ -557,6 +595,7 @@ jQuery(document).ready(function(){
557
  success: function (res) {
558
  // window.location.reload();
559
  resetMediaAndPosts();
 
560
  }
561
  });
562
  }
@@ -628,6 +667,7 @@ jQuery(document).ready(function(){
628
  success: function (res) {
629
  //window.location.reload();
630
  resetMediaAndPosts();
 
631
  }
632
  });
633
  }
@@ -641,6 +681,7 @@ jQuery(document).ready(function(){
641
  success: function (res) {
642
  //window.location.reload();
643
  resetMediaAndPosts();
 
644
  }
645
  });
646
  } else if (ui.draggable.hasClass('attachment')) {
@@ -659,6 +700,7 @@ jQuery(document).ready(function(){
659
  success: function (res) {
660
  //window.location.reload();
661
  resetMediaAndPosts();
 
662
  }
663
  });
664
  }
@@ -854,6 +896,7 @@ jQuery(document).ready(function(){
854
  jQuery("#wcp_folder_"+res.id).removeClass("is-high");
855
  }
856
  add_menu_to_list();
 
857
  } else {
858
  jQuery(".folder-popup-form").hide();
859
  jQuery(".folder-popup-form").removeClass("disabled");
@@ -946,6 +989,7 @@ jQuery(document).ready(function(){
946
  jQuery(".form-loader-count").css("width", "0");
947
  add_menu_to_list();
948
  resetMediaAndPosts();
 
949
  } else {
950
  jQuery(".folder-popup-form").hide();
951
  jQuery(".folder-popup-form").removeClass("disabled");
@@ -993,6 +1037,7 @@ jQuery(document).ready(function(){
993
  jQuery("#error-folder-popup").show();
994
  } else {
995
  add_menu_to_list();
 
996
  }
997
  }
998
  });
@@ -1053,6 +1098,7 @@ jQuery(document).ready(function(){
1053
  folderStatus = 1;
1054
  }
1055
  add_menu_to_list();
 
1056
  }
1057
  }
1058
  });
66
  add_menu_to_list();
67
  jQuery(".folder-popup-form").hide();
68
  jQuery(".folder-popup-form").removeClass("disabled");
69
+ ajaxAnimation();
70
  if(jQuery("#media-attachment-taxonomy-filter").length) {
71
  resetMediaData(0)
72
  }
109
  add_menu_to_list();
110
  jQuery(".folder-popup-form").hide();
111
  jQuery(".folder-popup-form").removeClass("disabled");
112
+ ajaxAnimation();
113
  if(jQuery("#media-attachment-taxonomy-filter").length) {
114
  resetMediaData(0)
115
  }
144
  folderLimitation = totalFolders;
145
  }
146
  jQuery("#total-folder").text(folderLimitation);
147
+ add_menu_to_list();
148
+ ajaxAnimation();
149
  jQuery(".folder-popup-form").hide();
150
  jQuery(".folder-popup-form").removeClass("disabled");
151
  resetMediaAndPosts();
164
  });
165
  });
166
 
167
+ function triggerInlineUpdate() {
168
+ jQuery(".form-loader-count").css("width", "0");
169
+ if(typeof inlineEditPost == "object") {
170
+ jQuery("#the-list").on("click",".editinline",function(){jQuery(this).attr("aria-expanded","true"),inlineEditPost.edit(this)});
171
+ jQuery(document).on("click", ".inline-edit-save .save", function(){
172
+ var thisID = jQuery(this).closest("tr").attr("id");
173
+ thisID = thisID.replace("edit-","");
174
+ inlineEditPost.save(thisID);
175
+ });
176
+ jQuery(document).on("click", ".inline-edit-save .cancel", function(){
177
+ var thisID = jQuery(this).closest("tr").attr("id");
178
+ thisID = thisID.replace("edit-","");
179
+ inlineEditPost.revert(thisID);
180
+ });
181
+ }
182
+ }
183
+
184
+ function ajaxAnimation() {
185
+ jQuery(".folder-loader-ajax").addClass("active");
186
+ jQuery(".folder-loader-ajax img").removeClass("active");
187
+ jQuery(".folder-loader-ajax svg#successAnimation").addClass("active").addClass("animated");
188
+ setTimeout(function(){
189
+ jQuery(".folder-loader-ajax").removeClass("active");
190
+ jQuery(".folder-loader-ajax img").addClass("active");
191
+ jQuery(".folder-loader-ajax svg#successAnimation").removeClass("active").removeClass("animated");
192
+ }, 2000);
193
+ }
194
+
195
  function addFolder() {
196
  if(isKeyActive == 0 && totalFolders >= folderLimitation) {
197
  jQuery("#folder-limitation-message").html("You've reached the "+totalFolders+" folder limitation!");
258
  jQuery(".un-categorised-items .total-count").text(res.empty_items);
259
  }
260
  });
 
261
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", false, function (res) {
 
262
  if (!jQuery(".tree-structure").length) {
263
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
264
  }
265
  add_active_item_to_list();
266
+ // triggerInlineUpdate();
267
  });
268
  }
269
  }
272
  folderId = 0;
273
  if(jQuery(".active-item").length) {
274
  folderId = jQuery(".active-item").data("folder-id");
275
+
276
  }
277
  jQuery(".tree-structure ul").html("");
278
  jQuery("#space_"+folderId).children().each(function(){
334
  activeRecordID = jQuery(this).closest("li.route").data("folder-id");
335
  if(!jQuery("#media-attachment-taxonomy-filter").length) {
336
  folderCurrentURL = wcp_settings.page_url + jQuery(this).closest("li.route").data("slug");
337
+ jQuery(".form-loader-count").css("width", "100%");
338
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", function () {
 
339
  if (!jQuery(".tree-structure").length) {
340
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
341
  }
342
  add_active_item_to_list();
343
+ triggerInlineUpdate();
344
  });
345
  } else {
346
  var thisIndex = jQuery(this).closest("li.route").data("folder-id");
366
  jQuery(".wcp-container .route").removeClass("active-item");
367
  if(!jQuery("#media-attachment-taxonomy-filter").length) {
368
  folderCurrentURL = wcp_settings.page_url;
369
+ jQuery(".form-loader-count").css("width", "100%");
370
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", function () {
 
371
  if (!jQuery(".tree-structure").length) {
372
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
373
  }
374
  add_active_item_to_list();
375
+ triggerInlineUpdate();
376
  });
377
  } else {
378
  jQuery("#media-attachment-taxonomy-filter").val("all");
404
  if(res.status == "1") {
405
  // window.location.reload();
406
  resetMediaAndPosts();
407
+ ajaxAnimation();
408
  } else {
409
  jQuery(".folder-popup-form").hide();
410
  jQuery(".folder-popup-form").removeClass("disabled");
426
  if(res.status == "1") {
427
  // window.location.reload();
428
  resetMediaAndPosts();
429
+ ajaxAnimation();
430
  } else {
431
  jQuery(".folder-popup-form").hide();
432
  jQuery(".folder-popup-form").removeClass("disabled");
452
  success: function (res) {
453
  // window.location.reload();
454
  resetMediaAndPosts();
455
+ ajaxAnimation();
456
  }
457
  });
458
  }
502
  jQuery(".header-posts a").addClass("active-item");
503
  if(!jQuery("#media-attachment-taxonomy-filter").length) {
504
  folderCurrentURL = wcp_settings.page_url;
505
+ jQuery(".form-loader-count").css("width", "100%");
506
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", function () {
507
+
508
  if (!jQuery(".tree-structure").length) {
509
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
510
  }
511
  add_active_item_to_list();
512
+ triggerInlineUpdate();
513
  });
514
  } else {
515
  activeRecordID = "";
525
  jQuery(".un-categorised-items").addClass("active-item");
526
  if(!jQuery("#media-attachment-taxonomy-filter").length) {
527
  folderCurrentURL = wcp_settings.page_url+"-1";
528
+ jQuery(".form-loader-count").css("width", "100%");
529
  jQuery("#wpbody").load(folderCurrentURL + " #wpbody-content", function () {
530
+
531
  if (!jQuery(".tree-structure").length) {
532
  jQuery(".wp-header-end").before('<div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div>');
533
  }
534
  add_active_item_to_list();
535
+ triggerInlineUpdate();
536
  });
537
  } else {
538
  jQuery("#media-attachment-taxonomy-filter").val("unassigned");
563
  success: function (res) {
564
  //window.location.reload();
565
  resetMediaAndPosts();
566
+ ajaxAnimation();
567
  }
568
  });
569
  }
576
  success: function (res) {
577
  //window.location.reload();
578
  resetMediaAndPosts();
579
+ ajaxAnimation();
580
  }
581
  });
582
  } else if (ui.draggable.hasClass('attachment')) {
595
  success: function (res) {
596
  // window.location.reload();
597
  resetMediaAndPosts();
598
+ ajaxAnimation();
599
  }
600
  });
601
  }
667
  success: function (res) {
668
  //window.location.reload();
669
  resetMediaAndPosts();
670
+ ajaxAnimation();
671
  }
672
  });
673
  }
681
  success: function (res) {
682
  //window.location.reload();
683
  resetMediaAndPosts();
684
+ ajaxAnimation();
685
  }
686
  });
687
  } else if (ui.draggable.hasClass('attachment')) {
700
  success: function (res) {
701
  //window.location.reload();
702
  resetMediaAndPosts();
703
+ ajaxAnimation();
704
  }
705
  });
706
  }
896
  jQuery("#wcp_folder_"+res.id).removeClass("is-high");
897
  }
898
  add_menu_to_list();
899
+ ajaxAnimation();
900
  } else {
901
  jQuery(".folder-popup-form").hide();
902
  jQuery(".folder-popup-form").removeClass("disabled");
989
  jQuery(".form-loader-count").css("width", "0");
990
  add_menu_to_list();
991
  resetMediaAndPosts();
992
+ ajaxAnimation();
993
  } else {
994
  jQuery(".folder-popup-form").hide();
995
  jQuery(".folder-popup-form").removeClass("disabled");
1037
  jQuery("#error-folder-popup").show();
1038
  } else {
1039
  add_menu_to_list();
1040
+ ajaxAnimation();
1041
  }
1042
  }
1043
  });
1098
  folderStatus = 1;
1099
  }
1100
  add_menu_to_list();
1101
+ ajaxAnimation();
1102
  }
1103
  }
1104
  });
folders.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
- * Version: 2.3
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  */
@@ -15,7 +15,7 @@ define('WCP_FOLDER', 'folders');
15
  define('WCP_FOLDER_VAR', 'folders_settings');
16
  define("WCP_DS", DIRECTORY_SEPARATOR);
17
  define('WCP_FOLDER_URL',plugin_dir_url(__FILE__));
18
- define('WCP_FOLDER_VERSION',"2.3");
19
 
20
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
21
  register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
@@ -24,4 +24,5 @@ WCP_Folders::get_instance();
24
  /* Affiliate Class*/
25
  if(is_admin()) {
26
  include_once plugin_dir_path(__FILE__)."includes/class-affiliate.php";
 
27
  }
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
+ * Version: 2.3.1
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  */
15
  define('WCP_FOLDER_VAR', 'folders_settings');
16
  define("WCP_DS", DIRECTORY_SEPARATOR);
17
  define('WCP_FOLDER_URL',plugin_dir_url(__FILE__));
18
+ define('WCP_FOLDER_VERSION',"2.3.1");
19
 
20
  include_once plugin_dir_path(__FILE__)."includes/folders.class.php";
21
  register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
24
  /* Affiliate Class*/
25
  if(is_admin()) {
26
  include_once plugin_dir_path(__FILE__)."includes/class-affiliate.php";
27
+ include_once plugin_dir_path(__FILE__) . "includes/class-review-box.php";
28
  }
includes/class-affiliate.php CHANGED
@@ -128,7 +128,7 @@ class Folder_affiliate_program {
128
  <div class="notice notice-info chaty-notice <?php echo $this->plugin_slug ?>-premio-affiliate <?php echo $this->plugin_slug ?>-premio-affiliate">
129
  <p>Hi there, you've been using <?php echo $this->plugin_name ?> for a while now. Do you know that <b><?php echo $this->plugin_name ?></b> has an affiliate program? Join now and get 25% lifetime commission <a href="javascript:;" class="dismiss-btn"><span class="dashicons dashicons-no-alt"></span> Dismiss</a></p>
130
  <div class="clear clearfix"></div>
131
- <a class="button button-primary <?php echo $this->plugin_slug ?>-affiliate-btn" target="_blank" href="https://premio.io/affiliates/?utm_source=inapp&domain=<?php echo $_SERVER['HTTP_HOST'] ?>">Tell me more <span class="dashicons dashicons-arrow-right-alt"></span></a>
132
  </div>
133
  <div class="<?php echo $this->plugin_slug ?>-affiliate-popup">
134
  <div class="<?php echo $this->plugin_slug ?>-affiliate-popup-content">
128
  <div class="notice notice-info chaty-notice <?php echo $this->plugin_slug ?>-premio-affiliate <?php echo $this->plugin_slug ?>-premio-affiliate">
129
  <p>Hi there, you've been using <?php echo $this->plugin_name ?> for a while now. Do you know that <b><?php echo $this->plugin_name ?></b> has an affiliate program? Join now and get 25% lifetime commission <a href="javascript:;" class="dismiss-btn"><span class="dashicons dashicons-no-alt"></span> Dismiss</a></p>
130
  <div class="clear clearfix"></div>
131
+ <a class="button button-primary <?php echo $this->plugin_slug ?>-affiliate-btn" target="_blank" href="https://premio.io/affiliates/?utm_source=inapp&plugin=folders&domain=<?php echo $_SERVER['HTTP_HOST'] ?>">Tell me more <span class="dashicons dashicons-arrow-right-alt"></span></a>
132
  </div>
133
  <div class="<?php echo $this->plugin_slug ?>-affiliate-popup">
134
  <div class="<?php echo $this->plugin_slug ?>-affiliate-popup-content">
includes/class-review-box.php ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class folders_review_box {
3
+
4
+ public $plugin_name = "Folders";
5
+
6
+ public $plugin_slug = "folders";
7
+
8
+ public function __construct() {
9
+
10
+ add_action("wp_ajax_".$this->plugin_slug."_review_box", array($this, "affiliate_program"));
11
+
12
+ add_action('admin_notices', array($this, 'admin_notices'));
13
+ }
14
+
15
+ public function affiliate_program() {
16
+ $nonce = filter_input(INPUT_POST, 'nonce', FILTER_SANITIZE_STRING);
17
+ $days = filter_input(INPUT_POST, 'days', FILTER_SANITIZE_STRING);
18
+ if(!empty($nonce) && wp_verify_nonce($nonce, $this->plugin_slug."_review_box")) {
19
+ if($days == -1) {
20
+ add_option($this->plugin_slug."_hide_review_box", "1");
21
+ } else {
22
+ $date = date("Y-m-d", strtotime("+".$days." days"));
23
+ update_option($this->plugin_slug."_show_review_box_after", $date);
24
+ }
25
+ }
26
+ die;
27
+ }
28
+
29
+ public function admin_notices() {
30
+ $is_hidden = get_option($this->plugin_slug."_hide_review_box");
31
+ if($is_hidden !== false) {
32
+ return;
33
+ }
34
+ $current_count = get_option($this->plugin_slug."_show_review_box_after");
35
+ if($current_count === false) {
36
+ $date = date("Y-m-d", strtotime("+7 days"));
37
+ add_option($this->plugin_slug."_show_review_box_after", $date);
38
+ return;
39
+ } else if($current_count < 35) {
40
+ return;
41
+ }
42
+ $date_to_show = get_option($this->plugin_slug."_show_review_box_after");
43
+ if($date_to_show !== false) {
44
+ $current_date = date("Y-m-d");
45
+ if($current_date < $date_to_show) {
46
+ return;
47
+ }
48
+ }
49
+ ?>
50
+ <style>
51
+ .<?php echo $this->plugin_slug ?>-premio-review-box p a {
52
+ display: inline-block;
53
+ float: right;
54
+ text-decoration: none;
55
+ color: #999999;
56
+ position: absolute;
57
+ right: 12px;
58
+ top: 12px;
59
+ }
60
+ .<?php echo $this->plugin_slug ?>-premio-review-box p a:hover, .<?php echo $this->plugin_slug ?>-premio-review-box p a:focus {
61
+ color: #333333;
62
+ }
63
+ .<?php echo $this->plugin_slug ?>-premio-review-box .button span {
64
+ display: inline-block;
65
+ line-height: 27px;
66
+ font-size: 16px;
67
+ }
68
+ .<?php echo $this->plugin_slug ?>-review-box-popup {
69
+ position: fixed;
70
+ width: 100%;
71
+ height: 100%;
72
+ z-index: 10001;
73
+ background: rgba(0,0,0,0.65);
74
+ top: 0;
75
+ left: 0;
76
+ display: none;
77
+ }
78
+ .<?php echo $this->plugin_slug ?>-review-box-popup-content {
79
+ background: #ffffff;
80
+ padding: 20px;
81
+ position: absolute;
82
+ max-width: 450px;
83
+ width: 100%;
84
+ margin: 0 auto;
85
+ top: 45%;
86
+ left: 0;
87
+ right: 0;
88
+ -webkit-border-radius: 5px;
89
+ -moz-border-radius: 5px;
90
+ border-radius: 5px;: ;
91
+ }
92
+ .<?php echo $this->plugin_slug ?>-review-box-title {
93
+ padding: 0 0 10px 0;
94
+ font-weight: bold;
95
+ }
96
+ .<?php echo $this->plugin_slug ?>-review-box-options a {
97
+ display: block;
98
+ margin: 5px 0 5px 0;
99
+ color: #333;
100
+ text-decoration: none;
101
+ }
102
+ .<?php echo $this->plugin_slug ?>-review-box-options a.dismiss {
103
+ color: #999;
104
+ }
105
+ .<?php echo $this->plugin_slug ?>-review-box-options a:hover, .affiliate-options a:focus {
106
+ color: #0073aa;
107
+ }
108
+ button.<?php echo $this->plugin_slug ?>-close-review-box-popup {
109
+ position: absolute;
110
+ top: 5px;
111
+ right: 0;
112
+ border: none;
113
+ background: transparent;
114
+ cursor: pointer;
115
+ }
116
+ a.button.button-primary.<?php echo $this->plugin_slug ?>-review-box-btn {
117
+ font-size: 14px;
118
+ background: #F51366;
119
+ color: #fff;
120
+ border: solid 1px #F51366;
121
+ border-radius: 3px;
122
+ line-height: 24px;
123
+ -webkit-box-shadow: 0 3px 5px -3px #333333;
124
+ -moz-box-shadow: 0 3px 5px -3px #333333;
125
+ box-shadow: 0 3px 5px -3px #333333;
126
+ text-shadow: none;
127
+ }
128
+ .notice.notice-info.premio-notice {
129
+ position: relative;
130
+ padding: 1px 30px 1px 12px;
131
+ }
132
+ .notice.notice-info.premio-notice ul li {
133
+ margin: 0;
134
+ }
135
+ .notice.notice-info.premio-notice ul li a {
136
+ color: #0073aa;
137
+ font-size: 14px;
138
+ text-decoration: underline;
139
+ }
140
+ .<?php echo $this->plugin_slug ?>-premio-review-box p {
141
+ display: inline-block;
142
+ line-height: 30px;
143
+ vertical-align: middle;
144
+ padding: 0 10px 0 0;
145
+ }
146
+ .<?php echo $this->plugin_slug ?>-premio-review-box p img {
147
+ width: 30px;
148
+ height: 30px;
149
+ display: inline-block;
150
+ margin: 0 10px;
151
+ vertical-align: middle;
152
+ border-radius: 15px;
153
+ }
154
+ </style>
155
+ <div class="notice notice-info premio-notice <?php echo $this->plugin_slug ?>-premio-review-box <?php echo $this->plugin_slug ?>-premio-review-box">
156
+ <p>
157
+ Hi there, it seems like <b><?php echo $this->plugin_name ?></b> is bringing you some value, and that's pretty awesome! Can you please show us some love and rate <?php echo $this->plugin_name ?> on WordPress? It'll only take 2 minutes of your time, and will really help us spread the word
158
+ - <b>Gal Dubinski</b>, Co-founder <img width="30px" src="<?php echo esc_url(plugin_dir_url(__FILE__)."../assets/images/premio-owner.png") ?>" />
159
+ <a href="javascript:;" class="dismiss-btn <?php echo $this->plugin_slug ?>-premio-review-dismiss-btn"><span class="dashicons dashicons-no-alt"></span></a>
160
+ </p>
161
+ <div class="clear clearfix"></div>
162
+ <ul>
163
+ <li><a class="<?php echo $this->plugin_slug ?>-premio-review-box-hide-btn" href="https://wordpress.org/support/plugin/folders/reviews/?filter=5" target="_blank">I'd love to help :)</a></li>
164
+ <li><a class="<?php echo $this->plugin_slug ?>-premio-review-box-future-btn" href="javascript:;">Not this time</a></li>
165
+ <li><a class="<?php echo $this->plugin_slug ?>-premio-review-box-hide-btn" href="javascript:;">I've already rated you</a></li>
166
+ </ul>
167
+ </div>
168
+ <div class="<?php echo $this->plugin_slug ?>-review-box-popup">
169
+ <div class="<?php echo $this->plugin_slug ?>-review-box-popup-content">
170
+ <button class="<?php echo $this->plugin_slug ?>-close-review-box-popup"><span class="dashicons dashicons-no-alt"></span></button>
171
+ <div class="<?php echo $this->plugin_slug ?>-review-box-title">Would you like us to remind you about this later?</div>
172
+ <div class="<?php echo $this->plugin_slug ?>-review-box-options">
173
+ <a href="javascript:;" data-days="3">Remind me in 3 days</a>
174
+ <a href="javascript:;" data-days="10">Remind me in 10 days</a>
175
+ <a href="javascript:;" data-days="-1" class="dismiss">Don't remind me about this</a>
176
+ </div>
177
+ </div>
178
+ </div>
179
+ <script>
180
+ jQuery(document).ready(function(){
181
+ jQuery("body").addClass("has-premio-box");
182
+ jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-premio-review-dismiss-btn, .<?php echo $this->plugin_slug ?>-premio-review-box-future-btn", function(){
183
+ jQuery(".<?php echo $this->plugin_slug ?>-review-box-popup").show();
184
+ });
185
+ jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-close-review-box-popup", function(){
186
+ jQuery(".<?php echo $this->plugin_slug ?>-review-box-popup").hide();
187
+ });
188
+ jQuery(document).on("click",".<?php echo $this->plugin_slug ?>-premio-review-box-hide-btn",function(){
189
+ jQuery(".<?php echo $this->plugin_slug ?>-review-box-options a:last").trigger("click");
190
+ });
191
+ jQuery(document).on("click", ".<?php echo $this->plugin_slug ?>-review-box-options a", function(){
192
+ var dataDays = jQuery(this).attr("data-days");
193
+ jQuery(".<?php echo $this->plugin_slug ?>-review-box-popup").remove();
194
+ jQuery(".<?php echo $this->plugin_slug ?>-premio-review-box").remove();
195
+ jQuery("body").removeClass("has-premio-box");
196
+ jQuery.ajax({
197
+ url: "<?php echo admin_url("admin-ajax.php") ?>",
198
+ data: "action=<?php echo esc_attr($this->plugin_slug) ?>_review_box&days="+dataDays+"&nonce=<?php echo esc_attr(wp_create_nonce($this->plugin_slug."_review_box")) ?>",
199
+ type: "post",
200
+ success: function() {
201
+ jQuery(".<?php echo $this->plugin_slug ?>-review-box-popup").remove();
202
+ jQuery(".<?php echo $this->plugin_slug ?>-premio-review-box").remove();
203
+ }
204
+ });
205
+ });
206
+ });
207
+ </script>
208
+ <?php
209
+ }
210
+ }
211
+ $folders_review_box = new folders_review_box();
includes/folders.class.php CHANGED
@@ -110,11 +110,11 @@ class WCP_Folders
110
  }
111
 
112
  public function check_for_default_folders() {
113
- global $typenow;
114
  $isAjax = (defined('DOING_AJAX') && DOING_AJAX)?1:0;
115
  $options = get_option('folders_settings');
116
  $options = (empty($options) || !is_array($options))?array():$options;
117
- if(!$isAjax && in_array($typenow, $options)) {
118
  $default_folders = get_option('default_folders');
119
  $default_folders = (empty($default_folders) || !is_array($default_folders))?array():$default_folders;
120
  if ($typenow == "attachment") {
110
  }
111
 
112
  public function check_for_default_folders() {
113
+ global $typenow, $current_screen;
114
  $isAjax = (defined('DOING_AJAX') && DOING_AJAX)?1:0;
115
  $options = get_option('folders_settings');
116
  $options = (empty($options) || !is_array($options))?array():$options;
117
+ if(!$isAjax && in_array($typenow, $options) && (isset($current_screen->base) && ($current_screen->base == "edit" || ($current_screen->base == "upload")))) {
118
  $default_folders = get_option('default_folders');
119
  $default_folders = (empty($default_folders) || !is_array($default_folders))?array():$default_folders;
120
  if ($typenow == "attachment") {
includes/form.class.php CHANGED
@@ -17,7 +17,12 @@ class WCP_Forms {
17
  <span><?php esc_html_e("New Folder", WCP_FOLDER) ?></span>
18
  </a>
19
  <span class="folder-loader-ajax">
20
- <img src="<?php echo esc_url(admin_url('/images/spinner.gif')); ?>" alt="">
 
 
 
 
 
21
  </span>
22
  <div class="clear"></div>
23
  </div>
17
  <span><?php esc_html_e("New Folder", WCP_FOLDER) ?></span>
18
  </a>
19
  <span class="folder-loader-ajax">
20
+ <img class="active" src="<?php echo esc_url(admin_url('/images/spinner.gif')); ?>" alt="">
21
+ <svg id="successAnimation" fill="#F51366" class="animated" xmlns="http://www.w3.org/2000/svg" width="70" height="70" viewBox="0 0 70 70">
22
+ <path id="successAnimationResult" fill="#D8D8D8" d="M35,60 C21.1928813,60 10,48.8071187 10,35 C10,21.1928813 21.1928813,10 35,10 C48.8071187,10 60,21.1928813 60,35 C60,48.8071187 48.8071187,60 35,60 Z M23.6332378,33.2260427 L22.3667622,34.7739573 L34.1433655,44.40936 L47.776114,27.6305926 L46.223886,26.3694074 L33.8566345,41.59064 L23.6332378,33.2260427 Z"></path>
23
+ <circle id="successAnimationCircle" cx="35" cy="35" r="24" stroke="#979797" stroke-width="2" stroke-linecap="round" fill="transparent"></circle>
24
+ <polyline id="successAnimationCheck" stroke="#979797" stroke-width="2" points="23 34 34 43 47 27" fill="transparent"></polyline>
25
+ </svg>
26
  </span>
27
  <div class="clear"></div>
28
  </div>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
3
  Tags: folder, folders, organize, pages folders, media library, posts folders, media folders, subfolders, file manager, directories
4
  Requires at least: 3.0.0
5
  Tested up to: 5.2
6
- Stable tag: 2.3
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
@@ -134,6 +134,9 @@ A live demo for the Folders plugin is available at <a href="https://demo.premio.
134
 
135
  == Changelog ==
136
 
 
 
 
137
  = 2.3 =
138
  Select a default folder for your media library, pages, posts, and custom posts. We've also added a knowledge base with all FAQs.
139
 
3
  Tags: folder, folders, organize, pages folders, media library, posts folders, media folders, subfolders, file manager, directories
4
  Requires at least: 3.0.0
5
  Tested up to: 5.2
6
+ Stable tag: 2.3.1
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a WordPress plugin that will help you quickly organize and manage all of your Pages, Posts and Media library files in folders.
134
 
135
  == Changelog ==
136
 
137
+ = 2.3.1 =
138
+ We've added an indication for succesful actions (like moving elements into a folder, changing folders names etc)
139
+
140
  = 2.3 =
141
  Select a default folder for your media library, pages, posts, and custom posts. We've also added a knowledge base with all FAQs.
142
 
templates/admin/general-settings.php CHANGED
@@ -92,7 +92,7 @@ defined('ABSPATH') or wp_die('Nope, not accessing this');
92
  </th>
93
  <td>
94
  <select class="hide-show-option <?php echo esc_attr($is_checked) ?>" id="folders_for_<?php echo esc_attr($post_type->name); ?>" name="default_folders[<?php echo esc_attr($post_type->name); ?>]" ?>">
95
- <option value="">All <?php echo esc_attr($post_type->label) ?> Folders</option>
96
  <option value="-1" <?php echo ($selected_id == -1)?"selected":"" ?>>Unassigned <?php echo esc_attr($post_type->label) ?></option>
97
  <?php
98
  if(isset($terms_data[$post_type->name]) && !empty($terms_data[$post_type->name])) {
@@ -118,7 +118,7 @@ defined('ABSPATH') or wp_die('Nope, not accessing this');
118
  </th>
119
  <td>
120
  <select class="hide-show-option <?php echo esc_attr($is_checked) ?>" id="folders_for_<?php echo esc_attr($post_type->name); ?>" name="default_folders[<?php echo esc_attr($post_type->name); ?>]" ?>">
121
- <option value="">All <?php echo esc_attr($post_type->label) ?> Folders</option>
122
  <option value="-1" <?php echo ($selected_id == -1)?"selected":"" ?>>Unassigned <?php echo esc_attr($post_type->label) ?></option>
123
  <?php
124
  if(isset($terms_data[$post_type->name]) && !empty($terms_data[$post_type->name])) {
92
  </th>
93
  <td>
94
  <select class="hide-show-option <?php echo esc_attr($is_checked) ?>" id="folders_for_<?php echo esc_attr($post_type->name); ?>" name="default_folders[<?php echo esc_attr($post_type->name); ?>]" ?>">
95
+ <option value="">All <?php echo esc_attr($post_type->label) ?> Folder</option>
96
  <option value="-1" <?php echo ($selected_id == -1)?"selected":"" ?>>Unassigned <?php echo esc_attr($post_type->label) ?></option>
97
  <?php
98
  if(isset($terms_data[$post_type->name]) && !empty($terms_data[$post_type->name])) {
118
  </th>
119
  <td>
120
  <select class="hide-show-option <?php echo esc_attr($is_checked) ?>" id="folders_for_<?php echo esc_attr($post_type->name); ?>" name="default_folders[<?php echo esc_attr($post_type->name); ?>]" ?>">
121
+ <option value="">All <?php echo esc_attr($post_type->label) ?> Folder</option>
122
  <option value="-1" <?php echo ($selected_id == -1)?"selected":"" ?>>Unassigned <?php echo esc_attr($post_type->label) ?></option>
123
  <?php
124
  if(isset($terms_data[$post_type->name]) && !empty($terms_data[$post_type->name])) {