Sha256: e737af65e5e5197216c53010686844c0d1028846f6fd82bc7ece3dcbfe5d8f26
Contents?: true
Size: 1.09 KB
Versions: 8
Compression:
Stored size: 1.09 KB
Contents
// Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults jQuery.ajaxSetup({ 'beforeSend': function (xhr) {xhr.setRequestHeader("Accept", "text/javascript");} }); jQuery.fn.submitWithAjax = function() { this.submit(function () { $.post($(this).attr('action'), $(this).serialize(), null, "script"); return false; }); }; jQuery.fn.jobListExpander = function() { var args = arguments[0] || {}; var visible = args.visible; var trigger = $(this).children('.secondary-navigation'); var details = $(this).children('.content'); if (visible != 1) { details.hide(); trigger.addClass('inactive'); }; trigger.click( function () { $(this).toggleClass('inactive'); details.slideToggle(); }); }; $('#details').jobListExpander({visible: 1}); $('#tasks').jobListExpander({visible: 1}); $('#documents_received').jobListExpander(); $('#documents_sent').jobListExpander(); $('#documents_not_sent').jobListExpander(); $('#photo_reports').jobListExpander(); $('#invoices').jobListExpander();
Version data entries
8 entries across 8 versions & 1 rubygems