1
0
Fork 0
forked from 0x2620/oxjs

add some more documentation, pass some more tests

This commit is contained in:
rlx 2011-10-01 02:21:55 +00:00
commit f2dbfbd1e5
9 changed files with 589 additions and 494 deletions

View file

@ -60,8 +60,8 @@ view List or item view, like "clips" or "map". Both list and item views are
per type.
span Position or selection in a view, either one or two coordinates or one
id, like in "video/01:00", "video/-01:00", "video/01:00,-01:00",
"video/annotationABC", "video/subtitles:23", "text/chapter42",
"map/0,0", "map/-45,-90,45,90", "map/Barcelona", "image/100,100" etc.
"video/@annotationABC", "video/@subtitles:23", "text/@chapter42",
"map/0,0", "map/-45,-90,45,90", "map/@barcelona", "image/100,100" etc.
Testing id is asynchronous.
sort Sort, like "title" or "-director" or "country,year,-language,+runtime"
find Query, like a=x or a=x&b=y or a=x&(b=y|c=z). A query object has the form
@ -85,8 +85,8 @@ k<v k v < is less than (number)
k!<v k v !< is not less than (number)
k>v k v > is more than (number)
k!>v k v !> is not more than (number)
k=v:w k [v,w] = is between (number), is (string)
k!=v:w k [v,w] != is not between (number), is not (string)
k=v:w k [v,w] - is between (number), is (string)
k!=v:w k [v,w] !- is not between (number), is not (string)
All parts of the URL can be omitted, as long as the order is preserved.
@ -504,7 +504,7 @@ Ox.URL = function(options) {
}
if (!state.span && /^[A-Z@]/.test(parts[0])) {
// test for span id or name
self.options.getSpan(state.item, state.view, parts[0], function(span, view) {
self.options.getSpan(state.item, state.view, parts[0].replace(/%20/g, ' '), function(span, view) {
if (span) {
if (!state.view) {
// set list or item view