This commit is contained in:
@@ -244,6 +244,7 @@ export default {
|
|||||||
window.$gz.menu.wireUpEventHandlers(this);
|
window.$gz.menu.wireUpEventHandlers(this);
|
||||||
window.$gz.dialog.wireUpEventHandlers(this);
|
window.$gz.dialog.wireUpEventHandlers(this);
|
||||||
openObjectHandler.wireUpEventHandlers(this);
|
openObjectHandler.wireUpEventHandlers(this);
|
||||||
|
window.$gz.locale.setVuetifyDefaultLanguageElements(this);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
//UNWIRE ALL EVENT HANDLERS FROM GZEVENTBUS
|
//UNWIRE ALL EVENT HANDLERS FROM GZEVENTBUS
|
||||||
|
|||||||
@@ -154,7 +154,9 @@ export default {
|
|||||||
"ObjectCustomFieldCustomGrid",
|
"ObjectCustomFieldCustomGrid",
|
||||||
"RowsPerPage",
|
"RowsPerPage",
|
||||||
"PageOfPageText",
|
"PageOfPageText",
|
||||||
"Loading"
|
"Loading",
|
||||||
|
"AM",
|
||||||
|
"PM"
|
||||||
],
|
],
|
||||||
decimalValidate(required) {
|
decimalValidate(required) {
|
||||||
return { required: required, decimal: [2, this.format().decimalSeparator] };
|
return { required: required, decimal: [2, this.format().decimalSeparator] };
|
||||||
@@ -240,5 +242,15 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return shortLanguage;
|
return shortLanguage;
|
||||||
|
},
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
// dynamically set the vuetify language elements from
|
||||||
|
// users localized text (am/pm etc)
|
||||||
|
// Keeping vuetify using en locale and just adjusting on top of that
|
||||||
|
//
|
||||||
|
setVuetifyDefaultLanguageElements(vm) {
|
||||||
|
vm.$vuetify.lang.locales.en.close = this.get("OK");
|
||||||
|
vm.$vuetify.lang.locales.en.timePicker.am = this.get("AM");
|
||||||
|
vm.$vuetify.lang.locales.en.timePicker.pm = this.get("PM");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,7 +17,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<v-date-picker :locale="defaultLocale" v-model="dateOnly">
|
<v-date-picker :locale="defaultLocale" v-model="dateOnly">
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn text color="primary" @click="dlgdate = false">Close</v-btn>
|
<v-btn text color="primary" @click="dlgdate = false">{{
|
||||||
|
lt("OK")
|
||||||
|
}}</v-btn>
|
||||||
</v-date-picker>
|
</v-date-picker>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -67,6 +69,11 @@ export default {
|
|||||||
required: false
|
required: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
lt(ltKey) {
|
||||||
|
return window.$gz.locale.get(ltKey);
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
date() {
|
date() {
|
||||||
//this tortuous fuckery is required so that the input and change events only fire on a real change, not initial page load
|
//this tortuous fuckery is required so that the input and change events only fire on a real change, not initial page load
|
||||||
|
|||||||
@@ -27,7 +27,9 @@
|
|||||||
:locale="defaultLocale"
|
:locale="defaultLocale"
|
||||||
>
|
>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn text color="primary" @click="dlgdate = false">Close</v-btn>
|
<v-btn text color="primary" @click="dlgdate = false">{{
|
||||||
|
lt("OK")
|
||||||
|
}}</v-btn>
|
||||||
</v-date-picker>
|
</v-date-picker>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -56,7 +58,9 @@
|
|||||||
v-model="timeOnly"
|
v-model="timeOnly"
|
||||||
>
|
>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn text color="primary" @click="dlgtime = false">OK</v-btn>
|
<v-btn text color="primary" @click="dlgtime = false">{{
|
||||||
|
lt("OK")
|
||||||
|
}}</v-btn>
|
||||||
</v-time-picker>
|
</v-time-picker>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -71,7 +75,6 @@
|
|||||||
<p v-show="error" class="form__error v-messages theme--light error--text">
|
<p v-show="error" class="form__error v-messages theme--light error--text">
|
||||||
{{ error }}
|
{{ error }}
|
||||||
</p>
|
</p>
|
||||||
{{ defaultLocale }}
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -112,6 +115,11 @@ export default {
|
|||||||
required: false
|
required: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
lt(ltKey) {
|
||||||
|
return window.$gz.locale.get(ltKey);
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
date() {
|
date() {
|
||||||
//this tortuous fuckery is required so that the input and change events only fire on a real change, not initial page load
|
//this tortuous fuckery is required so that the input and change events only fire on a real change, not initial page load
|
||||||
|
|||||||
@@ -16,7 +16,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<v-time-picker scrollable ampm-in-title v-model="timeOnly">
|
<v-time-picker scrollable ampm-in-title v-model="timeOnly">
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn text color="primary" @click="dlgtime = false">OK</v-btn>
|
<v-btn text color="primary" @click="dlgtime = false">{{
|
||||||
|
lt("OK")
|
||||||
|
}}</v-btn>
|
||||||
</v-time-picker>
|
</v-time-picker>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -61,6 +63,11 @@ export default {
|
|||||||
required: false
|
required: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
lt(ltKey) {
|
||||||
|
return window.$gz.locale.get(ltKey);
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
date() {
|
date() {
|
||||||
//this tortuous fuckery is required so that the input and change events only fire on a real change, not initial page load
|
//this tortuous fuckery is required so that the input and change events only fire on a real change, not initial page load
|
||||||
|
|||||||
Reference in New Issue
Block a user