anchor.diff:            var index = i;
             var recentlyCreated = (newIndex != -1)&&(newIndex == index);
             if(subsector){
  +            if(noAdding && (newIndex != -1)){
  +              if(i > newIndex){
  +                $("#subsector_" + i).find(".permissions_field").data("fromString")($("#subsector_" + (i-1)).find(".permissions_field").data("toString")());
  +              }else if(i == newIndex){
  +                $("#subsector_" + i).find(".permissions_field").data("fromString")(defaultPermissions);
  +              }
  +            }
               if(!noAdding && (recentlyCreated || ((newIndex == -1)&&(i == 0)))){
                 if(!$("#subsector_" + i).find(".content").is(':visible')){
                   var time = 1000;
  
positive.code:   $("#sector_editor").data("prepare", function(cheese, newSubsector, noAdding){
      var sector = cheese.getFocusedSector();
      var newIndex = -1;
      if(newSubsector != undefined){
        newIndex = newSubsector.getIndex();
      }
  
negative.code:       }
      }
    });
    $(".permissions_field").each(function(){
      var permissionsField = $(this)
      permissionsField.data("toString", function(){
        var permissions = []
        permissionsField.find("input").each(function(){
          permissions.push($(this).is(":checked"));
        });
        return permissions.toString();
      });
    });
    $(".permissions_field").each(function(){
      var permissionsField = $(this)
      permissionsField.data("fromString", function(values){      
        var permissions = values.split(",");
        for(var i in permissions){
          permissions[i] = (permissions[i] === "true");
          permissionsField.find("input").eq(i).attr('checked', permissions[i]);
        }
        console.log(permissions);
      });
    });
    
  <% end %>
  