You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by br...@apache.org on 2019/07/16 20:51:54 UTC
[jspwiki] branch master updated: Missing JS closing brackets on js
library.
This is an automated email from the ASF dual-hosted git repository.
brushed pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
The following commit(s) were added to refs/heads/master by this push:
new 40da7e2 Missing JS closing brackets on js library.
40da7e2 is described below
commit 40da7e2607a4ba2454973b78de7781858351ba56
Author: brushed <di...@gmail.com>
AuthorDate: Tue Jul 16 22:51:41 2019 +0200
Missing JS closing brackets on js library.
---
jspwiki-war/src/main/scripts/behaviors/Collapsible.js | 8 ++++----
jspwiki-war/src/main/scripts/behaviors/Columns.js | 2 +-
jspwiki-war/src/main/scripts/behaviors/CommentBox.js | 2 +-
jspwiki-war/src/main/scripts/lib/mootools-more-1.6.0.js | 3 +++
jspwiki-war/src/main/scripts/util/extend-function.js | 6 +++++-
5 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/jspwiki-war/src/main/scripts/behaviors/Collapsible.js b/jspwiki-war/src/main/scripts/behaviors/Collapsible.js
index 4312ec1..49712dc 100644
--- a/jspwiki-war/src/main/scripts/behaviors/Collapsible.js
+++ b/jspwiki-war/src/main/scripts/behaviors/Collapsible.js
@@ -109,7 +109,7 @@ Usage:
collapseBody = ("div." + _CollapseBodyClass).slick();
while ((next = header.nextSibling)) { collapseBody.appendChild(next); }
- if(collapseBody.textContent.trim() == '') return el
+ if (collapseBody.textContent.trim() == '') return el;
el.appendChild(collapseBody); //append after the header
@@ -148,7 +148,7 @@ Usage:
if (this.flags[index]) { isCollapsed = (this.flags[index] == 'T'); }
this.flags[index] = isCollapsed ? "T" : "F";
- //put the label with open/close triangle
+ //put the label with open/close collapse icon (in css)
//$.create( _CollapseButton, {id:id, disabled:!collapseBody, start:el});
button = _CollapseButton.slick({ id: id });
button.disabled = !collapseBody;
@@ -220,7 +220,7 @@ Usage:
isExpanded = !collapseBody.style.height; //height = null(expanded) || 0px (collapsed)
- function animateHeight(animate2steps, collapseMe){
+ function animateHeight(animate2steps, collapseMe) {
requestAnimationFrame(function () {
@@ -262,7 +262,7 @@ Usage:
}
setAriaExpanded(button, !isExpanded);
- this.flags[ button.id.split("-")[1] ] = isExpanded ? "T" : "F"; //new state: collapsed=="T"
+ this.flags[button.id.split("-")[1]] = isExpanded ? "T" : "F"; //new state: collapsed=="T"
if (this.pims) {
$.cookie(this.pims, this.flags.join(""));
diff --git a/jspwiki-war/src/main/scripts/behaviors/Columns.js b/jspwiki-war/src/main/scripts/behaviors/Columns.js
index 3f6e8cf..0573306 100644
--- a/jspwiki-war/src/main/scripts/behaviors/Columns.js
+++ b/jspwiki-war/src/main/scripts/behaviors/Columns.js
@@ -49,7 +49,7 @@ function Columns(element, options) {
width = 100 / columnCount + "%";
//add one extra group-start-element at the top
- element.insertBefore("hr".slick(), element.firstChild)
+ element.insertBefore("hr".slick(), element.firstChild);
$.wrapChildren(element, "hr", "div.col", function (column) {
diff --git a/jspwiki-war/src/main/scripts/behaviors/CommentBox.js b/jspwiki-war/src/main/scripts/behaviors/CommentBox.js
index a9ebf88..6b4ef71 100644
--- a/jspwiki-war/src/main/scripts/behaviors/CommentBox.js
+++ b/jspwiki-war/src/main/scripts/behaviors/CommentBox.js
@@ -39,7 +39,7 @@ DOM structure
*/
function CommentBox(element, options){
- var header = element.getFirst(),
+ var header = element.firstElementChild,
caption = options.prefix.sliceArgs(element)[0],
panelCSS = "panel".fetchContext(element);
diff --git a/jspwiki-war/src/main/scripts/lib/mootools-more-1.6.0.js b/jspwiki-war/src/main/scripts/lib/mootools-more-1.6.0.js
index 1f44ba5..c3fd46e 100644
--- a/jspwiki-war/src/main/scripts/lib/mootools-more-1.6.0.js
+++ b/jspwiki-war/src/main/scripts/lib/mootools-more-1.6.0.js
@@ -1044,3 +1044,6 @@ Swiff.remote = function(obj, fn){
var rs = obj.CallFunction('<invoke name="' + fn + '" returntype="javascript">' + __flash__argumentsToXML(arguments, 2) + '</invoke>');
return eval(rs);
};
+
+
+})();
diff --git a/jspwiki-war/src/main/scripts/util/extend-function.js b/jspwiki-war/src/main/scripts/util/extend-function.js
index b87940b..6051f25 100644
--- a/jspwiki-war/src/main/scripts/util/extend-function.js
+++ b/jspwiki-war/src/main/scripts/util/extend-function.js
@@ -29,5 +29,9 @@ $.toFunction
If the passed argument is a function, it will return that function itself.
Otherwise, it will return a function that returns the passed argument.
*/
-$.toFunction = function(o){ return o instanceof Function ? o : function(){ return o; }; }
+$.toFunction = function(o){
+
+ return o instanceof Function ? o : function(){ return o; };
+
+}