diff --git a/css/acf-qef-field-group.css b/css/acf-qef-field-group.css index cd7ef99..06f17f7 100644 --- a/css/acf-qef-field-group.css +++ b/css/acf-qef-field-group.css @@ -1 +1 @@ -.acf-field-setting-list-table-settings-heaadline{margin-top:24px;padding-top:24px;border-top:1px solid #eaecf0}:not(.acf-field-setting-allow_quickedit)+.acf-field-setting-allow_bulkedit[data-width],.acf-field-setting-allow_quickedit[data-width]{clear:left}[data-setting=flexible_content] [data-name=list-table-settings-heaadline],[data-setting=repeater] [data-name=list-table-settings-heaadline],[data-setting=flexible_content] [data-name=show_column],[data-setting=repeater] [data-name=show_column],[data-setting=flexible_content] [data-name=show_column_weight],[data-setting=repeater] [data-name=show_column_weight],[data-setting=flexible_content] [data-name=show_column_sortable],[data-setting=repeater] [data-name=show_column_sortable],[data-setting=flexible_content] [data-name=allow_quickedit],[data-setting=repeater] [data-name=allow_quickedit],[data-setting=flexible_content] [data-name=allow_bulkedit],[data-setting=repeater] [data-name=allow_bulkedit]{display:none} \ No newline at end of file +.acf-field-settings .acf-field.acf-field-setting-list-table-settings-heaadline{margin-top:24px;padding-top:24px;border-top:1px solid #eaecf0}:not(.acf-field-setting-allow_quickedit)+.acf-field-setting-allow_bulkedit[data-width],.acf-field-setting-allow_quickedit[data-width]{clear:left}[data-setting=flexible_content] [data-name=list-table-settings-heaadline],[data-setting=repeater] [data-name=list-table-settings-heaadline],[data-setting=flexible_content] [data-name=show_column],[data-setting=repeater] [data-name=show_column],[data-setting=flexible_content] [data-name=show_column_weight],[data-setting=repeater] [data-name=show_column_weight],[data-setting=flexible_content] [data-name=show_column_sortable],[data-setting=repeater] [data-name=show_column_sortable],[data-setting=flexible_content] [data-name=allow_quickedit],[data-setting=repeater] [data-name=allow_quickedit],[data-setting=flexible_content] [data-name=allow_bulkedit],[data-setting=repeater] [data-name=allow_bulkedit]{display:none}[data-name=allow_quickedit]{clear:left} \ No newline at end of file diff --git a/css/acf-quickedit.css b/css/acf-quickedit.css index 682f3f1..91e90af 100644 --- a/css/acf-quickedit.css +++ b/css/acf-quickedit.css @@ -1 +1 @@ -.widefat tbody td[class*="--qef-type-file--"] img,.widefat tbody td[class*="--qef-type-image--"] img,.widefat tbody td[class*="--qef-type-gallery--"] img{max-width:100%;height:auto;width:80px;height:80px;-o-object-fit:cover;object-fit:cover}.widefat tbody td[class*="--qef-type-file--"] img{width:60px;height:60px;-o-object-fit:contain;object-fit:contain}.qef-text{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}td[class*="--qef-type-textarea--"] .qef-text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}td[class*="--qef-type-text--"] .qef-text{white-space:nowrap}.widefat thead th[class*="--qef-type-file--"],.widefat thead th[class*="--qef-type-image--"],.widefat thead th[class*="--qef-type-gallery--"]{width:80px}.acf-qef-gallery-col{position:relative;width:80px;height:90px}.acf-qef-gallery-col:before,.acf-qef-gallery-col:after{content:"";position:absolute;left:2px;top:2px;width:80px;height:80px;border:2px solid #bbb;border-top-style:none;border-left-style:none}.acf-qef-gallery-col:after{left:6px;top:6px}.acf-qef-gallery-col img{display:none;position:absolute;left:0;top:0;background-color:#ccc;background-size:20px 20px;background-position:0 0,10px 10px;background-image:-o-linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9),-o-linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9);background-image:linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9),linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9)}.acf-qef-gallery-col img:first-child{display:block}.column-_acf_qef_ghost{display:none}.acf-qef-icon{display:block}.acf-qef-icon img{display:block;margin:0 auto}.acf-qef-icon:after{content:attr(title);font-size:9px;line-height:1.4em;display:block;margin-top:.5em;text-align:center}.acf-qef-color-indicator{border-radius:2px;border:1px solid #d2d2d2;width:24px;height:24px}.acf-qef-color-indicator.no-value{position:relative}.acf-qef-color-indicator.no-value:before{content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border-radius:2px;background-color:rgba(255,40,40,.9);position:absolute;left:0;top:0;width:140%;height:2px;-webkit-transform-origin:1px 1px;-ms-transform-origin:1px 1px;transform-origin:1px 1px}.inline-edit-col-qed{border-bottom:1px solid #ccc}#wpbody-content .inline-edit-row .inline-edit-col-qed{float:none;clear:both;margin:0 -0.5em;width:auto}.inline-edit-col-qed input[type=radio],.inline-edit-col-qed input[type=checkbox]{height:16px}@media screen and (max-width: 782px){.inline-edit-col-qed input[type=radio],.inline-edit-col-qed input[type=checkbox]{height:25px}}.inline-edit-col-qed legend{margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background:#f1f1f1;font-weight:700;border-bottom:1px solid #ccc;border-top:1px solid #ccc;margin-top:-1px;position:-webkit-sticky;position:sticky;z-index:1;top:32px}#posts-filter .inline-edit-col-qed legend{padding:.5em 1em}@media screen and (max-width: 782px){.inline-edit-col-qed legend{top:47px}}@media screen and (max-width: 600px){.inline-edit-col-qed legend{top:1px}}.inline-edit-col-qed .qed-fields{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:#f9f9f9}.inline-edit-col-qed .acf-field{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;padding:8px;margin:10px;-webkit-box-flex:1;-ms-flex:1 1 31%;flex:1 1 31%;min-width:0;background-color:#fafafa;-webkit-box-shadow:0 0 3px rgba(0,0,0,.1);box-shadow:0 0 3px rgba(0,0,0,.1);border:2px solid transparent}@media screen and (max-width: 782px){.inline-edit-col-qed .acf-field{-ms-flex-preferred-size:45%;flex-basis:45%}}@media screen and (max-width: 600px){.inline-edit-col-qed .acf-field{-ms-flex-preferred-size:auto;flex-basis:auto}}.inline-edit-col-qed .acf-field[data-error-message]{border-color:#dd4232}.inline-edit-col-qed .acf-field[data-error-message]::after{content:attr(data-error-message);display:block;background-color:#f55e4f;color:#fff;margin:0 -10px -10px -10px;padding:10px}.inline-edit-col-qed .acf-input-wrap{display:block}.inline-edit-col-qed .inline-edit-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.inline-edit-col-qed .inline-edit-group .title{float:none;width:auto;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.inline-edit-col-qed .inline-edit-group .bulk-do-not-change{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.inline-edit-col-qed .inline-edit-group .acf-input-wrap{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.inline-edit-col-qed .acf-checkbox-list,.inline-edit-col-qed .acf-radio-list{-webkit-columns:2;-moz-columns:2;columns:2}@media screen and (max-width: 782px){.inline-edit-col-qed .acf-checkbox-list,.inline-edit-col-qed .acf-radio-list{-webkit-columns:1;-moz-columns:1;columns:1}}#posts-filter .acf-notice{clear:both}[data-field-type=color_picker] .acf-input-wrap{overflow:visible;display:inline-block}[data-field-type=color_picker] .wp-picker-container [type=button]:before{content:"";-webkit-transform:rotate(35deg);-ms-transform:rotate(35deg);transform:rotate(35deg);border-radius:2px;background-color:rgba(255,40,40,.9);position:absolute;left:1px;top:1px;width:37px;height:2px;-webkit-transform-origin:1px 1px;-ms-transform-origin:1px 1px;transform-origin:1px 1px}[data-field-type=color_picker] .wp-picker-container [type=button][style*="background-color:"]:before{content:none}[data-field-type=color_picker] .wp-picker-container .wp-picker-holder{position:absolute;bottom:100%;left:0;z-index:1}[data-field-type=color_picker] .wp-picker-container.wp-picker-active .wp-picker-input-wrap label{margin-top:-2px;float:left}[data-field-type=file] .acf-input-wrap,[data-field-type=image] .acf-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;overflow:hidden}[data-field-type=file] .image-content,[data-field-type=image] .image-content{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}[data-field-type=file] .select-media,[data-field-type=image] .select-media{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}[data-field-type=file] .remove-media,[data-field-type=image] .remove-media{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;position:absolute;right:.125em;top:.125em;color:#32373c;width:auto;height:auto;line-height:1em;font-size:24px}[data-field-type=file] .remove-media:hover,[data-field-type=file] .remove-media:active,[data-field-type=image] .remove-media:hover,[data-field-type=image] .remove-media:active{color:#dc3232}[data-field-type=file] .file-content,[data-field-type=image] .file-content{background:#fff;border:1px solid #ccc;-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom-style:none;-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;position:relative;text-align:center}[data-field-type=file] .file-content img,[data-field-type=image] .file-content img{height:100px;width:100%;margin:10px 0 0 0;-o-object-fit:contain;object-fit:contain}[data-field-type=file] .file-content .media-mime,[data-field-type=image] .file-content .media-mime{color:#b4b9be}[data-field-type=file] .file-content .media-title,[data-field-type=image] .file-content .media-title{line-height:1.2;max-height:3.3em;overflow:hidden;display:block;padding:.5em 1em;margin-bottom:10px}[data-field-type=file] .acf-quick-edit-file[value=""]~.remove-media,[data-field-type=file] .acf-quick-edit-file[value=""]~.file-content,[data-field-type=file] .acf-quick-edit-image[value=""]~.remove-media,[data-field-type=file] .acf-quick-edit-image[value=""]~.file-content,[data-field-type=image] .acf-quick-edit-file[value=""]~.remove-media,[data-field-type=image] .acf-quick-edit-file[value=""]~.file-content,[data-field-type=image] .acf-quick-edit-image[value=""]~.remove-media,[data-field-type=image] .acf-quick-edit-image[value=""]~.file-content{display:none}[data-field-type=image] .file-content img{background-color:#ccc;background-size:20px 20px;background-position:0 0,10px 10px;background-image:-o-linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9),-o-linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9);background-image:linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9),linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9)}[data-field-type=link] .acf-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-field-type=link] .link-content{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}[data-field-type=link] .select-link{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}[data-field-type=link] .remove-link{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;position:absolute;right:.125em;top:.125em;color:#32373c;width:auto;height:auto;line-height:1em;font-size:24px}[data-field-type=link] .remove-link:hover,[data-field-type=link] .remove-link:active{color:#dc3232}[data-field-type=link] .link-content{background:#fff;border:1px solid #ccc;-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom-style:none}[data-field-type=link] .link-content a{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.5em 1em;text-decoration:none;line-height:1.4em;vertical-align:top;font-weight:700;position:relative}[data-field-type=link] .link-content a::after{content:attr(href);color:#b4b9be;text-decoration:none;font-weight:400;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;-webkit-column-break-before:always;-moz-column-break-before:always;break-before:always}[data-field-type=link] .link-content a[target=_blank]::before{content:"";font-family:"dashicons";font-size:20px;font-weight:400;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}[data-field-type=link] [data-link-prop=url][value=""]~.remove-link,[data-field-type=link] [data-link-prop=url][value=""]~.link-content{display:none}[data-field-type=range] .acf-range-wrap{display:-webkit-box;display:-ms-flexbox;display:flex}[data-field-type=range] [type=range]{-webkit-box-flex:1;-ms-flex:1;flex:1}[data-field-type=taxonomy][data-field-sub-type=checkbox],[data-field-type=taxonomy][data-field-sub-type=radio]{width:98%} \ No newline at end of file +.widefat tbody td[class*="--qef-type-file--"] img,.widefat tbody td[class*="--qef-type-image--"] img,.widefat tbody td[class*="--qef-type-gallery--"] img{max-width:100%;height:auto;width:80px;height:80px;-o-object-fit:cover;object-fit:cover}.widefat tbody td[class*="--qef-type-file--"] img{width:60px;height:60px;-o-object-fit:contain;object-fit:contain}.qef-text{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}td[class*="--qef-type-textarea--"] .qef-text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}td[class*="--qef-type-text--"] .qef-text{white-space:nowrap}.widefat thead th[class*="--qef-type-file--"],.widefat thead th[class*="--qef-type-image--"],.widefat thead th[class*="--qef-type-gallery--"]{width:80px}.acf-qef-gallery-col{position:relative;width:80px;height:90px}.acf-qef-gallery-col:before,.acf-qef-gallery-col:after{content:"";position:absolute;left:2px;top:2px;width:80px;height:80px;border:2px solid #bbb;border-top-style:none;border-left-style:none}.acf-qef-gallery-col:after{left:6px;top:6px}.acf-qef-gallery-col img{display:none;position:absolute;left:0;top:0;background-color:#ccc;background-size:20px 20px;background-position:0 0,10px 10px;background-image:-o-linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9),-o-linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9);background-image:linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9),linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9)}.acf-qef-gallery-col img:first-child{display:block}.column-_acf_qef_ghost{display:none}.acf-qef-icon{display:block}.acf-qef-icon img{display:block;margin:0 auto}.acf-qef-icon:after{content:attr(title);font-size:9px;line-height:1.4em;display:block;margin-top:.5em;text-align:center}.acf-qef-color-indicator{border-radius:2px;border:1px solid #d2d2d2;width:24px;height:24px}.acf-qef-color-indicator.no-value{position:relative}.acf-qef-color-indicator.no-value:before{content:"";-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);border-radius:2px;background-color:rgba(255,40,40,.9);position:absolute;left:0;top:0;width:140%;height:2px;-webkit-transform-origin:1px 1px;-ms-transform-origin:1px 1px;transform-origin:1px 1px}.inline-edit-col-qed{border-bottom:1px solid #ccc}#wpbody-content .inline-edit-row .inline-edit-col-qed{float:none;clear:both;margin:0 -0.5em;width:auto}.inline-edit-col-qed input[type=radio],.inline-edit-col-qed input[type=checkbox]{height:16px}@media screen and (max-width: 782px){.inline-edit-col-qed input[type=radio],.inline-edit-col-qed input[type=checkbox]{height:25px}}.inline-edit-col-qed legend{margin:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;background:#f1f1f1;font-weight:700;border-bottom:1px solid #ccc;border-top:1px solid #ccc;margin-top:-1px;position:-webkit-sticky;position:sticky;z-index:1;top:32px}#posts-filter .inline-edit-col-qed legend{padding:.5em 1em}@media screen and (max-width: 782px){.inline-edit-col-qed legend{top:47px}}@media screen and (max-width: 600px){.inline-edit-col-qed legend{top:1px}}.inline-edit-col-qed .qed-fields{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:#f9f9f9}.inline-edit-col-qed .acf-field{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;break-inside:avoid;padding:8px;margin:10px;-webkit-box-flex:1;-ms-flex:1 1 31%;flex:1 1 31%;min-width:0;background-color:#fafafa;-webkit-box-shadow:0 0 3px rgba(0,0,0,.1);box-shadow:0 0 3px rgba(0,0,0,.1);border:2px solid transparent}@media screen and (max-width: 782px){.inline-edit-col-qed .acf-field{-ms-flex-preferred-size:45%;flex-basis:45%}}@media screen and (max-width: 600px){.inline-edit-col-qed .acf-field{-ms-flex-preferred-size:auto;flex-basis:auto}}.inline-edit-col-qed .acf-field[data-error-message]{border-color:#dd4232}.inline-edit-col-qed .acf-field[data-error-message]::after{content:attr(data-error-message);display:block;background-color:#f55e4f;color:#fff;margin:0 -10px -10px -10px;padding:10px}.inline-edit-col-qed .acf-input-wrap{display:block}.inline-edit-col-qed .inline-edit-group{display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"dnc op" "label label" "input input"}.inline-edit-col-qed .inline-edit-group>*{max-width:initial !important}.inline-edit-col-qed .inline-edit-group .title{grid-area:label}.inline-edit-col-qed .inline-edit-group .bulk-do-not-change{grid-area:dnc}.inline-edit-col-qed .inline-edit-group .acf-input-wrap{grid-area:input}.inline-edit-col-qed .inline-edit-group .bulk-operations{grid-area:op}.inline-edit-col-qed .acf-checkbox-list,.inline-edit-col-qed .acf-radio-list{display:grid;grid-template-columns:1fr 1fr}@media screen and (max-width: 782px){.inline-edit-col-qed .acf-checkbox-list,.inline-edit-col-qed .acf-radio-list{grid-template-columns:1fr}}.inline-edit-col-qed .acf-checkbox-list label,.inline-edit-col-qed .acf-radio-list label{display:grid;grid-template-columns:-webkit-min-content 1fr;grid-template-columns:min-content 1fr;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}#wpbody-content .bulk-edit-row .inline-edit-col-qed .acf-checkbox-list label,#wpbody-content .bulk-edit-row .inline-edit-col-qed .acf-radio-list label{max-width:initial}.inline-edit-col-qed .acf-checkbox-list input[type=text],.inline-edit-col-qed .acf-radio-list input[type=text]{width:100%}.inline-edit-col-qed [data-field-type=url] input[type=text]{padding-left:27px !important}#posts-filter .acf-notice{clear:both}[data-field-type=color_picker] .acf-input-wrap{overflow:visible;display:inline-block}[data-field-type=color_picker] .wp-picker-container [type=button]:before{content:"";-webkit-transform:rotate(35deg);-ms-transform:rotate(35deg);transform:rotate(35deg);border-radius:2px;background-color:rgba(255,40,40,.9);position:absolute;left:1px;top:1px;width:37px;height:2px;-webkit-transform-origin:1px 1px;-ms-transform-origin:1px 1px;transform-origin:1px 1px}[data-field-type=color_picker] .wp-picker-container [type=button][style*="background-color:"]:before{content:none}[data-field-type=color_picker] .wp-picker-container .wp-picker-holder{position:absolute;bottom:100%;left:0;z-index:1}[data-field-type=color_picker] .wp-picker-container.wp-picker-active .wp-picker-input-wrap label{margin-top:-2px;float:left}[data-field-type=file] .acf-input-wrap,[data-field-type=image] .acf-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;overflow:hidden}[data-field-type=file] .image-content,[data-field-type=image] .image-content{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}[data-field-type=file] .select-media,[data-field-type=image] .select-media{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}[data-field-type=file] .remove-media,[data-field-type=image] .remove-media{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;position:absolute;right:.125em;top:.125em;color:#32373c;width:auto;height:auto;line-height:1em;font-size:24px}[data-field-type=file] .remove-media:hover,[data-field-type=file] .remove-media:active,[data-field-type=image] .remove-media:hover,[data-field-type=image] .remove-media:active{color:#dc3232}[data-field-type=file] .file-content,[data-field-type=image] .file-content{background:#fff;border:1px solid #ccc;-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom-style:none;-webkit-box-flex:1;-ms-flex:1 1;flex:1 1;position:relative;text-align:center}[data-field-type=file] .file-content img,[data-field-type=image] .file-content img{height:100px;width:100%;margin:10px 0 0 0;-o-object-fit:contain;object-fit:contain}[data-field-type=file] .file-content .media-mime,[data-field-type=image] .file-content .media-mime{color:#b4b9be}[data-field-type=file] .file-content .media-title,[data-field-type=image] .file-content .media-title{line-height:1.2;max-height:3.3em;overflow:hidden;display:block;padding:.5em 1em;margin-bottom:10px}[data-field-type=file] .acf-quick-edit-file[value=""]~.remove-media,[data-field-type=file] .acf-quick-edit-file[value=""]~.file-content,[data-field-type=file] .acf-quick-edit-image[value=""]~.remove-media,[data-field-type=file] .acf-quick-edit-image[value=""]~.file-content,[data-field-type=image] .acf-quick-edit-file[value=""]~.remove-media,[data-field-type=image] .acf-quick-edit-file[value=""]~.file-content,[data-field-type=image] .acf-quick-edit-image[value=""]~.remove-media,[data-field-type=image] .acf-quick-edit-image[value=""]~.file-content{display:none}[data-field-type=image] .file-content img{background-color:#ccc;background-size:20px 20px;background-position:0 0,10px 10px;background-image:-o-linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9),-o-linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9);background-image:linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9),linear-gradient(45deg, #f9f9f9 25%, transparent 25%, transparent 75%, #f9f9f9 75%, #f9f9f9)}[data-field-type=link] .acf-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}[data-field-type=link] .link-content{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}[data-field-type=link] .select-link{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}[data-field-type=link] .remove-link{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;position:absolute;right:.125em;top:.125em;color:#32373c;width:auto;height:auto;line-height:1em;font-size:24px}[data-field-type=link] .remove-link:hover,[data-field-type=link] .remove-link:active{color:#dc3232}[data-field-type=link] .link-content{background:#fff;border:1px solid #ccc;-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom-style:none}[data-field-type=link] .link-content a{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.5em 1em;text-decoration:none;line-height:1.4em;vertical-align:top;font-weight:700;position:relative}[data-field-type=link] .link-content a::after{content:attr(href);color:#b4b9be;text-decoration:none;font-weight:400;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;-webkit-column-break-before:always;-moz-column-break-before:always;break-before:always}[data-field-type=link] .link-content a[target=_blank]::before{content:"";font-family:"dashicons";font-size:20px;font-weight:400;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}[data-field-type=link] [data-link-prop=url][value=""]~.remove-link,[data-field-type=link] [data-link-prop=url][value=""]~.link-content{display:none}[data-field-type=range] .acf-range-wrap{display:-webkit-box;display:-ms-flexbox;display:flex}[data-field-type=range] [type=range]{-webkit-box-flex:1;-ms-flex:1;flex:1}[data-field-type=taxonomy][data-field-sub-type=checkbox],[data-field-type=taxonomy][data-field-sub-type=radio]{width:98%} \ No newline at end of file diff --git a/js/acf-quickedit.js b/js/acf-quickedit.js index dbf69c4..65d8011 100644 --- a/js/acf-quickedit.js +++ b/js/acf-quickedit.js @@ -1 +1 @@ -!function n(a,d,o){function s(t,e){if(!d[t]){if(!a[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(l)return l(t,!0);throw(i=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",i}i=d[t]={exports:{}},a[t][0].call(i.exports,function(e){return s(a[t][1][e]||e)},i,i.exports,n,a,d,o)}return d[t].exports}for(var l="function"==typeof require&&require,e=0;e #ui-datepicker-div").length&&(0,i.default)("#ui-datepicker-div").wrap('
'),this},setEditable:function(e){this.parent().setEditable.apply(this,arguments),this.$hidden.prop("disabled",!e)},setValue:function(e){var t;this.dntChanged();try{t=i.default.datepicker.parseDate(this.datePickerArgs.altFormat,e)}catch(e){return this}return this.$input.datepicker("setDate",t),this}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(e,i,t){!function(t){!function(){"use strict";var e,n=(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule?e:{default:e};i.exports={type:"date_time_picker",initialize:function(){var e=this;return this.$input=this.$('[type="text"]'),this.$hidden=this.$('[type="hidden"]'),this.parent().initialize.apply(this,arguments),this.datePickerArgs={altField:this.$hidden,dateFormat:this.$("[data-date_format]").data("date_format"),altFormat:"yy-mm-dd",timeFormat:this.$("[data-time_format]").data("time_format"),altTimeFormat:"HH:mm:ss",altFieldTimeOnly:!1,changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.$("[data-first_day]").data("first_day"),controlType:"select",oneLine:!0},this.$input.datetimepicker(this.datePickerArgs).on("blur",function(){(0,n.default)(this).val()||e.$hidden.val("")}),0<(0,n.default)("body > #ui-datepicker-div").length&&(0,n.default)("#ui-datepicker-div").wrap('
'),this},setEditable:function(e){this.parent().setEditable.apply(this,arguments),this.$hidden.prop("disabled",!e)},setValue:function(e){var t,i;this.dntChanged();try{t=n.default.datepicker.parseDateTime(this.datePickerArgs.altFormat,this.datePickerArgs.altTimeFormat,e)}catch(e){return this}if(t)return i={hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisec:t.getMilliseconds(),microsec:0,timezone:t.getTimezoneOffset()},i=n.default.datepicker.formatDate(this.datePickerArgs.dateFormat,t)+" "+n.default.datepicker.formatTime(this.datePickerArgs.timeFormat,i),this.$hidden.val(e),this.$input.val(i),this}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],10:[function(e,a,t){!function(n){!function(){"use strict";var e,t=(e="undefined"!=typeof window?window.jQuery:void 0!==n?n.jQuery:null)&&e.__esModule?e:{default:e};var i={type:"file",mediaFrameType:"",events:{"click .select-media":"selectFile","click .remove-media":"removeFile"},initialize:function(){this.$input=this.$("button"),this.$hidden=this.$('[type="hidden"]'),this.$img=(0,t.default)("").prependTo(this.$(".file-content")),this.parent().initialize.apply(this,arguments);var i=this,e=acf.get("post_id");this.mediaFrameOpts={field:this.key,multiple:!1,post_id:e,library:this.$hidden.attr("data-library"),mode:"select",type:this.mediaFrameType,select:function(e,t){e&&i.setValue(e.get("id"))}},this.$hidden.data("mime_types")&&(this.mediaFrameOpts.mime_types=this.$hidden.data("mime_types"))},selectFile:function(e){e.preventDefault();var i=acf.media.popup(this.mediaFrameOpts),n=this.$hidden.val();n&&i.on("open",function(){var e=i.state().get("selection"),t=wp.media.attachment(n);t.fetch(),e.add(t?[t]:[])}),acf.isset(window,"wp","media","view","settings","post")&&t.default.isNumeric(this.mediaFrameOpts.post_id)&&(wp.media.view.settings.post.id=this.mediaFrameOpts.post_id)},removeFile:function(e){e.preventDefault(),this.setValue("")},setValue:function(e){var i=this;return this.dntChanged(),(e=parseInt(e))?(this.$hidden.val(e),wp.media.attachment(e).fetch().then(function(e){var t=e.sizes?e.sizes.thumbnail.url:e.icon;i.$img.attr("src",t),i.$(".media-mime").text(e.mime),i.$(".media-title").text(e.title)})):this.$hidden.val(""),this}};i.events['change [type="checkbox"][value="'+acf_qef.options.do_not_change_value+'"]']="dntChanged",a.exports=i}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,i){"use strict";var n,a=(n=e("./file.js"))&&n.__esModule?n:{default:n};t.exports=_.extend({},a.default,{type:"image",mediaFrameType:"image"})},{"./file.js":10}],12:[function(e,a,t){!function(i){!function(){"use strict";var e,n=(e="undefined"!=typeof window?window.jQuery:void 0!==i?i.jQuery:null)&&e.__esModule?e:{default:e};var t={type:"link",events:{"click .select-link":"selectLink","click .remove-link":"resetLink"},initialize:function(){this.$input=this.$("[data-link-prop],button"),this.parent().initialize.apply(this,arguments),this.$display=this.$(".link-content")},resetLink:function(e){e.preventDefault(),this.$input.val(""),this.render()},selectLink:function(e){e.preventDefault();e=this.$("a");e.length||(e=(0,n.default)("").appendTo(this.$display)),(0,n.default)(document).on("wplink-close",this,this.parseCB),acf.wpLink.open(e)},setValue:function(e){var i=this;this.dntChanged(),n.default.each(e,function(e,t){return i.$('[data-link-prop="'+e+'"]').val(t)}),this.render()},parseCB:function(e){var t=e.data;setTimeout(function(){t.parse()},1),(0,n.default)(document).off("wplink-close",e.data.parseCB)},parse:function(){var e=this.$("a");this.$('[data-link-prop="target"]').val(e.attr("target")),this.$('[data-link-prop="url"]').val(e.attr("href")),this.$('[data-link-prop="title"]').val(e.html())},render:function(){var e="",t=this.$('[data-link-prop="target"]').val(),i=this.$('[data-link-prop="url"]').val(),n=this.$('[data-link-prop="title"]').val()||i;i&&(t=t?'target="'.concat(t,'"'):"",e='").concat(n,"")),this.$display.html(e)}};t.events['change [type="checkbox"][value="'+acf_qef.options.do_not_change_value+'"]']="dntChanged",a.exports=t}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"post_object",initialize:function(){this.$input=this.$("select").prop("readonly",!0),this.parent().initialize.apply(this,arguments)},setValue:function(e){this.dntChanged();function t(e){i.$input.append(new Option(e.text,e.id,!0,!0))}var i=this;new acf.models.PostObjectField(this.$input.closest(".acf-field"));return _.isArray(e)?e.map(t):_.isObject(e)&&t(e),this}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(e,i,t){!function(t){!function(){"use strict";var e,n=(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule?e:{default:e};i.exports={type:"radio",initialize:function(){var t,i;this.$input=this.$('[type="radio"]'),this.parent().initialize.apply(this,arguments),this.$('[type="radio"]').prop("readonly",!0),this.$("ul.acf-radio-list.other").length&&(t=this.$('[type="text"]'),this.$('[type="radio"]').on("change",function(e){i=(0,n.default)(this).is('[value="other"]:checked'),t.prop("disabled",!i).prop("readonly",!i)}))},setValue:function(e){this.dntChanged(),this.$('[type="radio"][value="'+e+'"]').prop("checked",!0)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],15:[function(e,n,t){!function(i){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==i?i.jQuery:null)&&e.__esModule;var t={type:"range",events:{'change [type="range"]':"adaptNumber",'mousemove [type="range"]':"adaptNumber",'change [type="number"]':"adaptRange",'mousemove [type="number"]':"adaptRange"},adaptNumber:function(){this.$('[type="number"]').val(this.$('[type="range"]').val())},adaptRange:function(){this.$('[type="range"]').val(this.$('[type="number"]').val())}};t.events['change [type="checkbox"][value="'+acf_qef.options.do_not_change_value+'"]']="dntChanged",n.exports=t}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],16:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"select",initialize:function(){this.parent().initialize.apply(this,arguments),this.$input=this.$("select").prop("readonly",!0)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"taxonomy",initialize:function(){this.parent().initialize.apply(this,arguments),this.$input=this.$('select,input[value!="'+acf_qef.options.do_not_change_value+'"]').prop("readonly",!0)},setValue:function(e){this.dntChanged();function t(e){i?n.$input.append(new Option(e.text,e.id,!0,!0)):n.$input.filter('[value="'.concat(e.id,'"]')).prop("checked",!0)}var i=this.$input.is("select"),n=this;new acf.models.TaxonomyField(this.$input.closest(".acf-field"));_.isArray(e)?e.map(t):_.isObject(e)&&t(e)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],18:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"textarea",initialize:function(){this.$input=this.$("textarea").prop("readonly",!0),this.parent().initialize.apply(this,arguments),this.$input.on("keydown keyup",function(e){13!=e.which&&27!=e.which||e.stopPropagation()})}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,n,t){!function(t){!function(){"use strict";var e,i=(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule?e:{default:e};n.exports={type:"time_picker",initialize:function(){var e=this;return this.$input=this.$('[type="text"]'),this.$hidden=this.$('[type="hidden"]'),this.parent().initialize.apply(this,arguments),this.datePickerArgs={timeFormat:this.$("[data-time_format]").data("time_format"),altTimeFormat:"HH:mm:ss",altField:this.$hidden,altFieldTimeOnly:!1,showButtonPanel:!0,controlType:"select",oneLine:!0},this.$input.timepicker(this.datePickerArgs).on("blur",function(){(0,i.default)(this).val()||e.$hidden.val("")}),0<(0,i.default)("body > #ui-datepicker-div").length&&(0,i.default)("#ui-datepicker-div").wrap('
'),this},setEditable:function(e){this.parent().setEditable.apply(this,arguments),this.$hidden.prop("disabled",!e)},setValue:function(e){var t;this.dntChanged();try{t=i.default.datepicker.parseTime(this.datePickerArgs.altTimeFormat,e)}catch(e){return this}if(t)return this.$hidden.val(e),this.$input.val(i.default.datepicker.formatTime(this.datePickerArgs.timeFormat,t)),this}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"true_false",initialize:function(){this.parent().initialize.apply(this,arguments),this.$('[type="radio"]').prop("readonly",!0)},setValue:function(e){this.dntChanged(),!0!==e&&!1!==e||this.$('[type="radio"][value="'+Number(e)+'"]').prop("checked",!0)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],21:[function(l,u,e){!function(s){!function(){"use strict";var e,a=(e="undefined"!=typeof window?window.jQuery:void 0!==s?s.jQuery:null)&&e.__esModule?e:{default:e},n=l("fields.js");function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var t=Backbone.View.extend({events:{"heartbeat-send.wp-refresh-nonces":"heartbeatListener"},initialize:function(){var i=this;this.active=!0,this.options=arguments[0],Backbone.View.prototype.initialize.apply(this,arguments),this.fields={},this.$(".inline-edit-col-qed [data-key]").each(function(e,t){t=(0,n.factory)(t,this);i.fields[t.key]=t}),Object.keys(this.fields).length&&this.loadValues()},getFieldsToLoad:function(){var i=[];return _.each(this.fields,function(e,t){i.push(e.key)}),i},loadedValues:function(e){this.active&&(this._setValues(e),this.initValidation())},_setValues:function(e){var i=this;_.each(e,function(e,t){t in i.fields?i.fields[t].setValue(e):_.isObject(e)&&i._setValues(e)})},unload:function(e){this.deinitValidation(),_.each(this.fields,function(e){e.unload()}),this.active=!1,acf.unload.reset()},validationComplete:function(e,t){var i=this;return e.valid?acf.unload.off():_.each(e.errors,function(e){var t=e.input.match(/\[([0-9a-z_]+)\]$/g),t=!!t&&t[0].substring(1,t[0].length-1);t in i.fields&&i.fields[t].setError(e.message)}),e},deinitValidation:function(){this.getSaveButton().off("click",this._saveBtnClickHandler)},initValidation:function(){var e=this.$el.closest("form"),t=this.getSaveButton();t.length&&(acf.update("post_id",this.options.object_id),acf.addFilter("validation_complete",this.validationComplete,10,this),t.on("click",this._saveBtnClickHandler),e.data("acf",null),a.default._data(t[0],"events").click.reverse())},_saveBtnClickHandler:function(e){var t=(0,a.default)(this),i=(0,a.default)(this).closest("form");return!!acf.validateForm({form:i,event:!1,reset:!1,success:function(e){t.trigger("click")}})||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!1)}}),i=t.extend({loadValues:function(){var t=this,e=_.extend({},acf_qef.options.request,{object_id:this.options.object_id,acf_field_keys:this.getFieldsToLoad(),_wp_http_referrer:(0,a.default)('[name="_wp_http_referer"]:first').val()});return a.default.post({url:ajaxurl,data:e,success:function(e){t.loadedValues(e.data)}}),this},getSaveButton:function(){return this.$el.closest("form").find("button.save")}}),o=t.extend({initialize:function(){t.prototype.initialize.apply(this,arguments),acf.add_filter("prepare_for_ajax",this.prepareForAjax,null,this)},prepareForAjax:function(e){function n(i){a.default.each(i,function(e,t){t==acf_qef.options.do_not_change_value?delete i[e]:"object"===d(t)&&n(t)})}return e.acf&&n(e.acf),e},loadValues:function(){var e=[];(0,a.default)('[type="checkbox"][name="post[]"]:checked').each(function(){e.push((0,a.default)(this).val())});var t=this,i=_.extend({},acf_qef.options.request,{object_id:e,acf_field_keys:this.getFieldsToLoad(),_wp_http_referrer:(0,a.default)('[name="_wp_http_referer"]:first').val()});return a.default.post({url:ajaxurl,data:i,success:function(e){t.loadedValues(e.data)}}),this},getSaveButton:function(){return this.$('[type="submit"]#bulk_edit')}});u.exports={form:{BulkEdit:o,QuickEdit:i}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"fields.js":4}]},{},[2]); \ No newline at end of file +!function n(a,d,o){function s(t,e){if(!d[t]){if(!a[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(l)return l(t,!0);throw(i=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",i}i=d[t]={exports:{}},a[t][0].call(i.exports,function(e){return s(a[t][1][e]||e)},i,i.exports,n,a,d,o)}return d[t].exports}for(var l="function"==typeof require&&require,e=0;e #ui-datepicker-div").length&&(0,i.default)("#ui-datepicker-div").wrap('
'),this},setEditable:function(e){this.parent().setEditable.apply(this,arguments),this.$hidden.prop("disabled",!e)},setValue:function(e){var t;this.dntChanged();try{t=i.default.datepicker.parseDate(this.datePickerArgs.altFormat,e)}catch(e){return this}return this.$input.datepicker("setDate",t),this}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(e,i,t){!function(t){!function(){"use strict";var e,n=(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule?e:{default:e};i.exports={type:"date_time_picker",initialize:function(){var e=this;return this.$input=this.$('[type="text"]'),this.$hidden=this.$('[type="hidden"]'),this.parent().initialize.apply(this,arguments),this.datePickerArgs={altField:this.$hidden,dateFormat:this.$("[data-date_format]").data("date_format"),altFormat:"yy-mm-dd",timeFormat:this.$("[data-time_format]").data("time_format"),altTimeFormat:"HH:mm:ss",altFieldTimeOnly:!1,changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.$("[data-first_day]").data("first_day"),controlType:"select",oneLine:!0},this.$input.datetimepicker(this.datePickerArgs).on("blur",function(){(0,n.default)(this).val()||e.$hidden.val("")}),0<(0,n.default)("body > #ui-datepicker-div").length&&(0,n.default)("#ui-datepicker-div").wrap('
'),this},setEditable:function(e){this.parent().setEditable.apply(this,arguments),this.$hidden.prop("disabled",!e)},setValue:function(e){var t,i;this.dntChanged();try{t=n.default.datepicker.parseDateTime(this.datePickerArgs.altFormat,this.datePickerArgs.altTimeFormat,e)}catch(e){return this}if(t)return i={hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisec:t.getMilliseconds(),microsec:0,timezone:t.getTimezoneOffset()},i=n.default.datepicker.formatDate(this.datePickerArgs.dateFormat,t)+" "+n.default.datepicker.formatTime(this.datePickerArgs.timeFormat,i),this.$hidden.val(e),this.$input.val(i),this}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],10:[function(e,a,t){!function(n){!function(){"use strict";var e,t=(e="undefined"!=typeof window?window.jQuery:void 0!==n?n.jQuery:null)&&e.__esModule?e:{default:e};var i={type:"file",mediaFrameType:"",events:{"click .select-media":"selectFile","click .remove-media":"removeFile"},initialize:function(){this.$input=this.$("button"),this.$hidden=this.$('[type="hidden"]'),this.$img=(0,t.default)("").prependTo(this.$(".file-content")),this.parent().initialize.apply(this,arguments);var i=this,e=acf.get("post_id");this.mediaFrameOpts={field:this.key,multiple:!1,post_id:e,library:this.$hidden.attr("data-library"),mode:"select",type:this.mediaFrameType,select:function(e,t){e&&i.setValue(e.get("id"))}},this.$hidden.data("mime_types")&&(this.mediaFrameOpts.mime_types=this.$hidden.data("mime_types"))},selectFile:function(e){e.preventDefault();var i=acf.media.popup(this.mediaFrameOpts),n=this.$hidden.val();n&&i.on("open",function(){var e=i.state().get("selection"),t=wp.media.attachment(n);t.fetch(),e.add(t?[t]:[])}),acf.isset(window,"wp","media","view","settings","post")&&t.default.isNumeric(this.mediaFrameOpts.post_id)&&(wp.media.view.settings.post.id=this.mediaFrameOpts.post_id)},removeFile:function(e){e.preventDefault(),this.setValue("")},setValue:function(e){var i=this;return this.dntChanged(),(e=parseInt(e))?(this.$hidden.val(e),wp.media.attachment(e).fetch().then(function(e){var t=e.sizes?e.sizes.thumbnail.url:e.icon;i.$img.attr("src",t),i.$(".media-mime").text(e.mime),i.$(".media-title").text(e.title)})):this.$hidden.val(""),this}};i.events['change [type="checkbox"][value="'+acf_qef.options.do_not_change_value+'"]']="dntChanged",a.exports=i}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,i){"use strict";var n,a=(n=e("./file.js"))&&n.__esModule?n:{default:n};t.exports=_.extend({},a.default,{type:"image",mediaFrameType:"image"})},{"./file.js":10}],12:[function(e,a,t){!function(i){!function(){"use strict";var e,n=(e="undefined"!=typeof window?window.jQuery:void 0!==i?i.jQuery:null)&&e.__esModule?e:{default:e};var t={type:"link",events:{"click .select-link":"selectLink","click .remove-link":"resetLink"},initialize:function(){this.$input=this.$("[data-link-prop],button"),this.parent().initialize.apply(this,arguments),this.$display=this.$(".link-content")},resetLink:function(e){e.preventDefault(),this.$input.val(""),this.render()},selectLink:function(e){e.preventDefault();e=this.$("a");e.length||(e=(0,n.default)("").appendTo(this.$display)),(0,n.default)(document).on("wplink-close",this,this.parseCB),acf.wpLink.open(e)},setValue:function(e){var i=this;this.dntChanged(),n.default.each(e,function(e,t){return i.$('[data-link-prop="'+e+'"]').val(t)}),this.render()},parseCB:function(e){var t=e.data;setTimeout(function(){t.parse()},1),(0,n.default)(document).off("wplink-close",e.data.parseCB)},parse:function(){var e=this.$("a");this.$('[data-link-prop="target"]').val(e.attr("target")),this.$('[data-link-prop="url"]').val(e.attr("href")),this.$('[data-link-prop="title"]').val(e.html())},render:function(){var e="",t=this.$('[data-link-prop="target"]').val(),i=this.$('[data-link-prop="url"]').val(),n=this.$('[data-link-prop="title"]').val()||i;i&&(t=t?'target="'.concat(t,'"'):"",e='").concat(n,"")),this.$display.html(e)}};t.events['change [type="checkbox"][value="'+acf_qef.options.do_not_change_value+'"]']="dntChanged",a.exports=t}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"post_object",initialize:function(){this.acfField=null,this.$input=this.$(".acf-input-wrap select").prop("readonly",!0),this.parent().initialize.apply(this,arguments)},setValue:function(e){this.dntChanged();var t=this,i=acf.models.PostObjectField.extend({$input:function(){return this.$(".acf-input-wrap select")}});this.acfField=new i(this.$input.closest(".acf-field"));i=function(e){t.$input.append(new Option(e.text,e.id,!0,!0))};return _.isArray(e)?e.map(i):_.isObject(e)&&i(e),this},unload:function(){this.acfField.onRemove()}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(e,i,t){!function(t){!function(){"use strict";var e,n=(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule?e:{default:e};i.exports={type:"radio",initialize:function(){var t,i;this.$input=this.$('[type="radio"]'),this.parent().initialize.apply(this,arguments),this.$('[type="radio"]').prop("readonly",!0),this.$("ul.acf-radio-list.other").length&&(t=this.$('[type="text"]'),this.$('[type="radio"]').on("change",function(e){i=(0,n.default)(this).is('[value="other"]:checked'),t.prop("disabled",!i).prop("readonly",!i)}))},setValue:function(e){this.dntChanged();var t=this.$('[type="radio"][value="'+e+'"]');t.length||(t=this.$('[type="radio"][value="other"]')).next('[type="text"]').prop("disabled",!1).val(e),t.prop("checked",!0)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],15:[function(e,n,t){!function(i){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==i?i.jQuery:null)&&e.__esModule;var t={type:"range",events:{'change [type="range"]':"adaptNumber",'mousemove [type="range"]':"adaptNumber",'change [type="number"]':"adaptRange",'mousemove [type="number"]':"adaptRange"},adaptNumber:function(){this.$('[type="number"]').val(this.$('[type="range"]').val())},adaptRange:function(){this.$('[type="range"]').val(this.$('[type="number"]').val())}};t.events['change [type="checkbox"][value="'+acf_qef.options.do_not_change_value+'"]']="dntChanged",n.exports=t}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],16:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"select",initialize:function(){this.parent().initialize.apply(this,arguments),this.$input=this.$(".acf-input-wrap select").prop("readonly",!0)},setValue:function(e){this.dntChanged();this.$input.is("select");var t=this,i=acf.models.SelectField.extend({$input:function(){return this.$(".acf-input-wrap select")}});this.acfField=new i(this.$input.closest(".acf-field"));i=function(e){t.$input.append(new Option(e.text,e.id,!1,!0))};""!==e&&(_.isArray(e)?e.map(i):_.isObject(e)&&i(e)),console.log(this.acfField)},unload:function(){this.acfField.onRemove()}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"taxonomy",initialize:function(){this.acfField=null,this.parent().initialize.apply(this,arguments),this.$input=this.$(".acf-input-wrap select,.acf-input-wrap input").prop("readonly",!0)},setValue:function(e){this.dntChanged();var t=this.$input.is("select"),i=this,n=acf.models.TaxonomyField.extend({$input:function(){return this.$(".acf-input-wrap select")}});this.acfField=new n(this.$input.closest(".acf-field"));n=function(e){t?i.$input.append(new Option(e.text,e.id,!0,!0)):i.$input.filter('[value="'.concat(e.id,'"]')).prop("checked",!0)};_.isArray(e)?e.map(n):_.isObject(e)&&n(e)},unload:function(){this.acfField.onRemove()}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],18:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"textarea",initialize:function(){this.$input=this.$("textarea").prop("readonly",!0),this.parent().initialize.apply(this,arguments),this.$input.on("keydown keyup",function(e){13!=e.which&&27!=e.which||e.stopPropagation()})}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,n,t){!function(t){!function(){"use strict";var e,i=(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule?e:{default:e};n.exports={type:"time_picker",initialize:function(){var e=this;return this.$input=this.$('[type="text"]'),this.$hidden=this.$('[type="hidden"]'),this.parent().initialize.apply(this,arguments),this.datePickerArgs={timeFormat:this.$("[data-time_format]").data("time_format"),altTimeFormat:"HH:mm:ss",altField:this.$hidden,altFieldTimeOnly:!1,showButtonPanel:!0,controlType:"select",oneLine:!0},this.$input.timepicker(this.datePickerArgs).on("blur",function(){(0,i.default)(this).val()||e.$hidden.val("")}),0<(0,i.default)("body > #ui-datepicker-div").length&&(0,i.default)("#ui-datepicker-div").wrap('
'),this},setEditable:function(e){this.parent().setEditable.apply(this,arguments),this.$hidden.prop("disabled",!e)},setValue:function(e){var t;this.dntChanged();try{t=i.default.datepicker.parseTime(this.datePickerArgs.altTimeFormat,e)}catch(e){return this}if(t)return this.$hidden.val(e),this.$input.val(i.default.datepicker.formatTime(this.datePickerArgs.timeFormat,t)),this}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,i,t){!function(t){!function(){"use strict";var e;(e="undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null)&&e.__esModule;i.exports={type:"true_false",initialize:function(){this.parent().initialize.apply(this,arguments),this.$('[type="radio"]').prop("readonly",!0)},setValue:function(e){this.dntChanged(),!0!==e&&!1!==e||this.$('[type="radio"][value="'+Number(e)+'"]').prop("checked",!0)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],21:[function(e,n,t){!function(i){!function(){"use strict";var e,t=(e="undefined"!=typeof window?window.jQuery:void 0!==i?i.jQuery:null)&&e.__esModule?e:{default:e};n.exports={type:"url",events:{'change [type="checkbox"][data-is-do-not-change="true"]':"dntChanged","change .bulk-operations select":"setBulkOperation"},setBulkOperation:function(e){""===(0,t.default)(e.target).val()?this.$input.attr("type","url"):this.$input.attr("type","text")}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],22:[function(l,u,e){!function(s){!function(){"use strict";var e,a=(e="undefined"!=typeof window?window.jQuery:void 0!==s?s.jQuery:null)&&e.__esModule?e:{default:e},n=l("fields.js");function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var t=Backbone.View.extend({events:{"heartbeat-send.wp-refresh-nonces":"heartbeatListener"},initialize:function(){var i=this;this.active=!0,this.options=arguments[0],Backbone.View.prototype.initialize.apply(this,arguments),this.fields={},this.$(".inline-edit-col-qed [data-key]").each(function(e,t){t=(0,n.factory)(t,this);i.fields[t.key]=t}),Object.keys(this.fields).length&&this.loadValues()},getFieldsToLoad:function(){var i=[];return _.each(this.fields,function(e,t){i.push(e.key)}),i},loadedValues:function(e){this.active&&(this._setValues(e),this.initValidation())},_setValues:function(e){var i=this;_.each(e,function(e,t){t in i.fields?i.fields[t].setValue(e):_.isObject(e)&&i._setValues(e)})},unload:function(e){this.deinitValidation(),_.each(this.fields,function(e){e.unload()}),this.active=!1,acf.unload.reset()},validationComplete:function(e,t){var i=this;return e.valid?acf.unload.off():_.each(e.errors,function(e){var t=e.input.match(/\[([0-9a-z_]+)\]$/g),t=!!t&&t[0].substring(1,t[0].length-1);t in i.fields&&i.fields[t].setError(e.message)}),e},deinitValidation:function(){this.getSaveButton().off("click",this._saveBtnClickHandler)},initValidation:function(){var e=this.$el.closest("form"),t=this.getSaveButton();t.length&&(acf.update("post_id",this.options.object_id),acf.addFilter("validation_complete",this.validationComplete,10,this),t.on("click",this._saveBtnClickHandler),e.data("acf",null),a.default._data(t[0],"events").click.reverse())},_saveBtnClickHandler:function(e){var t=(0,a.default)(this),i=(0,a.default)(this).closest("form");return!!acf.validateForm({form:i,event:!1,reset:!1,success:function(e){t.trigger("click")}})||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!1)}}),i=t.extend({loadValues:function(){var t=this,e=_.extend({},acf_qef.options.request,{object_id:this.options.object_id,acf_field_keys:this.getFieldsToLoad(),_wp_http_referrer:(0,a.default)('[name="_wp_http_referer"]:first').val()});return a.default.post({url:ajaxurl,data:e,success:function(e){t.loadedValues(e.data)}}),this},getSaveButton:function(){return this.$el.closest("form").find("button.save")}}),o=t.extend({initialize:function(){t.prototype.initialize.apply(this,arguments),acf.add_filter("prepare_for_ajax",this.prepareForAjax,null,this)},prepareForAjax:function(e){function n(i){a.default.each(i,function(e,t){t==acf_qef.options.do_not_change_value?delete i[e]:"object"===d(t)&&n(t)})}return e.acf&&n(e.acf),e},loadValues:function(){var e=[];(0,a.default)('[type="checkbox"][name="post[]"]:checked').each(function(){e.push((0,a.default)(this).val())});var t=this,i=_.extend({},acf_qef.options.request,{object_id:e,acf_field_keys:this.getFieldsToLoad(),_wp_http_referrer:(0,a.default)('[name="_wp_http_referer"]:first').val()});return a.default.post({url:ajaxurl,data:i,success:function(e){t.loadedValues(e.data)}}),this},getSaveButton:function(){return this.$('[type="submit"]#bulk_edit')}});u.exports={form:{BulkEdit:o,QuickEdit:i}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"fields.js":4}]},{},[2]); \ No newline at end of file diff --git a/package.json b/package.json index 30a3a3f..e9514d8 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "rollback": "git reset --hard HEAD~ && git push origin +master", "postinstall": "composer install", "audit": "./vendor/squizlabs/php_codesniffer/bin/phpcs . --report=code --standard=./phpcs-security.ruleset.xml -n -s > ./phpcs-report.txt || exit 0", - "ver": "echo \" include/version.php" + "ver": "echo \" include/version.php", + "fieldkey": "php -r \"echo uniqid(\\\"field_\\\") . \\\"\n\\\";\"" }, "repository": { "type": "git", @@ -119,4 +120,4 @@ "svn": "https://plugins.svn.wordpress.org/acf-quickedit-fields/" } } -} \ No newline at end of file +} diff --git a/readme.txt b/readme.txt index 882b85b..720cfdd 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.msf.org/donate Tags: acf, quickedit, columns, bulk edit Requires at least: 4.7 Tested up to: 6.0 -Requires PHP: 5.6 +Requires PHP: 7.2 Stable tag: 3.1.14 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -85,6 +85,13 @@ On the whole upgrading is always a good idea. == Changelog == += 3.2.0 = + - Feature: Column filter + - Feature: Bulk operations + - UI Improvement: Display non-multiple values + - UI Improvement: Show UI labels in column view for True/False Fields + - Bugfix: Radio and checkbox fields did not show custom values + = 3.1.14 = - Fix Field group settings for ACF 6 - Introduce Legacy mode for ACF < 6.0.0