|
1 |
| -/*global countlyAuth, ELEMENT, app, countlyGlobal, CV, countlyVue, countlyCommon, CountlyHelpers, jQuery, $, Backbone, moment, sdks, countlyPlugins, countlySession, countlyLocation, countlyCity, countlyDevice, countlyCarrier, countlyDeviceDetails, countlyAppVersion, countlyEvent, _ ,*/ |
| 1 | +/*global countlyAuth, ELEMENT, app, countlyGlobal, CV, countlyVue, countlyCommon, CountlyHelpers, jQuery, $, Backbone, moment, sdks, countlyPlugins, countlySession, countlyLocation, countlyCity, countlyDevice, countlyCarrier, countlyDeviceDetails, countlyAppVersion, countlyEvent, _ , countlyAppManagement*/ |
2 | 2 | (function() {
|
3 | 3 | var ManageAppsView = countlyVue.views.create({
|
4 | 4 | mixins: [ELEMENT.utils.Emitter],
|
|
11 | 11 | set: function(value) {
|
12 | 12 | this.newApp = false;
|
13 | 13 | this.selectedApp = value;
|
14 |
| - this.broadcast('AppSettingsContainerObservable', 'selectedApp', value); |
| 14 | + this.$store.dispatch('countlyAppManagement/setSelectedAppId', value); |
15 | 15 | this.uploadData.app_image_id = countlyGlobal.apps[this.selectedApp]._id + "";
|
16 | 16 | this.app_icon["background-image"] = 'url("appimages/' + this.selectedApp + '.png")';
|
17 | 17 | this.unpatch();
|
|
528 | 528 |
|
529 | 529 | //find next app
|
530 | 530 | var nextAapp = (self.appList[index2]) ? self.appList[index2].value : self.appList[0].value;
|
531 |
| - self.$store.dispatch("countlyCommon/setActiveApp", nextAapp); |
| 531 | + self.$store.dispatch("countlyCommon/updateActiveApp", nextAapp); |
532 | 532 | self.selectedApp = nextAapp;
|
533 | 533 | self.uploadData.app_image_id = countlyGlobal.apps[self.selectedApp]._id + "";
|
534 | 534 | self.app_icon["background-image"] = 'url("appimages/' + self.selectedApp + '.png")';
|
|
726 | 726 | },
|
727 | 727 | mounted: function() {
|
728 | 728 | var appId = this.$route.params.app_id || countlyCommon.ACTIVE_APP_ID;
|
729 |
| - this.broadcast('AppSettingsContainerObservable', 'selectedApp', appId); |
| 729 | + this.$store.dispatch('countlyAppManagement/setSelectedAppId', appId); |
730 | 730 | }
|
731 | 731 | });
|
732 | 732 |
|
733 | 733 | var getMainView = function() {
|
734 | 734 | return new countlyVue.views.BackboneWrapper({
|
735 | 735 | component: ManageAppsView,
|
736 |
| - vuex: [] |
| 736 | + vuex: [{clyModel: countlyAppManagement}] |
737 | 737 | });
|
738 | 738 | };
|
739 | 739 |
|
|
0 commit comments