Version Description
- 02 November 2021 =
- Removed Save button rounding.
- Fixed Visual Editor
Navigate To
link functionality.
Download this release
Release Info
Developer | SiteOrigin |
Plugin | SiteOrigin CSS |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4.0 to 1.4.1
- css/admin.css +1 -0
- js/inspector.js +1 -1
- js/inspector.min.js +1 -1
- readme.txt +6 -2
- so-css.php +2 -2
css/admin.css
CHANGED
@@ -752,6 +752,7 @@
|
|
752 |
.custom-css-toolbar .socss-button.save,
|
753 |
#so-custom-css-properties .toolbar .socss-button.save {
|
754 |
border-color: #dcdcde;
|
|
|
755 |
height: 30px;
|
756 |
width: 30px;
|
757 |
}
|
752 |
.custom-css-toolbar .socss-button.save,
|
753 |
#so-custom-css-properties .toolbar .socss-button.save {
|
754 |
border-color: #dcdcde;
|
755 |
+
border-radius: 0;
|
756 |
height: 30px;
|
757 |
width: 30px;
|
758 |
}
|
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 ||
|
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 || $( e.target ).parent( '.socss-link' ).length ) {
|
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||
|
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||e(i.target).parent(".socss-link").length)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, visual css, css editor, design, customize
|
3 |
Requires at least: 3.9
|
4 |
Tested up to: 5.8
|
5 |
-
Stable tag: 1.4.
|
6 |
-
Build time: 2021-
|
7 |
License: GPLv2 or later
|
8 |
Contributors: gpriday, alexgso
|
9 |
Donate link: https://siteorigin.com/downloads/premium/
|
@@ -71,6 +71,10 @@ SiteOrigin Premium includes access to our professional email support service, pe
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
74 |
= 1.4.0 - 11 October 2021 =
|
75 |
* Added Ajax saving. Users can now save in the expanded and visual editors without exiting to basic editor.
|
76 |
* Expanded/Visual toolbar buttons re-ordered for consistency between modes.
|
2 |
Tags: css, visual css, css editor, design, customize
|
3 |
Requires at least: 3.9
|
4 |
Tested up to: 5.8
|
5 |
+
Stable tag: 1.4.1
|
6 |
+
Build time: 2021-11-02T22:36:20+02:00
|
7 |
License: GPLv2 or later
|
8 |
Contributors: gpriday, alexgso
|
9 |
Donate link: https://siteorigin.com/downloads/premium/
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 1.4.1 - 02 November 2021 =
|
75 |
+
* Removed Save button rounding.
|
76 |
+
* Fixed Visual Editor `Navigate To` link functionality.
|
77 |
+
|
78 |
= 1.4.0 - 11 October 2021 =
|
79 |
* Added Ajax saving. Users can now save in the expanded and visual editors without exiting to basic editor.
|
80 |
* Expanded/Visual toolbar buttons re-ordered for consistency between modes.
|
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.4.
|
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.4.
|
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.4.1
|
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.4.1' );
|
18 |
define( 'SOCSS_JS_SUFFIX', '.min' );
|
19 |
|
20 |
/**
|