Slider by Soliloquy – Responsive Image Slider for WordPress - Version 2.5.0.1

Version Description

  • Fix: PHP 5.2 compat issues causing admin screen to be un-functional
  • Fix: Numerous UI bug fixes
Download this release

Release Info

Developer chrisakelley
Plugin Icon 128x128 Slider by Soliloquy – Responsive Image Slider for WordPress
Version 2.5.0.1
Comparing to
See all releases

Code changes from version 2.5.0 to 2.5.0.1

assets/js/min/metabox-min.js CHANGED
@@ -1 +1 @@
1
- function SoliloquySlidesUpdate(e){SoliloquySlides.reset();var t="ul#soliloquy-output li.soliloquy-slide"+(e?".selected":"");jQuery(t).each(function(){var e=jQuery.parseJSON(jQuery(this).attr("data-soliloquy-image-model"));SoliloquySlides.add(new SoliloquySlide(e))})}jQuery(document).ready(function($){$("a.soliloquy-media-library").on("click",function(e){return e.preventDefault(),wp.media.frames.soliloquy?void wp.media.frames.soliloquy.open():(wp.media.frames.soliloquy=new wp.media.view.MediaFrame.Post({title:wp.media.view.l10n.insertIntoPost,button:{text:wp.media.view.l10n.insertIntoPost},multiple:!0,library:{type:"image"}}),wp.media.frames.soliloquy.on("open",function(){var e=wp.media.frames.soliloquy.state().get("selection");$("ul#soliloquy-output li").each(function(){var t=wp.media.attachment($(this).attr("id"));e.add(t?[t]:[])})}),wp.media.frames.soliloquy.on("ready",function(e){}),wp.media.frames.soliloquy.on("insert",function(e){var t=wp.media.frames.soliloquy.state(),i=[];e.each(function(e){var l=t.display(e).toJSON(),o=e.get("type");switch(l.link){case"none":e.set("link","");break;case"file":e.set("link",e.get("url"));break;case"post":break;case"custom":e.set("link",l.linkUrl)}"image"===o&&i.push(e.toJSON())},this),$.post(soliloquy_metabox.ajax,{action:"soliloquy_insert_slides",nonce:soliloquy_metabox.insert_nonce,post_id:soliloquy_metabox.id,images:i},function(e){if(e){$("#soliloquy-output").html(e.data),SoliloquySlidesUpdate();var t=$("#soliloquy-output li").length;$(".soliloquy-count").text(t.toString()),t>0&&($("#soliloquy-empty-slider").fadeOut().addClass("soliloquy-hidden"),$(".soliloquy-slide-header").removeClass("soliloquy-hidden").fadeIn(),$(".soliloquy-bulk-actions").fadeOut())}},"json")}),wp.media.frames.soliloquy.open(),$("div.media-menu a.media-menu-item:nth-child(2)").addClass("hidden"),$("div.media-menu a.media-menu-item:nth-child(4)").addClass("hidden"),void $("div.media-menu a.media-menu-item:nth-child(6)").addClass("hidden"))})}),function($,e,t,i){"use strict";var l={init:function(){this.select_all(),this.sortable(),this.select(),this.display(),this.chosen(),this.slide_size(),this.uploadImage(),this.toggleStatus(),this.tooltip(),this.clear_selected(),new Clipboard(".soliloquy-clipboard"),$("ul#soliloquy-output").on("click","a.check",function(e){e.preventDefault()}),$(".soliloquy-clipboard").on("click",function(e){e.preventDefault()});var e=$("#soliloquy-output li").length;$(".soliloquy-count").text(e.toString()),$("input,select").conditional()},toggleStatus:function(){$("#soliloquy-settings-content").on("click.soliloquyStatus",".soliloquy-slide-status",function(e){if(e.preventDefault(),$(this).hasClass("list-status"))var t=$(this).parent().parent().parent();else var t=$(this).parent();var l=$(this),o=l.data("status"),a=t.find(".soliloquy-slide-status.list-status"),s=t.find(".soliloquy-slide-status.grid-status"),n=l.parent().parent().data("view"),d=l.data("id"),u=s.find("span.dashicons"),r=a.find("span"),c=l.data("soliloquy-tooltip");if("active"===o)var h="pending";else var h="active";var m={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_change_slide_status",post_id:i.id,slide_id:d,status:h,nonce:i.save_nonce},success:function(e){"active"===h?(s.removeClass("soliloquy-draft-slide").addClass("soliloquy-active-slide"),a.removeClass("soliloquy-draft-slide").addClass("soliloquy-active-slide"),u.removeClass("dashicons-hidden").addClass("dashicons-visibility"),r.text(i.active),s.attr("data-soliloquy-tooltip",i.active),a.data("status","active"),s.data("status","active")):(s.removeClass("soliloquy-active-slide").addClass("soliloquy-draft-slide"),a.removeClass("soliloquy-active-slide").addClass("soliloquy-draft-slide"),u.removeClass("dashicons-visibility").addClass("dashicons-hidden"),r.text(i.draft),a.data("status","pending"),s.data("status","pending"),s.attr("data-soliloquy-tooltip",i.draft))},error:function(e,t,i){}};$.ajax(m)})},tooltip:function(){$("[data-soliloquy-tooltip]").on("mouseover",function(e){e.preventDefault();var t=$(this),i=t.data("soliloquy-tooltip");console.log(i)})},select_all:function(){$(".soliloquy-select-all").change(function(){var e=this.checked;if(e){$("ul#soliloquy-output li").addClass("selected"),$(".soliloquy-bulk-actions").fadeIn();var t=$("ul#soliloquy-output li.selected").length;$(".select-all").text(i.selected),$(".soliloquy-count").text(t.toString()),$(".soliloquy-clear-selected").fadeIn()}else{$("ul#soliloquy-output li").removeClass("selected"),$(".soliloquy-bulk-actions").fadeOut();var l=$("ul#soliloquy-output li").length;$(".select-all").text(i.select_all),$(".soliloquy-count").text(l.toString()),$(".soliloquy-clear-selected").fadeOut()}})},sortable:function(){var e=$("#soliloquy-output");e.sortable({containment:"#soliloquy-slider-main",items:"li",cursor:"move",forcePlaceholderSize:!0,placeholder:"dropzone",update:function(t,l){var o={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_sort_images",order:e.sortable("toArray").toString(),post_id:i.id,nonce:i.sort},success:function(e){SoliloquySlidesUpdate()},error:function(e,t,i){}};$.ajax(o)}})},select:function(){var e=!1,l=!1;$("li.soliloquy-slide .soliloquy-item-content, .soliloquy-list li a.check").on("click",function(t){var o=$(this),a=$(this).parent();if(console.log(o),console.log(a),t.preventDefault(),$(a).hasClass("selected")){$(a).removeClass("selected"),l=!1;var s=$("ul#soliloquy-output li.selected").length;if(0!==s)$(".select-all").text(i.selected),$(".soliloquy-count").text(s.toString()),$(".soliloquy-clear-selected").fadeIn();else{var n=$("ul#soliloquy-output li").length;$(".select-all").text(i.select_all),$(".soliloquy-count").text(n.toString()),$(".soliloquy-clear-selected").fadeOut()}}else{if(e&&l!==!1){var d=$("ul#soliloquy-output li").index($(l)),u=$("ul#soliloquy-output li").index($(a)),r=0;if(u>d)for(r=d;u>=r;r++)$("ul#soliloquy-output li:eq( "+r+")").addClass("selected");else for(r=u;d>=r;r++)$("ul#soliloquy-output li:eq( "+r+")").addClass("selected")}$(a).addClass("selected"),l=$(a),s=$("ul#soliloquy-output li.selected").length,$(".soliloquy-clear-selected").fadeIn(),$(".select-all").text(i.selected),$(".soliloquy-count").text(s.toString())}$("ul#soliloquy-output > li.selected").length>0?$(".soliloquy-bulk-actions").fadeIn():$(".soliloquy-bulk-actions").fadeOut()}),$(t).on("keyup keydown",function(t){e=t.shiftKey})},slide_size:function(){$(t).on("change","#soliloquy-config-slider-size",function(){var e=$(this),t=e.val(),l=e.find(":selected").data("soliloquy-width"),o=e.find(":selected").data("soliloquy-height");"default"==t&&($("#soliloquy-config-slider-width").val(i.slide_width),$("#soliloquy-config-slider-height").val(i.slide_height)),l&&$("#soliloquy-config-slider-width").val(l),o&&$("#soliloquy-config-slider-height").val(o)})},clear_selected:function(){$(".soliloquy-clear-selected").on("click",function(e){e.preventDefault();var t=$("#soliloquy-output li").length;$("ul#soliloquy-output li").removeClass("selected"),$(".select-all").text(i.select_all),$(".soliloquy-count").text(t.toString()),$(".soliloquy-select-all").prop("checked",!1),$(".soliloquy-bulk-actions").fadeOut(),$(this).fadeOut()})},display:function(){$("a.soliloquy-display").on("click",function(e){if(e.preventDefault(),!$(this).hasClass("active-display")){var t=$(this),l=t.data("soliloquy-display"),o=$("#soliloquy-output"),a={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_slider_view",post_id:i.id,view:l,nonce:i.save_nonce},success:function(e){}};$.ajax(a),$(".soliloquy-display-toggle").find(".active-display").removeClass("active-display"),t.addClass("active-display"),"grid"===l?o.removeClass("soliloquy-list").addClass("soliloquy-grid"):"list"===l&&o.removeClass("soliloquy-grid").addClass("soliloquy-list")}})},chosen:function(){$(".soliloquy-chosen").each(function(){var e=$(this).data("soliloquy-chosen-options");$(this).chosen(e)})},uploadImage:function(){$(".soliloquy-insert-image").on("click",function(e){var t;e.preventDefault();var l=$(event.currentTarget),o=l.parent().find("input");return console.log(o),t?void t.open():(t=wp.media.frames.soliloquy_image_frame=wp.media({frame:"select",library:{type:"image"},title:i.insert_image,button:{text:i.insert_image},contentUserSetting:!1,multiple:!1}),t.on("select",function(){var e=t.state().get("selection").first().toJSON();o.val(e.url)}),void t.open())})}};$(function(){l.init()}),$(t).on("soliloquyType",function(){l.init()})}(jQuery,window,document,soliloquy_metabox);var SoliloquySlide=Backbone.Model.extend({defaults:{id:"",title:"",caption:"",alt:"",link:"",type:""}}),SoliloquySlides=new Backbone.Collection,SoliloquyModalWindow=new wp.media.view.Modal({controller:{trigger:function(){}}}),SoliloquyView=wp.Backbone.View.extend({id:"soliloquy-meta-edit",tagName:"div",className:"edit-attachment-frame mode-select hide-menu hide-router",template:wp.template("soliloquy-meta-editor"),events:{"click .edit-media-header .left":"loadPreviousItem","click .edit-media-header .right":"loadNextItem","keyup input":"updateItem","keyup textarea":"updateItem","change input":"updateItem","change textarea":"updateItem","keyup .CodeMirror":"updateCode","blur textarea":"updateItem","change select":"updateItem","click a.soliloquy-meta-submit":"saveItem","keyup input#link-search":"searchLinks","click div.query-results li":"insertLink","click a.soliloquy-thumbnail":"insertThumb","click a.soliloquy-thumbnail-delete":"removeThumb","click button.media-file":"insertMediaFileLink","click button.attachment-page":"insertAttachmentPageLink"},initialize:function(e){this.is_loading=!1,this.collection=e.collection,this.child_views=e.child_views,this.attachment_id=e.attachment_id,this.attachment_index=0,this.search_timer="";var t=0;this.collection.each(function(e){return e.get("id")==this.attachment_id?(this.model=e,this.attachment_index=t,!1):void t++},this)},updateCode:function(e){console.log("logged"),$model=this.model,$textarea=this.$el.find(".soliloquy-html-slide-code"),$model.set("code",this.editor.getValue(),{silent:!0}),$textarea.text()},insertThumb:function(e){$model=this.model,e.preventDefault();var t=this.$el.data("field"),i=wp.media.frames.soliloquy_media_frame=wp.media({className:"media-frame soliloquy-media-frame",frame:"select",multiple:!1,title:soliloquy_metabox.videoframe,library:{type:"image"},button:{text:soliloquy_metabox.videouse}});i.on("select",function(){var e=i.state().get("selection").first().toJSON();$model.set("src",e.url,{silent:!0}),jQuery("div.thumbnail > img",$parent.find(".media-frame-content")).attr("src",e.url)}),i.open()},removeThumb:function(e){e.preventDefault(),$model=this.model,$parent=this.$el.parent(),jQuery("div.thumbnail > img",$parent.find(".media-frame-content")).attr("src",""),$model.set("src","",{silent:!0})},render:function(){return this.$el.html(this.template(this.model.attributes)),this.child_views.length>0&&this.child_views.forEach(function(e){var t=new e({model:this.model});this.$el.find("div.addons").append(t.render().el)},this),this.$el.find("textarea[name=caption]").val(this.model.get("caption")),setTimeout(function(){quicktags({id:"caption",buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()},500),wpLink.init,0==this.attachment_index&&this.$el.find("button.left").addClass("disabled"),this.attachment_index==this.collection.length-1&&this.$el.find("button.right").addClass("disabled"),textarea=this.$el.find(".soliloquy-html-slide-code"),textarea.length&&(this.editor=CodeMirror.fromTextArea(textarea[0],{enterMode:"keep",indentUnit:4,electricChars:!1,lineNumbers:!0,lineWrapping:!0,matchBrackets:!0,mode:"php",smartIndent:!1,tabMode:"shift",theme:"ttcn"})),this.$el.trigger("soliloquyRenderMeta"),this},loading:function(){this.is_loading=!0,this.$el.find(".spinner").css("visibility","visible")},loaded:function(e){this.is_loading=!1,this.$el.find(".spinner").css("visibility","hidden"),"undefined"!=typeof e&&alert(e)},loadPreviousItem:function(){this.attachment_index--,this.model=this.collection.at(this.attachment_index),this.attachment_id=this.model.get("id"),this.render()},loadNextItem:function(){this.attachment_index++,this.model=this.collection.at(this.attachment_index),this.attachment_id=this.model.get("id"),this.render()},updateItem:function(e){""!=e.target.name&&("checkbox"==e.target.type?value=e.target.checked?1:0:value=e.target.value,this.model.set(e.target.name,value))},saveItem:function(e){e.preventDefault(),this.trigger("loading"),wp.media.ajax("soliloquy_save_meta",{context:this,data:{nonce:soliloquy_metabox.save_nonce,post_id:soliloquy_metabox.id,attach_id:this.model.get("id"),meta:this.model.attributes},success:function(e){this.trigger("loaded loaded:success");var t=JSON.stringify(this.model.attributes);jQuery("ul#soliloquy-output li#"+this.model.get("id")).attr("data-soliloquy-image-model",t);var i=this.$el.find(".saved");i.fadeIn(),setTimeout(function(){i.fadeOut()},1500)},error:function(e){this.trigger("loaded loaded:error",e)}})},searchLinks:function(e){},insertLink:function(e){},insertMediaFileLink:function(e){this.trigger("loading"),wp.media.ajax("soliloquy_get_attachment_links",{context:this,data:{nonce:soliloquy_metabox.save_nonce,attachment_id:this.model.get("id")},success:function(e){this.model.set("link",e.media_link),this.trigger("loaded loaded:success"),this.render()},error:function(e){this.trigger("loaded loaded:error",e)}})},insertAttachmentPageLink:function(e){this.trigger("loading"),wp.media.ajax("soliloquy_get_attachment_links",{context:this,data:{nonce:soliloquy_metabox.save_nonce,attachment_id:this.model.get("id")},success:function(e){this.model.set("link",e.attachment_page),this.trigger("loaded loaded:success"),this.render()},error:function(e){this.trigger("loaded loaded:error",e)}})}}),SoliloquyChildViews=[],SoliloquyContentViews=[];!function($){$(document).ready(function(){soliloquy_edit={init:function(){SoliloquySlidesUpdate(),$("#soliloquy-settings-content").on("click.soliloquyModify",".soliloquy-modify-slide",function(e){e.preventDefault();var t=$(this).parent().data("soliloquy-slide");SoliloquyModalWindow.content(new SoliloquyView({collection:SoliloquySlides,child_views:SoliloquyChildViews,attachment_id:t})),SoliloquyModalWindow.open(),$(".CodeMirror").each(function(e,t){t.CodeMirror.refresh()})})}},soliloquy_edit.init()}),$(document).on("soliloquyUploaded",function(){soliloquy_edit.init()})}(jQuery);var SoliloquyBulkEditImageView=wp.Backbone.View.extend({tagName:"li",className:"attachment",template:wp.template("soliloquy-meta-bulk-editor-slides"),initialize:function(e){this.model=e.model},render:function(){return this.$el.html(this.template(this.model.attributes)),this}}),SoliloquyBulkEditView=wp.Backbone.View.extend({id:"soliloquy-meta-edit-bulk",tagName:"div",className:"edit-attachment-frame mode-select hide-menu hide-router",template:wp.template("soliloquy-meta-bulk-editor"),events:{"keyup input":"updateItem","keyup textarea":"updateItem","change input":"updateItem","change textarea":"updateItem","blur textarea":"updateItem","change select":"updateItem","click .actions a.soliloquy-meta-submit":"saveItem","keyup input#link-search":"searchLinks","click div.query-results li":"insertLink","click button.media-file":"insertMediaFileLink","click button.attachment-page":"insertAttachmentPageLink"},initialize:function(e){this.on("loading",this.loading,this),this.on("loaded",this.loaded,this),this.is_loading=!1,this.collection=e.collection,this.child_views=e.child_views,this.model=new SoliloquySlide},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.collection.forEach(function(e){var t=new SoliloquyBulkEditImageView({model:e});this.$el.find("ul.attachments").append(t.render().el)},this),this.child_views.length>0&&this.child_views.forEach(function(e){var t=new e({model:this.model});this.$el.find("div.addons").append(t.render().el)},this),this.$el.find("textarea[name=caption]").val(this.model.get("caption")),setTimeout(function(){quicktags({id:"caption",buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()},100),wpLink.init,this},renderError:function(e){var t={};t.error=e;var i=new wp.media.view.SoliloquyError({model:t});return i.render().el},loading:function(){this.is_loading=!0,this.$el.find(".spinner").css("visibility","visible")},loaded:function(e){this.is_loading=!1,this.$el.find(".spinner").css("visibility","hidden"),"undefined"!=typeof e&&this.$el.find("ul.attachments").before(this.renderError(e))},updateItem:function(e){""!=e.target.name&&("checkbox"==e.target.type?value=e.target.checked?1:0:value=e.target.value,this.model.set(e.target.name,value))},saveItem:function(){this.trigger("loading");var e=[];this.collection.forEach(function(t){e.push(t.id)},this),wp.media.ajax("soliloquy_bulk_save_meta",{context:this,data:{nonce:soliloquy_metabox.save_nonce,post_id:soliloquy_metabox.id,meta:this.model.attributes,image_ids:e},success:function(e){this.collection.forEach(function(e){for(var t in this.model.attributes)value=this.model.attributes[t],value.length>0&&e.set(t,value);var i=JSON.stringify(e.attributes);jQuery("ul#soliloquy li#"+e.get("id")).attr("data-solioquy-image-model",i),jQuery("ul#soliloquy li#"+e.get("id")+" div.title").text(e.get("title"))},this),this.trigger("loaded loaded:success"),SoliloquyModalWindow.close()},error:function(e){this.trigger("loaded loaded:error",e)}})},insertMediaFileLink:function(e){this.trigger("loading"),this.model.set("link",response.media_link),this.trigger("loaded loaded:success"),this.render()},insertAttachmentPageLink:function(e){this.trigger("loading"),this.model.set("link",response.media_link),this.trigger("loaded loaded:success"),this.render()}});jQuery(document).ready(function($){$("#soliloquy-settings-content").on("click","a.soliloquy-slides-edit",function(e){e.preventDefault(),SoliloquySlidesUpdate(!0),SoliloquyModalWindow.content(new SoliloquyBulkEditView({collection:SoliloquySlides,child_views:SoliloquyChildViews})),SoliloquyModalWindow.open()})}),jQuery(document).ready(function($){$("a.soliloquy-slides-delete").click(function(e){e.preventDefault();var t=confirm(soliloquy_metabox.remove_multiple);if(!t)return!1;var i=[];$("ul#soliloquy-output > li.selected").each(function(){i.push($(this).attr("id"))});var l={action:"soliloquy_remove_slides",attachment_ids:i,post_id:soliloquy_metabox.id,nonce:soliloquy_metabox.remove_nonce};$.post(soliloquy_metabox.ajax,l,function(e){$("ul#soliloquy-output > li.selected").remove(),$(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-select-all").prop("checked",!1),$(".soliloquy-load-library").attr("data-soliloquy-offset",0).addClass("has-search").trigger("click"),SoliloquySlidesUpdate(!1);var t=$("#soliloquy-output li").length;$(".soliloquy-count").text(t.toString()),0===t&&($(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-slide-header").fadeOut().addClass("soliloquy-hidden"),$("#soliloquy-empty-slider").removeClass("soliloquy-hidden").fadeIn())},"json")}),$("#soliloquy-settings-content ").on("click",".soliloquy-remove-slide",function(e){e.preventDefault();var t=confirm(soliloquy_metabox.remove);if(t){var i=$(this).parent().attr("id"),l={action:"soliloquy_remove_slide",attachment_id:i,post_id:soliloquy_metabox.id,nonce:soliloquy_metabox.remove_nonce};$.post(soliloquy_metabox.ajax,l,function(e){$("#"+i).fadeOut("normal",function(){$(this).remove(),$(".soliloquy-load-library").attr("data-soliloquy-offset",0).addClass("has-search").trigger("click"),SoliloquySlidesUpdate(!1);var e=$("#soliloquy-output li").length;$(".soliloquy-count").text(e.toString()),0===e&&($(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-slide-header").fadeOut().addClass("soliloquy-hidden"),$("#soliloquy-empty-slider").removeClass("soliloquy-hidden").fadeIn())})},"json")}})}),function($){$(function(){var e=soliloquy_editor_frame=!1,t=function(t){t.preventDefault(),$(".soliloquy-default-ui .selected").removeClass("details selected"),$(".soliloquy-default-ui").appendTo(".soliloquy-default-ui-wrapper").hide(),e=soliloquy_editor_frame=!1};$(document).on("click",".soliloquy-choose-slider, .soliloquy-modal-trigger",function(i){i.preventDefault(),e=i.target,soliloquy_editor_frame=!0,$(".soliloquy-default-ui").appendTo("body").show(),$(document).on("click",".media-modal-close, .media-modal-backdrop, .soliloquy-cancel-insertion",t),$(document).on("keydown",function(e){27==e.keyCode&&soliloquy_editor_frame&&t(e)})}),$(document).on("click",".soliloquy-default-ui .thumbnail, .soliloquy-default-ui .check, .soliloquy-default-ui .media-modal-icon",function(e){e.preventDefault(),$(this).parent().parent().hasClass("selected")?($(this).parent().parent().removeClass("details selected"),$(".soliloquy-insert-slider").attr("disabled","disabled")):($(this).parent().parent().parent().find(".selected").removeClass("details selected"),$(this).parent().parent().addClass("details selected"),$(".soliloquy-insert-slider").removeAttr("disabled"))}),$(document).on("click",".soliloquy-default-ui .check",function(e){e.preventDefault(),$(this).parent().parent().removeClass("details selected"),$(".soliloquy-insert-slider").attr("disabled","disabled")}),$(document).on("click",".soliloquy-default-ui .soliloquy-insert-slider",function(i){if(i.preventDefault(),$(e).hasClass("soliloquy-choose-slider"))wp.media.editor.insert('[soliloquy id="'+$(".soliloquy-default-ui .selected").data("soliloquy-id")+'"]');else{var l={action:"soliloquy_load_slider_data",post_id:$(".soliloquy-default-ui:first .selected").data("soliloquy-id")};$.post(ajaxurl,l,function(e){$(document).trigger({type:"soliloquySliderModalData",slider:e}),t(i)},"json")}t(i)})})}(jQuery),function($,e,t){"use strict";var i="",i="",l=e.location.hash,o=e.location.hash.replace("!","");if(l&&l.indexOf("soliloquy-tab")>=0){var a=$(o.replace("tab_","")),s=a.parent(),n=a.parent().parent().find("ul.soliloquy-tabs-nav"),d=$("#post").attr("action");console.log(a),s.find(".soliloquy-tab-active").removeClass("soliloquy-tab-active"),a.addClass("soliloquy-tab-active"),n.find(".soliloquy-tab-nav-active").removeClass("soliloquy-tab-nav-active"),n.find('a[href="'+o.replace("tab_","")+'"]').parent().addClass("soliloquy-tab-nav-active"),d&&(d=d.split("#")[0],$("#post").attr("action",d+e.location.hash)),$("body").trigger("SoliloquyTabChange")}$(function(){$("[data-soliloquy-tab]").on("click",function(t){t.preventDefault();var i=$(this),l=i.attr("data-tab-id"),o=i.parent(),a=o.parent(),s=o.attr("data-update-hashbang"),n="undefined"!=typeof i.attr("href")?"tab_"+i.attr("href"):"tab_"+l;if(!i.hasClass("soliloquy-tab-nav-active")){if(a.find(".soliloquy-tab-active").removeClass("soliloquy-tab-active"),o.find(".soliloquy-tab-nav-active").removeClass("soliloquy-tab-nav-active"),i.addClass("soliloquy-tab-nav-active"),$("#"+l).addClass("soliloquy-tab-active"),i.trigger("SoliloquyTabChange"),"soliloquy-native"===l&&$("#soliloquy-type-default").prop("checked")!==!0&&($("#soliloquy-types-nav li").removeClass("soliloquy-active"),$("#soliloquy-type-default").prop("checked",!0).trigger("change")),"1"===s){e.location.hash=n.split("#").join("#!");var d=$("#post").attr("action");d&&(d=d.split("#")[0],$("#post").attr("action",d+e.location.hash))}return!1}})})}(jQuery,window,document);
1
+ function SoliloquySlidesUpdate(e){SoliloquySlides.reset();var t="ul#soliloquy-output li.soliloquy-slide"+(e?".selected":"");jQuery(t).each(function(){var e=jQuery.parseJSON(jQuery(this).attr("data-soliloquy-image-model"));SoliloquySlides.add(new SoliloquySlide(e))})}jQuery(document).ready(function($){$("a.soliloquy-slides-delete").click(function(e){e.preventDefault();var t=confirm(soliloquy_metabox.remove_multiple);if(!t)return!1;var i=[];$("ul#soliloquy-output > li.selected").each(function(){i.push($(this).attr("id"))});var l={action:"soliloquy_remove_slides",attachment_ids:i,post_id:soliloquy_metabox.id,nonce:soliloquy_metabox.remove_nonce};$.post(soliloquy_metabox.ajax,l,function(e){$("ul#soliloquy-output > li.selected").remove(),$(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-select-all").prop("checked",!1),$(".soliloquy-load-library").attr("data-soliloquy-offset",0).addClass("has-search").trigger("click"),SoliloquySlidesUpdate(!1);var t=$("#soliloquy-output li").length;$(".soliloquy-count").text(t.toString()),0===t&&($(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-slide-header").fadeOut().addClass("soliloquy-hidden"),$("#soliloquy-empty-slider").removeClass("soliloquy-hidden").fadeIn())},"json")}),$("#soliloquy-settings-content ").on("click",".soliloquy-remove-slide",function(e){e.preventDefault();var t=confirm(soliloquy_metabox.remove);if(t){var i=$(this).parent().attr("id"),l={action:"soliloquy_remove_slide",attachment_id:i,post_id:soliloquy_metabox.id,nonce:soliloquy_metabox.remove_nonce};$.post(soliloquy_metabox.ajax,l,function(e){$("#"+i).fadeOut("normal",function(){$(this).remove(),$(".soliloquy-load-library").attr("data-soliloquy-offset",0).addClass("has-search").trigger("click"),SoliloquySlidesUpdate(!1);var e=$("#soliloquy-output li").length;$(".soliloquy-count").text(e.toString()),0===e&&($(".soliloquy-bulk-actions").fadeOut(),$(".soliloquy-slide-header").fadeOut().addClass("soliloquy-hidden"),$("#soliloquy-empty-slider").removeClass("soliloquy-hidden").fadeIn())})},"json")}})}),function($,e,t,i){"use strict";var l={init:function(){this.select_all(),this.sortable(),this.select(),this.display(),this.chosen(),this.slide_size(),this.uploadImage(),this.toggleStatus(),this.tooltip(),this.clear_selected(),new Clipboard(".soliloquy-clipboard"),$("ul#soliloquy-output").on("click","a.check",function(e){e.preventDefault()}),$(".soliloquy-clipboard").on("click",function(e){e.preventDefault()});var e=$("#soliloquy-output li").length;$(".soliloquy-count").text(e.toString()),$("input,select").conditional()},toggleStatus:function(){$("#soliloquy-settings-content").on("click.soliloquyStatus",".soliloquy-slide-status",function(e){if(e.preventDefault(),$(this).hasClass("list-status"))var t=$(this).parent().parent().parent();else var t=$(this).parent();var l=$(this),o=l.data("status"),a=t.find(".soliloquy-slide-status.list-status"),s=t.find(".soliloquy-slide-status.grid-status"),n=l.parent().parent().data("view"),d=l.data("id"),u=s.find("span.dashicons"),c=a.find("span"),r=l.data("soliloquy-tooltip");if("active"===o)var h="pending";else var h="active";var m={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_change_slide_status",post_id:i.id,slide_id:d,status:h,nonce:i.save_nonce},success:function(e){"active"===h?(s.removeClass("soliloquy-draft-slide").addClass("soliloquy-active-slide"),a.removeClass("soliloquy-draft-slide").addClass("soliloquy-active-slide"),u.removeClass("dashicons-hidden").addClass("dashicons-visibility"),c.text(i.active),s.attr("data-soliloquy-tooltip",i.active),a.data("status","active"),s.data("status","active")):(s.removeClass("soliloquy-active-slide").addClass("soliloquy-draft-slide"),a.removeClass("soliloquy-active-slide").addClass("soliloquy-draft-slide"),u.removeClass("dashicons-visibility").addClass("dashicons-hidden"),c.text(i.draft),a.data("status","pending"),s.data("status","pending"),s.attr("data-soliloquy-tooltip",i.draft))},error:function(e,t,i){}};$.ajax(m)})},tooltip:function(){$("[data-soliloquy-tooltip]").on("mouseover",function(e){e.preventDefault();var t=$(this),i=t.data("soliloquy-tooltip");console.log(i)})},select_all:function(){$(".soliloquy-select-all").change(function(){var e=this.checked;if(e){$("ul#soliloquy-output li").addClass("selected"),$(".soliloquy-bulk-actions").fadeIn();var t=$("ul#soliloquy-output li.selected").length;$(".select-all").text(i.selected),$(".soliloquy-count").text(t.toString()),$(".soliloquy-clear-selected").fadeIn()}else{$("ul#soliloquy-output li").removeClass("selected"),$(".soliloquy-bulk-actions").fadeOut();var l=$("ul#soliloquy-output li").length;$(".select-all").text(i.select_all),$(".soliloquy-count").text(l.toString()),$(".soliloquy-clear-selected").fadeOut()}})},sortable:function(){var e=$("#soliloquy-output");e.sortable({containment:"#soliloquy-slider-main",items:"li",cursor:"move",forcePlaceholderSize:!0,placeholder:"dropzone",update:function(t,l){var o={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_sort_images",order:e.sortable("toArray").toString(),post_id:i.id,nonce:i.sort},success:function(e){SoliloquySlidesUpdate()},error:function(e,t,i){}};$.ajax(o)}})},select:function(){var e=!1,l=!1;$("li.soliloquy-slide .soliloquy-item-content, .soliloquy-list li a.check").on("click",function(t){var o=$(this),a=$(this).parent();if(console.log(o),console.log(a),t.preventDefault(),$(a).hasClass("selected")){$(a).removeClass("selected"),l=!1;var s=$("ul#soliloquy-output li.selected").length;if(0!==s)$(".select-all").text(i.selected),$(".soliloquy-count").text(s.toString()),$(".soliloquy-clear-selected").fadeIn();else{var n=$("ul#soliloquy-output li").length;$(".select-all").text(i.select_all),$(".soliloquy-count").text(n.toString()),$(".soliloquy-clear-selected").fadeOut()}}else{if(e&&l!==!1){var d=$("ul#soliloquy-output li").index($(l)),u=$("ul#soliloquy-output li").index($(a)),c=0;if(u>d)for(c=d;u>=c;c++)$("ul#soliloquy-output li:eq( "+c+")").addClass("selected");else for(c=u;d>=c;c++)$("ul#soliloquy-output li:eq( "+c+")").addClass("selected")}$(a).addClass("selected"),l=$(a),s=$("ul#soliloquy-output li.selected").length,$(".soliloquy-clear-selected").fadeIn(),$(".select-all").text(i.selected),$(".soliloquy-count").text(s.toString())}$("ul#soliloquy-output > li.selected").length>0?$(".soliloquy-bulk-actions").fadeIn():$(".soliloquy-bulk-actions").fadeOut()}),$(t).on("keyup keydown",function(t){e=t.shiftKey})},slide_size:function(){$(t).on("change","#soliloquy-config-slider-size",function(){var e=$(this),t=e.val(),l=e.find(":selected").data("soliloquy-width"),o=e.find(":selected").data("soliloquy-height");"default"==t&&($("#soliloquy-config-slider-width").val(i.slide_width),$("#soliloquy-config-slider-height").val(i.slide_height)),l&&$("#soliloquy-config-slider-width").val(l),o&&$("#soliloquy-config-slider-height").val(o)})},clear_selected:function(){$(".soliloquy-clear-selected").on("click",function(e){e.preventDefault();var t=$("#soliloquy-output li").length;$("ul#soliloquy-output li").removeClass("selected"),$(".select-all").text(i.select_all),$(".soliloquy-count").text(t.toString()),$(".soliloquy-select-all").prop("checked",!1),$(".soliloquy-bulk-actions").fadeOut(),$(this).fadeOut()})},display:function(){$("a.soliloquy-display").on("click",function(e){if(e.preventDefault(),!$(this).hasClass("active-display")){var t=$(this),l=t.data("soliloquy-display"),o=$("#soliloquy-output"),a={url:i.ajax,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_slider_view",post_id:i.id,view:l,nonce:i.save_nonce},success:function(e){}};$.ajax(a),$(".soliloquy-display-toggle").find(".active-display").removeClass("active-display"),t.addClass("active-display"),"grid"===l?o.removeClass("soliloquy-list").addClass("soliloquy-grid"):"list"===l&&o.removeClass("soliloquy-grid").addClass("soliloquy-list")}})},chosen:function(){$(".soliloquy-chosen").each(function(){var e=$(this).data("soliloquy-chosen-options");$(this).chosen(e)})},uploadImage:function(){$(".soliloquy-insert-image").on("click",function(e){var t;e.preventDefault();var l=$(event.currentTarget),o=l.parent().find("input");return console.log(o),t?void t.open():(t=wp.media.frames.soliloquy_image_frame=wp.media({frame:"select",library:{type:"image"},title:i.insert_image,button:{text:i.insert_image},contentUserSetting:!1,multiple:!1}),t.on("select",function(){var e=t.state().get("selection").first().toJSON();o.val(e.url)}),void t.open())})}};$(function(){l.init()}),$(t).on("soliloquyType",function(){l.init()})}(jQuery,window,document,soliloquy_metabox),jQuery(document).ready(function($){$("a.soliloquy-media-library").on("click",function(e){return e.preventDefault(),wp.media.frames.soliloquy?void wp.media.frames.soliloquy.open():(wp.media.frames.soliloquy=new wp.media.view.MediaFrame.Post({title:wp.media.view.l10n.insertIntoPost,button:{text:wp.media.view.l10n.insertIntoPost},multiple:!0,library:{type:"image"}}),wp.media.frames.soliloquy.on("open",function(){var e=wp.media.frames.soliloquy.state().get("selection");$("ul#soliloquy-output li").each(function(){var t=wp.media.attachment($(this).attr("id"));e.add(t?[t]:[])})}),wp.media.frames.soliloquy.on("ready",function(e){}),wp.media.frames.soliloquy.on("insert",function(e){var t=wp.media.frames.soliloquy.state(),i=[];e.each(function(e){var l=t.display(e).toJSON(),o=e.get("type");switch(l.link){case"none":e.set("link","");break;case"file":e.set("link",e.get("url"));break;case"post":break;case"custom":e.set("link",l.linkUrl)}"image"===o&&i.push(e.toJSON())},this),$.post(soliloquy_metabox.ajax,{action:"soliloquy_insert_slides",nonce:soliloquy_metabox.insert_nonce,post_id:soliloquy_metabox.id,images:i},function(e){if(e){$("#soliloquy-output").html(e.data),SoliloquySlidesUpdate();var t=$("#soliloquy-output li").length;$(".soliloquy-count").text(t.toString()),t>0&&($("#soliloquy-empty-slider").fadeOut().addClass("soliloquy-hidden"),$(".soliloquy-slide-header").removeClass("soliloquy-hidden").fadeIn(),$(".soliloquy-bulk-actions").fadeOut())}},"json")}),wp.media.frames.soliloquy.open(),$("div.media-menu a.media-menu-item:nth-child(2)").addClass("hidden"),$("div.media-menu a.media-menu-item:nth-child(4)").addClass("hidden"),void $("div.media-menu a.media-menu-item:nth-child(6)").addClass("hidden"))})});var SoliloquySlide=Backbone.Model.extend({defaults:{id:"",title:"",caption:"",alt:"",link:"",type:""}}),SoliloquySlides=new Backbone.Collection,SoliloquyModalWindow=new wp.media.view.Modal({controller:{trigger:function(){}}}),SoliloquyView=wp.Backbone.View.extend({id:"soliloquy-meta-edit",tagName:"div",className:"edit-attachment-frame mode-select hide-menu hide-router",template:wp.template("soliloquy-meta-editor"),events:{"click .edit-media-header .left":"loadPreviousItem","click .edit-media-header .right":"loadNextItem","keyup input":"updateItem","keyup textarea":"updateItem","change input":"updateItem","change textarea":"updateItem","keyup .CodeMirror":"updateCode","blur textarea":"updateItem","change select":"updateItem","click a.soliloquy-meta-submit":"saveItem","keyup input#link-search":"searchLinks","click div.query-results li":"insertLink","click a.soliloquy-thumbnail":"insertThumb","click a.soliloquy-thumbnail-delete":"removeThumb","click button.media-file":"insertMediaFileLink","click button.attachment-page":"insertAttachmentPageLink"},initialize:function(e){this.is_loading=!1,this.collection=e.collection,this.child_views=e.child_views,this.attachment_id=e.attachment_id,this.attachment_index=0,this.search_timer="";var t=0;this.collection.each(function(e){return e.get("id")==this.attachment_id?(this.model=e,this.attachment_index=t,!1):void t++},this)},updateCode:function(e){console.log("logged"),$model=this.model,$textarea=this.$el.find(".soliloquy-html-slide-code"),$model.set("code",this.editor.getValue(),{silent:!0}),$textarea.text()},insertThumb:function(e){$model=this.model,e.preventDefault();var t=this.$el.data("field"),i=wp.media.frames.soliloquy_media_frame=wp.media({className:"media-frame soliloquy-media-frame",frame:"select",multiple:!1,title:soliloquy_metabox.videoframe,library:{type:"image"},button:{text:soliloquy_metabox.videouse}});i.on("select",function(){var e=i.state().get("selection").first().toJSON();$model.set("src",e.url,{silent:!0}),jQuery("div.thumbnail > img",$parent.find(".media-frame-content")).attr("src",e.url)}),i.open()},removeThumb:function(e){e.preventDefault(),$model=this.model,$parent=this.$el.parent(),jQuery("div.thumbnail > img",$parent.find(".media-frame-content")).attr("src",""),$model.set("src","",{silent:!0})},render:function(){return this.$el.html(this.template(this.model.attributes)),this.child_views.length>0&&this.child_views.forEach(function(e){var t=new e({model:this.model});this.$el.find("div.addons").append(t.render().el)},this),this.$el.find("textarea[name=caption]").val(this.model.get("caption")),setTimeout(function(){quicktags({id:"caption",buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()},500),wpLink.init,0==this.attachment_index&&this.$el.find("button.left").addClass("disabled"),this.attachment_index==this.collection.length-1&&this.$el.find("button.right").addClass("disabled"),textarea=this.$el.find(".soliloquy-html-slide-code"),textarea.length&&(this.editor=CodeMirror.fromTextArea(textarea[0],{enterMode:"keep",indentUnit:4,electricChars:!1,lineNumbers:!0,lineWrapping:!0,matchBrackets:!0,mode:"php",smartIndent:!1,tabMode:"shift",theme:"ttcn"})),this.$el.trigger("soliloquyRenderMeta"),this},loading:function(){this.is_loading=!0,this.$el.find(".spinner").css("visibility","visible")},loaded:function(e){this.is_loading=!1,this.$el.find(".spinner").css("visibility","hidden"),"undefined"!=typeof e&&alert(e)},loadPreviousItem:function(){this.attachment_index--,this.model=this.collection.at(this.attachment_index),this.attachment_id=this.model.get("id"),this.render()},loadNextItem:function(){this.attachment_index++,this.model=this.collection.at(this.attachment_index),this.attachment_id=this.model.get("id"),this.render()},updateItem:function(e){""!=e.target.name&&("checkbox"==e.target.type?value=e.target.checked?1:0:value=e.target.value,this.model.set(e.target.name,value))},saveItem:function(e){e.preventDefault(),this.trigger("loading"),wp.media.ajax("soliloquy_save_meta",{context:this,data:{nonce:soliloquy_metabox.save_nonce,post_id:soliloquy_metabox.id,attach_id:this.model.get("id"),meta:this.model.attributes},success:function(e){this.trigger("loaded loaded:success");var t=JSON.stringify(this.model.attributes);jQuery("ul#soliloquy-output li#"+this.model.get("id")).attr("data-soliloquy-image-model",t);var i=this.$el.find(".saved");i.fadeIn(),setTimeout(function(){i.fadeOut()},1500)},error:function(e){this.trigger("loaded loaded:error",e)}})},searchLinks:function(e){},insertLink:function(e){},insertMediaFileLink:function(e){this.trigger("loading"),wp.media.ajax("soliloquy_get_attachment_links",{context:this,data:{nonce:soliloquy_metabox.save_nonce,attachment_id:this.model.get("id")},success:function(e){this.model.set("link",e.media_link),this.trigger("loaded loaded:success"),this.render()},error:function(e){this.trigger("loaded loaded:error",e)}})},insertAttachmentPageLink:function(e){this.trigger("loading"),wp.media.ajax("soliloquy_get_attachment_links",{context:this,data:{nonce:soliloquy_metabox.save_nonce,attachment_id:this.model.get("id")},success:function(e){this.model.set("link",e.attachment_page),this.trigger("loaded loaded:success"),this.render()},error:function(e){this.trigger("loaded loaded:error",e)}})}}),SoliloquyChildViews=[],SoliloquyContentViews=[];!function($){$(document).ready(function(){soliloquy_edit={init:function(){SoliloquySlidesUpdate(),$("#soliloquy-settings-content").on("click.soliloquyModify",".soliloquy-modify-slide",function(e){e.preventDefault();var t=$(this).parent().data("soliloquy-slide");SoliloquyModalWindow.content(new SoliloquyView({collection:SoliloquySlides,child_views:SoliloquyChildViews,attachment_id:t})),SoliloquyModalWindow.open(),$(".CodeMirror").each(function(e,t){t.CodeMirror.refresh()})})}},soliloquy_edit.init()}),$(document).on("soliloquyUploaded",function(){soliloquy_edit.init()})}(jQuery);var SoliloquyBulkEditImageView=wp.Backbone.View.extend({tagName:"li",className:"attachment",template:wp.template("soliloquy-meta-bulk-editor-slides"),initialize:function(e){this.model=e.model},render:function(){return this.$el.html(this.template(this.model.attributes)),this}}),SoliloquyBulkEditView=wp.Backbone.View.extend({id:"soliloquy-meta-edit-bulk",tagName:"div",className:"edit-attachment-frame mode-select hide-menu hide-router",template:wp.template("soliloquy-meta-bulk-editor"),events:{"keyup input":"updateItem","keyup textarea":"updateItem","change input":"updateItem","change textarea":"updateItem","blur textarea":"updateItem","change select":"updateItem","click .actions a.soliloquy-meta-submit":"saveItem","keyup input#link-search":"searchLinks","click div.query-results li":"insertLink","click button.media-file":"insertMediaFileLink","click button.attachment-page":"insertAttachmentPageLink"},initialize:function(e){this.on("loading",this.loading,this),this.on("loaded",this.loaded,this),this.is_loading=!1,this.collection=e.collection,this.child_views=e.child_views,this.model=new SoliloquySlide},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.collection.forEach(function(e){var t=new SoliloquyBulkEditImageView({model:e});this.$el.find("ul.attachments").append(t.render().el)},this),this.child_views.length>0&&this.child_views.forEach(function(e){var t=new e({model:this.model});this.$el.find("div.addons").append(t.render().el)},this),this.$el.find("textarea[name=caption]").val(this.model.get("caption")),setTimeout(function(){quicktags({id:"caption",buttons:"strong,em,link,ul,ol,li,close"}),QTags._buttonsInit()},100),wpLink.init,this},renderError:function(e){var t={};t.error=e;var i=new wp.media.view.SoliloquyError({model:t});return i.render().el},loading:function(){this.is_loading=!0,this.$el.find(".spinner").css("visibility","visible")},loaded:function(e){this.is_loading=!1,this.$el.find(".spinner").css("visibility","hidden"),"undefined"!=typeof e&&this.$el.find("ul.attachments").before(this.renderError(e))},updateItem:function(e){""!=e.target.name&&("checkbox"==e.target.type?value=e.target.checked?1:0:value=e.target.value,this.model.set(e.target.name,value))},saveItem:function(){this.trigger("loading");var e=[];this.collection.forEach(function(t){e.push(t.id)},this),wp.media.ajax("soliloquy_bulk_save_meta",{context:this,data:{nonce:soliloquy_metabox.save_nonce,post_id:soliloquy_metabox.id,meta:this.model.attributes,image_ids:e},success:function(e){this.collection.forEach(function(e){for(var t in this.model.attributes)value=this.model.attributes[t],value.length>0&&e.set(t,value);var i=JSON.stringify(e.attributes);jQuery("ul#soliloquy li#"+e.get("id")).attr("data-solioquy-image-model",i),jQuery("ul#soliloquy li#"+e.get("id")+" div.title").text(e.get("title"))},this),this.trigger("loaded loaded:success"),SoliloquyModalWindow.close()},error:function(e){this.trigger("loaded loaded:error",e)}})},insertMediaFileLink:function(e){this.trigger("loading"),this.model.set("link",response.media_link),this.trigger("loaded loaded:success"),this.render()},insertAttachmentPageLink:function(e){this.trigger("loading"),this.model.set("link",response.media_link),this.trigger("loaded loaded:success"),this.render()}});jQuery(document).ready(function($){$("#soliloquy-settings-content").on("click","a.soliloquy-slides-edit",function(e){e.preventDefault(),SoliloquySlidesUpdate(!0),SoliloquyModalWindow.content(new SoliloquyBulkEditView({collection:SoliloquySlides,child_views:SoliloquyChildViews})),SoliloquyModalWindow.open()})}),function($,e,t){"use strict";var i="",i="",l=e.location.hash,o=e.location.hash.replace("!","");if(l&&l.indexOf("soliloquy-tab")>=0){var a=$(o.replace("tab_","")),s=a.parent(),n=a.parent().parent().find("ul.soliloquy-tabs-nav"),d=$("#post").attr("action");console.log(a),s.find(".soliloquy-tab-active").removeClass("soliloquy-tab-active"),a.addClass("soliloquy-tab-active"),n.find(".soliloquy-tab-nav-active").removeClass("soliloquy-tab-nav-active"),n.find('a[href="'+o.replace("tab_","")+'"]').parent().addClass("soliloquy-tab-nav-active"),d&&(d=d.split("#")[0],$("#post").attr("action",d+e.location.hash)),$("body").trigger("SoliloquyTabChange")}$(function(){$("[data-soliloquy-tab]").on("click",function(t){t.preventDefault();var i=$(this),l=i.attr("data-tab-id"),o=i.parent(),a=o.parent(),s=o.attr("data-update-hashbang"),n="undefined"!=typeof i.attr("href")?"tab_"+i.attr("href"):"tab_"+l;if(!i.hasClass("soliloquy-tab-nav-active")){if(a.find(".soliloquy-tab-active").removeClass("soliloquy-tab-active"),o.find(".soliloquy-tab-nav-active").removeClass("soliloquy-tab-nav-active"),i.addClass("soliloquy-tab-nav-active"),$("#"+l).addClass("soliloquy-tab-active"),i.trigger("SoliloquyTabChange"),"soliloquy-native"===l&&$("#soliloquy-type-default").prop("checked")!==!0&&($("#soliloquy-types-nav li").removeClass("soliloquy-active"),$("#soliloquy-type-default").prop("checked",!0).trigger("change")),"1"===s){e.location.hash=n.split("#").join("#!");var d=$("#post").attr("action");d&&(d=d.split("#")[0],$("#post").attr("action",d+e.location.hash))}return!1}})})}(jQuery,window,document);
includes/admin/addons.php CHANGED
@@ -301,7 +301,7 @@ class Soliloquy_Addons{
301
  );
302
 
303
  // Perform the query and retrieve the response.
304
- $response = wp_remote_post( 'http://beta.soliloquywp.com/', $post );
305
  $response_code = wp_remote_retrieve_response_code( $response );
306
  $response_body = wp_remote_retrieve_body( $response );
307
  error_log( print_r( $response_body, true ) );
301
  );
302
 
303
  // Perform the query and retrieve the response.
304
+ $response = wp_remote_post( 'http://soliloquywp.com/', $post );
305
  $response_code = wp_remote_retrieve_response_code( $response );
306
  $response_body = wp_remote_retrieve_body( $response );
307
  error_log( print_r( $response_body, true ) );
includes/admin/metaboxes.php CHANGED
@@ -1217,8 +1217,11 @@ class Soliloquy_Metaboxes_Lite {
1217
 
1218
 
1219
  $thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' );
 
 
1220
  ob_start(); ?>
1221
- <li id="<?php echo $id; ?>" class="soliloquy-slide soliloquy-image soliloquy-status-<?php echo $data['status']; ?>" data-soliloquy-slide="<?php echo $id; ?>" data-soliloquy-image-model='<?php echo json_encode( $data, JSON_HEX_APOS ); ?>'>
 
1222
  <a href="#" class="check"><div class="media-modal-icon"></div></a>
1223
 
1224
  <a href="#" class="soliloquy-remove-slide" title="<?php esc_attr_e( 'Remove Image Slide from Slider?', 'soliloquy' ); ?>"><i class="soliloquy-icon-close"></i></a>
1217
 
1218
 
1219
  $thumbnail = wp_get_attachment_image_src( $id, 'thumbnail' );
1220
+ $json = version_compare( PHP_VERSION, '5.3.0') >= 0 ? json_encode( $data, JSON_HEX_APOS ) : json_encode( $data );
1221
+
1222
  ob_start(); ?>
1223
+
1224
+ <li id="<?php echo $id; ?>" class="soliloquy-slide soliloquy-image soliloquy-status-<?php echo $data['status']; ?>" data-soliloquy-slide="<?php echo $id; ?>" data-soliloquy-image-model='<?php echo $json; ?>'>
1225
  <a href="#" class="check"><div class="media-modal-icon"></div></a>
1226
 
1227
  <a href="#" class="soliloquy-remove-slide" title="<?php esc_attr_e( 'Remove Image Slide from Slider?', 'soliloquy' ); ?>"><i class="soliloquy-icon-close"></i></a>
readme.txt CHANGED
@@ -91,6 +91,10 @@ Soliloquy has many Addons that extend its default functionality to make it do in
91
 
92
  == Changelog ==
93
 
 
 
 
 
94
  = 2.5.0 =
95
  * Added: New UI!
96
  * Added: Insert Images from Media Library!
91
 
92
  == Changelog ==
93
 
94
+ = 2.5.0.1 =
95
+ * Fix: PHP 5.2 compat issues causing admin screen to be un-functional
96
+ * Fix: Numerous UI bug fixes
97
+
98
  = 2.5.0 =
99
  * Added: New UI!
100
  * Added: Insert Images from Media Library!
soliloquy-lite.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
6
  * Author: Soliloquy Team
7
  * Author URI: https://soliloquywp.com
8
- * Version: 2.5.0
9
  * Text Domain: soliloquy
10
  * Domain Path: languages
11
  *
@@ -54,7 +54,7 @@ class Soliloquy_Lite {
54
  *
55
  * @var string
56
  */
57
- public $version = '2.5.0';
58
 
59
  /**
60
  * The name of the plugin.
5
  * Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
6
  * Author: Soliloquy Team
7
  * Author URI: https://soliloquywp.com
8
+ * Version: 2.5.0.1
9
  * Text Domain: soliloquy
10
  * Domain Path: languages
11
  *
54
  *
55
  * @var string
56
  */
57
+ public $version = '2.5.0.1';
58
 
59
  /**
60
  * The name of the plugin.