Skip to content

Commit d42a158

Browse files
committed
[frontend] fixed uploading app icon on first app screen
1 parent d648ac3 commit d42a158

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

frontend/express/public/javascripts/countly/countly.views.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -2647,7 +2647,6 @@ window.ManageAppsView = countlyView.extend({
26472647
},
26482648
dataType: "json",
26492649
success: function(data) {
2650-
afterFirstApp();
26512650
var sidebarApp = $("#sidebar-new-app>div").clone();
26522651

26532652
countlyGlobal.apps[data._id] = data;
@@ -2662,6 +2661,7 @@ window.ManageAppsView = countlyView.extend({
26622661
newApp.removeAttr("id");
26632662

26642663
if (!ext) {
2664+
afterFirstApp();
26652665
$("#save-first-app-add").removeClass("disabled");
26662666
sidebarApp.find(".name").text(data.name);
26672667
sidebarApp.data("id", data._id);
@@ -2674,9 +2674,15 @@ window.ManageAppsView = countlyView.extend({
26742674
initAppManagement(data._id);
26752675
return true;
26762676
}
2677-
2678-
$('#add-app-image-form').find("#app_add_image_id").val(data._id);
2679-
$('#add-app-image-form').ajaxSubmit({
2677+
var app_image_form = $('#add-app-image-form');
2678+
if (store.get('first_app')) {
2679+
app_image_form = $('#add-first-app-image-form');
2680+
app_image_form.find("#first-app_image_id").val(data._id);
2681+
}
2682+
else {
2683+
app_image_form.find("#app_add_image_id").val(data._id);
2684+
}
2685+
app_image_form.ajaxSubmit({
26802686
resetForm: true,
26812687
beforeSubmit: function(formData) {
26822688
formData.push({ name: '_csrf', value: countlyGlobal.csrf_token });
@@ -2704,6 +2710,7 @@ window.ManageAppsView = countlyView.extend({
27042710
initAppManagement(data._id);
27052711
}
27062712
});
2713+
afterFirstApp();
27072714
}
27082715
});
27092716
}

0 commit comments

Comments
 (0)