class FileUploadBuilder template: """
Sélectionnez Changer Supprimer
""" constructor: (@$el) -> $uploadedFile = @$el.parent().find('a, img').addClass('uploaded-file').remove() unless @$el.data("file-upload") $container = @$el.parent().html(@template) # Append input to file buttons $container.find(".btn-file").append(@$el) # Add preview link if existing $container.prepend($uploadedFile) if $uploadedFile.length # Store object in "file-upload" data key on dom element @$el.data("file-upload", this) class CheckboxBuilder constructor: (@$el) -> unless @$el.data("checkbox") @$el.wrap('