This commit is contained in:
@@ -55,6 +55,11 @@ import localeText from "../api/locale";
|
||||
import pagedList from "../api/pagedlist";
|
||||
import WidgetEdit from "../components/inventorywidgetedit";
|
||||
export default {
|
||||
init() {
|
||||
localeText.fetch(["Widget", "WidgetList"]).then(() => {
|
||||
// alert("inventorywidgetlist::FULLY INITIALIZED");
|
||||
});
|
||||
},
|
||||
components: {
|
||||
WidgetEdit
|
||||
},
|
||||
@@ -104,12 +109,12 @@ export default {
|
||||
this.getDataFromApi();
|
||||
},
|
||||
computed: {},
|
||||
methods: {//todo: clean up this shit with locale text, or maybe it's ok, not sure
|
||||
init(parentLocaleText) {
|
||||
parentLocaleText.fetch(["Widget", "WidgetList"]).then(() => {
|
||||
alert("inventorywidgetlist::FULLY INITIALIZED");
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// init() {
|
||||
// localeText.fetch(["Widget", "WidgetList"]).then(() => {
|
||||
// alert("inventorywidgetlist::FULLY INITIALIZED");
|
||||
// });
|
||||
// },
|
||||
lt: function(key) {
|
||||
return localeText.get(key);
|
||||
},
|
||||
|
||||
@@ -72,8 +72,8 @@ export default {
|
||||
beforeRouteEnter(to, from, next) {
|
||||
//get lt, roles, populate top level components accordingly
|
||||
lt.fetch(["Inventory"]).then(() => {
|
||||
//attempt to init widgetlist before it's mounted!?
|
||||
WidgetList.methods.init(lt);
|
||||
//init widgetlist
|
||||
WidgetList.init();
|
||||
next();
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user