Example #1
0
ProfileForm.prototype.onsuccess = function() {
  log('Profile updated');
  citizen.load('me');
  var self = this;
  citizen.once('loaded', function () {
    self.find('img').attr('src', citizen.profilePicture());
  });
  this.messages([t('settings.successfuly-updated')], 'success');
}
Example #2
0
SigninForm.prototype.onsuccess = function () {
  citizen.load('me');
  var sidebarItem = dom('.nav-proposal .sidebar-nav .nav.navlist li.active');
  if (sidebarItem.length) {
    var id = sidebarItem.attr('data-id');
    page('/law/' + id);
  } else {
    page('/');
  }
};
Example #3
0
ProfileForm.prototype.onsuccess = function() {
  log('Profile updated');
  citizen.load('me');
  var self = this;
  citizen.once('loaded', function () {
    self.find('img').attr('src', citizen.profilePicture());
  });
  this.messages([t('Your profile was successfuly updated')], 'success');

  //TODO: maybe this message should be display on the top of the profile view.

  //After edit force reload
  setTimeout(window.location.reload(), 3000);
};
Example #4
0
SigninForm.prototype.onsuccess = function (res) {
  var payload = JSON.parse(res.text);
  if (payload.token) {
    jwt.setToken(payload.token);
  }

  citizen.load('me');
  var sidebarItem = dom('.nav-proposal .sidebar-nav .nav.navlist li.active');
  if (sidebarItem.length) {
    var id = sidebarItem.attr('data-id');
    page('/law/' + id);
  } else {
    page('/');
  }
};
Example #5
0
File: view.js Project: 3manuek/app
ProfileView.prototype.onsuccess = function() {
  log('Profile updated');
  citizen.load('me');
  this.messages([t('Your profile was successfuly updated')], 'success');
}
Example #6
0
NotificationsView.prototype.onsuccess = function() {
  log('Notification settings updated');
  this.messages([t('Your notifiction settings were successfuly updated')], 'success');
  citizen.load('me');
}