port ignore patch, from paul gear

git-svn-id: http://www.observium.org/svn/observer/trunk@2006 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-04-02 12:08:08 +00:00
parent 0421fb9741
commit 7d2a253599
3 changed files with 98 additions and 9 deletions

20
html/js/jquery-checkbox.js vendored Normal file
View File

@ -0,0 +1,20 @@
// Checkbox manipulation function from http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery
// assumed to be under the same license as jQuery itself: MIT or GPLv2
jQuery.fn.check = function(mode) {
// if mode is undefined, use 'on' as default
var mode = mode || 'on';
return this.each(function() {
switch(mode) {
case 'on':
this.checked = true;
break;
case 'off':
this.checked = false;
break;
case 'toggle':
this.checked = !this.checked;
break;
}
});
};