Sha256: 4148378d472ee00dc2662c5cbdbb5e9913c0365e7564a32c14104be68c3743a9

Contents?: true

Size: 1.37 KB

Versions: 3

Compression:

Stored size: 1.37 KB

Contents

- content_for :inline_javascript do
  = javascript_include_tag "dropzone"
  :javascript
    $(document).ready(function() {
      Dropzone.autoDiscover = false;
      var mediaDropzone;
      mediaDropzone = new Dropzone("#media-dropzone", {
        addRemoveLinks: false
      });
      return mediaDropzone.on("success", function(file, responseText) {
        this.removeFile(file);
        $.getScript("/statixite/sites/#{@site.id}/media")
      });
    });
/ Image
- content_for :stylesheets do
  = stylesheet_link_tag "dropzone/dropzone"
%h1 Manage Media
%hr
.row
  .col-sm-12
    .pull-right
      %button.btn.btn-default{"aria-label" => "Picture", :type => "button", "data-toggle": "modal", "data-target": "#imageModal"}
        New Media
%br
.index
  = render "index"
/ Image
#imageModal.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "imageLabel", :role => "dialog", :tabindex => "-1"}
  .modal-dialog
    .modal-content
      .modal-header
        %button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button", 'v-on': 'click: cancelModal'}
          %span{"aria-hidden" => "true"} ×
        %h4#imageLabel.modal-title Drag & Drop Image(s)
      .modal-body
        = form_tag site_media_path(@site, @media), class: 'dropzone', id: 'media-dropzone', :multipart => true do
          .fallback
            = file_field_tag 'media[file]', multiple: true

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
statixite-1.0.2 app/views/statixite/media/index.html.haml
statixite-1.0.1 app/views/statixite/media/index.html.haml
statixite-1.0.0 app/views/statixite/media/index.html.haml