Sha256: b602aaa4740e485ab520f11d8982d8393063de8894d6c1de88503ef596f9ca4f

Contents?: true

Size: 962 Bytes

Versions: 18

Compression:

Stored size: 962 Bytes

Contents

var AdminData = AdminData || {};

AdminData.actOnResult = {

	action: function(action_type) {
		var formData = $('#advance_search_form').data('admin_data_form_array'),
		parameterizedData;

		formData.push({
			'name': 'admin_data_advance_search_action_type',
			'value': action_type
		});

		parameterizedData = $.param(formData);

		$.ajax({
			url: $('#advance_search_form').attr('action'),
			type: 'post',
			dataType: 'json',
			data: parameterizedData,
			success: function(json) {
				AdminData.actOnResult.successCallback(json);
			}
		});
	},

	successCallback: function(json) {
		$('#results').text(json.success);
	}

};

$('#advance_search_delete_all').live('click', function() {
	if (window.confirm('Are you sure?')) {
		AdminData.actOnResult.action('delete');
	}
	return false;
});

$('#advance_search_destroy_all').live('click', function() {
	if (window.confirm('Are you sure?')) {
		AdminData.actOnResult.action('destroy');
	}
	return false;
});

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
the_jobbook_admin_data-1.3.0a app/assets/javascripts/advance_search/act_on_result.js
admin_data-1.2.1 app/assets/javascripts/advance_search/act_on_result.js
admin_data-1.2.0 app/assets/javascripts/advance_search/act_on_result.js
admin_data-1.1.16 app/assets/javascripts/advance_search/act_on_result.js
admin_data-1.1.15 app/assets/javascripts/advance_search/act_on_result.js
admin_data-1.1.14 lib/public/javascripts/advance_search/act_on_result.js
admin_data-1.1.13 lib/public/javascripts/advance_search/act_on_result.js
admin_data-1.1.12 lib/public/javascripts/advance_search/act_on_result.js
admin_data-1.1.11 lib/public/javascripts/advance_search/act_on_result.js
admin_data-1.1.10 lib/public/javascripts/advance_search/act_on_result.js
admin_data-1.1.9 lib/public/javascripts/advance_search/act_on_result.js
admin_data-1.1.8 lib/public/javascripts/advance_search/act_on_result.js
admin_data-1.1.7 lib/public/javascripts/advance_search/act_on_result.js
admin_data-1.1.3 lib/public/javascripts/advance_search/act_on_result.js
admin_data-1.0.22 lib/js/advance_search/act_on_result.js
admin_data-1.0.21 lib/js/advance_search/act_on_result.js
admin_data-1.0.19 lib/js/advance_search/act_on_result.js
admin_data-1.0.18 lib/js/advance_search/act_on_result.js