forked from 0x2620/oxjs
more docs
This commit is contained in:
parent
bdb8d98787
commit
cc75e25415
42 changed files with 664 additions and 93 deletions
|
|
@ -1,4 +1,14 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||
|
||||
/*@
|
||||
Ox.OptionGroup <f> OptionGroup
|
||||
(items, min, max, property) -> <f> OptionGroup
|
||||
items <a> array of items
|
||||
min <n> minimum number of selected items
|
||||
max <n> maximum number of selected items
|
||||
property <s|checked> property to check
|
||||
@*/
|
||||
|
||||
Ox.OptionGroup = function(items, min, max, property) {
|
||||
|
||||
/*
|
||||
|
|
@ -41,6 +51,10 @@ Ox.OptionGroup = function(items, min, max, property) {
|
|||
return num;
|
||||
}
|
||||
|
||||
/*@
|
||||
[property] <f> returns an array with the positions of all checked item
|
||||
() -> <a> returns checked items
|
||||
@*/
|
||||
this[property] = function() {
|
||||
// returns an array with the positions of all checked item
|
||||
var checked = [];
|
||||
|
|
@ -52,6 +66,10 @@ Ox.OptionGroup = function(items, min, max, property) {
|
|||
return checked;
|
||||
};
|
||||
|
||||
/*@
|
||||
init <f> init group
|
||||
() -> <a> returns items
|
||||
@*/
|
||||
this.init = function() {
|
||||
var num = getNumber(),
|
||||
count = 0;
|
||||
|
|
@ -76,6 +94,10 @@ Ox.OptionGroup = function(items, min, max, property) {
|
|||
return items;
|
||||
};
|
||||
|
||||
/*@
|
||||
toggle <f> toggle options
|
||||
(pos) -> <a> returns toggled state
|
||||
@*/
|
||||
this.toggle = function(pos) {
|
||||
var last,
|
||||
num = getNumber(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue