This commit is contained in:
@@ -18,8 +18,8 @@ export default {
|
|||||||
//FORMDATA is OPTIONAL and only required for forms that need to allow
|
//FORMDATA is OPTIONAL and only required for forms that need to allow
|
||||||
//viewing object history, attachments, custom fields, etc that kind of thing
|
//viewing object history, attachments, custom fields, etc that kind of thing
|
||||||
//usually CORE objects with an id, NOT utility type forms
|
//usually CORE objects with an id, NOT utility type forms
|
||||||
var formAyaType = 0;
|
let formAyaType = 0;
|
||||||
var formRecordId = 0;
|
let formRecordId = 0;
|
||||||
if (ctx.formData) {
|
if (ctx.formData) {
|
||||||
if (ctx.formData.ayaType != null) {
|
if (ctx.formData.ayaType != null) {
|
||||||
formAyaType = ctx.formData.ayaType;
|
formAyaType = ctx.formData.ayaType;
|
||||||
@@ -30,7 +30,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//flag for if it's wikiable, reviewable, attachable, searchable, historical
|
//flag for if it's wikiable, reviewable, attachable, searchable, historical
|
||||||
var isCoreBizObject = formAyaType != 0 && formRecordId != 0;
|
let isCoreBizObject = formAyaType != 0 && formRecordId != 0;
|
||||||
|
|
||||||
//set the help url if presented or default to the User section intro
|
//set the help url if presented or default to the User section intro
|
||||||
vm.appBar.helpUrl = ctx.helpUrl ? ctx.helpUrl : "user-intro";
|
vm.appBar.helpUrl = ctx.helpUrl ? ctx.helpUrl : "user-intro";
|
||||||
@@ -167,7 +167,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//Find the key that is in the collection and replace it
|
//Find the key that is in the collection and replace it
|
||||||
for (var i = 0; i < vm.appBar.menuItems.length; i++) {
|
for (let i = 0; i < vm.appBar.menuItems.length; i++) {
|
||||||
if (vm.appBar.menuItems[i].key == newItem.key) {
|
if (vm.appBar.menuItems[i].key == newItem.key) {
|
||||||
//NOTE: since we are adding a new object, it has no reactivity in it so we need to use the Vue.Set to set it which
|
//NOTE: since we are adding a new object, it has no reactivity in it so we need to use the Vue.Set to set it which
|
||||||
//automatically adds the setters and getters that trigger reactivity
|
//automatically adds the setters and getters that trigger reactivity
|
||||||
@@ -188,8 +188,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Find the menu item and set it to disabled and recolor it to disabled color and return
|
//Find the menu item and set it to disabled and recolor it to disabled color and return
|
||||||
for (var i = 0; i < vm.appBar.menuItems.length; i++) {
|
for (let i = 0; i < vm.appBar.menuItems.length; i++) {
|
||||||
var menuItem = vm.appBar.menuItems[i];
|
let menuItem = vm.appBar.menuItems[i];
|
||||||
if (menuItem.key == key) {
|
if (menuItem.key == key) {
|
||||||
vm.$set(vm.appBar.menuItems[i], "disabled", disabled);
|
vm.$set(vm.appBar.menuItems[i], "disabled", disabled);
|
||||||
//menuItem.disabled = disabled;
|
//menuItem.disabled = disabled;
|
||||||
@@ -211,11 +211,11 @@ export default {
|
|||||||
//each part is separated by a colon
|
//each part is separated by a colon
|
||||||
|
|
||||||
//Handle different items
|
//Handle different items
|
||||||
var item = this.parseMenuItem(menuItem);
|
let item = this.parseMenuItem(menuItem);
|
||||||
if (!item.disabled && item.owner == "app") {
|
if (!item.disabled && item.owner == "app") {
|
||||||
switch (item.key) {
|
switch (item.key) {
|
||||||
case "help":
|
case "help":
|
||||||
var helpurl = vm.$store.state.helpUrl + item.data;
|
let helpurl = vm.$store.state.helpUrl + item.data;
|
||||||
window.open(helpurl, "_blank");
|
window.open(helpurl, "_blank");
|
||||||
break;
|
break;
|
||||||
case "search":
|
case "search":
|
||||||
@@ -279,7 +279,7 @@ export default {
|
|||||||
parseMenuItem(menuItem) {
|
parseMenuItem(menuItem) {
|
||||||
//format is "AREA:KEY:UNIQUEID"
|
//format is "AREA:KEY:UNIQUEID"
|
||||||
//and data is in data portion
|
//and data is in data portion
|
||||||
var keyparts = menuItem.key.split(":");
|
let keyparts = menuItem.key.split(":");
|
||||||
return {
|
return {
|
||||||
owner: keyparts[0],
|
owner: keyparts[0],
|
||||||
key: keyparts[1],
|
key: keyparts[1],
|
||||||
@@ -294,7 +294,7 @@ export default {
|
|||||||
// called once from app.vue only
|
// called once from app.vue only
|
||||||
//
|
//
|
||||||
wireUpEventHandlers(vm) {
|
wireUpEventHandlers(vm) {
|
||||||
var self = this;
|
let self = this;
|
||||||
window.$gz.eventBus.$on("menu-change", function handleMenuChange(ctx) {
|
window.$gz.eventBus.$on("menu-change", function handleMenuChange(ctx) {
|
||||||
self.handleMenuChange(vm, ctx);
|
self.handleMenuChange(vm, ctx);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default {
|
|||||||
// which can be problematic in some cases (IE bugs, watched data items in forms etc)
|
// which can be problematic in some cases (IE bugs, watched data items in forms etc)
|
||||||
|
|
||||||
removeAllPropertiesFromObject: function(o) {
|
removeAllPropertiesFromObject: function(o) {
|
||||||
for (var variableKey in o) {
|
for (let variableKey in o) {
|
||||||
if (o.hasOwnProperty(variableKey)) {
|
if (o.hasOwnProperty(variableKey)) {
|
||||||
delete o[variableKey];
|
delete o[variableKey];
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,7 @@ export default {
|
|||||||
// https://stackoverflow.com/a/7616484/8939
|
// https://stackoverflow.com/a/7616484/8939
|
||||||
//
|
//
|
||||||
quickHash: function(theString) {
|
quickHash: function(theString) {
|
||||||
var hash = 0,
|
let hash = 0,
|
||||||
i,
|
i,
|
||||||
chr;
|
chr;
|
||||||
if (theString.length === 0) return hash;
|
if (theString.length === 0) return hash;
|
||||||
@@ -141,7 +141,7 @@ export default {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
var ret = parseFloat(string.replace(/[^\d.-]/g, ""));
|
let ret = parseFloat(string.replace(/[^\d.-]/g, ""));
|
||||||
if (ret == NaN) {
|
if (ret == NaN) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user