Version Description
Divi bug fixed
Download this release
Release Info
Developer | galdub |
Plugin | Folders – Unlimited Folders to Organize Media Library Folder, Pages, Posts, File Manager |
Version | 2.7.4 |
Comparing to | |
See all releases |
Code changes from version 2.7.3 to 2.7.4
- assets/css/page-post-media.css +4 -3
- assets/css/page-post-media.min.css +1 -1
- assets/js/page-post-media.js +8 -0
- assets/js/page-post-media.min.js +1 -1
- folders.php +10 -10
- includes/folders.class.php +105 -82
- readme.txt +4 -1
- templates/admin/general-settings.php +1 -0
assets/css/page-post-media.css
CHANGED
@@ -626,7 +626,7 @@ body:not(.no-hover-css) .wcp-container .route .title:hover .ui-icon .pfolder-fol
|
|
626 |
background: #fff;
|
627 |
width: 235px;
|
628 |
padding: 0;
|
629 |
-
z-index:
|
630 |
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, .25);
|
631 |
-moz-box-shadow: 0 0 5px 0 rgba(0, 0, 0, .25);
|
632 |
box-shadow: 0 0 5px 0 rgba(0, 0, 0, .25);
|
@@ -654,14 +654,15 @@ body:not(.no-hover-css) .wcp-container .route .title:hover .ui-icon .pfolder-fol
|
|
654 |
|
655 |
.dynamic-menu a {
|
656 |
text-decoration: none;
|
|
|
657 |
position: relative;
|
658 |
display: block;
|
659 |
padding: 5px 10px;
|
660 |
line-height: 18px;
|
661 |
white-space: nowrap;
|
662 |
-
color: #333;
|
663 |
-
font-size:13px;
|
664 |
font-weight: normal;
|
|
|
|
|
665 |
}
|
666 |
|
667 |
.dynamic-menu ul > li > a > span, .dynamic-menu ul > li > a > span span {
|
626 |
background: #fff;
|
627 |
width: 235px;
|
628 |
padding: 0;
|
629 |
+
z-index: 9000009;
|
630 |
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, .25);
|
631 |
-moz-box-shadow: 0 0 5px 0 rgba(0, 0, 0, .25);
|
632 |
box-shadow: 0 0 5px 0 rgba(0, 0, 0, .25);
|
654 |
|
655 |
.dynamic-menu a {
|
656 |
text-decoration: none;
|
657 |
+
color: #333333;
|
658 |
position: relative;
|
659 |
display: block;
|
660 |
padding: 5px 10px;
|
661 |
line-height: 18px;
|
662 |
white-space: nowrap;
|
|
|
|
|
663 |
font-weight: normal;
|
664 |
+
font-size: 13px;
|
665 |
+
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
|
666 |
}
|
667 |
|
668 |
.dynamic-menu ul > li > a > span, .dynamic-menu ul > li > a > span span {
|
assets/css/page-post-media.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.folder-custom-menu{width:275px;z-index:10001;position:absolute;height:100%;border-right:solid 1px #ddd;background:#f1f1f1;direction:ltr;top:0}.folder-modal .media-frame .media-frame-content,.folder-modal .media-frame .media-frame-router,.folder-modal .media-frame .media-frame-title,.folder-modal .media-frame .media-frame-toolbar{left:275px}.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}.media-frame a.add-new-folder{text-decoration:none;display:block;float:right;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 span{display:block;float:left;line-height:24px;font-size:14px;margin-right:5px}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}span.folder-loader-ajax{float:right;margin:0;line-height:30px;display:none}.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}#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}.form-options{background:#fff;padding:5px;margin:0 0;border-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.wcp-container ul{list-style: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.last.folder-checkbox{padding:5px 0 0}.form-options>ul>li>a{display:inline-block;text-decoration:none;padding:5px 7px;color:#000;vertical-align:middle;margin:0;background:#f1f1f1;border-radius:4px}.form-options span.icon{font-size:12px;display:inline-block;vertical-align:baseline;color:#a4c0d2}.media-frame .wcp-hide-show-buttons{display:none}.folder-order{position:relative}.form-options>ul>li.last>a.sort-folder-order{width:28px;padding:5px;text-align:center;display:inline-block;box-sizing:border-box}.folder-sort-menu{position:absolute;left: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-sort-menu.is-pro{width:170px}.folder-sort-menu.is-pro a span{display:inline-block;color:#ff5983;font-weight:500}.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.is-pro{width:140px}.folder-sort-menu a.pro-feature{color:#848484}.folder-sort-menu a.pro-feature span{display:inline-block;color:#ff5983;font-weight:500}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}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}.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}.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)}.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.active-item,.orange-bg>span,.un-categorised-items.active-item,.wcp-container .route.active-item>h3.title{background-color:#fa166b!important;color:#fff}.header-posts a.active-item span.total-count,.un-categorised-items.active-item span.total-count,.wcp-container .route.active-item>h3.title span.total-count{color:#fff!important}.wcp-icon{display:inline-block;font-size:16px;vertical-align:top;margin-right:3px}span.total-count{float:right;font-size:12px;line-height:16px}.header-posts a.active-item span.total-count,.un-categorised-items.active-item a span{color:#fff!important}.header-posts a:hover,.un-categorised-items.active-item,.un-categorised-items:hover{background:rgba(250,22,107,.08);border-radius:4px;color:#444}.un-categorised-items.active-item a,.un-categorised-items.active-item a:hover{color:#fff}.un-categorised-items a:hover,.un-categorised-items:hover a{color:#444}.media-frame .folder-custom-menu a:focus{outline:0;box-shadow:none}.sticky-title{font-size:16px;font-weight:700;padding:7px}div#custom-menu{padding:10px;background:#fff;box-shadow:0 4px 21px rgba(7,16,28,.1)}.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}.wcp-container .route{position:relative;list-style-type:none;border:0;margin:0;padding:0;top:0;max-height:100%!important;width:100%;border-radius:2px;z-index:-1;background:0 0}.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 .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 span.ui-icon{line-height:24px;font-size:18px;cursor:move;left:5px;top:2px;height:26px}#custom-menu .wcp-icon{font-size:16px!important;line-height:24px}#custom-menu input.checkbox{display:none}.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}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-]{font-size:12px}.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>h3.title .folder-sticky-icon,.wcp-container .route.is-sticky>h3.title .move-folder-icon{display:block}.nav-icon{display:none;left:-10px!important;cursor:pointer}#custom-menu .route .nav-icon .wcp-icon{font-size:9px!important;color:#fa166b;font-weight:700;transform:rotate(-90deg);transition:all .25s linear}.header-posts a,.un-categorised-items a,.wcp-container .route span.title-text{font-size:12px}.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}.has-sub-tree>.nav-icon{display:block}.has-sub-tree>ul.ui-sortable li{display:none}.has-sub-tree.active>ul.ui-sortable>li{display:block}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.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:hover>.folder-sticky-icon,body:not(.no-hover-css) .wcp-container .route .title:hover>.star-icon{display:none!important}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}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}.sticky-folders li.is-high a span.star-icon,.wcp-container .route.is-high>h3>span.star-icon{display:inline-block}.dynamic-menu{position:fixed;left:50px;background:#fff;width:235px;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);font-size:13px}.dynamic-menu.no-key{width:195px}.dynamic-menu ul{margin:0;padding:0}.dynamic-menu li{position:relative;width:100%;display:block!important;padding:2px 0;margin:0}.dynamic-menu li.new-folder{border-bottom:solid 1px #d8d8d8}.dynamic-menu a{text-decoration:none;position:relative;display:block;padding:5px 10px;line-height:18px;white-space:nowrap;color:#333;font-size:13px;font-weight:400}.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:18px;text-align:center}#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.dashicons{font-size:18px;text-align:left}li.active-menu{z-index:2!important}.dynamic-menu a.active,.dynamic-menu a:hover{background:#efefef;color:#000}.folder-popup-form{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.5);top:0;left:0;z-index:10001;display: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}.add-update-folder-title{display:block;position:relative;max-width:100%;margin:0;padding:0 0 15px 0;color:#595959;text-align:center;text-transform:none;word-wrap:break-word;font-weight:700;font-size:22px;line-height:26px}.add-update-folder-title:after{content:"";position:absolute;top:100%;width:70px;height:2px;background:#3085d6;left:0;right:0;margin:0 auto}.folder-group{position:relative;margin:45px auto 15px;padding:0 2px}.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;outline:0}.highlight{background-color:#e4f2fd;color:#000}.folder-group .folder-bar{position:relative;display:block;width:320px}.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-form-errors{margin:0 0 10px 0;padding:8px 0;background:#ffe4e4;color:#a20000;display:none}.folder-form-buttons{display:flex}.folder-form-buttons.pro-message{padding:0 0 20px 0}.folder-form-buttons a:not(.inline-button),.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;outline:0}.folder-form-buttons .form-cancel-btn,.folder-form-buttons a.form-cancel-btn:hover{background-color:#fff;color:#3085d6;outline:0}.folder-form-buttons a.inline-button{display:inline-block;color:#f51366;text-decoration:none;font-weight:500}.folder-form-buttons a.inline-button:focus,.folder-form-buttons a.inline-button:hover{color:#f51366}.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}.form-submit-btn,.form-submit-btn:hover{background-color:#3085d6;color:#fff!important;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}#no-more-folder-credit .folder-form-message{margin:20px 80px;font-size:14px}.folder-form-message{padding:25px 70px;font-size:15px;line-height:18px;color:#484848;width:310px}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.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)}.folder-order.active .folder-sort-menu{display:block}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}.media-toolbar-secondary select{width:30%!important;width:calc(30% - 10px)!important;margin:32px 10px 0 0!important}.media-frame .uploader-inline{z-index:1}.wcp-drop-hover{background:#fa166b!important;z-index:2!important;color:#fff!important}.wcp-drop-hover i{color:#fff!important}.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;z-index:10001!important}.media-frame,.media-frame .attachments-browser,.media-frame-content{overflow:inherit}#custom-menu .route.active .nav-icon .wcp-icon{transform:rotate(0);-webkit-transform:rotate(0)}.expand-collapse.all-open span.icon{transform:rotate(180deg);-webkit-transform:rotate(180deg)}.folder-search-form{padding:0 0 10px 0;position:relative}.folder-search-form input{background:#fff;border:1px solid #dbdbdb!important;box-sizing:border-box;border-radius:4px;height:32px;line-height:32px;box-sizing:border-box;padding:0 5px!important;width:100%!important;box-shadow:none!important;outline:0}.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}.wcp-drop-hover i{color:#fff!important}.ui-draggable-dragging{z-index:10051!important}.attachments.ui-sortable.ui-draggable-dragging{z-index:10001!important}#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}.form-options>ul>li>a:hover{background:#404040;color:#fff}#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}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:10px 0!important}.mCS_no_scrollbar .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{overflow:visible}.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_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)}.dynamic-menu.bottom-fix{bottom:0}.sticky-folders{display:none;padding:0;margin:10px 0 5px;border-top:solid 1px #e9e5e5}.sticky-folders.active{display:block}.plugin-title{display:inline-block}.plugin-button{float:right}.plugin-button.d-block{float:none}.plugin-title{display:inline-block}.form-options .form-options{padding:0;margin:0;box-shadow:none}.attachments-browser .media-toolbar-secondary{width:78%;max-width:inherit}.media-toolbar-primary.search-form{width:20%;max-width:inherit}body .media-frame.hide-menu .media-frame-menu{display:block}.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-content,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-router,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-title,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-toolbar{left:275px!important}.media-frame-menu.has-folder-menu{width:275px!important}.folder-modal .media-frame:not(.hide-router) .media-frame-router,.folder-modal .media-frame:not(.hide-router) .media-frame-title,.folder-modal .media-frame:not(.hide-router) .media-frame-toolbar,.media-frame:not(.hide-router) .media-frame-content{left:275px!important}.media-frame-menu.has-folder-menu .folder-custom-menu{position:relative;border:none;width:100%;height:auto}.media-frame.mode-select.hide-router .media-frame-content,.media-frame.mode-select.hide-router .media-frame-router,.media-frame.mode-select.hide-router .media-frame-title,.media-frame.mode-select.hide-router .media-frame-toolbar{left:275px!important}.media-frame.mode-select.hide-router select#media-attachment-taxonomy-filter{display:none}.media-frame.mode-select.hide-router .folder-custom-menu{display:none}html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-content,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-router,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-title,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-toolbar{left:0!important;right:275px!important}html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-content,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-router,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-title,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-toolbar{left:0!important;right:275px!important}html[dir=rtl] .media-frame.hide-menu .media-frame-content,html[dir=rtl] .media-frame.hide-menu .media-frame-router,html[dir=rtl] .media-frame.hide-menu .media-frame-title,html[dir=rtl] .media-frame.hide-menu .media-frame-toolbar{left:0!important;right:275px!important}html[dir=rtl] .folder-modal .media-frame .media-frame-router,html[dir=rtl] .folder-modal .media-frame .media-frame-title,html[dir=rtl] .folder-modal .media-frame .media-frame-toolbar,html[dir=rtl] .media-frame .folder-modal .media-frame-content{left:0!important;right:275px!important}html[dir=rtl] .folder-modal .media-frame:not(.hide-router) .media-frame-router,html[dir=rtl] .folder-modal .media-frame:not(.hide-router) .media-frame-title,html[dir=rtl] .folder-modal .media-frame:not(.hide-router) .media-frame-toolbar,html[dir=rtl] .media-frame:not(.hide-router) .media-frame-content{left:0!important;right:275px!important}.media-frame .sticky-folders>ul>li{position:relative}#vakata-dnd{z-index:10000000!important}.dynamic-menu.is-locked .remove-folder{background:#ececec}.dynamic-menu.is-locked .remove-folder a{cursor:no-drop}.jstree-node.is-locked,.jstree-node.is-locked a{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;user-drag:none;-webkit-user-drag:none;-o-user-drag:none;-moz-user-drag:none}.jstree-node.is-locked i.pfolder-folder-close{cursor:not-allowed}.add-folder-note{font-size:13px;padding:20px 0 0}.close-popup-button{position:absolute;right:-10px;top:-10px;width:20px;height:20px}.close-popup-button a{display:block;position:relative;width:20px;height:20px;color:#333;padding:2px;box-sizing:border-box}.close-popup-button a span{display:block;position:relative;width:16px;height:16px;transition:all .2s linear}.close-popup-button a span:after,.close-popup-button a span:before{content:"";position:absolute;width:12px;height:2px;background-color:#333;display:block;border-radius:2px;transform:rotate(45deg);top:7px;left:2px}.close-popup-button a span:after{transform:rotate(-45deg)}.close-popup-button a:hover span{transform:rotate(180deg)}.popup-form-data{position:relative}a#remove-folder-item{border:solid 1px #860000;background-color:#d40000;outline:0;box-shadow:none}.pro-notice{text-align:center;padding:0 0 0 5px}.folder-form-buttons a.inline-button{display:inline-block}span.pro-tip{display:block;width:80px;background:#7e3af2;padding:7px;height:20px;color:#fff;border-radius:4px}select#media-attachment-dynamic-filter{display:none!important}.dynamic-tree-data-separator{margin:7px 10px 10px;height:1px;background:#e9e5e5}.dynamic-tree-data{display:none;padding:5px 0 0 0}#dynamic-tree-folders{background:#fff;padding:0 10px 0 0}.dynamic-folders .folder-actions,.dynamic-folders .folder-checkbox{display:none!important}.folders-undo-notification{position:fixed;right:-500px;bottom:25px;width:280px;background:#fff;padding:15px;-webkit-box-shadow:0 3px 6px -4px rgb(0 0 0 / 12%),0 6px 16px 0 rgb(0 0 0 / 8%),0 9px 28px 8px rgb(0 0 0 / 5%);box-shadow:0 3px 6px -4px rgb(0 0 0 / 12%),0 6px 16px 0 rgb(0 0 0 / 8%),0 9px 28px 8px rgb(0 0 0 / 5%);transition:all .25s linear;z-index:1001}.folders-undo-notification.active{right:25px}.folders-undo-header{font-weight:500;font-size:14px;padding:0 0 3px 0}.folders-undo-body{font-size:13px;padding:0 0 5px 0}.folders-undo-footer{text-align:right;padding:5px 0 0 0}.folders-undo-footer .undo-button{background:#1da1f4;border:none;color:#fff;padding:3px 10px;font-size:12px;border-radius:2px;cursor:pointer}.folders-undo-body{position:relative}.close-undo-box{position:absolute;right:-10px;top:0;width:16px;height:16px;transition:all .25s linear}.close-undo-box:hover{transform:rotate(180deg)}.close-undo-box span{display:block;position:relative;width:16px;height:16px;transition:all .2s linear}.close-undo-box span:after,.close-undo-box span:before{content:"";position:absolute;width:12px;height:2px;background-color:#333;display:block;border-radius:2px;transform:rotate(45deg);top:7px;left:2px}.close-undo-box span:after{transform:rotate(-45deg)}#custom-scroll-menu .mCSB_container{background:#fff}.folder-separator-2{padding:0;height:1px;background:#e9e5e5;margin:0 0 5px 0}.form-options>ul>li>a.expand-collapse{width:14px;text-align:center}.form-options a.expand-collapse span.icon{font-size:8px}.image-details .media-frame,.image-details .media-frame .attachments-browser,.image-details .media-frame-content{overflow:hidden}.image-details .media-frame.mode-select.hide-router .media-frame-content,.image-details .media-frame.mode-select.hide-router .media-frame-router,.image-details .media-frame.mode-select.hide-router .media-frame-title,.image-details .media-frame.mode-select.hide-router .media-frame-toolbar{left:0!important}.image-details .media-frame.mode-select.hide-router .media-frame-content{overflow:auto}
|
1 |
+
.folder-custom-menu{width:275px;z-index:10001;position:absolute;height:100%;border-right:solid 1px #ddd;background:#f1f1f1;direction:ltr;top:0}.folder-modal .media-frame .media-frame-content,.folder-modal .media-frame .media-frame-router,.folder-modal .media-frame .media-frame-title,.folder-modal .media-frame .media-frame-toolbar{left:275px}.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}.media-frame a.add-new-folder{text-decoration:none;display:block;float:right;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 span{display:block;float:left;line-height:24px;font-size:14px;margin-right:5px}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}span.folder-loader-ajax{float:right;margin:0;line-height:30px;display:none}.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}#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}.form-options{background:#fff;padding:5px;margin:0 0;border-radius:4px;box-shadow:0 4px 21px rgba(7,16,28,.1)}.wcp-container ul{list-style: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.last.folder-checkbox{padding:5px 0 0}.form-options>ul>li>a{display:inline-block;text-decoration:none;padding:5px 7px;color:#000;vertical-align:middle;margin:0;background:#f1f1f1;border-radius:4px}.form-options span.icon{font-size:12px;display:inline-block;vertical-align:baseline;color:#a4c0d2}.media-frame .wcp-hide-show-buttons{display:none}.folder-order{position:relative}.form-options>ul>li.last>a.sort-folder-order{width:28px;padding:5px;text-align:center;display:inline-block;box-sizing:border-box}.folder-sort-menu{position:absolute;left: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-sort-menu.is-pro{width:170px}.folder-sort-menu.is-pro a span{display:inline-block;color:#ff5983;font-weight:500}.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.is-pro{width:140px}.folder-sort-menu a.pro-feature{color:#848484}.folder-sort-menu a.pro-feature span{display:inline-block;color:#ff5983;font-weight:500}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}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}.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}.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)}.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.active-item,.orange-bg>span,.un-categorised-items.active-item,.wcp-container .route.active-item>h3.title{background-color:#fa166b!important;color:#fff}.header-posts a.active-item span.total-count,.un-categorised-items.active-item span.total-count,.wcp-container .route.active-item>h3.title span.total-count{color:#fff!important}.wcp-icon{display:inline-block;font-size:16px;vertical-align:top;margin-right:3px}span.total-count{float:right;font-size:12px;line-height:16px}.header-posts a.active-item span.total-count,.un-categorised-items.active-item a span{color:#fff!important}.header-posts a:hover,.un-categorised-items.active-item,.un-categorised-items:hover{background:rgba(250,22,107,.08);border-radius:4px;color:#444}.un-categorised-items.active-item a,.un-categorised-items.active-item a:hover{color:#fff}.un-categorised-items a:hover,.un-categorised-items:hover a{color:#444}.media-frame .folder-custom-menu a:focus{outline:0;box-shadow:none}.sticky-title{font-size:16px;font-weight:700;padding:7px}div#custom-menu{padding:10px;background:#fff;box-shadow:0 4px 21px rgba(7,16,28,.1)}.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}.wcp-container .route{position:relative;list-style-type:none;border:0;margin:0;padding:0;top:0;max-height:100%!important;width:100%;border-radius:2px;z-index:-1;background:0 0}.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 .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 span.ui-icon{line-height:24px;font-size:18px;cursor:move;left:5px;top:2px;height:26px}#custom-menu .wcp-icon{font-size:16px!important;line-height:24px}#custom-menu input.checkbox{display:none}.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}#custom-menu [class*=" pfolder-"],#custom-menu [class^=pfolder-]{font-size:12px}.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>h3.title .folder-sticky-icon,.wcp-container .route.is-sticky>h3.title .move-folder-icon{display:block}.nav-icon{display:none;left:-10px!important;cursor:pointer}#custom-menu .route .nav-icon .wcp-icon{font-size:9px!important;color:#fa166b;font-weight:700;transform:rotate(-90deg);transition:all .25s linear}.header-posts a,.un-categorised-items a,.wcp-container .route span.title-text{font-size:12px}.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}.has-sub-tree>.nav-icon{display:block}.has-sub-tree>ul.ui-sortable li{display:none}.has-sub-tree.active>ul.ui-sortable>li{display:block}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.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:hover>.folder-sticky-icon,body:not(.no-hover-css) .wcp-container .route .title:hover>.star-icon{display:none!important}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}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}.sticky-folders li.is-high a span.star-icon,.wcp-container .route.is-high>h3>span.star-icon{display:inline-block}.dynamic-menu{position:fixed;left:50px;background:#fff;width:235px;padding:0;z-index:9000009;-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);font-size:13px}.dynamic-menu.no-key{width:195px}.dynamic-menu ul{margin:0;padding:0}.dynamic-menu li{position:relative;width:100%;display:block!important;padding:2px 0;margin:0}.dynamic-menu li.new-folder{border-bottom:solid 1px #d8d8d8}.dynamic-menu a{text-decoration:none;color:#333;position:relative;display:block;padding:5px 10px;line-height:18px;white-space:nowrap;font-weight:400;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.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:18px;text-align:center}#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.dashicons{font-size:18px;text-align:left}li.active-menu{z-index:2!important}.dynamic-menu a.active,.dynamic-menu a:hover{background:#efefef;color:#000}.folder-popup-form{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.5);top:0;left:0;z-index:10001;display: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}.add-update-folder-title{display:block;position:relative;max-width:100%;margin:0;padding:0 0 15px 0;color:#595959;text-align:center;text-transform:none;word-wrap:break-word;font-weight:700;font-size:22px;line-height:26px}.add-update-folder-title:after{content:"";position:absolute;top:100%;width:70px;height:2px;background:#3085d6;left:0;right:0;margin:0 auto}.folder-group{position:relative;margin:45px auto 15px;padding:0 2px}.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;outline:0}.highlight{background-color:#e4f2fd;color:#000}.folder-group .folder-bar{position:relative;display:block;width:320px}.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-form-errors{margin:0 0 10px 0;padding:8px 0;background:#ffe4e4;color:#a20000;display:none}.folder-form-buttons{display:flex}.folder-form-buttons.pro-message{padding:0 0 20px 0}.folder-form-buttons a:not(.inline-button),.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;outline:0}.folder-form-buttons .form-cancel-btn,.folder-form-buttons a.form-cancel-btn:hover{background-color:#fff;color:#3085d6;outline:0}.folder-form-buttons a.inline-button{display:inline-block;color:#f51366;text-decoration:none;font-weight:500}.folder-form-buttons a.inline-button:focus,.folder-form-buttons a.inline-button:hover{color:#f51366}.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}.form-submit-btn,.form-submit-btn:hover{background-color:#3085d6;color:#fff!important;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}#no-more-folder-credit .folder-form-message{margin:20px 80px;font-size:14px}.folder-form-message{padding:25px 70px;font-size:15px;line-height:18px;color:#484848;width:310px}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.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)}.folder-order.active .folder-sort-menu{display:block}.folder-sort-menu li a.active,.folder-sort-menu li a:hover{background:#efefef;color:#000}.media-toolbar-secondary select{width:30%!important;width:calc(30% - 10px)!important;margin:32px 10px 0 0!important}.media-frame .uploader-inline{z-index:1}.wcp-drop-hover{background:#fa166b!important;z-index:2!important;color:#fff!important}.wcp-drop-hover i{color:#fff!important}.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;z-index:10001!important}.media-frame,.media-frame .attachments-browser,.media-frame-content{overflow:inherit}#custom-menu .route.active .nav-icon .wcp-icon{transform:rotate(0);-webkit-transform:rotate(0)}.expand-collapse.all-open span.icon{transform:rotate(180deg);-webkit-transform:rotate(180deg)}.folder-search-form{padding:0 0 10px 0;position:relative}.folder-search-form input{background:#fff;border:1px solid #dbdbdb!important;box-sizing:border-box;border-radius:4px;height:32px;line-height:32px;box-sizing:border-box;padding:0 5px!important;width:100%!important;box-shadow:none!important;outline:0}.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}.wcp-drop-hover i{color:#fff!important}.ui-draggable-dragging{z-index:10051!important}.attachments.ui-sortable.ui-draggable-dragging{z-index:10001!important}#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}.form-options>ul>li>a:hover{background:#404040;color:#fff}#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}.mCSB_scrollTools a+.mCSB_draggerContainer{margin:10px 0!important}.mCS_no_scrollbar .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{overflow:visible}.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_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)}.dynamic-menu.bottom-fix{bottom:0}.sticky-folders{display:none;padding:0;margin:10px 0 5px;border-top:solid 1px #e9e5e5}.sticky-folders.active{display:block}.plugin-title{display:inline-block}.plugin-button{float:right}.plugin-button.d-block{float:none}.plugin-title{display:inline-block}.form-options .form-options{padding:0;margin:0;box-shadow:none}.attachments-browser .media-toolbar-secondary{width:78%;max-width:inherit}.media-toolbar-primary.search-form{width:20%;max-width:inherit}body .media-frame.hide-menu .media-frame-menu{display:block}.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-content,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-router,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-title,.folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-toolbar{left:275px!important}.media-frame-menu.has-folder-menu{width:275px!important}.folder-modal .media-frame:not(.hide-router) .media-frame-router,.folder-modal .media-frame:not(.hide-router) .media-frame-title,.folder-modal .media-frame:not(.hide-router) .media-frame-toolbar,.media-frame:not(.hide-router) .media-frame-content{left:275px!important}.media-frame-menu.has-folder-menu .folder-custom-menu{position:relative;border:none;width:100%;height:auto}.media-frame.mode-select.hide-router .media-frame-content,.media-frame.mode-select.hide-router .media-frame-router,.media-frame.mode-select.hide-router .media-frame-title,.media-frame.mode-select.hide-router .media-frame-toolbar{left:275px!important}.media-frame.mode-select.hide-router select#media-attachment-taxonomy-filter{display:none}.media-frame.mode-select.hide-router .folder-custom-menu{display:none}html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-content,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-router,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-title,html[dir=rtl] .folder-modal .media-frame:not(.hide-menu):not(.hide-router) .media-frame-toolbar{left:0!important;right:275px!important}html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-content,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-router,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-title,html[dir=rtl] .media-frame.mode-select.hide-router .media-frame-toolbar{left:0!important;right:275px!important}html[dir=rtl] .media-frame.hide-menu .media-frame-content,html[dir=rtl] .media-frame.hide-menu .media-frame-router,html[dir=rtl] .media-frame.hide-menu .media-frame-title,html[dir=rtl] .media-frame.hide-menu .media-frame-toolbar{left:0!important;right:275px!important}html[dir=rtl] .folder-modal .media-frame .media-frame-router,html[dir=rtl] .folder-modal .media-frame .media-frame-title,html[dir=rtl] .folder-modal .media-frame .media-frame-toolbar,html[dir=rtl] .media-frame .folder-modal .media-frame-content{left:0!important;right:275px!important}html[dir=rtl] .folder-modal .media-frame:not(.hide-router) .media-frame-router,html[dir=rtl] .folder-modal .media-frame:not(.hide-router) .media-frame-title,html[dir=rtl] .folder-modal .media-frame:not(.hide-router) .media-frame-toolbar,html[dir=rtl] .media-frame:not(.hide-router) .media-frame-content{left:0!important;right:275px!important}.media-frame .sticky-folders>ul>li{position:relative}#vakata-dnd{z-index:10000000!important}.dynamic-menu.is-locked .remove-folder{background:#ececec}.dynamic-menu.is-locked .remove-folder a{cursor:no-drop}.jstree-node.is-locked,.jstree-node.is-locked a{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;user-drag:none;-webkit-user-drag:none;-o-user-drag:none;-moz-user-drag:none}.jstree-node.is-locked i.pfolder-folder-close{cursor:not-allowed}.add-folder-note{font-size:13px;padding:20px 0 0}.close-popup-button{position:absolute;right:-10px;top:-10px;width:20px;height:20px}.close-popup-button a{display:block;position:relative;width:20px;height:20px;color:#333;padding:2px;box-sizing:border-box}.close-popup-button a span{display:block;position:relative;width:16px;height:16px;transition:all .2s linear}.close-popup-button a span:after,.close-popup-button a span:before{content:"";position:absolute;width:12px;height:2px;background-color:#333;display:block;border-radius:2px;transform:rotate(45deg);top:7px;left:2px}.close-popup-button a span:after{transform:rotate(-45deg)}.close-popup-button a:hover span{transform:rotate(180deg)}.popup-form-data{position:relative}a#remove-folder-item{border:solid 1px #860000;background-color:#d40000;outline:0;box-shadow:none}.pro-notice{text-align:center;padding:0 0 0 5px}.folder-form-buttons a.inline-button{display:inline-block}span.pro-tip{display:block;width:80px;background:#7e3af2;padding:7px;height:20px;color:#fff;border-radius:4px}select#media-attachment-dynamic-filter{display:none!important}.dynamic-tree-data-separator{margin:7px 10px 10px;height:1px;background:#e9e5e5}.dynamic-tree-data{display:none;padding:5px 0 0 0}#dynamic-tree-folders{background:#fff;padding:0 10px 0 0}.dynamic-folders .folder-actions,.dynamic-folders .folder-checkbox{display:none!important}.folders-undo-notification{position:fixed;right:-500px;bottom:25px;width:280px;background:#fff;padding:15px;-webkit-box-shadow:0 3px 6px -4px rgb(0 0 0 / 12%),0 6px 16px 0 rgb(0 0 0 / 8%),0 9px 28px 8px rgb(0 0 0 / 5%);box-shadow:0 3px 6px -4px rgb(0 0 0 / 12%),0 6px 16px 0 rgb(0 0 0 / 8%),0 9px 28px 8px rgb(0 0 0 / 5%);transition:all .25s linear;z-index:1001}.folders-undo-notification.active{right:25px}.folders-undo-header{font-weight:500;font-size:14px;padding:0 0 3px 0}.folders-undo-body{font-size:13px;padding:0 0 5px 0}.folders-undo-footer{text-align:right;padding:5px 0 0 0}.folders-undo-footer .undo-button{background:#1da1f4;border:none;color:#fff;padding:3px 10px;font-size:12px;border-radius:2px;cursor:pointer}.folders-undo-body{position:relative}.close-undo-box{position:absolute;right:-10px;top:0;width:16px;height:16px;transition:all .25s linear}.close-undo-box:hover{transform:rotate(180deg)}.close-undo-box span{display:block;position:relative;width:16px;height:16px;transition:all .2s linear}.close-undo-box span:after,.close-undo-box span:before{content:"";position:absolute;width:12px;height:2px;background-color:#333;display:block;border-radius:2px;transform:rotate(45deg);top:7px;left:2px}.close-undo-box span:after{transform:rotate(-45deg)}#custom-scroll-menu .mCSB_container{background:#fff}.folder-separator-2{padding:0;height:1px;background:#e9e5e5;margin:0 0 5px 0}.form-options>ul>li>a.expand-collapse{width:14px;text-align:center}.form-options a.expand-collapse span.icon{font-size:8px}.image-details .media-frame,.image-details .media-frame .attachments-browser,.image-details .media-frame-content{overflow:hidden}.image-details .media-frame.mode-select.hide-router .media-frame-content,.image-details .media-frame.mode-select.hide-router .media-frame-router,.image-details .media-frame.mode-select.hide-router .media-frame-title,.image-details .media-frame.mode-select.hide-router .media-frame-toolbar{left:0!important}.image-details .media-frame.mode-select.hide-router .media-frame-content{overflow:auto}
|
assets/js/page-post-media.js
CHANGED
@@ -1246,6 +1246,10 @@
|
|
1246 |
},
|
1247 |
drop: function( event, ui ) {
|
1248 |
folderID = $(this).closest("li.jstree-node").attr('id');
|
|
|
|
|
|
|
|
|
1249 |
if ( ui.draggable.hasClass( 'wcp-move-multiple')) {
|
1250 |
if($(".wp-list-table input:checked").length) {
|
1251 |
chkStr = "";
|
@@ -1396,6 +1400,10 @@
|
|
1396 |
drop: function( event, ui ) {
|
1397 |
$("body").removeClass("no-hover-css");
|
1398 |
folderID = $(this).data('id');
|
|
|
|
|
|
|
|
|
1399 |
if ( ui.draggable.hasClass( 'wcp-move-multiple' ) ) {
|
1400 |
nonce = getSettingForPost(folderID, 'nonce');
|
1401 |
if($(".wp-list-table input:checked").length) {
|
1246 |
},
|
1247 |
drop: function( event, ui ) {
|
1248 |
folderID = $(this).closest("li.jstree-node").attr('id');
|
1249 |
+
if($(this).closest("ul.jstree-container-ul").find(".jstree-clicked").length) {
|
1250 |
+
var $selectedNode = $(this).closest("ul.jstree-container-ul").find(".jstree-clicked");
|
1251 |
+
activeRecordID = $selectedNode.closest("li.jstree-node").attr('id');
|
1252 |
+
}
|
1253 |
if ( ui.draggable.hasClass( 'wcp-move-multiple')) {
|
1254 |
if($(".wp-list-table input:checked").length) {
|
1255 |
chkStr = "";
|
1400 |
drop: function( event, ui ) {
|
1401 |
$("body").removeClass("no-hover-css");
|
1402 |
folderID = $(this).data('id');
|
1403 |
+
if($(this).closest("ul.jstree-container-ul").find(".jstree-clicked").length) {
|
1404 |
+
var $selectedNode = $(this).closest("ul.jstree-container-ul").find(".jstree-clicked");
|
1405 |
+
activeRecordID = $selectedNode.closest("li.jstree-node").attr('id');
|
1406 |
+
}
|
1407 |
if ( ui.draggable.hasClass( 'wcp-move-multiple' ) ) {
|
1408 |
nonce = getSettingForPost(folderID, 'nonce');
|
1409 |
if($(".wp-list-table input:checked").length) {
|
assets/js/page-post-media.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 o,a,s=[],r=".folder-modal #js-tree-menu",d=[],l=-1,n=0,c=0,m="",p=-1,u=0,f="",h=folders_media_options.page_url,v="",g="",y=!1,j=!1,k=!1,b=!1,w=0,x=0,C=[],S=null,I=null,P=wp.media.view.AttachmentFilters.extend({id:"media-attachment-taxonomy-filter",createFilters:function(){var e={};folders_media_options.terms.length;_.each(folders_media_options.terms||{},function(t,o){e[t.term_id]={text:t.name+" ("+t.trash_count+")",props:{media_folder:t.slug}}}),e.all={text:"All Folders",props:{media_folder:""},priority:10},e.unassigned={text:"(Unassigned)",props:{media_folder:"-1"},priority:10},this.filters=e},change:function(){var e={};_.each(folders_media_options.terms||{},function(t,o){e[t.term_id]={text:t.name+" ("+t.count+")",props:{media_folder:t.slug}}}),e.all={text:"Select a folder >>",props:{media_folder:""},priority:10},e.unassigned={text:"(Unassigned)",props:{media_folder:"-1"},priority:10},this.filters=e;var t=this.filters[this.el.value];t&&this.model.set(t.props)}}),D=0,H=0,N=wp.media.view.AttachmentsBrowser;wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){N.prototype.createToolbar.call(this),this.toolbar.set("MediaLibraryOrganizerTaxonomyFilter",new P({controller:this.controller,model:this.collection.props,priority:-75}).render())}});var A,O=wp.media.model.Query;_.extend(O,{get:(A=[],function(e,t){var o,a={},s=O.orderby,r=O.defaultProps;return delete e.query,delete e.cache,_.defaults(e,r),_.each(["include","exclude"],function(t){e[t]&&!_.isArray(e[t])&&(e[t]=[e[t]])}),_.each(e,function(e,t){_.isNull(e)||(a[O.propmap[t]||t]=e)}),_.defaults(a,O.defaultArgs),a.orderby=s.valuemap[e.orderby]||e.orderby,A=[],o||(o=new O([],_.extend(t||{},{props:e,args:a})),A.push(o)),o})});var Q=window.wp;void 0!==Q&&"function"==typeof Q.Uploader&&(Q.media.view.Modal.prototype.on("open",function(){s=[],setTimeout(function(){e("#media-attachment-taxonomy-filter").length&&("all"==e("#media-attachment-taxonomy-filter").val()&&(e("#media-attachment-taxonomy-filter option:gt(1)").remove(),_.each(folders_media_options.terms,function(t,o){e("#media-attachment-taxonomy-filter").append("<option value='"+t.term_id+"'>"+t.name+" ("+t.trash_count+")</option>")})),e("#wcp-content").length||e(".editor-post-featured-image").length&&e(".attachment-filters").val("all").trigger("change"))},100)}),Q.media.view.Modal.prototype.on("close",function(){s=[]}),e.extend(Q.Uploader.prototype,{progress:function(){},init:function(){this.uploader&&(this.uploader.bind("FileFiltered",function(t,o){D++,e(".folder-meter").css("width","0%"),e(".media-folder-loader").show(),e("#total_upload_files").text(D)}),this.uploader.bind("BeforeUpload",function(t,o){var a=l,s=t.settings.multipart_params;if((a=parseInt(a))>0&&(s.folder_for_media=a),H<D){e(".media-folder-loader").show();var r=H/D*100;e(".folder-meter").css("width",r+"%")}H++,e("#current_upload_files").text(H)}),this.uploader.bind("UploadComplete",function(e,t){l=-1}),this.uploader.bind("UploadComplete",function(t,o){var a=window.wp;e(".folder-meter").css("width","100%"),setTimeout(function(){e(".media-folder-loader").hide(),e(".folder-meter").css("width","0%"),D=0,H=0},1250),function(){e("#media-attachment-taxonomy-filter").val();F=e.ajax({url:folders_media_options.ajax_url,data:"type=attachment&action=wcp_get_default_list&active_id=0",method:"post",beforeSend:function(){null!=F&&F.abort()},success:function(t){var t=e.parseJSON(t);C=t.taxonomies,Z(),z()}})}(),void 0!==a.media.frame&&null!==a.media.frame.content.get()&&void 0!==a.media.frame.content.get().collection&&(s=[],e(".folder-modal ul.attachments li.selected").length&&e(".folder-modal ul.attachments li.selected").each(function(){s.push(e(this).data("id"))}),a.media.frame.content.get().collection.props.set({ignore:+new Date}),a.media.frame.content.get().options.selection.reset())}))}}));var F,T=window.wp;if(void 0!==T&&"function"==typeof T.Uploader){var U=window.wp.media,J=U.view.Modal;U.view.Modal=U.view.Modal.extend({className:"folder-modal",initialize:function(){J.prototype.initialize.apply(this,arguments)},open:function(){J.prototype.open.apply(this,arguments)&&(e(".folder-modal").length||e(".supports-drag-drop").length&&e(".supports-drag-drop").each(function(){"block"!=e(this).css("display")&&"inline-block"!=e(this).css("display")||e(this).addClass("folder-modal")}),e(".folder-modal").length?(e(".folder-custom-menu").remove(),e(".folder-modal .media-frame-tab-panel").removeClass("has-folder-menu"),e(".folder-modal .media-frame").hasClass("hide-menu")?e(".folder-custom-menu").length||(e(".folder-modal .media-frame-tab-panel").before("<div class='folder-custom-menu'><div class='folder-menu-content'><div class='cssload-container'><div class='cssload-tube-tunnel'></div></div></div></div>"),e(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){ee(),X(),Y()})):e(".folder-custom-menu").length||(e(".folder-modal .media-frame-menu").addClass("has-folder-menu"),e(".folder-modal .media-frame-menu .media-menu").append("<div class='folder-custom-menu'><div class='folder-menu-content'><div class='cssload-container'><div class='cssload-tube-tunnel'></div></div></div></div>"),e(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){ee(),X(),Y()})),e(".folder-form-data").remove(),e(".media-frame-tab-panel:first").before("<div class='folder-form-data'></div>"),e(".folder-form-data").load(folders_media_options.media_page_url+" #folder-add-update-content",function(){})):setTimeout(function(){-1!=l&&e("#media-attachment-taxonomy-filter").each(function(){e(this).val(l),e(this).trigger("change")})},1e3))},close:function(){J.prototype.close.apply(this,arguments),e(".folder-modal").removeClass("folder-modal")}})}function M(){"yes"==folders_media_options.useFolderUndo&&(e("#do-undo").addClass("active"),e(".undo-folder-action").removeClass("disabled"),setTimeout(function(){e("#do-undo").removeClass("active"),e(".undo-folder-action").addClass("disabled")},parseInt(folders_media_options.defaultTimeout)))}function V(){e(".cut-folder-action, .copy-folder-action, .paste-folder-action, .delete-folder-action").addClass("disabled"),e("#js-tree-menu .jstree-anchor.jstree-clicked").length&&e(".delete-folder-action").removeClass("disabled"),(e("#menu-checkbox").is(":checked")||e("#menu-checkbox").is(":checked"))&&e("#js-tree-menu input.checkbox:checked").length>0&&e(".delete-folder-action").removeClass("disabled")}function z(){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){n=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()+","}),f=E(n,"nonce"),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(M(),L()):(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,f=E(n,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(M(),L()):(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,f=E(n,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),g=chkStr,e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){M(),L(),oe()}}))}}),e(".media-frame:not(.hide-router) .attachments-browser li.attachment:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,o){e(".selected-items").remove();var a=e(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length;return e("<div class='selected-items'><span class='total-post-count'>"+(a=0==a||1==a?"1 Item":a+" Items")+" Selected</span></div>")},start:function(t,o){e("body").addClass("no-hover-css")},cursor:"move",appendTo:".media-modal",cursorAt:{left:0,top:0},stop:function(t,o){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".un-categorised-items").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){n=-1,f=folders_media_options.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()+","}),B(chkStr)):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()+",")}),B(chkStr)):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")+","})),g=chkStr,B(chkStr))}}),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"),n=e(this).data("id"),o.draggable.hasClass("wcp-move-multiple")?(f=E(n,"nonce"),e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){M(),L(),oe()}}))):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,f=E(n,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){M(),L(),oe()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,f=E(n,"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:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){M(),L(),oe()}}))}}),e(".wcp-move-file:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(t,o){e(this).closest("td").addClass("wcp-draggable"),e("body").addClass("no-hover-css")},stop:function(t,o){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,o){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,o){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,o){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}})}function Y(){e(r).jstree({core:{cache:!1,animation:0,max_depth:a?"-1":1,check_callback:function(t,o,s,r,d){if(e("*").removeClass("drag-bot").removeClass("drag-in").removeClass("drag-up"),("move_node"===t||"copy_node"===t)&&d&&d.dnd)switch(d.pos){case"a":d.origin.get_node(d.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":if(!a&&e("#do_not_show_again").is(":checked"))return!1;d.origin.get_node(d.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":d.origin.get_node(d.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(){!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)}),""!=v&&0!=v&&e(".jstree-node[id='"+v+"']").length&&(e("#js-tree-menu").jstree("select_node",v),e(".sticky-folders .sticky-folder-"+v+" a").length&&e(".sticky-folders .sticky-folder-"+v+" a").addClass("active-item"));e(".ajax-preloader").hide(),e(".js-tree-data").show(),X(),q(),e(".sticky-folders ul > li").length>0&&e(".sticky-folders").addClass("active")}(),z()}).bind("after_open.jstree",function(){z()}).bind("open_all.jstree",function(){z()}).bind("create_node.jstree",function(){z()}).bind("delete_node.jstree",function(){z()}).bind("close_all.jstree",function(){z()}).bind("after_close.jstree",function(){z()}).bind("move_node.jstree",function(t,o){if(!a){var s=o.old_position;if("#"!=o.parent)return e("#js-tree-menu").jstree("move_node","#"+o.node.id,"#",s),e("#sub-drag-folder-popup").show(),!1}"#"!=o.node.parent&&jQuery("#js-tree-menu").jstree("open_node",o.node.parent),folderMoveId=o.node.id,orderString="",e(".folder-modal .jstree-node[id='"+folderMoveId+"']").closest("ul").children().each(function(){"undefined"!=e(this).attr("id")&&(orderString+=e(this).attr("id")+",")}),e(".folder-modal #"+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:folders_media_options.ajax_url,data:"term_ids="+orderString+"&action=wcp_save_folder_order&type="+folders_media_options.post_type+"&nonce="+folders_media_options.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"),L(),oe(),Z(),z()):(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()}function B(t){e(".folder-modal #js-tree-menu .jstree-anchor.jstree-clicked").length?(v=e(".folder-modal #js-tree-menu .jstree-anchor.jstree-clicked").closest(".jstree-node").attr("id"),e.ajax({url:folders_media_options.ajax_url,data:{post_id:t,action:"premio_check_for_other_folders",active_folder:v,type:folders_media_options.post_type,folder_id:-1,nonce:folders_media_options.nonce,status:folders_media_options.taxonomy_status,taxonomy:v},method:"post",success:function(t){-1==(t=e.parseJSON(t)).status?(e("#unassigned_folders").val(t.data.post_id),e("#confirm-your-change").show()):(L(),M())}})):(f=folders_media_options.nonce,e.ajax({url:folders_media_options.ajax_url,data:"post_id="+t+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+-1+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){L(),M()}}))}function E(e,t){if(d.length>0)for(i=0;i<d.length;i++)if(parseInt(d[i].folder_id)==parseInt(e))return d[i][t];return""}function R(e){if(d.length>0)for(i=0;i<d.length;i++)if(parseInt(d[i].folder_id)==parseInt(e))return i;return null}function q(){e(".sticky-folders > ul").html("");var t="";if(e("#js-tree-menu li.jstree-node.is-sticky").each(function(){var o=e(this).attr("id"),a=e.trim(e("#js-tree-menu").jstree(!0).get_node(o).text),s=(e("#"+o+"_anchor .premio-folder-count").text(),e("li.jstree-node[id='"+o+"']").hasClass("is-high")?" is-high ":"");t+="<li data-folder-id='"+o+"' class='sticky-fldr "+s+" sticky-folder-"+o+"'><a href='javascript:;'><span class='folder-title'>"+a+"</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'></span></span></a></li>"}),e(".sticky-folders > ul").html(t),e(".jstree-anchor.jstree-clicked").length){var o=e(".jstree-anchor.jstree-clicked").closest("li.jstree-node").attr("id");e(".sticky-folders .sticky-folder-"+o+" a").addClass("active-item")}e(".sticky-folders > ul > li").length>0?e(".sticky-folders").addClass("active"):e(".sticky-folders").removeClass("active"),X()}function X(){var t=0;if(e("#custom-scroll-menu").hasClass("mCustomScrollbar")){var o=jQuery("#custom-scroll-menu"),a=o.find(".mCSB_dragger"),s=o.find(".mCSB_container").height();t=a.position().top/(o.height()-a.height())*(s-o.height()),e("#custom-scroll-menu").mCustomScrollbar("destroy")}var r=jQuery(".folder-modal .media-modal-content").height()-e(".folder-modal .sticky-wcp-custom-form").height()-40;e(".folder-modal #custom-scroll-menu").closest(".media-frame-menu").length&&jQuery(".folder-custom-menu").length&&jQuery(".media-frame-menu").length&&(r=jQuery(".folder-modal .media-modal-content").height()-e(".folder-modal .sticky-wcp-custom-form").height()-jQuery(".folder-custom-menu").offset().top+jQuery(".media-frame-menu").offset().top-40),r<0&&(r=350),e("#custom-scroll-menu").mCustomScrollbar({axis:"y",scrollButtons:{enable:!0},setHeight:r,theme:"3d",scrollbarPosition:"inside",scrollInertia:500,mouseWheelPixels:60}),0!=t&&jQuery("#custom-scroll-menu").mCustomScrollbar("scrollTo",t+"px",{scrollInertia:0})}function L(){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")),""!=g&&(e("#js-tree-menu a.jstree-clicked").length>0||"-1"==v)){if(e("#media-attachment-taxonomy-filter").length){g=g.split(",");for(var t=0;t<g.length;t++)""!=g[t]&&e(".attachments-browser li[data-id='"+g[t]+"']").remove()}g=""}e("#media-attachment-taxonomy-filter").length?te(0):(e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.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),C=t.taxonomies,Z(),z()}}),e(".folder-loader-ajax").addClass("active"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(h+" #posts-filter",function(){var t={Title:"",Url:h};history.pushState(t,t.Title,t.Url),"show"!=folders_media_options.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>'),triggerInlineUpdate()}):e("#wpbody").load(h+" #wpbody-content",!1,function(t){var o={Title:"",Url:h};history.pushState(o,o.Title,o.Url),"show"!=folders_media_options.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>')}))}function Z(){if(e("#media-attachment-taxonomy-filter").length&&(e("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=C;var t=e(this);currentDDVal=e(this).val(),t.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),C;for(var o=0;o<C.length;o++)t.append("<option value='"+C[o].term_id+"'>"+C[o].name+" ("+C[o].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 o=0;o<C.length;o++)e("select.folder_for_media option:last-child").before("<option value='"+C[o].term_id+"'>"+C[o].name+"</option>");""!=t&&e(".folder_for_media").val(t)}for(e("span.premio-folder-count").text(""),e(".folder-count").text(""),o=0;o<C.length;o++)0!=parseInt(C[o].trash_count)&&(e(".jstree-node[id='"+C[o].term_id+"'] > a.jstree-anchor span.premio-folder-count").text(C[o].trash_count),e(".sticky-folder-"+C[o].term_id+" .premio-folder-count").text(C[o].trash_count));""!=v&&e("#wcp_folder_"+v).addClass("active-item"),j&&(e("#title_"+c).trigger("click"),j=!1)}function K(){var t=e.trim(e("#folder-search").val());e("#js-tree-menu").jstree("search",t)}function W(t){var o="Are you sure you want to delete the selected folder?",a="Items in the folder will not be deleted.";if(y=!1,1==t&&e("#menu-checkbox").is(":checked")){if(y=!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&&(o="Are you sure you want to delete the selected folders?",a="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(o),e("#remove-folder-notice").text(a),e("#confirm-remove-folder").show(),e("#remove-folder-item").focus()}function G(){folderName=e.trim(e("#js-tree-menu").jstree(!0).get_node(c).text),parentID=e("#wcp_folder_"+c).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 $(){if(0==u&&p>=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 new folder"),e("#save-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#add-update-folder-name").val(""),k&&(w=c,e("#add-update-folder-name").val(e.trim(e("#js-tree-menu").jstree(!0).get_node(c).text)+" #2"),c=e("#"+c+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?e("#"+c+"_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 ee(){setTimeout(function(){if(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),z()}function te(o){F=e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_get_default_list&active_id="+v,method:"post",beforeSend:function(){null!=F&&F.abort()},success:function(a){if(a=e.parseJSON(a),e(".header-posts .total-count").text(a.total_items),e(".un-categorised-items .total-count").text(a.empty_items),selectedVal=e("#media-attachment-taxonomy-filter").val(),"all"!=selectedVal&&1==o){var s=parent.wp;s.media!=t&&(s.media.frame.setState("insert"),null!==s.media.frame.content.get()&&void 0!==s.media.frame.content.get().collection?(s.media.frame.content.get().collection.props.set({ignore:+new Date}),s.media.frame.content.get().options.selection.reset()):s.media.frame.library.props.set({ignore:+new Date}))}C=a.taxonomies,Z(),z()}})}function oe(){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),z()}e(document).ready(function(){e(document).on("click",".folder-settings-btn > a",function(t){t.stopPropagation(),e(".folder-settings-btn").toggleClass("active")}),e(document).on("click","body,html",function(){e(".folder-settings-btn").removeClass("active")}),e(document).on("click",".folder-setting-menu",function(e){e.stopPropagation()}),e(document).on("click","#remove-from-all-folders:not(.disabled), #remove-from-current-folder:not(.disabled)",function(){e("#remove-from-all-folders, #remove-from-current-folder").addClass("disabled");var t="all";e(this).hasClass("remove-from-current-folder")&&(t="current"),e("#confirm-your-change").hide(),e.ajax({url:folders_media_options.ajax_url,data:{post_id:e("#unassigned_folders").val(),action:"wcp_remove_post_folder",active_folder:v,type:folders_media_options.post_type,folder_id:-1,nonce:folders_media_options.nonce,status:folders_media_options.taxonomy_status,taxonomy:v,remove_from:t},method:"post",success:function(t){e("#remove-from-all-folders, #remove-from-current-folder").removeClass("disabled"),oe(),L(),M()}})}),o=parseInt(folders_media_options.hasStars),a=parseInt(folders_media_options.hasChildren),e(document).on("click",".thumbnail-hover-box a",function(t){return t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault(),window.open(e(this).prop("href"),"_blank"),!1}),e(document).ajaxComplete(function(e,o,a){if(a.data!=t&&""!=a.data&&-1!=a.data.indexOf("action=query-attachments")&&z(),s.length>0)for(var r=0;r<s.length;r++)if(jQuery(".folder-modal ul.attachments li[data-id='"+s[r]+"']").length&&!jQuery(".folder-modal ul.attachments li[data-id='"+s[r]+"']").hasClass("selected")){var d=jQuery.Event("click");d.ctrlKey=!0,jQuery(".folder-modal ul.attachments li[data-id='"+s[r]+"']").trigger(d)}}),C=folders_media_options.terms,u=parseInt(folders_media_options.is_key_active),p=parseInt(folders_media_options.folders),d=folders_media_options.folder_settings,e(document).on("click",".header-posts a.all-posts",function(t){c=0,v="",l="all",e(".active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e(this).addClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("all").trigger("change"),e(this).closest(".media-frame").find(".folder_for_media").val("all").trigger("change"),V()}),e(document).on("click",".un-categorised-items",function(t){c=0,v="",l="unassigned",e(".active-item").removeClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e(this).addClass("active-item"),e(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("unassigned").trigger("change"),e(this).closest(".media-frame").find(".folder_for_media").val("-1").trigger("change"),V()}),e(document).on("click","a.jstree-anchor",function(t){var o,a=e(this).closest("li.jstree-node").attr("id");l=c=a,e(this).closest(".folder-modal").find(".active-item").removeClass("active-item"),e(this).closest(".folder-modal").find("#media-attachment-taxonomy-filter").val(a),e(this).closest(".folder-modal").find("#media-attachment-taxonomy-filter").trigger("change"),thisSlug=E(a,"slug"),o=thisSlug,e.ajax({url:folders_media_options.ajax_url,type:"post",data:"action=save_folder_last_status&post_type="+folders_media_options.post_type+"&post_id="+o+"&nonce="+folders_media_options.nonce,cache:!1,async:!1,success:function(){}}),e(".custom-media-select").removeClass("active"),V()}),e(document).on("change",".folder_for_media",function(){"add-folder"!=e(this).val()&&null!=e(this).val()?l=e(this).val():"add-folder"==e(this).val()&&(l=-1)}),e(document).on("click",".new-folder-pro",function(t){t.preventDefault(),e(".dynamic-menu").remove(),e("#sub-folder-popup").show()}),e(document).on("click",".close-popup-button a",function(){e(".folder-popup-form").hide()}),e(document).on("click",".update-inline-record",function(s){var r;(s.stopImmediatePropagation(),s.stopPropagation(),0!=folders_media_options.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>",menuHtml+="<li class='new-main-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Folder</a></li>",menuHtml+=a?"<li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Folder</a></li>":"<li class='new-folder-pro'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Sub-folder (Pro)</a></li>",menuHtml+="<li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span>Rename</a></li><li class='default-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-active-icon'></i></span>Open this folder by default (Pro)</a></li><li class='sticky-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li>",menuHtml+=o?"<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='mark-folder-pro'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?"Remove Star (Pro)":"Add a Star (Pro)")+"</a></li>",menuHtml+="<li class='lock-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='dashicons dashicons-lock'></span>Lock Folder (Pro)</a></li><li class='duplicate-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-clone'></i></span>Duplicate folder (Pro)</a></li>",hasPosts=parseInt(e(this).closest("li.jstree-node").find("h3.title:first > .total-count").text()),"attachment"==folders_media_options.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+folders_media_options.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",S),e(".dynamic-menu").css("top",I-10),r=I):(e(".dynamic-menu").css("left",s.pageX),e(".dynamic-menu").css("top",s.pageY),r=s.pageY),r+e(".dynamic-menu").height()>e(window).height()&&e(".dynamic-menu").css("margin-top",e(window).height()-(r+e(".dynamic-menu").height())))}),e(document).on("click","body, html",function(t){e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e(".folder-order").removeClass("active")}),e(document).on("click",".dynamic-menu, .folder-order",function(e){e.stopPropagation()}),e(document).on("contextmenu",".jstree-anchor",function(t){return S=t.pageX,I=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 r;(s.stopImmediatePropagation(),s.stopPropagation(),0!=folders_media_options.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>",menuHtml+="<li class='new-main-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Folder</a></li>",menuHtml+=a?"<li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Folder</a></li>":"<li class='new-folder-pro'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Sub-folder (Pro)</a></li>",menuHtml+="<li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span>Rename</a></li><li class='default-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-active-icon'></i></span>Open this folder by default (Pro)</a></li><li class='sticky-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li>",menuHtml+=o?"<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='mark-folder-pro'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?"Remove Star (Pro)":"Add a Star (Pro)")+"</a></li>",menuHtml+="<li class='lock-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='dashicons dashicons-lock'></span>Lock Folder (Pro)</a></li><li class='duplicate-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-clone'></i></span>Duplicate folder (Pro)</a></li>",hasPosts=parseInt(e(this).closest("a.jstree-anchor").find(".premio-folder-count").text()),"attachment"==folders_media_options.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+folders_media_options.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),e(this).parents("li.jstree-node").addClass("active-menu"),s.pageX==t||s.pageY==t?(e(".dynamic-menu").css("left",S),e(".dynamic-menu").css("top",I-10),r=I):(e(".dynamic-menu").css("left",s.pageX),e(".dynamic-menu").css("top",s.pageY),r=s.pageY),r+e(".dynamic-menu").height()>e(window).height()&&e(".dynamic-menu").css("margin-top",e(window).height()-(r+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(document).on("click",".new-folder",function(t){t.stopPropagation(),c=e(this).closest(".dynamic-menu").data("id"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),j=!1,k=!1,$()}),e(document).on("click",".new-main-folder",function(){b=1,c=e(this).closest(".dynamic-menu").data("id"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),j=!1,k=!1,$()}),e(document).on("click","#add-new-folder",function(t){e("#js-tree-menu a.jstree-clicked").length?(c=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),a||e("#pro-notice").removeClass("hide-it")):(c=0,e("#pro-notice").addClass("hide-it")),j=!1,$()}),e(document).on("submit","#save-folder-form",function(t){if(t.stopPropagation(),t.preventDefault(),m=e("#add-update-folder-name").val(),""==e.trim(m))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 o=c;j&&(o=0),a||(o=0);var s="";0==o?(x=e("#js-tree-menu > ul > li.jstree-node").length,b&&(x=jQuery("#js-tree-menu > ul > li[id='"+c+"']").index(),jQuery("#js-tree-menu > ul > li").each(function(e){s+=jQuery(this).attr("id")+",",e==x&&(s+="#,")}),x+=1)):x=e("#js-tree-menu > ul > li.jstree-node[id='"+o+"'] > ul.jstree-children > li").length+1,e.ajax({url:folders_media_options.ajax_url,data:{parent_id:o,type:folders_media_options.post_type,action:"wcp_add_new_folder",nonce:folders_media_options.nonce,term_id:o,order:x,name:m,is_duplicate:k,duplicate_from:w,parent_ids:s,parent_menu:b},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(u=parseInt(result.is_key_active),p=parseInt(result.folders),e("#current-folder").text(p),e("#ttl-fldr").text(10),ee(),result.data.length)for(var o=0;o<result.data.length;o++){var a={folder_id:result.data[o].term_id,folder_count:0,is_sticky:result.data[o].is_sticky,is_high:result.data[o].is_high,nonce:result.data[o].nonce,slug:result.data[o].slug,is_deleted:0};d.push(a),b?e("#js-tree-menu").jstree().create_node("#",{id:result.data[o].term_id,text:" "+result.data[o].title},x,function(){e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-nonce",result.data[o].nonce),e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-slug",result.data[o].slug)}):e("#js-tree-menu").jstree().create_node(result.parent_id,{id:result.data[o].term_id,text:" "+result.data[o].title},"last",function(){e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-nonce",result.data[o].nonce),e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-slug",result.data[o].slug)}),b=0}oe(),q(),c=result.term_id,te(0)}else e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show()}})}return!1}),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()}),document.onkeydown=function(t){("key"in(t=t||window.event)?"Escape"===t.key||"Esc"===t.key:27===t.keyCode)&&e(".folder-popup-form").hide()},e(document).on("click",".rename-folder",function(t){t.stopPropagation(),c=e(this).closest(".dynamic-menu").data("id"),G(),e(".dynamic-menu").remove()}),e(document).on("click","#inline-update",function(t){e("#js-tree-menu a.jstree-clicked").length&&(c=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),G())}),e(document).on("submit","#update-folder-form",function(o){return o.stopPropagation(),o.preventDefault(),m=e("#update-folder-item-name").val(),""==e.trim(m)?(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"),f=E(c,"nonce"),parentID=e(".jstree-node[id='"+c+"']").closest("li.jstree-node").attr("id"),parentID==t&&(parentID=0),e.ajax({url:folders_media_options.ajax_url,data:{parent_id:parentID,type:folders_media_options.post_type,action:"wcp_update_folder",nonce:f,term_id:c,order:x,name:m},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=R(result.id),null!=folderPostId&&(d[folderPostId].nonce=result.nonce,d[folderPostId].slug=result.slug),e(".folder-popup-form").hide(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),oe(),e("#media-attachment-taxonomy-filter").length&&te(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).on("click",".mark-folder",function(t){t.stopPropagation(),n=e(this).closest(".dynamic-menu").data("id"),f=E(n,"nonce"),e(".form-loader-count").css("width","100%"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e.ajax({url:folders_media_options.ajax_url,data:"term_id="+n+"&type="+folders_media_options.post_type+"&action=wcp_mark_un_mark_folder&nonce="+f,method:"post",cache:!1,success:function(t){t=e.parseJSON(t),e(".form-loader-count").css("width","0%"),"1"==t.status?(folderPostId=R(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&&(d[folderPostId].is_high=1)):(e("li.jstree-node[id='"+t.id+"']").removeClass("is-high"),e(".sticky-folder-"+t.id).removeClass("is-high"),null!=folderPostId&&(d[folderPostId].is_high=0)),oe()):(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).on("click",".duplicate-folder",function(t){t.stopPropagation(),c=e(this).closest(".dynamic-menu").data("id"),e(".dynamic-menu").remove(),j=!1,k=!0,$()}),e(document).on("click",".remove-folder",function(){n=e(this).closest(".dynamic-menu").data("id"),c=e(this).closest(".dynamic-menu").data("id"),W(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>'),f=E(c,"nonce"),y?function(){if(e("#menu-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:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_muliple_folder&term_id="+t+"&nonce="+folders_media_options.nonce,method:"post",success:function(t){if(t=e.parseJSON(t),e(".form-loader-count").css("width","0px"),"1"==t.status){for(u=parseInt(t.is_key_active),p=parseInt(t.folders),e("#current-folder").text(p),i=0;i<t.term_ids.length;i++)e(".folder-modal #js-tree-menu").jstree().delete_node(t.term_ids[i]);e("#ttl-fldr").text(10),oe(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),L(),q(),oe(),e(".folder-modal #wcp_folder_"+v).length||(e(".header-posts a").trigger("click"),v=0)}else window.location.reload();e("#menu-checkbox").attr("checked",!1),e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox")}})}}():e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_folder&term_id="+c+"&nonce="+f,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#js-tree-menu").jstree().delete_node(c),u=parseInt(t.is_key_active),p=parseInt(t.folders),e("#current-folder").text(p),e("#ttl-fldr").text(10),e(".sticky-folders .sticky-folder-"+c).remove(),oe(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),L(),q(),v==c&&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).on("click","#sort-order-list",function(t){t.stopPropagation(),e(".folder-order").toggleClass("active")}),e(document).on("click","#expand-collapse-list",function(t){t.stopPropagation();var o=0;e(this).hasClass("all-open")?(e(this).removeClass("all-open"),o=0,e(this).attr("data-folder-tooltip","Expand"),e("#js-tree-menu").jstree("close_all")):(e(this).addClass("all-open"),o=1,e(this).attr("data-folder-tooltip","Collapse"),e("#js-tree-menu").jstree("open_all")),g="",e("#js-tree-menu .jstree-node:not(.jstree-leaf)").each(function(){g+=e(this).attr("id")+","}),""!=g&&(e(".form-loader-count").css("width","100%"),f=folders_media_options.nonce,e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_change_all_status&status="+o+"&folders="+g+"&nonce="+f,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))}}))}),e(document).on("click",".folder-sort-menu a:not(.pro-feature)",function(t){t.stopPropagation(),t.preventDefault(),e(".form-loader-count").css("width","100%"),e(".folder-order").removeClass("active"),e(this).attr("data-sort"),e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_folders_by_order&nonce="+folders_media_options.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),C=t.terms,Z(),Y()),e(".form-loader-count").css("width","0")}})}),e(document).on("change","#media-attachment-taxonomy-filter",function(t){e("#js-tree-menu").hasClass("jstree")&&e("#js-tree-menu").jstree(!0).deselect_all(),e(".active-item").removeClass("active-item"),"all"==e(this).val()?e(".all-posts").addClass("active-item"):"unassigned"==e(this).val()?e(".un-categorised-items").addClass("active-item"):e("#js-tree-menu").jstree("select_node",e(this).val())}),e(document).on("click",".jstree-node .jstree-icon",function(){n=e(this).closest("li.jstree-node").attr("id"),e("li.jstree-node[id='"+n+"']").hasClass("jstree-open")?folderStatus=1:folderStatus=0,e(".form-loader-count").css("width","100%"),f=E(n,"nonce"),ee(),e.ajax({url:folders_media_options.ajax_url,data:"is_active="+folderStatus+"&action=save_wcp_folder_state&term_id="+n+"&nonce="+f,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status||(e("#wcp_folder_"+n).hasClass("active")?(e("#wcp_folder_"+n).removeClass("active"),e("#wcp_folder_"+n).find("ul.ui-sortable:first-child > li").slideUp(),folderStatus=0):(e("#wcp_folder_"+n).addClass("active"),e("#wcp_folder_"+n).find("ul.ui-sortable:first-child > li").slideDown(),folderStatus=1),oe())}})}),e(document).on("keyup","#folder-search",function(){K()}),e(document).on("change","#folder-search",function(){K()}),e(document).on("blur","#folder-search",function(){K()}),e(document).on("click","#do_not_show_again",function(){var t=e(this).is(":checked")?1:0;e.ajax({url:folders_media_options.ajax_url,type:"post",data:{action:"premio_hide_child_popup",status:t,nonce:folders_media_options.nonce,post_type:folders_media_options.post_type}})}),e(document).on("click","#menu-checkbox",function(){e(this).is(":checked")?(e("#js-tree-menu").addClass("show-folder-checkbox"),e("#menu-checkbox").prop("checked",!0)):(e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox"),e("#menu-checkbox").prop("checked",!1))}),e(document).on("click","#menu-checkbox",function(){e(this).is(":checked")?(e("#menu-checkbox").prop("checked",!0),e("#js-tree-menu").addClass("show-folder-checkbox")):(e("#menu-checkbox").prop("checked",!1),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","#inline-remove, .delete-folder-action:not(.disabled)",function(){e("#js-tree-menu a.jstree-clicked").length?(c=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),W(1),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")):e("#menu-checkbox").is(":checked")&&(e(".dynamic-menu").remove(),W(1))}),e(document).on("change",".folder_for_media",function(){"add-folder"==e(this).val()&&(j=!0,e("#add-new-folder").trigger("click"))}),e(document).on("click","#js-tree-menu input.checkbox",function(){V()}),z(),e(document).on("click",".undo-button, .undo-folder-action:not(.disabled)",function(){e("#do-undo").removeClass("active"),"yes"==folders_media_options.useFolderUndo&&e.ajax({url:folders_media_options.ajax_url,type:"post",data:{post_type:folders_media_options.post_type,nonce:folders_media_options.nonce,action:"wcp_undo_folder_changes"},success:function(o){if(e("#undo-done").addClass("active"),setTimeout(function(){e("#undo-done").removeClass("active")},2500),e("#media-attachment-taxonomy-filter").length){var a=parent.wp;a.media!=t&&(a.media.frame.setState("insert"),null!==a.media.frame.content.get()&&void 0!==a.media.frame.content.get().collection?(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}))}L()}})}),e(document).on("click",".close-undo-box",function(t){t.preventDefault(),e("#do-undo").removeClass("active")})})});
|
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 o,a,s=[],r=".folder-modal #js-tree-menu",d=[],l=-1,n=0,c=0,m="",p=-1,u=0,f="",h=folders_media_options.page_url,v="",g="",j=!1,y=!1,k=!1,b=!1,w=0,x=0,C=[],S=null,I=null,P=wp.media.view.AttachmentFilters.extend({id:"media-attachment-taxonomy-filter",createFilters:function(){var e={};folders_media_options.terms.length;_.each(folders_media_options.terms||{},function(t,o){e[t.term_id]={text:t.name+" ("+t.trash_count+")",props:{media_folder:t.slug}}}),e.all={text:"All Folders",props:{media_folder:""},priority:10},e.unassigned={text:"(Unassigned)",props:{media_folder:"-1"},priority:10},this.filters=e},change:function(){var e={};_.each(folders_media_options.terms||{},function(t,o){e[t.term_id]={text:t.name+" ("+t.count+")",props:{media_folder:t.slug}}}),e.all={text:"Select a folder >>",props:{media_folder:""},priority:10},e.unassigned={text:"(Unassigned)",props:{media_folder:"-1"},priority:10},this.filters=e;var t=this.filters[this.el.value];t&&this.model.set(t.props)}}),D=0,H=0,N=wp.media.view.AttachmentsBrowser;wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){N.prototype.createToolbar.call(this),this.toolbar.set("MediaLibraryOrganizerTaxonomyFilter",new P({controller:this.controller,model:this.collection.props,priority:-75}).render())}});var A,O=wp.media.model.Query;_.extend(O,{get:(A=[],function(e,t){var o,a={},s=O.orderby,r=O.defaultProps;return delete e.query,delete e.cache,_.defaults(e,r),_.each(["include","exclude"],function(t){e[t]&&!_.isArray(e[t])&&(e[t]=[e[t]])}),_.each(e,function(e,t){_.isNull(e)||(a[O.propmap[t]||t]=e)}),_.defaults(a,O.defaultArgs),a.orderby=s.valuemap[e.orderby]||e.orderby,A=[],o||(o=new O([],_.extend(t||{},{props:e,args:a})),A.push(o)),o})});var Q=window.wp;void 0!==Q&&"function"==typeof Q.Uploader&&(Q.media.view.Modal.prototype.on("open",function(){s=[],setTimeout(function(){e("#media-attachment-taxonomy-filter").length&&("all"==e("#media-attachment-taxonomy-filter").val()&&(e("#media-attachment-taxonomy-filter option:gt(1)").remove(),_.each(folders_media_options.terms,function(t,o){e("#media-attachment-taxonomy-filter").append("<option value='"+t.term_id+"'>"+t.name+" ("+t.trash_count+")</option>")})),e("#wcp-content").length||e(".editor-post-featured-image").length&&e(".attachment-filters").val("all").trigger("change"))},100)}),Q.media.view.Modal.prototype.on("close",function(){s=[]}),e.extend(Q.Uploader.prototype,{progress:function(){},init:function(){this.uploader&&(this.uploader.bind("FileFiltered",function(t,o){D++,e(".folder-meter").css("width","0%"),e(".media-folder-loader").show(),e("#total_upload_files").text(D)}),this.uploader.bind("BeforeUpload",function(t,o){var a=l,s=t.settings.multipart_params;if((a=parseInt(a))>0&&(s.folder_for_media=a),H<D){e(".media-folder-loader").show();var r=H/D*100;e(".folder-meter").css("width",r+"%")}H++,e("#current_upload_files").text(H)}),this.uploader.bind("UploadComplete",function(e,t){l=-1}),this.uploader.bind("UploadComplete",function(t,o){var a=window.wp;e(".folder-meter").css("width","100%"),setTimeout(function(){e(".media-folder-loader").hide(),e(".folder-meter").css("width","0%"),D=0,H=0},1250),function(){e("#media-attachment-taxonomy-filter").val();F=e.ajax({url:folders_media_options.ajax_url,data:"type=attachment&action=wcp_get_default_list&active_id=0",method:"post",beforeSend:function(){null!=F&&F.abort()},success:function(t){var t=e.parseJSON(t);C=t.taxonomies,Z(),z()}})}(),void 0!==a.media.frame&&null!==a.media.frame.content.get()&&void 0!==a.media.frame.content.get().collection&&(s=[],e(".folder-modal ul.attachments li.selected").length&&e(".folder-modal ul.attachments li.selected").each(function(){s.push(e(this).data("id"))}),a.media.frame.content.get().collection.props.set({ignore:+new Date}),a.media.frame.content.get().options.selection.reset())}))}}));var F,T=window.wp;if(void 0!==T&&"function"==typeof T.Uploader){var U=window.wp.media,J=U.view.Modal;U.view.Modal=U.view.Modal.extend({className:"folder-modal",initialize:function(){J.prototype.initialize.apply(this,arguments)},open:function(){J.prototype.open.apply(this,arguments)&&(e(".folder-modal").length||e(".supports-drag-drop").length&&e(".supports-drag-drop").each(function(){"block"!=e(this).css("display")&&"inline-block"!=e(this).css("display")||e(this).addClass("folder-modal")}),e(".folder-modal").length?(e(".folder-custom-menu").remove(),e(".folder-modal .media-frame-tab-panel").removeClass("has-folder-menu"),e(".folder-modal .media-frame").hasClass("hide-menu")?e(".folder-custom-menu").length||(e(".folder-modal .media-frame-tab-panel").before("<div class='folder-custom-menu'><div class='folder-menu-content'><div class='cssload-container'><div class='cssload-tube-tunnel'></div></div></div></div>"),e(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){ee(),X(),Y()})):e(".folder-custom-menu").length||(e(".folder-modal .media-frame-menu").addClass("has-folder-menu"),e(".folder-modal .media-frame-menu .media-menu").append("<div class='folder-custom-menu'><div class='folder-menu-content'><div class='cssload-container'><div class='cssload-tube-tunnel'></div></div></div></div>"),e(".folder-modal .folder-menu-content").load(folders_media_options.media_page_url+" #wcp-content-resize",function(){ee(),X(),Y()})),e(".folder-form-data").remove(),e(".media-frame-tab-panel:first").before("<div class='folder-form-data'></div>"),e(".folder-form-data").load(folders_media_options.media_page_url+" #folder-add-update-content",function(){})):setTimeout(function(){-1!=l&&e("#media-attachment-taxonomy-filter").each(function(){e(this).val(l),e(this).trigger("change")})},1e3))},close:function(){J.prototype.close.apply(this,arguments),e(".folder-modal").removeClass("folder-modal")}})}function M(){"yes"==folders_media_options.useFolderUndo&&(e("#do-undo").addClass("active"),e(".undo-folder-action").removeClass("disabled"),setTimeout(function(){e("#do-undo").removeClass("active"),e(".undo-folder-action").addClass("disabled")},parseInt(folders_media_options.defaultTimeout)))}function V(){e(".cut-folder-action, .copy-folder-action, .paste-folder-action, .delete-folder-action").addClass("disabled"),e("#js-tree-menu .jstree-anchor.jstree-clicked").length&&e(".delete-folder-action").removeClass("disabled"),(e("#menu-checkbox").is(":checked")||e("#menu-checkbox").is(":checked"))&&e("#js-tree-menu input.checkbox:checked").length>0&&e(".delete-folder-action").removeClass("disabled")}function z(){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){if(n=e(this).closest("li.jstree-node").attr("id"),e(this).closest("ul.jstree-container-ul").find(".jstree-clicked").length){var a=e(this).closest("ul.jstree-container-ul").find(".jstree-clicked");v=a.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()+","}),f=E(n,"nonce"),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(M(),L()):(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,f=E(n,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(M(),L()):(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,f=E(n,"nonce"),e(".attachments-browser li.attachment.selected").length>1&&(chkStr="",e(".attachments-browser li.attachment.selected").each(function(){chkStr+=e(this).data("id")+","})),g=chkStr,e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){M(),L(),oe()}}))}}),e(".media-frame:not(.hide-router) .attachments-browser li.attachment:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:function(t,o){e(".selected-items").remove();var a=e(".media-frame:not(.hide-router) .attachments-browser li.attachment.selected").length;return e("<div class='selected-items'><span class='total-post-count'>"+(a=0==a||1==a?"1 Item":a+" Items")+" Selected</span></div>")},start:function(t,o){e("body").addClass("no-hover-css")},cursor:"move",appendTo:".media-modal",cursorAt:{left:0,top:0},stop:function(t,o){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}}),e(".un-categorised-items").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){n=-1,f=folders_media_options.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()+","}),B(chkStr)):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()+",")}),B(chkStr)):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")+","})),g=chkStr,B(chkStr))}}),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){if(e("body").removeClass("no-hover-css"),n=e(this).data("id"),e(this).closest("ul.jstree-container-ul").find(".jstree-clicked").length){var a=e(this).closest("ul.jstree-container-ul").find(".jstree-clicked");v=a.closest("li.jstree-node").attr("id")}o.draggable.hasClass("wcp-move-multiple")?(f=E(n,"nonce"),e(".wp-list-table input:checked").length&&(chkStr="",e(".wp-list-table input:checked").each(function(){chkStr+=e(this).val()+","}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){M(),L(),oe()}}))):o.draggable.hasClass("wcp-move-file")?(postID=o.draggable[0].attributes["data-id"].nodeValue,f=E(n,"nonce"),chkStr=postID+",",e(".wp-list-table input:checked").each(function(){e(this).val()!=postID&&(chkStr+=e(this).val()+",")}),e.ajax({url:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){M(),L(),oe()}})):o.draggable.hasClass("attachment")&&(chkStr=o.draggable[0].attributes["data-id"].nodeValue,f=E(n,"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:folders_media_options.ajax_url,data:"post_ids="+chkStr+"&type="+folders_media_options.post_type+"&action=wcp_change_multiple_post_folder&folder_id="+n+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){M(),L(),oe()}}))}}),e(".wcp-move-file:not(.ui-draggable)").draggable({revert:"invalid",containment:"document",helper:"clone",cursor:"move",start:function(t,o){e(this).closest("td").addClass("wcp-draggable"),e("body").addClass("no-hover-css")},stop:function(t,o){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,o){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,o){e("body").addClass("no-hover-css")},cursor:"move",cursorAt:{left:0,top:0},stop:function(t,o){e(".selected-items").remove(),e("body").removeClass("no-hover-css")}})}function Y(){e(r).jstree({core:{cache:!1,animation:0,max_depth:a?"-1":1,check_callback:function(t,o,s,r,d){if(e("*").removeClass("drag-bot").removeClass("drag-in").removeClass("drag-up"),("move_node"===t||"copy_node"===t)&&d&&d.dnd)switch(d.pos){case"a":d.origin.get_node(d.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":if(!a&&e("#do_not_show_again").is(":checked"))return!1;d.origin.get_node(d.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":d.origin.get_node(d.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(){!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)}),""!=v&&0!=v&&e(".jstree-node[id='"+v+"']").length&&(e("#js-tree-menu").jstree("select_node",v),e(".sticky-folders .sticky-folder-"+v+" a").length&&e(".sticky-folders .sticky-folder-"+v+" a").addClass("active-item"));e(".ajax-preloader").hide(),e(".js-tree-data").show(),X(),q(),e(".sticky-folders ul > li").length>0&&e(".sticky-folders").addClass("active")}(),z()}).bind("after_open.jstree",function(){z()}).bind("open_all.jstree",function(){z()}).bind("create_node.jstree",function(){z()}).bind("delete_node.jstree",function(){z()}).bind("close_all.jstree",function(){z()}).bind("after_close.jstree",function(){z()}).bind("move_node.jstree",function(t,o){if(!a){var s=o.old_position;if("#"!=o.parent)return e("#js-tree-menu").jstree("move_node","#"+o.node.id,"#",s),e("#sub-drag-folder-popup").show(),!1}"#"!=o.node.parent&&jQuery("#js-tree-menu").jstree("open_node",o.node.parent),folderMoveId=o.node.id,orderString="",e(".folder-modal .jstree-node[id='"+folderMoveId+"']").closest("ul").children().each(function(){"undefined"!=e(this).attr("id")&&(orderString+=e(this).attr("id")+",")}),e(".folder-modal #"+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:folders_media_options.ajax_url,data:"term_ids="+orderString+"&action=wcp_save_folder_order&type="+folders_media_options.post_type+"&nonce="+folders_media_options.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"),L(),oe(),Z(),z()):(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()}function B(t){e(".folder-modal #js-tree-menu .jstree-anchor.jstree-clicked").length?(v=e(".folder-modal #js-tree-menu .jstree-anchor.jstree-clicked").closest(".jstree-node").attr("id"),e.ajax({url:folders_media_options.ajax_url,data:{post_id:t,action:"premio_check_for_other_folders",active_folder:v,type:folders_media_options.post_type,folder_id:-1,nonce:folders_media_options.nonce,status:folders_media_options.taxonomy_status,taxonomy:v},method:"post",success:function(t){-1==(t=e.parseJSON(t)).status?(e("#unassigned_folders").val(t.data.post_id),e("#confirm-your-change").show()):(L(),M())}})):(f=folders_media_options.nonce,e.ajax({url:folders_media_options.ajax_url,data:"post_id="+t+"&type="+folders_media_options.post_type+"&action=wcp_remove_post_folder&folder_id="+-1+"&nonce="+f+"&status="+folders_media_options.taxonomy_status+"&taxonomy="+v,method:"post",success:function(e){L(),M()}}))}function E(e,t){if(d.length>0)for(i=0;i<d.length;i++)if(parseInt(d[i].folder_id)==parseInt(e))return d[i][t];return""}function R(e){if(d.length>0)for(i=0;i<d.length;i++)if(parseInt(d[i].folder_id)==parseInt(e))return i;return null}function q(){e(".sticky-folders > ul").html("");var t="";if(e("#js-tree-menu li.jstree-node.is-sticky").each(function(){var o=e(this).attr("id"),a=e.trim(e("#js-tree-menu").jstree(!0).get_node(o).text),s=(e("#"+o+"_anchor .premio-folder-count").text(),e("li.jstree-node[id='"+o+"']").hasClass("is-high")?" is-high ":"");t+="<li data-folder-id='"+o+"' class='sticky-fldr "+s+" sticky-folder-"+o+"'><a href='javascript:;'><span class='folder-title'>"+a+"</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'></span></span></a></li>"}),e(".sticky-folders > ul").html(t),e(".jstree-anchor.jstree-clicked").length){var o=e(".jstree-anchor.jstree-clicked").closest("li.jstree-node").attr("id");e(".sticky-folders .sticky-folder-"+o+" a").addClass("active-item")}e(".sticky-folders > ul > li").length>0?e(".sticky-folders").addClass("active"):e(".sticky-folders").removeClass("active"),X()}function X(){var t=0;if(e("#custom-scroll-menu").hasClass("mCustomScrollbar")){var o=jQuery("#custom-scroll-menu"),a=o.find(".mCSB_dragger"),s=o.find(".mCSB_container").height();t=a.position().top/(o.height()-a.height())*(s-o.height()),e("#custom-scroll-menu").mCustomScrollbar("destroy")}var r=jQuery(".folder-modal .media-modal-content").height()-e(".folder-modal .sticky-wcp-custom-form").height()-40;e(".folder-modal #custom-scroll-menu").closest(".media-frame-menu").length&&jQuery(".folder-custom-menu").length&&jQuery(".media-frame-menu").length&&(r=jQuery(".folder-modal .media-modal-content").height()-e(".folder-modal .sticky-wcp-custom-form").height()-jQuery(".folder-custom-menu").offset().top+jQuery(".media-frame-menu").offset().top-40),r<0&&(r=350),e("#custom-scroll-menu").mCustomScrollbar({axis:"y",scrollButtons:{enable:!0},setHeight:r,theme:"3d",scrollbarPosition:"inside",scrollInertia:500,mouseWheelPixels:60}),0!=t&&jQuery("#custom-scroll-menu").mCustomScrollbar("scrollTo",t+"px",{scrollInertia:0})}function L(){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")),""!=g&&(e("#js-tree-menu a.jstree-clicked").length>0||"-1"==v)){if(e("#media-attachment-taxonomy-filter").length){g=g.split(",");for(var t=0;t<g.length;t++)""!=g[t]&&e(".attachments-browser li[data-id='"+g[t]+"']").remove()}g=""}e("#media-attachment-taxonomy-filter").length?te(0):(e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.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),C=t.taxonomies,Z(),z()}}),e(".folder-loader-ajax").addClass("active"),e("#folder-posts-filter").length?e("#folder-posts-filter").load(h+" #posts-filter",function(){var t={Title:"",Url:h};history.pushState(t,t.Title,t.Url),"show"!=folders_media_options.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>'),triggerInlineUpdate()}):e("#wpbody").load(h+" #wpbody-content",!1,function(t){var o={Title:"",Url:h};history.pushState(o,o.Title,o.Url),"show"!=folders_media_options.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>')}))}function Z(){if(e("#media-attachment-taxonomy-filter").length&&(e("#media-attachment-taxonomy-filter").each(function(){folders_media_options.terms=C;var t=e(this);currentDDVal=e(this).val(),t.html("<option value='all'>All Folders</option><option value='unassigned'>(Unassigned)</option>"),C;for(var o=0;o<C.length;o++)t.append("<option value='"+C[o].term_id+"'>"+C[o].name+" ("+C[o].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 o=0;o<C.length;o++)e("select.folder_for_media option:last-child").before("<option value='"+C[o].term_id+"'>"+C[o].name+"</option>");""!=t&&e(".folder_for_media").val(t)}for(e("span.premio-folder-count").text(""),e(".folder-count").text(""),o=0;o<C.length;o++)0!=parseInt(C[o].trash_count)&&(e(".jstree-node[id='"+C[o].term_id+"'] > a.jstree-anchor span.premio-folder-count").text(C[o].trash_count),e(".sticky-folder-"+C[o].term_id+" .premio-folder-count").text(C[o].trash_count));""!=v&&e("#wcp_folder_"+v).addClass("active-item"),y&&(e("#title_"+c).trigger("click"),y=!1)}function K(){var t=e.trim(e("#folder-search").val());e("#js-tree-menu").jstree("search",t)}function W(t){var o="Are you sure you want to delete the selected folder?",a="Items in the folder will not be deleted.";if(j=!1,1==t&&e("#menu-checkbox").is(":checked")){if(j=!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&&(o="Are you sure you want to delete the selected folders?",a="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(o),e("#remove-folder-notice").text(a),e("#confirm-remove-folder").show(),e("#remove-folder-item").focus()}function G(){folderName=e.trim(e("#js-tree-menu").jstree(!0).get_node(c).text),parentID=e("#wcp_folder_"+c).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 $(){if(0==u&&p>=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 new folder"),e("#save-folder-data").text("Submit"),e(".folder-form-errors").removeClass("active"),e("#add-update-folder-name").val(""),k&&(w=c,e("#add-update-folder-name").val(e.trim(e("#js-tree-menu").jstree(!0).get_node(c).text)+" #2"),c=e("#"+c+"_anchor").closest(".jstree-node").parent().parent().hasClass("jstree-node")?e("#"+c+"_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 ee(){setTimeout(function(){if(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),z()}function te(o){F=e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_get_default_list&active_id="+v,method:"post",beforeSend:function(){null!=F&&F.abort()},success:function(a){if(a=e.parseJSON(a),e(".header-posts .total-count").text(a.total_items),e(".un-categorised-items .total-count").text(a.empty_items),selectedVal=e("#media-attachment-taxonomy-filter").val(),"all"!=selectedVal&&1==o){var s=parent.wp;s.media!=t&&(s.media.frame.setState("insert"),null!==s.media.frame.content.get()&&void 0!==s.media.frame.content.get().collection?(s.media.frame.content.get().collection.props.set({ignore:+new Date}),s.media.frame.content.get().options.selection.reset()):s.media.frame.library.props.set({ignore:+new Date}))}C=a.taxonomies,Z(),z()}})}function oe(){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),z()}e(document).ready(function(){e(document).on("click",".folder-settings-btn > a",function(t){t.stopPropagation(),e(".folder-settings-btn").toggleClass("active")}),e(document).on("click","body,html",function(){e(".folder-settings-btn").removeClass("active")}),e(document).on("click",".folder-setting-menu",function(e){e.stopPropagation()}),e(document).on("click","#remove-from-all-folders:not(.disabled), #remove-from-current-folder:not(.disabled)",function(){e("#remove-from-all-folders, #remove-from-current-folder").addClass("disabled");var t="all";e(this).hasClass("remove-from-current-folder")&&(t="current"),e("#confirm-your-change").hide(),e.ajax({url:folders_media_options.ajax_url,data:{post_id:e("#unassigned_folders").val(),action:"wcp_remove_post_folder",active_folder:v,type:folders_media_options.post_type,folder_id:-1,nonce:folders_media_options.nonce,status:folders_media_options.taxonomy_status,taxonomy:v,remove_from:t},method:"post",success:function(t){e("#remove-from-all-folders, #remove-from-current-folder").removeClass("disabled"),oe(),L(),M()}})}),o=parseInt(folders_media_options.hasStars),a=parseInt(folders_media_options.hasChildren),e(document).on("click",".thumbnail-hover-box a",function(t){return t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault(),window.open(e(this).prop("href"),"_blank"),!1}),e(document).ajaxComplete(function(e,o,a){if(a.data!=t&&""!=a.data&&-1!=a.data.indexOf("action=query-attachments")&&z(),s.length>0)for(var r=0;r<s.length;r++)if(jQuery(".folder-modal ul.attachments li[data-id='"+s[r]+"']").length&&!jQuery(".folder-modal ul.attachments li[data-id='"+s[r]+"']").hasClass("selected")){var d=jQuery.Event("click");d.ctrlKey=!0,jQuery(".folder-modal ul.attachments li[data-id='"+s[r]+"']").trigger(d)}}),C=folders_media_options.terms,u=parseInt(folders_media_options.is_key_active),p=parseInt(folders_media_options.folders),d=folders_media_options.folder_settings,e(document).on("click",".header-posts a.all-posts",function(t){c=0,v="",l="all",e(".active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e(this).addClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("all").trigger("change"),e(this).closest(".media-frame").find(".folder_for_media").val("all").trigger("change"),V()}),e(document).on("click",".un-categorised-items",function(t){c=0,v="",l="unassigned",e(".active-item").removeClass("active-item"),e(".sticky-folders .active-item").removeClass("active-item"),e(".jstree-clicked").removeClass("jstree-clicked"),e(this).addClass("active-item"),e(this).closest(".media-frame").find("#media-attachment-taxonomy-filter").val("unassigned").trigger("change"),e(this).closest(".media-frame").find(".folder_for_media").val("-1").trigger("change"),V()}),e(document).on("click","a.jstree-anchor",function(t){var o,a=e(this).closest("li.jstree-node").attr("id");l=c=a,e(this).closest(".folder-modal").find(".active-item").removeClass("active-item"),e(this).closest(".folder-modal").find("#media-attachment-taxonomy-filter").val(a),e(this).closest(".folder-modal").find("#media-attachment-taxonomy-filter").trigger("change"),thisSlug=E(a,"slug"),o=thisSlug,e.ajax({url:folders_media_options.ajax_url,type:"post",data:"action=save_folder_last_status&post_type="+folders_media_options.post_type+"&post_id="+o+"&nonce="+folders_media_options.nonce,cache:!1,async:!1,success:function(){}}),e(".custom-media-select").removeClass("active"),V()}),e(document).on("change",".folder_for_media",function(){"add-folder"!=e(this).val()&&null!=e(this).val()?l=e(this).val():"add-folder"==e(this).val()&&(l=-1)}),e(document).on("click",".new-folder-pro",function(t){t.preventDefault(),e(".dynamic-menu").remove(),e("#sub-folder-popup").show()}),e(document).on("click",".close-popup-button a",function(){e(".folder-popup-form").hide()}),e(document).on("click",".update-inline-record",function(s){var r;(s.stopImmediatePropagation(),s.stopPropagation(),0!=folders_media_options.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>",menuHtml+="<li class='new-main-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Folder</a></li>",menuHtml+=a?"<li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Folder</a></li>":"<li class='new-folder-pro'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Sub-folder (Pro)</a></li>",menuHtml+="<li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span>Rename</a></li><li class='default-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-active-icon'></i></span>Open this folder by default (Pro)</a></li><li class='sticky-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li>",menuHtml+=o?"<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='mark-folder-pro'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?"Remove Star (Pro)":"Add a Star (Pro)")+"</a></li>",menuHtml+="<li class='lock-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='dashicons dashicons-lock'></span>Lock Folder (Pro)</a></li><li class='duplicate-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-clone'></i></span>Duplicate folder (Pro)</a></li>",hasPosts=parseInt(e(this).closest("li.jstree-node").find("h3.title:first > .total-count").text()),"attachment"==folders_media_options.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+folders_media_options.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",S),e(".dynamic-menu").css("top",I-10),r=I):(e(".dynamic-menu").css("left",s.pageX),e(".dynamic-menu").css("top",s.pageY),r=s.pageY),r+e(".dynamic-menu").height()>e(window).height()&&e(".dynamic-menu").css("margin-top",e(window).height()-(r+e(".dynamic-menu").height())))}),e(document).on("click","body, html",function(t){e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e(".folder-order").removeClass("active")}),e(document).on("click",".dynamic-menu, .folder-order",function(e){e.stopPropagation()}),e(document).on("contextmenu",".jstree-anchor",function(t){return S=t.pageX,I=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 r;(s.stopImmediatePropagation(),s.stopPropagation(),0!=folders_media_options.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>",menuHtml+="<li class='new-main-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Folder</a></li>",menuHtml+=a?"<li class='new-folder'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Folder</a></li>":"<li class='new-folder-pro'><a href='javascript:;'><span class=''><i class='pfolder-add-folder'></i></span>New Sub-folder (Pro)</a></li>",menuHtml+="<li class='rename-folder'><a href='javascript:;'><span class=''><i class='pfolder-edit'></i></span>Rename</a></li><li class='default-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-active-icon'></i></span>Open this folder by default (Pro)</a></li><li class='sticky-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='sticky-pin'><i class='pfolder-pin'></i></span>Sticky Folder (Pro)</a></li>",menuHtml+=o?"<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='mark-folder-pro'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-star'></i></span>"+(isHigh?"Remove Star (Pro)":"Add a Star (Pro)")+"</a></li>",menuHtml+="<li class='lock-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class='dashicons dashicons-lock'></span>Lock Folder (Pro)</a></li><li class='duplicate-folder'><a target='_blank' href='"+folders_media_options.upgrade_url+"'><span class=''><i class='pfolder-clone'></i></span>Duplicate folder (Pro)</a></li>",hasPosts=parseInt(e(this).closest("a.jstree-anchor").find(".premio-folder-count").text()),"attachment"==folders_media_options.post_type&&hasPosts&&(menuHtml+="<li class='download-folder'><a target='_blank' href='"+folders_media_options.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),e(this).parents("li.jstree-node").addClass("active-menu"),s.pageX==t||s.pageY==t?(e(".dynamic-menu").css("left",S),e(".dynamic-menu").css("top",I-10),r=I):(e(".dynamic-menu").css("left",s.pageX),e(".dynamic-menu").css("top",s.pageY),r=s.pageY),r+e(".dynamic-menu").height()>e(window).height()&&e(".dynamic-menu").css("margin-top",e(window).height()-(r+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(document).on("click",".new-folder",function(t){t.stopPropagation(),c=e(this).closest(".dynamic-menu").data("id"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),y=!1,k=!1,$()}),e(document).on("click",".new-main-folder",function(){b=1,c=e(this).closest(".dynamic-menu").data("id"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),y=!1,k=!1,$()}),e(document).on("click","#add-new-folder",function(t){e("#js-tree-menu a.jstree-clicked").length?(c=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),a||e("#pro-notice").removeClass("hide-it")):(c=0,e("#pro-notice").addClass("hide-it")),y=!1,$()}),e(document).on("submit","#save-folder-form",function(t){if(t.stopPropagation(),t.preventDefault(),m=e("#add-update-folder-name").val(),""==e.trim(m))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 o=c;y&&(o=0),a||(o=0);var s="";0==o?(x=e("#js-tree-menu > ul > li.jstree-node").length,b&&(x=jQuery("#js-tree-menu > ul > li[id='"+c+"']").index(),jQuery("#js-tree-menu > ul > li").each(function(e){s+=jQuery(this).attr("id")+",",e==x&&(s+="#,")}),x+=1)):x=e("#js-tree-menu > ul > li.jstree-node[id='"+o+"'] > ul.jstree-children > li").length+1,e.ajax({url:folders_media_options.ajax_url,data:{parent_id:o,type:folders_media_options.post_type,action:"wcp_add_new_folder",nonce:folders_media_options.nonce,term_id:o,order:x,name:m,is_duplicate:k,duplicate_from:w,parent_ids:s,parent_menu:b},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(u=parseInt(result.is_key_active),p=parseInt(result.folders),e("#current-folder").text(p),e("#ttl-fldr").text(10),ee(),result.data.length)for(var o=0;o<result.data.length;o++){var a={folder_id:result.data[o].term_id,folder_count:0,is_sticky:result.data[o].is_sticky,is_high:result.data[o].is_high,nonce:result.data[o].nonce,slug:result.data[o].slug,is_deleted:0};d.push(a),b?e("#js-tree-menu").jstree().create_node("#",{id:result.data[o].term_id,text:" "+result.data[o].title},x,function(){e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-nonce",result.data[o].nonce),e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-slug",result.data[o].slug)}):e("#js-tree-menu").jstree().create_node(result.parent_id,{id:result.data[o].term_id,text:" "+result.data[o].title},"last",function(){e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-nonce",result.data[o].nonce),e(".jstree-node[id='"+result.data[o].term_id+"']").attr("data-slug",result.data[o].slug)}),b=0}oe(),q(),c=result.term_id,te(0)}else e("#error-folder-popup-message").html(result.message),e("#error-folder-popup").show()}})}return!1}),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()}),document.onkeydown=function(t){("key"in(t=t||window.event)?"Escape"===t.key||"Esc"===t.key:27===t.keyCode)&&e(".folder-popup-form").hide()},e(document).on("click",".rename-folder",function(t){t.stopPropagation(),c=e(this).closest(".dynamic-menu").data("id"),G(),e(".dynamic-menu").remove()}),e(document).on("click","#inline-update",function(t){e("#js-tree-menu a.jstree-clicked").length&&(c=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),G())}),e(document).on("submit","#update-folder-form",function(o){return o.stopPropagation(),o.preventDefault(),m=e("#update-folder-item-name").val(),""==e.trim(m)?(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"),f=E(c,"nonce"),parentID=e(".jstree-node[id='"+c+"']").closest("li.jstree-node").attr("id"),parentID==t&&(parentID=0),e.ajax({url:folders_media_options.ajax_url,data:{parent_id:parentID,type:folders_media_options.post_type,action:"wcp_update_folder",nonce:f,term_id:c,order:x,name:m},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=R(result.id),null!=folderPostId&&(d[folderPostId].nonce=result.nonce,d[folderPostId].slug=result.slug),e(".folder-popup-form").hide(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),oe(),e("#media-attachment-taxonomy-filter").length&&te(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).on("click",".mark-folder",function(t){t.stopPropagation(),n=e(this).closest(".dynamic-menu").data("id"),f=E(n,"nonce"),e(".form-loader-count").css("width","100%"),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu"),e.ajax({url:folders_media_options.ajax_url,data:"term_id="+n+"&type="+folders_media_options.post_type+"&action=wcp_mark_un_mark_folder&nonce="+f,method:"post",cache:!1,success:function(t){t=e.parseJSON(t),e(".form-loader-count").css("width","0%"),"1"==t.status?(folderPostId=R(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&&(d[folderPostId].is_high=1)):(e("li.jstree-node[id='"+t.id+"']").removeClass("is-high"),e(".sticky-folder-"+t.id).removeClass("is-high"),null!=folderPostId&&(d[folderPostId].is_high=0)),oe()):(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).on("click",".duplicate-folder",function(t){t.stopPropagation(),c=e(this).closest(".dynamic-menu").data("id"),e(".dynamic-menu").remove(),y=!1,k=!0,$()}),e(document).on("click",".remove-folder",function(){n=e(this).closest(".dynamic-menu").data("id"),c=e(this).closest(".dynamic-menu").data("id"),W(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>'),f=E(c,"nonce"),j?function(){if(e("#menu-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:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_muliple_folder&term_id="+t+"&nonce="+folders_media_options.nonce,method:"post",success:function(t){if(t=e.parseJSON(t),e(".form-loader-count").css("width","0px"),"1"==t.status){for(u=parseInt(t.is_key_active),p=parseInt(t.folders),e("#current-folder").text(p),i=0;i<t.term_ids.length;i++)e(".folder-modal #js-tree-menu").jstree().delete_node(t.term_ids[i]);e("#ttl-fldr").text(10),oe(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),L(),q(),oe(),e(".folder-modal #wcp_folder_"+v).length||(e(".header-posts a").trigger("click"),v=0)}else window.location.reload();e("#menu-checkbox").attr("checked",!1),e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox")}})}}():e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_remove_folder&term_id="+c+"&nonce="+f,method:"post",success:function(t){"1"==(t=e.parseJSON(t)).status?(e("#js-tree-menu").jstree().delete_node(c),u=parseInt(t.is_key_active),p=parseInt(t.folders),e("#current-folder").text(p),e("#ttl-fldr").text(10),e(".sticky-folders .sticky-folder-"+c).remove(),oe(),e(".folder-popup-form").hide(),e(".folder-popup-form").removeClass("disabled"),L(),q(),v==c&&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).on("click","#sort-order-list",function(t){t.stopPropagation(),e(".folder-order").toggleClass("active")}),e(document).on("click","#expand-collapse-list",function(t){t.stopPropagation();var o=0;e(this).hasClass("all-open")?(e(this).removeClass("all-open"),o=0,e(this).attr("data-folder-tooltip","Expand"),e("#js-tree-menu").jstree("close_all")):(e(this).addClass("all-open"),o=1,e(this).attr("data-folder-tooltip","Collapse"),e("#js-tree-menu").jstree("open_all")),g="",e("#js-tree-menu .jstree-node:not(.jstree-leaf)").each(function(){g+=e(this).attr("id")+","}),""!=g&&(e(".form-loader-count").css("width","100%"),f=folders_media_options.nonce,e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_change_all_status&status="+o+"&folders="+g+"&nonce="+f,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))}}))}),e(document).on("click",".folder-sort-menu a:not(.pro-feature)",function(t){t.stopPropagation(),t.preventDefault(),e(".form-loader-count").css("width","100%"),e(".folder-order").removeClass("active"),e(this).attr("data-sort"),e.ajax({url:folders_media_options.ajax_url,data:"type="+folders_media_options.post_type+"&action=wcp_folders_by_order&nonce="+folders_media_options.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),C=t.terms,Z(),Y()),e(".form-loader-count").css("width","0")}})}),e(document).on("change","#media-attachment-taxonomy-filter",function(t){e("#js-tree-menu").hasClass("jstree")&&e("#js-tree-menu").jstree(!0).deselect_all(),e(".active-item").removeClass("active-item"),"all"==e(this).val()?e(".all-posts").addClass("active-item"):"unassigned"==e(this).val()?e(".un-categorised-items").addClass("active-item"):e("#js-tree-menu").jstree("select_node",e(this).val())}),e(document).on("click",".jstree-node .jstree-icon",function(){n=e(this).closest("li.jstree-node").attr("id"),e("li.jstree-node[id='"+n+"']").hasClass("jstree-open")?folderStatus=1:folderStatus=0,e(".form-loader-count").css("width","100%"),f=E(n,"nonce"),ee(),e.ajax({url:folders_media_options.ajax_url,data:"is_active="+folderStatus+"&action=save_wcp_folder_state&term_id="+n+"&nonce="+f,method:"post",success:function(t){e(".form-loader-count").css("width","0"),"0"==(t=e.parseJSON(t)).status||(e("#wcp_folder_"+n).hasClass("active")?(e("#wcp_folder_"+n).removeClass("active"),e("#wcp_folder_"+n).find("ul.ui-sortable:first-child > li").slideUp(),folderStatus=0):(e("#wcp_folder_"+n).addClass("active"),e("#wcp_folder_"+n).find("ul.ui-sortable:first-child > li").slideDown(),folderStatus=1),oe())}})}),e(document).on("keyup","#folder-search",function(){K()}),e(document).on("change","#folder-search",function(){K()}),e(document).on("blur","#folder-search",function(){K()}),e(document).on("click","#do_not_show_again",function(){var t=e(this).is(":checked")?1:0;e.ajax({url:folders_media_options.ajax_url,type:"post",data:{action:"premio_hide_child_popup",status:t,nonce:folders_media_options.nonce,post_type:folders_media_options.post_type}})}),e(document).on("click","#menu-checkbox",function(){e(this).is(":checked")?(e("#js-tree-menu").addClass("show-folder-checkbox"),e("#menu-checkbox").prop("checked",!0)):(e("#js-tree-menu input.checkbox").attr("checked",!1),e("#js-tree-menu").removeClass("show-folder-checkbox"),e("#menu-checkbox").prop("checked",!1))}),e(document).on("click","#menu-checkbox",function(){e(this).is(":checked")?(e("#menu-checkbox").prop("checked",!0),e("#js-tree-menu").addClass("show-folder-checkbox")):(e("#menu-checkbox").prop("checked",!1),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","#inline-remove, .delete-folder-action:not(.disabled)",function(){e("#js-tree-menu a.jstree-clicked").length?(c=e("#js-tree-menu a.jstree-clicked").closest("li.jstree-node").attr("id"),W(1),e(".dynamic-menu").remove(),e(".active-menu").removeClass("active-menu")):e("#menu-checkbox").is(":checked")&&(e(".dynamic-menu").remove(),W(1))}),e(document).on("change",".folder_for_media",function(){"add-folder"==e(this).val()&&(y=!0,e("#add-new-folder").trigger("click"))}),e(document).on("click","#js-tree-menu input.checkbox",function(){V()}),z(),e(document).on("click",".undo-button, .undo-folder-action:not(.disabled)",function(){e("#do-undo").removeClass("active"),"yes"==folders_media_options.useFolderUndo&&e.ajax({url:folders_media_options.ajax_url,type:"post",data:{post_type:folders_media_options.post_type,nonce:folders_media_options.nonce,action:"wcp_undo_folder_changes"},success:function(o){if(e("#undo-done").addClass("active"),setTimeout(function(){e("#undo-done").removeClass("active")},2500),e("#media-attachment-taxonomy-filter").length){var a=parent.wp;a.media!=t&&(a.media.frame.setState("insert"),null!==a.media.frame.content.get()&&void 0!==a.media.frame.content.get().collection?(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}))}L()}})}),e(document).on("click",".close-undo-box",function(t){t.preventDefault(),e("#do-undo").removeClass("active")})})});
|
folders.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Folders
|
4 |
* Description: Organize your Media library, Pages, and Posts into folders. You can easily drag and drop items into directories and change the folders tree view.
|
5 |
-
* Version: 2.7.
|
6 |
* Author: Premio
|
7 |
* Author URI: https://premio.io/downloads/folders/
|
8 |
* Text Domain: folders
|
@@ -24,7 +24,7 @@ if(!defined("WCP_FOLDER_URL")) {
|
|
24 |
define('WCP_FOLDER_URL', plugin_dir_url(__FILE__));
|
25 |
}
|
26 |
if(!defined("WCP_FOLDER_VERSION")) {
|
27 |
-
define('WCP_FOLDER_VERSION', "2.7.
|
28 |
}
|
29 |
|
30 |
|
@@ -98,15 +98,15 @@ if(!function_exists("folders_clear_all_caches")) {
|
|
98 |
}
|
99 |
}
|
100 |
|
101 |
-
if(is_admin()) {
|
102 |
-
include_once plugin_dir_path(__FILE__) . "includes/plugins.class.php";
|
103 |
-
include_once plugin_dir_path(__FILE__) . "includes/media.replace.php";
|
104 |
-
include_once plugin_dir_path(__FILE__) . "includes/folders.class.php";
|
105 |
-
register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
|
106 |
-
register_deactivation_hook( __FILE__, array( 'WCP_Folders', 'deactivate' ) );
|
107 |
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
/* Affiliate Class*/
|
112 |
if(is_admin()) {
|
2 |
/**
|
3 |
* Plugin Name: Folders
|
4 |
* Description: Organize your Media library, Pages, and Posts into folders. You can easily drag and drop items into directories and change the folders tree view.
|
5 |
+
* Version: 2.7.4
|
6 |
* Author: Premio
|
7 |
* Author URI: https://premio.io/downloads/folders/
|
8 |
* Text Domain: folders
|
24 |
define('WCP_FOLDER_URL', plugin_dir_url(__FILE__));
|
25 |
}
|
26 |
if(!defined("WCP_FOLDER_VERSION")) {
|
27 |
+
define('WCP_FOLDER_VERSION', "2.7.4");
|
28 |
}
|
29 |
|
30 |
|
98 |
}
|
99 |
}
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
+
include_once plugin_dir_path(__FILE__) . "includes/plugins.class.php";
|
103 |
+
include_once plugin_dir_path(__FILE__) . "includes/media.replace.php";
|
104 |
+
include_once plugin_dir_path(__FILE__) . "includes/folders.class.php";
|
105 |
+
register_activation_hook( __FILE__, array( 'WCP_Folders', 'activate' ) );
|
106 |
+
register_deactivation_hook( __FILE__, array( 'WCP_Folders', 'deactivate' ) );
|
107 |
+
|
108 |
+
WCP_Folders::get_instance();
|
109 |
+
|
110 |
|
111 |
/* Affiliate Class*/
|
112 |
if(is_admin()) {
|
includes/folders.class.php
CHANGED
@@ -410,78 +410,93 @@ class WCP_Folders
|
|
410 |
}
|
411 |
|
412 |
public function get_terms_filter_without_trash($terms, $taxonomies, $args) {
|
413 |
-
global $wpdb;
|
414 |
-
if ( ! is_array($terms) && count($terms) < 1 ) {
|
415 |
-
return $terms;
|
416 |
-
}
|
417 |
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
foreach ($options as $option) {
|
430 |
-
$option_array[] = self::get_custom_post_type($option);
|
431 |
-
}
|
432 |
-
}
|
433 |
-
foreach ($terms as $key=>$term ) {
|
434 |
-
if(isset($term->term_taxonomy_id) && isset($term->taxonomy) && !empty($term->taxonomy) && in_array($term->taxonomy, $option_array)) {
|
435 |
-
$trash_count = null;
|
436 |
-
if(isset($trash_folders[$term->term_taxonomy_id])) {
|
437 |
-
$trash_count = $trash_folders[$term->term_taxonomy_id];
|
438 |
-
} else {
|
439 |
-
if (has_filter("premio_folder_item_in_taxonomy")) {
|
440 |
-
$post_type = "";
|
441 |
-
$taxonomy = $term->taxonomy;
|
442 |
-
|
443 |
-
if ($taxonomy == "post_folder") {
|
444 |
-
$post_type = "post";
|
445 |
-
} else if ($taxonomy == "folder") {
|
446 |
-
$post_type = "page";
|
447 |
-
} else if ($taxonomy == "media_folder") {
|
448 |
-
$post_type = "attachment";
|
449 |
-
} else {
|
450 |
-
$post_type = trim($taxonomy, "'_folder'");
|
451 |
-
}
|
452 |
-
$arg = array(
|
453 |
-
'post_type' => $post_type,
|
454 |
-
'taxonomy' => $taxonomy,
|
455 |
-
);
|
456 |
-
$trash_count = apply_filters("premio_folder_item_in_taxonomy", $term->term_id, $arg);
|
457 |
-
}
|
458 |
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
WHERE rl.term_taxonomy_id = '{$term->term_taxonomy_id}' AND p.post_status != 'trash' LIMIT 1";
|
465 |
-
$result = $wpdb->get_var($query);
|
466 |
-
if (intval($result) > 0) {
|
467 |
-
$trash_count = intval($result);
|
468 |
-
} else {
|
469 |
-
$trash_count = 0;
|
470 |
-
}
|
471 |
-
}
|
472 |
-
}
|
473 |
-
if($trash_count === null) {
|
474 |
-
$trash_count = 0;
|
475 |
-
}
|
476 |
-
$terms[$key]->trash_count = $trash_count;
|
477 |
-
$trash_folders[$term->term_taxonomy_id] = $trash_count;
|
478 |
-
}
|
479 |
-
}
|
480 |
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
return $terms;
|
486 |
}
|
487 |
|
@@ -1179,7 +1194,7 @@ class WCP_Folders
|
|
1179 |
return;
|
1180 |
}
|
1181 |
|
1182 |
-
if (
|
1183 |
/* Free/Pro URL Change */
|
1184 |
global $typenow;
|
1185 |
$is_active = 1;
|
@@ -4688,19 +4703,27 @@ class WCP_Folders
|
|
4688 |
|
4689 |
public function set_default_values_if_not_exists()
|
4690 |
{
|
4691 |
-
|
4692 |
-
|
4693 |
-
|
4694 |
-
$
|
4695 |
-
|
4696 |
-
|
4697 |
-
|
4698 |
-
|
4699 |
-
|
4700 |
-
|
4701 |
-
|
4702 |
-
|
4703 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4704 |
}
|
4705 |
}
|
4706 |
}
|
410 |
}
|
411 |
|
412 |
public function get_terms_filter_without_trash($terms, $taxonomies, $args) {
|
|
|
|
|
|
|
|
|
413 |
|
414 |
+
$isForFolders = 0;
|
415 |
+
foreach ($taxonomies as $taxonomy) {
|
416 |
+
if(in_array($taxonomy, array("media_folder", "folder", "post_folder"))) {
|
417 |
+
$isForFolders = 1;
|
418 |
+
} else {
|
419 |
+
$folder = substr($taxonomy, -7);
|
420 |
+
if($folder == "_folder") {
|
421 |
+
$isForFolders = 1;
|
422 |
+
}
|
423 |
+
}
|
424 |
+
}
|
425 |
|
426 |
+
if($isForFolders) {
|
427 |
+
global $wpdb;
|
428 |
+
if (!is_array($terms) && count($terms) < 1) {
|
429 |
+
return $terms;
|
430 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
|
432 |
+
$trash_folders = $initial_trash_folders = get_transient("premio_folders_without_trash");
|
433 |
+
if ($trash_folders === false) {
|
434 |
+
$trash_folders = array();
|
435 |
+
$initial_trash_folders = array();
|
436 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
|
438 |
+
$post_table = $wpdb->prefix . "posts";
|
439 |
+
$term_table = $wpdb->prefix . "term_relationships";
|
440 |
+
$options = get_option('folders_settings');
|
441 |
+
$option_array = array();
|
442 |
+
if (!empty($options)) {
|
443 |
+
foreach ($options as $option) {
|
444 |
+
$option_array[] = self::get_custom_post_type($option);
|
445 |
+
}
|
446 |
+
}
|
447 |
+
foreach ($terms as $key => $term) {
|
448 |
+
if (isset($term->term_taxonomy_id) && isset($term->taxonomy) && !empty($term->taxonomy) && in_array($term->taxonomy, $option_array)) {
|
449 |
+
$trash_count = null;
|
450 |
+
if (isset($trash_folders[$term->term_taxonomy_id])) {
|
451 |
+
$trash_count = $trash_folders[$term->term_taxonomy_id];
|
452 |
+
} else {
|
453 |
+
if (has_filter("premio_folder_item_in_taxonomy")) {
|
454 |
+
$post_type = "";
|
455 |
+
$taxonomy = $term->taxonomy;
|
456 |
+
|
457 |
+
if ($taxonomy == "post_folder") {
|
458 |
+
$post_type = "post";
|
459 |
+
} else if ($taxonomy == "folder") {
|
460 |
+
$post_type = "page";
|
461 |
+
} else if ($taxonomy == "media_folder") {
|
462 |
+
$post_type = "attachment";
|
463 |
+
} else {
|
464 |
+
$post_type = trim($taxonomy, "'_folder'");
|
465 |
+
}
|
466 |
+
$arg = array(
|
467 |
+
'post_type' => $post_type,
|
468 |
+
'taxonomy' => $taxonomy,
|
469 |
+
);
|
470 |
+
$trash_count = apply_filters("premio_folder_item_in_taxonomy", $term->term_id, $arg);
|
471 |
+
}
|
472 |
+
|
473 |
+
if ($trash_count === null) {
|
474 |
+
//$result = $wpdb->get_var("SELECT COUNT(*) FROM {$post_table} p JOIN {$term_table} rl ON p.ID = rl.object_id WHERE rl.term_taxonomy_id = '{$term->term_taxonomy_id}' AND p.post_status != 'trash' LIMIT 1");
|
475 |
+
$query = "SELECT COUNT(DISTINCT(p.ID))
|
476 |
+
FROM {$post_table} p
|
477 |
+
JOIN {$term_table} rl ON p.ID = rl.object_id
|
478 |
+
WHERE rl.term_taxonomy_id = '{$term->term_taxonomy_id}' AND p.post_status != 'trash' LIMIT 1";
|
479 |
+
$result = $wpdb->get_var($query);
|
480 |
+
if (intval($result) > 0) {
|
481 |
+
$trash_count = intval($result);
|
482 |
+
} else {
|
483 |
+
$trash_count = 0;
|
484 |
+
}
|
485 |
+
}
|
486 |
+
}
|
487 |
+
if ($trash_count === null) {
|
488 |
+
$trash_count = 0;
|
489 |
+
}
|
490 |
+
$terms[$key]->trash_count = $trash_count;
|
491 |
+
$trash_folders[$term->term_taxonomy_id] = $trash_count;
|
492 |
+
}
|
493 |
+
}
|
494 |
+
|
495 |
+
if (!empty($terms) && $initial_trash_folders != $trash_folders) {
|
496 |
+
delete_transient("premio_folders_without_trash");
|
497 |
+
set_transient("premio_folders_without_trash", $trash_folders, 3 * DAY_IN_SECONDS);
|
498 |
+
}
|
499 |
+
}
|
500 |
return $terms;
|
501 |
}
|
502 |
|
1194 |
return;
|
1195 |
}
|
1196 |
|
1197 |
+
if ($typenow == "attachment") {
|
1198 |
/* Free/Pro URL Change */
|
1199 |
global $typenow;
|
1200 |
$is_active = 1;
|
4703 |
|
4704 |
public function set_default_values_if_not_exists()
|
4705 |
{
|
4706 |
+
if(is_admin() || (defined('DOING_AJAX') && DOING_AJAX)) {
|
4707 |
+
$options = get_option('folders_settings');
|
4708 |
+
$options = empty($options) || !is_array($options) ? array() : $options;
|
4709 |
+
foreach ($options as $option) {
|
4710 |
+
$post_type = self::get_custom_post_type($option);
|
4711 |
+
$terms = get_terms($post_type, array(
|
4712 |
+
'hide_empty' => false,
|
4713 |
+
'meta_query' => array(
|
4714 |
+
array(
|
4715 |
+
'key' => 'wcp_custom_order',
|
4716 |
+
'compare' => 'NOT EXISTS'
|
4717 |
+
)
|
4718 |
+
)
|
4719 |
+
)
|
4720 |
+
);
|
4721 |
+
if (!empty($terms)) {
|
4722 |
+
foreach ($terms as $term) {
|
4723 |
+
$order = get_term_meta($term->term_id, "wcp_custom_order", true);
|
4724 |
+
if (empty($order) || $order == null) {
|
4725 |
+
update_term_meta($term->term_id, "wcp_custom_order", "1");
|
4726 |
+
}
|
4727 |
}
|
4728 |
}
|
4729 |
}
|
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.8
|
6 |
-
Stable tag: 2.7.
|
7 |
Plugin URI: https://premio.io/downloads/folders/
|
8 |
|
9 |
Folders is a WordPress plugin that will help you quickly create unlimited folders and organize and manage your Media Library files, Pages & Posts in folders
|
@@ -196,6 +196,9 @@ A live demo for the Folders plugin is available at <a href="https://demo.premio.
|
|
196 |
|
197 |
== Changelog ==
|
198 |
|
|
|
|
|
|
|
199 |
= 2.7.3 =
|
200 |
Performance improvements
|
201 |
|
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.8
|
6 |
+
Stable tag: 2.7.4
|
7 |
Plugin URI: https://premio.io/downloads/folders/
|
8 |
|
9 |
Folders is a WordPress plugin that will help you quickly create unlimited folders and organize and manage your Media Library files, Pages & Posts in folders
|
196 |
|
197 |
== Changelog ==
|
198 |
|
199 |
+
= 2.7.4 =
|
200 |
+
Divi bug fixed
|
201 |
+
|
202 |
= 2.7.3 =
|
203 |
Performance improvements
|
204 |
|
templates/admin/general-settings.php
CHANGED
@@ -451,6 +451,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
451 |
$customize_folders = get_option('customize_folders');
|
452 |
$default_folders = (empty($default_folders) || !is_array($default_folders))?array():$default_folders;
|
453 |
do_settings_sections( __FILE__ );
|
|
|
454 |
?>
|
455 |
<?php if(isset($_GET['note']) && $_GET['note'] == 1) { ?>
|
456 |
<div class="folder-notification notice notice-success is-dismissible">
|
451 |
$customize_folders = get_option('customize_folders');
|
452 |
$default_folders = (empty($default_folders) || !is_array($default_folders))?array():$default_folders;
|
453 |
do_settings_sections( __FILE__ );
|
454 |
+
delete_transient("premio_folders_without_trash");
|
455 |
?>
|
456 |
<?php if(isset($_GET['note']) && $_GET['note'] == 1) { ?>
|
457 |
<div class="folder-notification notice notice-success is-dismissible">
|