minor changes, mostly documentation
This commit is contained in:
parent
9265efe61a
commit
044da383db
3 changed files with 9 additions and 9 deletions
|
@ -85,12 +85,12 @@ window.Ox = function(val) {
|
|||
|
||||
/*@
|
||||
Ox.load <f> Loads a module
|
||||
A module named "Test" provides <code>Ox.Test/Ox.Test.js</code>, in which it
|
||||
defines one method, <code>Ox.load.Test</code>, that takes two arguments,
|
||||
A module named "Foo" provides <code>Ox.Foo/Ox.Foo.js</code>, in which it
|
||||
defines one method, <code>Ox.load.Foo</code>, that takes two arguments,
|
||||
<code>options</code> and <code>callback</code>, and calls
|
||||
<code>callback</code> with one argument, <code>true</code> for success or
|
||||
<code>false</code> if an error occurred. Generally, the module should
|
||||
define <code>Ox.Test</code> and attach its own methods there.
|
||||
define <code>Ox.Foo</code> and attach its own methods there.
|
||||
(module, callback) -> <u> undefined
|
||||
(module, options, callback) -> <u> undefined
|
||||
(modules, callback) -> <u> undefined
|
||||
|
|
|
@ -71,7 +71,9 @@ Ox.element <f> Generic HTML element, mimics jQuery
|
|||
> Ox.element("<div>").html("red").html()
|
||||
"red"
|
||||
@*/
|
||||
Ox.element = function(str) {
|
||||
Ox.$ = Ox.element = function(str) {
|
||||
// fixme: add generic bind (remove click and mousedown),
|
||||
// add native css selector
|
||||
return {
|
||||
//@ 0 <e> The DOM element itself
|
||||
0: str[0] == '<' ? document.createElement(str.substr(1, str.length - 2)) :
|
||||
|
@ -141,7 +143,6 @@ Ox.element = function(str) {
|
|||
callback <f> Callback function
|
||||
event <o> The DOM event
|
||||
@*/
|
||||
// fixme: why not a generic bind?
|
||||
click: function(callback) {
|
||||
this[0].onclick = callback;
|
||||
return this;
|
||||
|
@ -196,7 +197,6 @@ Ox.element = function(str) {
|
|||
callback <f> Callback function
|
||||
event <o> The DOM event
|
||||
@*/
|
||||
// fixme: why not a generic bind?
|
||||
mousedown: function(callback) {
|
||||
this[0].onmousedown = callback;
|
||||
return this;
|
||||
|
|
|
@ -161,14 +161,14 @@ Ox.formatDate = function(date, str, utc) {
|
|||
['S', function(d) {return Ox.pad(Ox.getSeconds(d, utc), 2);}],
|
||||
['s', function(d) {
|
||||
return Math.floor(d.getTime() / 1000)
|
||||
- (utc ? Ox.getTimezoneOffset() / 1000 : 0);
|
||||
- (utc ? Ox.getTimezoneOffset() / 1000 : 0);
|
||||
}],
|
||||
['U', function(d) {return Ox.pad(Ox.getWeek(d, utc), 2);}],
|
||||
['u', function(d) {return Ox.getISODay(d, utc);}],
|
||||
['V', function(d) {return Ox.pad(Ox.getISOWeek(d, utc), 2);}],
|
||||
['W', function(d) {
|
||||
return Ox.pad(Math.floor((Ox.getDayOfTheYear(d, utc) +
|
||||
(Ox.getFirstDayOfTheYear(d, utc) || 7) - 2) / 7), 2);
|
||||
return Ox.pad(Math.floor((Ox.getDayOfTheYear(d, utc)
|
||||
+ (Ox.getFirstDayOfTheYear(d, utc) || 7) - 2) / 7), 2);
|
||||
}],
|
||||
['w', function(d) {return Ox.getDay(d, utc);}],
|
||||
['X', function(d) {
|
||||
|
|
Loading…
Reference in a new issue