Sha256: 55d9788fdbcf17e6f04fb2234bebe93573d9b8a4c298f883e5fe765c5d05f715

Contents?: true

Size: 1.18 KB

Versions: 20

Compression:

Stored size: 1.18 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').remove();
	});

	// 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', function() {
		$('#system_notice').remove();
	});
}

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mdd-3.0.20 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.19 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.18 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.17 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.16 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.15 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.14 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.13 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.10 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.9 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.8 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.7 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.6 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.4 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.3 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.2 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.1 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-3.0.0 lib/generators/mdwa/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-2.0.3 lib/generators/mdd/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js
mdd-2.0.2 lib/generators/mdd/sandbox/templates/app/assets/javascripts/mdwa/template/all_pages.js