1
0
Fork 0

small fix: modal dialog will be filled, when using profile-link

This commit is contained in:
gschwab 2014-03-28 09:17:20 +01:00
parent a0f6c9d138
commit dfc7ab72a1
1 changed files with 10 additions and 5 deletions

View File

@ -67,7 +67,8 @@
*/
// arangoHelper.fixTooltips(".icon_arangodb, .arangoicon", "left");
if (!!isProfile) {
$('#editCurrentUserProfileModal').modal('show');
var user = this.collection.findWhere({user: this.collection.whoAmI()});
this.editCurrentUser(user);
}
return this;
@ -197,10 +198,7 @@
}
var user = this.collection.findWhere({user: this.userToEdit});
if (user.get("loggedIn")) {
$('#editCurrentUserProfileModal').modal('show');
$('#editCurrentUsername').html(user.get("user"));
$('#editCurrentName').val(user.get("extra").name);
$('#editCurrentUserProfileImg').val(user.get("extra").img);
this.editCurrentUser(user);
} else {
$('#editUserModal').modal('show');
$('#editUsername').html(user.get("user"));
@ -212,6 +210,13 @@
}
},
editCurrentUser: function(user) {
$('#editCurrentUserProfileModal').modal('show');
$('#editCurrentUsername').html(user.get("user"));
$('#editCurrentName').val(user.get("extra").name);
$('#editCurrentUserProfileImg').val(user.get("extra").img);
},
submitEditUser : function() {
var self = this;
var userName = this.userToEdit;