2011-07-29 18:48:43 +00:00
|
|
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
2011-11-05 16:46:53 +00:00
|
|
|
'use strict';
|
2011-04-22 22:03:10 +00:00
|
|
|
// fixme: wouldn't it be better to let the elements be,
|
|
|
|
// rather then $element, $content, and potentially others,
|
|
|
|
// 0, 1, 2, etc, so that append would append 0, and appendTo
|
|
|
|
// would append (length - 1)?
|
2011-05-16 08:24:46 +00:00
|
|
|
/*@
|
2012-04-07 14:40:41 +00:00
|
|
|
Ox.Container <f> Container element
|
2011-05-16 08:24:46 +00:00
|
|
|
() -> <o> Container object
|
|
|
|
(options) -> <o> Container object
|
|
|
|
(options, self) -> <o> Container object
|
|
|
|
options <o> Options object
|
|
|
|
self <o> Shared private variable
|
|
|
|
@*/
|
2011-04-22 22:03:10 +00:00
|
|
|
Ox.Container = function(options, self) {
|
2011-06-19 17:48:32 +00:00
|
|
|
var that = Ox.Element({}, self)
|
2011-04-22 22:03:10 +00:00
|
|
|
.options(options || {})
|
|
|
|
.addClass('OxContainer');
|
2011-09-03 23:04:18 +00:00
|
|
|
// fixme: we used to pass self _again_ to the content,
|
|
|
|
// which obviously makes clicks trigger twice
|
|
|
|
// removed for now, but may break something else.
|
|
|
|
// (maybe, if needed, content can pass a container event along)
|
|
|
|
that.$content = Ox.Element({})
|
2011-04-22 22:03:10 +00:00
|
|
|
.options(options || {})
|
|
|
|
.addClass('OxContent')
|
2011-05-11 17:18:34 +00:00
|
|
|
.appendTo(that);
|
2011-04-22 22:03:10 +00:00
|
|
|
return that;
|
|
|
|
};
|