remove new for all Ox.Elements, dont declare arguments again, add some semicolons
This commit is contained in:
parent
3eab11e967
commit
b27ed00356
69 changed files with 430 additions and 440 deletions
|
|
@ -16,8 +16,8 @@ Ox.AnnotationPanel <f:Ox.Element> AnnotationPanel Object
|
|||
|
||||
Ox.AnnotationPanel = function(options, self) {
|
||||
|
||||
var self = self || {},
|
||||
that = new Ox.Element({}, self)
|
||||
self = self || {};
|
||||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
id: '',
|
||||
items: [],
|
||||
|
|
@ -29,10 +29,10 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
|
||||
self.selected = -1;
|
||||
|
||||
that.$element = new Ox.CollapsePanel({
|
||||
that.$element = Ox.CollapsePanel({
|
||||
collapsed: false,
|
||||
extras: self.options.editable ? [
|
||||
new Ox.Button({
|
||||
Ox.Button({
|
||||
id: 'add',
|
||||
style: 'symbol',
|
||||
title: 'add',
|
||||
|
|
@ -53,9 +53,9 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
});
|
||||
that.$content = that.$element.$content;
|
||||
|
||||
self.$annotations = new Ox.List({
|
||||
self.$annotations = Ox.List({
|
||||
construct: function(data) {
|
||||
return new Ox.Element()
|
||||
return Ox.Element()
|
||||
.addClass('OxAnnotation OxEditable OxTarget')
|
||||
.html(Ox.parseHTML(data.value));
|
||||
},
|
||||
|
|
@ -87,11 +87,11 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
.appendTo(that.$content);
|
||||
|
||||
/*
|
||||
self.$annotations = new Ox.Element()
|
||||
self.$annotations = Ox.Element()
|
||||
.appendTo(that.$content);
|
||||
self.$annotation = [];
|
||||
self.options.items.forEach(function(item, i) {
|
||||
self.$annotation[i] = new Ox.Element()
|
||||
self.$annotation[i] = Ox.Element()
|
||||
.addClass('OxAnnotation')
|
||||
.html(item.value.replace(/\n/g, '<br/>'))
|
||||
.click(function() {
|
||||
|
|
@ -141,7 +141,7 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
that.deselectItems = function() {
|
||||
if(self.$annotations.options('selected'))
|
||||
self.$annotations.options('selected',[]);
|
||||
}
|
||||
};
|
||||
|
||||
return that;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue