this.$el.find('.inline-edit').on('click', '.inline-edit-save', function(e) {
    e.preventDefault();

    $(e.currentTarget).addClass('loading');

    var group = {};

    if (_this.group) {
      $.extend(group, _this.group);
    }

    group.name = validator.trim(_this.$el.find('.name-input').val());

    if (_this.group) {
      ResourceGroupsActions.updateGroup(group);
    } else {
      ResourceGroupsActions.createGroup(group);
    }
  });
Пример #2
0
 openEditProject: function($event) {
   $event.preventDefault();
   ResourceGroupsActions.openCreateOrEditProject(this.model);
 }
 this.$el.find('.inline-edit').on('click', '.inline-edit-cancel', function(e) {
   e.preventDefault();
   _this.group = null;
   ResourceGroupsActions.cancelEditGroup();
 });