Sha256: 1e8e4b4e02adffcb58ce31a7b2c6ff679b78cf04391ff7f7d096105f1f79de0e

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

$(function() {
	
	// all .toggle links must have a rel attribute to identify what element will toggle
	$('a.toggle').live('click', function() {
		$($(this).attr('rel')).toggle();
	});

	// open modalbox
	$('.lightbox').fancybox({
		closeClick: false,
		autoSize: true
	});

	// notices fadeout
	$('a#system_notice_close, #system_notice').live('click', function() {
		$('#system_notice').fadeOut();
	});

	// ajax forms cancel button closes modal window
	$('.mdwa_ajax a.cancel').live('click', function() {
		$.fancybox.close(true);
	});	
	
});

function checkOrUncheckAll( to_be_checked ){
  var to_be_checked = to_be_checked || false;
  $( ".cid" ).attr( "checked", to_be_checked );
}

function defineAction( form, action, confirmation ) {
  var response = true;
  if( confirmation ) {
    response = confirm("Are you sure?");
  }
  if( response ) {
    $( "#" + form ).attr( "action", action);
    $( "#" + form ).submit();
  }
}

function defineOrder( form, action, id ) {
  $( "#" + form ).attr( "action", action);
  $( "#cb" + id ).attr( "checked", true);
  $( "#" + form ).submit();
}

function deleteSystemNotice() {
	$('#system_notice').fadeOut('slow');
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mdd-2.0.1 lib/generators/mdd/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-2.0 lib/generators/mdd/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js