 @init_library = ->
   $(".db library").bind "DOMSubtreeModified", update_library_button
   update_library_button()
-

    x.preventDefault()
    a = $.ajax "/pi/admin/upload.php", p
    a.done (data) ->
      debugger
      f = $ "<file>"
            src: (($ data).find "file").attr "src"
      ($ ".db library").append f

      open_library()
  f

file = ->
  (div().addClass "record").append button_remove(),
                                   img().attr {src: (xml.attr "src"), width: "20%"}

filelist = ->
  with_mixin {xml: ($ x)}, file for x in records

@open_library = ->
  with_mixin [
