Sha256: db056539777c923ffaeb69e5f45bf6439428a5644a83a266e81b3b3ff40c7df8

Contents?: true

Size: 1.25 KB

Versions: 2

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,2,"desc" ]]
	});
});
 
 

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
feedback_gem-0.3.1 app/assets/javascripts/feedback_gem/feedbacks.js
feedback_gem-0.3.0 app/assets/javascripts/feedback_gem/feedbacks.js