Photo Gallery by Envira – Responsive Image Gallery for WordPress - Version 1.2.6

Version Description

  • Added: Insert Images Modal automatically loads more images on scroll
  • Added: Insert Images Modal search functionality performance improved
  • Fix: Better Insert Images Modal image grid layout for WordPress 4.0+
Download this release

Release Info

Developer n7studios
Plugin Icon 128x128 Photo Gallery by Envira – Responsive Image Gallery for WordPress
Version 1.2.6
Comparing to
See all releases

Code changes from version 1.2.5 to 1.2.6

assets/css/attachment-details-modal-support.css ADDED
@@ -0,0 +1 @@
 
1
+ .media-sidebar .setting,.attachment-details .setting{display:block;float:left;width:100%;margin:1px 0}.media-sidebar .setting label,.attachment-details .setting label{display:block}.media-sidebar .setting .link-to-custom,.attachment-details .setting .link-to-custom{margin:3px 2px 0}.media-sidebar .setting span,.attachment-details .setting span{min-width:30%;margin-right:4%;font-size:12px;text-align:right}.media-sidebar .setting select,.attachment-details .setting select{max-width:65%}.media-sidebar .setting input[type="checkbox"],.media-sidebar .field input[type="checkbox"],.media-sidebar .setting input[type="radio"],.media-sidebar .field input[type="radio"],.attachment-details .setting input[type="checkbox"],.attachment-details .field input[type="checkbox"],.attachment-details .setting input[type="radio"],.attachment-details .field input[type="radio"]{float:none;margin:8px 3px 0;padding:0}.media-sidebar .setting span,.attachment-details .setting span,.compat-item label span{float:left;min-height:22px;padding-top:8px;line-height:16px;font-weight:normal;color:#666}.compat-item label span{text-align:right}.media-sidebar .setting input[type="text"],.media-sidebar .setting input[type="password"],.media-sidebar .setting input[type="email"],.media-sidebar .setting input[type="number"],.media-sidebar .setting input[type="search"],.media-sidebar .setting input[type="tel"],.media-sidebar .setting input[type="url"],.media-sidebar .setting textarea,.media-sidebar .setting .value,.attachment-details .setting input[type="text"],.attachment-details .setting input[type="password"],.attachment-details .setting input[type="email"],.attachment-details .setting input[type="number"],.attachment-details .setting input[type="search"],.attachment-details .setting input[type="tel"],.attachment-details .setting input[type="url"],.attachment-details .setting textarea,.attachment-details .setting .value{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin:1px;width:65%;float:right}.media-sidebar .setting .value,.attachment-details .setting .value{margin:0 1px;text-align:left}.media-sidebar .setting textarea,.attachment-details .setting textarea,.compat-item .field textarea{height:62px;resize:vertical}.media-sidebar select,.attachment-details select{margin-top:3px}.edit-attachment-frame{display:block;height:100%;width:100%}.edit-attachment-frame .edit-media-header{overflow:hidden}.upload-php .media-modal-close .media-modal-icon:before{content:'\f335';font-size:22px}.upload-php .media-modal-close .media-modal-icon{margin:14px;width:22px}.upload-php .media-modal-close,.edit-attachment-frame .edit-media-header .left,.edit-attachment-frame .edit-media-header .right{cursor:pointer;color:#777;background-color:transparent;height:50px;width:50px;padding:0;position:absolute;text-align:center;border:0;border-left:1px solid #ddd;-webkit-transition:color .1s ease-in-out, background .1s ease-in-out;transition:color .1s ease-in-out, background .1s ease-in-out}.upload-php .media-modal-close{top:0;right:0}.edit-attachment-frame .edit-media-header .left{right:102px}.edit-attachment-frame .edit-media-header .right{right:51px}.edit-attachment-frame .media-frame-title{left:0;right:150px}.edit-attachment-frame .edit-media-header .right:before,.edit-attachment-frame .edit-media-header .left:before{font:normal 20px/50px 'dashicons' !important;display:inline;font-weight:300}.upload-php .media-modal-close:hover,.upload-php .media-modal-close:focus,.edit-attachment-frame .edit-media-header .left:hover,.edit-attachment-frame .edit-media-header .right:hover,.edit-attachment-frame .edit-media-header .left:focus,.edit-attachment-frame .edit-media-header .right:focus{background:#ddd;border-color:#ccc;color:#000;outline:none}.upload-php .media-modal-close:focus .media-modal-icon:before,.upload-php .media-modal-close:hover .media-modal-icon:before{color:#000}.edit-attachment-frame .edit-media-header .left:before,.rtl .edit-attachment-frame .edit-media-header .right:before{content:'\f341'}.edit-attachment-frame .edit-media-header .right:before,.rtl .edit-attachment-frame .edit-media-header .left:before{content:'\f345'}.edit-attachment-frame .edit-media-header .left.disabled,.edit-attachment-frame .edit-media-header .right.disabled,.edit-attachment-frame .edit-media-header .left.disabled:hover,.edit-attachment-frame .edit-media-header .right.disabled:hover{color:#ccc;background:inherit;cursor:default;pointer-events:none}.edit-attachment-frame .media-frame-content,.edit-attachment-frame .media-frame-router{left:0}.edit-attachment-frame .media-frame-content{border-bottom:none;bottom:0;top:50px}.edit-attachment-frame .attachment-details{position:absolute;overflow:auto;top:0;bottom:0;right:0;left:0;-webkit-box-shadow:inset 0px 4px 4px -4px rgba(0,0,0,0.1);box-shadow:inset 0px 4px 4px -4px rgba(0,0,0,0.1)}.edit-attachment-frame .attachment-media-view{float:left;width:65%;height:100%}.edit-attachment-frame .attachment-media-view .thumbnail{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:16px;height:100%}.edit-attachment-frame .attachment-media-view .details-image{display:block;margin-bottom:16px;max-width:100%;max-height:90%;max-height:-webkit-calc( 100% - 42px );max-height:calc( 100% - 42px )}.edit-attachment-frame .wp-media-wrapper{margin-bottom:12px}.edit-attachment-frame input,.edit-attachment-frame textarea{padding:6px 8px;line-height:16px}.edit-attachment-frame .attachment-info{overflow:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding:12px 16px 0;width:35%;height:100%;-webkit-box-shadow:inset 0px 4px 4px -4px rgba(0,0,0,0.1);box-shadow:inset 0px 4px 4px -4px rgba(0,0,0,0.1);border-bottom:0;border-left:1px solid #ddd;background:#f3f3f3}.edit-attachment-frame .attachment-info .details,.edit-attachment-frame .attachment-info .settings{position:relative;overflow:hidden;float:none;margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid #ddd}.edit-attachment-frame .attachment-info .filename{font-weight:normal;color:#666}.edit-attachment-frame .attachment-info .thumbnail{margin-bottom:12px}.attachment-info .actions{margin-bottom:16px}.attachment-info .actions a{display:inline;text-decoration:none}
assets/css/metabox.css CHANGED
@@ -1 +1 @@
1
- .envira-gallery-spinner{float:none;display:inline-block;margin-top:0}#envira-gallery{position:relative}#envira-gallery .envira-clear{clear:both}#envira-gallery .envira-clear:after{clear:both;content:'.';display:block;height:0;line-height:0;overflow:auto;visibility:hidden;zoom:1}#envira-gallery p.description{font-size:13px}#envira-gallery .inside{margin:10px 0;padding:0 10px}#envira-gallery #envira-tabs{position:relative}#envira-gallery #envira-tabs-nav{list-style:none;margin:0 0 10px;padding:0;border-bottom:1px solid #cecece}#envira-gallery #envira-tabs-nav li{float:left;margin:0 10px -1px 0}#envira-gallery #envira-tabs-nav li a{display:block;padding:7px 10px 5px;font-size:14px;color:#aaa;font-weight:300;text-decoration:none;outline:none}#envira-gallery #envira-tabs-nav li.envira-active a{border:1px solid #cecece;border-bottom-color:#fff;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;color:#21759b;padding-top:6px}#envira-gallery #envira-tabs-nav li a:hover{color:#21759b}#envira-gallery .envira-meta-close-text{display:none;color:#fff;font-style:italic;font-size:11px;position:absolute;z-index:98;top:6px;right:27px}#envira-gallery .envira-helper-active .envira-meta-close-text{display:inline}#envira-gallery .envira-meta-icon{position:absolute;width:19px;height:16px;top:6px;right:0;background:url(images/meta.png) no-repeat scroll 0 0;display:block;outline:none;z-index:98}#envira-gallery .envira-helper-active .envira-meta-icon{background-image:url(images/meta-active.png)}#envira-gallery .envira-meta-information{display:none;padding:0 1em 1em;position:absolute;right:0;top:30px;width:278px;background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.7);box-shadow:0 5px 15px rgba(0,0,0,0.7);z-index:98}#envira-gallery .envira-helper-active .envira-meta-information{display:block}#envira-gallery .envira-meta-helper-overlay{position:absolute;z-index:97;background:#000;opacity:.7;filter:alpha(opacity=70);width:100%;height:100%}#envira-gallery .envira-tab{display:none}#envira-gallery .envira-tab.envira-active{display:block}#envira-gallery .envira-tab p.envira-intro{margin:1.5em 0 .5em}#envira-gallery .envira-tab th,#envira-gallery .envira-tab input[type="text"],#envira-gallery .envira-tab input[type="number"],#envira-gallery .envira-tab input[type="password"],#envira-gallery .envira-tab select{width:210px;padding-right:0}#envira-gallery .envira-progress-bar{display:none;width:100%;position:relative;height:10px;width:100%;margin:10px auto;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,0.1)}#envira-gallery .envira-progress-bar div{height:10px;min-width:20px;width:0;background:#aaa;background:rgba(0,0,0,0.2);border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}#envira-gallery .upload-flash-bypass{display:none}#envira-gallery .max-upload-size{display:block;margin:10px 0}#envira-gallery .envira-tab{min-height:320px}#envira-gallery #envira-gallery-output{margin:20px 0 10px;padding:0;list-style:none}#envira-gallery #envira-gallery-output li{background:#fff;display:block;float:left;margin:0 10px 10px 0;padding:4px;list-style:none;border:1px solid #cecece;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.06);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.06);box-shadow:0 1px 2px rgba(0,0,0,0.06);cursor:move;position:relative;width:150px;height:150px}#envira-gallery #envira-gallery-output li.envira-gallery-status-pending{background-color:#faebcc;border-color:#8a6d3b}#envira-gallery #envira-gallery-output li.envira-gallery-status-active{background-color:#dff0d8;border-color:#3c763d}#envira-gallery #envira-gallery-output li.dropzone{background:transparent;border:1px dashed #d5d5d5;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}#envira-gallery #envira-gallery-output li img{display:block;margin:auto;position:absolute;top:0;left:0;right:0;bottom:0;max-width:150px;max-height:150px}#envira-gallery #envira-gallery-output li .envira-gallery-remove-image{background:url(images/delete.png) no-repeat scroll 0 0;display:block;height:16px;left:-8px;outline:none;position:absolute;top:-8px;width:16px;z-index:20}#envira-gallery #envira-gallery-output li .envira-gallery-modify-image{background:url(images/modify.png) no-repeat scroll 0 0;display:block;height:16px;left:12px;outline:none;position:absolute;top:-8px;width:16px;z-index:20}#media-items .media-item .edit-attachment,.envira-gallery-media-frame .upload-flash-bypass{display:none !important}#media-items{margin:0 0 16px;overflow:hidden;width:100%}#media-items .media-item{width:auto;float:left;margin:0 8px 8px 0}#media-items .media-item img{max-width:150px;max-height:150px;float:none;margin:4px;display:block}.envira-gallery-gallery{padding-left:7px}.envira-gallery-gallery .attachment{margin:8px}.envira-gallery-gallery .attachment-preview,.envira-gallery-gallery .attachment-preview .thumbnail{max-width:150px;max-height:150px}.envira-gallery-media-frame .max-upload-size{display:block;margin:1em 0}.envira-gallery-media-frame .envira-gallery-library-toolbar{top:5px}.envira-gallery-media-frame .attachment.envira-gallery-in-gallery{box-shadow:0 0 0 1px #fff, 0 0 0 5px #519e0c}.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .attachment-preview,.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .attachment-preview .check{cursor:default}.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .check{box-shadow:0 0 0 1px #519e0c;background:#519e0c;background-image:-webkit-gradient(linear, left top, left bottom, from(#519e0c), to(#519e0c));background-image:-webkit-linear-gradient(top, #519e0c, #407f08);background-image:-moz-linear-gradient(top, #519e0c, #407f08);background-image:-o-linear-gradient(top, #519e0c, #407f08);background-image:linear-gradient(to bottom, #519e0c, #407f08)}.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .check div,.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .check:hover div{background-position:-21px 0}.envira-gallery-meta-wrap .envira-gallery-meta-sidebar{overflow:auto;position:relative}.envira-gallery-media-frame .media-sidebar h3{margin:1.1em 0 1em}.envira-gallery-media-frame .media-sidebar p{margin:0 0 1.5em}.envira-gallery-meta{overflow:auto;padding:0 16px}.media-frame.envira-gallery-media-frame input:focus,.media-frame.envira-gallery-media-frame textarea:focus,.media-frame.envira-gallery-media-frame select:focus{border-color:#aaa}.envira-gallery-meta-wrap .envira-gallery-meta.attachments{top:0}.envira-gallery-meta.attachments .attachment{width:200px;height:200px;border:none !important}.envira-gallery-meta.attachments .attachment.selected{width:200px;height:200px}.envira-gallery-meta.attachments .attachment .attachment-preview{width:100%;height:100%;border:none !important}.envira-gallery-meta.attachments .attachment .attachment-preview:before{padding-top:0;border:none !important}.envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail{display:table;position:relative;top:auto;right:auto;bottom:auto;left:auto;border:none !important}.envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail:after{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}.envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail .inside{display:table-cell;width:200px;height:200px;text-align:center;vertical-align:middle;border:none !important}.envira-gallery-ui-content{top:16px !important}.envira-gallery-meta-wrap .form-table{margin:0}.envira-gallery-meta-wrap .form-table input[type=text],.envira-gallery-meta-wrap .form-table textarea{width:100%}#envira-gallery .envira-gallery-import-form{margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid #ddd}#envira-gallery .envira-unit{font-style:normal;font-weight:700;font-size:13px}#envira-gallery textarea{width:100%}.envira-alert{padding:15px;margin-bottom:20px;border:1px solid #faebcc;border-radius:4px;background-color:#fcf8e3;color:#8a6d3b}#envira-gallery-plupload-upload-ui{position:relative}#envira-gallery-drag-drop-area{border:4px dashed #bbb;height:200px}#envira-gallery-plupload-upload-ui.drag-over #envira-gallery-drag-drop-area{border-color:#83b4d8}#envira-gallery .envira-gallery-progress-bar{display:none;width:100%;position:relative;height:10px;width:100%;margin:10px auto;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,0.1)}#envira-gallery .envira-gallery-progress-bar div{height:10px;min-width:20px;width:0;background:#aaa;background:rgba(0,0,0,0.2);border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}#envira-gallery .upload-flash-bypass{display:none}#envira-gallery .max-upload-size{display:block;margin:10px 0}@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx){#envira-gallery .envira-meta-icon{background-image:url(images/meta@2x.png);background-size:19px 16px}#envira-gallery .envira-helper-active .envira-meta-icon{background-image:url(images/meta-active@2x.png);background-size:19px 16px}#envira-gallery #envira-gallery-output li .envira-gallery-remove-image{background-image:url(images/delete@2x.png);background-size:16px 16px}#envira-gallery #envira-gallery-output li .envira-gallery-modify-image{background-image:url(images/modify@2x.png);background-size:16px 16px}}
1
+ .envira-gallery-spinner{float:none;display:inline-block;margin-top:0}#envira-gallery{position:relative}#envira-gallery .envira-clear{clear:both}#envira-gallery .envira-clear:after{clear:both;content:'.';display:block;height:0;line-height:0;overflow:auto;visibility:hidden;zoom:1}#envira-gallery p.description{font-size:13px}#envira-gallery .inside{margin:10px 0;padding:0 10px}#envira-gallery #envira-tabs{position:relative}#envira-gallery #envira-tabs-nav{list-style:none;margin:0 0 10px;padding:0;border-bottom:1px solid #cecece}#envira-gallery #envira-tabs-nav li{float:left;margin:0 10px -1px 0}#envira-gallery #envira-tabs-nav li a{display:block;padding:7px 10px 5px;font-size:14px;color:#aaa;font-weight:300;text-decoration:none;outline:none}#envira-gallery #envira-tabs-nav li.envira-active a{border:1px solid #cecece;border-bottom-color:#fff;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;color:#21759b;padding-top:6px}#envira-gallery #envira-tabs-nav li a:hover{color:#21759b}#envira-gallery-types-nav{margin:10px 0;padding:10px 0;border-top:1px solid #eee;border-bottom:1px solid #eee}#envira-gallery-types-nav li{float:left;margin:0 10px 0 0}#envira-gallery-types-nav li.envira-gallery-type-label{margin-right:20px}#envira-gallery-types-nav li.envira-gallery-type-label span{font-weight:700;font-size:13px;vertical-align:middle}#envira-gallery .envira-meta-close-text{display:none;color:#fff;font-style:italic;font-size:11px;position:absolute;z-index:98;top:6px;right:27px}#envira-gallery .envira-helper-active .envira-meta-close-text{display:inline}#envira-gallery .envira-meta-icon{position:absolute;width:19px;height:16px;top:6px;right:0;background:url(images/meta.png) no-repeat scroll 0 0;display:block;outline:none;z-index:98}#envira-gallery .envira-helper-active .envira-meta-icon{background-image:url(images/meta-active.png)}#envira-gallery .envira-meta-information{display:none;padding:0 1em 1em;position:absolute;right:0;top:30px;width:278px;background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.7);box-shadow:0 5px 15px rgba(0,0,0,0.7);z-index:98}#envira-gallery .envira-helper-active .envira-meta-information{display:block}#envira-gallery .envira-meta-helper-overlay{position:absolute;z-index:97;background:#000;opacity:.7;filter:alpha(opacity=70);width:100%;height:100%}#envira-gallery .envira-tab{display:none}#envira-gallery .envira-tab.envira-active{display:block}#envira-gallery .envira-tab p.envira-intro{margin:1.5em 0 .5em}#envira-gallery .envira-tab th,#envira-gallery .envira-tab input[type="text"],#envira-gallery .envira-tab input[type="number"],#envira-gallery .envira-tab input[type="password"],#envira-gallery .envira-tab select{width:210px;padding-right:0}#envira-gallery .envira-tab tr td label{margin:0 10px 0 0}#envira-gallery .envira-progress-bar{display:none;width:100%;position:relative;height:10px;width:100%;margin:10px auto;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,0.1)}#envira-gallery .envira-progress-bar div{height:10px;min-width:20px;width:0;background:#aaa;background:rgba(0,0,0,0.2);border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}#envira-gallery .upload-flash-bypass{display:none}#envira-gallery .max-upload-size{display:block;margin:10px 0}#envira-gallery .envira-tab{min-height:320px}#envira-gallery #envira-gallery-output{margin:20px 0 10px;padding:0;list-style:none}#envira-gallery #envira-gallery-output li{background:#fff;display:block;float:left;margin:0 10px 10px 0;padding:4px;list-style:none;border:1px solid #cecece;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.06);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.06);box-shadow:0 1px 2px rgba(0,0,0,0.06);cursor:move;position:relative;width:150px;height:150px}#envira-gallery #envira-gallery-output li a.check{display:none;position:absolute;right:5px;top:5px;width:24px;height:24px;background-color:#1e8cbe;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #1e8cbe;box-shadow:0 0 0 1px #fff,0 0 0 2px #1e8cbe}#envira-gallery #envira-gallery-output li a.check div.media-modal-icon{width:15px;height:15px;margin:5px 0 0 5px;background-position:-21px 0}#envira-gallery #envira-gallery-output li.selected{width:148px;height:148px;border:2px solid #1e8cbe;-webkit-box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #1e8cbe;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 7px #1e8cbe}#envira-gallery #envira-gallery-output li.selected a.check{display:block}#envira-gallery #envira-gallery-output li.envira-gallery-status-pending{background-color:#faebcc;border-color:#8a6d3b}#envira-gallery #envira-gallery-output li.envira-gallery-status-active{background-color:#dff0d8;border-color:#3c763d}#envira-gallery #envira-gallery-output li.dropzone{background:transparent;border:1px dashed #d5d5d5;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}#envira-gallery #envira-gallery-output li img{display:block;margin:auto;position:absolute;top:0;left:0;right:0;bottom:0;max-width:150px;max-height:150px}#envira-gallery #envira-gallery-output li .envira-gallery-remove-image{background:url(images/delete.png) no-repeat scroll 0 0;display:block;height:16px;left:-8px;outline:none;position:absolute;top:-8px;width:16px;z-index:20}#envira-gallery #envira-gallery-output li .envira-gallery-modify-image{background:url(images/modify.png) no-repeat scroll 0 0;display:block;height:16px;left:12px;outline:none;position:absolute;top:-8px;width:16px;z-index:20}#media-items .media-item .edit-attachment,.envira-gallery-media-frame .upload-flash-bypass{display:none !important}#media-items{margin:0 0 16px;overflow:hidden;width:100%}#media-items .media-item{width:auto;float:left;margin:0 8px 8px 0}#media-items .media-item img{max-width:164px;max-height:164px;float:none;margin:4px;display:block}.envira-gallery-gallery{padding-left:7px}.envira-gallery-gallery .attachment{margin:8px;max-width:164px}.envira-gallery-gallery .attachment-preview,.envira-gallery-gallery .attachment-preview .thumbnail{max-width:164px;max-height:164px}.envira-gallery-media-frame .max-upload-size{display:block;margin:1em 0}.envira-gallery-media-frame .envira-gallery-library-toolbar{top:5px}.envira-gallery-media-frame .attachment.envira-gallery-in-gallery{box-shadow:inset 0 0 0 3px #fff, inset 0 0 0 7px #519e0c}.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .attachment-preview,.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .attachment-preview .check{cursor:default}.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .check{box-shadow:0 0 0 1px #519e0c;background:#519e0c;background-image:-webkit-gradient(linear, left top, left bottom, from(#519e0c), to(#519e0c));background-image:-webkit-linear-gradient(top, #519e0c, #407f08);background-image:-moz-linear-gradient(top, #519e0c, #407f08);background-image:-o-linear-gradient(top, #519e0c, #407f08);background-image:linear-gradient(to bottom, #519e0c, #407f08)}.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .check div,.envira-gallery-media-frame .attachment.envira-gallery-in-gallery .check:hover div{background-position:-21px 0}.envira-gallery-meta-wrap .envira-gallery-meta-sidebar{overflow:auto;position:relative}.envira-gallery-media-frame .media-sidebar h3{margin:1.1em 0 1em}.envira-gallery-media-frame .media-sidebar p{margin:0 0 1.5em}.envira-gallery-meta{overflow:auto;padding:0 16px}.media-frame.envira-gallery-media-frame input:focus,.media-frame.envira-gallery-media-frame textarea:focus,.media-frame.envira-gallery-media-frame select:focus{border-color:#aaa}.envira-gallery-meta-wrap .envira-gallery-meta.attachments{top:0}.envira-gallery-meta.attachments .attachment{width:200px;height:200px;border:none !important}.envira-gallery-meta.attachments .attachment.selected{width:200px;height:200px}.envira-gallery-meta.attachments .attachment .attachment-preview{width:100%;height:100%;border:none !important}.envira-gallery-meta.attachments .attachment .attachment-preview:before{padding-top:0;border:none !important}.envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail{display:table;position:relative;top:auto;right:auto;bottom:auto;left:auto;border:none !important}.envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail:after{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}.envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail .inside{display:table-cell;width:200px;height:200px;text-align:center;vertical-align:middle;border:none !important}.envira-gallery-ui-content{top:16px !important}.envira-gallery-meta-wrap .form-table{margin:0}.envira-gallery-meta-wrap .form-table input[type=text],.envira-gallery-meta-wrap .form-table textarea{width:100%}#envira-gallery .envira-gallery-import-form{margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid #ddd}#envira-gallery .envira-unit{font-style:normal;font-weight:700;font-size:13px}#envira-gallery textarea{width:100%}.envira-alert{padding:15px;margin-bottom:20px;border:1px solid #faebcc;border-radius:4px;background-color:#fcf8e3;color:#8a6d3b}#envira-gallery-plupload-upload-ui{position:relative}#envira-gallery-drag-drop-area{border:4px dashed #bbb;height:200px}#envira-gallery-plupload-upload-ui.drag-over #envira-gallery-drag-drop-area{border-color:#83b4d8}#envira-gallery .envira-gallery-progress-bar{display:none;width:100%;position:relative;height:10px;width:100%;margin:10px auto;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,0.1)}#envira-gallery .envira-gallery-progress-bar div{height:10px;min-width:20px;width:0;background:#aaa;background:rgba(0,0,0,0.2);border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}#envira-gallery .upload-flash-bypass{display:none}#envira-gallery .max-upload-size{display:block;margin:10px 0}.envira-gallery-meta-container button.right{border-right:1px solid #ddd !important}.envira-gallery-meta-container .setting span.name{min-width:20%;text-align:left}.envira-gallery-meta-container .setting input[type=text]{width:75%}.envira-gallery-meta-container .setting textarea{height:150px}.envira-gallery-meta-container .setting .wp-editor-wrap{float:right;width:75%}.envira-gallery-meta-container #wp-link{float:left;width:100%}.envira-gallery-meta-container #wp-link #search-panel{display:block;float:left;width:100%}.envira-gallery-meta-container #wp-link #search-panel .link-search-wrapper{float:left;width:100%;margin:0}.envira-gallery-meta-container #wp-link #search-panel .link-search-wrapper label{display:block;float:left;width:100%;margin:1px 0}.envira-gallery-meta-container #wp-link #search-panel .link-search-wrapper label span.name{display:none}.envira-gallery-meta-container #wp-link #search-panel .link-search-wrapper label input{float:right;width:75%;max-width:75%}.envira-gallery-meta-container #wp-link #search-panel #search-results{position:relative;float:right;width:75%;max-width:75%;margin:-2px 0 0 0;display:block;top:0;left:0;right:0;bottom:0;border:none;border-left:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf;border-right:1px solid #dfdfdf}.envira-gallery-meta-container #wp-link #search-panel #most-recent-results{display:none}.envira-gallery-meta-container div.actions a.button{display:inline-block}@media only screen and (max-width: 959px){.envira-gallery-meta-container .setting span.name{width:100%;max-width:100%;min-width:100%}.envira-gallery-meta-container .setting input[type=text]{width:100%}.envira-gallery-meta-container .setting input[type=checkbox]{clear:both}.envira-gallery-meta-container .setting .wp-editor-wrap{float:left;width:100%}}@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx){#envira-gallery .envira-meta-icon{background-image:url(images/meta@2x.png);background-size:19px 16px}#envira-gallery .envira-helper-active .envira-meta-icon{background-image:url(images/meta-active@2x.png);background-size:19px 16px}#envira-gallery #envira-gallery-output li .envira-gallery-remove-image{background-image:url(images/delete@2x.png);background-size:16px 16px}#envira-gallery #envira-gallery-output li .envira-gallery-modify-image{background-image:url(images/modify@2x.png);background-size:16px 16px}}
assets/js/metabox.js CHANGED
@@ -108,76 +108,64 @@
108
  $(this).parent().parent().addClass('details selected');
109
  });
