diff --git a/assets/css/gathercontent-importer.min.css b/assets/css/gathercontent-importer.min.css index c61ef85d..2e3d9bf2 100644 --- a/assets/css/gathercontent-importer.min.css +++ b/assets/css/gathercontent-importer.min.css @@ -1 +1 @@ -#gc-related-data,.gc-bb-modal .gc-bb-modal-content,.gc-logo-column,.gc-modal-open,.gc-profile,.ir{overflow:hidden}.gc-avatar{border-radius:50px;display:block;float:left;height:50px;margin-right:10px;vertical-align:middle;width:50px}.gc-hello{margin:5px 0}.gc-profile{padding:1em}.platform-url-wrap{position:relative;display:inline-block}.platform-url-help{position:absolute;top:0;right:6px;line-height:2em}.platform-url-help.gc-domain-prefix{left:6px;right:0;width:35px}#platform_url_slug{padding-right:138px;padding-left:55px}.gc-refresh-connection.button{width:2em;font-size:2em;display:inline-block;vertical-align:bottom}.form-table td .gc-submit-top{margin-bottom:.5em}.wp-core-ui p .gc-refresh-connection{line-height:1.3;vertical-align:bottom}.gc-logo-column,.gc-template-tab td:nth-child(2){vertical-align:top}.description.gc-radio-desc{margin-left:1.5em;margin-bottom:1em}.gc-reveal-items{text-decoration:none;position:relative}.gc-reveal-items.description{display:inline-block;margin-bottom:.5em}.gc-reveal-items:before{display:block;position:absolute;right:-1em;top:-.1em}ul.gc-radio-desc,ul.gc-reveal-items-list{border-top:1px solid #999;margin-top:.5em;padding-top:1em;list-style-type:disc;margin-bottom:1em}ul.gc-radio-desc li,ul.gc-reveal-items-list li{margin-left:2.8em}.gc-nav-tab-wrapper{border-bottom:1px solid #ccc}.gc-template-tab{padding:1em 0}.gc-template-tab h4{margin-top:0}.gc-template-tab table tbody>tr>td:first-child,.gc-template-tab table tbody>tr>th:first-child,.gc-template-tab table thead>tr>td:first-child,.gc-template-tab table thead>tr>th:first-child{width:40%}.gc-template-tab table tbody>tr>td:last-child,.gc-template-tab table tbody>tr>th:last-child,.gc-template-tab table thead>tr>td:last-child,.gc-template-tab table thead>tr>th:last-child{width:60%}.gc-template-tab td{border-bottom:1px solid #ccc;padding:.5em 1em}.gc-template-tab td option[value=wp-type-acf]{display:none}.gc-template-tab .component-table-inner tr.attachment option[data-type=gallery],.gc-template-tab .component-table-inner tr.attachment option[data-type=image],.gc-template-tab .component-table-inner tr.choice_checkbox option[data-type=checkbox],.gc-template-tab .component-table-inner tr.choice_radio option[data-type=radio],.gc-template-tab .component-table-inner tr.text option[data-type=text],.gc-template-tab .component-table-inner tr.text option[data-type=textarea],.gc-template-tab .component-table-inner tr.text option[data-type=wysiwyg],.gc-template-tab td.gc-component option[value=wp-type-acf],.gc-template-tab td.type-repeater option[value=wp-type-acf]{display:block}.gc-template-tab .component-td{padding-left:0;padding-right:0;border:none}.gc-template-tab .component-td-wrapper{border-bottom:1px solid #ccc}.gc-template-tab .component-table-inner td,.gc-template-tab .component-table-wrapper tbody>tr>td{border:none}.gc-template-tab .component-table-wrapper{width:100%}.gc-template-tab .component-table-inner{border-collapse:collapse;width:100%}.gc-template-tab .component-table-inner td:first-child{padding-left:2.5em}.gc-template-tab .component-table-inner tr.repeater option[data-type=text],.gc-template-tab .component-table-inner tr.repeater option[data-type=textarea],.gc-template-tab .component-table-inner tr.repeater option[data-type=wysiwyg]{display:none}.gc-template-tab .component-table-inner tr.repeater option[data-type=repeater]{display:block}.gc-template-tab .ajax-disabled{opacity:.75;pointer-events:none}.gc-disabled .description,.gc-disabled label span{opacity:.5}.nav-tab.alignright{float:right}.mapping-defaults .link-to-mapping-defaults{display:none}.gathercontent-admin .form-table th{font-weight:400;padding:20px 1em}.gathercontent-admin.gc-sync .form-table th{padding:10px}.gathercontent-admin .select2-container,.gathercontent-admin select{width:250px}.gathercontent-admin .wp-field-th{width:60%}.gathercontent-admin .gc-field-th.gc-check-column{width:20px;padding:6px 0 6px 6px;vertical-align:middle}.gc-enabled .gc-status-column{cursor:pointer}.gc-disabled input[type=checkbox]{cursor:default}.gathercontent-admin .select2-results__option,.gathercontent-admin-select2 .select2-results__option{border-bottom:1px solid #eee;margin:0}.gathercontent-admin .select2-results__option .description,.gathercontent-admin-select2 .select2-results__option .description{font-style:italic;opacity:.7;margin-top:.2em}.gc-template-tab ul.gc-reveal-items-list li{margin-left:1.5em;text-transform:capitalize}.gc-loader{margin:0 auto;display:block;float:none}.gc-logo-column,.gc-status-color,.inline-edit-gc-status .gc-status-select2{display:inline-block}.gc-sync-items-descriptions .dashicons-randomize{text-decoration:none}.gc-status-color{width:1.1em;height:1.1em;border-radius:100%;line-height:1.1em;margin-bottom:-2px;float:left;margin-right:5px}.gc-status-color.gc-status-color-white{border:1px solid #b1b1b1}.select2-gc_status .gc-status-color,.select2-post_status_mapping_after .gc-status-color{float:right;margin-right:0}.select2-gc_status.select2-container--default .gc-status-color,.select2-post_status_mapping_after.select2-container--default .gc-status-color{position:relative;top:.4em}.gc-logo-column{width:21px;height:20px;max-width:100%;margin-right:1px}.gc-logo-column img{width:100px;height:auto}.column-gathercontent .gc-status-color{margin-top:2px}#sync-tabs td:nth-child(5),#sync-tabs th:nth-child(5),.gc-sync-progress #gc-items-search{display:none}.inline-edit-gc-status .gc-status-select2 .spinner{visibility:visible}.gc-button-primary,.wp-core-ui .button.gc-button-primary{background-color:#fff;border:1px solid #00ABBD;color:#00ABBD;font-weight:700}.gc-button-primary:hover,.wp-core-ui .button.gc-button-primary:hover{background-color:#00ABBD;border:1px solid #00ABBD;color:#fff}.gc-button-danger,.wp-core-ui .button.gc-button-danger{background-color:#fff;border:1px solid #fc5c54;color:#fc5c54;font-weight:700}.gc-button-danger:hover,.wp-core-ui .button.gc-button-danger:hover{background-color:#fc5c54;border:1px solid #fc5c54;color:#fff}.gc-auth-required .gc-section-auth table{background-color:#f5bfbf}#gc-items-search{float:left}#sync-tabs .tablenav{clear:none}#sync-tabs{margin-bottom:1.5em}#sync-tabs .gc-check-column{width:20px;padding:6px 0 6px 6px;vertical-align:middle}#sync-tabs #gc-edit{width:20px}.gc-sync-progress #progress{padding:0;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.gc-sync-progress table{background:0 0}.gc-progress-bar{position:relative}.gc-progress-bar:before{content:'';background:#dbf4f6;height:38px;display:block;width:100%}.gc-progress-bar-partial{background:#0ab3c4;height:38px;color:#fff;text-align:center;line-height:38px;font-weight:700;margin-top:-38px;transition:width .4s ease-in-out}.gc-progress-bar-partial span{display:block;min-width:3.2em}.gc-sync-table{border-spacing:0;width:100%;clear:both;margin:0}#gc-reload-spinner .gc-loader{padding-left:32px;width:auto;line-height:1.5em}.gc-status-warning{color:orange;font-size:10px;display:none}.gc-status-warning.not-current{display:block}.gc-modal-open #gc-tablenav{margin:0 16px 0 0}.gc-modal-open #gc-items-search{display:block;position:absolute;top:0;left:0;z-index:160001;margin-left:16px}.gc-bb-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000;font-family:sans-serif;font-size:14px}.gc-bb-modal .gc-bb-modal-close{position:absolute;text-decoration:none;top:10px;right:10px;width:30px;height:30px;z-index:1000;transition:color .1s ease-in-out,background .1s ease-in-out;color:#444}.gc-bb-modal .gc-bb-modal-close:focus,.gc-bb-modal .gc-bb-modal-close:hover{color:#2ea2cc}.gc-bb-modal .gc-bb-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;min-height:300px;background:#fff}.gc-bb-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.gc-bb-modal-title h1{padding:16px;line-height:0}.gc-bb-modal-nav-tabs{top:74px}.gc-bb-modal-main{top:105px;padding:16px}.gc-bb-modal-main.has-nav-tabs{top:108px}.text-right{text-align:right}.ir{background-color:transparent;border:0}.ir:before{content:"";display:block;width:0;height:150%}.gc-modal-tabs .hidden{display:none}.gc-modal-tabs .gc-disabled td:not(.gc-item-wp-post-title){opacity:.4}.gc-set-mapping .gc-cloak{position:absolute;top:84px;left:200px;right:0;bottom:0;height:auto;width:auto;background:#fff;opacity:.5;z-index:101}.gc-set-mapping .gc-mapping-metabox{position:absolute;right:16px;bottom:41px;width:270px;z-index:102}.gc-set-mapping .gc-mapping-metabox select{width:250px}#poststuff #gc-manage .inside{margin:0;padding:0}.gc-major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}.gc-publishing-action{text-align:right;float:right;line-height:23px}.gc-publishing-action .button,.gc-publishing-action button.button{margin-left:.5em}#gc-manage .dashicons{color:#82878c}#gc-status-selec2{padding:5px 0}#gc-related-data.gc-mapping-metabox:not(.gc-mapping-started),#gc-related-data.no-js{text-align:center}#gc-related-data .spinner{float:none;margin:.2em}#gc-related-data>p{text-align:center}.misc-pub-post-status .gc-status-color{display:block;margin-top:2px;margin-left:4px}.misc-pub-post-status .gc-status-name{font-weight:600}.gc-status-status.current{color:#49ab00}.gc-status-status.not-current{color:#c12c2f}.gc-no-mapping .spinner{display:none}.gc-no-mapping .spinner.is-active{display:inline-block}.gc-no-mapping .gc-publishing-action{text-align:center;float:none}.gc-no-mapping .gc-publishing-action .button,.gc-no-mapping .gc-publishing-action button.button{margin-left:0}.gc-mapping-started label{margin-bottom:.2em;display:block}.gc-metabox-status{display:inline-block;position:relative} \ No newline at end of file +.gc-avatar{border-radius:50px;display:block;float:left;height:50px;margin-right:10px;vertical-align:middle;width:50px}.gc-hello{margin:5px 0}.gc-profile{padding:1em;overflow:hidden}.platform-url-wrap{position:relative;display:inline-block}.platform-url-help{position:absolute;top:0;right:6px;line-height:2em}.platform-url-help.gc-domain-prefix{left:6px;right:0;width:35px}#platform_url_slug{padding-right:138px;padding-left:55px}.gc-refresh-connection.button{width:2em;font-size:2em;display:inline-block;vertical-align:bottom}.form-table td .gc-submit-top{margin-bottom:.5em}.wp-core-ui p .gc-refresh-connection{line-height:1.3;vertical-align:bottom}.description.gc-radio-desc{margin-left:1.5em;margin-bottom:1em}.gc-reveal-items{text-decoration:none;position:relative}.gc-reveal-items.description{display:inline-block;margin-bottom:.5em}.gc-reveal-items:before{display:block;position:absolute;right:-1em;top:-.1em}ul.gc-radio-desc,ul.gc-reveal-items-list{border-top:1px solid #999;margin-top:.5em;padding-top:1em;list-style-type:disc;margin-bottom:1em}ul.gc-radio-desc li,ul.gc-reveal-items-list li{margin-left:2.8em}.gc-nav-tab-wrapper{border-bottom:1px solid #ccc}.gc-template-tab{padding:1em 0}.gc-template-tab h4{margin-top:0}.gc-template-tab table tbody>tr>td:first-child,.gc-template-tab table tbody>tr>th:first-child,.gc-template-tab table thead>tr>td:first-child,.gc-template-tab table thead>tr>th:first-child{width:40%}.gc-template-tab table tbody>tr>td:last-child,.gc-template-tab table tbody>tr>th:last-child,.gc-template-tab table thead>tr>td:last-child,.gc-template-tab table thead>tr>th:last-child{width:60%}.gc-template-tab td{border-bottom:1px solid #ccc;padding:.5em 1em}.gc-template-tab td:nth-child(2){vertical-align:top}.gc-template-tab td option[value=wp-type-acf]{display:none}.gc-template-tab td.gc-component option[value=wp-type-acf],.gc-template-tab td.type-repeater option[value=wp-type-acf]{display:block}.gc-template-tab .component-td{padding-left:0;padding-right:0;border:none}.gc-template-tab .component-td-wrapper{border-bottom:1px solid #ccc}.gc-template-tab .component-table-wrapper{width:100%}.gc-template-tab .component-table-wrapper tbody>tr>td{border:none}.gc-template-tab .component-table-inner{border-collapse:collapse;width:100%}.gc-template-tab .component-table-inner td{border:none}.gc-template-tab .component-table-inner td:first-child{padding-left:2.5em}.gc-template-tab .component-table-inner tr.text option[data-type=text],.gc-template-tab .component-table-inner tr.text option[data-type=textarea],.gc-template-tab .component-table-inner tr.text option[data-type=wysiwyg]{display:block}.gc-template-tab .component-table-inner tr.attachment option[data-type=gallery],.gc-template-tab .component-table-inner tr.attachment option[data-type=image]{display:block}.gc-template-tab .component-table-inner tr.choice_checkbox option[data-type=checkbox]{display:block}.gc-template-tab .component-table-inner tr.choice_radio option[data-type=radio]{display:block}.gc-template-tab .component-table-inner tr.repeater option[data-type=text],.gc-template-tab .component-table-inner tr.repeater option[data-type=textarea],.gc-template-tab .component-table-inner tr.repeater option[data-type=wysiwyg]{display:none}.gc-template-tab .component-table-inner tr.repeater option[data-type=repeater]{display:block}.gc-template-tab .ajax-disabled{opacity:.75;pointer-events:none}.gc-disabled .description,.gc-disabled label span{opacity:.5}.nav-tab.alignright{float:right}.mapping-defaults .link-to-mapping-defaults{display:none}.gathercontent-admin .form-table th{font-weight:400;padding:20px 1em}.gathercontent-admin.gc-sync .form-table th{padding:10px}.gathercontent-admin .select2-container,.gathercontent-admin select{width:250px}.gathercontent-admin .wp-field-th{width:60%}.gathercontent-admin .gc-field-th.gc-check-column{width:20px;padding:6px 0 6px 6px;vertical-align:middle}.gc-enabled .gc-status-column{cursor:pointer}.gc-disabled input[type=checkbox]{cursor:default}.gathercontent-admin .select2-results__option,.gathercontent-admin-select2 .select2-results__option{border-bottom:1px solid #eee;margin:0}.gathercontent-admin .select2-results__option .description,.gathercontent-admin-select2 .select2-results__option .description{font-style:italic;opacity:.7;margin-top:.2em}.gc-template-tab ul.gc-reveal-items-list li{margin-left:1.5em;text-transform:capitalize}.gc-loader{margin:0 auto;display:block;float:none}.gc-sync-items-descriptions .dashicons-randomize{text-decoration:none}.gc-status-color{width:1.1em;height:1.1em;display:inline-block;border-radius:100%;line-height:1.1em;margin-bottom:-2px;float:left;margin-right:5px}.gc-status-color.gc-status-color-white{border:1px solid #b1b1b1}.select2-gc_status .gc-status-color,.select2-post_status_mapping_after .gc-status-color{float:right;margin-right:0}.select2-gc_status.select2-container--default .gc-status-color,.select2-post_status_mapping_after.select2-container--default .gc-status-color{position:relative;top:.4em}.gc-logo-column{overflow:hidden;width:21px;height:20px;max-width:100%;display:inline-block;vertical-align:top;margin-right:1px}.gc-logo-column img{width:100px;height:auto}.column-gathercontent .gc-status-color{margin-top:2px}.inline-edit-gc-status .gc-status-select2{display:inline-block}.inline-edit-gc-status .gc-status-select2 .spinner{visibility:visible}.gc-button-primary,.wp-core-ui .button.gc-button-primary{background-color:#fff;border:1px solid #00abbd;color:#00abbd;font-weight:700}.gc-button-primary:hover,.wp-core-ui .button.gc-button-primary:hover{background-color:#00abbd;border:1px solid #00abbd;color:#fff}.gc-button-danger,.wp-core-ui .button.gc-button-danger{background-color:#fff;border:1px solid #fc5c54;color:#fc5c54;font-weight:700}.gc-button-danger:hover,.wp-core-ui .button.gc-button-danger:hover{background-color:#fc5c54;border:1px solid #fc5c54;color:#fff}.gc-auth-required .gc-section-auth table{background-color:#f5bfbf}#gc-items-search{float:left}#sync-tabs .tablenav{clear:none}#sync-tabs{margin-bottom:1.5em}#sync-tabs .gc-check-column{width:20px;padding:6px 0 6px 6px;vertical-align:middle}#sync-tabs #gc-edit{width:20px}#sync-tabs td:nth-child(5),#sync-tabs th:nth-child(5){display:none}.gc-sync-progress #progress{padding:0;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.gc-sync-progress table{background:0 0}.gc-sync-progress #gc-items-search{display:none}.gc-progress-bar{position:relative}.gc-progress-bar:before{content:'';background:#dbf4f6;height:38px;display:block;width:100%}.gc-progress-bar-partial{background:#0ab3c4;height:38px;color:#fff;text-align:center;line-height:38px;font-weight:700;margin-top:-38px;transition:width .4s ease-in-out}.gc-progress-bar-partial span{display:block;min-width:3.2em}.gc-sync-table{border-spacing:0;width:100%;clear:both;margin:0}#gc-reload-spinner .gc-loader{padding-left:32px;width:auto;line-height:1.5em}.gc-status-warning{color:orange;font-size:10px;display:none}.gc-status-warning.not-current{display:block}.gc-modal-open{overflow:hidden}.gc-modal-open #gc-items-search{display:block;position:absolute;top:0;left:0;z-index:160001}.gc-modal-open #gc-tablenav{margin:0 16px 0 0}.gc-modal-open #gc-items-search{margin-left:16px}.gc-bb-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000;font-family:sans-serif;font-size:14px}.gc-bb-modal .gc-bb-modal-close{position:absolute;text-decoration:none;top:10px;right:10px;width:30px;height:30px;z-index:1000;transition:color .1s ease-in-out,background .1s ease-in-out;color:#444}.gc-bb-modal .gc-bb-modal-close:focus,.gc-bb-modal .gc-bb-modal-close:hover{color:#2ea2cc}.gc-bb-modal .gc-bb-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;min-height:300px;background:#fff}.gc-bb-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:159900}.gc-bb-modal-title h1{padding:16px;line-height:0}.gc-bb-modal-nav-tabs{top:74px}.gc-bb-modal-main{top:105px;padding:16px}.gc-bb-modal-main.has-nav-tabs{top:108px}.text-right{text-align:right}.ir{background-color:transparent;border:0;overflow:hidden}.ir:before{content:"";display:block;width:0;height:150%}.gc-modal-tabs .hidden{display:none}.gc-modal-tabs .gc-disabled td:not(.gc-item-wp-post-title){opacity:.4}.gc-set-mapping .gc-cloak{position:absolute;top:84px;left:200px;right:0;bottom:0;height:auto;width:auto;background:#fff;opacity:.5;z-index:101}.gc-set-mapping .gc-mapping-metabox{position:absolute;right:16px;bottom:41px;width:270px;z-index:102}.gc-set-mapping .gc-mapping-metabox select{width:250px}#poststuff #gc-manage .inside{margin:0;padding:0}.gc-major-publishing-actions{padding:10px;clear:both;border-top:1px solid #ddd;background:#f5f5f5}.gc-publishing-action{text-align:right;float:right;line-height:23px}.gc-publishing-action .button,.gc-publishing-action button.button{margin-left:.5em}#gc-manage .dashicons{color:#82878c}#gc-status-selec2{padding:5px 0}#gc-related-data{overflow:hidden}#gc-related-data.gc-mapping-metabox:not(.gc-mapping-started),#gc-related-data.no-js{text-align:center}#gc-related-data .spinner{float:none;margin:.2em}#gc-related-data>p{text-align:center}.misc-pub-post-status .gc-status-color{display:block;margin-top:2px;margin-left:4px}.misc-pub-post-status .gc-status-name{font-weight:600}.gc-status-status.current{color:#49ab00}.gc-status-status.not-current{color:#c12c2f}.gc-no-mapping .spinner{display:none}.gc-no-mapping .spinner.is-active{display:inline-block}.gc-no-mapping .gc-publishing-action{text-align:center;float:none}.gc-no-mapping .gc-publishing-action .button,.gc-no-mapping .gc-publishing-action button.button{margin-left:0}.gc-mapping-started label{margin-bottom:.2em;display:block}.gc-metabox-status{display:inline-block;position:relative} \ No newline at end of file diff --git a/assets/css/sass/gathercontent-importer.scss b/assets/css/sass/gathercontent-importer.scss index 54c5c10a..d9daebe2 100644 --- a/assets/css/sass/gathercontent-importer.scss +++ b/assets/css/sass/gathercontent-importer.scss @@ -185,14 +185,14 @@ ul.gc-radio-desc li, ul.gc-reveal-items-list li { &.text{ option[data-type="text"], option[data-type="textarea"], - option[data-type="wysiwyg"]{ + option[data-type="wysiwyg"]{ display:block; } } &.attachment{ option[data-type="gallery"], - option[data-type="image"]{ - display:block; + option[data-type="image"]{ + display:block; } } &.choice_checkbox{ @@ -204,14 +204,14 @@ ul.gc-radio-desc li, ul.gc-reveal-items-list li { &.repeater{ option[data-type="text"], option[data-type="textarea"], - option[data-type="wysiwyg"]{ + option[data-type="wysiwyg"]{ display:none; } option[data-type="repeater"]{ display:block; } } } } - + .ajax-disabled{ opacity:0.75; pointer-events:none; @@ -391,6 +391,11 @@ ul.gc-radio-desc li, ul.gc-reveal-items-list li { background-color: #f5bfbf; } +.gc-component-disabled { + pointer-events: none; + opacity: 0.5; +} + @import 'sync'; @import 'modal'; @import 'single'; diff --git a/assets/js/gathercontent-general.js b/assets/js/gathercontent-general.js index ae5cbb42..abf7ebfd 100644 --- a/assets/js/gathercontent-general.js +++ b/assets/js/gathercontent-general.js @@ -1,8 +1,8 @@ /** - * Content Workflow Plugin - v1.0.0 - 2024-05-03 - * http://www.gathercontent.com + * Content Workflow (by Bynder) - v1.0.0 - 2024-05-29 + * * - * Copyright (c) 2024 Bynder + * Copyright (c) 2024 Content Workflow (by Bynder) * Licensed under the GPLv2 license. */ diff --git a/assets/js/gathercontent-general.min.js b/assets/js/gathercontent-general.min.js index 11701f61..d5c89a53 100644 --- a/assets/js/gathercontent-general.min.js +++ b/assets/js/gathercontent-general.min.js @@ -1,2 +1,2 @@ -/*! Content Workflow Plugin - v1.0.0 - 2024-05-03 | http://www.gathercontent.com | Copyright (c) 2024 GatherContent | Licensed GPLv2 */ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0,this.allChecked=this.totalChecked>=a.length,this.sortKey=c,this.sortDirection=d,this.sort()},checkChecked:function(a){a.changed.checked?this.totalChecked++:(this.totalChecked===this.length&&(this.allChecked=!1),this.totalChecked--),this.checkAllStatus()},checkAllStatus:function(a){var b=this.syncEnabled;this.syncEnabled=this.totalChecked>0,b!==this.syncEnabled&&this.trigger("enabledChange",this.syncEnabled),this.totalChecked=this.length,this.checkAllStatus(),this.processing=!1,this.trigger("render")},toggleChecked:function(a){this.allChecked=a,this.toggleCheckedIf(a)},checked:function(a){return a=a||this,a.filter(function(a){return a.get("checked")})},comparator:function(a,b){if(this.sortKey){var c=a.get(this.sortKey),d=b.get(this.sortKey);return"updated_at"===this.sortKey&&(c=c.date||c,d=d.date||d),"status"===this.sortKey&&(c=c.name||c,d=d.name||d),"asc"===this.sortDirection?c>d?-1:d>c?1:0:c=0},getSearchValue:function(){return this.getSearchQuery().keyword},getSearchQuery:function(){return this._searchResults&&this._searchResults.getSearchQuery()||{}},getSearchResults:function(){return this._searchResults},current:function(){return this._searchResults||this}}),a}},{}],6:[function(a,b,c){"use strict";window.GatherContent=window.GatherContent||{},function(b,c,d,e,f){e.general=e.general||{};var g=e.general;a("./initiate-objects.js")(g),g.models.post=a("./models/post.js")(e),g.collections.posts=a("./collections/posts.js")(g),g.views.postRow=a("./views/post-row.js")(g,e),g.views.statusSelect2=a("./views/status-select2.js")(g),g.views.postRows=a("./views/post-rows.js")(g,e,d),g.models.navItem=a("./models/modal-nav-item.js")(g),g.collections.navItems=a("./collections/modal-nav-items.js")(g),g.views.tableBase=a("./views/table-base.js")(g,d,e),g.views.modalPostRow=a("./views/modal-post-row.js")(g,e),g.views.modal=a("./views/modal.js")(g,e,d),g.monkeyPatchQuickEdit=function(a){var c=b.inlineEditPost.edit;b.inlineEditPost.edit=function(){c.apply(this,arguments),a.apply(this,arguments)}},g.triggerModal=function(a){a.preventDefault();var b=g.getChecked();b.length&&g.modalView===f&&(g.modalView=new g.views.modal({collection:g.generalView.collection}),g.modalView.checked(b),g.generalView.listenTo(g.modalView,"updateModels",g.generalView.updatePosts))},g.getChecked=function(){return d('tbody th.check-column input[type="checkbox"]:checked').map(function(){return parseInt(d(this).val(),10)}).get()},g.init=function(){d(c.body).addClass("gathercontent-admin-select2").on("click","#gc-sync-modal",g.triggerModal),d(c).ajaxSend(function(a,b,c){c.data&&-1!==c.data.indexOf("&action=inline-save")&&g.generalView.trigger("quickEditSend",b,c)}),g.generalView=new g.views.postRows({collection:new g.collections.posts(e._posts)}),g.monkeyPatchQuickEdit(function(){g.generalView.trigger("quickEdit",arguments,this)})},d(g.init)}(window,document,jQuery,window.GatherContent)},{"./collections/modal-nav-items.js":3,"./collections/posts.js":4,"./initiate-objects.js":7,"./models/modal-nav-item.js":10,"./models/post.js":12,"./views/modal-post-row.js":18,"./views/modal.js":19,"./views/post-row.js":20,"./views/post-rows.js":21,"./views/status-select2.js":22,"./views/table-base.js":23}],7:[function(a,b,c){"use strict";b.exports=function(b){b.models={base:a("./models/base.js")},b.collections={base:a("./collections/base.js")},b.views={base:a("./views/base.js")}}},{"./collections/base.js":1,"./models/base.js":9,"./views/base.js":13}],8:[function(a,b,c){"use strict";b.exports=function(a,b){return b=jQuery.extend({},{action:"gc_sync_items",data:"",percent:0,nonce:"",id:"",stopSync:!0,flush_cache:!1},b),a.models.base.extend({defaults:b,initialize:function(){this.listenTo(this,"send",this.send)},reset:function(){return this.clear().set(this.defaults),this},send:function(a,b,c,d){return c&&this.set("percent",c),jQuery.post(window.ajaxurl,{action:this.get("action"),percent:this.get("percent"),nonce:this.get("nonce"),id:this.get("id"),data:a,flush_cache:this.get("flush_cache")},function(c){return this.trigger("response",c,a),c.success?b(c):d?d(c):void 0}.bind(this)),this}})}},{}],9:[function(a,b,c){"use strict";b.exports=Backbone.Model.extend({sync:function(){return!1}})},{}],10:[function(a,b,c){"use strict";b.exports=function(a){return a.models.base.extend({defaults:{label:"",id:"",hidden:!0,rendered:!1}})}},{}],11:[function(a,b,c){"use strict";b.exports=function(a){return a.prototype._get=function(a,b){return this["_get_"+b]&&(a=this["_get_"+b](a)),a},a.prototype.get=function(a){return this._get(Backbone.Model.prototype.get.call(this,a),a)},a.prototype.toJSON=function(){return _.mapObject(Backbone.Model.prototype.toJSON.call(this),_.bind(this._get,this))},a}},{}],12:[function(a,b,c){"use strict";b.exports=function(b){return a("./../models/modify-json.js")(Backbone.Model.extend({defaults:{id:0,item:0,itemName:"",updated_at:"",current:!0,editLink:"",mapping:0,mappingName:"",mappingLink:"",mappingStatus:"",mappingStatusId:"",status:{},checked:!1,disabled:!1,canPull:!1,canPush:!1,statuses:[],statusesChecked:!1,ptLabel:!1},searchAttributes:["itemName","mappingName","post_title"],url:function(){var a=window.ajaxurl+"?action=gc_fetch_js_post&id="+this.get("id");return this.get("uncached")&&(this.set("uncached",!1),a+="&flush_cache=force"),a},_get_disabled:function(a){return!this.get("mapping")},_get_canPull:function(a){return this.get("item")>0&&this.get("mapping")>0},_get_canPush:function(a){return this.get("mapping")>0},_get_mappingLink:function(a){return"failed"===Backbone.Model.prototype.get.call(this,"mappingStatus")&&(a+="&sync-items=1"),a},_get_mappingStatus:function(a){return b._statuses[a]?b._statuses[a]:""},_get_mappingStatusId:function(a){return Backbone.Model.prototype.get.call(this,"mappingStatus")}}))}},{"./../models/modify-json.js":11}],13:[function(a,b,c){"use strict";b.exports=Backbone.View.extend({toggleExpanded:function(a){this.model.set("expanded",!this.model.get("expanded"))},getRenderedModels:function(a,b){b=b||this.collection;var c=document.createDocumentFragment();return b.each(function(b){var d=new a({model:b}).render();c.appendChild(d.el)}),c},render:function(){return this.$el.html(this.template(this.model.toJSON())),this},close:function(){this.remove(),this.unbind(),this.onClose&&this.onClose()}})},{}],14:[function(a,b,c){"use strict";b.exports=function(a){return a.views.base.extend({template:wp.template("gc-item"),tagName:"tr",className:"gc-item gc-enabled",id:function(){return this.model.get("id")},events:{"change .gc-check-column input":"toggleCheck","click .gc-reveal-items":"toggleExpanded","click .gc-status-column":"toggleCheckAndRender"},initialize:function(){this.listenTo(this.model,"change:checked",this.render)},toggleCheck:function(){this.model.set("checked",!this.model.get("checked"))},toggleCheckAndRender:function(a){this.toggleCheck(),this.render()}})}},{}],15:[function(a,b,c){"use strict";b.exports=function(b,c,d){var e;return a("./../views/metabox-base.js")(b,c,d).extend({template:wp.template("gc-mapping-metabox"),stepArgs:!1,events:{"click #gc-map":"step","change #select-gc-next-step":"setProperty","click #gc-map-cancel":"cancel"},initialize:function(){e=this,this.listenTo(this.model,"change:waiting",this.toggleWaitingRender),this.listenTo(this.model,"change",this.maybeEnableAndRender),this.listenTo(this.model,"change:step",this.changeStep),this.listenTo(this,"cancel",this.resetAndRender),this.render(),this.$el.removeClass("no-js").addClass("gc-mapping-metabox")},changeStep:function(a){"accounts"===a.changed.step&&this.$el.addClass("gc-mapping-started"),a.changed.step&&(this.stepArgs=this["step_"+a.changed.step]())},setProperty:function(a){var b=c(a.target).val();this.model.set(this.stepArgs.property,b),"account"!==this.stepArgs.property&&"project"!==this.stepArgs.property||this.step()},setMapping:function(){var a=function(a){this.model.set("waiting",!1),this.trigger("complete",this.model,a)};this.ajax({action:"gc_save_mapping_id"},a,this.failMsg)},maybeEnableAndRender:function(a){(a.changed.account||a.changed.project||a.changed.mapping)&&(this.model.set("btnDisabled",!1),this.render())},toggleWaitingRender:function(a){a.changed.waiting&&this.model.set("btnDisabled",!0),this.render()},step:function(){if(this.model.set("waiting",!0),"mapping"===this.stepArgs.property)return this.setMapping();this.setStep();var a=this.model.get(this.stepArgs.properties);return a&&a.length?this.successHandler(a):this.ajax({action:"gc_wp_filter_mappings",property:this.stepArgs.property},this.successHandler,this.failMsg),this},failMsg:function(a){a="string"==typeof a?a:d._errors.unknown,window.alert(a),e.model.set("waiting",!1)},successHandler:function(a){this.model.set(this.stepArgs.properties,a),a.length<2&&this.model.set("btnDisabled",!1),this.model.set("waiting",!1)},setStep:function(){return this.model.get("step")?"accounts"===this.model.get("step")?this.model.set("step","projects"):"projects"===this.model.get("step")?this.model.set("step","mappings"):void 0:this.model.set("step","accounts")},step_accounts:function(){return{property:"account",properties:"accounts"}},step_projects:function(){return{property:"project",properties:"projects"}},step_mappings:function(){return{property:"mapping",properties:"mappings"}},cancel:function(a){this.trigger("cancel",a)},resetModel:function(){return this.stepArgs=!1,this.model.set({step:!1,account:0,project:0,mapping:0}),this.model},resetAndRender:function(){this.resetModel(),this.render()},render:function(){var a=this.model.toJSON();return this.stepArgs&&(a.label=d._step_labels[a.step],a.property=this.stepArgs.property),this.$el.html(this.template(a)),this}})}},{"./../views/metabox-base.js":16}],16:[function(a,b,c){"use strict";b.exports=function(a,b,c){return a.views.base.extend({el:"#gc-related-data",ajax:function(a,d,e){var f=this,g=function(a){a.success?d.call(f,a.data):e&&e.call(f,a.data)},h=b.post(window.ajaxurl,b.extend({action:"",post:this.model.toJSON(),nonce:c.$id("gc-edit-nonce").val(),flush_cache:c.queryargs.flush_cache?1:0},a),g);return e&&h.fail(function(){e.call(f)}),h}})}},{}],17:[function(a,b,c){"use strict";b.exports=function(b,c,d){var e=a("./../views/mapping-metabox.js")(b,c,d),f=new Backbone.Model({id:!0,cancelBtn:!0,accounts:[],projects:[],mappings:[]}),g=e.extend({close:function(){f=this.resetModel(),e.prototype.close.call(this)}});return function(a){f.set("ids",a);var b=new g({model:f});return b.$el.addClass("postbox"),b.step()}}},{"./../views/mapping-metabox.js":15}],18:[function(a,b,c){"use strict";b.exports=function(b,c){return a("./../views/item.js")(b).extend({template:wp.template("gc-item"),id:function(){return"gc-modal-post-"+this.model.get("id")},className:function(){return"gc-item "+(this.model.get("disabled")?"gc-disabled":"gc-enabled")},events:{"change .gc-check-column input":"toggleCheck","click .gc-status-column":"toggleCheckAndRender"},initialize:function(){this.listenTo(this.model,"change:post_title",this.renderTitle),this.listenTo(this.model,"change:mappingStatus",this.render),this.listenTo(this.model,"render",this.render)},renderTitle:function(){var a=this.model.get("post_title"),b=this.model.get("id");c.$id("post-"+b).find(".column-title .row-title").text(a),c.$id("edit-"+b).find('[name="post_title"]').text(a),c.$id("inline_"+b).find(".post_title").text(a)}})}},{"./../views/item.js":14}],19:[function(a,b,c){"use strict";b.exports=function(b,c,d){b.modalView=void 0;var e,f=27;return b.views.tableBase.extend({id:"gc-bb-modal-dialog",template:wp.template("gc-modal-window"),selected:[],navItems:null,btns:{},currID:"select-items",currNav:!1,metaboxView:null,modelView:b.views.modalPostRow,$search:c.$id("gc-items-search"),events:{"click .gc-bb-modal-close":"closeModal","click #btn-cancel":"closeModal","click .gc-bb-modal-backdrop":"closeModal","click .gc-bb-modal-nav-tabs a":"clickSelectTab","change .gc-field-th.gc-check-column input":"checkAll","click #gc-btn-pull":"startPull","click #gc-btn-push":"startPush","click .gc-cloak":"maybeResetMetaboxView","click #gc-btn-assign-mapping":"startAssignment","click .gc-field-th.sortable":"sortRowsByColumn"},initialize:function(){e=this,this.$search.length||(d(document.body).append(''),this.$search=c.$id("gc-items-search")),b.views.tableBase.prototype.initialize.call(this),_.bindAll(this,"render","preserveFocus","maybeClose","closeModal"),c._nav_items&&(this.navItems=new b.collections.navItems(c._nav_items),this.currNav=this.navItems.getActive(),this.listenTo(this.navItems,"render",this.render)),this.btns=new b.collections.base(c._modal_btns),this.listenTo(this.collection,"updateItems",this.maybeRender),this.listenTo(this.collection,"change:checked",this.checkEnableButton),this.listenTo(this.collection,"search",this.render),this.initMetaboxView=a("./../views/modal-assign-mapping.js")(b,d,c)},checked:function(a){if(this.selected=a,a.length)return a.length===this.collection.length?this.collection.trigger("checkAll",!0):(this.collection.trigger("checkSome",function(a){return-1!==_.indexOf(e.selected,a.get("id"))&&!a.get("disabled")}),this)},setupAjax:function(){var d=a("./../models/ajax.js")(b,{action:"gc_pull_items",nonce:c._edit_nonce,flush_cache:c.queryargs.flush_cache?1:0});this.ajax=new d},render:function(){var a=this.collection.current();return this.$el.removeClass("gc-set-mapping").attr("tabindex","0").html(this.template({btns:this.btns.toJSON(),navItems:this.navItems?this.navItems.toJSON():[],currID:this.currNav?this.currNav.get("id"):"select-items",checked:a.allChecked,sortKey:a.sortKey,sortDirection:a.sortDirection})).append('
 
