1
0
Fork 0
forked from 0x2620/oxjs

add Ox.ListCalendar

This commit is contained in:
rlx 2011-10-03 16:14:01 +00:00
commit d51de58009
4 changed files with 364 additions and 32 deletions

View file

@ -1,41 +1,41 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
/*@
Ox.ListMap <f:Ox.Element> ListMap Object
() -> <f> ListMap Object
(options) -> <f> ListMap Object
(options, self) -> <f> ListMap Object
Ox.ListMap <f:Ox.Element> ListMap object
() -> <f> ListMap object
(options) -> <f> ListMap object
(options, self) -> <f> ListMap object
options <o> Options object
height <n|256> height
labels <b|false> labels
places <f|null> places
selected <a|[]> selected
width <n|256> width
self <o> shared private variable
height <n|256> Height in px
labels <b|false> If true, show labels
places <a|f|null> Array of places, or function that returns places
selected <a|[]> Selected places
width <n|256> Width in px
self <o> Shared private variable
@*/
Ox.ListMap = function(options, self) {
self = self || {};
var that = Ox.Element({}, self)
.defaults({
addPlace: null,
editPlace: null,
height: 256,
labels: false,
pageLength: 100,
places: null,
removePlace: null,
selected: [],
sort: [{key: 'geoname', operator: '+'}],
width: 256
})
.addClass('OxListMap')
.options(options || {})
.css({
width: self.options.width + 'px',
height: self.options.height + 'px'
});
.defaults({
addPlace: null,
editPlace: null,
height: 256,
labels: false,
pageLength: 100,
places: null,
removePlace: null,
selected: [],
sort: [{key: 'geoname', operator: '+'}],
width: 256
})
.options(options || {})
.addClass('OxListMap')
.css({
width: self.options.width + 'px',
height: self.options.height + 'px'
});
self.isAsync = Ox.isFunction(self.options.places);
@ -72,7 +72,6 @@ Ox.ListMap = function(options, self) {
width: 16
},
{
//editable: true,
id: 'name',
operator: '+',
removable: false,
@ -81,7 +80,6 @@ Ox.ListMap = function(options, self) {
width: 144
},
{
editable: false,
format: function(value) {
return value.join('; ');
},
@ -92,7 +90,6 @@ Ox.ListMap = function(options, self) {
width: 144
},
{
//editable: true,
id: 'geoname',
map: function(v) {
var names = v.split(', ');