Rename private attribute _element to _el
Change-Id: I9c7a31bd6844636737ffa6456562b997f5e370a3
diff --git a/dev/js/src/buttongroup.js b/dev/js/src/buttongroup.js
index 0ea1d38..85543e4 100644
--- a/dev/js/src/buttongroup.js
+++ b/dev/js/src/buttongroup.js
@@ -18,7 +18,7 @@
cl.add.apply(cl,classes);
};
cl.add('button-group');
- this._element = e;
+ this._el = e;
return this;
},
@@ -27,7 +27,7 @@
* Return main element
*/
element : function () {
- return this._element;
+ return this._el;
},
@@ -52,7 +52,7 @@
*/
add : function (title, data, cb) {
- const b = this._element.addE('span');
+ const b = this._el.addE('span');
b.setAttribute('title',title);
if (data !== undefined) {
@@ -107,7 +107,7 @@
* The state has to be a state object.
*/
addToggle : function (title, data, state) {
- const b = this._element.addE('span');
+ const b = this._el.addE('span');
b.setAttribute('title',title);
if (data != undefined) {
@@ -168,7 +168,7 @@
* Remove all defined buttons
*/
clear : function () {
- _removeChildren(this._element);
+ _removeChildren(this._el);
return this;
}
}
diff --git a/dev/js/src/buttongroup/menu.js b/dev/js/src/buttongroup/menu.js
index da34584..7a4f8df 100644
--- a/dev/js/src/buttongroup/menu.js
+++ b/dev/js/src/buttongroup/menu.js
@@ -2,6 +2,7 @@
* Menu to choose from in a button group.
*/
"use strict";
+
define(['menu'], function (menuClass) {
return {
@@ -84,11 +85,11 @@
_repos : function (e) {
const bounding = e.getBoundingClientRect();
- this._element.style.left = bounding.left + "px";
- this._element.style.top = (
+ this._el.style.left = bounding.left + "px";
+ this._el.style.top = (
bounding.top +
bounding.height -
- this._element.clientHeight
+ this._el.clientHeight
) + "px";
}
};
diff --git a/dev/js/src/datepicker.js b/dev/js/src/datepicker.js
index 61f6a8b..c2b0570 100644
--- a/dev/js/src/datepicker.js
+++ b/dev/js/src/datepicker.js
@@ -116,7 +116,7 @@
*/
show : function (year, month) {
- const e = this._element = d.createElement('div');
+ const e = this._el = d.createElement('div');
e.setAttribute('tabindex', 0);
e.style.outline = 0;
e.classList.add('datepicker');
@@ -170,7 +170,7 @@
t._input.focus();
- return t._element;
+ return t._el;
},
_stringHelper : function () {
@@ -213,7 +213,7 @@
* Get the HTML element associated with the datepicker.
*/
element : function () {
- return this._element;
+ return this._el;
},
diff --git a/dev/js/src/hint/alert.js b/dev/js/src/hint/alert.js
index c8d7696..7847af2 100644
--- a/dev/js/src/hint/alert.js
+++ b/dev/js/src/hint/alert.js
@@ -19,9 +19,9 @@
const t = this;
t._type = 'alert';
t.active = false;
- t._element = document.createElement('div');
- t._element.style.display = 'none';
- t._element.classList.add('alert', 'hint');
+ t._el = document.createElement('div');
+ t._el.style.display = 'none';
+ t._el.classList.add('alert', 'hint');
return t;
},
@@ -31,7 +31,7 @@
*/
show : function (msg) {
this.active = true;
- const e = this._element;
+ const e = this._el;
e.textContent = msg;
e.style.display = 'block';
},
@@ -43,7 +43,7 @@
hide : function () {
if (!this.active)
return false;
- this._element.style.display = 'none';
+ this._el.style.display = 'none';
this.active = false;
return true;
},
@@ -53,7 +53,7 @@
* Get alert object.
*/
element : function () {
- return this._element;
+ return this._el;
}
}
});
diff --git a/dev/js/src/hint/input.js b/dev/js/src/hint/input.js
index d779776..cabaa84 100644
--- a/dev/js/src/hint/input.js
+++ b/dev/js/src/hint/input.js
@@ -19,7 +19,7 @@
// Initialize new input field
_init : function (element) {
- this._element = element;
+ this._el = element;
this._container = document.createElement("div");
this._container.setAttribute('id', 'hint');
@@ -38,7 +38,7 @@
// Update position of the mirror
const re = this.reposition.bind(this);
window.addEventListener('resize', re);
- this._element.addEventListener('onfocus', re);
+ this._el.addEventListener('onfocus', re);
this.reposition();
return this;
},
@@ -68,7 +68,7 @@
* hint helper is attached to.
*/
element : function () {
- return this._element;
+ return this._el;
},
@@ -77,7 +77,7 @@
* the hint helper is attached to.
*/
value : function () {
- return this._element.value;
+ return this._el.value;
},
@@ -93,7 +93,7 @@
* Reset the input value
*/
reset : function () {
- this._element.value = "";
+ this._el.value = "";
},
@@ -114,7 +114,7 @@
*/
insert : function (text) {
const splittedText = this._split();
- const s = this._element;
+ const s = this._el;
s.value = splittedText[0] + text + splittedText[1];
s.selectionStart = (splittedText[0] + text).length;
s.selectionEnd = s.selectionStart;
@@ -129,7 +129,7 @@
* Move hinthelper to given character position
*/
moveto : function (charpos) {
- const e = this._element;
+ const e = this._el;
e.selectionStart = charpos;
e.selectionEnd = charpos;
e.focus();
@@ -142,8 +142,8 @@
* below the input box.
*/
reposition : function () {
- const inputClientRect = this._element.getBoundingClientRect();
- const inputStyle = window.getComputedStyle(this._element, null);
+ const inputClientRect = this._el.getBoundingClientRect();
+ const inputStyle = window.getComputedStyle(this._el, null);
const bodyClientRect =
document.getElementsByTagName('body')[0].getBoundingClientRect();
@@ -187,7 +187,7 @@
* or at the current cursor position.
*/
_split : function (start) {
- const s = this._element;
+ const s = this._el;
const value = s.value;
// Get start from cursor position
diff --git a/dev/js/src/hint/item.js b/dev/js/src/hint/item.js
index 2fcecee..5c9a9a7 100644
--- a/dev/js/src/hint/item.js
+++ b/dev/js/src/hint/item.js
@@ -94,8 +94,8 @@
*/
element : function () {
// already defined
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
// Create list item
var li = document.createElement("li");
@@ -117,7 +117,7 @@
desc.addT(this._desc);
li.appendChild(desc);
};
- return this._element = li;
+ return this._el = li;
}
};
});
diff --git a/dev/js/src/hint/lengthField.js b/dev/js/src/hint/lengthField.js
index 79c7b7d..7cf8c19 100644
--- a/dev/js/src/hint/lengthField.js
+++ b/dev/js/src/hint/lengthField.js
@@ -15,12 +15,12 @@
* Override the prefix action.
*/
add : function (param) {
- this._element.addE('span').addT(param[0] + '--');
+ this._el.addE('span').addT(param[0] + '--');
- var desc = this._element.addE('span');
+ var desc = this._el.addE('span');
desc.classList.add("desc");
desc.addT(param[2] + '--');
- this._element.appendChild(desc);
+ this._el.appendChild(desc);
}
};
});
diff --git a/dev/js/src/hint/menu.js b/dev/js/src/hint/menu.js
index bf1a04b..b7e0d49 100644
--- a/dev/js/src/hint/menu.js
+++ b/dev/js/src/hint/menu.js
@@ -29,7 +29,7 @@
lengthFieldClass : lengthFieldClass
});
obj._context = context;
- obj._element.classList.add('hint');
+ obj._el.classList.add('hint');
obj._hint = hint;
// Make the top item always active
diff --git a/dev/js/src/hint/prefix.js b/dev/js/src/hint/prefix.js
index 197e36e..5a83284 100644
--- a/dev/js/src/hint/prefix.js
+++ b/dev/js/src/hint/prefix.js
@@ -15,9 +15,9 @@
* Override the prefix action.
*/
onclick : function () {
- var m = this.menu();
- var value = this.value();
- var h = m.hint();
+ const m = this.menu();
+ const value = this.value();
+ const h = m.hint();
m.hide();
h.inputField().insert(value);
diff --git a/dev/js/src/match.js b/dev/js/src/match.js
index 52dffce..df7db03 100644
--- a/dev/js/src/match.js
+++ b/dev/js/src/match.js
@@ -45,7 +45,7 @@
*/
_init : function (match) {
const t= this;
- t._element = null;
+ t._el = null;
t._initialized = false;
// No match defined
@@ -57,7 +57,7 @@
// Match defined as a node
else if (match instanceof Node) {
- t._element = match;
+ t._el = match;
// Circular reference !!
match["_match"] = t;
@@ -143,7 +143,7 @@
return t;
// Add actions unless it's already activated
- const element = t._element;
+ const element = t._el;
// There is an element to open
if (element === undefined || element === null)
@@ -159,9 +159,9 @@
// Create panel
t.panel = matchPanelClass.create(t);
- t._element.insertBefore(
+ t._el.insertBefore(
t.panel.element(),
- t._element.querySelector("p.ref")
+ t._el.querySelector("p.ref")
);
// Insert before reference line
@@ -180,7 +180,7 @@
open : function () {
// Add actions unless it's already activated
- const element = this._element;
+ const element = this._el;
// There is an element to open
if (element === undefined || element === null)
@@ -215,7 +215,7 @@
* Toggle match view
*/
toggle : function () {
- if (this._element.classList.contains('active'))
+ if (this._el.classList.contains('active'))
this.minimize();
else
this.open();
@@ -226,7 +226,7 @@
* Minimize info view
*/
minimize : function () {
- this._element.classList.remove('active');
+ this._el.classList.remove('active');
},
@@ -234,7 +234,7 @@
* Get match element.
*/
element : function () {
- return this._element; // May be null
+ return this._el; // May be null
}
};
});
diff --git a/dev/js/src/match/meta.js b/dev/js/src/match/meta.js
index 2df6a58..02dfa53 100644
--- a/dev/js/src/match/meta.js
+++ b/dev/js/src/match/meta.js
@@ -38,8 +38,8 @@
* Create match reference view.
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
if (this._fields === null)
return;
@@ -47,7 +47,7 @@
const metaDL = document.createElement('dl');
metaDL.classList.add("flex");
- this._element = metaDL;
+ this._el = metaDL;
const fields = this._fields;
@@ -110,9 +110,9 @@
});
// Add corpusByMatch assistant
- this._corpusByMatch = cbmClass.create(this._element);
+ this._corpusByMatch = cbmClass.create(this._el);
- return this._element;
+ return this._el;
}
};
});
diff --git a/dev/js/src/match/querycreator.js b/dev/js/src/match/querycreator.js
index b7d54fc..09d91b8 100644
--- a/dev/js/src/match/querycreator.js
+++ b/dev/js/src/match/querycreator.js
@@ -84,7 +84,7 @@
);
// Initialize element
- const e = t._element = document.createElement('p');
+ const e = t._el = document.createElement('p');
e.classList.add('query','fragment');
// Prepend info text
@@ -310,7 +310,7 @@
// Get element representing annotation line
element : function () {
- return this._element;
+ return this._el;
},
@@ -332,7 +332,7 @@
// Hide element
if (t._shown === true) {
- m.parentNode.removeChild(t._element);
+ m.parentNode.removeChild(t._el);
t._shown = false;
}
}
@@ -344,7 +344,7 @@
// Insert after
m.parentNode.insertBefore(
- t._element, m.nextSibling
+ t._el, m.nextSibling
);
t._shown = true;
};
diff --git a/dev/js/src/match/table.js b/dev/js/src/match/table.js
index 9481728..d41fc7b 100644
--- a/dev/js/src/match/table.js
+++ b/dev/js/src/match/table.js
@@ -199,15 +199,15 @@
* Get HTML table view of annotations.
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
// First the legend table
const wrap = d.createElement('div');
const table = wrap.addE('table');
- this._element = wrap;
+ this._el = wrap;
// Single row in head
let tr = table.addE('thead').addE('tr');
@@ -318,9 +318,9 @@
}, this);
// Add query creator
- this._matchCreator = matchQueryCreator.create(this._element);
+ this._matchCreator = matchQueryCreator.create(this._el);
- return this._element;
+ return this._el;
},
};
});
diff --git a/dev/js/src/match/treearc.js b/dev/js/src/match/treearc.js
index 117936c..a90fbed 100644
--- a/dev/js/src/match/treearc.js
+++ b/dev/js/src/match/treearc.js
@@ -441,8 +441,8 @@
* Get the svg element
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
// Create svg
const svg = this._c("svg");
@@ -468,8 +468,8 @@
arrow.setAttribute("d", "M 0,-5 0,5 10,0 Z");
marker.appendChild(arrow);
- this._element = svg;
- return this._element;
+ this._el = svg;
+ return this._el;
},
@@ -643,12 +643,12 @@
* This is identical to treehierarchy
*/
center : function () {
- if (this._element === undefined)
+ if (this._el === undefined)
return;
- const treeDiv = this._element.parentNode;
+ const treeDiv = this._el.parentNode;
- const cWidth = parseFloat(window.getComputedStyle(this._element).width);
+ const cWidth = parseFloat(window.getComputedStyle(this._el).width);
const treeWidth = parseFloat(window.getComputedStyle(treeDiv).width);
// Reposition:
if (cWidth > treeWidth) {
@@ -661,7 +661,7 @@
// Show the element
show : function () {
const t = this;
- const svg = this._element;
+ const svg = this._el;
const height = this.maxArc;
// Delete old group
diff --git a/dev/js/src/match/treehierarchy.js b/dev/js/src/match/treehierarchy.js
index 5273089..a52c883 100644
--- a/dev/js/src/match/treehierarchy.js
+++ b/dev/js/src/match/treehierarchy.js
@@ -186,11 +186,11 @@
* This is identical to relations
*/
center : function () {
- if (this._element === undefined)
+ if (this._el === undefined)
return;
- const treeDiv = this._element.parentNode;
- const cWidth = parseFloat(window.getComputedStyle(this._element).width);
+ const treeDiv = this._el.parentNode;
+ const cWidth = parseFloat(window.getComputedStyle(this._el).width);
const treeWidth = parseFloat(window.getComputedStyle(treeDiv).width);
// Reposition:
@@ -231,14 +231,14 @@
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
const g = this._graph;
dagre.layout(g);
const canvas = this._c('svg');
- this._element = canvas;
+ this._el = canvas;
canvas.appendChild(this._c('defs'));
@@ -338,7 +338,7 @@
canvas.setAttribute('width', g.graph().width);
canvas.setAttribute('height', height);
- return this._element;
+ return this._el;
},
downloadLink : function () {
diff --git a/dev/js/src/menu.js b/dev/js/src/menu.js
index 9d3c44e..c139ba7 100644
--- a/dev/js/src/menu.js
+++ b/dev/js/src/menu.js
@@ -123,7 +123,7 @@
);
- t._element = el;
+ t._el = el;
t._limit = menuLimit;
@@ -261,8 +261,8 @@
const t = this;
// Remove circular reference to "this" in menu
- if (t._element != undefined)
- delete t._element["menu"];
+ if (t._el != undefined)
+ delete t._el["menu"];
// Remove circular reference to "this" in items
t._items.forEach(function(i) {
@@ -280,7 +280,7 @@
* Focus on this menu.
*/
focus : function () {
- this._element.focus();
+ this._el.focus();
},
@@ -440,7 +440,7 @@
* Get the associated dom element.
*/
element : function () {
- return this._element;
+ return this._el;
},
@@ -502,7 +502,7 @@
t._prefix.active(true);
// finally show the element
- t._element.classList.add('visible');
+ t._el.classList.add('visible');
return true;
};
@@ -554,7 +554,7 @@
t._prefix.active(false);
// finally show the element
- t._element.classList.add('visible');
+ t._el.classList.add('visible');
// Add classes for rolling menus
t._boundary(true);
@@ -571,9 +571,9 @@
this.removeItems();
this._prefix.clear();
this.onHide();
- this._element.classList.remove('visible');
+ this._el.classList.remove('visible');
}
- // this._element.blur();
+ // this._el.blur();
},
@@ -618,11 +618,11 @@
*/
removeItems : function () {
// Remove all children
- const children = this._element.childNodes;
+ const children = this._el.childNodes;
// Leave the prefix and lengthField
for (let i = children.length - 1; i >= 3; i--) {
- this._element.removeChild(
+ this._el.removeChild(
children[i]
);
};
@@ -874,7 +874,7 @@
// Remove the HTML node from the first item
// leave lengthField/prefix/slider
- t._element.removeChild(t._element.children[3]);
+ t._el.removeChild(t._el.children[3]);
t._append(
t._list[t.offset + t.limit() - 1]
@@ -886,7 +886,7 @@
t.offset = off;
// Remove the HTML node from the last item
- t._element.removeChild(t._element.lastChild);
+ t._el.removeChild(t._el.lastChild);
t._prepend(t._list[t.offset]);
}
diff --git a/dev/js/src/menu/item.js b/dev/js/src/menu/item.js
index 7ce7455..e369918 100644
--- a/dev/js/src/menu/item.js
+++ b/dev/js/src/menu/item.js
@@ -105,8 +105,8 @@
*/
element : function () {
// already defined
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
// Create list item
const li = document.createElement("li");
@@ -119,7 +119,7 @@
// Append template
li.appendChild(this.content());
- return this._element = li;
+ return this._el = li;
},
/**
diff --git a/dev/js/src/menu/lengthField.js b/dev/js/src/menu/lengthField.js
index 8a6641d..eed90b7 100644
--- a/dev/js/src/menu/lengthField.js
+++ b/dev/js/src/menu/lengthField.js
@@ -12,8 +12,8 @@
// Initialize lengthField object
_init : function () {
- this._element = document.createElement('div');
- this._element.classList.add('lengthField');
+ this._el = document.createElement('div');
+ this._el.classList.add('lengthField');
return this;
},
@@ -36,7 +36,7 @@
* Get the associated dom element.
*/
element : function () {
- return this._element;
+ return this._el;
},
@@ -44,7 +44,7 @@
* Add string to lengthField.
*/
add : function (param) {
- this._element.appendChild(document.createElement('span'))
+ this._el.appendChild(document.createElement('span'))
.appendChild(document.createTextNode(param[0] + '--'));
},
@@ -53,8 +53,8 @@
* Remove all initialized values
*/
reset : function () {
- while (this._element.firstChild) {
- this._element.firstChild.remove();
+ while (this._el.firstChild) {
+ this._el.firstChild.remove();
};
}
});
diff --git a/dev/js/src/menu/prefix.js b/dev/js/src/menu/prefix.js
index e513e85..3930e45 100644
--- a/dev/js/src/menu/prefix.js
+++ b/dev/js/src/menu/prefix.js
@@ -17,19 +17,19 @@
t._string = '';
// Add prefix span
- t._element = document.createElement('span');
- t._element.classList.add('pref');
+ t._el = document.createElement('span');
+ t._el.classList.add('pref');
// Connect action
if (t["onclick"] !== undefined)
- t._element["onclick"] = t.onclick.bind(t);
+ t._el["onclick"] = t.onclick.bind(t);
return t;
},
_update : function () {
- return this._element.innerHTML
+ return this._el.innerHTML
= this._string;
},
@@ -132,7 +132,7 @@
* Get the associated dom element.
*/
element : function () {
- return this._element;
+ return this._el;
},
diff --git a/dev/js/src/menu/slider.js b/dev/js/src/menu/slider.js
index 5897da2..dcc6fc5 100644
--- a/dev/js/src/menu/slider.js
+++ b/dev/js/src/menu/slider.js
@@ -60,12 +60,12 @@
if (arguments.length === 1) {
if (bool) {
if (!this._active) {
- this._element.classList.add('active');
+ this._el.classList.add('active');
this._active = true;
};
}
else if (this._active) {
- this._element.classList.remove('active');
+ this._el.classList.remove('active');
this._active = false;
}
};
@@ -140,7 +140,7 @@
* Get the associated dom element.
*/
element : function () {
- return this._element;
+ return this._el;
},
@@ -151,7 +151,7 @@
reInit : function () {
const t = this;
- const s = t._element.style;
+ const s = t._el.style;
// Do not show the slider, in case there is nothing to scroll
if (t._length <= t._limit) {
@@ -179,7 +179,7 @@
t._event = {};
t._active = false;
- const el = t._element = document.createElement('div');
+ const el = t._el = document.createElement('div');
el.setAttribute('class', 'ruler');
t._slider = el.appendChild(
@@ -204,7 +204,7 @@
// Reinit height based on dom position
_initClientHeight : function () {
- this._rulerHeight = this._element.clientHeight;
+ this._rulerHeight = this._el.clientHeight;
this._sliderHeight = this._slider.clientHeight;
},
diff --git a/dev/js/src/panel.js b/dev/js/src/panel.js
index 246a861..bfc95c5 100644
--- a/dev/js/src/panel.js
+++ b/dev/js/src/panel.js
@@ -47,8 +47,8 @@
* The element of the panel
*/
element : function () {
- if (this._element)
- return this._element;
+ if (this._el)
+ return this._el;
// Create panel element
const e = document.createElement('div');
@@ -66,8 +66,7 @@
if (!aElem.parentNode)
e.appendChild(aElem);
- this._element = e;
- return e;
+ return this._el = e;
},
diff --git a/dev/js/src/plugin/server.js b/dev/js/src/plugin/server.js
index 19f8c5f..bc4eaaa 100644
--- a/dev/js/src/plugin/server.js
+++ b/dev/js/src/plugin/server.js
@@ -544,11 +544,11 @@
* Return the service element.
*/
element : function () {
- if (!this._element) {
- this._element = document.createElement('div');
- this._element.setAttribute("id", "services");
+ if (!this._el) {
+ this._el = document.createElement('div');
+ this._el.setAttribute("id", "services");
}
- return this._element;
+ return this._el;
},
// Destructor, just for testing scenarios
@@ -565,12 +565,12 @@
b => buttonsSingle[b] = []
);
- if (this._element) {
- let e = this._element;
+ if (this._el) {
+ let e = this._el;
if (e.parentNode) {
e.parentNode.removeChild(e);
};
- this._element = null;
+ this._el = null;
};
this._removeListener();
diff --git a/dev/js/src/plugin/widget.js b/dev/js/src/plugin/widget.js
index 5f8ca9a..48cc393 100644
--- a/dev/js/src/plugin/widget.js
+++ b/dev/js/src/plugin/widget.js
@@ -32,8 +32,8 @@
show : function () {
if (this._load) {
- if (this._element)
- this._element.classList.add('show');
+ if (this._el)
+ this._el.classList.add('show');
return this._load;
}
diff --git a/dev/js/src/tutorial.js b/dev/js/src/tutorial.js
index ee311dd..7963385 100644
--- a/dev/js/src/tutorial.js
+++ b/dev/js/src/tutorial.js
@@ -61,7 +61,7 @@
d.getElementsByTagName('body')[0].appendChild(div);
t._iframe = null;
- t._element = div;
+ t._el = div;
// Some fields
t._ql = d.getElementById("ql-field");
@@ -137,7 +137,7 @@
*/
show : function () {
const t = this;
- const element = t._element;
+ const element = t._el;
if (element.style.display === 'block')
return;
@@ -181,7 +181,7 @@
* Close tutorial window.
*/
hide : function () {
- this._element.style.display = 'none';
+ this._el.style.display = 'none';
},
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 7bf0d34..2c068ee 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -313,13 +313,13 @@
*/
element : function() {
const t = this;
- let e = t._element;
+ let e = t._el;
if (e !== undefined)
return e;
- e = t._element = document.createElement('div');
+ e = t._el = document.createElement('div');
e.classList.add('vc');
@@ -343,7 +343,7 @@
t.addVcInfPanel();
//Adds EventListener for corpus changes
- t._element.addEventListener('vcChange', function (e) {
+ t._el.addEventListener('vcChange', function (e) {
this.checkStatActive(e.detail);
}.bind(t), false);
@@ -355,9 +355,9 @@
* Check, if the VC is open
*/
isOpen : function () {
- if (!this._element)
+ if (!this._el)
return false;
- return this._element.classList.contains('active');
+ return this._el.classList.contains('active');
},
@@ -506,7 +506,7 @@
addVcInfPanel : function () {
// Create panel
this.panel = vcPanelClass.create(this);
- this._element.addE('div').appendChild(this.panel.element());
+ this._el.addE('div').appendChild(this.panel.element());
},
diff --git a/dev/js/src/vc/chooseitem.js b/dev/js/src/vc/chooseitem.js
index 039764c..5032895 100644
--- a/dev/js/src/vc/chooseitem.js
+++ b/dev/js/src/vc/chooseitem.js
@@ -82,8 +82,8 @@
const t = this;
// already defined
- if (t._element !== undefined)
- return t._element;
+ if (t._el !== undefined)
+ return t._el;
// Create list item
const li = document.createElement("li");
@@ -94,7 +94,7 @@
li["onclick"] = t.onclick.bind(t);
li.addT(t._name);
- return t._element = li;
+ return t._el = li;
}
}
});
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index fd4c318..37b0e0b 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -63,11 +63,11 @@
update : function () {
const t = this;
- if (t._element === undefined)
+ if (t._el === undefined)
return t.element();
// Get element
- const e = t._element;
+ const e = t._el;
// Check if there is a change in the underlying data
if (!t.__changed)
@@ -167,13 +167,13 @@
*/
element : function () {
const t = this;
- if (t._element !== undefined)
- return t._element;
+ if (t._el !== undefined)
+ return t._el;
- t._element = document.createElement('div');
- t._element.setAttribute('class', 'doc');
+ t._el = document.createElement('div');
+ t._el.setAttribute('class', 'doc');
t.update();
- return t._element;
+ return t._el;
},
@@ -394,7 +394,7 @@
const menu = KorAP._vcKeyMenu;
// Insert menu
- this._element.insertBefore(
+ this._el.insertBefore(
menu.element(),
this._keyE
);
@@ -476,7 +476,7 @@
};
// Insert menu
- this._element.insertBefore(
+ this._el.insertBefore(
menu.element(),
this._matchopE
);
@@ -545,12 +545,12 @@
};
// Remove datepicker
- that._element.removeChild(
+ that._el.removeChild(
dp.element()
);
});
- this._element.insertBefore(
+ this._el.insertBefore(
dp.show(), // Get element of the date picker
this._valueE
);
@@ -570,14 +570,14 @@
else
that.type('string');
- that._element.removeChild(
- this._element
+ that._el.removeChild(
+ this._el
);
that.update();
};
// Insert element
- this._element.insertBefore(
+ this._el.insertBefore(
strElem,
this._valueE
);
@@ -616,10 +616,10 @@
delete this["_rewrites"];
- if (this._element === undefined)
+ if (this._el === undefined)
return;
- this._element.classList.remove("rewritten");
+ this._el.classList.remove("rewritten");
},
diff --git a/dev/js/src/vc/docgroup.js b/dev/js/src/vc/docgroup.js
index 1dbd5d7..6ea5e8b 100644
--- a/dev/js/src/vc/docgroup.js
+++ b/dev/js/src/vc/docgroup.js
@@ -196,10 +196,10 @@
};
};
- if (t._element === undefined)
+ if (t._el === undefined)
return t;
- const group = t._element;
+ const group = t._el;
group.setAttribute('data-operation', t.operation());
_removeChildren(group);
@@ -231,10 +231,10 @@
element : function () {
const t = this;
- if (t._element !== undefined)
- return t._element;
+ if (t._el !== undefined)
+ return t._el;
- const e = t._element = document.createElement('div');
+ const e = t._el = document.createElement('div');
e.setAttribute('class', 'docGroup');
// Update the object - including optimization
diff --git a/dev/js/src/vc/docgroupref.js b/dev/js/src/vc/docgroupref.js
index 9f1401a..5a9196b 100644
--- a/dev/js/src/vc/docgroupref.js
+++ b/dev/js/src/vc/docgroupref.js
@@ -49,10 +49,10 @@
update : function () {
const t = this;
- if (t._element === undefined)
+ if (t._el === undefined)
return t.element();
- const e = t._element;
+ const e = t._el;
// Check if there is a change in the underlying data
if (!t.__changed)
@@ -126,10 +126,10 @@
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
- const e = this._element = document.createElement('div');
+ const e = this._el = document.createElement('div');
e.setAttribute('class', 'doc groupref');
this.update();
return e;
@@ -158,14 +158,14 @@
str.store = function (ref, regex) {
that.ref(ref);
- that._element.removeChild(
- this._element
+ that._el.removeChild(
+ this._el
);
that.update();
};
// Insert element
- this._element.insertBefore(
+ this._el.insertBefore(
strElem,
this._refE
);
@@ -256,10 +256,10 @@
delete this["_rewrites"];
- if (this._element === undefined)
+ if (this._el === undefined)
return;
- this._element.classList.remove("rewritten");
+ this._el.classList.remove("rewritten");
},
diff --git a/dev/js/src/vc/fragment.js b/dev/js/src/vc/fragment.js
index 0f155ff..72bd80e 100644
--- a/dev/js/src/vc/fragment.js
+++ b/dev/js/src/vc/fragment.js
@@ -89,12 +89,12 @@
* Get the element associated with the virtual corpus
*/
element : function () {
- if (this._element !== undefined) {
- return this._element;
+ if (this._el !== undefined) {
+ return this._el;
};
// Initialize element
- const e = this._element = document.createElement('div');
+ const e = this._el = document.createElement('div');
e.classList.add('vc', 'fragment');
// Prepend info text
diff --git a/dev/js/src/vc/item.js b/dev/js/src/vc/item.js
index 59589d8..bf394b8 100644
--- a/dev/js/src/vc/item.js
+++ b/dev/js/src/vc/item.js
@@ -86,8 +86,8 @@
const t = this;
// already defined
- if (t._element !== undefined)
- return t._element;
+ if (t._el !== undefined)
+ return t._el;
// Create list item
var li = document.createElement("li");
@@ -100,7 +100,7 @@
li["onclick"] = t.onclick.bind(t);
li.addT(t._name);
- return t._element = li;
+ return t._el = li;
}
};
});
diff --git a/dev/js/src/vc/jsonld.js b/dev/js/src/vc/jsonld.js
index fdee980..06be1e0 100644
--- a/dev/js/src/vc/jsonld.js
+++ b/dev/js/src/vc/jsonld.js
@@ -49,14 +49,14 @@
const t = this;
if (t._ops != undefined) {
t._ops._parent = undefined;
- if (t._ops._element !== undefined) {
- t._ops._element.refTo = undefined;
+ if (t._ops._el !== undefined) {
+ t._ops._el.refTo = undefined;
};
t._ops = undefined;
};
- if (t._element !== undefined)
- t._element = undefined;
+ if (t._el !== undefined)
+ t._el = undefined;
// In case of a group, destroy all operands
if (t._operands !== undefined) {
diff --git a/dev/js/src/vc/rewritelist.js b/dev/js/src/vc/rewritelist.js
index 410c975..1d4d881 100644
--- a/dev/js/src/vc/rewritelist.js
+++ b/dev/js/src/vc/rewritelist.js
@@ -36,10 +36,10 @@
* Get element.
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
- const e = this._element = document.createElement('div');
+ const e = this._el = document.createElement('div');
e.setAttribute('class', 'rewrite');
const comments = [];
@@ -65,7 +65,7 @@
comments.push(rewriteText + ' (' + rewrite.operation() + ')');
- this._element.appendChild(span);
+ this._el.appendChild(span);
}, this);
e.setAttribute("title", comments.join("\n"))
diff --git a/dev/js/src/vc/statistic.js b/dev/js/src/vc/statistic.js
index 4dd5ab3..0fda3ba 100644
--- a/dev/js/src/vc/statistic.js
+++ b/dev/js/src/vc/statistic.js
@@ -38,9 +38,9 @@
*/
element : function () {
- // if this._element already exists return without doing something
- if (this._element !== undefined) {
- return this._element;
+ // if this._el already exists return without doing something
+ if (this._el !== undefined) {
+ return this._el;
}
// create HTML Description List Element
@@ -59,8 +59,8 @@
statDD.addT(new Number(statistic[k]).toLocaleString());
});
- this._element = statDL;
- return this._element;
+ this._el = statDL;
+ return this._el;
}
}
diff --git a/dev/js/src/vc/stringval.js b/dev/js/src/vc/stringval.js
index 0705033..54f92ec 100644
--- a/dev/js/src/vc/stringval.js
+++ b/dev/js/src/vc/stringval.js
@@ -93,12 +93,12 @@
// Update dom element
_update : function () {
- if (this._element === undefined)
+ if (this._el === undefined)
return;
this._value = this._input.value;
- const cl = this._element.classList;
+ const cl = this._el.classList;
if (this._regexOp() && this._regex) {
cl.add('regex');
@@ -121,7 +121,7 @@
* Put focus on element
*/
focus : function () {
- this._element.children[0].focus();
+ this._el.children[0].focus();
},
@@ -129,11 +129,11 @@
* Get the associated dom element.
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
// Create element
- const e = this._element = document.createElement('div');
+ const e = this._el = document.createElement('div');
e.setAttribute('tabindex', 0);
e.style.outline = 0;
diff --git a/dev/js/src/vc/unspecified.js b/dev/js/src/vc/unspecified.js
index fe089a3..5bda78c 100644
--- a/dev/js/src/vc/unspecified.js
+++ b/dev/js/src/vc/unspecified.js
@@ -78,11 +78,11 @@
update : function () {
const t = this;
- if (t._element === undefined)
+ if (t._el === undefined)
return t.element();
// Remove element content
- _removeChildren(t._element);
+ _removeChildren(t._el);
const ellipsis = document.createElement('span');
ellipsis.addT(loc.EMPTY);
@@ -90,16 +90,16 @@
// Click on empty criterion
ellipsis.addEventListener('click', t.onclick.bind(t));
- t._element.appendChild(ellipsis);
+ t._el.appendChild(ellipsis);
// Set ref - TODO: Cleanup!
- t._element.refTo = t;
+ t._el.refTo = t;
// Set operators
if (t._parent !== undefined &&
t.parent().ldType() !== null) {
- t._element.appendChild(
+ t._el.appendChild(
t.operators(
false,
false,
@@ -117,12 +117,12 @@
*/
element : function () {
const t = this;
- if (t._element !== undefined)
- return t._element;
- t._element = document.createElement('div');
- t._element.setAttribute('class', 'doc unspecified');
+ if (t._el !== undefined)
+ return t._el;
+ t._el = document.createElement('div');
+ t._el.setAttribute('class', 'doc unspecified');
t.update();
- return t._element;
+ return t._el;
},
@@ -140,9 +140,9 @@
const menu = KorAP._vcKeyMenu;
// Add key menu element at the correct position
- this._element.insertBefore(
+ this._el.insertBefore(
menu.element(),
- this._element.firstChild
+ this._el.firstChild
);
const that = this;
diff --git a/dev/js/src/view.js b/dev/js/src/view.js
index 77f8d60..a8a79cb 100644
--- a/dev/js/src/view.js
+++ b/dev/js/src/view.js
@@ -43,9 +43,9 @@
* Element of the view
*/
element : function () {
- if (this._element) {
- this._element.classList.add('show');
- return this._element;
+ if (this._el) {
+ this._el.classList.add('show');
+ return this._el;
};
// Create panel element
@@ -70,7 +70,7 @@
e.appendChild(this.actions.element());
- return this._element = e;
+ return this._el = e;
},
@@ -86,8 +86,8 @@
* Hide the widget if shown.
*/
minimize : function () {
- if (this._element) {
- this._element.classList.remove("show");
+ if (this._el) {
+ this._el.classList.remove("show");
}
},