SiteOrigin CSS - Version 1.2.14

Version Description

  • 26 April 2021 =
  • Resolved Photo Gallery by 10Web plugin conflict.
Download this release

Release Info

Developer SiteOrigin
Plugin Icon 128x128 SiteOrigin CSS
Version 1.2.14
Comparing to
See all releases

Code changes from version 1.2.13 to 1.2.14

Files changed (4) hide show
  1. js/inspector.js +1 -1
  2. js/inspector.min.js +1 -1
  3. readme.txt +5 -2
  4. so-css.php +2 -2
js/inspector.js CHANGED
@@ -72,7 +72,7 @@
72
  // Setup the click event
73
  var wcCheck = $( '.single-product' ).length;
74
  $('body *').on( 'click', function( e ) {
75
- if( !thisView.active || thisView.$el.is(':hover') ) {
76
  return true;
77
  }
78
 
72
  // Setup the click event
73
  var wcCheck = $( '.single-product' ).length;
74
  $('body *').on( 'click', function( e ) {
75
+ if ( ! thisView.active || thisView.$el[0] == e.target ) {
76
  return true;
77
  }
78
 
js/inspector.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t,s){var i={model:{},collection:{},view:{},fn:{}},r=function(e,t){for(var s=[],i=SPECIFICITY.calculate(e),o=0;o<i.length;o++){var c=i[o];if(t)for(var a=0;a<c.parts.length;a++){var n=c.parts[a];s=s.concat(r(n.selector))}else s.push({selector:c.selector.trim(),specificity:parseInt(c.specificity.replace(/,/g,""))})}return s};i.view.inspector=Backbone.View.extend({active:!1,hl:!1,hoverEl:!1,pageSelectors:[],selectorTemplate:t.template('<div class="socss-selector"><%= selector %></div>'),importantClasses:["menu-item-","postid-","page-id-"],initialize:function(){var t=this;this.hl=new i.view.highlighter,this.hl.initialize(),this.pageSelectors=i.fn.pageSelectors(),e("body").on("mouseover","*",(function(s){if(!t.active)return!0;0===e(this).closest(".socss-element").length&&(s.stopPropagation(),t.setHoverEl(e(this)))}));var s=e(".single-product").length;e("body *").on("click",(function(i){if(!t.active||t.$el.is(":hover"))return!0;var r=e(this);s&&r.parents(".wc-tabs").length||(i.preventDefault(),r.trigger("blur"),t.setActiveEl(t.hoverEl))})),this.$(".socss-enable-inspector").on("click",(function(){t.toggleActive()})),this.$el.on("mouseenter",(function(){t.hl.clear()}));try{parent.socss.mainEditor.setInspector(this)}catch(e){console.log("No editor to register this inspector with")}},setHoverEl:function(e){this.hoverEl=e,this.hl.highlight(e)},activate:function(){this.active=!0,e("body").addClass("socss-active"),e("body").removeClass("socss-inactive")},deactivate:function(){this.active=!1,e("body").addClass("socss-inactive"),e("body").removeClass("socss-active"),this.hl.clear(),this.$(".socss-hierarchy").empty()},toggleActive:function(){this.active?this.deactivate():this.activate()},setActiveEl:function(s){var r=this,o=this.$(".socss-hierarchy");if(o.empty(),s){if("body"!==s.prop("tagName").toLowerCase()){var c=e(s);do{var a=i.fn.elSelector(c);r.importantClasses.forEach((function(e){if(a.indexOf(e)>=0){var t=new RegExp("("+e+"\\d+)","g");a=a.replace(t,"<strong>$1</strong>")}})),e(this.selectorTemplate({selector:a})).prependTo(o).data("el",c),c=c.parent()}while("body"!==c.prop("tagName").toLowerCase());e(this.selectorTemplate({selector:"body"})).prependTo(o).data("el",e("body")),this.$(".socss-hierarchy .socss-selector").on("mouseenter",(function(){r.hl.highlight(e(this).data("el"))})).on("click",(function(t){t.preventDefault(),t.stopPropagation(),r.setActiveEl(e(this).data("el"))}))}o.scrollLeft(99999);var n=this.pageSelectors.filter((function(e){try{return s.is(e.selector)}catch(e){return!1}})),l=this.$(".socss-selectors-window").empty();t.each(n,(function(t){l.append(e(r.selectorTemplate(t)).data(t))})),l.find("> div").on("mouseenter",(function(){r.hl.highlight(e(this).data("selector"))})).on("click",(function(t){t.preventDefault(),t.stopPropagation(),r.trigger("click_selector",e(this).data("selector"))}));var h=i.fn.elementAttributes(s);l=this.$(".socss-properties-window").empty(),t.each(h,(function(t,s){l.append(e(r.selectorTemplate({selector:"<strong>"+s+"</strong>: "+t})).data("property",s+": "+t))})),l.find("> div").on("click",(function(t){t.preventDefault(),t.stopPropagation(),r.trigger("click_property",e(this).data("property"))}));var p=s.closest("a[href]"),f=this.$(".socss-link");p.length?f.show().find("a").html(p.attr("href").replace(/[\?&]*so_css_preview=1/,"")).attr("href",p.attr("href")):f.hide(),this.trigger("set_active_element",s,n)}}}),i.view.highlighter=Backbone.View.extend({template:t.template(e("#socss-template-hover").html().trim()),highlighted:[],highlight:function(t){this.clear();var s=this;e(t).each((function(t,i){if(!(i=e(i)).is(":visible"))return!0;var r,o=e(s.template());o.css({top:i.offset().top,left:i.offset().left,width:i.outerWidth(),height:i.outerHeight()}).appendTo("body");var c=i.padding();for(var a in c)parseInt(c[a])>0&&(r=o.find(".socss-guide-padding.socss-guide-"+a).show(),"top"===a||"bottom"===a?r.css("height",c[a]):(r.css("width",c[a]),r.css({width:c[a],top:c.top,bottom:c.bottom})));var n=i.margin();for(var a in n)parseInt(n[a])>0&&(r=o.find(".socss-guide-margin.socss-guide-"+a).show(),"top"===a||"bottom"===a?r.css("height",n[a]):r.css("width",n[a]));s.highlighted.push(o)}))},clear:function(){for(;this.highlighted.length;)this.highlighted.pop().remove()}}),i.parsedCss={},i.fn.getParsedCss=function(){if(0===Object.keys(i.parsedCss).length){var t=window.css;e(".socss-theme-styles").each((function(){var s=e(this),r=t.parse(s.html(),{silent:!0});i.parsedCss[s.attr("id")]=r}))}return i.parsedCss},i.fn.pageSelectors=function(){var s=[],o=i.fn.getParsedCss();for(var c in o)for(var a=o[c].stylesheet.rules,n=0;n<a.length;n++)if(void 0!==a[n].selectors)for(var l=0;l<a[n].selectors.length;l++)s=s.concat(r(a[n].selectors[l]));e("body *").each((function(){var t=e(this),o=i.fn.elSelector(t);s=s.concat(r(o))}));var h=e("body"),p=i.fn.elSelector(h);return s=s.concat(r(p,!0)),(s=t.uniq(s,!1,(function(e){return e.selector}))).sort((function(e,t){return e.specificity>t.specificity?-1:1})),s},i.fn.elementAttributes=function(e){if(!document.styleSheets)return[];var t=[],s=i.fn.getParsedCss(),r=function(e){switch(e){case"charset":case"custom-media":case"document":case"font-face":case"host":case"import":case"keyframes":case"keyframe":case"media":case"namespace":case"page":case"supports":return!0}return!1};for(var o in s)for(var c=s[o].stylesheet.rules,a=0;a<c.length;a++){var n=c[a];if(void 0!==n.selectors&&!r(n.type))for(var l=0;l<n.selectors.length;l++)for(var h=SPECIFICITY.calculate(n.selectors[l]),p=0;p<h.length;p++)try{if(e.is(h[p].selector)){var f=n.declarations;for(p=0;p<f.length;p++)t.push({name:f[p].property,value:f[p].value,specificity:parseInt(h[p].specificity.replace(/,/g,""))})}}catch(e){}}t.sort((function(e,t){return e.specificity>t.specificity?1:-1})).reverse();for(var d={},v=0;v<t.length;v++)void 0===d[t[v].name]&&(d[t[v].name]=t[v].value);return d},i.fn.elSelector=function(e){var t="";return void 0!==e.attr("id")&&(t+="#"+e.attr("id")),void 0!==e.attr("class")&&(t+="."+e.attr("class").replace(/\s+/g,".")),""===t&&(t=e.prop("tagName").toLowerCase()),t},window.socssInspector=i}(jQuery,_,socssOptions),jQuery((function(e){var t=new window.socssInspector.view.inspector({el:e("#socss-inspector-interface").get(0)});t.activate(),window.socssInspector.mainInspector=t}));
1
+ !function(e,t,s){var i={model:{},collection:{},view:{},fn:{}},r=function(e,t){for(var s=[],i=SPECIFICITY.calculate(e),o=0;o<i.length;o++){var c=i[o];if(t)for(var a=0;a<c.parts.length;a++){var n=c.parts[a];s=s.concat(r(n.selector))}else s.push({selector:c.selector.trim(),specificity:parseInt(c.specificity.replace(/,/g,""))})}return s};i.view.inspector=Backbone.View.extend({active:!1,hl:!1,hoverEl:!1,pageSelectors:[],selectorTemplate:t.template('<div class="socss-selector"><%= selector %></div>'),importantClasses:["menu-item-","postid-","page-id-"],initialize:function(){var t=this;this.hl=new i.view.highlighter,this.hl.initialize(),this.pageSelectors=i.fn.pageSelectors(),e("body").on("mouseover","*",(function(s){if(!t.active)return!0;0===e(this).closest(".socss-element").length&&(s.stopPropagation(),t.setHoverEl(e(this)))}));var s=e(".single-product").length;e("body *").on("click",(function(i){if(!t.active||t.$el[0]==i.target)return!0;var r=e(this);s&&r.parents(".wc-tabs").length||(i.preventDefault(),r.trigger("blur"),t.setActiveEl(t.hoverEl))})),this.$(".socss-enable-inspector").on("click",(function(){t.toggleActive()})),this.$el.on("mouseenter",(function(){t.hl.clear()}));try{parent.socss.mainEditor.setInspector(this)}catch(e){console.log("No editor to register this inspector with")}},setHoverEl:function(e){this.hoverEl=e,this.hl.highlight(e)},activate:function(){this.active=!0,e("body").addClass("socss-active"),e("body").removeClass("socss-inactive")},deactivate:function(){this.active=!1,e("body").addClass("socss-inactive"),e("body").removeClass("socss-active"),this.hl.clear(),this.$(".socss-hierarchy").empty()},toggleActive:function(){this.active?this.deactivate():this.activate()},setActiveEl:function(s){var r=this,o=this.$(".socss-hierarchy");if(o.empty(),s){if("body"!==s.prop("tagName").toLowerCase()){var c=e(s);do{var a=i.fn.elSelector(c);r.importantClasses.forEach((function(e){if(a.indexOf(e)>=0){var t=new RegExp("("+e+"\\d+)","g");a=a.replace(t,"<strong>$1</strong>")}})),e(this.selectorTemplate({selector:a})).prependTo(o).data("el",c),c=c.parent()}while("body"!==c.prop("tagName").toLowerCase());e(this.selectorTemplate({selector:"body"})).prependTo(o).data("el",e("body")),this.$(".socss-hierarchy .socss-selector").on("mouseenter",(function(){r.hl.highlight(e(this).data("el"))})).on("click",(function(t){t.preventDefault(),t.stopPropagation(),r.setActiveEl(e(this).data("el"))}))}o.scrollLeft(99999);var n=this.pageSelectors.filter((function(e){try{return s.is(e.selector)}catch(e){return!1}})),l=this.$(".socss-selectors-window").empty();t.each(n,(function(t){l.append(e(r.selectorTemplate(t)).data(t))})),l.find("> div").on("mouseenter",(function(){r.hl.highlight(e(this).data("selector"))})).on("click",(function(t){t.preventDefault(),t.stopPropagation(),r.trigger("click_selector",e(this).data("selector"))}));var h=i.fn.elementAttributes(s);l=this.$(".socss-properties-window").empty(),t.each(h,(function(t,s){l.append(e(r.selectorTemplate({selector:"<strong>"+s+"</strong>: "+t})).data("property",s+": "+t))})),l.find("> div").on("click",(function(t){t.preventDefault(),t.stopPropagation(),r.trigger("click_property",e(this).data("property"))}));var p=s.closest("a[href]"),f=this.$(".socss-link");p.length?f.show().find("a").html(p.attr("href").replace(/[\?&]*so_css_preview=1/,"")).attr("href",p.attr("href")):f.hide(),this.trigger("set_active_element",s,n)}}}),i.view.highlighter=Backbone.View.extend({template:t.template(e("#socss-template-hover").html().trim()),highlighted:[],highlight:function(t){this.clear();var s=this;e(t).each((function(t,i){if(!(i=e(i)).is(":visible"))return!0;var r,o=e(s.template());o.css({top:i.offset().top,left:i.offset().left,width:i.outerWidth(),height:i.outerHeight()}).appendTo("body");var c=i.padding();for(var a in c)parseInt(c[a])>0&&(r=o.find(".socss-guide-padding.socss-guide-"+a).show(),"top"===a||"bottom"===a?r.css("height",c[a]):(r.css("width",c[a]),r.css({width:c[a],top:c.top,bottom:c.bottom})));var n=i.margin();for(var a in n)parseInt(n[a])>0&&(r=o.find(".socss-guide-margin.socss-guide-"+a).show(),"top"===a||"bottom"===a?r.css("height",n[a]):r.css("width",n[a]));s.highlighted.push(o)}))},clear:function(){for(;this.highlighted.length;)this.highlighted.pop().remove()}}),i.parsedCss={},i.fn.getParsedCss=function(){if(0===Object.keys(i.parsedCss).length){var t=window.css;e(".socss-theme-styles").each((function(){var s=e(this),r=t.parse(s.html(),{silent:!0});i.parsedCss[s.attr("id")]=r}))}return i.parsedCss},i.fn.pageSelectors=function(){var s=[],o=i.fn.getParsedCss();for(var c in o)for(var a=o[c].stylesheet.rules,n=0;n<a.length;n++)if(void 0!==a[n].selectors)for(var l=0;l<a[n].selectors.length;l++)s=s.concat(r(a[n].selectors[l]));e("body *").each((function(){var t=e(this),o=i.fn.elSelector(t);s=s.concat(r(o))}));var h=e("body"),p=i.fn.elSelector(h);return s=s.concat(r(p,!0)),(s=t.uniq(s,!1,(function(e){return e.selector}))).sort((function(e,t){return e.specificity>t.specificity?-1:1})),s},i.fn.elementAttributes=function(e){if(!document.styleSheets)return[];var t=[],s=i.fn.getParsedCss(),r=function(e){switch(e){case"charset":case"custom-media":case"document":case"font-face":case"host":case"import":case"keyframes":case"keyframe":case"media":case"namespace":case"page":case"supports":return!0}return!1};for(var o in s)for(var c=s[o].stylesheet.rules,a=0;a<c.length;a++){var n=c[a];if(void 0!==n.selectors&&!r(n.type))for(var l=0;l<n.selectors.length;l++)for(var h=SPECIFICITY.calculate(n.selectors[l]),p=0;p<h.length;p++)try{if(e.is(h[p].selector)){var f=n.declarations;for(p=0;p<f.length;p++)t.push({name:f[p].property,value:f[p].value,specificity:parseInt(h[p].specificity.replace(/,/g,""))})}}catch(e){}}t.sort((function(e,t){return e.specificity>t.specificity?1:-1})).reverse();for(var d={},v=0;v<t.length;v++)void 0===d[t[v].name]&&(d[t[v].name]=t[v].value);return d},i.fn.elSelector=function(e){var t="";return void 0!==e.attr("id")&&(t+="#"+e.attr("id")),void 0!==e.attr("class")&&(t+="."+e.attr("class").replace(/\s+/g,".")),""===t&&(t=e.prop("tagName").toLowerCase()),t},window.socssInspector=i}(jQuery,_,socssOptions),jQuery((function(e){var t=new window.socssInspector.view.inspector({el:e("#socss-inspector-interface").get(0)});t.activate(),window.socssInspector.mainInspector=t}));
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Tags: css, design, edit, customize
3
  Requires at least: 3.9
4
  Tested up to: 5.7
5
- Stable tag: 1.2.13
6
- Build time: 2021-02-01T22:35:01-08:00
7
  License: GPLv2 or later
8
  Contributors: gpriday
9
  Donate link: https://siteorigin.com/downloads/premium/
@@ -65,6 +65,9 @@ We offer free support on the [SiteOrigin support forums](https://siteorigin.com/
65
 
66
  == Changelog ==
67
 
 
 
 
68
  = 1.2.13 - 01 February 2021 =
69
  * Inspector: Added support for WooCommerce single product tabs.
70
  * Inspector: Highlight important classes when element with class is selected.
2
  Tags: css, design, edit, customize
3
  Requires at least: 3.9
4
  Tested up to: 5.7
5
+ Stable tag: 1.2.14
6
+ Build time: 2021-04-26T16:26:12+02:00
7
  License: GPLv2 or later
8
  Contributors: gpriday
9
  Donate link: https://siteorigin.com/downloads/premium/
65
 
66
  == Changelog ==
67
 
68
+ = 1.2.14 - 26 April 2021 =
69
+ * Resolved Photo Gallery by 10Web plugin conflict.
70
+
71
  = 1.2.13 - 01 February 2021 =
72
  * Inspector: Added support for WooCommerce single product tabs.
73
  * Inspector: Highlight important classes when element with class is selected.
so-css.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: SiteOrigin CSS
4
  Description: An advanced CSS editor from SiteOrigin.
5
- Version: 1.2.13
6
  Author: SiteOrigin
7
  Author URI: https://siteorigin.com
8
  Plugin URI: https://siteorigin.com/css/
@@ -14,7 +14,7 @@ Text Domain: so-css
14
  // Handle the legacy CSS editor that came with SiteOrigin themes
15
  include plugin_dir_path( __FILE__ ) . 'inc/legacy.php';
16
 
17
- define( 'SOCSS_VERSION', '1.2.13' );
18
  define( 'SOCSS_JS_SUFFIX', '.min' );
19
 
20
  /**
2
  /*
3
  Plugin Name: SiteOrigin CSS
4
  Description: An advanced CSS editor from SiteOrigin.
5
+ Version: 1.2.14
6
  Author: SiteOrigin
7
  Author URI: https://siteorigin.com
8
  Plugin URI: https://siteorigin.com/css/
14
  // Handle the legacy CSS editor that came with SiteOrigin themes
15
  include plugin_dir_path( __FILE__ ) . 'inc/legacy.php';
16
 
17
+ define( 'SOCSS_VERSION', '1.2.14' );
18
  define( 'SOCSS_JS_SUFFIX', '.min' );
19
 
20
  /**