diff --git a/octoprint_BLOCKS/__init__.py b/octoprint_BLOCKS/__init__.py index 7c847bf..5f81dc3 100644 --- a/octoprint_BLOCKS/__init__.py +++ b/octoprint_BLOCKS/__init__.py @@ -45,29 +45,12 @@ def on_after_startup(self): def get_settings_defaults(self): return { # put your plugin's default settings here - "rows" : [ - { - "#sidebar_plugin_firmware_check_wrapper": True, - "#files_wrapper": True, - "#connection_wrapper": True - - }, - - { - "div.BLOCKSUImainTabs": True - }, - { - "#state_wrapper": True, - "#connection_wrapper": True, - "#sidebar_plugin_action_command_notification_wrapper": True - } - - ], - "widths" : [3,6,3], + "fluidLayout" : True, "fixedHeader" : True, - "hideGraphBackground" : True + + "blocksFooterInfo" : True } @@ -114,7 +97,6 @@ def get_template_configs(self): return[ dict(type="settings", custom_bindings=False) - ] ##~~ Softwareupdate hook diff --git a/octoprint_BLOCKS/static/css/BLOCKS.css b/octoprint_BLOCKS/static/css/BLOCKS.css index e3d0549..7e9026f 100644 --- a/octoprint_BLOCKS/static/css/BLOCKS.css +++ b/octoprint_BLOCKS/static/css/BLOCKS.css @@ -42,10 +42,12 @@ display: flex ; align-items: flex-start; flex-wrap:nowrap; + } .BotRow{ display: flex ; + margin-top: 10px; align-items: flex-start; flex-wrap:nowrap; @@ -75,7 +77,7 @@ .BLOCKCol1, .BLOCKCol2, .BLOCKCol3 { - border: 1px solid #e5e5e5; +/* border: 1px solid #e5e5e5;*/ border-radius: 4px; position: static; display: flex; @@ -91,6 +93,12 @@ background-image: url(../img/Blocks_Logo.png); background-size: 100%; } + + #tabs{ + border-radius: 4px; + border: 1px solid #e5e5e5; + + } #temperature-graph{ background-image: url(../img/Blocks_Logo.png); background-position: center; diff --git a/octoprint_BLOCKS/static/js/BLOCKS.js b/octoprint_BLOCKS/static/js/BLOCKS.js index b316269..be861ad 100644 --- a/octoprint_BLOCKS/static/js/BLOCKS.js +++ b/octoprint_BLOCKS/static/js/BLOCKS.js @@ -15,13 +15,9 @@ $(function() { self.debug = false; // assign the injected parameters, e.g.: - // self.loginStateViewModel = parameters[0]; self.settings = parameters[0]; - self.connection = parameters[0]; // TODO: Implement your plugin's view model here. - //max column width - self.maxCWidth = 12; // Quick debug self.logToConsole = function(msg){ if (!self.debug){ @@ -33,17 +29,12 @@ $(function() { } //~~---------------------------------------------------- self.onAllBound = function(){ - //~~ Set names - //Html can have mulitple classes so + //Html can have mulitple classes $('#tabs').parent().addClass('BLOCKSMainTabs'); - //Adds a class name for the class="container octoprint-container BLOCKSUICol1" - //On the side bar i add another class name - $('#sidebar').addClass('BLOCKSUICol1'); - - //adds another class name for the octoprint-container i can now calle it BLOCKSUIMainContainer + //adds another class name for the octoprint-container i can now call it by BLOCKSMainContainer $('div.octoprint-container').addClass('BLOCKSMainContainer'); @@ -64,14 +55,11 @@ $(function() { self.logToConsole('Updating layout'); - $('#sidebar').removeClass('span4'); - - self.set_fixedHeader(settingsPlugin.fixedHeader()); self.set_fluidLayout(settingsPlugin.fluidLayout()); - self.set_hideGraphBackground(settingsPlugin.hideGraphBackground()); + self.set_blocksFooterInfo(settingsPlugin.blocksFooterInfo()); //Builds the main layout self.set_mainLayout(settingsPlugin); @@ -79,7 +67,8 @@ $(function() { //--------------------------------------------------- - self.set_fixedHeader = function(enable){ + // Took from UICustumizer + self.set_fixedHeader = function(enable) { if(enable){ $('body').addClass('BLOCKSUIfixedHeader'); $('#navbar').removeClass('navbar-static-top').addClass('navbar-fixed-top'); @@ -91,18 +80,22 @@ $(function() { } } - //-------------------------------------------------- - self.set_hideGraphBackground = function(enable){ + //------------------------------------------------- + self.set_fixedFooter = function(enable) { if(enable){ - $('#temperature-graph').addClass('BLOCKSnoBackground'); - }else{ - $('#temperature-graph').removeClass('BLOCKSUInoBackground'); + + } + } + //------------------------------------------------ + self.set_blocksFooterInfo = function(enable) { + if(enable){ + $('#footer_links').prepend('