Sha256: 3df5304c1357d17cd7f91dec70f892bab4e26a4dccd4bdf5188b707f1163b87d

Contents?: true

Size: 1.25 KB

Versions: 3

Compression:

Stored size: 1.25 KB

Contents

// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
 
 
$(document).ready(function () {
	$("#new_feedback").validate({
		rules: {
		"feedback[name]": {required: true},
		"feedback[email]": {required: true, email: true},
		"feedback[subject]": {required: true},
		"feedback[description]": {required: true}
		},
		messages:{
			"feedback[name]":{
				required:"Please enter name"
			},
			"feedback[email]":{
				required:"Please enter email"
			},
			"feedback[subject]":{
				required:"Please enter subject"
			},
			"feedback[description]":{
				required:"Please enter description"
			},
		}
	});
	$(".edit_feedback").validate({
		rules: {
		"feedback[name]": {required: true},
		"feedback[email]": {required: true, email: true},
		"feedback[subject]": {required: true},
		"feedback[description]": {required: true}
		},
		messages:{
			"feedback[name]":{
				required:"Please enter name"
			},
			"feedback[email]":{
				required:"Please enter email"
			},
			"feedback[subject]":{
				required:"Please enter subject"
			},
			"feedback[description]":{
				required:"Please enter description"
			},
		}
	});
	$('#feedbacks_table').DataTable({
		"order": [[ 0, "desc" ]]
	});
});
 
 

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
feedback_gem-0.3.4 app/assets/javascripts/feedback_gem/feedbacks.js
feedback_gem-0.3.3 app/assets/javascripts/feedback_gem/feedbacks.js
feedback_gem-0.3.2 app/assets/javascripts/feedback_gem/feedbacks.js