diff options
| author | Sean Fridman <fridman@mail.sfsu.edu> | 2015-06-19 15:29:19 -0400 |
|---|---|---|
| committer | Sean Fridman <fridman@mail.sfsu.edu> | 2015-06-19 15:30:59 -0400 |
| commit | 27abfdd15714895894565124bcc660b9d6774494 (patch) | |
| tree | 920db8ec4972e0b8aa24b184d4be986033b2452b /themes/okadmin/public/js/app.js | |
| parent | 5f002254c523bb9651e627c2fbd7d9cd9b021568 (diff) | |
Add 'flag' data type
Diffstat (limited to 'themes/okadmin/public/js/app.js')
| -rw-r--r-- | themes/okadmin/public/js/app.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/themes/okadmin/public/js/app.js b/themes/okadmin/public/js/app.js index d58cb2a..4be0afc 100644 --- a/themes/okadmin/public/js/app.js +++ b/themes/okadmin/public/js/app.js @@ -181,6 +181,17 @@ var OKAdmin = function(){ $(el).append(normalizedInput) }) + // Modify flags checkboxes such that unchecked ones return "false" + // instead of nothing + $('.property .flag').each(function(i, el) { + var input = el.querySelector('input') + var checked = !!input.checked + if (!checked) { + $(input).attr('value', 'false') + input.checked = true + } + }) + $("ol").each(function(){ $("li", this).each(function(index){ $(this).find("input,textarea").each(function(){ |
