This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export default {
|
||||
version: "8.0.0-alpha.90",
|
||||
version: "8.0.0-alpha.93",
|
||||
copyright: "© 1999-2020, Ground Zero Tech-Works Inc."
|
||||
};
|
||||
|
||||
@@ -737,7 +737,7 @@ export default {
|
||||
"View map: error - no matching mapurl / address / geo coordinates set for display, nothing to view"
|
||||
);
|
||||
}
|
||||
|
||||
window.open(mapUrl, "map");
|
||||
//This is not valid to do as some platforms don't open a new web browser window
|
||||
//but rather a map application in which case this is null and throws up the exception even though it's working
|
||||
// if (window.open(mapUrl, "map") == null) {
|
||||
|
||||
25
ayanova/src/components/email-control.vue
Normal file
25
ayanova/src/components/email-control.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<v-text-field
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
type="email"
|
||||
prepend-icon="$ayiAt"
|
||||
@click:prepend="openUrl"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
openUrl() {
|
||||
if (
|
||||
this.$el &&
|
||||
this.$el.attributes &&
|
||||
this.$el.attributes.value &&
|
||||
this.$el.attributes.value.value
|
||||
) {
|
||||
window.open(`mailto:${this.$el.attributes.value.value}`, "email");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -4,17 +4,21 @@
|
||||
v-on="$listeners"
|
||||
type="tel"
|
||||
prepend-icon="$ayiPhoneAlt"
|
||||
@click:prepend="dial"
|
||||
@click:prepend="openUrl"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<script>
|
||||
/* Xeslint-disable */
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
dial() {
|
||||
console.log(this.$el.attributes.value);
|
||||
//alert("DIAL");
|
||||
openUrl() {
|
||||
if (
|
||||
this.$el &&
|
||||
this.$el.attributes &&
|
||||
this.$el.attributes.value &&
|
||||
this.$el.attributes.value.value
|
||||
) {
|
||||
window.open(`tel:${this.$el.attributes.value.value}`, "phone");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
27
ayanova/src/components/url-control.vue
Normal file
27
ayanova/src/components/url-control.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<v-text-field
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
type="url"
|
||||
prepend-icon="$ayiExternalLinkAlt"
|
||||
@click:prepend="openUrl"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
openUrl() {
|
||||
if (
|
||||
this.$el &&
|
||||
this.$el.attributes &&
|
||||
this.$el.attributes.value &&
|
||||
this.$el.attributes.value.value
|
||||
) {
|
||||
let link = this.$el.attributes.value.value;
|
||||
link = link.indexOf("://") === -1 ? "//" + link : link;
|
||||
window.open(link, "_blank");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -43,6 +43,8 @@ import customFieldsControl from "./components/custom-fields-control.vue";
|
||||
import currencyControl from "./components/currency-control.vue";
|
||||
import decimalControl from "./components/decimal-control.vue";
|
||||
import phoneControl from "./components/phone-control.vue";
|
||||
import emailControl from "./components/email-control.vue";
|
||||
import urlControl from "./components/url-control.vue";
|
||||
import roleControl from "./components/role-control.vue";
|
||||
import durationControl from "./components/duration-control.vue";
|
||||
import errorControl from "./components/error-control.vue";
|
||||
@@ -188,6 +190,8 @@ Vue.component("gz-custom-fields", customFieldsControl);
|
||||
Vue.component("gz-currency", currencyControl);
|
||||
Vue.component("gz-decimal", decimalControl);
|
||||
Vue.component("gz-phone", phoneControl);
|
||||
Vue.component("gz-email", emailControl);
|
||||
Vue.component("gz-url", urlControl);
|
||||
Vue.component("gz-role-picker", roleControl);
|
||||
Vue.component("gz-duration-picker", durationControl);
|
||||
Vue.component("gz-error", errorControl);
|
||||
|
||||
@@ -68,6 +68,7 @@ import {
|
||||
faExclamation,
|
||||
faExclamationCircle,
|
||||
faExclamationTriangle,
|
||||
faExternalLinkAlt,
|
||||
faEye,
|
||||
faEyeSlash,
|
||||
faFan,
|
||||
@@ -231,6 +232,7 @@ library.add(
|
||||
faExclamation,
|
||||
faExclamationCircle,
|
||||
faExclamationTriangle,
|
||||
faExternalLinkAlt,
|
||||
faEye,
|
||||
faEyeSlash,
|
||||
faFan,
|
||||
@@ -591,6 +593,12 @@ const CUSTOM_ICONS = {
|
||||
icon: ["fas", "exclamation-triangle"]
|
||||
}
|
||||
},
|
||||
ayiExternalLinkAlt: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
icon: ["fas", "external-link-alt"]
|
||||
}
|
||||
},
|
||||
ayiEye: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
|
||||
@@ -67,6 +67,25 @@
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'WebAddress')"
|
||||
cols="12"
|
||||
sm="6"
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<gz-url
|
||||
v-model="obj.webAddress"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('WebAddress')"
|
||||
ref="webAddress"
|
||||
data-cy="webAddress"
|
||||
:error-messages="form().serverErrors(this, 'webAddress')"
|
||||
@input="fieldValueChanged('webAddress')"
|
||||
></gz-url>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
v-if="form().showMe(this, 'EmailAddress')"
|
||||
cols="12"
|
||||
@@ -74,17 +93,16 @@
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<v-text-field
|
||||
<gz-email
|
||||
v-model="obj.emailAddress"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerEmail')"
|
||||
ref="emailAddress"
|
||||
data-cy="emailAddress"
|
||||
type="email"
|
||||
:error-messages="form().serverErrors(this, 'emailAddress')"
|
||||
@input="fieldValueChanged('emailAddress')"
|
||||
></v-text-field>
|
||||
></gz-email>
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
@@ -94,19 +112,6 @@
|
||||
lg="4"
|
||||
xl="3"
|
||||
>
|
||||
<!-- <v-text-field
|
||||
v-model="obj.phone1"
|
||||
:readonly="formState.readOnly"
|
||||
:disabled="formState.readOnly"
|
||||
:label="$ay.t('CustomerPhone1')"
|
||||
ref="phone1"
|
||||
data-cy="phone1"
|
||||
type="tel"
|
||||
:error-messages="form().serverErrors(this, 'phone1')"
|
||||
@input="fieldValueChanged('phone1')"
|
||||
prepend-icon="$ayiPhoneAlt"
|
||||
@click:prepend="console.log('CLICK')"
|
||||
></v-text-field> -->
|
||||
<gz-phone
|
||||
v-model="obj.phone1"
|
||||
:readonly="formState.readOnly"
|
||||
|
||||
Reference in New Issue
Block a user