'),b.views.tableBase.prototype.render.call(this),d(document).on("focusin",this.preserveFocus).on("keyup",this.maybeClose),d(document.body).addClass("gc-modal-open"),this.$search.before(this.$el),this.$search.css(jQuery("#gc-tablenav").offset()),this.isSearch(document.activeElement)||this.$el.focus(),this},preserveFocus:function(a){this.$el[0]===a.target||this.$el.has(a.target).length||this.isSearch(a.target)||this.$el.focus()},maybeClose:function(a){f!==a.keyCode||this.isSearch(a.target)||this.closeModal(a)},isSearch:function(a){return this.$search[0]===a||this.$search.has(a).length},closeModal:function(a){a.preventDefault(),this.resetMetaboxView(),this.undelegateEvents(),d(document).off("focusin"),d(document).off("keyup",this.maybeClose),d(document.body).removeClass("gc-modal-open"),this.remove(),c.$id("bulk-edit").find("button.cancel").trigger("click"),b.modalView=void 0},clickSelectTab:function(a){a.preventDefault(),this.selectTab(d(a.target).data("id"))},selectTab:function(a){this.currID=a,this.currNav=this.navItems.getById(a),this.navItems.trigger("activate",a)},checkEnableButton:function(a){this.buttonStatus(a)},buttonStatus:function(a){this.collection.processing||(a?(this.$("#gc-btn-assign-mapping").prop("disabled",!this.collection.checkedCan("assign")),this.$("#gc-btn-push").prop("disabled",!this.collection.checkedCan("push")),this.$("#gc-btn-pull").prop("disabled",!this.collection.checkedCan("pull"))):this.$(".media-toolbar button").prop("disabled",!0))},startPull:function(a){a.preventDefault(),this.startSync("pull")},startPush:function(a){a.preventDefault(),this.startSync("push")},startSync:function(a){var b="push"===a?"canPush":"canPull",d=this.selectiveGet(b);window.confirm(c._sure[a])&&(d=_.map(d,function(a){return a.set("mappingStatus","starting"),a.toJSON()}),this.doAjax(d,a))},startAssignment:function(a){var b=_.map(this.selectiveGet("disabled"),function(a){return a.get("id")});this.resetMetaboxView(),this.$el.addClass("gc-set-mapping"),this.$("#gc-btn-assign-mapping").prop("disabled",!0),this.metaboxView=this.initMetaboxView(b),this.listenTo(this.metaboxView,"cancel",this.maybeResetMetaboxView),this.listenTo(this.metaboxView,"complete",function(a,b){a.set("waiting",!0),this.collection.map(function(a){a.get("id")in b.ids&&(a.set("mapping",b.mapping),a.set("mappingName",b.mappingName),a.set("mappingLink",b.mappingLink))}),this.render()})},maybeResetMetaboxView:function(){this.metaboxView&&(this.resetMetaboxView(),this.buttonStatus(!0))},resetMetaboxView:function(){this.metaboxView&&(this.stopListening(this.metaboxView),this.metaboxView.close(),this.$el.removeClass("gc-set-mapping"))},selectiveGet:function(a){var b,c=[];return this.collection.trigger("checkSome",function(d){return b=d.get("checked")&&d.get(a),b&&c.push(d),b}),c},getChecked:function(a){this.collection.filter(function(b){var c=b.get("checked");return c&&a&&a(b),c})},ajaxSuccess:function(a){if(!a.data.mappings)return this.ajaxFail();var b=[],c="push"===a.data.direction?"canPush":"canPull";this.getChecked(function(d){d.get(c)&&(a.data.mappings.length&&-1!==_.indexOf(a.data.mappings,d.get("mapping"))?(d.set("mappingStatus","syncing"),b.push(d.get("mapping"))):(d.set("checked",!1),d.set("mappingStatus","complete"),d.fetch().done(function(){d.trigger("render")})))});if(!b.length)return this.clearTimeout();this.checkStatus(b,a.data.direction)},ajaxFail:function(a){this.setSelectedMappingStatus("failed"),this.clearTimeout()},setSelectedMappingStatus:function(a){return this.getChecked(function(b){b.set("mappingStatus",a)})},checkStatus:function(a,b){this.clearTimeout(),this.setTimeout(function(){e.doAjax({check:a},b)})},doAjax:function(a,b){this.ajax.set("action","gc_"+b+"_items"),this.ajax.send(a,this.ajaxSuccess.bind(this),0,this.ajaxFail.bind(this))},maybeRender:function(){this.metaboxView||this.render()}})}},{"./../models/ajax.js":8,"./../views/modal-assign-mapping.js":17}],20:[function(a,b,c){"use strict";b.exports=function(a,b){return a.views.base.extend({template:wp.template("gc-post-column-row"),tagName:"span",className:"gc-status-column",id:function(){return"gc-status-row-"+this.model.get("id")},initialize:function(){this.listenTo(this.model,"change:status",this.render)},html:function(){return this.template(this.model.toJSON())},render:function(){return b.$id("post-"+this.model.get("id")).find(".column-gathercontent").html(this.html()),this}})}},{}],21:[function(a,b,c){"use strict";b.exports=function(a,b,c){var d;return a.views.statusSelect2.extend({template:wp.template("gc-status-select2"),el:"#posts-filter tbody",width:"200px",initialize:function(){d=this,this.listenTo(this,"quickEdit",this.edit),this.listenTo(this,"quickEditSend",this.sending),this.render(),this.updatePosts()},updatePosts:function(){c.post(window.ajaxurl,{action:"gc_get_posts",posts:b._posts,flush_cache:b.queryargs.flush_cache?1:0},function(a){a.success,a.data&&d.collection.trigger("updateItems",a.data)})},sending:function(a,b){var c=this.parseQueryString(b.data);if(c.post_ID&&c.gc_status){var d=this.collection.getById(c.post_ID),e=_.find(d.get("statuses"),function(a){return parseInt(a.id,10)===parseInt(c.gc_status,10)});d.set("status",e)}},edit:function(a,e){var f=0;if("object"==typeof a&&(f=parseInt(e.getId(a),10)),this.waitSpinner(f),f){var g=this.collection.getById(f);if(g.get("statusesChecked"))return this.renderStatuses(g);c.post(window.ajaxurl,{action:"gc_get_post_statuses",postId:f,flush_cache:b.queryargs.flush_cache?1:0},this.ajaxResponse).done(function(){d.renderStatuses(g)})}},ajaxResponse:function(a){if(a.data){var b=d.collection.getById(a.data.postId);b&&(b.set("statusesChecked",!0),a.success&&(b.set("statuses",a.data.statuses),b.get("statuses").length&&(d.$(".gc-select2").each(function(){c(this).select2("destroy")}),d.renderStatuses(b))))}},renderStatuses:function(a){var c=a.get("id");this.editSelect(c).html(this.template(a.toJSON())),a.get("statuses").length&&this.renderSelect2(b.$id("edit-"+c))},waitSpinner:function(a){this.editSelect(a).html('')},editSelect:function(a){return b.$id("edit-"+a).find(".inline-edit-group .gc-status-select2")},render:function(){return this.collection.each(function(b){new a.views.postRow({model:b}).render()}),this},parseQueryString:function(a){return a?_.chain(a.split("&")).map(function(a){var b=a.split("=");return[b[0],decodeURIComponent(b[1])]}).object().value():{}}})}},{}],22:[function(a,b,c){"use strict";b.exports=function(a){var b;return a.views.base.extend({select2ItemTemplate:wp.template("gc-select2-item"),width:"250px",renderSelect2:function(a){var c=a?a.find(".gc-select2"):this.$(".gc-select2");return b=this,c.each(function(){var a=jQuery(this),c=a.data();a.select2(b.select2Args(c));var d=a.data("select2");d.$results.addClass("select2-"+c.column),d.$container.addClass("select2-"+c.column)}),this},select2Args:function(a){var c={width:b.width};return c.templateResult=function(a,c){var d=jQuery.extend(a,jQuery(a.element).data());return d.description=!1!==c&&(d.description||""),jQuery(b.select2ItemTemplate(a))}.bind(b),c.templateSelection=function(a){return c.templateResult(a,!1)},c}})}},{}],23:[function(a,b,c){"use strict";b.exports=function(b,c,d){return b.views.tableSearch=a("./../views/table-search.js")(b,c,d),b.views.tableNav=a("./../views/table-nav.js")(b,c,d),b.views.base.extend({timeoutID:null,ajax:null,tableNavView:null,searchView:null,modelView:null,timeoutTime:1e3,events:{"click .gc-field-th.sortable":"sortRowsByColumn","change .gc-field-th.gc-check-column input":"checkAll"},initialize:function(){this.setupAjax(),this.listenTo(this.collection,"render",this.render),this.listenTo(this.collection,"notAllChecked",this.allCheckedStatus),this.listenTo(this.collection,"change:checked",this.renderNav),this.listenTo(this,"render",this.render),this.tableNavView=new b.views.tableNav({collection:this.collection}),this.searchView=new b.views.tableSearch({collection:this.collection})},setupAjax:function(){},sortRowsByColumn:function(a){a.preventDefault();var b=this.collection.current(),d=c(a.currentTarget),e=d.find("a").data("id"),f=!1;d.hasClass("asc")&&(f="desc"),d.hasClass("desc")&&(f="asc"),f||(f=b.sortDirection),"asc"===f?d.addClass("desc").removeClass("asc"):d.addClass("asc").removeClass("desc"),b.trigger("sortByColumn",e,f),this.sortRender()},buttonStatus:function(a){this.$(".button-primary").prop("disabled",!a)},allCheckedStatus:function(){this.$(".gc-field-th.gc-check-column input").prop("checked",this.collection.allChecked)},checkAll:function(a){this.collection.trigger("checkAll",c(a.target).is(":checked"))},doSpinner:function(){var a=this.blankRow('');this.renderRows(a)},setTimeout:function(a){this.timeoutID=window.setTimeout(a,this.timeoutTime)},clearTimeout:function(){window.clearTimeout(this.timeoutID),this.timeoutID=null},getRenderedRows:function(){return this.collection.current().length?this.getRenderedModels(this.modelView,this.collection.current()):this.blankRow(d._text.no_items)},sortRender:function(){this.render()},blankRow:function(a){return' *").length+'">'+a+""},renderRows:function(a){this.$("tbody").html(a||this.getRenderedRows())},renderNav:function(){this.$("#gc-tablenav").html(this.tableNavView.render().el)},render:function(){var a=this.collection.current();return this.renderRows(),this.renderNav(),this.buttonStatus(a.syncEnabled),this.allCheckedStatus(a.allChecked),this}})}},{"./../views/table-nav.js":24,"./../views/table-search.js":25}],24:[function(a,b,c){"use strict";b.exports=function(a,b,c){return a.views.base.extend({template:wp.template("gc-table-nav"),render:function(){var a=this.collection.current();return this.$el.html(this.template({count:a.length,selected:a.checked?a.checked().length:0})),this}})}},{}],25:[function(a,b,c){"use strict";b.exports=function(a){return Backbone.View.extend({el:"#gc-items-search",template:wp.template("gc-table-search"),events:{"keyup #gc-search-input":"filterCollection","search #gc-search-input":"filterCollection"},initialize:function(){this.render()},filterCollection:_.debounce(function(a){this.collection.search(a.target.value)},100),render:function(){return this.$el.html(this.template()),this}})}},{}]},{},[6]); +/*! Content Workflow (by Bynder) - v1.0.0 - 2024-05-29 | | Copyright (c) 2024 Content Workflow (by Bynder) | Licensed GPLv2 */ +!function i(n,c,o){function a(s,t){if(!c[s]){if(!n[s]){var e="function"==typeof require&&require;if(!t&&e)return e(s,!0);if(r)return r(s,!0);t=new Error("Cannot find module '"+s+"'");throw t.code="MODULE_NOT_FOUND",t}e=c[s]={exports:{}};n[s][0].call(e.exports,function(t){var e=n[s][1][t];return a(e||t)},e,e.exports,i,n,c,o)}return c[s].exports}for(var r="function"==typeof require&&require,t=0;t=t.length,this.sortKey=s,this.sortDirection=i,this.sort()},checkChecked:function(t){t.changed.checked?this.totalChecked++:(this.totalChecked===this.length&&(this.allChecked=!1),this.totalChecked--),this.checkAllStatus()},checkAllStatus:function(t){var e=this.syncEnabled;this.syncEnabled=0=this.length,this.checkAllStatus(),this.processing=!1,this.trigger("render")},toggleChecked:function(t){this.allChecked=t,this.toggleCheckedIf(t)},checked:function(t){return(t=t||this).filter(function(t){return t.get("checked")})},comparator:function(t,e){if(this.sortKey)return t=t.get(this.sortKey),e=e.get(this.sortKey),"updated_at"===this.sortKey&&(t=t.date||t,e=e.date||e),"status"===this.sortKey&&(t=t.name||t,e=e.name||e),"asc"===this.sortDirection?e