#image_files_content
  #image_files_big_container.container-fluid
    #albums=render :partial => "admin/albums/albums"
      
    
    #albums_navbar
      =render :partial => "admin/albums/albums_navbar"
      
      
      
      

    =render :partial => "image_files_container"
    
    :coffeescript
      init_image_files_drag();
    


  %form#fileupload{:action => admin_image_files_path(:id => @image_file.id, :album_id => params[:album_id], :manager => params[:manager], :multiple => params[:multiple]),:method=>"POST", :enctype=>"multipart/form-data", :style => "display:inline;"}
    %input{:name => "redirect", :type => "hidden", :value => "/"}/
  
    %nav.navbar.navbar-default.navbar-fixed-bottom#image_files_navbar{:style => "position:absolute;"}
    
      .container-fluid
      
        %ul.nav.navbar-nav.navbar-right
        
          
       
          %div{:style => "float:left;padding: 10px;height:20px;"}

            #grid_slider
      
          :coffeescript
            initialize_slider()
      
       
  
  
        .navbar-header
          %span.navbar-brand Images
    


       
          
          
          
          
        .collapse.navbar-collapse
          %ul.nav.navbar-nav#multiple_selection

            %li.dropdown#multiple_menu
              %a#multiple_selection_text{:href => "#", :class => "dropdown-toggle", :data => {:toggle => "dropdown"}}
                %b.caret
      
              %ul.dropdown-menu
                
                %li
                  %a{:href => "#", :onclick => "delete_multiple_images();return false;"} Supprimer ces images
        
                %li.divider
                %li
                  %a{:href => "#", :onclick => "unselect_all_image();return false;"} Tout désélectionner
                %li  
                  %a{:href => "#", :onclick => "select_all_image();return false;"} Tout sélectionner
        
          %ul.nav.navbar-nav
            %li
              -if params[:multiple]
                %li
                  %a{:href => "#", :onclick => "manager_send_multiple_image_files();return false;"}=ic :"check-circle"
            
  
          %ul.nav.navbar-nav
            %li
              %a.add_file_click{:href => "#"}
                %span.fileinput-button{}
                  %i.icon-plus.icon-white
                  %span Ajouter des images

            %li
              .progress#upload_progress_container{:style => "width:100px;position:relative;top:3px;"}
                .progress-bar#upload_progress
                    
                    
              %input{:multiple => "", :name => "files[]", :type => "file", :style => "display:none;"}
    
          
            



      :javascript
              $("#upload_progress_container").hide();
        var myDropzone = $("#image_files_container").dropzone({ 
          url: "#{admin_image_files_path(:format => "js", :id => @image_file.id, :album_id => params[:album_id], :manager => params[:manager], :multiple => params[:multiple])}",
          success: function (response) {
                          eval(response.xhr.response);
                      },
          totaluploadprogress: function(progress) {
              $("#upload_progress_container").show();
              $("#upload_progress").css("width",progress + '%');
          },
          queuecomplete: function(){
            $("#upload_progress_container").hide();
          }
          
          });
        
        $('.add_file_click').click(function(){
          $(".dz-hidden-input").click();
          return false
        });

