{:uriI"file:///Users/khcr/.rvm/gems/ruby-2.5.1/gems/snaptable-2.0.4/app/assets/javascripts/snaptable/table.js?type=application/javascript&pipeline=self&id=46cedf6cbd816e8ced3969155b16c0a3664383bef1a8c0ff73f72f0479057818:ET:load_pathI"Q/Users/khcr/.rvm/gems/ruby-2.5.1/gems/snaptable-2.0.4/app/assets/javascripts;T: filenameI"d/Users/khcr/.rvm/gems/ruby-2.5.1/gems/snaptable-2.0.4/app/assets/javascripts/snaptable/table.js;T: nameI"snaptable/table;T:logical_pathI"snaptable/table.self.js;T:content_typeI"application/javascript;T: sourceI"/* global $ */ "use strict"; /* Admin table */ function snapifyTable(snaptable) { var tableButtons = snaptable.find(".table_buttons"), editButton = tableButtons.find("a[class='edit']"), deleteButton = tableButtons.find("a[class='delete']"), showButton = tableButtons.find("a[class='show']"), path = window.location.pathname + "/"; // add ajax to the pagination snaptable.on("click", ".pagination a", function() { $.getScript(this.href); return false; }); // line clickable snaptable.on("click", "tbody tr", function(e) { var id = $(this).data("url") ; if ( typeof id !== "undefined" && !$(this).hasClass("selected") ) { snaptable.find("tr.selected").removeClass("selected"); $(this).addClass("selected"); deleteButton.add(editButton).add(showButton).addClass("on"); editButton.attr("href", path + id + "/edit"); deleteButton.attr("href", path + id); showButton.attr("href", path + id); } }); // Double click if(editButton.length) { snaptable.on("dblclick", "tbody tr", function() { var id = $(this).data("url"); if ( typeof id !== "undefined" ) { window.location = path + id + "/edit"; } }); } } function snapifyTables() { $(".snaptable").each(function() { snapifyTable($(this)); }) } $(document).on("ready turbolinks:load", function() { snapifyTables(); }); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"rfile-digest:///Users/khcr/.rvm/gems/ruby-2.5.1/gems/snaptable-2.0.4/app/assets/javascripts/snaptable/table.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%1ƒz;2↦e #~@{i: lengthi:dependencies_digest"%[8HWs=rE$(9]A:idI"E46cedf6cbd816e8ced3969155b16c0a3664383bef1a8c0ff73f72f0479057818;F: mtimel+wnU\