110
 
111
- // Load more images into the library view.
112
- $('.envira-gallery-load-library').on('click', function(e){
113
- e.preventDefault();
114
- var $this = $(this);
115
- $this.next().css({'display' : 'inline-block', 'margin-top' : '14px', 'margin-left' : '-5px'});
116
 
117
- // Prepare our data to be sent via Ajax.
118
- var load = {
119
- action: 'envira_gallery_load_library',
120
- offset: parseInt($this.attr('data-envira-gallery-offset')),
121
- post_id: envira_gallery_metabox.id,
122
- nonce: envira_gallery_metabox.load_gallery
123
- };
124
 
125
- // Process the Ajax response and output all the necessary data.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  $.post(
127
  envira_gallery_metabox.ajax,
128
- load,
 
 
 
 
 
 
129
  function(response) {
130
- $this.attr('data-envira-gallery-offset', parseInt($this.attr('data-envira-gallery-offset')) + 20);
 
 
 
 
131
 
132
  // Append the response data.
133
- if ( response && response.html && $this.hasClass('has-search') ) {
134
- $('.envira-gallery-gallery').html(response.html);
135
- $this.removeClass('has-search');
136
  } else {
137
- $('.envira-gallery-gallery').append(response.html);
 
138
  }
139
-
140
- // Remove the spinner.
141
- $this.next().hide();
142
  },
143
  'json'
144
  );
145
- });
146
-
147
- // Load images related to the search term specified
148
- $(document).on('keyup keydown', '#envira-gallery-gallery-search', function(){
149
- var $this = $(this);
150
- $this.prev().css({'display' : 'inline-block', 'margin-top' : '1px', 'vertical-align' : 'middle', 'margin-right' : '4px'});
151
-
152
- var text = $(this).val();
153
- var search = {
154
- action: 'envira_gallery_library_search',
155
- nonce: envira_gallery_metabox.library_search,
156
- post_id: envira_gallery_metabox.id,
157
- search: text
158
- };
159
-
160
- // Send the ajax request with a delay (500ms after the user stops typing).
161
- delay(function() {
162
- // Process the Ajax response and output all the necessary data.
163
- $.post(
164
- envira_gallery_metabox.ajax,
165
- search,
166
- function(response) {
167
- // Notify the load button that we have entered a search and reset the offset counter.
168
- $('.envira-load-library').addClass('has-search').attr('data-envira-offset', parseInt(0));
169
-
170
- // Append the response data.
171
- if ( response )
172
- $('.envira-gallery-gallery').html(response.html);
173
-
174
- // Remove the spinner.
175
- $this.prev().hide();
176
- },
177
- 'json'
178
- );
179
- }, '500');
180
- });
181
 
