macros ui fix and control view added present and absent class
This commit is contained in:
@@ -203,17 +203,8 @@ module.exports = {
|
|||||||
return Math.min(1, p);
|
return Math.min(1, p);
|
||||||
},
|
},
|
||||||
isMacrosPresent: function(){
|
isMacrosPresent: function(){
|
||||||
return true;
|
return this.config.macros!=undefined;
|
||||||
// if(this.config.macros!=undefined){
|
|
||||||
// console.log("isMacrosPresent",this.config.macros!=undefined);
|
|
||||||
// console.log(this.config.macros.length!=0);
|
|
||||||
// return this.config.macros.length!=0;
|
|
||||||
// }
|
|
||||||
// return false;
|
|
||||||
},
|
},
|
||||||
isMacrosAbsent: function(){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ module.exports = {
|
|||||||
if (state != "ESTOPPED" && (cycle == "jogging" || cycle == "homing")) {
|
if (state != "ESTOPPED" && (cycle == "jogging" || cycle == "homing")) {
|
||||||
return cycle.toUpperCase();
|
return cycle.toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
return state || "";
|
return state || "";
|
||||||
},
|
},
|
||||||
is_ready: function() {
|
is_ready: function() {
|
||||||
|
|||||||
@@ -209,15 +209,11 @@ script#control-view-template(type="text/x-template")
|
|||||||
|
|
||||||
.macros-div
|
.macros-div
|
||||||
p Macros
|
p Macros
|
||||||
.test-true(v-if="isMacrosPresent")
|
.macros-buttons(class="present",v-if="isMacrosPresent")
|
||||||
p true
|
|
||||||
.test-false(v-if="isMacrosAbsent")
|
|
||||||
p false`
|
|
||||||
.macros-buttons(v-if="config.macros!=undefined")
|
|
||||||
p there is a active macro
|
p there is a active macro
|
||||||
.macros-buttons(v-if="config.macros==undefined")
|
.macros-buttons(class ="absent",v-if="!isMacrosPresent")
|
||||||
p there is no macro
|
p there is No macro
|
||||||
|
|
||||||
|
|
||||||
.tabs
|
.tabs
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ script#macros-template(type="text/x-template")
|
|||||||
:disabled="!is_ready",style="height:40px;width:130px;font-weight:normal;border-radius:5px") Upload
|
:disabled="!is_ready",style="height:40px;width:130px;font-weight:normal;border-radius:5px") Upload
|
||||||
br
|
br
|
||||||
button.submit-macros(title="Save Macros",@click="saveMacros",
|
button.submit-macros(title="Save Macros",@click="saveMacros",
|
||||||
style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border-color:#add1ad;padding-top:5px") Save Macros
|
style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border-color:#add1ad;margin-top:15px") Save Macros
|
||||||
button.pure-button(title="Print config.", @click="printConfig",
|
button.pure-button(title="Print config.", @click="printConfig",
|
||||||
style="height:50px;width:120px;font-weight:normal;padding-top:5px") print Config
|
style="height:50px;width:120px;font-weight:normal;padding-top:5px") print Config
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user