Skip to content

Commit

Permalink
Works Fine this version
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoCLSC committed Jul 21, 2021
1 parent 8031dff commit 07e9954
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 124 deletions.
33 changes: 2 additions & 31 deletions octoprint_BLOCKS/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ def on_after_startup(self):

##~~ SettingsPlugin mixin

##Plugins including the mixing will get injected an additional property
##self._settings which is an instance of PluginSettingsManager already properly
##initialized for use by the plugin. In order for the manager to know about the
##available settings structure and default values upon initialization,
##implementing plugins will need to provide a dictionary with the plugin’s
##default settings through overriding the method get_settings_defaults().
##The defined structure will then be available to access through the
##settings manager available as self._settings.

def get_settings_defaults(self):
return {
# put your plugin's default settings here
Expand All @@ -51,7 +42,7 @@ def get_settings_defaults(self):
"fixedHeader" : True,

"fixedFooter" : True,

"blocksFooterInfo" : True,

"removeCollapsible" : True
Expand All @@ -63,25 +54,12 @@ def add_templatetype ( self, current_order, current_rules, *args, **kwargs):
("connectionWrapper", dict(), dict(template=lambda x: x + "_connectionWrapper.jinja2"))
]
"""
##Vou precisar de adicionar as definições de on_settings_save e ainda
##on_after_startup para salvar as definições que tenhamos


##~~ AssetPlugin mixi

##Allows me to define additional static assets such as JavaScript or class
##files to be automatically embedded into the pages delivered by the server
##to be used within the client sided part of the plugin

def get_assets(self):
# Define your plugin's asset(the folder) files to automatically include in the
# core UI here.

##Defines the folder where the plugin stores its static assets
##as defined in
#~Return string: the absolute path to the folder where the plugin
##stores its static assets

return dict(
js= ["js/BLOCKS.js","js/jquery-ui.min.js"],
img= ["img/Blocks_Logo.png","img/settings.png"],
Expand All @@ -95,20 +73,13 @@ def get_assets(self):
##web interface.

def get_template_configs(self):
##Allow configuration of injected navbar,sidebar,tab and settings
##templates(and also additional templates of types specified by plugins
##through hte octoprint.ui.web.templateytpes hook).
##Basically i can allows me to configure Should be a list containing one
##configuration object per template to inject. Each configuration object
##is represented by a dictionary which may contain the following keys:
##type|name|template|suffix|div |replaces|custom_bindings|data_bind|
##classes|styles

return[
dict(type="settings", custom_bindings=False),
# Permite-me adicionar o meu novo container para a connection mas não sei se devo utilizar este type
# ou criar meu próprio type de template...
dict(type="sidebar", template="blocks_connectionWrapper.jinja2", custom_bindings=False),
# My refresh button for my connection wrapper
dict(type="generic", template="refreshButton.jinja2", custom_bindings=False)
]

Expand Down
34 changes: 23 additions & 11 deletions octoprint_BLOCKS/static/css/BLOCKS.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,12 @@
}*/
/* -------------------------*/
body.BLOCKSUIfixedHeader{
margin-top: 50px;
/*margin-top: 50px;*/
}
.BLOCKSMainContainer{
padding-right: 10px;
padding-left: 10px;
}
.BLOCKSMainTabs.container-fluid{
padding-left: 0px;
padding-right: 0px;
padding-top: 25px;
}


Expand Down Expand Up @@ -81,8 +78,15 @@
margin-left: 10px;
}
#control > .container-fluid > .row-fluid {
margin-inline-start: 70px;
position: relative;
left: 70px;
}
#control .jog-panel>div.distance {
text-align: left;
position: relative;
top: 0px;
left: -5px;
}
/* ----------------------------*/

/* Temperature wrapper properties */
Expand All @@ -97,6 +101,7 @@
#temp_wrapper {
border: 1px solid #e5e5e5;
border-radius: 4px;
height : 577px;
}
#temp {
padding: 8px 15px;
Expand Down Expand Up @@ -186,8 +191,15 @@
display: flex;
flex-direction: column;
}
/* To fix the button settings on the files */
.open>.dropdown-menu {
display: block;
position: absolute;
top: auto;
left:auto;
right:auto;


}
/* Grid properties */

.TopRow{
Expand All @@ -197,7 +209,7 @@
}
.BotRow{
display: flex ;
margin-top: 10px;
/*margin-top: 10px;*/
align-items: flex-start;
flex-wrap:nowrap;

Expand Down Expand Up @@ -272,9 +284,9 @@ input[type="search"], input[type="tel"], input[type="color"], .uneditable-input
}

#refreshButton.refresh-trigger{
position: static;
left: 100px;

position: relative;
left: 40px;
}
label.form-check-text {
font-weight: bold;
Expand Down
Loading

0 comments on commit 07e9954

Please sign in to comment.