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

Version Description

List view folders bulk actions bug fixed

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.6.7
Comparing to
See all releases

Code changes from version 2.6.6 to 2.6.7

assets/css/design.css CHANGED
@@ -1788,6 +1788,13 @@ span.create_new_folder {
1788
  body:not(.woocommerce-page) .wp-list-table th {
1789
  width: auto;
1790
  }
 
 
 
 
 
 
 
1791
  @media screen and (max-width: 960px) {
1792
  .wcp-content {
1793
  left: 36px
1788
  body:not(.woocommerce-page) .wp-list-table th {
1789
  width: auto;
1790
  }
1791
+ .popup-form-content .select-box {
1792
+ padding: 30px 0;
1793
+ }
1794
+ .popup-form-content .select-box select {
1795
+ width: 100%;
1796
+ max-width: inherit;
1797
+ }
1798
  @media screen and (max-width: 960px) {
1799
  .wcp-content {
1800
  left: 36px
assets/css/design.min.css CHANGED
@@ -1 +1 @@
1
- .wcp-custom-menu{padding-left:0}.wcp-custom-menu a,.wcp-custom-menu a:focus{outline:0;box-shadow:none}.wcp-custom-menu{position:relative}.wcp-container ul{list-style:none}.wcp-container .route{position:relative;list-style-type:none;border:0;margin:0;padding:0;top:0;margin-top:0;max-height:100%!important;width:100%;border-radius:2px;z-index:-1;background:0 0}.wcp-container .route span{position:absolute;top:2px;left:0;z-index:10;width:20px;height:18px;text-indent:0;font-size:20px;background:no-repeat;text-align:center}.wcp-container .route .title{position:absolute;border:0;margin:0;padding:0;height:30px;width:200px;text-indent:28px;background:0 0;box-shadow:none;font-size:13px;line-height:26px;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;overflow:hidden;font-weight:400}.wcp-container .first-title{margin-left:10px}.wcp-container .space{position:relative;list-style-type:none;border:0;margin:0 0 0 20px;padding:0 0 30px 0;width:40px;top:30px;height:100%;z-index:1}.wcp-container .first-space{margin-left:0;top:0;padding:0}i.fa-caret-right{transition:.1s;-webkit-transition:.1s;-moz-transition:.1s}li.active>span>i.fa-caret-right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}li.active>span>i.fa-folder:before{content:"\f07c"}.has-sub-tree>ul.ui-sortable li{display:none}.has-sub-tree.active>ul.ui-sortable>li{display:block}.nav-icon{display:none;left:-10px!important;cursor:pointer}.has-sub-tree>.nav-icon{display:block}.wcp-content{position:fixed!important;top:32px;left:160px;bottom:0;width:280px;box-sizing:border-box;z-index:1;direction:ltr;transition:all .15s linear;-webkit-transition:all .15s linear;-moz-transition:all .15s linear}html[dir=rtl] .wcp-content{left:auto;right:160px}body.folded .wcp-content{left:36px}html[dir=rtl] body.folded .wcp-content{left:auto;right:36px}body.wp-admin #wpcontent{padding-left:305px;transition:all .15s linear;-webkit-transition:all .15s linear;-moz-transition:all .15s linear}html[dir=rtl] body.wp-admin #wpcontent{padding-left:0;padding-right:305px}.wcp-container{padding:20px 20px 20px 16px}.form-title{font-size:23px;font-weight:400;margin:0;padding:0 0 10px 0;line-height:29px;min-height:36px}.form-operations{border:solid 1px #e5e5e5;border-right:none;margin-bottom:20px}.form-operations ul{margin:0;padding:0}.form-operations li{display:block;float:left;width:20%;text-align:center;background:#fff;margin:0;padding:0}.form-operations li a{display:block;padding:10px 0;border-right:solid 1px #e5e5e5;font-size:16px;color:#727272}.clearfix{clear:both}.wcp-parent-data{position:relative}.wcp-parent{position:absolute;left:-21px;font-weight:700;font-size:14px}.wcp-parent .fa{font-size:18px;margin-right:8px}.wcp-form-data{background:#fff;border:solid 1px #f1f1f1;padding:15px;display:none;margin-bottom:20px}.wcp-form-title{color:#727272;font-size:14px;text-transform:uppercase;padding:0 0 10px 0}.wcp-form-data .form-field{padding:0 0 10px 0}.wcp-form-data .form-field input,.wcp-form-data .form-field select{width:100%}button#wcp-save-folder{float:right}.wcp-form-message span{display:block;padding:5px 10px;background:#ffabab;margin-bottom:10px;color:#000;border:solid 1px #8c0000;border-radius:4px}.wcp-container .route.active-item>h3.title{background:#008ec2;color:#fff;border-radius:4px}.wcp-container .route span.ui-icon{line-height:24px;font-size:18px;cursor:move;left:5px;top:2px;height:26px}.route.active-item>span.ui-icon{background:#008ec2;color:#fff}#custom-menu.active>ul>li.route{display:block}.wcp-parent.active>i.fa-caret-right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.wcp-parent.active>i.fa-folder:before{content:"\f07c"}.wcp-container .route .title .folder-sticky-icon,.wcp-container .route .title .move-folder-icon{float:right;position:relative;top:0;left:auto;width:20px;height:30px;line-height:26px;display:none}.wcp-container .route.is-sticky .title .folder-sticky-icon{display:block}span.folder-sticky-icon i{font-size:14px!important}.mCS_no_scrollbar .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{overflow:visible}body:not(.no-hover-css) .wcp-container .route .title:hover{background:rgba(250,22,107,.08);cursor:pointer}body:not(.no-hover-css) .wcp-container .route .title:hover>.folder-sticky-icon,body:not(.no-hover-css) .wcp-container .route .title:hover>.star-icon{display:none!important}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .move-folder-icon,body:not(.no-hover-css) .wcp-container .route .title:hover .move-folder-icon{display:block}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .ui-icon .pfolder-folder-close:before,body:not(.no-hover-css) .wcp-container .route .title:hover .ui-icon .pfolder-folder-close:before{content:"\e901"!important}#custom-menu .route.active>h3.title .pfolder-folder-close:before{content:"\e902"}.route.is-sticky>h3.title>.ui-icon>.folder-sticky-icon{display:block;width:100%;height:auto;margin:3px auto 0}.route.is-sticky.active-item>h3.title>.ui-icon>.folder-sticky-icon{filter:invert(100%);-webkit-filter:invert(100%)}.wcp-container .route .title.wcp-drop-hover img{filter:invert(100%);-webkit-filter:invert(100%)}.plugin-button{float:right}.plugin-button.d-block{float:none}.plugin-title{display:inline-block;vertical-align:middle}.add-new-folder{text-decoration:none;display:inline-block;font-size:14px;padding:4px 10px 4px 4px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:4px;line-height:24px;position:relative}.add-new-folder:focus,.add-new-folder:hover{color:#fff}.add-new-folder:hover:after{content:"";width:100%;height:100%;background:rgba(0,0,0,.1);position:absolute;top:0;left:0}.add-new-folder span{display:block;float:left;line-height:24px;font-size:14px;margin-right:5px}.add-new-folder span.folder-icon-create_new_folder{font-size:20px}.form-options{background:#fff;padding:5px;margin:0 0;border-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.form-options .form-options{padding:0;background:0 0;box-shadow:none}.form-options ul{margin:0;padding:0}.form-options>ul>li{display:inline-block;margin:0 2px 0 0;vertical-align:top}.form-options>ul>li.last{margin:0}.form-options>ul>li>a{display:inline-block;text-decoration:none;padding:5px 5px;color:#000;vertical-align:middle;margin:0 0 5px 0;background:#f1f1f1;border-radius:4px}.form-options>ul>li.last>a{padding:3px}a#expand-collapse-list.all-open span{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.form-options>ul>li>a:hover{background:#404040;color:#fff}.form-options>ul>li>a:hover span.icon{color:#fff}.form-options>ul>li>a.expand-collapse{width:14px;text-align:center}.form-options a.expand-collapse span.icon{font-size:10px}.form-options span.icon{font-size:12px;display:inline-block;vertical-align:baseline;color:#a4c0d2}.un-categorised-items{border-radius:3px}.header-posts a,.un-categorised-items a{color:#444;padding:7px;display:block;text-decoration:none;font-size:14px;border-radius:4px;line-height:18px}.header-posts a:hover,.un-categorised-items.active-item,.un-categorised-items:hover{background:rgba(250,22,107,.08);border-radius:4px}.header-posts a.active-item,.un-categorised-items.active-item{background:#008ec2!important;color:#fff!important}.un-categorised-items.active-item a{color:#fff!important}.header-posts a.active-item span.total-count,.un-categorised-items.active-item a span{color:#fff!important}span.total-count{float:right;font-size:12px;line-height:16px}.wcp-icon{display:inline-block;font-size:16px;vertical-align:top;margin-right:3px}#custom-menu .wcp-icon{font-size:16px!important;line-height:24px}#custom-menu .route .nav-icon .wcp-icon{font-size:9px!important;color:#fa166b;font-weight:700;transform:rotate(-90deg);transition:all .25s linear}#custom-menu .route.active .nav-icon .wcp-icon{transform:rotate(0)}.route.active>.nav-icon>.folder-icon-arrow_right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.route.active>.ui-icon>.folder-icon-folder:before{content:"\e90c"}.wcp-container .route span.total-count{position:relative;font-size:10px;float:right;text-align:center;width:auto;display:block;margin:4px 8px 3px 3px;color:#23282d!important;line-height:16px;height:16px}.wcp-container .route.active-item>h3.title span.total-count{color:#fff!important}.dynamic-menu{position:fixed;left:auto;right:5px;background:#fff;width:170px;padding:0;z-index:1000001;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25)}.dynamic-menu ul{margin:0;padding:0}.sticky-folders .dynamic-menu{left:auto;right:50px}.dynamic-menu li{position:relative;width:100%;display:block!important;padding:2px 0;margin:0}.dynamic-menu a{text-decoration:none;color:#333;position:relative;display:block;padding:5px 10px;line-height:18px;white-space:nowrap}.dynamic-menu ul>li>a>span,.dynamic-menu ul>li>a>span span{position:relative!important;display:inline-block;vertical-align:middle;margin-right:5px;top:auto!important;width:20px!important;height:20px!important;line-height:14px}#custom-menu .dynamic-menu ul>li>a .sticky-pin{line-height:20px}#custom-menu .dynamic-menu ul>li>a .sticky-pin i{font-size:16px!important}.dynamic-menu ul>li>a>span span{top:auto;height:auto;width:auto;margin:0;left:auto;vertical-align:baseline;display:inline}.dynamic-menu li.new-folder{border-bottom:solid 1px #d8d8d8}.dynamic-menu a.active,.dynamic-menu a:hover{background:#efefef;color:#000}.dynamic-menu ul li span{font-size:20px;vertical-align:middle}.dynamic-menu ul li span.sticky-folder-icon{width:20px}.dynamic-menu ul li span i{font-size:14px;line-height:16px;font-weight:400}.wcp-form-input{padding-left:35px;box-sizing:border-box;position:relative}.wcp-form-input input{width:100%}.wcp-form-btn{padding:4px 0 4px 2px}.wcp-form-input:before{content:"\e90d";font-family:folder-icon!important;speak:none;position:absolute;left:0;font-size:28px;top:5px}.add-new-folder-btn{margin-right:5px!important}.form-loader{width:100%;height:5px;margin:0 0 10px}.form-loader-count{width:0;height:5px;background:url(../images/form-loader.png);transition:all 2.5s linear;-webkit-transition:all 2s linear;-moz-transition:all 2.5s linear}.route.is-high>.ui-icon>i:before{content:"\e900"!important}.route.is-high.active>.ui-icon>i:before{content:"\e90c"!important;z-index:11;color:#444;font-size:20px}.route.is-high.active>.ui-icon>i:after{content:"\e907";margin-left:-1.2em;color:#444;font-size:11px;top:1px;position:absolute}.route.is-high.active.active-item>.ui-icon>i:after,.route.is-high.active.active-item>.ui-icon>i:before{color:#fff}li.active-menu{z-index:2!important}body.woocommerce-page th#taxonomy-product_folder{width:10%!important}.wp-list-table th.column-title{width:22%!important}.wp-list-table #wcp_move{width:20px!important}td.wcp_move.column-wcp_move{vertical-align:middle}.wp-list-table tr td .wcp-move-file{vertical-align:middle;opacity:0}.wp-list-table td.wcp_move.column-wcp_move.wcp-draggable,.wp-list-table tr:hover td .wcp-move-file{opacity:1}.wcp-drop-hover{background:#fa166b!important;z-index:2!important;color:#fff!important}.wcp-drop-hover i{color:#fff!important}.ui-draggable-dragging{z-index:1051!important}.wcp-hover-list{background:#fa166b!important;color:#fff;position:relative}.wcp-hover-list a{color:#fff}.wcp-hover-list span.total-count{color:#000}span.wcp-item{display:none}.wcp-move-file{cursor:move}.wcp-drop-hover-list a.folder-view{background:#008ec2;color:#fff;border:solid 1px #fff;position:relative}.wcp-drop-hover-list a.folder-view:before{width:100%;height:100%;content:"";position:absolute;top:-2px;left:-2px;border:solid 1px #008ec2;padding:1px;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px}.ui-draggable-dragging.wcp-move-file{z-index:5001;display:inline-block;border:solid 2px #0073aa;padding:5px 10px;border-radius:5px;background:#e4f6ff;position:fixed!important;max-width:230px;overflow:hidden;width:auto!important}.ui-draggable-dragging.wcp-move-file span{display:block;float:left}.ui-draggable-dragging.wcp-move-file span.wcp-move{margin-right:5px;display:block;float:left}.wcp-container .route span.title-text{position:relative;top:auto;left:auto;display:inline-block;font-size:16px;line-height:30px;height:30px;width:calc(100% - 100px);overflow:hidden;white-space:nowrap;text-align:left}.ui-resizable-handle.ui-resizable-e{position:absolute;top:0;height:100%;height:100vh;width:1px;right:0;border-right:1px solid #ccc;cursor:col-resize}.ui-resizable-handle.ui-resizable-e:before,.ui-resizable-handle.ui-resizable-w:before{content:"";top:25%;width:3px;height:30px;position:absolute;border-left:solid 1px #fa166b;border-right:solid 1px #fa166b;left:-1px}.ui-resizable-handle.ui-resizable-w{position:absolute;top:0;height:100%;height:100vh;width:1px;left:0;border-right:1px solid #ccc;cursor:col-resize}div#custom-menu{padding:0 10px 10px;background:#fff;box-shadow:0 4px 21px rgba(7,16,28,.1)}body:not(.no-hover-css) .sticky-folders li a:hover span.update-inline-record,body:not(.no-hover-css) .wcp-container .route h3:hover>span.update-inline-record{width:18px}.tree-structure li{display:block;width:auto;float:left;margin:0;padding:0}.tree-structure .folder-item{padding:4px;position:relative}.tree-structure .folder-view{display:block;border:none;color:#404040;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;position:relative;cursor:pointer;background:#f1f1f1;font-size:14px;line-height:16px}.tree-structure .folder-view span.item-name{display:block;padding:8px 15px 8px 30px;position:relative;width:100%;overflow:hidden;height:32px;font-size:14px;box-sizing:border-box}.folder-view span.item-name:before{content:"\e906";font-family:premio-folder!important;position:absolute;left:8px;font-size:16px;color:#a4c0d2}.folder-view.is-high span.item-name:before{content:"\e900"}.folder-view.is-post span.item-name:before{content:"\e901"}.tree-structure span.folder-option{position:absolute;right:0;font-family:folder-icon!important;top:0;font-size:20px;line-height:38px;z-index:1;cursor:pointer;display:none}.tree-structure .folder-view:hover span.folder-option{display:block}.tree-structure span.folder-option:hover{color:#f51366}.tree-structure span.folder-option:after{content:"\e90a"}.tree-structure li{position:relative}.tree-structure{margin-left:-8px;margin-right:-8px}.tree-structure .folder-view span.folder-title{width:100%;display:block}.swal2-popup .swal2-title{line-height:36px}.attachments-browser.ui-draggable-dragging .media-sidebar,.attachments-browser.ui-draggable-dragging .media-toolbar,.attachments-browser.ui-draggable-dragging .uploader-inline,.attachments-browser.ui-draggable-dragging ul.attachments{display:none}.attachments.ui-sortable.ui-draggable-dragging{z-index:5000}.selected-items{background:#0073aa;color:#fff;padding:10px 20px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;margin-top:0;cursor:none;font-size:12px}.media-frame,.media-frame .attachments-browser,.media-frame-content{overflow:inherit}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_draggerRail{width:2px!important;background-color:transparent!important;box-shadow:none!important}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px!important;background-color:#fa166b!important;margin:0 0 0 4px!important;padding:0!important}.mCSB_outside+.mCSB_scrollTools{right:-15px!important}body.upload-php.eml-grid #wpbody{position:relative!important;top:0!important;bottom:auto!important;left:auto!important;right:auto!important;height:auto}#footer-thankyou{display:none}span.upgrade-message{padding:0;background:#fff;display:inline-block;font-size:12px;color:#000}span.upgrade-message a.pink,span.upgrade-message span.pink{color:#ff5983;text-decoration:none;font-weight:700}.media-toolbar.sticky-media{position:fixed;top:32px;right:18px!important;left:auto}.media-position{width:1px;height:1px}.media-frame.mode-grid .media-toolbar{margin:0!important}.button-disabled{cursor:no-drop;pointer-events:none}.wcp-hide-show-buttons{position:absolute;top:25px;right:-20px;z-index:10001}html[dir=rtl] .wcp-hide-show-buttons{left:-20px;right:auto}.wcp-hide-show-buttons .toggle-buttons{background:#f51366;color:#fff;display:inline-block;margin:0;padding:0;float:left;-webkit-border-top-right-radius:50%;-webkit-border-bottom-right-radius:50%;-moz-border-radius-topright:50%;-moz-border-radius-bottomright:50%;border-top-right-radius:50%;border-bottom-right-radius:50%;display:none;width:20px;height:20px;cursor:pointer;position:relative}.wcp-hide-show-buttons:hover .toggle-buttons:after{content:"";width:100%;height:100%;background:0 0;position:absolute;top:0;left:0;-webkit-border-top-right-radius:50%;-webkit-border-bottom-right-radius:50%;-moz-border-radius-topright:50%;-moz-border-radius-bottomright:50%;border-top-right-radius:50%;border-bottom-right-radius:50%}html[dir=rtl] .wcp-hide-show-buttons .toggle-buttons{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-border-top-left-radius:50%;-webkit-border-bottom-left-radius:50%;-moz-border-radius-top-left:50%;-moz-border-radius-bottom-left:50%;border-top-left-radius:50%;border-bottom-left-radius:50%}html[dir=rtl] .wcp-hide-show-buttons .toggle-buttons span{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.hide-folders-area .wcp-content{width:0!important}.hide-folders-area .wcp-container{display:none}.wcp-hide-show-buttons .toggle-buttons.active{display:block}#wcp-content.no-transition .wcp-container{display:none}button.button.organize-button{vertical-align:middle;text-decoration:none;display:inline-block;font-size:14px;padding:4px 10px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:3px;line-height:14px;-webkit-box-shadow:0 3px 5px -3px #333;-moz-box-shadow:0 3px 5px -3px #333;box-shadow:0 3px 5px -3px #333;position:relative}button.button.organize-button:focus,button.button.organize-button:hover{color:#fff}button.button.organize-button:hover:after{content:"";width:100%;height:100%;background:rgba(0,0,0,.1);position:absolute;top:0;left:0}.tree-structure-content ul{margin:0;padding:0}.tree-structure-content{padding:5px 10px;background:#fff;margin:10px 0 15px;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;border:solid 1px #ccc}.tree-structure-content .tree-structure{height:40px;overflow:hidden;transition:.1s;-webkit-transition:.1s;-moz-transition:.1s}.tree-structure-content.active .tree-structure{height:auto}.folders-toggle-button{height:15px;text-align:center;position:relative}.folders-toggle-button span{background:#f51366;color:#fff;height:20px;width:30px;text-align:center;display:block;margin:0 auto;position:absolute;left:0;right:0;bottom:-10px;cursor:pointer;font-family:dashicons;font-size:20px;line-height:20px}.folders-toggle-button span:after{content:"\f347"}.tree-structure-content.active .folders-toggle-button span:after{content:"\f343"}span.media-info-message{vertical-align:middle;line-height:20px;font-weight:700;color:#f51366;padding:0 0 10px 0;display:none!important}span.media-info-message.active{display:block!important}.folder-popup-form{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.5);top:0;left:0;z-index:10001;display:none}.folder-popup-form.disabled{pointer-events:none}.popup-form-content{background:#fff;min-height:100px;width:400px;text-align:center;margin:0 auto;position:absolute;left:0;right:0;top:50%;transform:translate(0,-50%);-webkit-transform:translate(0,-50%);-moz-transform:translate(0,-50%);-o-transform:translate(0,-50%);-ms-transform:translate(0,-50%);padding:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#484848}.folder-form-buttons a,.folder-form-buttons button{display:inline-flex;padding:0;text-decoration:none;margin:10px 3px;border-radius:4px;border:solid 1px #1da1f4;line-height:34px;font-weight:700;font-size:14px;box-sizing:border-box;height:36px;cursor:pointer;flex:1;justify-content:center}.folder-form-buttons a span,.folder-form-buttons button span{-webkit-animation:fa-spin .75s infinite linear;animation:fa-spin .75s infinite linear;padding:7px}.wcp-container .folder-tooltip{position:relative}.wcp-container .folder-tooltip::after,.wcp-container .folder-tooltip::before{text-transform:none;font-size:.9em;line-height:1;user-select:none;pointer-events:none;position:absolute;display:none;opacity:0}.wcp-container .folder-tooltip::before{content:'';border:5px solid transparent;z-index:1001}.wcp-container .folder-tooltip::after{content:attr(data-folder-tooltip);font-family:Helvetica,sans-serif;text-align:center;min-width:3em;max-width:21em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:1ch 1.5ch;border-radius:.3ch;box-shadow:0 1em 2em -.5em rgba(0,0,0,.35);background:#333;color:#fff;z-index:1000}.wcp-container .folder-tooltip:hover::after,.wcp-container .folder-tooltip:hover::before{display:block;opacity:1}.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::before{bottom:100%;border-bottom-width:0;border-top-color:#333}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip[flow^=up]::after{bottom:calc(100% + 5px)}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::after,.wcp-container .folder-tooltip[flow^=up]::before{left:50%;transform:translate(-50%,-.5em)}.wp-core-ui .button-primary.select-all-item-btn{margin:11px 11px 11px 0;display:none!important}.wp-core-ui .button-primary.select-all-item-btn.active{display:inline-block!important}.form-options>ul>li.last.folder-checkbox{padding:5px 0 0}#custom-menu input.checkbox{display:none}#custom-menu.show-folder-checkbox input.checkbox{display:block;margin:5px 0 0 0}#custom-menu.show-folder-checkbox h3.title>.ui-icon>i,#custom-menu.show-folder-checkbox h3.title>.ui-icon>img{display:none!important}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.folder-form-buttons a:focus,.folder-form-buttons a:hover,.folder-form-buttons button:focus,.folder-form-buttons button:hover{color:#fff;outline:0}.folder-form-buttons a:focus{outline:0;outline:0}.form-cancel-btn,a.form-cancel-btn:hover{background-color:#fff;color:#3085d6;outline:0}.form-submit-btn{background-color:#3085d6;color:#fff;outline:0}.add-update-folder-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;text-align:center;text-transform:none;word-wrap:break-word;font-weight:700;font-size:22px;line-height:26px}.folder-form-message{font-size:15px;line-height:18px;color:#484848;padding:25px 70px}.folder-form-errors{margin:0 0 10px 0;padding:8px 0;background:#ffe4e4;color:#a20000;display:none}.folder-form-errors.active{display:block}span.folder-loader-ajax{margin:0;line-height:30px;display:none;vertical-align:middle}.folder-loader-ajax.active{display:inline-block}@-webkit-keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@-webkit-keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}#successAnimationCircle{stroke-dasharray:151px 151px;stroke:#2ce0a7}#successAnimationCheck{stroke-dasharray:36px 36px;stroke:#2ce0a7}#successAnimationResult{fill:#2ce0a7;opacity:0}svg#successAnimation{width:30px;height:34px;padding:0;display:none;float:left}#successAnimation.active{display:inline-block}.folder-loader-ajax img{display:none}.folder-loader-ajax img.active{display:inline-block}#successAnimation.animated{-webkit-animation:1s ease-out 0s 1 both scaleAnimation;animation:1s ease-out 0s 1 both scaleAnimation}#successAnimation.animated #successAnimationCircle{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationCheck{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationResult{-webkit-animation:.3s linear .9s both fadeIn;animation:.3s linear .9s both fadeIn}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:10px 0!important}.popup-folder-title{font-weight:700;font-size:24px;padding:0 0 20px 0}.select-box{padding:20px 0 10px 0}.select-box select{width:100%;max-width:300px}.actions #media_folder,select.media-select-folder{width:132px}select#media-attachment-taxonomy-filter{width:132px}.custom-media-select{float:right;padding:10px 0 0 0;display:none}.custom-media-select.active{display:block}.folder-progress{background:#b4b9be;border-radius:4px;margin:5px 0 0 0;position:relative}.folder-meter{height:20px;position:relative;background:#f1f1f1;padding:0;width:0%;border-radius:4px;-webkit-transition:all .2s linear;transition:all .2s linear}.folder-meter>span{display:block;height:100%;-webkit-box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);-moz-box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);position:relative;overflow:hidden;border-radius:4px}.folder-animate>span>span,.folder-meter>span:after,.folder-progress:after{content:"";position:absolute;border-radius:4px;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:50px 50px;-moz-background-size:50px 50px;-webkit-animation:move 2s linear infinite;overflow:hidden}.folder-animate>span:after{display:none}@-webkit-keyframes move{0%{background-position:0 0}100%{background-position:50px 50px}}.media-folder-loader{padding:10px 0 15px;display:none}.media-folder-loader>span{font-weight:700}.sticky-folders{display:none;padding:0;margin:10px 0 5px;border-top:solid 1px #e9e5e5}.top-settings{background:#fff;padding:10px 10px 5px;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.sticky-folders.active{display:block}.sticky-folders ul{margin:0;padding:0}.sticky-folders>ul>li{display:block;margin:0;padding:0}.sticky-folders>ul>li>a{display:block;color:#333;padding:0 0 0 10px;border-radius:3px;text-decoration:none;font-size:14px;line-height:30px;position:relative}.sticky-folders ul li a.active,body:not(.no-hover-css) .sticky-folders ul li a:hover{background:#dfdfdf;border-radius:3px}.sticky-folders ul li a.active-item{background-color:#008ec2!important;color:#fff}.sticky-folders ul li a.active-item img{filter:invert(100%);-webkit-filter:invert(100%)}.sticky-folders>ul>li>a>span{display:inline-block;vertical-align:middle;line-height:30px}.sticky-folders ul li a span.update-inline-record{line-height:30px;padding:0 0 0 5px;height:30px}.sticky-folders ul li a span.folder-count{padding:0 8px 0 3px}.sticky-wcp-custom-form a:focus{box-shadow:none;outline:0}span.folder-count{float:right;background:0 0;padding:0;font-size:10px;line-height:16px;border-radius:2px}span.folder-count:empty{display:none}.sticky-title{font-size:16px;font-weight:700;padding:7px}.sticky-title img{display:inline-block;vertical-align:middle;height:20px;width:20px}.sticky-folder-icon img{width:100%;filter:invert(50%);-webkit-filter:invert(50%)}.dynamic-menu .sticky-folder:hover img{filter:invert(0);-webkit-filter:invert(0)}.form-options>ul>li.last>a.sort-folder-order{width:28px;padding:5px;text-align:center;display:inline-block;box-sizing:border-box}.sort-folder-order svg{width:100%;height:100%;fill:#000}.sort-folder-order:hover svg{fill:#fff}.folder-order{position:relative}.folder-sort-menu{position:absolute;right:0;width:120px;z-index:101;background:#fff;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25);display:none}.folder-order.active .folder-sort-menu{display:block}.folder-order.active .sort-folder-order{background:#404040;color:#fff}.folder-order.active .sort-folder-order svg{fill:#fff}.folder-sort-menu li{display:block;margin:0;padding:0;background:0 0}.folder-sort-menu li a{display:block;margin:0;padding:3px 5px;background:0 0;color:#848484;text-decoration:none;font-size:14px}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}.dynamic-menu.bottom-fix{bottom:0}.folder-form-buttons{display:flex}.folder-group{position:relative;margin:45px auto 15px;padding:0 2px}.add-folder-note{padding:10px 0 0}.folder-grouptextarea{resize:none}.folder-group input,.folder-group textarea{background:0 0;font-size:14px;padding:0 0 0 15px;display:block;width:100%;border-radius:4px;border:1px solid #484848;height:34px;line-height:34px;color:#484848}.folder-group input:focus,.folder-group textarea:focus{outline:0}.folder-group input:focus~label,.folder-group input:valid~label,.folder-group textarea:focus~label,.folder-group textarea:valid~label{top:-9px;background:#fff;padding:0 5px;font-weight:400;font-size:12px;line-height:14px;color:#aeaeae}.folder-group input:focus~.bar:before,.folder-group textarea:focus~.bar:before{width:320px}.folder-group input[type=password]{letter-spacing:.3em}.folder-group label{font-size:14px;font-weight:500;position:absolute;pointer-events:none;left:20px;top:10px;-webkit-transition:.3s ease all;transition:.3s ease all;color:#484848}.folder-group .folder-bar{position:relative;display:block;width:320px}.folder-group .folder-bar:before{content:'';height:2px;width:0;bottom:0;position:absolute;background:#2196f3;-webkit-transition:.3s ease all;transition:.3s ease all;left:0}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-],.sticky-folders i{font-size:12px}span.create_new_folder{width:26px;height:26px;line-height:26px;font-size:14px;background:rgba(255,255,255,.4);backdrop-filter:blur(16px);border-radius:4px;text-align:center;margin:0 15px 0 0}.folder-search-form{padding:0 0 10px 0;position:relative}.folder-search-form input{background:#fff;border:1px solid #dbdbdb;box-sizing:border-box;border-radius:4px;height:32px;line-height:32px;box-sizing:border-box;padding:0 5px;width:100%;outline:0;box-shadow:none!important}.folder-search-form span{position:absolute;color:#aeaeae;right:0;top:0;height:32px;line-height:32px;width:32px;text-align:center}.folder-separator{padding:0 10px;height:1px;background:#e9e5e5;margin:0 0 10px 0}#custom-menu.has-filter li.route{display:none!important}#custom-menu.has-filter li.route.has-search{display:block!important}#custom-menu.has-filter h3 span.title-text.has-search-text{font-weight:700}.hide-folders-area .ui-resizable-handle.ui-resizable-e{display:none!important}.pull-right{float:right;display:block;line-height:22px}.folder-separator-2{padding:0;height:1px;background:#e9e5e5;margin:0 0 5px 0}.mCSB_scrollTools{width:10px!important}.mCSB_inside>.mCSB_container{margin-right:0!important}#custom-menu .route.has-sub-tree.has-search>.nav-icon>.pfolder-arrow-down{transform:rotate(0)}body:not(.woocommerce-page) .wp-list-table th{width:auto}@media screen and (max-width:960px){.wcp-content{left:36px}html[dir=rtl] .wcp-content{right:36px;left:auto}}@media screen and (max-width:780px){.wcp-content{left:0}html[dir=rtl] .wcp-content{right:0}}@media screen and (max-width:640px){.wcp-content{left:0;position:relative!important;width:100%!important;padding-bottom:100px;top:0;right:0;display:block}.ui-resizable-handle.ui-resizable-e{display:none!important}.hide-folders-area .wcp-container{display:block}.wcp-hide-show-buttons{display:none}.hide-folders-area .wcp-content{width:100%!important}body.wp-admin #wpcontent{padding:0!important}#wpbody-content{padding-bottom:30px}}
1
+ .wcp-custom-menu{padding-left:0}.wcp-custom-menu a,.wcp-custom-menu a:focus{outline:0;box-shadow:none}.wcp-custom-menu{position:relative}.wcp-container ul{list-style:none}.wcp-container .route{position:relative;list-style-type:none;border:0;margin:0;padding:0;top:0;margin-top:0;max-height:100%!important;width:100%;border-radius:2px;z-index:-1;background:0 0}.wcp-container .route span{position:absolute;top:2px;left:0;z-index:10;width:20px;height:18px;text-indent:0;font-size:20px;background:no-repeat;text-align:center}.wcp-container .route .title{position:absolute;border:0;margin:0;padding:0;height:30px;width:200px;text-indent:28px;background:0 0;box-shadow:none;font-size:13px;line-height:26px;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;overflow:hidden;font-weight:400}.wcp-container .first-title{margin-left:10px}.wcp-container .space{position:relative;list-style-type:none;border:0;margin:0 0 0 20px;padding:0 0 30px 0;width:40px;top:30px;height:100%;z-index:1}.wcp-container .first-space{margin-left:0;top:0;padding:0}i.fa-caret-right{transition:.1s;-webkit-transition:.1s;-moz-transition:.1s}li.active>span>i.fa-caret-right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}li.active>span>i.fa-folder:before{content:"\f07c"}.has-sub-tree>ul.ui-sortable li{display:none}.has-sub-tree.active>ul.ui-sortable>li{display:block}.nav-icon{display:none;left:-10px!important;cursor:pointer}.has-sub-tree>.nav-icon{display:block}.wcp-content{position:fixed!important;top:32px;left:160px;bottom:0;width:280px;box-sizing:border-box;z-index:1;direction:ltr;transition:all .15s linear;-webkit-transition:all .15s linear;-moz-transition:all .15s linear}html[dir=rtl] .wcp-content{left:auto;right:160px}body.folded .wcp-content{left:36px}html[dir=rtl] body.folded .wcp-content{left:auto;right:36px}body.wp-admin #wpcontent{padding-left:305px;transition:all .15s linear;-webkit-transition:all .15s linear;-moz-transition:all .15s linear}html[dir=rtl] body.wp-admin #wpcontent{padding-left:0;padding-right:305px}.wcp-container{padding:20px 20px 20px 16px}.form-title{font-size:23px;font-weight:400;margin:0;padding:0 0 10px 0;line-height:29px;min-height:36px}.form-operations{border:solid 1px #e5e5e5;border-right:none;margin-bottom:20px}.form-operations ul{margin:0;padding:0}.form-operations li{display:block;float:left;width:20%;text-align:center;background:#fff;margin:0;padding:0}.form-operations li a{display:block;padding:10px 0;border-right:solid 1px #e5e5e5;font-size:16px;color:#727272}.clearfix{clear:both}.wcp-parent-data{position:relative}.wcp-parent{position:absolute;left:-21px;font-weight:700;font-size:14px}.wcp-parent .fa{font-size:18px;margin-right:8px}.wcp-form-data{background:#fff;border:solid 1px #f1f1f1;padding:15px;display:none;margin-bottom:20px}.wcp-form-title{color:#727272;font-size:14px;text-transform:uppercase;padding:0 0 10px 0}.wcp-form-data .form-field{padding:0 0 10px 0}.wcp-form-data .form-field input,.wcp-form-data .form-field select{width:100%}button#wcp-save-folder{float:right}.wcp-form-message span{display:block;padding:5px 10px;background:#ffabab;margin-bottom:10px;color:#000;border:solid 1px #8c0000;border-radius:4px}.wcp-container .route.active-item>h3.title{background:#008ec2;color:#fff;border-radius:4px}.wcp-container .route span.ui-icon{line-height:24px;font-size:18px;cursor:move;left:5px;top:2px;height:26px}.route.active-item>span.ui-icon{background:#008ec2;color:#fff}#custom-menu.active>ul>li.route{display:block}.wcp-parent.active>i.fa-caret-right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.wcp-parent.active>i.fa-folder:before{content:"\f07c"}.wcp-container .route .title .folder-sticky-icon,.wcp-container .route .title .move-folder-icon{float:right;position:relative;top:0;left:auto;width:20px;height:30px;line-height:26px;display:none}.wcp-container .route.is-sticky .title .folder-sticky-icon{display:block}span.folder-sticky-icon i{font-size:14px!important}.mCS_no_scrollbar .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{overflow:visible}body:not(.no-hover-css) .wcp-container .route .title:hover{background:rgba(250,22,107,.08);cursor:pointer}body:not(.no-hover-css) .wcp-container .route .title:hover>.folder-sticky-icon,body:not(.no-hover-css) .wcp-container .route .title:hover>.star-icon{display:none!important}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .move-folder-icon,body:not(.no-hover-css) .wcp-container .route .title:hover .move-folder-icon{display:block}body:not(.no-hover-css) .wcp-container .route .title.wcp-drop-hover .ui-icon .pfolder-folder-close:before,body:not(.no-hover-css) .wcp-container .route .title:hover .ui-icon .pfolder-folder-close:before{content:"\e901"!important}#custom-menu .route.active>h3.title .pfolder-folder-close:before{content:"\e902"}.route.is-sticky>h3.title>.ui-icon>.folder-sticky-icon{display:block;width:100%;height:auto;margin:3px auto 0}.route.is-sticky.active-item>h3.title>.ui-icon>.folder-sticky-icon{filter:invert(100%);-webkit-filter:invert(100%)}.wcp-container .route .title.wcp-drop-hover img{filter:invert(100%);-webkit-filter:invert(100%)}.plugin-button{float:right}.plugin-button.d-block{float:none}.plugin-title{display:inline-block;vertical-align:middle}.add-new-folder{text-decoration:none;display:inline-block;font-size:14px;padding:4px 10px 4px 4px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:4px;line-height:24px;position:relative}.add-new-folder:focus,.add-new-folder:hover{color:#fff}.add-new-folder:hover:after{content:"";width:100%;height:100%;background:rgba(0,0,0,.1);position:absolute;top:0;left:0}.add-new-folder span{display:block;float:left;line-height:24px;font-size:14px;margin-right:5px}.add-new-folder span.folder-icon-create_new_folder{font-size:20px}.form-options{background:#fff;padding:5px;margin:0 0;border-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.form-options .form-options{padding:0;background:0 0;box-shadow:none}.form-options ul{margin:0;padding:0}.form-options>ul>li{display:inline-block;margin:0 2px 0 0;vertical-align:top}.form-options>ul>li.last{margin:0}.form-options>ul>li>a{display:inline-block;text-decoration:none;padding:5px 5px;color:#000;vertical-align:middle;margin:0 0 5px 0;background:#f1f1f1;border-radius:4px}.form-options>ul>li.last>a{padding:3px}a#expand-collapse-list.all-open span{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.form-options>ul>li>a:hover{background:#404040;color:#fff}.form-options>ul>li>a:hover span.icon{color:#fff}.form-options>ul>li>a.expand-collapse{width:14px;text-align:center}.form-options a.expand-collapse span.icon{font-size:10px}.form-options span.icon{font-size:12px;display:inline-block;vertical-align:baseline;color:#a4c0d2}.un-categorised-items{border-radius:3px}.header-posts a,.un-categorised-items a{color:#444;padding:7px;display:block;text-decoration:none;font-size:14px;border-radius:4px;line-height:18px}.header-posts a:hover,.un-categorised-items.active-item,.un-categorised-items:hover{background:rgba(250,22,107,.08);border-radius:4px}.header-posts a.active-item,.un-categorised-items.active-item{background:#008ec2!important;color:#fff!important}.un-categorised-items.active-item a{color:#fff!important}.header-posts a.active-item span.total-count,.un-categorised-items.active-item a span{color:#fff!important}span.total-count{float:right;font-size:12px;line-height:16px}.wcp-icon{display:inline-block;font-size:16px;vertical-align:top;margin-right:3px}#custom-menu .wcp-icon{font-size:16px!important;line-height:24px}#custom-menu .route .nav-icon .wcp-icon{font-size:9px!important;color:#fa166b;font-weight:700;transform:rotate(-90deg);transition:all .25s linear}#custom-menu .route.active .nav-icon .wcp-icon{transform:rotate(0)}.route.active>.nav-icon>.folder-icon-arrow_right{transform:rotate(90deg);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.route.active>.ui-icon>.folder-icon-folder:before{content:"\e90c"}.wcp-container .route span.total-count{position:relative;font-size:10px;float:right;text-align:center;width:auto;display:block;margin:4px 8px 3px 3px;color:#23282d!important;line-height:16px;height:16px}.wcp-container .route.active-item>h3.title span.total-count{color:#fff!important}.dynamic-menu{position:fixed;left:auto;right:5px;background:#fff;width:170px;padding:0;z-index:1000001;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25)}.dynamic-menu ul{margin:0;padding:0}.sticky-folders .dynamic-menu{left:auto;right:50px}.dynamic-menu li{position:relative;width:100%;display:block!important;padding:2px 0;margin:0}.dynamic-menu a{text-decoration:none;color:#333;position:relative;display:block;padding:5px 10px;line-height:18px;white-space:nowrap}.dynamic-menu ul>li>a>span,.dynamic-menu ul>li>a>span span{position:relative!important;display:inline-block;vertical-align:middle;margin-right:5px;top:auto!important;width:20px!important;height:20px!important;line-height:14px}#custom-menu .dynamic-menu ul>li>a .sticky-pin{line-height:20px}#custom-menu .dynamic-menu ul>li>a .sticky-pin i{font-size:16px!important}.dynamic-menu ul>li>a>span span{top:auto;height:auto;width:auto;margin:0;left:auto;vertical-align:baseline;display:inline}.dynamic-menu li.new-folder{border-bottom:solid 1px #d8d8d8}.dynamic-menu a.active,.dynamic-menu a:hover{background:#efefef;color:#000}.dynamic-menu ul li span{font-size:20px;vertical-align:middle}.dynamic-menu ul li span.sticky-folder-icon{width:20px}.dynamic-menu ul li span i{font-size:14px;line-height:16px;font-weight:400}.wcp-form-input{padding-left:35px;box-sizing:border-box;position:relative}.wcp-form-input input{width:100%}.wcp-form-btn{padding:4px 0 4px 2px}.wcp-form-input:before{content:"\e90d";font-family:folder-icon!important;speak:none;position:absolute;left:0;font-size:28px;top:5px}.add-new-folder-btn{margin-right:5px!important}.form-loader{width:100%;height:5px;margin:0 0 10px}.form-loader-count{width:0;height:5px;background:url(../images/form-loader.png);transition:all 2.5s linear;-webkit-transition:all 2s linear;-moz-transition:all 2.5s linear}.route.is-high>.ui-icon>i:before{content:"\e900"!important}.route.is-high.active>.ui-icon>i:before{content:"\e90c"!important;z-index:11;color:#444;font-size:20px}.route.is-high.active>.ui-icon>i:after{content:"\e907";margin-left:-1.2em;color:#444;font-size:11px;top:1px;position:absolute}.route.is-high.active.active-item>.ui-icon>i:after,.route.is-high.active.active-item>.ui-icon>i:before{color:#fff}li.active-menu{z-index:2!important}body.woocommerce-page th#taxonomy-product_folder{width:10%!important}.wp-list-table th.column-title{width:22%!important}.wp-list-table #wcp_move{width:20px!important}td.wcp_move.column-wcp_move{vertical-align:middle}.wp-list-table tr td .wcp-move-file{vertical-align:middle;opacity:0}.wp-list-table td.wcp_move.column-wcp_move.wcp-draggable,.wp-list-table tr:hover td .wcp-move-file{opacity:1}.wcp-drop-hover{background:#fa166b!important;z-index:2!important;color:#fff!important}.wcp-drop-hover i{color:#fff!important}.ui-draggable-dragging{z-index:1051!important}.wcp-hover-list{background:#fa166b!important;color:#fff;position:relative}.wcp-hover-list a{color:#fff}.wcp-hover-list span.total-count{color:#000}span.wcp-item{display:none}.wcp-move-file{cursor:move}.wcp-drop-hover-list a.folder-view{background:#008ec2;color:#fff;border:solid 1px #fff;position:relative}.wcp-drop-hover-list a.folder-view:before{width:100%;height:100%;content:"";position:absolute;top:-2px;left:-2px;border:solid 1px #008ec2;padding:1px;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px}.ui-draggable-dragging.wcp-move-file{z-index:5001;display:inline-block;border:solid 2px #0073aa;padding:5px 10px;border-radius:5px;background:#e4f6ff;position:fixed!important;max-width:230px;overflow:hidden;width:auto!important}.ui-draggable-dragging.wcp-move-file span{display:block;float:left}.ui-draggable-dragging.wcp-move-file span.wcp-move{margin-right:5px;display:block;float:left}.wcp-container .route span.title-text{position:relative;top:auto;left:auto;display:inline-block;font-size:16px;line-height:30px;height:30px;width:calc(100% - 100px);overflow:hidden;white-space:nowrap;text-align:left}.ui-resizable-handle.ui-resizable-e{position:absolute;top:0;height:100%;height:100vh;width:1px;right:0;border-right:1px solid #ccc;cursor:col-resize}.ui-resizable-handle.ui-resizable-e:before,.ui-resizable-handle.ui-resizable-w:before{content:"";top:25%;width:3px;height:30px;position:absolute;border-left:solid 1px #fa166b;border-right:solid 1px #fa166b;left:-1px}.ui-resizable-handle.ui-resizable-w{position:absolute;top:0;height:100%;height:100vh;width:1px;left:0;border-right:1px solid #ccc;cursor:col-resize}div#custom-menu{padding:0 10px 10px;background:#fff;box-shadow:0 4px 21px rgba(7,16,28,.1)}body:not(.no-hover-css) .sticky-folders li a:hover span.update-inline-record,body:not(.no-hover-css) .wcp-container .route h3:hover>span.update-inline-record{width:18px}.tree-structure li{display:block;width:auto;float:left;margin:0;padding:0}.tree-structure .folder-item{padding:4px;position:relative}.tree-structure .folder-view{display:block;border:none;color:#404040;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;position:relative;cursor:pointer;background:#f1f1f1;font-size:14px;line-height:16px}.tree-structure .folder-view span.item-name{display:block;padding:8px 15px 8px 30px;position:relative;width:100%;overflow:hidden;height:32px;font-size:14px;box-sizing:border-box}.folder-view span.item-name:before{content:"\e906";font-family:premio-folder!important;position:absolute;left:8px;font-size:16px;color:#a4c0d2}.folder-view.is-high span.item-name:before{content:"\e900"}.folder-view.is-post span.item-name:before{content:"\e901"}.tree-structure span.folder-option{position:absolute;right:0;font-family:folder-icon!important;top:0;font-size:20px;line-height:38px;z-index:1;cursor:pointer;display:none}.tree-structure .folder-view:hover span.folder-option{display:block}.tree-structure span.folder-option:hover{color:#f51366}.tree-structure span.folder-option:after{content:"\e90a"}.tree-structure li{position:relative}.tree-structure{margin-left:-8px;margin-right:-8px}.tree-structure .folder-view span.folder-title{width:100%;display:block}.swal2-popup .swal2-title{line-height:36px}.attachments-browser.ui-draggable-dragging .media-sidebar,.attachments-browser.ui-draggable-dragging .media-toolbar,.attachments-browser.ui-draggable-dragging .uploader-inline,.attachments-browser.ui-draggable-dragging ul.attachments{display:none}.attachments.ui-sortable.ui-draggable-dragging{z-index:5000}.selected-items{background:#0073aa;color:#fff;padding:10px 20px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;margin-top:0;cursor:none;font-size:12px}.media-frame,.media-frame .attachments-browser,.media-frame-content{overflow:inherit}.mCS-3d-dark.mCSB_scrollTools .mCSB_draggerRail,.mCS-3d.mCSB_scrollTools .mCSB_draggerRail{width:2px!important;background-color:transparent!important;box-shadow:none!important}.mCS-3d.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{width:2px!important;background-color:#fa166b!important;margin:0 0 0 4px!important;padding:0!important}.mCSB_outside+.mCSB_scrollTools{right:-15px!important}body.upload-php.eml-grid #wpbody{position:relative!important;top:0!important;bottom:auto!important;left:auto!important;right:auto!important;height:auto}#footer-thankyou{display:none}span.upgrade-message{padding:0;background:#fff;display:inline-block;font-size:12px;color:#000}span.upgrade-message a.pink,span.upgrade-message span.pink{color:#ff5983;text-decoration:none;font-weight:700}.media-toolbar.sticky-media{position:fixed;top:32px;right:18px!important;left:auto}.media-position{width:1px;height:1px}.media-frame.mode-grid .media-toolbar{margin:0!important}.button-disabled{cursor:no-drop;pointer-events:none}.wcp-hide-show-buttons{position:absolute;top:25px;right:-20px;z-index:10001}html[dir=rtl] .wcp-hide-show-buttons{left:-20px;right:auto}.wcp-hide-show-buttons .toggle-buttons{background:#f51366;color:#fff;display:inline-block;margin:0;padding:0;float:left;-webkit-border-top-right-radius:50%;-webkit-border-bottom-right-radius:50%;-moz-border-radius-topright:50%;-moz-border-radius-bottomright:50%;border-top-right-radius:50%;border-bottom-right-radius:50%;display:none;width:20px;height:20px;cursor:pointer;position:relative}.wcp-hide-show-buttons:hover .toggle-buttons:after{content:"";width:100%;height:100%;background:0 0;position:absolute;top:0;left:0;-webkit-border-top-right-radius:50%;-webkit-border-bottom-right-radius:50%;-moz-border-radius-topright:50%;-moz-border-radius-bottomright:50%;border-top-right-radius:50%;border-bottom-right-radius:50%}html[dir=rtl] .wcp-hide-show-buttons .toggle-buttons{border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;-webkit-border-top-left-radius:50%;-webkit-border-bottom-left-radius:50%;-moz-border-radius-top-left:50%;-moz-border-radius-bottom-left:50%;border-top-left-radius:50%;border-bottom-left-radius:50%}html[dir=rtl] .wcp-hide-show-buttons .toggle-buttons span{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.hide-folders-area .wcp-content{width:0!important}.hide-folders-area .wcp-container{display:none}.wcp-hide-show-buttons .toggle-buttons.active{display:block}#wcp-content.no-transition .wcp-container{display:none}button.button.organize-button{vertical-align:middle;text-decoration:none;display:inline-block;font-size:14px;padding:4px 10px;background:#f51366;color:#fff;border:solid 1px #f51366;border-radius:3px;line-height:14px;-webkit-box-shadow:0 3px 5px -3px #333;-moz-box-shadow:0 3px 5px -3px #333;box-shadow:0 3px 5px -3px #333;position:relative}button.button.organize-button:focus,button.button.organize-button:hover{color:#fff}button.button.organize-button:hover:after{content:"";width:100%;height:100%;background:rgba(0,0,0,.1);position:absolute;top:0;left:0}.tree-structure-content ul{margin:0;padding:0}.tree-structure-content{padding:5px 10px;background:#fff;margin:10px 0 15px;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;border:solid 1px #ccc}.tree-structure-content .tree-structure{height:40px;overflow:hidden;transition:.1s;-webkit-transition:.1s;-moz-transition:.1s}.tree-structure-content.active .tree-structure{height:auto}.folders-toggle-button{height:15px;text-align:center;position:relative}.folders-toggle-button span{background:#f51366;color:#fff;height:20px;width:30px;text-align:center;display:block;margin:0 auto;position:absolute;left:0;right:0;bottom:-10px;cursor:pointer;font-family:dashicons;font-size:20px;line-height:20px}.folders-toggle-button span:after{content:"\f347"}.tree-structure-content.active .folders-toggle-button span:after{content:"\f343"}span.media-info-message{vertical-align:middle;line-height:20px;font-weight:700;color:#f51366;padding:0 0 10px 0;display:none!important}span.media-info-message.active{display:block!important}.folder-popup-form{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.5);top:0;left:0;z-index:10001;display:none}.folder-popup-form.disabled{pointer-events:none}.popup-form-content{background:#fff;min-height:100px;width:400px;text-align:center;margin:0 auto;position:absolute;left:0;right:0;top:50%;transform:translate(0,-50%);-webkit-transform:translate(0,-50%);-moz-transform:translate(0,-50%);-o-transform:translate(0,-50%);-ms-transform:translate(0,-50%);padding:20px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#484848}.folder-form-buttons a,.folder-form-buttons button{display:inline-flex;padding:0;text-decoration:none;margin:10px 3px;border-radius:4px;border:solid 1px #1da1f4;line-height:34px;font-weight:700;font-size:14px;box-sizing:border-box;height:36px;cursor:pointer;flex:1;justify-content:center}.folder-form-buttons a span,.folder-form-buttons button span{-webkit-animation:fa-spin .75s infinite linear;animation:fa-spin .75s infinite linear;padding:7px}.wcp-container .folder-tooltip{position:relative}.wcp-container .folder-tooltip::after,.wcp-container .folder-tooltip::before{text-transform:none;font-size:.9em;line-height:1;user-select:none;pointer-events:none;position:absolute;display:none;opacity:0}.wcp-container .folder-tooltip::before{content:'';border:5px solid transparent;z-index:1001}.wcp-container .folder-tooltip::after{content:attr(data-folder-tooltip);font-family:Helvetica,sans-serif;text-align:center;min-width:3em;max-width:21em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:1ch 1.5ch;border-radius:.3ch;box-shadow:0 1em 2em -.5em rgba(0,0,0,.35);background:#333;color:#fff;z-index:1000}.wcp-container .folder-tooltip:hover::after,.wcp-container .folder-tooltip:hover::before{display:block;opacity:1}.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::before{bottom:100%;border-bottom-width:0;border-top-color:#333}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip[flow^=up]::after{bottom:calc(100% + 5px)}.wcp-container .folder-tooltip:not([flow])::after,.wcp-container .folder-tooltip:not([flow])::before,.wcp-container .folder-tooltip[flow^=up]::after,.wcp-container .folder-tooltip[flow^=up]::before{left:50%;transform:translate(-50%,-.5em)}.wp-core-ui .button-primary.select-all-item-btn{margin:11px 11px 11px 0;display:none!important}.wp-core-ui .button-primary.select-all-item-btn.active{display:inline-block!important}.form-options>ul>li.last.folder-checkbox{padding:5px 0 0}#custom-menu input.checkbox{display:none}#custom-menu.show-folder-checkbox input.checkbox{display:block;margin:5px 0 0 0}#custom-menu.show-folder-checkbox h3.title>.ui-icon>i,#custom-menu.show-folder-checkbox h3.title>.ui-icon>img{display:none!important}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.folder-form-buttons a:focus,.folder-form-buttons a:hover,.folder-form-buttons button:focus,.folder-form-buttons button:hover{color:#fff;outline:0}.folder-form-buttons a:focus{outline:0;outline:0}.form-cancel-btn,a.form-cancel-btn:hover{background-color:#fff;color:#3085d6;outline:0}.form-submit-btn{background-color:#3085d6;color:#fff;outline:0}.add-update-folder-title{display:block;position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;text-align:center;text-transform:none;word-wrap:break-word;font-weight:700;font-size:22px;line-height:26px}.folder-form-message{font-size:15px;line-height:18px;color:#484848;padding:25px 70px}.folder-form-errors{margin:0 0 10px 0;padding:8px 0;background:#ffe4e4;color:#a20000;display:none}.folder-form-errors.active{display:block}span.folder-loader-ajax{margin:0;line-height:30px;display:none;vertical-align:middle}.folder-loader-ajax.active{display:inline-block}@-webkit-keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes scaleAnimation{0%{opacity:0;-webkit-transform:scale(1.5);transform:scale(1.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@keyframes drawCircle{0%{stroke-dashoffset:151px}100%{stroke-dashoffset:0}}@-webkit-keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@keyframes drawCheck{0%{stroke-dashoffset:36px}100%{stroke-dashoffset:0}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}#successAnimationCircle{stroke-dasharray:151px 151px;stroke:#2ce0a7}#successAnimationCheck{stroke-dasharray:36px 36px;stroke:#2ce0a7}#successAnimationResult{fill:#2ce0a7;opacity:0}svg#successAnimation{width:30px;height:34px;padding:0;display:none;float:left}#successAnimation.active{display:inline-block}.folder-loader-ajax img{display:none}.folder-loader-ajax img.active{display:inline-block}#successAnimation.animated{-webkit-animation:1s ease-out 0s 1 both scaleAnimation;animation:1s ease-out 0s 1 both scaleAnimation}#successAnimation.animated #successAnimationCircle{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCircle,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationCheck{-webkit-animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut;animation:1s cubic-bezier(.77,0,.175,1) 0s 1 both drawCheck,.3s linear .9s 1 both fadeOut}#successAnimation.animated #successAnimationResult{-webkit-animation:.3s linear .9s both fadeIn;animation:.3s linear .9s both fadeIn}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:10px 0!important}.popup-folder-title{font-weight:700;font-size:24px;padding:0 0 20px 0}.select-box{padding:20px 0 10px 0}.select-box select{width:100%;max-width:300px}.actions #media_folder,select.media-select-folder{width:132px}select#media-attachment-taxonomy-filter{width:132px}.custom-media-select{float:right;padding:10px 0 0 0;display:none}.custom-media-select.active{display:block}.folder-progress{background:#b4b9be;border-radius:4px;margin:5px 0 0 0;position:relative}.folder-meter{height:20px;position:relative;background:#f1f1f1;padding:0;width:0%;border-radius:4px;-webkit-transition:all .2s linear;transition:all .2s linear}.folder-meter>span{display:block;height:100%;-webkit-box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);-moz-box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);box-shadow:inset 0 2px 9px rgba(255,255,255,.3),inset 0 -2px 6px rgba(0,0,0,.4);position:relative;overflow:hidden;border-radius:4px}.folder-animate>span>span,.folder-meter>span:after,.folder-progress:after{content:"";position:absolute;border-radius:4px;top:0;left:0;bottom:0;right:0;background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);z-index:1;-webkit-background-size:50px 50px;-moz-background-size:50px 50px;-webkit-animation:move 2s linear infinite;overflow:hidden}.folder-animate>span:after{display:none}@-webkit-keyframes move{0%{background-position:0 0}100%{background-position:50px 50px}}.media-folder-loader{padding:10px 0 15px;display:none}.media-folder-loader>span{font-weight:700}.sticky-folders{display:none;padding:0;margin:10px 0 5px;border-top:solid 1px #e9e5e5}.top-settings{background:#fff;padding:10px 10px 5px;-webkit-border-top-left-radius:4px;-webkit-border-top-right-radius:4px;-moz-border-radius-topleft:4px;-moz-border-radius-topright:4px;border-top-left-radius:4px;border-top-right-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.sticky-folders.active{display:block}.sticky-folders ul{margin:0;padding:0}.sticky-folders>ul>li{display:block;margin:0;padding:0}.sticky-folders>ul>li>a{display:block;color:#333;padding:0 0 0 10px;border-radius:3px;text-decoration:none;font-size:14px;line-height:30px;position:relative}.sticky-folders ul li a.active,body:not(.no-hover-css) .sticky-folders ul li a:hover{background:#dfdfdf;border-radius:3px}.sticky-folders ul li a.active-item{background-color:#008ec2!important;color:#fff}.sticky-folders ul li a.active-item img{filter:invert(100%);-webkit-filter:invert(100%)}.sticky-folders>ul>li>a>span{display:inline-block;vertical-align:middle;line-height:30px}.sticky-folders ul li a span.update-inline-record{line-height:30px;padding:0 0 0 5px;height:30px}.sticky-folders ul li a span.folder-count{padding:0 8px 0 3px}.sticky-wcp-custom-form a:focus{box-shadow:none;outline:0}span.folder-count{float:right;background:0 0;padding:0;font-size:10px;line-height:16px;border-radius:2px}span.folder-count:empty{display:none}.sticky-title{font-size:16px;font-weight:700;padding:7px}.sticky-title img{display:inline-block;vertical-align:middle;height:20px;width:20px}.sticky-folder-icon img{width:100%;filter:invert(50%);-webkit-filter:invert(50%)}.dynamic-menu .sticky-folder:hover img{filter:invert(0);-webkit-filter:invert(0)}.form-options>ul>li.last>a.sort-folder-order{width:28px;padding:5px;text-align:center;display:inline-block;box-sizing:border-box}.sort-folder-order svg{width:100%;height:100%;fill:#000}.sort-folder-order:hover svg{fill:#fff}.folder-order{position:relative}.folder-sort-menu{position:absolute;right:0;width:120px;z-index:101;background:#fff;-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.25);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.25);box-shadow:0 0 5px 0 rgba(0,0,0,.25);display:none}.folder-order.active .folder-sort-menu{display:block}.folder-order.active .sort-folder-order{background:#404040;color:#fff}.folder-order.active .sort-folder-order svg{fill:#fff}.folder-sort-menu li{display:block;margin:0;padding:0;background:0 0}.folder-sort-menu li a{display:block;margin:0;padding:3px 5px;background:0 0;color:#848484;text-decoration:none;font-size:14px}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}.dynamic-menu.bottom-fix{bottom:0}.folder-form-buttons{display:flex}.folder-group{position:relative;margin:45px auto 15px;padding:0 2px}.add-folder-note{padding:10px 0 0}.folder-grouptextarea{resize:none}.folder-group input,.folder-group textarea{background:0 0;font-size:14px;padding:0 0 0 15px;display:block;width:100%;border-radius:4px;border:1px solid #484848;height:34px;line-height:34px;color:#484848}.folder-group input:focus,.folder-group textarea:focus{outline:0}.folder-group input:focus~label,.folder-group input:valid~label,.folder-group textarea:focus~label,.folder-group textarea:valid~label{top:-9px;background:#fff;padding:0 5px;font-weight:400;font-size:12px;line-height:14px;color:#aeaeae}.folder-group input:focus~.bar:before,.folder-group textarea:focus~.bar:before{width:320px}.folder-group input[type=password]{letter-spacing:.3em}.folder-group label{font-size:14px;font-weight:500;position:absolute;pointer-events:none;left:20px;top:10px;-webkit-transition:.3s ease all;transition:.3s ease all;color:#484848}.folder-group .folder-bar{position:relative;display:block;width:320px}.folder-group .folder-bar:before{content:'';height:2px;width:0;bottom:0;position:absolute;background:#2196f3;-webkit-transition:.3s ease all;transition:.3s ease all;left:0}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-],.sticky-folders i{font-size:12px}span.create_new_folder{width:26px;height:26px;line-height:26px;font-size:14px;background:rgba(255,255,255,.4);backdrop-filter:blur(16px);border-radius:4px;text-align:center;margin:0 15px 0 0}.folder-search-form{padding:0 0 10px 0;position:relative}.folder-search-form input{background:#fff;border:1px solid #dbdbdb;box-sizing:border-box;border-radius:4px;height:32px;line-height:32px;box-sizing:border-box;padding:0 5px;width:100%;outline:0;box-shadow:none!important}.folder-search-form span{position:absolute;color:#aeaeae;right:0;top:0;height:32px;line-height:32px;width:32px;text-align:center}.folder-separator{padding:0 10px;height:1px;background:#e9e5e5;margin:0 0 10px 0}#custom-menu.has-filter li.route{display:none!important}#custom-menu.has-filter li.route.has-search{display:block!important}#custom-menu.has-filter h3 span.title-text.has-search-text{font-weight:700}.hide-folders-area .ui-resizable-handle.ui-resizable-e{display:none!important}.pull-right{float:right;display:block;line-height:22px}.folder-separator-2{padding:0;height:1px;background:#e9e5e5;margin:0 0 5px 0}.mCSB_scrollTools{width:10px!important}.mCSB_inside>.mCSB_container{margin-right:0!important}#custom-menu .route.has-sub-tree.has-search>.nav-icon>.pfolder-arrow-down{transform:rotate(0)}body:not(.woocommerce-page) .wp-list-table th{width:auto}.popup-form-content .select-box{padding:30px 0}.popup-form-content .select-box select{width:100%;max-width:inherit}@media screen and (max-width:960px){.wcp-content{left:36px}html[dir=rtl] .wcp-content{right:36px;left:auto}}@media screen and (max-width:780px){.wcp-content{left:0}html[dir=rtl] .wcp-content{right:0}}@media screen and (max-width:640px){.wcp-content{left:0;position:relative!important;width:100%!important;padding-bottom:100px;top:0;right:0;display:block}.ui-resizable-handle.ui-resizable-e{display:none!important}.hide-folders-area .wcp-container{display:block}.wcp-hide-show-buttons{display:none}.hide-folders-area .wcp-content{width:100%!important}body.wp-admin #wpcontent{padding:0!important}#wpbody-content{padding-bottom:30px}}
assets/js/folders.js CHANGED
@@ -2040,6 +2040,108 @@
2040
  }
2041
  }
2042
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2043
  if(wcp_settings.post_type == "attachment") {
2044
 
2045
  $(document).ready(function(){
@@ -2254,7 +2356,7 @@
2254
 
2255
  $(document).ready(function(){
2256
  if(wcp_settings.post_type == "attachment") {
2257
- if(jQuery("#tmpl-media-frame").length) {
2258
  checkForMediaScreen = setInterval(function(){
2259
  setMediaButtons();
2260
  }, 1000);
2040
  }
2041
  }
2042
 
2043
+ $(document).ready(function(){
2044
+ /* select dropdown */
2045
+ $(document).on("click", "#doaction", function(e){
2046
+ if($("#bulk-action-selector-top").val() == "move_to_folder") {
2047
+ show_folder_popup();
2048
+ return false;
2049
+ } else if($("#bulk-action-selector-top").val() == "edit") {
2050
+ if(typeof inlineEditPost == "object") {
2051
+ inlineEditPost.setBulk();
2052
+ return false;
2053
+ }
2054
+ }
2055
+ });
2056
+ $(document).on("click", "#doaction2", function(e){
2057
+ if($("#bulk-action-selector-bottom").val() == "move_to_folder") {
2058
+ show_folder_popup();
2059
+ return false;
2060
+ } else if($("#bulk-action-selector-bottom").val() == "edit") {
2061
+ if(typeof inlineEditPost == "object") {
2062
+ inlineEditPost.setBulk();
2063
+ return false;
2064
+ }
2065
+ }
2066
+ });
2067
+
2068
+
2069
+ $(document).on("submit", "#bulk-folder-form", function(e) {
2070
+ e.stopPropagation();
2071
+ e.preventDefault();
2072
+
2073
+ if($("#bulk-select").val() != "") {
2074
+ chkStr = "";
2075
+ $(".wp-list-table input:checked").each(function () {
2076
+ chkStr += $(this).val() + ",";
2077
+ });
2078
+ if($("#bulk-select").val() != "") {
2079
+ if ($("#bulk-select").val() == "-1") {
2080
+ $.ajax({
2081
+ url: wcp_settings.ajax_url,
2082
+ data: "post_id=" + chkStr + "&type=" + wcp_settings.post_type + "&action=wcp_remove_post_folder&folder_id=" + $(this).val() + "&nonce=" + wcp_settings.nonce + "&status=" + wcp_settings.taxonomy_status + "&taxonomy=" + activeRecordID,
2083
+ method: 'post',
2084
+ success: function (res) {
2085
+ $("#bulk-move-folder").hide();
2086
+ resetMediaAndPosts();
2087
+ ajaxAnimation();
2088
+ }
2089
+ });
2090
+ } else {
2091
+ nonce = getSettingForPost($("#bulk-select").val(), 'nonce');
2092
+ $.ajax({
2093
+ url: wcp_settings.ajax_url,
2094
+ data: "post_ids=" + chkStr + "&type=" + wcp_settings.post_type + "&action=wcp_change_multiple_post_folder&folder_id=" + $("#bulk-select").val() + "&nonce=" + nonce + "&status=" + wcp_settings.taxonomy_status + "&taxonomy=" + activeRecordID,
2095
+ method: 'post',
2096
+ success: function (res) {
2097
+ res = $.parseJSON(res);
2098
+ $("#bulk-move-folder").hide();
2099
+ if (res.status == "1") {
2100
+ resetMediaAndPosts();
2101
+ ajaxAnimation();
2102
+ } else {
2103
+ $(".folder-popup-form").hide();
2104
+ $(".folder-popup-form").removeClass("disabled");
2105
+ $("#error-folder-popup-message").html(res.message);
2106
+ $("#error-folder-popup").show()
2107
+ }
2108
+ }
2109
+ });
2110
+ }
2111
+ }
2112
+ }
2113
+ });
2114
+ });
2115
+
2116
+ function show_folder_popup() {
2117
+ $("#bulk-action-selector-top, #bulk-action-selector-bottom").val("-1");
2118
+ if($(".wp-list-table tbody input[type='checkbox']:checked").length == 0) {
2119
+ alert("Please select items to move in folder");
2120
+ } else {
2121
+ $("#bulk-move-folder").show();
2122
+ $("#bulk-select").html("<option value=''>Loading...</option>");
2123
+ $(".move-to-folder").attr("disabled", true);
2124
+ $("#move-to-folder").prop("disabled", true);
2125
+ $.ajax({
2126
+ url: wcp_settings.ajax_url,
2127
+ data: "type=" + wcp_settings.post_type + "&action=wcp_get_default_list&active_id=" + activeRecordID,
2128
+ method: 'post',
2129
+ success: function (res) {
2130
+ res = $.parseJSON(res);
2131
+ $("#bulk-select").html("<option value=''>Select Folder</option><option value='-1'>(Unassigned)</option>");
2132
+ $(".move-to-folder").prop("disabled", false);
2133
+ $("#move-to-folder").prop("disabled", false);
2134
+ if(res.status == 1) {
2135
+ var taxonomies = res.taxonomies;
2136
+ for(i=0;i<taxonomies.length;i++) {
2137
+ $("#bulk-select").append("<option value='"+taxonomies[i].term_id+"'>"+taxonomies[i].name+"</option>");
2138
+ }
2139
+ }
2140
+ }
2141
+ });
2142
+ }
2143
+ }
2144
+
2145
  if(wcp_settings.post_type == "attachment") {
2146
 
2147
  $(document).ready(function(){
2356
 
2357
  $(document).ready(function(){
2358
  if(wcp_settings.post_type == "attachment") {
2359
+ if($("#tmpl-media-frame").length) {
2360
  checkForMediaScreen = setInterval(function(){
2361
  setMediaButtons();
2362
  }, 1000);
assets/js/folders.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e,t){var s,o,a,r,n="#js-tree-menu",l="",d=!1,c=!1,p=0,u=0,m=0,f=!1,h="",g=[],_=wcp_settings.page_url,v=[],w="<li class='grid-view' data-id='__folder_id__' id='folder___folder_id__'><div class='folder-item is-folder' data-id='__folder_id__'><a title='__folder_name__' id='folder_view___folder_id__'class='folder-view __append_class__ has-new-folder'data-id='__folder_id__'><span class='folder item-name'><span id='wcp_folder_text___folder_id__'class='folder-title'>__folder_name__</span></span></a></div></li>",y=null,j=null;function b(){e(".wcp-move-file:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(t,s){e(this).closest("td").addClass("wcp-draggable"),e("body").addClass("no-hover-css")},stop:function(t,s){e(this).closest("td").removeClass("wcp-draggable"),e("body").removeClass("no-hover-css")}}),e(".wcp-move-multiple:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,s){return e(".selected-items").remove(),selectedItems=e("#the-list th input:checked").length,selectedItems>0?(selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")):e("<div class='selected-items'><span class='total-post-count'>Select Items to move</span></div>")},start:function(t,s){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,s){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".jstree-anchor:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=e(this).closest("li.jstree-node").attr("id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),s=k(folderID,"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?C():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?C():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),h=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C()}}))}}),e(".un-categorised-items:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=-1,s=wcp_settings.nonce,o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C()}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,chkStr=postID+",",e(".wp-list-table input:checked").each(function(){postID!=e(this).val()&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),h=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C()}}))}}),e(".attachments-browser li.attachment:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,s){return e(".selected-items").remove(),selectedItems=e(".attachments-browser li.attachment.selected").length,selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")},start:function(t,s){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,s){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".tree-structure .folder-item:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){e("body").removeClass("no-hover-css"),folderID=e(this).data("id"),o.draggable.hasClass("wcp-move-multiple")?(s=k(folderID,"nonce"),e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C(),R()}}))):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C(),R()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C(),R()}}))}}),e(".sticky-folders li a:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=e(this).closest("li").data("folder-id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),s=k(folderID,"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(C(),R()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(C(),R()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),h=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C(),R()}}))}}),M()}function k(e,t){if(g.length>0)for(i=0;i<g.length;i++)if(parseInt(g[i].folder_id)==parseInt(e))return g[i][t];return""}function x(e){if(g.length>0)for(i=0;i<g.length;i++)if(parseInt(g[i].folder_id)==parseInt(e))return i;return null}function C(){if(e(".media-toolbar").hasClass("media-toolbar-mode-select")&&e("ul.attachments li.selected").length&&(e("ul.attachments li.selected").trigger("click"),e(".select-mode-toggle-button").trigger("click")),""!=h&&(e("#js-tree-menu a.jstree-clicked").length>0||"-1"==l)){if(e("#media-attachment-taxonomy-filter").length){h=h.split(",");for(var t=0;t<h.length;t++)""!=h[t]&&e(".attachments-browser li[data-id='"+h[t]+"']").remove()}h=""}e("#media-attachment-taxonomy-filter").length?F(0):(e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=get_folders_default_list",method:"post",success:function(t){t=e.parseJSON(t),e(".header-posts .total-count").text(t.total_items),e(".un-categorised-items .total-count").text(t.empty_items),v=t.taxonomies,M()}}),e(".folder-loader-ajax").addClass("active"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(_+" #posts-filter",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()}):e("#wpbody").load(_+" #wpbody-content",!1,function(t){var s={Title:"",Url:_};history.pushState(s,s.Title,s.Url),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S()}))}function I(){S(),e(".form-loader-count").css("width","0"),"object"==typeof inlineEditPost&&(inlineEditPost.init(),e("#the-list").on("click",".editinline",function(){e(this).attr("aria-expanded","true"),inlineEditPost.edit(this)}),e(document).on("click",".inline-edit-save .save",function(){var t=e(this).closest("tr").attr("id");t=(t=t.replace("edit-","")).replace("post-",""),inlineEditPost.save(t)}),e(document).on("click",".inline-edit-save .cancel",function(){var t=e(this).closest("tr").attr("id");t=(t=t.replace("edit-","")).replace("post-",""),inlineEditPost.revert(t)})),"attachment"==wcp_settings.post_type&&(e(".move-to-folder-top").length||e("#bulk-action-selector-top").append("<option class='move-to-folder-top' value='move_to_folder'>Move to Folder</option>"),e(".move-to-folder-bottom").length||e("#bulk-action-selector-bottom").append("<option class='move-to-folder-bottom' value='move_to_folder'>Move to Folder</option>"))}function S(){if(g.length&&e("li.jstree-node").each(function(){folderPostId=x(e(this).attr("id")),null!=folderPostId&&(1==g[folderPostId].is_high?e(this).addClass("is-high"):e(this).removeClass("is-high"),1==g[folderPostId].is_sticky?e(this).addClass("is-sticky"):e(this).removeClass("is-sticky"))}),folderId=0,e(".tree-structure ul").html(""),folderStatus=!0,e(".jstree-clicked").length&&(folderID=e(".jstree-clicked").closest(".jstree-node").attr("id"),e(".jstree-node[id='"+folderID+"'] > ul.jstree-children > li.jstree-node").length?(folderStatus=!1,e(".jstree-node[id='"+folderID+"'] > ul.jstree-children > li.jstree-node").each(function(){fID=e(this).attr("id"),fName=e.trim(e("#js-tree-menu").jstree(!0).get_node(fID).text),liHtml=w.replace(/__folder_id__/g,fID),liHtml=liHtml.replace(/__folder_name__/g,fName),selectedClass=e(this).hasClass("is-high")?"is-high":"",liHtml=liHtml.replace(/__append_class__/g,selectedClass),e(".tree-structure ul").append(liHtml)})):e(".jstree-node[id='"+folderID+"']").closest("ul").hasClass("jstree-container-ul")||(folderStatus=!1)),folderStatus&&e("#js-tree-menu > ul > li.jstree-node").each(function(){fID=e(this).attr("id"),fName=e.trim(e("#js-tree-menu").jstree(!0).get_node(fID).text),liHtml=w.replace(/__folder_id__/g,fID),liHtml=liHtml.replace(/__folder_name__/g,fName),selectedClass=e(this).hasClass("is-high")?"is-high":"",liHtml=liHtml.replace(/__append_class__/g,selectedClass),e(".tree-structure ul").append(liHtml)}),J(),"attachment"==wcp_settings.post_type&&(e(".move-to-folder-top").length||e("#bulk-action-selector-top").append("<option class='move-to-folder-top' value='move_to_folder'>Move to Folder</option>"),e(".move-to-folder-bottom").length||e("#bulk-action-selector-bottom").append("<option class='move-to-folder-bottom' value='move_to_folder'>Move to Folder</option>")),e(".sticky-folders .active-item").removeClass("active-item"),e("#js-tree-menu li.jstree-node.active-item").length){var t=e("#js-tree-menu li.jstree-node.active-item").data("folder-id");e(".sticky-folders .sticky-folder-"+t+" a").addClass("active-item")}b()}function D(){S()}function P(){if(0==o&&a>=10)return e("#folder-limitation-message").html("You've reached the 10 folder limitation!"),e("#no-more-folder-credit").show(),!1;e("#add-update-folder-title").text("Add a new folder"),e("#save-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#add-update-folder-name").val(""),c&&(p=u,e("#add-update-folder-name").val(e.trim(e("#js-tree-menu").jstree(!0).get_node(u).text)+" #2"),u=e("#"+u+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?e("#"+u+"_anchor").closest(".jstree-node").parent().parent().attr("id"):0),e("#add-update-folder").removeClass("disabled"),e("#add-update-folder").show(),e("#add-update-folder-name").focus(),e(".dynamic-menu").remove()}function T(){folderName=e.trim(e("#js-tree-menu").jstree(!0).get_node(u).text),parentID=e("#wcp_folder_"+u).closest("li.jstree-node").data("folder-id"),parentID==t&&(parentID=0),e("#update-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#update-folder-item-name").val(folderName),e("#update-folder-item").removeClass("disabled"),e("#update-folder-item").show(),e("#update-folder-item-name").focus(),e(".dynamic-menu").remove()}function N(t){var s="Are you sure you want to delete the selected folder?",o="Items in the folder will not be deleted.";if(f=!1,1==t&&e("#folder-hide-show-checkbox").is(":checked")){if(f=!0,0==e("#js-tree-menu input.checkbox:checked").length)return e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html("Please select at least one folder to delete"),void e("#error-folder-popup").show();e("#js-tree-menu input.checkbox:checked").length>1&&(s="Are you sure you want to delete the selected folders?",o="Items in the selected folders will not be deleted.")}e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#remove-folder-item").text("Yes, Delete it!"),e("#remove-folder-message").text(s),e("#remove-folder-notice").text(o),e("#confirm-remove-folder").show(),e("#remove-folder-item").focus()}function H(){e(n).jstree({core:{cache:!1,animation:0,check_callback:function(t,s,o,a,r){if(e("*").removeClass("drag-bot").removeClass("drag-in").removeClass("drag-up"),("move_node"===t||"copy_node"===t)&&r&&r.dnd)switch(r.pos){case"a":r.origin.get_node(r.ref,!0).addClass("drag-bot"),nodeId=e(".drag-bot").attr("id"),e("#jstree-dnd").text("Below "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"i":r.origin.get_node(r.ref,!0).addClass("drag-in"),nodeId=e(".drag-in").attr("id"),e("#jstree-dnd").text("Inside "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"b":r.origin.get_node(r.ref,!0).addClass("drag-up"),nodeId=e(".drag-up").attr("id"),e("#jstree-dnd").text("Above "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;default:e("#jstree-dnd").text(e("#jstree-dnd").data("txt"))}return!0}},data:{cache:!1},select_node:!1,search:{show_only_matches:!0,case_sensitive:!1,fuzzy:!1},plugins:["dnd","search","contextmenu"],contextmenu:{select_node:0,show_at_node:0,items:function(){return{}}}}).bind("ready.jstree",function(){e("#js-tree-menu .jstree-node").each(function(){var t=parseInt(e(this).data("count"));t>0&&e(".jstree-node[id='"+e(this).attr("id")+"'] > a span.premio-folder-count").text(t)}),""!=l&&0!=l&&e(".jstree-node[id='"+l+"']").length&&(e("#js-tree-menu").jstree("select_node",l),e(".sticky-folders .sticky-folder-"+l+" a").length&&e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item")),e(".ajax-preloader").hide(),e(".js-tree-data").show(),A(),e(".sticky-folders ul > li").length>0&&e(".sticky-folders").addClass("active"),S(),b()}).bind("after_open.jstree",function(){b()}).bind("open_all.jstree",function(){b()}).bind("create_node.jstree",function(){b()}).bind("delete_node.jstree",function(){b()}).bind("close_all.jstree",function(){b()}).bind("after_close.jstree",function(){b()}).bind("move_node.jstree",function(t,s){folderMoveId=s.node.id,orderString="",e(".jstree-node[id='"+folderMoveId+"']").closest("ul").children().each(function(){"undefined"!=e(this).attr("id")&&(orderString+=e(this).attr("id")+",")}),e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?parentID=e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().attr("id"):parentID=0,""!=orderString&&(e(".form-loader-count").css("width","100%"),e.ajax({url:wcp_settings.ajax_url,data:"term_ids="+orderString+"&action=wcp_save_folder_order&type="+wcp_settings.post_type+"&nonce="+wcp_settings.nonce+"&term_id="+folderMoveId+"&parent_id="+parentID,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#wcp_folder_parent").html(t.options),e(".form-loader-count").css("width","0"),C(),R(),M(),b()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))})}function U(){var t=e.trim(e("#folder-search").val());e("#js-tree-menu").jstree("search",t)}function O(t){e.ajax({url:wcp_settings.ajax_url,type:"post",data:"action=save_folder_last_status&post_type="+wcp_settings.post_type+"&post_id="+t+"&nonce="+wcp_settings.nonce,cache:!1,async:!1,success:function(){}})}function z(){setTimeout(function(){if(currentStatus=!0,e("#js-tree-menu .jstree-node.jstree-leaf").length==e("#js-tree-menu .jstree-node").length)e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand");else{var t=e("#js-tree-menu .jstree-node.jstree-closed").length+e("#js-tree-menu .jstree-node.jstree-open").length;e("#js-tree-menu .jstree-node.jstree-closed").length==t?(e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand")):(e("#expand-collapse-list").addClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Collapse"))}},500),b()}function J(){0==e(".tree-structure-content .tree-structure li").length?e(".tree-structure-content").hide():(e(".tree-structure-content").show(),oldHeight=e(".tree-structure-content .tree-structure").height(),e(".tree-structure-content .tree-structure").height("auto"),e(".tree-structure-content .tree-structure").height()>56?e(".folders-toggle-button").show():e(".folders-toggle-button").hide(),newHeight=e(".tree-structure-content .tree-structure").height(),e(".tree-structure-content .tree-structure").attr("data-height",newHeight),e(".tree-structure-content").hasClass("active")?(e(".tree-structure-content .tree-structure").height(newHeight),e(".tree-structure-content .tree-structure").attr("data-height",newHeight)):e(".tree-structure-content .tree-structure").height(oldHeight))}function R(){e(".folder-loader-ajax").addClass("active"),e(".folder-loader-ajax img").removeClass("active"),e(".folder-loader-ajax svg#successAnimation").addClass("active").addClass("animated"),setTimeout(function(){e(".folder-loader-ajax").removeClass("active"),e(".folder-loader-ajax img").addClass("active"),e(".folder-loader-ajax svg#successAnimation").removeClass("active").removeClass("animated")},2e3)}function A(){e(".sticky-folders > ul").html("");var t="";if(e("#js-tree-menu li.jstree-node.is-sticky").each(function(){var s=e(this).attr("id"),o=e.trim(e("#js-tree-menu").jstree(!0).get_node(s).text),a=e("li.jstree-node[id='"+s+"'] > a span.premio-folder-count").text(),r=e("li.jstree-node[id='"+s+"']").hasClass("is-high")?" is-high ":"";t+="<li data-folder-id='"+s+"' class='sticky-fldr "+r+" sticky-folder-"+s+"'><a href='javascript:;'><span class='folder-title'>"+o+"</span><span class='folder-actions'><span class='update-inline-record'><i class='pfolder-edit-folder'></i></span><span class='star-icon'><i class='pfolder-star'></i></span><span class='premio-folder-count'>"+a+"</span></span></a></li>"}),e(".sticky-folders > ul").html(t),e(".jstree-anchor.jstree-clicked").length){var s=e(".jstree-anchor.jstree-clicked").closest("li.jstree-node").attr("id");e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item")}e(".sticky-folders > ul > li").length>0?e(".sticky-folders").addClass("active"):e(".sticky-folders").removeClass("active")}function M(){if(e("#media-attachment-taxonomy-filter").length&&(e("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=v;var t=e(this);currentDDVal=e(this).val(),t.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),lastFolderData=v;for(var s=0;s<v.length;s++)t.append("<option value='"+v[s].term_id+"'>"+v[s].name+" ("+v[s].trash_count+")</option>");t.val(currentDDVal).trigger("change")}),e("select.folder_for_media").length)){var t=e("select.folder_for_media").val();e("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(var s=0;s<v.length;s++)e("select.folder_for_media option:last-child").before("<option value='"+v[s].term_id+"'>"+v[s].name+"</option>");""!=t&&e(".folder_for_media").val(t)}for(e("span.premio-folder-count").text(""),e(".folder-count").text(""),s=0;s<v.length;s++)0!=parseInt(v[s].trash_count)&&(e(".jstree-node[id='"+v[s].term_id+"'] > a.jstree-anchor span.premio-folder-count").text(v[s].trash_count),e(".sticky-folder-"+v[s].term_id+" .premio-folder-count").text(v[s].trash_count));if(e(".media-select-folder").length){for(e(".media-select-folder").html("<option value=''>Select Folder</option><option value='-1'>(Unassigned)</option>"),s=0;s<v.length;s++)e(".media-select-folder").append("<option value='"+v[s].term_id+"'>"+v[s].name+" ("+v[s].trash_count+")</option>");e(".media-select-folder").val("")}""!=l&&e("#wcp_folder_"+l).addClass("active-item"),d&&(e("#title_"+u).trigger("click"),d=!1)}if(e(document).ready(function(){v=wcp_settings.taxonomies,o=parseInt(wcp_settings.is_key_active),a=parseInt(wcp_settings.folders),l=parseInt(wcp_settings.selected_taxonomy),g=wcp_settings.folder_settings,H();var r="1"==wcp_settings.isRTL||1==wcp_settings.isRTL?"w":"e";e(".wcp-content").resizable({resizeHeight:!1,handles:r,minWidth:100,maxWidth:500,resize:function(t,s){var o=s.size.width;for(o<=275?e(".plugin-button").addClass("d-block"):e(".plugin-button").removeClass("d-block"),o<=225&&(o=225),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",o+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",o+20+"px"),newWidth=o-40,cssString="",classString="",i=0;i<=15;i++)classString+=" .space > .jstree-node >",currentWidth=newWidth-(13+20*i),cssString+="#js-tree-menu > "+classString+" .title { width: "+currentWidth+"px !important; } ",cssString+="#js-tree-menu > "+classString+" .dynamic-menu { left: "+(currentWidth-190)+"px !important; } ";e("#wcp-custom-style").html("<style>"+cssString+"</style>"),s.size.width<=185?(folderStatus="hide",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").addClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").removeClass("active"),e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px")):e("#wcp-content").hasClass("hide-folders-area")&&(folderStatus="show",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").removeClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").addClass("active"),e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250))},stop:function(t,o){var a=o.size.width;o.size.width<=275?e(".plugin-button").addClass("d-block"):e(".plugin-button").removeClass("d-block"),a<=225&&(a=225),o.size.width<=185?(folderStatus="hide",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").addClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").removeClass("active"),e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_folder_display_status&status="+folderStatus+"&nonce="+s,method:"post",success:function(e){}})):e("#wcp-content").hasClass("hide-folders-area")&&(folderStatus="show",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").removeClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").addClass("active"),e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250)),s=wcp_settings.nonce,wcp_settings.folder_width=o.size.width,e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_post_width&width="+a+"&nonce="+s,method:"post",success:function(e){}}),o.size.width<=225&&(e(".wcp-content").width(225),wcp_settings.folder_width=225)}}),e(document).on("contextmenu",".jstree-anchor",function(t){return y=t.pageX,j=t.pageY,e(this).find("span.folder-inline-edit").trigger("click"),!1}),e(document).on("click",".folder-actions span.folder-inline-edit",function(s){var o;(s.stopImmediatePropagation(),s.stopPropagation(),0!=wcp_settings.can_manage_folder)&&(isHigh=e(this).closest("li.jstree-node").hasClass("is-high"),isSticky=e(this).closest("li.jstree-node").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu' data-id='"+e(this).closest("li").prop("id")+"'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span> Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("a.jstree-anchor").find(".premio-folder-count").text()),"attachment"==wcp_settings.post_type&&hasPosts&&(menuHtml+="<li target='_blank' class='download-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e("body").append(menuHtml),s.pageX==t||s.pageY==t?(e(".dynamic-menu").css("left",y),e(".dynamic-menu").css("top",j-10),o=j):(e(".dynamic-menu").css("left",s.pageX),e(".dynamic-menu").css("top",s.pageY),o=s.pageY),e(this).parents("li.jstree-node").addClass("active-menu"),o+e(".dynamic-menu").height()>e(window).height()&&e(".dynamic-menu").css("margin-top",e(window).height()-(o+e(".dynamic-menu").height())))}),e(document).on("click",".sticky-folders .sticky-fldr > a",function(t){t.stopPropagation();var s=e(this).closest("li").data("folder-id");e(".jstree-node[id='"+s+"']").length&&(e(".jstree-clicked").removeClass("jstree-clicked"),e(".active-item").removeClass("active-item"),e("#js-tree-menu").jstree("select_node",l),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").trigger("click"),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").addClass("jstree-clicked"),e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item"))}),e(document).on("contextmenu",".sticky-folders li .sticky-fldr > a",function(t){return e(this).find("span.update-inline-record").trigger("click"),!1}),e(document).on("click",".tree-structure a",function(t){t.stopPropagation();var s=e(this).data("id");e(".jstree-node[id='"+s+"']").length&&(e(".jstree-clicked").removeClass("jstree-clicked"),e(".active-item").removeClass("active-item"),e("#js-tree-menu").jstree("select_node",l),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").trigger("click"),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").addClass("jstree-clicked"),e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item"))}),e(document).on("click",".update-inline-record",function(s){var o;(s.stopImmediatePropagation(),s.stopPropagation(),0!=wcp_settings.can_manage_folder)&&(isHigh=e(this).closest("li.sticky-fldr").hasClass("is-high"),isSticky=e(this).closest("li.sticky-fldr").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu' data-id='"+e(this).closest("li").data("folder-id")+"'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("li.jstree-node").find("h3.title:first > .total-count").text()),"attachment"==wcp_settings.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e("body").append(menuHtml),s.pageX==t||s.pageY==t?(e(".dynamic-menu").css("left",y),e(".dynamic-menu").css("top",j-10),o=j):(e(".dynamic-menu").css("left",s.pageX),e(".dynamic-menu").css("top",s.pageY),o=s.pageY),o+e(".dynamic-menu").height()>e(window).height()&&e(".dynamic-menu").css("margin-top",e(window).height()-(o+e(".dynamic-menu").height())))}),e(document).on("click",".dynamic-menu",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click","body, html",function(){e(".dynamic-menu").remove()}),e(".wcp-hide-show-buttons .toggle-buttons").click(function(){var t="show";e(this).hasClass("hide-folders")&&(t="hide"),e(".wcp-hide-show-buttons .toggle-buttons").toggleClass("active"),s=wcp_settings.nonce,"show"==t?(e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250)):(e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px")),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_folder_display_status&status="+t+"&nonce="+s,method:"post",success:function(e){}})}),b(),e(document).ajaxComplete(function(e,s,o){o.data!=t&&""!=o.data&&-1!=o.data.indexOf("action=query-attachments")&&b()})}),e(window).on("resize",function(){}),e(window).scroll(function(){}),e(document).ready(function(){e(document).on("click","#add-new-folder",function(){u=e("#js-tree-menu a.jstree-clicked").length?e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"):0,d=!1,P()}),e(document).on("click",".new-folder",function(){u=e(this).closest(".dynamic-menu").data("id"),d=!1,P()}),e(document).on("click",".duplicate-folder",function(t){t.stopPropagation(),u=e(this).closest(".dynamic-menu").data("id"),e(".dynamic-menu").remove(),d=!1,c=!0,P(),D()}),e(document).on("submit","#save-folder-form",function(t){if(t.stopPropagation(),t.preventDefault(),folderNameDynamic=e.trim(e("#add-update-folder-name").val()),""==e.trim(folderNameDynamic))e(".folder-form-errors").addClass("active"),e("#add-update-folder-name").focus();else{e("#save-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#add-update-folder").addClass("disabled");var s=u;d&&(s=0),m=0==s?e("#js-tree-menu > ul > li.jstree-node").length:e("#js-tree-menu > ul > li.jstree-node[id='"+s+"'] > ul.jstree-children > li").length+1,e.ajax({url:wcp_settings.ajax_url,data:{parent_id:s,type:wcp_settings.post_type,action:"wcp_add_new_folder",nonce:wcp_settings.nonce,term_id:s,order:m,name:folderNameDynamic,is_duplicate:c,duplicate_from:p},method:"post",success:function(t){if(result=e.parseJSON(t),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),-1==result.status)e("#no-more-folder-credit").show();else if("1"==result.status){if(o=parseInt(result.is_key_active),a=parseInt(result.folders),e("#current-folder").text(a),e("#ttl-fldr").text(10),z(),D(),result.data.length)for(var s=0;s<result.data.length;s++){var r={folder_id:result.data[s].term_id,folder_count:0,is_sticky:result.data[s].is_sticky,is_high:result.data[s].is_high,nonce:result.data[s].nonce,slug:result.data[s].slug,is_deleted:0};g.push(r),e("#js-tree-menu").jstree().create_node(result.parent_id,{id:result.data[s].term_id,text:" "+result.data[s].title},"last",function(){e(".jstree-node[id='"+result.data[s].term_id+"']").attr("data-nonce",result.data[s].nonce),e(".jstree-node[id='"+result.data[s].term_id+"']").attr("data-slug",result.data[s].slug)})}R(),A(),e("#media-attachment-taxonomy-filter").length&&(u=result.term_id,F(0))}else e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show()}})}return!1})}),e(document).ready(function(){e("#inline-update").click(function(){e("#js-tree-menu a.jstree-clicked").length&&(u=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),T())}),e(document).on("click",".rename-folder",function(t){t.stopPropagation(),u=e(this).closest(".dynamic-menu").data("id"),T(),e(".dynamic-menu").remove()}),e(document).on("click",".form-cancel-btn",function(){e(".folder-popup-form").hide()}),e(document).on("click",".folder-popup-form",function(t){e(".folder-popup-form").hide()}),e(document).on("click",".popup-form-content",function(e){e.stopPropagation()}),e(document).on("submit","#update-folder-form",function(o){return o.stopPropagation(),o.preventDefault(),folderNameDynamic=e("#update-folder-item-name").val(),""==e.trim(folderNameDynamic)?(e(".folder-form-errors").addClass("active"),e("#update-folder-item-name").focus()):(e("#update-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#update-folder-item").addClass("disabled"),s=k(u,"nonce"),parentID=e(".jstree-node[id='"+u+"']").closest("li.jstree-node").attr("id"),parentID==t&&(parentID=0),e.ajax({url:wcp_settings.ajax_url,data:{parent_id:parentID,type:wcp_settings.post_type,action:"wcp_update_folder",nonce:s,term_id:u,order:m,name:folderNameDynamic},method:"post",success:function(t){result=e.parseJSON(t),"1"==result.status?(e("#js-tree-menu").jstree("rename_node",result.id," "+result.term_title),folderPostId=x(result.id),null!=folderPostId&&(g[folderPostId].nonce=result.nonce,g[folderPostId].slug=result.slug),D(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),R(),e("#media-attachment-taxonomy-filter").length&&F(0)):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show())}})),!1})}),e(document).ready(function(){e("#inline-remove").click(function(){e("#js-tree-menu a.jstree-clicked").length?(u=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),N(1),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")):e("#folder-hide-show-checkbox").is(":checked")&&(e(".dynamic-menu").remove(),N(1))}),e(document).on("click","#folder-hide-show-checkbox",function(){e(this).is(":checked")?e("#js-tree-menu").addClass("show-folder-checkbox"):(e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox"))}),e(document).on("click",".folder-checkbox, .input-checkbox",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click",".remove-folder",function(){folderID=e(this).closest("li.jstree-node").data("id"),u=e(this).closest(".dynamic-menu").data("id"),N(0),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")}),e(document).on("click","#remove-folder-item",function(t){t.stopPropagation(),e(".folder-popup-form").addClass("disabled"),e("#remove-folder-item").html('<span class="dashicons dashicons-update"></span>'),s=k(u,"nonce"),f?function(){if(e("#folder-hide-show-checkbox").is(":checked")&&e("#js-tree-menu input.checkbox:checked").length>0){var t="";e("#js-tree-menu input.checkbox:checked").each(function(){t+=e(this).closest("li.jstree-node").attr("id")+",",e(this).closest("li.jstree-node").hasClass("jstree-clicked")&&!0}),e(".form-loader-count").css("width","100%"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_remove_muliple_folder&term_id="+t+"&nonce="+wcp_settings.nonce,method:"post",success:function(t){if(t=e.parseJSON(t),e(".form-loader-count").css("width","0px"),"1"==t.status){for(o=parseInt(t.is_key_active),a=parseInt(t.folders),e("#current-folder").text(a),i=0;i<t.term_ids.length;i++)e("#js-tree-menu").jstree().delete_node(t.term_ids[i]);e("#ttl-fldr").text(10),R(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),C(),A(),R(),e("#js-tree-menu li.jstree-node").removeClass("has-sub-tree"),e("#js-tree-menu li.jstree-node").each(function(){e(this).find("ul.ui-sortable li").length?e(this).addClass("has-sub-tree"):e(this).removeClass("active")}),e("#wcp_folder_"+l).length||(e(".header-posts a").trigger("click"),l=0)}else window.location.reload();e("#folder-hide-show-checkbox").attr("checked",!1),e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox")}})}}():e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_remove_folder&term_id="+u+"&nonce="+s,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#js-tree-menu").jstree().delete_node(u),o=parseInt(t.is_key_active),a=parseInt(t.folders),e("#current-folder").text(a),e("#ttl-fldr").text(10),e(".sticky-folders .sticky-folder-"+u).remove(),D(),R(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),C(),A(),l==u&&e(".header-posts").trigger("click")):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})})}),e(document).ready(function(){e(document).on("click",".mark-folder",function(t){t.stopPropagation(),folderID=e(this).closest(".dynamic-menu").data("id"),s=k(folderID,"nonce"),e(".form-loader-count").css("width","100%"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e.ajax({url:wcp_settings.ajax_url,data:"term_id="+folderID+"&type="+wcp_settings.post_type+"&action=wcp_mark_un_mark_folder&nonce="+s,method:"post",cache:!1,success:function(t){t=e.parseJSON(t),e(".form-loader-count").css("width","0%"),"1"==t.status?(folderPostId=x(t.id),"1"==t.marked?(e("li.jstree-node[id='"+t.id+"']").addClass("is-high"),e(".sticky-folder-"+t.id).addClass("is-high"),null!=folderPostId&&(g[folderPostId].is_high=1)):(e("li.jstree-node[id='"+t.id+"']").removeClass("is-high"),e(".sticky-folder-"+t.id).removeClass("is-high"),null!=folderPostId&&(g[folderPostId].is_high=0)),D(),R()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})})}),e(document).ready(function(){e(document).on("click",".jstree-node .jstree-icon",function(){folderID=e(this).closest("li.jstree-node").attr("id"),e("li.jstree-node[id='"+folderID+"']").hasClass("jstree-open")?folderStatus=0:folderStatus=1,e(".form-loader-count").css("width","100%"),s=k(folderID,"nonce"),z(),e.ajax({url:wcp_settings.ajax_url,data:"is_active="+folderStatus+"&action=save_wcp_folder_state&term_id="+folderID+"&nonce="+s,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status||(e("#wcp_folder_"+folderID).hasClass("active")?(e("#wcp_folder_"+folderID).removeClass("active"),e("#wcp_folder_"+folderID).find("ul.ui-sortable:first-child > li").slideUp(),folderStatus=0):(e("#wcp_folder_"+folderID).addClass("active"),e("#wcp_folder_"+folderID).find("ul.ui-sortable:first-child > li").slideDown(),folderStatus=1),R())}})})}),e(document).ready(function(){e(document).on("click","a.jstree-anchor",function(t){if(t.stopPropagation(),e(".un-categorised-items").removeClass("active-item"),e(".header-posts a").removeClass("active-item"),e("active-item").removeClass("active-item"),l=e(this).closest("li.jstree-node").attr("id"),u=e(this).closest("li.jstree-node").attr("id"),e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item"),e("#media-attachment-taxonomy-filter").length){var s=e(this).closest("li.jstree-node").attr("id");e("#media-attachment-taxonomy-filter").val(s),e("#media-attachment-taxonomy-filter").trigger("change"),thisSlug=k(s,"slug"),_=wcp_settings.page_url+thisSlug;var o={Title:thisSlug,Url:_};history.pushState(o,o.Title,o.Url),O(thisSlug),e(".custom-media-select").removeClass("active")}else{var a=k(l,"slug");_=wcp_settings.page_url+a,e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(_+" #posts-filter",function(){var t={Title:a,Url:_};history.pushState(t,t.Title,t.Url),O(a),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),I()}):e("#wpbody").load(_+" #wpbody-content",function(){var t={Title:a,Url:_};history.pushState(t,t.Title,t.Url),O(a),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),I()})}S(),e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item")}),e(".header-posts").click(function(){if(l="",e(".wcp-container .route").removeClass("active-item"),e(".un-categorised-items").removeClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".header-posts a").addClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e("#media-attachment-taxonomy-filter").length){l="",e("#media-attachment-taxonomy-filter").val("all"),e("#media-attachment-taxonomy-filter").trigger("change");var t={Title:"",Url:wcp_settings.page_url};history.pushState(t,t.Title,t.Url),O("all"),S()}else _=wcp_settings.page_url,e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(_+" #posts-filter",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),O("all"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()}):e("#wpbody").load(_+" #wpbody-content",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),O("all"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()})}),e(".un-categorised-items").click(function(){if(l="-1",e(".wcp-container .route").removeClass("active-item"),e(".header-posts a").removeClass("active-item"),e(".un-categorised-items").addClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e("#media-attachment-taxonomy-filter").length){e("#media-attachment-taxonomy-filter").val("unassigned"),e("#media-attachment-taxonomy-filter").trigger("change");var t={Title:"",Url:wcp_settings.page_url+"-1"};history.pushState(t,t.Title,t.Url),O("-1"),S()}else _=wcp_settings.page_url+"-1",e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(_+" #posts-filter",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),O("-1"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()}):e("#wpbody").load(_+" #wpbody-content",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),O("-1"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()})}),e("#expand-collapse-list").click(function(t){t.stopPropagation(),statusType=0,e(this).hasClass("all-open")?(e(this).removeClass("all-open"),statusType=0,e(this).attr("data-folder-tooltip","Expand"),e("#js-tree-menu").jstree("close_all")):(e(this).addClass("all-open"),statusType=1,e(this).attr("data-folder-tooltip","Collapse"),e("#js-tree-menu").jstree("open_all")),h="",e("#js-tree-menu .jstree-node:not(.jstree-leaf)").each(function(){h+=e(this).attr("id")+","}),""!=h&&(e(".form-loader-count").css("width","100%"),s=wcp_settings.nonce,e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_all_status&status="+statusType+"&folders="+h+"&nonce="+s,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status&&(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))}),z()}),e(document).ready(function(){e(document).on("click","body, html",function(){e(".folder-order").removeClass("active")}),e(document).on("click","#sort-order-list",function(t){t.stopPropagation(),e(".folder-order").toggleClass("active")}),e(document).on("click",".folder-sort-menu a",function(t){t.stopPropagation(),t.preventDefault(),e(".form-loader-count").css("width","100%"),e(".folder-order").removeClass("active"),lastOrderStatus=e(this).attr("data-sort"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_folders_by_order&nonce="+wcp_settings.nonce+"&order="+e(this).attr("data-sort"),method:"post",success:function(t){1==(t=e.parseJSON(t)).status&&(e("#js-tree-menu").jstree().destroy(),e("#js-tree-menu").append("<ul></ul>"),e("#js-tree-menu ul").html(t.data),H(),v=t.terms,M()),e(".form-loader-count").css("width","0"),S()}})})}),e(document).ready(function(){e(document).on("keyup","#folder-search",function(){U()}),e(document).on("change","#folder-search",function(){U()}),e(document).on("blur","#folder-search",function(){U()})}),e(document).ready(function(){e(document).on("click",".folders-toggle-button",function(){dbStatus="show",e(".tree-structure-content").hasClass("active")?(e(".tree-structure-content .tree-structure").animate({height:"40px"},100,function(){e(".tree-structure-content").removeClass("active")}),dbStatus="hide"):(newHeight=parseInt(e(".tree-structure-content .tree-structure").attr("data-height")),e(".tree-structure-content .tree-structure").animate({height:newHeight},100,function(){e(".tree-structure-content").addClass("active")})),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_hide_folders&status="+dbStatus+"&nonce="+wcp_settings.nonce,method:"post",success:function(e){}})})}),"attachment"==wcp_settings.post_type){e(document).ready(function(){"show"==wcp_settings.show_in_page&&e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div><div class="folders-toggle-button"><span></span></div></div>'),D(),J()});var V=null;function F(s){V=e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_get_default_list&active_id="+l,method:"post",beforeSend:function(){null!=V&&V.abort()},success:function(o){if(o=e.parseJSON(o),e(".header-posts .total-count").text(o.total_items),e(".un-categorised-items .total-count").text(o.empty_items),selectedVal=e("#media-attachment-taxonomy-filter").val(),"all"!=selectedVal&&1==s){var a=parent.wp;a.media!=t&&(a.media.frame.setState("insert"),null!==a.media.frame.content.get()?(a.media.frame.content.get().collection.props.set({ignore:+new Date}),a.media.frame.content.get().options.selection.reset()):a.media.frame.library.props.set({ignore:+new Date}))}v=o.taxonomies,M(),""!=l&&e("#wcp_folder_"+l).addClass("active-item"),d&&(e("#title_"+u).trigger("click"),d=!1)}})}function L(){e(".media-frame-content .media-toolbar").width(e(".media-frame-content").width()-20)}function Y(e,t,s){var o="";if(s){var a=new Date;a.setTime(a.getTime()+24*s*60*60*1e3),o="; expires="+a.toUTCString()}document.cookie=e+"="+(t||"")+o+"; path=/"}function E(e){document.cookie=e+"=; Max-Age=-99999999;"}L(),e(window).resize(function(){L()}),e(document).on("click",".button.organize-button",function(){e(".media-frame").hasClass("mode-select")?E("media-select-mode"):Y("media-select-mode","on",7),e("button.button.media-button.select-mode-toggle-button").trigger("click"),e(".media-frame").hasClass("mode-select")?(e(".media-info-message").addClass("active"),e(".select-all-item-btn").addClass("active")):(e(".media-info-message, .custom-media-select").removeClass("active"),e(".select-all-item-btn").removeClass("active"))}),e(document).on("click",".select-mode-toggle-button",function(){setTimeout(function(){e(".media-frame").hasClass("mode-select")||Y("media-select-mode","off",-1),e(".media-frame").hasClass("mode-select")?(e(".media-info-message").addClass("active"),e(".select-all-item-btn").addClass("active")):(e(".media-info-message, .custom-media-select").removeClass("active"),e(".select-all-item-btn").removeClass("active"))},10)}),e(document).on("click",".select-all-item-btn",function(){e("ul.attachments li:not(.selected)").trigger("click")}),e(document).on("change",".folder_for_media",function(){"add-folder"==e(this).val()&&(u=0,d=!0,P())}),e(window).scroll(function(){})}else;function W(){e("button.button.media-button.select-mode-toggle-button").length&&(clearInterval(r),e("button.button.media-button.select-mode-toggle-button").after("<button class='button organize-button'>Bulk Organize</button>"),e(".media-toolbar-secondary").append("<span class='media-info-message'>Drag and drop your media files to the relevant folders</span>"),e(".delete-selected-button").before("<button type='button' class='button button-primary select-all-item-btn'>Select All</button>"),e(".media-toolbar-secondary").after("<div class='custom-media-select'>Move Selected files to: <select class='media-select-folder'></select></div>"),e(".media-toolbar").append("<div style='clear:both;'></div><div class='media-folder-loader'><span>Uploading files</span> <span id='current_upload_files'></span>/<span id='total_upload_files'></span><div class='folder-progress'><div class='folder-meter orange-bg'><span></span></div></div></div>"),e(".wcp-custom-form").length&&(wp.Uploader!==t&&wp.Uploader.queue.on("reset",function(){F(1)}),e(document).ajaxComplete(function(e,t,s){actionName=s.data,"undefined"!=typeof actionName&&actionName.length&&0==actionName.indexOf("action=delete-post&id=")&&F(0)})),setTimeout(function(){docReferrar=document.referrer,-1!=docReferrar.indexOf("wp-admin/upload.php")?(mediaMode=function(e){for(var t=e+"=",s=document.cookie.split(";"),o=0;o<s.length;o++){for(var a=s[o];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return null}("media-select-mode"),"on"==mediaMode&&(e("button.button.media-button.select-mode-toggle-button").trigger("click"),e(".media-frame").hasClass("mode-select")?e(".media-info-message").addClass("active"):e(".media-info-message, .custom-media-select").removeClass("active"))):E("media-select-mode"),F(1)},1e3))}e(document).ready(function(){"attachment"==wcp_settings.post_type&&jQuery("#tmpl-media-frame").length&&(r=setInterval(function(){W()},1e3)),e(document).on("click",".attachments-browser ul.attachments .thumbnail",function(){"attachment"==wcp_settings.post_type&&e(".media-toolbar").hasClass("media-toolbar-mode-select")&&(0==e("ul.attachments li.selected").length?e(".custom-media-select").removeClass("active"):e(".custom-media-select").addClass("active"))}),e(document).on("change",".media-select-folder",function(){if("attachment"==wcp_settings.post_type&&""!=e(this).val()){var t="";e(".attachments-browser li.attachment.selected").each(function(){t+=e(this).attr("data-id")+","}),"-1"==e(this).val()?e.ajax({url:wcp_settings.ajax_url,data:"post_id="+t+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+e(this).val()+"&nonce="+wcp_settings.nonce+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){0!=u&&u!=e(".media-select-folder").val()&&e("ul.attachments li.selected").remove(),C(),R()}}):(s=k(e(this).val(),"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+t+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+e(this).val()+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){t=e.parseJSON(t),e("#bulk-move-folder").hide(),"1"==t.status?(0!=u&&u!=e(".media-select-folder").val()&&e("ul.attachments li.selected").remove(),C(),R()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}}))}})})});
1
+ !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e,t){var s,o,a,r,n="#js-tree-menu",l="",d=!1,c=!1,p=0,u=0,m=0,f=!1,h="",g=[],_=wcp_settings.page_url,v=[],w="<li class='grid-view' data-id='__folder_id__' id='folder___folder_id__'><div class='folder-item is-folder' data-id='__folder_id__'><a title='__folder_name__' id='folder_view___folder_id__'class='folder-view __append_class__ has-new-folder'data-id='__folder_id__'><span class='folder item-name'><span id='wcp_folder_text___folder_id__'class='folder-title'>__folder_name__</span></span></a></div></li>",b=null,y=null;function j(){e(".wcp-move-file:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(t,s){e(this).closest("td").addClass("wcp-draggable"),e("body").addClass("no-hover-css")},stop:function(t,s){e(this).closest("td").removeClass("wcp-draggable"),e("body").removeClass("no-hover-css")}}),e(".wcp-move-multiple:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,s){return e(".selected-items").remove(),selectedItems=e("#the-list th input:checked").length,selectedItems>0?(selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")):e("<div class='selected-items'><span class='total-post-count'>Select Items to move</span></div>")},start:function(t,s){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,s){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".jstree-anchor:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=e(this).closest("li.jstree-node").attr("id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),s=k(folderID,"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?C():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?C():(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),h=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C()}}))}}),e(".un-categorised-items:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=-1,s=wcp_settings.nonce,o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C()}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,chkStr=postID+",",e(".wp-list-table input:checked").each(function(){postID!=e(this).val()&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),h=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C()}}))}}),e(".attachments-browser li.attachment:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,s){return e(".selected-items").remove(),selectedItems=e(".attachments-browser li.attachment.selected").length,selectedItems=0==selectedItems||1==selectedItems?"1 Item":selectedItems+" Items",e("<div class='selected-items'><span class='total-post-count'>"+selectedItems+" Selected</span></div>")},start:function(t,s){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,s){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".tree-structure .folder-item:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover-list",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){e("body").removeClass("no-hover-css"),folderID=e(this).data("id"),o.draggable.hasClass("wcp-move-multiple")?(s=k(folderID,"nonce"),e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C(),R()}}))):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C(),R()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C(),R()}}))}}),e(".sticky-folders li a:not(.ui-droppable)").droppable({accept:".wcp-move-file, .wcp-move-multiple, .attachments-browser li.attachment",hoverClass:"wcp-drop-hover",classes:{"ui-droppable-active":"ui-state-highlight"},drop:function(t,o){folderID=e(this).closest("li").data("folder-id"),o.draggable.hasClass("wcp-move-multiple")?e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),s=k(folderID,"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(C(),R()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(C(),R()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,s=k(folderID,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),h=chkStr,e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+folderID+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(e){C(),R()}}))}}),M()}function k(e,t){if(g.length>0)for(i=0;i<g.length;i++)if(parseInt(g[i].folder_id)==parseInt(e))return g[i][t];return""}function x(e){if(g.length>0)for(i=0;i<g.length;i++)if(parseInt(g[i].folder_id)==parseInt(e))return i;return null}function C(){if(e(".media-toolbar").hasClass("media-toolbar-mode-select")&&e("ul.attachments li.selected").length&&(e("ul.attachments li.selected").trigger("click"),e(".select-mode-toggle-button").trigger("click")),""!=h&&(e("#js-tree-menu a.jstree-clicked").length>0||"-1"==l)){if(e("#media-attachment-taxonomy-filter").length){h=h.split(",");for(var t=0;t<h.length;t++)""!=h[t]&&e(".attachments-browser li[data-id='"+h[t]+"']").remove()}h=""}e("#media-attachment-taxonomy-filter").length?V(0):(e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=get_folders_default_list",method:"post",success:function(t){t=e.parseJSON(t),e(".header-posts .total-count").text(t.total_items),e(".un-categorised-items .total-count").text(t.empty_items),v=t.taxonomies,M()}}),e(".folder-loader-ajax").addClass("active"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(_+" #posts-filter",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()}):e("#wpbody").load(_+" #wpbody-content",!1,function(t){var s={Title:"",Url:_};history.pushState(s,s.Title,s.Url),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S()}))}function I(){S(),e(".form-loader-count").css("width","0"),"object"==typeof inlineEditPost&&(inlineEditPost.init(),e("#the-list").on("click",".editinline",function(){e(this).attr("aria-expanded","true"),inlineEditPost.edit(this)}),e(document).on("click",".inline-edit-save .save",function(){var t=e(this).closest("tr").attr("id");t=(t=t.replace("edit-","")).replace("post-",""),inlineEditPost.save(t)}),e(document).on("click",".inline-edit-save .cancel",function(){var t=e(this).closest("tr").attr("id");t=(t=t.replace("edit-","")).replace("post-",""),inlineEditPost.revert(t)})),"attachment"==wcp_settings.post_type&&(e(".move-to-folder-top").length||e("#bulk-action-selector-top").append("<option class='move-to-folder-top' value='move_to_folder'>Move to Folder</option>"),e(".move-to-folder-bottom").length||e("#bulk-action-selector-bottom").append("<option class='move-to-folder-bottom' value='move_to_folder'>Move to Folder</option>"))}function S(){if(g.length&&e("li.jstree-node").each(function(){folderPostId=x(e(this).attr("id")),null!=folderPostId&&(1==g[folderPostId].is_high?e(this).addClass("is-high"):e(this).removeClass("is-high"),1==g[folderPostId].is_sticky?e(this).addClass("is-sticky"):e(this).removeClass("is-sticky"))}),folderId=0,e(".tree-structure ul").html(""),folderStatus=!0,e(".jstree-clicked").length&&(folderID=e(".jstree-clicked").closest(".jstree-node").attr("id"),e(".jstree-node[id='"+folderID+"'] > ul.jstree-children > li.jstree-node").length?(folderStatus=!1,e(".jstree-node[id='"+folderID+"'] > ul.jstree-children > li.jstree-node").each(function(){fID=e(this).attr("id"),fName=e.trim(e("#js-tree-menu").jstree(!0).get_node(fID).text),liHtml=w.replace(/__folder_id__/g,fID),liHtml=liHtml.replace(/__folder_name__/g,fName),selectedClass=e(this).hasClass("is-high")?"is-high":"",liHtml=liHtml.replace(/__append_class__/g,selectedClass),e(".tree-structure ul").append(liHtml)})):e(".jstree-node[id='"+folderID+"']").closest("ul").hasClass("jstree-container-ul")||(folderStatus=!1)),folderStatus&&e("#js-tree-menu > ul > li.jstree-node").each(function(){fID=e(this).attr("id"),fName=e.trim(e("#js-tree-menu").jstree(!0).get_node(fID).text),liHtml=w.replace(/__folder_id__/g,fID),liHtml=liHtml.replace(/__folder_name__/g,fName),selectedClass=e(this).hasClass("is-high")?"is-high":"",liHtml=liHtml.replace(/__append_class__/g,selectedClass),e(".tree-structure ul").append(liHtml)}),J(),"attachment"==wcp_settings.post_type&&(e(".move-to-folder-top").length||e("#bulk-action-selector-top").append("<option class='move-to-folder-top' value='move_to_folder'>Move to Folder</option>"),e(".move-to-folder-bottom").length||e("#bulk-action-selector-bottom").append("<option class='move-to-folder-bottom' value='move_to_folder'>Move to Folder</option>")),e(".sticky-folders .active-item").removeClass("active-item"),e("#js-tree-menu li.jstree-node.active-item").length){var t=e("#js-tree-menu li.jstree-node.active-item").data("folder-id");e(".sticky-folders .sticky-folder-"+t+" a").addClass("active-item")}j()}function D(){S()}function P(){if(0==o&&a>=10)return e("#folder-limitation-message").html("You've reached the 10 folder limitation!"),e("#no-more-folder-credit").show(),!1;e("#add-update-folder-title").text("Add a new folder"),e("#save-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#add-update-folder-name").val(""),c&&(p=u,e("#add-update-folder-name").val(e.trim(e("#js-tree-menu").jstree(!0).get_node(u).text)+" #2"),u=e("#"+u+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?e("#"+u+"_anchor").closest(".jstree-node").parent().parent().attr("id"):0),e("#add-update-folder").removeClass("disabled"),e("#add-update-folder").show(),e("#add-update-folder-name").focus(),e(".dynamic-menu").remove()}function T(){folderName=e.trim(e("#js-tree-menu").jstree(!0).get_node(u).text),parentID=e("#wcp_folder_"+u).closest("li.jstree-node").data("folder-id"),parentID==t&&(parentID=0),e("#update-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#update-folder-item-name").val(folderName),e("#update-folder-item").removeClass("disabled"),e("#update-folder-item").show(),e("#update-folder-item-name").focus(),e(".dynamic-menu").remove()}function N(t){var s="Are you sure you want to delete the selected folder?",o="Items in the folder will not be deleted.";if(f=!1,1==t&&e("#folder-hide-show-checkbox").is(":checked")){if(f=!0,0==e("#js-tree-menu input.checkbox:checked").length)return e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html("Please select at least one folder to delete"),void e("#error-folder-popup").show();e("#js-tree-menu input.checkbox:checked").length>1&&(s="Are you sure you want to delete the selected folders?",o="Items in the selected folders will not be deleted.")}e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#remove-folder-item").text("Yes, Delete it!"),e("#remove-folder-message").text(s),e("#remove-folder-notice").text(o),e("#confirm-remove-folder").show(),e("#remove-folder-item").focus()}function H(){e(n).jstree({core:{cache:!1,animation:0,check_callback:function(t,s,o,a,r){if(e("*").removeClass("drag-bot").removeClass("drag-in").removeClass("drag-up"),("move_node"===t||"copy_node"===t)&&r&&r.dnd)switch(r.pos){case"a":r.origin.get_node(r.ref,!0).addClass("drag-bot"),nodeId=e(".drag-bot").attr("id"),e("#jstree-dnd").text("Below "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"i":r.origin.get_node(r.ref,!0).addClass("drag-in"),nodeId=e(".drag-in").attr("id"),e("#jstree-dnd").text("Inside "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;case"b":r.origin.get_node(r.ref,!0).addClass("drag-up"),nodeId=e(".drag-up").attr("id"),e("#jstree-dnd").text("Above "+e.trim(e("#js-tree-menu").jstree(!0).get_node(nodeId).text));break;default:e("#jstree-dnd").text(e("#jstree-dnd").data("txt"))}return!0}},data:{cache:!1},select_node:!1,search:{show_only_matches:!0,case_sensitive:!1,fuzzy:!1},plugins:["dnd","search","contextmenu"],contextmenu:{select_node:0,show_at_node:0,items:function(){return{}}}}).bind("ready.jstree",function(){e("#js-tree-menu .jstree-node").each(function(){var t=parseInt(e(this).data("count"));t>0&&e(".jstree-node[id='"+e(this).attr("id")+"'] > a span.premio-folder-count").text(t)}),""!=l&&0!=l&&e(".jstree-node[id='"+l+"']").length&&(e("#js-tree-menu").jstree("select_node",l),e(".sticky-folders .sticky-folder-"+l+" a").length&&e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item")),e(".ajax-preloader").hide(),e(".js-tree-data").show(),A(),e(".sticky-folders ul > li").length>0&&e(".sticky-folders").addClass("active"),S(),j()}).bind("after_open.jstree",function(){j()}).bind("open_all.jstree",function(){j()}).bind("create_node.jstree",function(){j()}).bind("delete_node.jstree",function(){j()}).bind("close_all.jstree",function(){j()}).bind("after_close.jstree",function(){j()}).bind("move_node.jstree",function(t,s){folderMoveId=s.node.id,orderString="",e(".jstree-node[id='"+folderMoveId+"']").closest("ul").children().each(function(){"undefined"!=e(this).attr("id")&&(orderString+=e(this).attr("id")+",")}),e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?parentID=e("#"+folderMoveId+"_anchor").closest(".jstree-node").parent().parent().attr("id"):parentID=0,""!=orderString&&(e(".form-loader-count").css("width","100%"),e.ajax({url:wcp_settings.ajax_url,data:"term_ids="+orderString+"&action=wcp_save_folder_order&type="+wcp_settings.post_type+"&nonce="+wcp_settings.nonce+"&term_id="+folderMoveId+"&parent_id="+parentID,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#wcp_folder_parent").html(t.options),e(".form-loader-count").css("width","0"),C(),R(),M(),j()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))})}function U(){var t=e.trim(e("#folder-search").val());e("#js-tree-menu").jstree("search",t)}function O(t){e.ajax({url:wcp_settings.ajax_url,type:"post",data:"action=save_folder_last_status&post_type="+wcp_settings.post_type+"&post_id="+t+"&nonce="+wcp_settings.nonce,cache:!1,async:!1,success:function(){}})}function z(){setTimeout(function(){if(currentStatus=!0,e("#js-tree-menu .jstree-node.jstree-leaf").length==e("#js-tree-menu .jstree-node").length)e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand");else{var t=e("#js-tree-menu .jstree-node.jstree-closed").length+e("#js-tree-menu .jstree-node.jstree-open").length;e("#js-tree-menu .jstree-node.jstree-closed").length==t?(e("#expand-collapse-list").removeClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Expand")):(e("#expand-collapse-list").addClass("all-open"),e("#expand-collapse-list").attr("data-folder-tooltip","Collapse"))}},500),j()}function J(){0==e(".tree-structure-content .tree-structure li").length?e(".tree-structure-content").hide():(e(".tree-structure-content").show(),oldHeight=e(".tree-structure-content .tree-structure").height(),e(".tree-structure-content .tree-structure").height("auto"),e(".tree-structure-content .tree-structure").height()>56?e(".folders-toggle-button").show():e(".folders-toggle-button").hide(),newHeight=e(".tree-structure-content .tree-structure").height(),e(".tree-structure-content .tree-structure").attr("data-height",newHeight),e(".tree-structure-content").hasClass("active")?(e(".tree-structure-content .tree-structure").height(newHeight),e(".tree-structure-content .tree-structure").attr("data-height",newHeight)):e(".tree-structure-content .tree-structure").height(oldHeight))}function R(){e(".folder-loader-ajax").addClass("active"),e(".folder-loader-ajax img").removeClass("active"),e(".folder-loader-ajax svg#successAnimation").addClass("active").addClass("animated"),setTimeout(function(){e(".folder-loader-ajax").removeClass("active"),e(".folder-loader-ajax img").addClass("active"),e(".folder-loader-ajax svg#successAnimation").removeClass("active").removeClass("animated")},2e3)}function A(){e(".sticky-folders > ul").html("");var t="";if(e("#js-tree-menu li.jstree-node.is-sticky").each(function(){var s=e(this).attr("id"),o=e.trim(e("#js-tree-menu").jstree(!0).get_node(s).text),a=e("li.jstree-node[id='"+s+"'] > a span.premio-folder-count").text(),r=e("li.jstree-node[id='"+s+"']").hasClass("is-high")?" is-high ":"";t+="<li data-folder-id='"+s+"' class='sticky-fldr "+r+" sticky-folder-"+s+"'><a href='javascript:;'><span class='folder-title'>"+o+"</span><span class='folder-actions'><span class='update-inline-record'><i class='pfolder-edit-folder'></i></span><span class='star-icon'><i class='pfolder-star'></i></span><span class='premio-folder-count'>"+a+"</span></span></a></li>"}),e(".sticky-folders > ul").html(t),e(".jstree-anchor.jstree-clicked").length){var s=e(".jstree-anchor.jstree-clicked").closest("li.jstree-node").attr("id");e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item")}e(".sticky-folders > ul > li").length>0?e(".sticky-folders").addClass("active"):e(".sticky-folders").removeClass("active")}function M(){if(e("#media-attachment-taxonomy-filter").length&&(e("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=v;var t=e(this);currentDDVal=e(this).val(),t.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),lastFolderData=v;for(var s=0;s<v.length;s++)t.append("<option value='"+v[s].term_id+"'>"+v[s].name+" ("+v[s].trash_count+")</option>");t.val(currentDDVal).trigger("change")}),e("select.folder_for_media").length)){var t=e("select.folder_for_media").val();e("select.folder_for_media option:not(:first-child):not(:last-child)").remove();for(var s=0;s<v.length;s++)e("select.folder_for_media option:last-child").before("<option value='"+v[s].term_id+"'>"+v[s].name+"</option>");""!=t&&e(".folder_for_media").val(t)}for(e("span.premio-folder-count").text(""),e(".folder-count").text(""),s=0;s<v.length;s++)0!=parseInt(v[s].trash_count)&&(e(".jstree-node[id='"+v[s].term_id+"'] > a.jstree-anchor span.premio-folder-count").text(v[s].trash_count),e(".sticky-folder-"+v[s].term_id+" .premio-folder-count").text(v[s].trash_count));if(e(".media-select-folder").length){for(e(".media-select-folder").html("<option value=''>Select Folder</option><option value='-1'>(Unassigned)</option>"),s=0;s<v.length;s++)e(".media-select-folder").append("<option value='"+v[s].term_id+"'>"+v[s].name+" ("+v[s].trash_count+")</option>");e(".media-select-folder").val("")}""!=l&&e("#wcp_folder_"+l).addClass("active-item"),d&&(e("#title_"+u).trigger("click"),d=!1)}function E(){e("#bulk-action-selector-top, #bulk-action-selector-bottom").val("-1"),0==e(".wp-list-table tbody input[type='checkbox']:checked").length?alert("Please select items to move in folder"):(e("#bulk-move-folder").show(),e("#bulk-select").html("<option value=''>Loading...</option>"),e(".move-to-folder").attr("disabled",!0),e("#move-to-folder").prop("disabled",!0),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_get_default_list&active_id="+l,method:"post",success:function(t){if(t=e.parseJSON(t),e("#bulk-select").html("<option value=''>Select Folder</option><option value='-1'>(Unassigned)</option>"),e(".move-to-folder").prop("disabled",!1),e("#move-to-folder").prop("disabled",!1),1==t.status){var s=t.taxonomies;for(i=0;i<s.length;i++)e("#bulk-select").append("<option value='"+s[i].term_id+"'>"+s[i].name+"</option>")}}}))}if(e(document).ready(function(){v=wcp_settings.taxonomies,o=parseInt(wcp_settings.is_key_active),a=parseInt(wcp_settings.folders),l=parseInt(wcp_settings.selected_taxonomy),g=wcp_settings.folder_settings,H();var r="1"==wcp_settings.isRTL||1==wcp_settings.isRTL?"w":"e";e(".wcp-content").resizable({resizeHeight:!1,handles:r,minWidth:100,maxWidth:500,resize:function(t,s){var o=s.size.width;for(o<=275?e(".plugin-button").addClass("d-block"):e(".plugin-button").removeClass("d-block"),o<=225&&(o=225),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",o+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",o+20+"px"),newWidth=o-40,cssString="",classString="",i=0;i<=15;i++)classString+=" .space > .jstree-node >",currentWidth=newWidth-(13+20*i),cssString+="#js-tree-menu > "+classString+" .title { width: "+currentWidth+"px !important; } ",cssString+="#js-tree-menu > "+classString+" .dynamic-menu { left: "+(currentWidth-190)+"px !important; } ";e("#wcp-custom-style").html("<style>"+cssString+"</style>"),s.size.width<=185?(folderStatus="hide",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").addClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").removeClass("active"),e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px")):e("#wcp-content").hasClass("hide-folders-area")&&(folderStatus="show",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").removeClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").addClass("active"),e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250))},stop:function(t,o){var a=o.size.width;o.size.width<=275?e(".plugin-button").addClass("d-block"):e(".plugin-button").removeClass("d-block"),a<=225&&(a=225),o.size.width<=185?(folderStatus="hide",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").addClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").removeClass("active"),e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_folder_display_status&status="+folderStatus+"&nonce="+s,method:"post",success:function(e){}})):e("#wcp-content").hasClass("hide-folders-area")&&(folderStatus="show",e(".wcp-hide-show-buttons .toggle-buttons.show-folders").removeClass("active"),e(".wcp-hide-show-buttons .toggle-buttons.hide-folders").addClass("active"),e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250)),s=wcp_settings.nonce,wcp_settings.folder_width=o.size.width,e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_post_width&width="+a+"&nonce="+s,method:"post",success:function(e){}}),o.size.width<=225&&(e(".wcp-content").width(225),wcp_settings.folder_width=225)}}),e(document).on("contextmenu",".jstree-anchor",function(t){return b=t.pageX,y=t.pageY,e(this).find("span.folder-inline-edit").trigger("click"),!1}),e(document).on("click",".folder-actions span.folder-inline-edit",function(s){var o;(s.stopImmediatePropagation(),s.stopPropagation(),0!=wcp_settings.can_manage_folder)&&(isHigh=e(this).closest("li.jstree-node").hasClass("is-high"),isSticky=e(this).closest("li.jstree-node").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu' data-id='"+e(this).closest("li").prop("id")+"'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span> Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("a.jstree-anchor").find(".premio-folder-count").text()),"attachment"==wcp_settings.post_type&&hasPosts&&(menuHtml+="<li target='_blank' class='download-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e("body").append(menuHtml),s.pageX==t||s.pageY==t?(e(".dynamic-menu").css("left",b),e(".dynamic-menu").css("top",y-10),o=y):(e(".dynamic-menu").css("left",s.pageX),e(".dynamic-menu").css("top",s.pageY),o=s.pageY),e(this).parents("li.jstree-node").addClass("active-menu"),o+e(".dynamic-menu").height()>e(window).height()&&e(".dynamic-menu").css("margin-top",e(window).height()-(o+e(".dynamic-menu").height())))}),e(document).on("click",".sticky-folders .sticky-fldr > a",function(t){t.stopPropagation();var s=e(this).closest("li").data("folder-id");e(".jstree-node[id='"+s+"']").length&&(e(".jstree-clicked").removeClass("jstree-clicked"),e(".active-item").removeClass("active-item"),e("#js-tree-menu").jstree("select_node",l),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").trigger("click"),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").addClass("jstree-clicked"),e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item"))}),e(document).on("contextmenu",".sticky-folders li .sticky-fldr > a",function(t){return e(this).find("span.update-inline-record").trigger("click"),!1}),e(document).on("click",".tree-structure a",function(t){t.stopPropagation();var s=e(this).data("id");e(".jstree-node[id='"+s+"']").length&&(e(".jstree-clicked").removeClass("jstree-clicked"),e(".active-item").removeClass("active-item"),e("#js-tree-menu").jstree("select_node",l),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").trigger("click"),e(".jstree-node[id='"+s+"'] > a.jstree-anchor").addClass("jstree-clicked"),e(".sticky-folders .sticky-folder-"+s+" a").addClass("active-item"))}),e(document).on("click",".update-inline-record",function(s){var o;(s.stopImmediatePropagation(),s.stopPropagation(),0!=wcp_settings.can_manage_folder)&&(isHigh=e(this).closest("li.sticky-fldr").hasClass("is-high"),isSticky=e(this).closest("li.sticky-fldr").hasClass("is-sticky"),isStickyClass=!!isSticky,e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),menuHtml="<div class='dynamic-menu' data-id='"+e(this).closest("li").data("folder-id")+"'><ul><li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span> New Folder</a></li><li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span> Rename</a></li><li class='sticky-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li><li class='mark-folder'><a href='javascript:;'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?" Remove Star":"Add a Star")+"</a></li><li class='duplicate-folder'><a href='javascript:;'><span class=''><i class='pfolder-clone'></i></span> Duplicate folder</a></li>",hasPosts=parseInt(e(this).closest("li.jstree-node").find("h3.title:first > .total-count").text()),"attachment"==wcp_settings.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+wcp_settings.upgrade_url+"'><span class=''><i class='pfolder-zip-file'></i></span> Download Zip (Pro)</a></li>"),menuHtml+="<li class='remove-folder'><a href='javascript:;'><span class=''><i class='pfolder-remove'></i></span> Delete</a></li></ul></div>",e("body").append(menuHtml),s.pageX==t||s.pageY==t?(e(".dynamic-menu").css("left",b),e(".dynamic-menu").css("top",y-10),o=y):(e(".dynamic-menu").css("left",s.pageX),e(".dynamic-menu").css("top",s.pageY),o=s.pageY),o+e(".dynamic-menu").height()>e(window).height()&&e(".dynamic-menu").css("margin-top",e(window).height()-(o+e(".dynamic-menu").height())))}),e(document).on("click",".dynamic-menu",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click","body, html",function(){e(".dynamic-menu").remove()}),e(".wcp-hide-show-buttons .toggle-buttons").click(function(){var t="show";e(this).hasClass("hide-folders")&&(t="hide"),e(".wcp-hide-show-buttons .toggle-buttons").toggleClass("active"),s=wcp_settings.nonce,"show"==t?(e("#wcp-content").addClass("no-transition"),e("#wcp-content").removeClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right",parseInt(wcp_settings.folder_width)+20+"px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left",parseInt(wcp_settings.folder_width)+20+"px"),setTimeout(function(){e("#wcp-content").removeClass("no-transition")},250)):(e("#wcp-content").addClass("hide-folders-area"),"1"==wcp_settings.isRTL?(e("#wpcontent").css("padding-right","20px"),e("#wpcontent").css("padding-left","0px")):e("#wpcontent").css("padding-left","20px")),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_folder_display_status&status="+t+"&nonce="+s,method:"post",success:function(e){}})}),j(),e(document).ajaxComplete(function(e,s,o){o.data!=t&&""!=o.data&&-1!=o.data.indexOf("action=query-attachments")&&j()})}),e(window).on("resize",function(){}),e(window).scroll(function(){}),e(document).ready(function(){e(document).on("click","#add-new-folder",function(){u=e("#js-tree-menu a.jstree-clicked").length?e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"):0,d=!1,P()}),e(document).on("click",".new-folder",function(){u=e(this).closest(".dynamic-menu").data("id"),d=!1,P()}),e(document).on("click",".duplicate-folder",function(t){t.stopPropagation(),u=e(this).closest(".dynamic-menu").data("id"),e(".dynamic-menu").remove(),d=!1,c=!0,P(),D()}),e(document).on("submit","#save-folder-form",function(t){if(t.stopPropagation(),t.preventDefault(),folderNameDynamic=e.trim(e("#add-update-folder-name").val()),""==e.trim(folderNameDynamic))e(".folder-form-errors").addClass("active"),e("#add-update-folder-name").focus();else{e("#save-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#add-update-folder").addClass("disabled");var s=u;d&&(s=0),m=0==s?e("#js-tree-menu > ul > li.jstree-node").length:e("#js-tree-menu > ul > li.jstree-node[id='"+s+"'] > ul.jstree-children > li").length+1,e.ajax({url:wcp_settings.ajax_url,data:{parent_id:s,type:wcp_settings.post_type,action:"wcp_add_new_folder",nonce:wcp_settings.nonce,term_id:s,order:m,name:folderNameDynamic,is_duplicate:c,duplicate_from:p},method:"post",success:function(t){if(result=e.parseJSON(t),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),-1==result.status)e("#no-more-folder-credit").show();else if("1"==result.status){if(o=parseInt(result.is_key_active),a=parseInt(result.folders),e("#current-folder").text(a),e("#ttl-fldr").text(10),z(),D(),result.data.length)for(var s=0;s<result.data.length;s++){var r={folder_id:result.data[s].term_id,folder_count:0,is_sticky:result.data[s].is_sticky,is_high:result.data[s].is_high,nonce:result.data[s].nonce,slug:result.data[s].slug,is_deleted:0};g.push(r),e("#js-tree-menu").jstree().create_node(result.parent_id,{id:result.data[s].term_id,text:" "+result.data[s].title},"last",function(){e(".jstree-node[id='"+result.data[s].term_id+"']").attr("data-nonce",result.data[s].nonce),e(".jstree-node[id='"+result.data[s].term_id+"']").attr("data-slug",result.data[s].slug)})}R(),A(),e("#media-attachment-taxonomy-filter").length&&(u=result.term_id,V(0))}else e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show()}})}return!1})}),e(document).ready(function(){e("#inline-update").click(function(){e("#js-tree-menu a.jstree-clicked").length&&(u=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),T())}),e(document).on("click",".rename-folder",function(t){t.stopPropagation(),u=e(this).closest(".dynamic-menu").data("id"),T(),e(".dynamic-menu").remove()}),e(document).on("click",".form-cancel-btn",function(){e(".folder-popup-form").hide()}),e(document).on("click",".folder-popup-form",function(t){e(".folder-popup-form").hide()}),e(document).on("click",".popup-form-content",function(e){e.stopPropagation()}),e(document).on("submit","#update-folder-form",function(o){return o.stopPropagation(),o.preventDefault(),folderNameDynamic=e("#update-folder-item-name").val(),""==e.trim(folderNameDynamic)?(e(".folder-form-errors").addClass("active"),e("#update-folder-item-name").focus()):(e("#update-folder-data").html('<span class="dashicons dashicons-update"></span>'),e("#update-folder-item").addClass("disabled"),s=k(u,"nonce"),parentID=e(".jstree-node[id='"+u+"']").closest("li.jstree-node").attr("id"),parentID==t&&(parentID=0),e.ajax({url:wcp_settings.ajax_url,data:{parent_id:parentID,type:wcp_settings.post_type,action:"wcp_update_folder",nonce:s,term_id:u,order:m,name:folderNameDynamic},method:"post",success:function(t){result=e.parseJSON(t),"1"==result.status?(e("#js-tree-menu").jstree("rename_node",result.id," "+result.term_title),folderPostId=x(result.id),null!=folderPostId&&(g[folderPostId].nonce=result.nonce,g[folderPostId].slug=result.slug),D(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),R(),e("#media-attachment-taxonomy-filter").length&&V(0)):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show())}})),!1})}),e(document).ready(function(){e("#inline-remove").click(function(){e("#js-tree-menu a.jstree-clicked").length?(u=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),N(1),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")):e("#folder-hide-show-checkbox").is(":checked")&&(e(".dynamic-menu").remove(),N(1))}),e(document).on("click","#folder-hide-show-checkbox",function(){e(this).is(":checked")?e("#js-tree-menu").addClass("show-folder-checkbox"):(e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox"))}),e(document).on("click",".folder-checkbox, .input-checkbox",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),e(document).on("click",".remove-folder",function(){folderID=e(this).closest("li.jstree-node").data("id"),u=e(this).closest(".dynamic-menu").data("id"),N(0),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")}),e(document).on("click","#remove-folder-item",function(t){t.stopPropagation(),e(".folder-popup-form").addClass("disabled"),e("#remove-folder-item").html('<span class="dashicons dashicons-update"></span>'),s=k(u,"nonce"),f?function(){if(e("#folder-hide-show-checkbox").is(":checked")&&e("#js-tree-menu input.checkbox:checked").length>0){var t="";e("#js-tree-menu input.checkbox:checked").each(function(){t+=e(this).closest("li.jstree-node").attr("id")+",",e(this).closest("li.jstree-node").hasClass("jstree-clicked")&&!0}),e(".form-loader-count").css("width","100%"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_remove_muliple_folder&term_id="+t+"&nonce="+wcp_settings.nonce,method:"post",success:function(t){if(t=e.parseJSON(t),e(".form-loader-count").css("width","0px"),"1"==t.status){for(o=parseInt(t.is_key_active),a=parseInt(t.folders),e("#current-folder").text(a),i=0;i<t.term_ids.length;i++)e("#js-tree-menu").jstree().delete_node(t.term_ids[i]);e("#ttl-fldr").text(10),R(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),C(),A(),R(),e("#js-tree-menu li.jstree-node").removeClass("has-sub-tree"),e("#js-tree-menu li.jstree-node").each(function(){e(this).find("ul.ui-sortable li").length?e(this).addClass("has-sub-tree"):e(this).removeClass("active")}),e("#wcp_folder_"+l).length||(e(".header-posts a").trigger("click"),l=0)}else window.location.reload();e("#folder-hide-show-checkbox").attr("checked",!1),e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox")}})}}():e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_remove_folder&term_id="+u+"&nonce="+s,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#js-tree-menu").jstree().delete_node(u),o=parseInt(t.is_key_active),a=parseInt(t.folders),e("#current-folder").text(a),e("#ttl-fldr").text(10),e(".sticky-folders .sticky-folder-"+u).remove(),D(),R(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),C(),A(),l==u&&e(".header-posts").trigger("click")):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})})}),e(document).ready(function(){e(document).on("click",".mark-folder",function(t){t.stopPropagation(),folderID=e(this).closest(".dynamic-menu").data("id"),s=k(folderID,"nonce"),e(".form-loader-count").css("width","100%"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e.ajax({url:wcp_settings.ajax_url,data:"term_id="+folderID+"&type="+wcp_settings.post_type+"&action=wcp_mark_un_mark_folder&nonce="+s,method:"post",cache:!1,success:function(t){t=e.parseJSON(t),e(".form-loader-count").css("width","0%"),"1"==t.status?(folderPostId=x(t.id),"1"==t.marked?(e("li.jstree-node[id='"+t.id+"']").addClass("is-high"),e(".sticky-folder-"+t.id).addClass("is-high"),null!=folderPostId&&(g[folderPostId].is_high=1)):(e("li.jstree-node[id='"+t.id+"']").removeClass("is-high"),e(".sticky-folder-"+t.id).removeClass("is-high"),null!=folderPostId&&(g[folderPostId].is_high=0)),D(),R()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}})})}),e(document).ready(function(){e(document).on("click",".jstree-node .jstree-icon",function(){folderID=e(this).closest("li.jstree-node").attr("id"),e("li.jstree-node[id='"+folderID+"']").hasClass("jstree-open")?folderStatus=0:folderStatus=1,e(".form-loader-count").css("width","100%"),s=k(folderID,"nonce"),z(),e.ajax({url:wcp_settings.ajax_url,data:"is_active="+folderStatus+"&action=save_wcp_folder_state&term_id="+folderID+"&nonce="+s,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status||(e("#wcp_folder_"+folderID).hasClass("active")?(e("#wcp_folder_"+folderID).removeClass("active"),e("#wcp_folder_"+folderID).find("ul.ui-sortable:first-child > li").slideUp(),folderStatus=0):(e("#wcp_folder_"+folderID).addClass("active"),e("#wcp_folder_"+folderID).find("ul.ui-sortable:first-child > li").slideDown(),folderStatus=1),R())}})})}),e(document).ready(function(){e(document).on("click","a.jstree-anchor",function(t){if(t.stopPropagation(),e(".un-categorised-items").removeClass("active-item"),e(".header-posts a").removeClass("active-item"),e("active-item").removeClass("active-item"),l=e(this).closest("li.jstree-node").attr("id"),u=e(this).closest("li.jstree-node").attr("id"),e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item"),e("#media-attachment-taxonomy-filter").length){var s=e(this).closest("li.jstree-node").attr("id");e("#media-attachment-taxonomy-filter").val(s),e("#media-attachment-taxonomy-filter").trigger("change"),thisSlug=k(s,"slug"),_=wcp_settings.page_url+thisSlug;var o={Title:thisSlug,Url:_};history.pushState(o,o.Title,o.Url),O(thisSlug),e(".custom-media-select").removeClass("active")}else{var a=k(l,"slug");_=wcp_settings.page_url+a,e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(_+" #posts-filter",function(){var t={Title:a,Url:_};history.pushState(t,t.Title,t.Url),O(a),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),I()}):e("#wpbody").load(_+" #wpbody-content",function(){var t={Title:a,Url:_};history.pushState(t,t.Title,t.Url),O(a),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),I()})}S(),e(".sticky-folders .sticky-folder-"+l+" a").addClass("active-item")}),e(".header-posts").click(function(){if(l="",e(".wcp-container .route").removeClass("active-item"),e(".un-categorised-items").removeClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".header-posts a").addClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e("#media-attachment-taxonomy-filter").length){l="",e("#media-attachment-taxonomy-filter").val("all"),e("#media-attachment-taxonomy-filter").trigger("change");var t={Title:"",Url:wcp_settings.page_url};history.pushState(t,t.Title,t.Url),O("all"),S()}else _=wcp_settings.page_url,e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(_+" #posts-filter",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),O("all"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()}):e("#wpbody").load(_+" #wpbody-content",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),O("all"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()})}),e(".un-categorised-items").click(function(){if(l="-1",e(".wcp-container .route").removeClass("active-item"),e(".header-posts a").removeClass("active-item"),e(".un-categorised-items").addClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e("#media-attachment-taxonomy-filter").length){e("#media-attachment-taxonomy-filter").val("unassigned"),e("#media-attachment-taxonomy-filter").trigger("change");var t={Title:"",Url:wcp_settings.page_url+"-1"};history.pushState(t,t.Title,t.Url),O("-1"),S()}else _=wcp_settings.page_url+"-1",e(".form-loader-count").css("width","100%"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(_+" #posts-filter",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),O("-1"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()}):e("#wpbody").load(_+" #wpbody-content",function(){var t={Title:"",Url:_};history.pushState(t,t.Title,t.Url),O("-1"),"show"!=wcp_settings.show_in_page||e(".tree-structure").length||e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div></div>'),S(),I()})}),e("#expand-collapse-list").click(function(t){t.stopPropagation(),statusType=0,e(this).hasClass("all-open")?(e(this).removeClass("all-open"),statusType=0,e(this).attr("data-folder-tooltip","Expand"),e("#js-tree-menu").jstree("close_all")):(e(this).addClass("all-open"),statusType=1,e(this).attr("data-folder-tooltip","Collapse"),e("#js-tree-menu").jstree("open_all")),h="",e("#js-tree-menu .jstree-node:not(.jstree-leaf)").each(function(){h+=e(this).attr("id")+","}),""!=h&&(e(".form-loader-count").css("width","100%"),s=wcp_settings.nonce,e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_change_all_status&status="+statusType+"&folders="+h+"&nonce="+s,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status&&(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show(),window.location.reload(!0))}}))}),z()}),e(document).ready(function(){e(document).on("click","body, html",function(){e(".folder-order").removeClass("active")}),e(document).on("click","#sort-order-list",function(t){t.stopPropagation(),e(".folder-order").toggleClass("active")}),e(document).on("click",".folder-sort-menu a",function(t){t.stopPropagation(),t.preventDefault(),e(".form-loader-count").css("width","100%"),e(".folder-order").removeClass("active"),lastOrderStatus=e(this).attr("data-sort"),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_folders_by_order&nonce="+wcp_settings.nonce+"&order="+e(this).attr("data-sort"),method:"post",success:function(t){1==(t=e.parseJSON(t)).status&&(e("#js-tree-menu").jstree().destroy(),e("#js-tree-menu").append("<ul></ul>"),e("#js-tree-menu ul").html(t.data),H(),v=t.terms,M()),e(".form-loader-count").css("width","0"),S()}})})}),e(document).ready(function(){e(document).on("keyup","#folder-search",function(){U()}),e(document).on("change","#folder-search",function(){U()}),e(document).on("blur","#folder-search",function(){U()})}),e(document).ready(function(){e(document).on("click",".folders-toggle-button",function(){dbStatus="show",e(".tree-structure-content").hasClass("active")?(e(".tree-structure-content .tree-structure").animate({height:"40px"},100,function(){e(".tree-structure-content").removeClass("active")}),dbStatus="hide"):(newHeight=parseInt(e(".tree-structure-content .tree-structure").attr("data-height")),e(".tree-structure-content .tree-structure").animate({height:newHeight},100,function(){e(".tree-structure-content").addClass("active")})),e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_hide_folders&status="+dbStatus+"&nonce="+wcp_settings.nonce,method:"post",success:function(e){}})})}),e(document).ready(function(){e(document).on("click","#doaction",function(t){return"move_to_folder"==e("#bulk-action-selector-top").val()?(E(),!1):"edit"==e("#bulk-action-selector-top").val()&&"object"==typeof inlineEditPost?(inlineEditPost.setBulk(),!1):void 0}),e(document).on("click","#doaction2",function(t){return"move_to_folder"==e("#bulk-action-selector-bottom").val()?(E(),!1):"edit"==e("#bulk-action-selector-bottom").val()&&"object"==typeof inlineEditPost?(inlineEditPost.setBulk(),!1):void 0}),e(document).on("submit","#bulk-folder-form",function(t){t.stopPropagation(),t.preventDefault(),""!=e("#bulk-select").val()&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),""!=e("#bulk-select").val()&&("-1"==e("#bulk-select").val()?e.ajax({url:wcp_settings.ajax_url,data:"post_id="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+e(this).val()+"&nonce="+wcp_settings.nonce+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){e("#bulk-move-folder").hide(),C(),R()}}):(s=k(e("#bulk-select").val(),"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+chkStr+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+e("#bulk-select").val()+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){t=e.parseJSON(t),e("#bulk-move-folder").hide(),"1"==t.status?(C(),R()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}}))))})}),"attachment"==wcp_settings.post_type){e(document).ready(function(){"show"==wcp_settings.show_in_page&&e(".wp-header-end").before('<div class="tree-structure-content"><div class="tree-structure"><ul></ul><div class="clear clearfix"></div></div><div class="folders-toggle-button"><span></span></div></div>'),D(),J()});var F=null;function V(s){F=e.ajax({url:wcp_settings.ajax_url,data:"type="+wcp_settings.post_type+"&action=wcp_get_default_list&active_id="+l,method:"post",beforeSend:function(){null!=F&&F.abort()},success:function(o){if(o=e.parseJSON(o),e(".header-posts .total-count").text(o.total_items),e(".un-categorised-items .total-count").text(o.empty_items),selectedVal=e("#media-attachment-taxonomy-filter").val(),"all"!=selectedVal&&1==s){var a=parent.wp;a.media!=t&&(a.media.frame.setState("insert"),null!==a.media.frame.content.get()?(a.media.frame.content.get().collection.props.set({ignore:+new Date}),a.media.frame.content.get().options.selection.reset()):a.media.frame.library.props.set({ignore:+new Date}))}v=o.taxonomies,M(),""!=l&&e("#wcp_folder_"+l).addClass("active-item"),d&&(e("#title_"+u).trigger("click"),d=!1)}})}function L(){e(".media-frame-content .media-toolbar").width(e(".media-frame-content").width()-20)}function Y(e,t,s){var o="";if(s){var a=new Date;a.setTime(a.getTime()+24*s*60*60*1e3),o="; expires="+a.toUTCString()}document.cookie=e+"="+(t||"")+o+"; path=/"}function W(e){document.cookie=e+"=; Max-Age=-99999999;"}L(),e(window).resize(function(){L()}),e(document).on("click",".button.organize-button",function(){e(".media-frame").hasClass("mode-select")?W("media-select-mode"):Y("media-select-mode","on",7),e("button.button.media-button.select-mode-toggle-button").trigger("click"),e(".media-frame").hasClass("mode-select")?(e(".media-info-message").addClass("active"),e(".select-all-item-btn").addClass("active")):(e(".media-info-message, .custom-media-select").removeClass("active"),e(".select-all-item-btn").removeClass("active"))}),e(document).on("click",".select-mode-toggle-button",function(){setTimeout(function(){e(".media-frame").hasClass("mode-select")||Y("media-select-mode","off",-1),e(".media-frame").hasClass("mode-select")?(e(".media-info-message").addClass("active"),e(".select-all-item-btn").addClass("active")):(e(".media-info-message, .custom-media-select").removeClass("active"),e(".select-all-item-btn").removeClass("active"))},10)}),e(document).on("click",".select-all-item-btn",function(){e("ul.attachments li:not(.selected)").trigger("click")}),e(document).on("change",".folder_for_media",function(){"add-folder"==e(this).val()&&(u=0,d=!0,P())}),e(window).scroll(function(){})}else;function q(){e("button.button.media-button.select-mode-toggle-button").length&&(clearInterval(r),e("button.button.media-button.select-mode-toggle-button").after("<button class='button organize-button'>Bulk Organize</button>"),e(".media-toolbar-secondary").append("<span class='media-info-message'>Drag and drop your media files to the relevant folders</span>"),e(".delete-selected-button").before("<button type='button' class='button button-primary select-all-item-btn'>Select All</button>"),e(".media-toolbar-secondary").after("<div class='custom-media-select'>Move Selected files to: <select class='media-select-folder'></select></div>"),e(".media-toolbar").append("<div style='clear:both;'></div><div class='media-folder-loader'><span>Uploading files</span> <span id='current_upload_files'></span>/<span id='total_upload_files'></span><div class='folder-progress'><div class='folder-meter orange-bg'><span></span></div></div></div>"),e(".wcp-custom-form").length&&(wp.Uploader!==t&&wp.Uploader.queue.on("reset",function(){V(1)}),e(document).ajaxComplete(function(e,t,s){actionName=s.data,"undefined"!=typeof actionName&&actionName.length&&0==actionName.indexOf("action=delete-post&id=")&&V(0)})),setTimeout(function(){docReferrar=document.referrer,-1!=docReferrar.indexOf("wp-admin/upload.php")?(mediaMode=function(e){for(var t=e+"=",s=document.cookie.split(";"),o=0;o<s.length;o++){for(var a=s[o];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return null}("media-select-mode"),"on"==mediaMode&&(e("button.button.media-button.select-mode-toggle-button").trigger("click"),e(".media-frame").hasClass("mode-select")?e(".media-info-message").addClass("active"):e(".media-info-message, .custom-media-select").removeClass("active"))):W("media-select-mode"),V(1)},1e3))}e(document).ready(function(){"attachment"==wcp_settings.post_type&&e("#tmpl-media-frame").length&&(r=setInterval(function(){q()},1e3)),e(document).on("click",".attachments-browser ul.attachments .thumbnail",function(){"attachment"==wcp_settings.post_type&&e(".media-toolbar").hasClass("media-toolbar-mode-select")&&(0==e("ul.attachments li.selected").length?e(".custom-media-select").removeClass("active"):e(".custom-media-select").addClass("active"))}),e(document).on("change",".media-select-folder",function(){if("attachment"==wcp_settings.post_type&&""!=e(this).val()){var t="";e(".attachments-browser li.attachment.selected").each(function(){t+=e(this).attr("data-id")+","}),"-1"==e(this).val()?e.ajax({url:wcp_settings.ajax_url,data:"post_id="+t+"&type="+wcp_settings.post_type+"&action=wcp_remove_post_folder&folder_id="+e(this).val()+"&nonce="+wcp_settings.nonce+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){0!=u&&u!=e(".media-select-folder").val()&&e("ul.attachments li.selected").remove(),C(),R()}}):(s=k(e(this).val(),"nonce"),e.ajax({url:wcp_settings.ajax_url,data:"post_ids="+t+"&type="+wcp_settings.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+e(this).val()+"&nonce="+s+"&status="+wcp_settings.taxonomy_status+"&taxonomy="+l,method:"post",success:function(t){t=e.parseJSON(t),e("#bulk-move-folder").hide(),"1"==t.status?(0!=u&&u!=e(".media-select-folder").val()&&e("ul.attachments li.selected").remove(),C(),R()):(e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),e("#error-folder-popup-message").html(t.message),e("#error-folder-popup").show())}}))}})})});
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.6.6
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  * Text Domain: folders
@@ -30,7 +30,7 @@ if(!defined("WCP_FOLDER_URL")) {
30
  define('WCP_FOLDER_URL', plugin_dir_url(__FILE__));
31
  }
32
  if(!defined("WCP_FOLDER_VERSION")) {
33
- define('WCP_FOLDER_VERSION', "2.6.6");
34
  }
35
 
36
 
2
  /**
3
  * Plugin Name: Folders
4
  * Description: Arrange media, pages, custom post types and posts into folders
5
+ * Version: 2.6.7
6
  * Author: Premio
7
  * Author URI: https://premio.io/downloads/folders/
8
  * Text Domain: folders
30
  define('WCP_FOLDER_URL', plugin_dir_url(__FILE__));
31
  }
32
  if(!defined("WCP_FOLDER_VERSION")) {
33
+ define('WCP_FOLDER_VERSION', "2.6.7");
34
  }
35
 
36
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
3
  Tags: folder, folders, replace media, pages folders, media library, posts folders, media folders, media replace, file manager, directories, media library folders, media library folder
4
  Requires at least: 3.0.0
5
  Tested up to: 5.6
6
- Stable tag: 2.6.6
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a WordPress plugin that will help you quickly organize and manage your Media Library files, Pages, Posts, and Custom Posts in folders
@@ -180,6 +180,9 @@ A live demo for the Folders plugin is available at <a href="https://demo.premio.
180
 
181
  == Changelog ==
182
 
 
 
 
183
  = 2.6.6 =
184
  Bugs fixed
185
 
3
  Tags: folder, folders, replace media, pages folders, media library, posts folders, media folders, media replace, file manager, directories, media library folders, media library folder
4
  Requires at least: 3.0.0
5
  Tested up to: 5.6
6
+ Stable tag: 2.6.7
7
  Plugin URI: https://premio.io/downloads/folders/
8
 
9
  Folders is a WordPress plugin that will help you quickly organize and manage your Media Library files, Pages, Posts, and Custom Posts in folders
180
 
181
  == Changelog ==
182
 
183
+ = 2.6.7 =
184
+ List view folders bulk actions bug fixed
185
+
186
  = 2.6.6 =
187
  Bugs fixed
188