182
  // Process inserting slides into slider when the Insert button is pressed.
183
  $(document).on('click', '.envira-gallery-media-insert', function(e){
108
  $(this).parent().parent().addClass('details selected');
109
  });
110
 
111
+ // Load more images into the library view when the 'Load More Images from Library'
112
+ // button is pressed
113
+ $(document).on('click', 'a.envira-gallery-load-library', function(e){
114
+ enviraLoadLibraryImages( $('a.envira-gallery-load-library').attr('data-envira-gallery-offset') );
115
+ });
116
 
117
+ // Load more images into the library view when the user scrolls to the bottom of the view
118
+ // Honours any search term(s) specified
119
+ $('.envira-gallery-gallery').bind('scroll', function() {
120
+ if( $(this).scrollTop() + $(this).innerHeight() >= this.scrollHeight ) {
121
+ enviraLoadLibraryImages( $('a.envira-gallery-load-library').attr('data-envira-gallery-offset') );
122
+ }
123
+ });
124
 
125
+ // Load images when the search term changes
126
+ $(document).on('keyup keydown', '#envira-gallery-gallery-search', function() {
127
+ delay(function() {
128
+ enviraLoadLibraryImages( 0 );
129
+ });
130
+ });
131
+
132
+ /**
133
+ * Makes an AJAX call to get the next batch of images
134
+ */
135
+ function enviraLoadLibraryImages( offset ) {
136
+ // Show spinner
137
+ $('.media-toolbar-secondary span.envira-gallery-spinner').css('visibility','visible');
138
+
139
+ // AJAX call to get next batch of images
140
  $.post(
141
  envira_gallery_metabox.ajax,
142
+ {
143
+ action: 'envira_gallery_load_library',
144
+ offset: offset,
145
+ post_id: envira_gallery_metabox.id,
146
+ search: $('input#envira-gallery-gallery-search').val(),
147
+ nonce: envira_gallery_metabox.load_gallery
148
+ },
149
  function(response) {
150
+ // Update offset
151
+ $('a.envira-gallery-load-library').attr('data-envira-gallery-offset', ( Number(offset) + 20 ) );
152
+
153
+ // Hide spinner
154
+ $('.media-toolbar-secondary span.envira-gallery-spinner').css('visibility','hidden');
155
 
156
  // Append the response data.
157
+ if ( offset === 0 ) {
158
+ // New search, so replace results
159
+ $('.envira-gallery-gallery').html( response.html );
160
  } else {
161
+ // Append to end of results
162
+ $('.envira-gallery-gallery').append( response.html );
163
  }
164
+
 
 
165
  },
166
  'json'
167
  );
168
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
 
170
  // Process inserting slides into slider when the Insert button is pressed.
171
  $(document).on('click', '.envira-gallery-media-insert', function(e){
assets/js/min/metabox-min.js CHANGED
@@ -1 +1 @@
1
- !function($){$(function(){function e(){var e={action:"envira_gallery_refresh",post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.refresh_nonce};$(".envira-media-library").after('<span class="spinner envira-gallery-spinner envira-gallery-spinner-refresh"></span>'),$(".envira-gallery-spinner-refresh").css({display:"inline-block","margin-top":"-3px"}),$.post(envira_gallery_metabox.ajax,e,function(e){e&&e.success&&($("#envira-gallery-output").html(e.success),$("#envira-gallery-output").find(".wp-editor-wrap").each(function(e,a){var r=$(a).find(".quicktags-toolbar");if(!(r.length>0)){var i=$(a).attr("id").split("-"),n=i.slice(4,-1).join("-");quicktags({id:"envira-gallery-caption-"+n,buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()}}),$("#envira-gallery-output").trigger({type:"enviraRefreshed",html:e.success,id:envira_gallery_metabox.id})),$(".envira-gallery-spinner-refresh").fadeOut(300,function(){$(this).remove()})},"json")}function a(){var e=$("#envira-config-crop"),a=$("#envira-config-mobile"),r=$("#envira-config-lightbox-toolbar");e.is(":checked")&&$("#envira-config-crop-size-box").fadeIn(300),e.on("change",function(){$(this).is(":checked")?$("#envira-config-crop-size-box").fadeIn(300):$("#envira-config-crop-size-box").fadeOut(300)}),a.is(":checked")&&$("#envira-config-mobile-size-box").fadeIn(300),a.on("change",function(){$(this).is(":checked")?$("#envira-config-mobile-size-box").fadeIn(300):$("#envira-config-mobile-size-box").fadeOut(300)}),r.is(":checked")&&$("#envira-config-lightbox-toolbar-position-box").fadeIn(300),r.on("change",function(){$(this).is(":checked")?$("#envira-config-lightbox-toolbar-position-box").fadeIn(300):$("#envira-config-lightbox-toolbar-position-box").fadeOut(300)})}function r(){$("#envira-gallery .drag-drop-inside").append('<div class="envira-progress-bar"><div></div></div>'),d=new plupload.Uploader(envira_gallery_metabox.plupload);var e=$("#envira-gallery .envira-progress-bar"),a=$("#envira-gallery .envira-progress-bar div"),r=$("#envira-gallery-output");d&&($("#envira-gallery .max-upload-size").append(' <a class="envira-media-library button button-primary" href="#" title="'+envira_gallery_metabox.gallery+'" style="vertical-align: baseline;">'+envira_gallery_metabox.gallery+"</a>"),d.bind("Init",function(e){var a=$("#envira-gallery-plupload-upload-ui");e.features.dragdrop&&!$(document.body).hasClass("mobile")?(a.addClass("drag-drop"),$("#envira-gallery-drag-drop-area").bind("dragover.wp-uploader",function(){a.addClass("drag-over")}).bind("dragleave.wp-uploader, drop.wp-uploader",function(){a.removeClass("drag-over")})):(a.removeClass("drag-drop"),$("#envira-gallery-drag-drop-area").unbind(".wp-uploader")),"html4"==e.runtime&&$(".upload-flash-bypass").hide()}),d.init(),d.bind("FilesAdded",function(a,r){var n=104857600,l=parseInt(a.settings.max_file_size,10);$("#envira-gallery-upload-error").html(""),$(e).show().css("display","block"),plupload.each(r,function(e){l>n&&e.size>n&&"html5"!=a.runtime&&i(a,e,!0)}),a.refresh(),a.start()}),d.bind("UploadProgress",function(e,r){$(a).css("width",e.total.percent+"%")}),d.bind("FileUploaded",function(e,a,i){$.post(envira_gallery_metabox.ajax,{action:"envira_gallery_load_image",nonce:envira_gallery_metabox.load_image,id:i.response,post_id:envira_gallery_metabox.id},function(e){$(r).append(e),$(e).find(".wp-editor-container").each(function(e,a){var r=$(a).attr("id").split("-")[4];quicktags({id:"envira-gallery-caption-"+r,buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()})},"json")}),d.bind("UploadComplete",function(){$(e).hide().css("display","none"),$(a).removeAttr("style")}),d.bind("Error",function(e,a){var r=104857600,n=$("#envira-gallery-upload-error"),l;switch(a){case plupload.FAILED:case plupload.FILE_EXTENSION_ERROR:n.html('<p class="error">'+pluploadL10n.upload_failed+"</p>");break;case plupload.FILE_SIZE_ERROR:i(e,a.file);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(fileObj,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(fileObj,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(fileObj,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:l=parseInt(uploader.settings.max_file_size,10),l>r&&fileObj.size>r?wpFileError(fileObj,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")):wpQueueError(pluploadL10n.io_error);break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:$(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:i(e,a.file)}e.refresh()}))}function i(e,a,r){var i;console.log("enviraUploadError"),i=r?pluploadL10n.big_upload_queued.replace("%s",a.name)+" "+pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>"):pluploadL10n.file_exceeds_size_limit.replace("%s",a.name),$("#envira-gallery-upload-error").html('<div class="error fade"><p>'+i+"</p></div>"),e.removeFile(a)}var n=$("#envira-tabs"),l=$("#envira-tabs-nav"),t=window.location.hash,o=window.location.hash.replace("!","");if(t&&t.indexOf("envira-tab-")>=0){$(".envira-active").removeClass("envira-active"),l.find('li a[href="'+o+'"]').parent().addClass("envira-active"),n.find(o).addClass("envira-active").show();var s=$("#post").attr("action");s&&(s=s.split("#")[0],$("#post").attr("action",s+t))}$(document).on("click","#envira-tabs-nav li a",function(e){e.preventDefault();var a=$(this);if(!a.parent().hasClass("envira-active")){window.location.hash=t=this.hash.split("#").join("#!");var r=l.find(".envira-active").removeClass("envira-active").find("a").attr("href");a.parent().addClass("envira-active"),n.find(r).removeClass("envira-active").hide(),n.find(a.attr("href")).addClass("envira-active").show();var i=$("#post").attr("action");i&&(i=i.split("#")[0],$("#post").attr("action",i+t))}});var d;r(),a(),0!==$(".envira-helper-needed").length&&$('<div class="envira-meta-helper-overlay" />').prependTo("#envira-gallery"),$(document).on("click",".envira-meta-icon",function(e){e.preventDefault();var a=$(this),r=a.parent(),i=a.next();i.is(":visible")?($(".envira-meta-helper-overlay").remove(),r.removeClass("envira-helper-active")):(0===$(".envira-meta-helper-overlay").length&&$('<div class="envira-meta-helper-overlay" />').prependTo("#envira-gallery"),r.addClass("envira-helper-active"))}),$(document).on("click",".envira-media-library",function(e){e.preventDefault(),m=!0,$("#envira-gallery-upload-ui").appendTo("body").show()}),$(".envira-gallery-gallery").on("click",".thumbnail, .check, .media-modal-icon",function(e){e.preventDefault(),$(this).parent().parent().hasClass("envira-gallery-in-gallery")||($(this).parent().parent().hasClass("selected")?$(this).parent().parent().removeClass("details selected"):$(this).parent().parent().addClass("details selected"))}),$(".envira-gallery-load-library").on("click",function(e){e.preventDefault();var a=$(this);a.next().css({display:"inline-block","margin-top":"14px","margin-left":"-5px"});var r={action:"envira_gallery_load_library",offset:parseInt(a.attr("data-envira-gallery-offset")),post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.load_gallery};$.post(envira_gallery_metabox.ajax,r,function(e){a.attr("data-envira-gallery-offset",parseInt(a.attr("data-envira-gallery-offset"))+20),e&&e.html&&a.hasClass("has-search")?($(".envira-gallery-gallery").html(e.html),a.removeClass("has-search")):$(".envira-gallery-gallery").append(e.html),a.next().hide()},"json")}),$(document).on("keyup keydown","#envira-gallery-gallery-search",function(){var e=$(this);e.prev().css({display:"inline-block","margin-top":"1px","vertical-align":"middle","margin-right":"4px"});var a=$(this).val(),r={action:"envira_gallery_library_search",nonce:envira_gallery_metabox.library_search,post_id:envira_gallery_metabox.id,search:a};g(function(){$.post(envira_gallery_metabox.ajax,r,function(a){$(".envira-load-library").addClass("has-search").attr("data-envira-offset",parseInt(0)),a&&$(".envira-gallery-gallery").html(a.html),e.prev().hide()},"json")},"500")}),$(document).on("click",".envira-gallery-media-insert",function(e){e.preventDefault();var a=$(this),r=$(this).text(),i={action:"envira_gallery_insert_images",nonce:envira_gallery_metabox.insert_nonce,post_id:envira_gallery_metabox.id,images:{}},n=!1,l=e;a.text(envira_gallery_metabox.inserting),$(".envira-gallery-media-frame").find(".attachment.selected:not(.envira-gallery-in-gallery)").each(function(e,a){i.images[e]=$(a).attr("data-attachment-id"),n=!0}),$.post(envira_gallery_metabox.ajax,i,function(e){setTimeout(function(){f(l),a.text(r),n&&$(".envira-gallery-load-library").attr("data-envira-gallery-offset",0).addClass("has-search").trigger("click")},500)},"json")});var c=$("#envira-gallery-output");c.sortable({containment:"#envira-gallery-output",items:"li",cursor:"move",forcePlaceholderSize:!0,placeholder:"dropzone",update:function(e,a){var r={url:envira_gallery_metabox.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"envira_gallery_sort_images",order:c.sortable("toArray").toString(),post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.sort},success:function(e){},error:function(e,a,r){}};$.ajax(r)}}),$("#envira-gallery").on("click",".envira-gallery-remove-image",function(e){e.preventDefault();var a=confirm(envira_gallery_metabox.remove);if(a){var r=$(this).parent().attr("id"),i={action:"envira_gallery_remove_image",attachment_id:r,post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.remove_nonce};$.post(envira_gallery_metabox.ajax,i,function(e){$("#"+r).fadeOut("normal",function(){$(this).remove(),$(".envira-gallery-load-library").attr("data-envira-gallery-offset",0).addClass("has-search").trigger("click")})},"json")}}),$("#envira-gallery").on("click",".envira-gallery-modify-image",function(e){e.preventDefault();var a=$(this).parent().data("envira-gallery-image"),r="envira-gallery-meta-"+a;v(a,r)});var p,v=function(e,a){p=$("#"+a).appendTo("body"),$(p).show(),$(document).on("click",".media-modal-close, .media-modal-backdrop",function(e){e.preventDefault(),u()}),$(document).on("keydown",function(e){27==e.keyCode&&u()})},u=function(){var e=$(p).attr("id"),a=e.split("-"),r=a[a.length-1];$("#"+e).appendTo("#"+r).hide()};$(document).on("click",".envira-gallery-meta-submit",function(e){e.preventDefault();var a=$(this),r=a.text(),i=a.data("envira-gallery-item"),n="envira-gallery-meta-"+i,l={};a.text(envira_gallery_metabox.saving),l.title=$("#envira-gallery-meta-table-"+i).find('textarea[name="_envira_gallery[meta_title]"]').val(),$("#envira-gallery-meta-table-"+i).find(":input").not(".ed_button").each(function(e,a){$(this).data("envira-meta")&&(l[$(this).data("envira-meta")]=$(this).val())});var t={action:"envira_gallery_save_meta",nonce:envira_gallery_metabox.save_nonce,attach_id:i,post_id:envira_gallery_metabox.id,meta:l};$.post(envira_gallery_metabox.ajax,t,function(e){setTimeout(function(){$("#"+n).appendTo("#"+i).hide(),a.text(r)},500)},"json")}),$("#envira-gallery-import-submit").on("click",function(e){$(this).next().css("display","inline-block"),0===$("#envira-config-import-gallery").val().length&&(e.preventDefault(),$(this).next().hide(),alert(envira_gallery_metabox["import"]))});var g=function(){var e=0;return function(a,r){clearTimeout(e),e=setTimeout(a,r)}}(),m=!1,f=function(a){a.preventDefault(),$("#envira-gallery-upload-ui").appendTo("#envira-gallery-upload-ui-wrapper").hide(),e(),m=!1};$(document).on("click","#envira-gallery-upload-ui .media-modal-close, #envira-gallery-upload-ui .media-modal-backdrop",f),$(document).on("keydown",function(e){27==e.keyCode&&m&&f(e)})})}(jQuery);
1
+ !function($){$(function(){function e(e){$(".media-toolbar-secondary span.envira-gallery-spinner").css("visibility","visible"),$.post(envira_gallery_metabox.ajax,{action:"envira_gallery_load_library",offset:e,post_id:envira_gallery_metabox.id,search:$("input#envira-gallery-gallery-search").val(),nonce:envira_gallery_metabox.load_gallery},function(a){$("a.envira-gallery-load-library").attr("data-envira-gallery-offset",Number(e)+20),$(".media-toolbar-secondary span.envira-gallery-spinner").css("visibility","hidden"),0===e?$(".envira-gallery-gallery").html(a.html):$(".envira-gallery-gallery").append(a.html)},"json")}function a(){var e={action:"envira_gallery_refresh",post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.refresh_nonce};$(".envira-media-library").after('<span class="spinner envira-gallery-spinner envira-gallery-spinner-refresh"></span>'),$(".envira-gallery-spinner-refresh").css({display:"inline-block","margin-top":"-3px"}),$.post(envira_gallery_metabox.ajax,e,function(e){e&&e.success&&($("#envira-gallery-output").html(e.success),$("#envira-gallery-output").find(".wp-editor-wrap").each(function(e,a){var r=$(a).find(".quicktags-toolbar");if(!(r.length>0)){var i=$(a).attr("id").split("-"),l=i.slice(4,-1).join("-");quicktags({id:"envira-gallery-caption-"+l,buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()}}),$("#envira-gallery-output").trigger({type:"enviraRefreshed",html:e.success,id:envira_gallery_metabox.id})),$(".envira-gallery-spinner-refresh").fadeOut(300,function(){$(this).remove()})},"json")}function r(){var e=$("#envira-config-crop"),a=$("#envira-config-mobile"),r=$("#envira-config-lightbox-toolbar");e.is(":checked")&&$("#envira-config-crop-size-box").fadeIn(300),e.on("change",function(){$(this).is(":checked")?$("#envira-config-crop-size-box").fadeIn(300):$("#envira-config-crop-size-box").fadeOut(300)}),a.is(":checked")&&$("#envira-config-mobile-size-box").fadeIn(300),a.on("change",function(){$(this).is(":checked")?$("#envira-config-mobile-size-box").fadeIn(300):$("#envira-config-mobile-size-box").fadeOut(300)}),r.is(":checked")&&$("#envira-config-lightbox-toolbar-position-box").fadeIn(300),r.on("change",function(){$(this).is(":checked")?$("#envira-config-lightbox-toolbar-position-box").fadeIn(300):$("#envira-config-lightbox-toolbar-position-box").fadeOut(300)})}function i(){$("#envira-gallery .drag-drop-inside").append('<div class="envira-progress-bar"><div></div></div>'),c=new plupload.Uploader(envira_gallery_metabox.plupload);var e=$("#envira-gallery .envira-progress-bar"),a=$("#envira-gallery .envira-progress-bar div"),r=$("#envira-gallery-output");c&&($("#envira-gallery .max-upload-size").append(' <a class="envira-media-library button button-primary" href="#" title="'+envira_gallery_metabox.gallery+'" style="vertical-align: baseline;">'+envira_gallery_metabox.gallery+"</a>"),c.bind("Init",function(e){var a=$("#envira-gallery-plupload-upload-ui");e.features.dragdrop&&!$(document.body).hasClass("mobile")?(a.addClass("drag-drop"),$("#envira-gallery-drag-drop-area").bind("dragover.wp-uploader",function(){a.addClass("drag-over")}).bind("dragleave.wp-uploader, drop.wp-uploader",function(){a.removeClass("drag-over")})):(a.removeClass("drag-drop"),$("#envira-gallery-drag-drop-area").unbind(".wp-uploader")),"html4"==e.runtime&&$(".upload-flash-bypass").hide()}),c.init(),c.bind("FilesAdded",function(a,r){var i=104857600,n=parseInt(a.settings.max_file_size,10);$("#envira-gallery-upload-error").html(""),$(e).show().css("display","block"),plupload.each(r,function(e){n>i&&e.size>i&&"html5"!=a.runtime&&l(a,e,!0)}),a.refresh(),a.start()}),c.bind("UploadProgress",function(e,r){$(a).css("width",e.total.percent+"%")}),c.bind("FileUploaded",function(e,a,i){$.post(envira_gallery_metabox.ajax,{action:"envira_gallery_load_image",nonce:envira_gallery_metabox.load_image,id:i.response,post_id:envira_gallery_metabox.id},function(e){$(r).append(e),$(e).find(".wp-editor-container").each(function(e,a){var r=$(a).attr("id").split("-")[4];quicktags({id:"envira-gallery-caption-"+r,buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()})},"json")}),c.bind("UploadComplete",function(){$(e).hide().css("display","none"),$(a).removeAttr("style")}),c.bind("Error",function(e,a){var r=104857600,i=$("#envira-gallery-upload-error"),n;switch(a){case plupload.FAILED:case plupload.FILE_EXTENSION_ERROR:i.html('<p class="error">'+pluploadL10n.upload_failed+"</p>");break;case plupload.FILE_SIZE_ERROR:l(e,a.file);break;case plupload.IMAGE_FORMAT_ERROR:wpFileError(fileObj,pluploadL10n.not_an_image);break;case plupload.IMAGE_MEMORY_ERROR:wpFileError(fileObj,pluploadL10n.image_memory_exceeded);break;case plupload.IMAGE_DIMENSIONS_ERROR:wpFileError(fileObj,pluploadL10n.image_dimensions_exceeded);break;case plupload.GENERIC_ERROR:wpQueueError(pluploadL10n.upload_failed);break;case plupload.IO_ERROR:n=parseInt(uploader.settings.max_file_size,10),n>r&&fileObj.size>r?wpFileError(fileObj,pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>")):wpQueueError(pluploadL10n.io_error);break;case plupload.HTTP_ERROR:wpQueueError(pluploadL10n.http_error);break;case plupload.INIT_ERROR:$(".media-upload-form").addClass("html-uploader");break;case plupload.SECURITY_ERROR:wpQueueError(pluploadL10n.security_error);break;default:l(e,a.file)}e.refresh()}))}function l(e,a,r){var i;console.log("enviraUploadError"),i=r?pluploadL10n.big_upload_queued.replace("%s",a.name)+" "+pluploadL10n.big_upload_failed.replace("%1$s",'<a class="uploader-html" href="#">').replace("%2$s","</a>"):pluploadL10n.file_exceeds_size_limit.replace("%s",a.name),$("#envira-gallery-upload-error").html('<div class="error fade"><p>'+i+"</p></div>"),e.removeFile(a)}var n=$("#envira-tabs"),t=$("#envira-tabs-nav"),o=window.location.hash,s=window.location.hash.replace("!","");if(o&&o.indexOf("envira-tab-")>=0){$(".envira-active").removeClass("envira-active"),t.find('li a[href="'+s+'"]').parent().addClass("envira-active"),n.find(s).addClass("envira-active").show();var d=$("#post").attr("action");d&&(d=d.split("#")[0],$("#post").attr("action",d+o))}$(document).on("click","#envira-tabs-nav li a",function(e){e.preventDefault();var a=$(this);if(!a.parent().hasClass("envira-active")){window.location.hash=o=this.hash.split("#").join("#!");var r=t.find(".envira-active").removeClass("envira-active").find("a").attr("href");a.parent().addClass("envira-active"),n.find(r).removeClass("envira-active").hide(),n.find(a.attr("href")).addClass("envira-active").show();var i=$("#post").attr("action");i&&(i=i.split("#")[0],$("#post").attr("action",i+o))}});var c;i(),r(),0!==$(".envira-helper-needed").length&&$('<div class="envira-meta-helper-overlay" />').prependTo("#envira-gallery"),$(document).on("click",".envira-meta-icon",function(e){e.preventDefault();var a=$(this),r=a.parent(),i=a.next();i.is(":visible")?($(".envira-meta-helper-overlay").remove(),r.removeClass("envira-helper-active")):(0===$(".envira-meta-helper-overlay").length&&$('<div class="envira-meta-helper-overlay" />').prependTo("#envira-gallery"),r.addClass("envira-helper-active"))}),$(document).on("click",".envira-media-library",function(e){e.preventDefault(),f=!0,$("#envira-gallery-upload-ui").appendTo("body").show()}),$(".envira-gallery-gallery").on("click",".thumbnail, .check, .media-modal-icon",function(e){e.preventDefault(),$(this).parent().parent().hasClass("envira-gallery-in-gallery")||($(this).parent().parent().hasClass("selected")?$(this).parent().parent().removeClass("details selected"):$(this).parent().parent().addClass("details selected"))}),$(document).on("click","a.envira-gallery-load-library",function(a){e($("a.envira-gallery-load-library").attr("data-envira-gallery-offset"))}),$(".envira-gallery-gallery").bind("scroll",function(){$(this).scrollTop()+$(this).innerHeight()>=this.scrollHeight&&e($("a.envira-gallery-load-library").attr("data-envira-gallery-offset"))}),$(document).on("keyup keydown","#envira-gallery-gallery-search",function(){m(function(){e(0)})}),$(document).on("click",".envira-gallery-media-insert",function(e){e.preventDefault();var a=$(this),r=$(this).text(),i={action:"envira_gallery_insert_images",nonce:envira_gallery_metabox.insert_nonce,post_id:envira_gallery_metabox.id,images:{}},l=!1,n=e;a.text(envira_gallery_metabox.inserting),$(".envira-gallery-media-frame").find(".attachment.selected:not(.envira-gallery-in-gallery)").each(function(e,a){i.images[e]=$(a).attr("data-attachment-id"),l=!0}),$.post(envira_gallery_metabox.ajax,i,function(e){setTimeout(function(){y(n),a.text(r),l&&$(".envira-gallery-load-library").attr("data-envira-gallery-offset",0).addClass("has-search").trigger("click")},500)},"json")});var p=$("#envira-gallery-output");p.sortable({containment:"#envira-gallery-output",items:"li",cursor:"move",forcePlaceholderSize:!0,placeholder:"dropzone",update:function(e,a){var r={url:envira_gallery_metabox.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"envira_gallery_sort_images",order:p.sortable("toArray").toString(),post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.sort},success:function(e){},error:function(e,a,r){}};$.ajax(r)}}),$("#envira-gallery").on("click",".envira-gallery-remove-image",function(e){e.preventDefault();var a=confirm(envira_gallery_metabox.remove);if(a){var r=$(this).parent().attr("id"),i={action:"envira_gallery_remove_image",attachment_id:r,post_id:envira_gallery_metabox.id,nonce:envira_gallery_metabox.remove_nonce};$.post(envira_gallery_metabox.ajax,i,function(e){$("#"+r).fadeOut("normal",function(){$(this).remove(),$(".envira-gallery-load-library").attr("data-envira-gallery-offset",0).addClass("has-search").trigger("click")})},"json")}}),$("#envira-gallery").on("click",".envira-gallery-modify-image",function(e){e.preventDefault();var a=$(this).parent().data("envira-gallery-image"),r="envira-gallery-meta-"+a;u(a,r)});var v,u=function(e,a){v=$("#"+a).appendTo("body"),$(v).show(),$(document).on("click",".media-modal-close, .media-modal-backdrop",function(e){e.preventDefault(),g()}),$(document).on("keydown",function(e){27==e.keyCode&&g()})},g=function(){var e=$(v).attr("id"),a=e.split("-"),r=a[a.length-1];$("#"+e).appendTo("#"+r).hide()};$(document).on("click",".envira-gallery-meta-submit",function(e){e.preventDefault();var a=$(this),r=a.text(),i=a.data("envira-gallery-item"),l="envira-gallery-meta-"+i,n={};a.text(envira_gallery_metabox.saving),n.title=$("#envira-gallery-meta-table-"+i).find('textarea[name="_envira_gallery[meta_title]"]').val(),$("#envira-gallery-meta-table-"+i).find(":input").not(".ed_button").each(function(e,a){$(this).data("envira-meta")&&(n[$(this).data("envira-meta")]=$(this).val())});var t={action:"envira_gallery_save_meta",nonce:envira_gallery_metabox.save_nonce,attach_id:i,post_id:envira_gallery_metabox.id,meta:n};$.post(envira_gallery_metabox.ajax,t,function(e){setTimeout(function(){$("#"+l).appendTo("#"+i).hide(),a.text(r)},500)},"json")}),$("#envira-gallery-import-submit").on("click",function(e){$(this).next().css("display","inline-block"),0===$("#envira-config-import-gallery").val().length&&(e.preventDefault(),$(this).next().hide(),alert(envira_gallery_metabox["import"]))});var m=function(){var e=0;return function(a,r){clearTimeout(e),e=setTimeout(a,r)}}(),f=!1,y=function(e){e.preventDefault(),$("#envira-gallery-upload-ui").appendTo("#envira-gallery-upload-ui-wrapper").hide(),a(),f=!1};$(document).on("click","#envira-gallery-upload-ui .media-modal-close, #envira-gallery-upload-ui .media-modal-backdrop",y),$(document).on("keydown",function(e){27==e.keyCode&&f&&y(e)})})}(jQuery);
assets/scss/attachment-details-modal-support.scss ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ==========================================================================
2
+ 4.0 Attachment Details Modal
3
+ ========================================================================== */
4
+
5
+ .media-sidebar .setting,
6
+ .attachment-details .setting {
7
+ display: block;
8
+ float: left;
9
+ width: 100%;
10
+ margin: 1px 0;
11
+ }
12
+
13
+ .media-sidebar .setting label,
14
+ .attachment-details .setting label {
15
+ display: block;
16
+ }
17
+
18
+ .media-sidebar .setting .link-to-custom,
19
+ .attachment-details .setting .link-to-custom {
20
+ margin: 3px 2px 0;
21
+ }
22
+
23
+ .media-sidebar .setting span,
24
+ .attachment-details .setting span {
25
+ min-width: 30%;
26
+ margin-right: 4%;
27
+ font-size: 12px;
28
+ text-align: right;
29
+ }
30
+
31
+ .media-sidebar .setting select,
32
+ .attachment-details .setting select {
33
+ max-width: 65%;
34
+ }
35
+
36
+ .media-sidebar .setting input[type="checkbox"],
37
+ .media-sidebar .field input[type="checkbox"],
38
+ .media-sidebar .setting input[type="radio"],
39
+ .media-sidebar .field input[type="radio"],
40
+ .attachment-details .setting input[type="checkbox"],
41
+ .attachment-details .field input[type="checkbox"],
42
+ .attachment-details .setting input[type="radio"],
43
+ .attachment-details .field input[type="radio"] {
44
+ float: none;
45
+ margin: 8px 3px 0;
46
+ padding: 0;
47
+ }
48
+
49
+ .media-sidebar .setting span,
50
+ .attachment-details .setting span,
51
+ .compat-item label span {
52
+ float: left;
53
+ min-height: 22px;
54
+ padding-top: 8px;
55
+ line-height: 16px;
56
+ font-weight: normal;
57
+ color: #666;
58
+ }
59
+
60
+ .compat-item label span {
61
+ text-align: right;
62
+ }
63
+
64
+ .media-sidebar .setting input[type="text"],
65
+ .media-sidebar .setting input[type="password"],
66
+ .media-sidebar .setting input[type="email"],
67
+ .media-sidebar .setting input[type="number"],
68
+ .media-sidebar .setting input[type="search"],
69
+ .media-sidebar .setting input[type="tel"],
70
+ .media-sidebar .setting input[type="url"],
71
+ .media-sidebar .setting textarea,
72
+ .media-sidebar .setting .value,
73
+ .attachment-details .setting input[type="text"],
74
+ .attachment-details .setting input[type="password"],
75
+ .attachment-details .setting input[type="email"],
76
+ .attachment-details .setting input[type="number"],
77
+ .attachment-details .setting input[type="search"],
78
+ .attachment-details .setting input[type="tel"],
79
+ .attachment-details .setting input[type="url"],
80
+ .attachment-details .setting textarea,
81
+ .attachment-details .setting .value {
82
+ -webkit-box-sizing: border-box;
83
+ -moz-box-sizing: border-box;
84
+ box-sizing: border-box;
85
+ margin: 1px;
86
+ width: 65%;
87
+ float: right;
88
+ }
89
+
90
+ .media-sidebar .setting .value,
91
+ .attachment-details .setting .value {
92
+ margin: 0 1px;
93
+ text-align: left;
94
+ }
95
+
96
+ .media-sidebar .setting textarea,
97
+ .attachment-details .setting textarea,
98
+ .compat-item .field textarea {
99
+ height: 62px;
100
+ resize: vertical;
101
+ }
102
+
103
+ .media-sidebar select,
104
+ .attachment-details select {
105
+ margin-top: 3px;
106
+ }
107
+
108
+ .edit-attachment-frame {
109
+ display: block;
110
+ height: 100%;
111
+ width: 100%;
112
+ }
113
+
114
+ .edit-attachment-frame .edit-media-header {
115
+ overflow: hidden;
116
+ }
117
+
118
+ .upload-php .media-modal-close .media-modal-icon:before {
119
+ content: '\f335';
120
+ font-size: 22px;
121
+ }
122
+
123
+ .upload-php .media-modal-close .media-modal-icon {
124
+ margin: 14px;
125
+ width: 22px;
126
+ }
127
+
128
+ .upload-php .media-modal-close,
129
+ .edit-attachment-frame .edit-media-header .left,
130
+ .edit-attachment-frame .edit-media-header .right {
131
+ cursor: pointer;
132
+ color: #777;
133
+ background-color: transparent;
134
+ height: 50px;
135
+ width: 50px;
136
+ padding: 0;
137
+ position: absolute;
138
+ text-align: center;
139
+ border: 0;
140
+ border-left: 1px solid #ddd;
141
+ -webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
142
+ transition: color .1s ease-in-out, background .1s ease-in-out;
143
+ }
144
+
145
+ .upload-php .media-modal-close {
146
+ top: 0;
147
+ right: 0;
148
+ }
149
+
150
+ .edit-attachment-frame .edit-media-header .left {
151
+ right: 102px;
152
+ }
153
+
154
+ .edit-attachment-frame .edit-media-header .right {
155
+ right: 51px;
156
+ }
157
+
158
+ .edit-attachment-frame .media-frame-title {
159
+ left: 0;
160
+ right: 150px; /* leave space for prev/next/close */
161
+ }
162
+
163
+ .edit-attachment-frame .edit-media-header .right:before,
164
+ .edit-attachment-frame .edit-media-header .left:before {
165
+ font: normal 20px/50px 'dashicons' !important;
166
+ display: inline;
167
+ font-weight: 300;
168
+ }
169
+
170
+ .upload-php .media-modal-close:hover,
171
+ .upload-php .media-modal-close:focus,
172
+ .edit-attachment-frame .edit-media-header .left:hover,
173
+ .edit-attachment-frame .edit-media-header .right:hover,
174
+ .edit-attachment-frame .edit-media-header .left:focus,
175
+ .edit-attachment-frame .edit-media-header .right:focus {
176
+ background: #ddd;
177
+ border-color: #ccc;
178
+ color: #000;
179
+ outline: none;
180
+ }
181
+
182
+ .upload-php .media-modal-close:focus .media-modal-icon:before,
183
+ .upload-php .media-modal-close:hover .media-modal-icon:before {
184
+ color: #000;
185
+ }
186
+
187
+ .edit-attachment-frame .edit-media-header .left:before,
188
+ .rtl .edit-attachment-frame .edit-media-header .right:before {
189
+ content: '\f341';
190
+ }
191
+
192
+ .edit-attachment-frame .edit-media-header .right:before,
193
+ .rtl .edit-attachment-frame .edit-media-header .left:before {
194
+ content: '\f345';
195
+ }
196
+
197
+ .edit-attachment-frame .edit-media-header .left.disabled,
198
+ .edit-attachment-frame .edit-media-header .right.disabled,
199
+ .edit-attachment-frame .edit-media-header .left.disabled:hover,
200
+ .edit-attachment-frame .edit-media-header .right.disabled:hover {
201
+ color: #ccc;
202
+ background: inherit;
203
+ cursor: default;
204
+ pointer-events: none;
205
+ }
206
+
207
+ .edit-attachment-frame .media-frame-content,
208
+ .edit-attachment-frame .media-frame-router {
209
+ left: 0;
210
+ }
211
+
212
+ .edit-attachment-frame .media-frame-content {
213
+ border-bottom: none;
214
+ bottom: 0;
215
+ top: 50px;
216
+ }
217
+
218
+ .edit-attachment-frame .attachment-details {
219
+ position: absolute;
220
+ overflow: auto;
221
+ top: 0;
222
+ bottom: 0;
223
+ right: 0;
224
+ left: 0;
225
+ -webkit-box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1);
226
+ box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1);
227
+ }
228
+
229
+ .edit-attachment-frame .attachment-media-view {
230
+ float: left;
231
+ width: 65%;
232
+ height: 100%;
233
+ }
234
+
235
+ .edit-attachment-frame .attachment-media-view .thumbnail {
236
+ -webkit-box-sizing: border-box;
237
+ -moz-box-sizing: border-box;
238
+ box-sizing: border-box;
239
+ padding: 16px;
240
+ height: 100%;
241
+ }
242
+
243
+ .edit-attachment-frame .attachment-media-view .details-image {
244
+ display: block;
245
+ margin-bottom: 16px;
246
+ max-width: 100%;
247
+ max-height: 90%;
248
+ max-height: -webkit-calc( 100% - 42px );
249
+ max-height: calc( 100% - 42px ); /* leave space for actions underneath */
250
+ }
251
+
252
+ .edit-attachment-frame .wp-media-wrapper {
253
+ margin-bottom: 12px;
254
+ }
255
+
256
+ .edit-attachment-frame input,
257
+ .edit-attachment-frame textarea {
258
+ padding: 6px 8px;
259
+ line-height: 16px;
260
+ }
261
+
262
+ .edit-attachment-frame .attachment-info {
263
+ overflow: auto;
264
+ -webkit-box-sizing: border-box;
265
+ -moz-box-sizing: border-box;
266
+ box-sizing: border-box;
267
+ margin-bottom: 0;
268
+ padding: 12px 16px 0;
269
+ width: 35%;
270
+ height: 100%;
271
+ -webkit-box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1);
272
+ box-shadow: inset 0px 4px 4px -4px rgba(0, 0, 0, 0.1);
273
+ border-bottom: 0;
274
+ border-left: 1px solid #ddd;
275
+ background: #f3f3f3;
276
+ }
277
+
278
+ .edit-attachment-frame .attachment-info .details,
279
+ .edit-attachment-frame .attachment-info .settings {
280
+ position: relative; /* RTL fix, #WP29352 */
281
+ overflow: hidden;
282
+ float: none;
283
+ margin-bottom: 15px;
284
+ padding-bottom: 15px;
285
+ border-bottom: 1px solid #ddd;
286
+ }
287
+
288
+ .edit-attachment-frame .attachment-info .filename {
289
+ font-weight: normal;
290
+ color: #666;
291
+ }
292
+
293
+ .edit-attachment-frame .attachment-info .thumbnail {
294
+ margin-bottom: 12px;
295
+ }
296
+
297
+ .attachment-info .actions {
298
+ margin-bottom: 16px;
299
+ }
300
+
301
+ .attachment-info .actions a {
302
+ display: inline;
303
+ text-decoration: none;
304
+ }
assets/scss/metabox.scss CHANGED
@@ -76,6 +76,31 @@
76
  color: #21759b;
77
  }
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  #envira-gallery .envira-meta-close-text {
80
  display: none;
81
  color: #fff;
@@ -156,6 +181,14 @@
156
  padding-right: 0;
157
  }
158
 
 
 
 
 
 
 
 
 
159
  #envira-gallery .envira-progress-bar {
160
  display: none;
161
  width: 100%;
@@ -222,6 +255,43 @@
222
  position: relative;
223
  width: 150px;
224
  height: 150px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  }
226
 
227
  #envira-gallery #envira-gallery-output li.envira-gallery-status-pending {
@@ -296,8 +366,8 @@
296
  }
297
 
298
  #media-items .media-item img {
299
- max-width: 150px;
300
- max-height: 150px;
301
  float: none;
302
  margin: 4px;
303
  display: block;
@@ -309,12 +379,13 @@
309
 
310
  .envira-gallery-gallery .attachment {
311
  margin: 8px;
 
312
  }
313
 
314
  .envira-gallery-gallery .attachment-preview,
315
  .envira-gallery-gallery .attachment-preview .thumbnail {
316
- max-width: 150px;
317
- max-height: 150px;
318
  }
319
 
320
  .envira-gallery-media-frame .max-upload-size {
@@ -327,7 +398,7 @@
327
  }
328
 
329
  .envira-gallery-media-frame .attachment.envira-gallery-in-gallery {
330
- box-shadow: 0 0 0 1px #fff, 0 0 0 5px #519e0c;
331
  }
332
 
333
  .envira-gallery-media-frame .attachment.envira-gallery-in-gallery .attachment-preview,
@@ -379,50 +450,50 @@
379
  }
380
 
381
  .envira-gallery-meta.attachments .attachment {
382
- width: 200px;
383
- height: 200px;
384
- border: none !important;
385
  }
386
 
387
  .envira-gallery-meta.attachments .attachment.selected {
388
- width: 200px;
389
- height: 200px;
390
  }
391
 
392
  .envira-gallery-meta.attachments .attachment .attachment-preview {
393
- width: 100%;
394
- height: 100%;
395
- border: none !important;
396
  }
397
 
398
  .envira-gallery-meta.attachments .attachment .attachment-preview:before {
399
- padding-top: 0;
400
- border: none !important;
401
  }
402
 
403
  .envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail {
404
- display: table;
405
- position: relative;
406
- top: auto;
407
- right: auto;
408
- bottom: auto;
409
- left: auto;
410
- border: none !important;
411
  }
412
 
413
  .envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail:after {
414
- box-shadow: none;
415
- -webkit-box-shadow: none;
416
- -moz-box-shadow: none;
417
  }
418
 
419
  .envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail .inside {
420
- display: table-cell;
421
- width: 200px;
422
- height: 200px;
423
- text-align: center;
424
- vertical-align: middle;
425
- border: none !important;
426
  }
427
 
428
  .envira-gallery-ui-content {
@@ -515,6 +586,166 @@
515
  margin: 10px 0;
516
  }
517
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
518
  /* ==========================================================================
519
  Retina Styles
520
  ========================================================================== */
76
  color: #21759b;
77
  }
78
 
79
+ /**
80
+ * Types Nav
81
+ */
82
+ #envira-gallery-types-nav {
83
+ margin: 10px 0;
84
+ padding: 10px 0;
85
+ border-top: 1px solid #eee;
86
+ border-bottom: 1px solid #eee;
87
+
88
+ li {
89
+ float: left;
90
+ margin: 0 10px 0 0;
91
+
92
+ &.envira-gallery-type-label {
93
+ margin-right: 20px;
94
+
95
+ span {
96
+ font-weight: 700;
97
+ font-size: 13px;
98
+ vertical-align: middle;
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
  #envira-gallery .envira-meta-close-text {
105
  display: none;
106
  color: #fff;
181
  padding-right: 0;
182
  }
183
 
184
+ #envira-gallery .envira-tab tr {
185
+ td {
186
+ label {
187
+ margin: 0 10px 0 0;
188
+ }
189
+ }
190
+ }
191
+
192
  #envira-gallery .envira-progress-bar {
193
  display: none;
194
  width: 100%;
255
  position: relative;
256
  width: 150px;
257
  height: 150px;
258
+
259
+ /**
260
+ * Selected Icon
261
+ */
262
+ a.check {
263
+ display: none;
264
+ position: absolute;
265
+ right: 5px;
266
+ top: 5px;
267
+ width: 24px;
268
+ height: 24px;
269
+ background-color: #1e8cbe;
270
+ -webkit-box-shadow: 0 0 0 1px #fff,0 0 0 2px #1e8cbe;
271
+ box-shadow: 0 0 0 1px #fff,0 0 0 2px #1e8cbe;
272
+
273
+ div.media-modal-icon {
274
+ width: 15px;
275
+ height: 15px;
276
+ margin: 5px 0 0 5px;
277
+ background-position: -21px 0;
278
+ }
279
+ }
280
+
281
+ /**
282
+ * Selected state
283
+ */
284
+ &.selected {
285
+ width: 148px;
286
+ height: 148px;
287
+ border: 2px solid #1e8cbe;
288
+ -webkit-box-shadow: inset 0 0 0 3px #fff,inset 0 0 0 7px #1e8cbe;
289
+ box-shadow: inset 0 0 0 3px #fff,inset 0 0 0 7px #1e8cbe;
290
+
291
+ a.check {
292
+ display: block;
293
+ }
294
+ }
295
  }
296
 
297
  #envira-gallery #envira-gallery-output li.envira-gallery-status-pending {
366
  }
367
 
368
  #media-items .media-item img {
369
+ max-width: 164px;
370
+ max-height: 164px;
371
  float: none;
372
  margin: 4px;
373
  display: block;
379
 
380
  .envira-gallery-gallery .attachment {
381
  margin: 8px;
382
+ max-width: 164px;
383
  }
384
 
385
  .envira-gallery-gallery .attachment-preview,
386
  .envira-gallery-gallery .attachment-preview .thumbnail {
387
+ max-width: 164px;
388
+ max-height: 164px;
389
  }
390
 
391
  .envira-gallery-media-frame .max-upload-size {
398
  }
399
 
400
  .envira-gallery-media-frame .attachment.envira-gallery-in-gallery {
401
+ box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px #519e0c;
402
  }
403
 
404
  .envira-gallery-media-frame .attachment.envira-gallery-in-gallery .attachment-preview,
450
  }
451
 
452
  .envira-gallery-meta.attachments .attachment {
453
+ width: 200px;
454
+ height: 200px;
455
+ border: none !important;
456
  }
457
 
458
  .envira-gallery-meta.attachments .attachment.selected {
459
+ width: 200px;
460
+ height: 200px;
461
  }
462
 
463
  .envira-gallery-meta.attachments .attachment .attachment-preview {
464
+ width: 100%;
465
+ height: 100%;
466
+ border: none !important;
467
  }
468
 
469
  .envira-gallery-meta.attachments .attachment .attachment-preview:before {
470
+ padding-top: 0;
471
+ border: none !important;
472
  }
473
 
474
  .envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail {
475
+ display: table;
476
+ position: relative;
477
+ top: auto;
478
+ right: auto;
479
+ bottom: auto;
480
+ left: auto;
481
+ border: none !important;
482
  }
483
 
484
  .envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail:after {
485
+ box-shadow: none;
486
+ -webkit-box-shadow: none;
487
+ -moz-box-shadow: none;
488
  }
489
 
490
  .envira-gallery-meta.attachments .attachment .attachment-preview .thumbnail .inside {
491
+ display: table-cell;
492
+ width: 200px;
493
+ height: 200px;
494
+ text-align: center;
495
+ vertical-align: middle;
496
+ border: none !important;
497
  }
498
 
499
  .envira-gallery-ui-content {
586
  margin: 10px 0;
587
  }
588
 
589
+ /* ==========================================================================
590
+ Attachment Editor
591
+ ========================================================================== */
592
+
593
+ .envira-gallery-meta-container {
594
+ /**
595
+ * Navigation Buttons
596
+ */
597
+ button.right {
598
+ border-right: 1px solid #ddd !important;
599
+ }
600
+
601
+ /**
602
+ * Settings Labels + Fields
603
+ * - left align labels
604
+ * - increase width of text inputs
605
+ * - force inputs to drop to new line below ~ 960px viewport
606
+ */
607
+ .setting {
608
+ /**
609
+ * Label
610
+ */
611
+ span.name {
612
+ min-width: 20%;
613
+ text-align: left;
614
+ }
615
+
616
+ /**
617
+ * Inputs
618
+ */
619
+ input[type=text] {
620
+ width: 75%;
621
+ }
622
+ textarea {
623
+ height: 150px;
624
+ }
625
+
626
+ /**
627
+ * Visual Editor
628
+ */
629
+ .wp-editor-wrap {
630
+ float: right;
631
+ width: 75%;
632
+ }
633
+ }
634
+
635
+ /**
636
+ * Links
637
+ */
638
+ #wp-link {
639
+ float: left;
640
+ width: 100%;
641
+
642
+ #search-panel {
643
+ display: block;
644
+ float: left;
645
+ width: 100%;
646
+
647
+ /**
648
+ * Search Box
649
+ */
650
+ .link-search-wrapper {
651
+ float: left;
652
+ width: 100%;
653
+ margin: 0;
654
+
655
+ label {
656
+ display: block;
657
+ float: left;
658
+ width: 100%;
659
+ margin: 1px 0;
660
+
661
+ span.name {
662
+ display: none;
663
+ }
664
+
665
+ input {
666
+ float: right;
667
+ width: 75%;
668
+ max-width: 75%;
669
+ }
670
+ }
671
+ }
672
+
673
+ /**
674
+ * Search Results
675
+ */
676
+ #search-results {
677
+ position: relative;
678
+ float: right;
679
+ width: 75%;
680
+ max-width: 75%;
681
+ margin: -2px 0 0 0;
682
+ display: block;
683
+ top: 0;
684
+ left: 0;
685
+ right: 0;
686
+ bottom: 0;
687
+ border: none;
688
+ border-left: 1px solid #dfdfdf;
689
+ border-bottom: 1px solid #dfdfdf;
690
+ border-right: 1px solid #dfdfdf;
691
+ }
692
+
693
+ /**
694
+ * Most Recent Results
695
+ */
696
+ #most-recent-results {
697
+ display: none;
698
+ }
699
+ }
700
+ }
701
+
702
+ /**
703
+ * Actions
704
+ */
705
+ div.actions {
706
+ a.button {
707
+ display: inline-block;
708
+ }
709
+ }
710
+ }
711
+
712
+
713
+ /**
714
+ * Responsive Media Queries
715
+ */
716
+ @media only screen and (max-width: 959px) {
717
+ .envira-gallery-meta-container {
718
+ .setting {
719
+ /**
720
+ * Label
721
+ */
722
+ span.name {
723
+ width: 100%;
724
+ max-width: 100%;
725
+ min-width: 100%;
726
+ }
727
+
728
+ /**
729
+ * Inputs
730
+ */
731
+ input[type=text] {
732
+ width: 100%;
733
+ }
734
+ input[type=checkbox] {
735
+ clear: both;
736
+ }
737
+
738
+ /**
739
+ * Visual Editor
740
+ */
741
+ .wp-editor-wrap {
742
+ float: left;
743
+ width: 100%;
744
+ }
745
+ }
746
+ }
747
+ }
748
+
749
  /* ==========================================================================
750
  Retina Styles
751
  ========================================================================== */
config.codekit CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
3
- "creatorBuild": "18493",
4
  "files": {
5
  "\/assets\/css\/envira.css": {
6
  "fileType": 16,
@@ -306,6 +306,22 @@
306
  "outputStyle": 1,
307
  "syntaxCheckerStyle": 1
308
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  "\/assets\/scss\/envira.scss": {
310
  "createSourceMap": 0,
311
  "debugStyle": 0,
@@ -438,16 +454,25 @@
438
  "outputPathIsSetByUser": 0
439
  },
440
  "\/README.md": {
441
- "enableFootnoteSupport": 0,
442
- "enableSmartyPants": 1,
443
- "expandTabs": 1,
 
 
444
  "fileType": 4096,
445
  "ignore": 0,
446
  "ignoreWasSetByUser": 0,
447
  "inputAbbreviatedPath": "\/README.md",
 
448
  "outputAbbreviatedPath": "\/README.html",
 
449
  "outputPathIsOutsideProject": 0,
450
- "outputPathIsSetByUser": 0
 
 
 
 
 
451
  }
452
  },
453
  "hooks": [
@@ -749,6 +774,10 @@
749
  "active": 0,
750
  "flagValue": -1
751
  },
 
 
 
 
752
  "globalstrict": {
753
  "active": 0,
754
  "flagValue": -1
@@ -837,6 +866,10 @@
837
  "active": 1,
838
  "flagValue": -1
839
  },
 
 
 
 
840
  "node": {
841
  "active": 0,
842
  "flagValue": -1
@@ -937,6 +970,10 @@
937
  "active": 1,
938
  "flagValue": -1
939
  },
 
 
 
 
940
  "withstmt": {
941
  "active": 0,
942
  "flagValue": -1
@@ -1060,6 +1097,14 @@
1060
  "flagValue": -1
1061
  }
1062
  },
 
 
 
 
 
 
 
 
1063
  "kitAutoOutputPathEnabled": 1,
1064
  "kitAutoOutputPathFilenamePattern": "*.html",
1065
  "kitAutoOutputPathRelativePath": "",
@@ -1087,9 +1132,18 @@
1087
  "markdownAutoOutputPathReplace1": "",
1088
  "markdownAutoOutputPathReplace2": "",
1089
  "markdownAutoOutputPathStyle": 0,
 
1090
  "markdownEnableFootnotes": 0,
1091
- "markdownEnableSmartyPants": 1,
1092
- "markdownExpandTabs": 1,
 
 
 
 
 
 
 
 
1093
  "reloadFileURLs": 0,
1094
  "sassAutoOutputPathEnabled": 1,
1095
  "sassAutoOutputPathFilenamePattern": "*.css",
@@ -1148,6 +1202,10 @@
1148
  "active": 0,
1149
  "flagValue": -1
1150
  },
 
 
 
 
1151
  "booleans": {
1152
  "active": 1,
1153
  "flagValue": -1
@@ -1228,6 +1286,10 @@
1228
  "active": 0,
1229
  "flagValue": -1
1230
  },
 
 
 
 
1231
  "loops": {
1232
  "active": 1,
1233
  "flagValue": -1
1
  {
2
  "CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit",
3
+ "creatorBuild": "18966",
4
  "files": {
5
  "\/assets\/css\/envira.css": {
6
  "fileType": 16,
306
  "outputStyle": 1,
307
  "syntaxCheckerStyle": 1
308
  },
309
+ "\/assets\/scss\/attachment-details-modal-support.scss": {
310
+ "createSourceMap": 0,
311
+ "debugStyle": 0,
312
+ "decimalPrecision": 10,
313
+ "fileType": 4,
314
+ "ignore": 0,
315
+ "ignoreWasSetByUser": 0,
316
+ "inputAbbreviatedPath": "\/assets\/scss\/attachment-details-modal-support.scss",
317
+ "outputAbbreviatedPath": "\/assets\/css\/attachment-details-modal-support.css",
318
+ "outputPathIsOutsideProject": 0,
319
+ "outputPathIsSetByUser": 0,
320
+ "outputStyle": 3,
321
+ "shouldRunAutoprefixer": 0,
322
+ "shouldRunBless": 0,
323
+ "useLibsass": 0
324
+ },
325
  "\/assets\/scss\/envira.scss": {
326
  "createSourceMap": 0,
327
  "debugStyle": 0,
454
  "outputPathIsSetByUser": 0
455
  },
456
  "\/README.md": {
457
+ "criticStyle": 0,
458
+ "enableFootnotes": 0,
459
+ "enableLabels": 1,
460
+ "enableSmartQuotes": 1,
461
+ "escapeLineBreaks": 0,
462
  "fileType": 4096,
463
  "ignore": 0,
464
  "ignoreWasSetByUser": 0,
465
  "inputAbbreviatedPath": "\/README.md",
466
+ "maskEmailAddresses": 1,
467
  "outputAbbreviatedPath": "\/README.html",
468
+ "outputFormat": 0,
469
  "outputPathIsOutsideProject": 0,
470
+ "outputPathIsSetByUser": 0,
471
+ "outputStyle": 0,
472
+ "parseMetadata": 1,
473
+ "processHTML": 0,
474
+ "randomFootnoteNumbers": 0,
475
+ "useCompatibilityMode": 0
476
  }
477
  },
478
  "hooks": [
774
  "active": 0,
775
  "flagValue": -1
776
  },
777
+ "futurehostile": {
778
+ "active": 0,
779
+ "flagValue": -1
780
+ },
781
  "globalstrict": {
782
  "active": 0,
783
  "flagValue": -1
866
  "active": 1,
867
  "flagValue": -1
868
  },
869
+ "nocomma": {
870
+ "active": 0,
871
+ "flagValue": -1
872
+ },
873
  "node": {
874
  "active": 0,
875
  "flagValue": -1
970
  "active": 1,
971
  "flagValue": -1
972
  },
973
+ "varstmt": {
974
+ "active": 0,
975
+ "flagValue": -1
976
+ },
977
  "withstmt": {
978
  "active": 0,
979
  "flagValue": -1
1097
  "flagValue": -1
1098
  }
1099
  },
1100
+ "jsonAutoOutputPathEnabled": 0,
1101
+ "jsonAutoOutputPathFilenamePattern": "*-min.json",
1102
+ "jsonAutoOutputPathRelativePath": "",
1103
+ "jsonAutoOutputPathReplace1": "",
1104
+ "jsonAutoOutputPathReplace2": "",
1105
+ "jsonAutoOutputPathStyle": 0,
1106
+ "jsonOrderOutput": 0,
1107
+ "jsonOutputStyle": 1,
1108
  "kitAutoOutputPathEnabled": 1,
1109
  "kitAutoOutputPathFilenamePattern": "*.html",
1110
  "kitAutoOutputPathRelativePath": "",
1132
  "markdownAutoOutputPathReplace1": "",
1133
  "markdownAutoOutputPathReplace2": "",
1134
  "markdownAutoOutputPathStyle": 0,
1135
+ "markdownCriticStyle": 0,
1136
  "markdownEnableFootnotes": 0,
1137
+ "markdownEnableLabels": 1,
1138
+ "markdownEnableSmartQuotes": 1,
1139
+ "markdownEscapeLineBreaks": 0,
1140
+ "markdownMaskEmailAddresses": 1,
1141
+ "markdownOutputFormat": 0,
1142
+ "markdownOutputStyle": 0,
1143
+ "markdownParseMetadata": 1,
1144
+ "markdownProcessHTML": 0,
1145
+ "markdownRandomFootnoteNumbers": 0,
1146
+ "markdownUseCompatibilityMode": 0,
1147
  "reloadFileURLs": 0,
1148
  "sassAutoOutputPathEnabled": 1,
1149
  "sassAutoOutputPathFilenamePattern": "*.css",
1202
  "active": 0,
1203
  "flagValue": -1
1204
  },
1205
+ "bare-returns": {
1206
+ "active": 0,
1207
+ "flagValue": -1
1208
+ },
1209
  "booleans": {
1210
  "active": 1,
1211
  "flagValue": -1
1286
  "active": 0,
1287
  "flagValue": -1
1288
  },
1289
+ "keep_fnames": {
1290
+ "active": 0,
1291
+ "flagValue": -1
1292
+ },
1293
  "loops": {
1294
  "active": 1,
1295
  "flagValue": -1
envira-gallery-lite.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
- * Version: 1.2.5
9
  * Text Domain: envira-gallery
10
  * Domain Path: languages
11
  *
@@ -54,7 +54,7 @@ class Envira_Gallery_Lite {
54
  *
55
  * @var string
56
  */
57
- public $version = '1.2.5';
58
 
59
  /**
60
  * The name of the plugin.
5
  * Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
6
  * Author: Thomas Griffin
7
  * Author URI: http://thomasgriffinmedia.com
8
+ * Version: 1.2.6
9
  * Text Domain: envira-gallery
10
  * Domain Path: languages
11
  *
54
  *
55
  * @var string
56
  */
57
+ public $version = '1.2.6';
58
 
59
  /**
60
  * The name of the plugin.
includes/admin/ajax.php CHANGED
@@ -83,11 +83,26 @@ function envira_gallery_lite_ajax_load_library() {
83
 
84
  // Prepare variables.
85
  $offset = (int) $_POST['offset'];
 
86
  $post_id = absint( $_POST['post_id'] );
87
  $html = '';
88
 
89
- // Grab the library contents with the included offset parameter.
90
- $library = get_posts( array( 'post_type' => 'attachment', 'post_mime_type' => 'image', 'post_status' => 'any', 'posts_per_page' => 20, 'offset' => $offset ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  if ( $library ) {
92
  foreach ( (array) $library as $image ) {
93
  $has_gallery = get_post_meta( $image->ID, '_eg_has_gallery', true );
@@ -117,39 +132,14 @@ add_action( 'wp_ajax_envira_gallery_library_search', 'envira_gallery_lite_ajax_l
117
  * Searches the Media Library for images matching the term specified in the search.
118
  *
119
  * @since 1.0.0
 
120
  */
121
  function envira_gallery_lite_ajax_library_search() {
122
 
123
- // Run a security check first.
124
- check_ajax_referer( 'envira-gallery-library-search', 'nonce' );
125
-
126
- // Prepare variables.
127
- $search = stripslashes( $_POST['search'] );
128
- $post_id = absint( $_POST['post_id'] );
129
- $html = '';
130
-
131
- // Grab the library contents with the included offset parameter.
132
- $library = get_posts( array( 'post_type' => 'attachment', 'post_mime_type' => 'image', 'post_status' => 'any', 'posts_per_page' => -1, 's' => $search ) );
133
- if ( $library ) {
134
- foreach ( (array) $library as $image ) {
135
- $has_gallery = get_post_meta( $image->ID, '_eg_has_gallery', true );
136
- $class = $has_gallery && in_array( $post_id, (array) $has_gallery ) ? ' selected envira-gallery-in-gallery' : '';
137
-
138
- $html .= '<li class="attachment' . $class . '" data-attachment-id="' . absint( $image->ID ) . '">';
139
- $html .= '<div class="attachment-preview landscape">';
140
- $html .= '<div class="thumbnail">';
141
- $html .= '<div class="centered">';
142
- $src = wp_get_attachment_image_src( $image->ID, 'thumbnail' );
143
- $html .= '<img src="' . esc_url( $src[0] ) . '" />';
144
- $html .= '</div>';
145
- $html .= '</div>';
146
- $html .= '<a class="check" href="#"><div class="media-modal-icon"></div></a>';
147
- $html .= '</div>';
148
- $html .= '</li>';
149
- }
150
- }
151
-
152
- echo json_encode( array( 'html' => stripslashes( $html ) ) );
153
  die;
154
 
155
  }
83
 
84
  // Prepare variables.
85
  $offset = (int) $_POST['offset'];
86
+ $search = trim( stripslashes( $_POST['search'] ) );
87
  $post_id = absint( $_POST['post_id'] );
88
  $html = '';
89
 
90
+ // Build args
91
+ $args = array(
92
+ 'post_type' => 'attachment',
93
+ 'post_mime_type'=> 'image',
94
+ 'post_status' => 'any',
95
+ 'posts_per_page'=> 20,
96
+ 'offset' => $offset,
97
+ );
98
+
99
+ // Add search term to args if not empty
100
+ if ( ! empty( $search ) ) {
101
+ $args['s'] = $search;
102
+ }
103
+
104
+ // Grab the library contents
105
+ $library = get_posts( $args );
106
  if ( $library ) {
107
  foreach ( (array) $library as $image ) {
108
  $has_gallery = get_post_meta( $image->ID, '_eg_has_gallery', true );
132
  * Searches the Media Library for images matching the term specified in the search.
133
  *
134
  * @since 1.0.0
135
+ * @deprecated 1.2.6
136
  */
137
  function envira_gallery_lite_ajax_library_search() {
138
 
139
+ // Search is now performed by envira_gallery_lite_ajax_load_library()
140
+ // Return the result of that function, so addons and custom code relying on this action
141
+ // doesn't break
142
+ envira_gallery_lite_ajax_load_library();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  die;
144
 
145
  }
includes/admin/metaboxes.php CHANGED
@@ -77,6 +77,14 @@ class Envira_Gallery_Metaboxes_Lite {
77
  wp_register_style( $this->base->plugin_slug . '-metabox-style', plugins_url( 'assets/css/metabox.css', $this->base->file ), array(), $this->base->version );
78
  wp_enqueue_style( $this->base->plugin_slug . '-metabox-style' );
79
 
 
 
 
 
 
 
 
 
80
  }
81
 
82
  /**
@@ -468,7 +476,7 @@ class Envira_Gallery_Metaboxes_Lite {
468
  <div class="attachments-browser">
469
  <div class="media-toolbar envira-gallery-library-toolbar">
470
  <div class="media-toolbar-primary">
471
- <span class="spinner envira-gallery-spinner"></span><input type="search" placeholder="<?php esc_attr_e( 'Search', 'envira-gallery' ); ?>" id="envira-gallery-gallery-search" class="search" value="" />
472
  </div>
473
  <div class="media-toolbar-secondary">
474
  <a class="button media-button button-large button-secodary envira-gallery-load-library" href="#" data-envira-gallery-offset="20"><?php _e( 'Load More Images from Library', 'envira-gallery' ); ?></a></a><span class="spinner envira-gallery-spinner"></span>
77
  wp_register_style( $this->base->plugin_slug . '-metabox-style', plugins_url( 'assets/css/metabox.css', $this->base->file ), array(), $this->base->version );
78
  wp_enqueue_style( $this->base->plugin_slug . '-metabox-style' );
79
 
80
+ // If WordPress version < 4.0, add attachment-details-modal-support.css
81
+ // This contains the 4.0 CSS to make the attachment window display correctly
82
+ $version = (float) get_bloginfo( 'version' );
83
+ if ( $version < 4 ) {
84
+ wp_register_style( $this->base->plugin_slug . '-attachment-details-modal-support', plugins_url( 'assets/css/attachment-details-modal-support.css', $this->base->file ), array(), $this->base->version );
85
+ wp_enqueue_style( $this->base->plugin_slug . '-attachment-details-modal-support' );
86
+ }
87
+
88
  }
89
 
90
  /**
476
  <div class="attachments-browser">
477
  <div class="media-toolbar envira-gallery-library-toolbar">
478
  <div class="media-toolbar-primary">
479
+ <input type="search" placeholder="<?php esc_attr_e( 'Search', 'envira-gallery' ); ?>" id="envira-gallery-gallery-search" class="search" value="" />
480
  </div>
481
  <div class="media-toolbar-secondary">
482
  <a class="button media-button button-large button-secodary envira-gallery-load-library" href="#" data-envira-gallery-offset="20"><?php _e( 'Load More Images from Library', 'envira-gallery' ); ?></a></a><span class="spinner envira-gallery-spinner"></span>
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: griffinjt
3
  Tags: wordpress gallery, gallery, wordpress gallery plugin, gallery plugin, responsive, responsive gallery, image gallery, image gallery plugin, responsive gallery plugin, responsive image gallery, responsive image gallery plugin, custom post types, slideshow, responsive slideshow, slideshow plugin, responsive slideshow plugin, rotator, image rotator, responsive rotator, jquery gallery, javascript gallery, jquery rotator, javascript rotator, picture gallery, photo gallery, photo rotator, shortcode, template tag, custom post type, media uploader, ajax, wordpress galleries, responsive galleries, fullscreen, deeplinking, best wordpress gallery, best wordpress gallery plugin, best gallery plugin, best gallery, best responsive gallery, best responsive wordpress gallery, best wp gallery
4
  Requires at least: 3.8
5
- Tested up to: 4.2.1
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
@@ -57,6 +57,11 @@ Also, I'm an <a href="https://thomasgriffin.io" rel="me" title="WordPress Develo
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
60
  = 1.2.5 =
61
  * Added: WordPress 4.2.1 support
62
 
2
  Contributors: griffinjt
3
  Tags: wordpress gallery, gallery, wordpress gallery plugin, gallery plugin, responsive, responsive gallery, image gallery, image gallery plugin, responsive gallery plugin, responsive image gallery, responsive image gallery plugin, custom post types, slideshow, responsive slideshow, slideshow plugin, responsive slideshow plugin, rotator, image rotator, responsive rotator, jquery gallery, javascript gallery, jquery rotator, javascript rotator, picture gallery, photo gallery, photo rotator, shortcode, template tag, custom post type, media uploader, ajax, wordpress galleries, responsive galleries, fullscreen, deeplinking, best wordpress gallery, best wordpress gallery plugin, best gallery plugin, best gallery, best responsive gallery, best responsive wordpress gallery, best wp gallery
4
  Requires at least: 3.8
5
+ Tested up to: 4.2.2
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
57
 
58
  == Changelog ==
59
 
60
+ = 1.2.6 =
61
+ * Added: Insert Images Modal automatically loads more images on scroll
62
+ * Added: Insert Images Modal search functionality performance improved
63
+ * Fix: Better Insert Images Modal image grid layout for WordPress 4.0+
64
+
65
  = 1.2.5 =
66
  * Added: WordPress 4.2.1 support
67