Sha256: d1bb9c2c029893be5a9d9c751a65d538fc6e2f5a3131867c9f6eb4349f83c92c

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 KB

Contents

//= require ./vendor/jquery
//= require ./vendor/foundation
//= require ./vendor/handlebars
//= require ./vendor/sweetalert
//= require tinymce-jquery
//= require_directory .

jQuery(document).foundation();

jQuery(document).ready(function($) {
  $("#menu-toggle").click(function(e) {
    e.preventDefault();
    $("#wrapper").toggleClass("toggled");

    if ($("#wrapper").hasClass("toggled")) {
      $(this).find("i").removeClass("fa-angle-left");
      $(this).find("i").addClass("fa-angle-right");
    } else {
      $(this).find("i").removeClass("fa-angle-right");
      $(this).find("i").addClass("fa-angle-left");
    }
  });
  
  $(".destroy_resource").on("click", function(e) {
    e.preventDefault();
    
    $that = $(this);
    
    swal({
      title: "Are you sure?",
      text: "You will not be able to recover this after deleting...",
      type: "warning",
      showCancelButton: true,
      confirmButtonColor: "#DD6B55",
      confirmButtonText: "Yes, delete it!",
      closeOnConfirm: true
    }, function() {
      $that.parent().find("form").trigger("submit");
    });
  });
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
guts-1.3.4 app/assets/javascripts/guts/application.js.erb
guts-1.3.3 app/assets/javascripts/guts/application.js.erb
guts-1.3.2 app/assets/javascripts/guts/application.js.erb
guts-1.3.1 app/assets/javascripts/guts/application.js.erb
guts-1.3.0 app/assets/javascripts/guts/application.js.erb
guts-1.2.2 app/assets/javascripts/guts/application.js.erb
guts-1.2.1 app/assets/javascripts/guts/application.js.erb