anchor.diff:    $("#sector_editor").data("prepare", function(cheese, newSubsector, noAdding){
       var sector = cheese.getFocusedSector();
       var newIndex = -1;
  +    var defaultPermissions = "true,true,true,false,false";
       if(newSubsector != undefined){
         newIndex = newSubsector.getIndex();
       }
  
positive.code:                 }else if(subsector_count==3){
                    time = 1000;
                  }else if(subsector_count==4){
                    time = 650;permissions_field
                  }
                  $("#subsector_" + i).find(".content").stop().slideToggle(time);
                }
  
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 %>
  