diff -r 13b5dd3a7a5f -r d7a159024912 static/js/forms.js --- a/static/js/forms.js Fri Jan 07 03:19:37 2011 +0200 +++ b/static/js/forms.js Fri Jan 07 03:45:19 2011 +0200 @@ -17,6 +17,9 @@ this.removeAttr("disabled"); } + /** + * Query or set form field checked state + */ $.fn.checked = function (flag) { if (flag == undefined) // XXX: jQuery returns true here? @@ -29,6 +32,18 @@ this.removeAttr("checked"); } + /** + * Redirect browser to another URL + * + * XXX: Can I do a global function like this? + */ + $.redirect = function (url) { + window.location.href = url; + + return false; + } + + /* * The given checkbox acts as an enable/disable toggle for this form control */