Skip to content

Commit

Permalink
Hotfix release
Browse files Browse the repository at this point in the history
  • Loading branch information
LazeMSS committed Jan 1, 2021
1 parent 3cee580 commit 82be20e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
25 changes: 22 additions & 3 deletions octoprint_uicustomizer/static/js/uicustomizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,17 @@ $(function() {
var hasResponsive = $('body').hasClass('UICResponsiveMode');
var cleanRep = new RegExp('\.'+curTheme, "gi");
var newStyle = '';
$.each($('link[href="/static/css/octoprint.css"][rel="stylesheet"]')[0].sheet.cssRules,function(){
var styleSrc = false;
if ($('link[href^="/static/webassets/packed_core.css"][rel="stylesheet"]').length){
styleSrc = $('link[href^="/static/webassets/packed_core.css"][rel="stylesheet"]');
}else if ($('link[href="/static/css/octoprint.css"][rel="stylesheet"]').length){
styleSrc = $('link[href="/static/css/octoprint.css"][rel="stylesheet"]');
}
if (styleSrc == false){
self.logToConsole("Standard theme css src not found!");
return;
}
$.each(styleSrc[0].sheet.cssRules,function(){
var cssSel = this.selectorText;
if (cssSel != undefined && cssSel.indexOf('#navbar .navbar-inner.'+curTheme) != -1){
newStyle += this.cssText.replace(/#navbar/gi,'#page-container-main > div.footer').replace(cleanRep,'');
Expand Down Expand Up @@ -337,8 +347,17 @@ $(function() {
var navbarClean = new RegExp('\.themeify\.'+curTheme+' #navbar', "gi");
var newStyle = '';
var bgcolor = '';
// Todo fix for compacted
$.each($('link[href="/plugin/themeify/static/dist/themeify.min.css"][rel="stylesheet"]')[0].sheet.cssRules,function(){
var styleSrc = false;
if ($('link[href^="/static/webassets/packed_plugins.css"][rel="stylesheet"]').length){
styleSrc = $('link[href^="/static/webassets/packed_plugins.css"][rel="stylesheet"]');
}else if ($('link[href="/plugin/themeify/static/dist/themeify.min.css"][rel="stylesheet"]').length){
styleSrc = $('link[href="/plugin/themeify/static/dist/themeify.min.css"][rel="stylesheet"]');
}
if (styleSrc == false){
self.logToConsole("Themeify css src not found!");
return;
}
$.each(styleSrc[0].sheet.cssRules,function(){
var cssSel = this.selectorText;
if (cssSel != undefined && cssSel.indexOf('.themeify.'+curTheme+' #navbar .navbar-inner') != -1){
newStyle += this.cssText.replace(navbarClean,'#page-container-main > div.footer').replace(cleanRep,'');
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "UI Customizer"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.1.9"
plugin_version = "0.1.2.0"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 82be20e

Please sign in to comment.