Skip to content

Commit c0c3fc2

Browse files
committed
Support for dirty and hidden fields
* Merged in pull request from tclift (no. 8) * Minor comment changes * Updated release history and rolled version number
1 parent 1602c52 commit c0c3fc2

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,15 @@ with this objective, please voice your thoughts in the issues list.
104104
105105
###Release History
106106
107-
**2012-10-24** - Initial public release.
107+
**2013-05-01** - Added support for hidden and disabled form fields.
108108
109-
**2012-10-26** - Use dashes in class names rather than camel case.
109+
**2013-02-03** - Add demo page.
110110
111111
**2013-01-28** - Add ```change``` event support and a demo page.
112112
113-
**2013-02-03** - Add demo page.
113+
**2012-10-26** - Use dashes in class names rather than camel case.
114+
115+
**2012-10-24** - Initial public release.
114116
115117
116118
###Prerequisites

are-you-sure.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"save-check",
1111
"save-warning"
1212
],
13-
"version": "1.1.0",
13+
"version": "1.2.0",
1414
"author": {
1515
"name": "Chris Dance (codedance) at PaperCut Software",
1616
"url": "https://github.com/codedance"

demo/are-you-sure-demo.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
<head>
44
<title>jQuery Plugin Demo: Are You Sure? - a dirty forms plugin</title>
55

6+
<!--
7+
8+
We'll use an old version of jQuery to show we're backwards compatible. In
9+
production we recommend using the latest version. e.g.
10+
11+
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
12+
13+
-->
14+
615
<script src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
716
<script src="../jquery.are-you-sure.js"></script>
817
<script>

jquery.are-you-sure.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
}
2929

3030
if ($field.is(':disabled')) {
31-
/*
32-
* Given disabled fields don't submit we use a static marker (and the real value is ignored). If the field is
33-
* later enabled the actual value will be used and the form will become dirty.
34-
*/
3531
return 'ays-disabled';
3632
}
3733

0 commit comments

Comments
 (0)