mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
fixed unterminated JS statements + whitespace
This commit is contained in:
parent
7de44c66d3
commit
f7af9f2e4a
3 changed files with 17 additions and 17 deletions
6
blocks/community/yui/comments/comments.js
vendored
6
blocks/community/yui/comments/comments.js
vendored
|
@ -4,7 +4,7 @@ YUI.add('moodle-block_community-comments', function(Y) {
|
||||||
|
|
||||||
var COMMENTS = function() {
|
var COMMENTS = function() {
|
||||||
COMMENTS.superclass.constructor.apply(this, arguments);
|
COMMENTS.superclass.constructor.apply(this, arguments);
|
||||||
}
|
};
|
||||||
|
|
||||||
Y.extend(COMMENTS, Y.Base, {
|
Y.extend(COMMENTS, Y.Base, {
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ YUI.add('moodle-block_community-comments', function(Y) {
|
||||||
|
|
||||||
//attach a show event on the div with id = comments
|
//attach a show event on the div with id = comments
|
||||||
for (var i=0;i<this.get('commentids').length;i++)
|
for (var i=0;i<this.get('commentids').length;i++)
|
||||||
{
|
{
|
||||||
var commentid = this.get('commentids')[i];
|
var commentid = this.get('commentids')[i];
|
||||||
this.overlays[commentid] = new M.core.dialogue({
|
this.overlays[commentid] = new M.core.dialogue({
|
||||||
headerContent:Y.one('#commentoverlay-'+commentid+' .commenttitle').get('innerHTML'),
|
headerContent:Y.one('#commentoverlay-'+commentid+' .commenttitle').get('innerHTML'),
|
||||||
|
@ -76,7 +76,7 @@ YUI.add('moodle-block_community-comments', function(Y) {
|
||||||
//Note: it would work without but create js warning everytime
|
//Note: it would work without but create js warning everytime
|
||||||
//we click on the body
|
//we click on the body
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -42,7 +42,7 @@ M.block_navigation = M.block_navigation || {
|
||||||
/**
|
/**
|
||||||
* This function gets called when the module is first loaded as required by
|
* This function gets called when the module is first loaded as required by
|
||||||
* the YUI.add statement at the bottom of the page.
|
* the YUI.add statement at the bottom of the page.
|
||||||
*
|
*
|
||||||
* NOTE: This will only be executed ONCE
|
* NOTE: This will only be executed ONCE
|
||||||
* @function
|
* @function
|
||||||
*/
|
*/
|
||||||
|
@ -85,7 +85,7 @@ M.block_navigation.classes.tree = function(Y, id, properties) {
|
||||||
this.position = 'block';
|
this.position = 'block';
|
||||||
this.skipsetposition = false;
|
this.skipsetposition = false;
|
||||||
this.candock = false;
|
this.candock = false;
|
||||||
|
|
||||||
if (properties.expansions) {
|
if (properties.expansions) {
|
||||||
this.expansions = properties.expansions;
|
this.expansions = properties.expansions;
|
||||||
}
|
}
|
||||||
|
@ -97,12 +97,12 @@ M.block_navigation.classes.tree = function(Y, id, properties) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var node = this.Y.one('#inst'+this.id);
|
var node = this.Y.one('#inst'+this.id);
|
||||||
|
|
||||||
// Can't find the block instance within the page
|
// Can't find the block instance within the page
|
||||||
if (node === null) {
|
if (node === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attach event to toggle expansion
|
// Attach event to toggle expansion
|
||||||
node.all('.tree_item.branch').on('click', this.toggleexpansion , this);
|
node.all('.tree_item.branch').on('click', this.toggleexpansion , this);
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ M.block_navigation.classes.tree = function(Y, id, properties) {
|
||||||
if (this.candock) {
|
if (this.candock) {
|
||||||
this.init(Y, node);
|
this.init(Y, node);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads a branch via AJAX
|
* Loads a branch via AJAX
|
||||||
|
@ -158,7 +158,7 @@ M.block_navigation.classes.tree.prototype.init_load_ajax = function(e, branch) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes an branch provided through ajax and loads it into the tree
|
* Takes an branch provided through ajax and loads it into the tree
|
||||||
|
@ -182,7 +182,7 @@ M.block_navigation.classes.tree.prototype.load_ajax = function(tid, outcome, arg
|
||||||
// The branch is empty so class it accordingly
|
// The branch is empty so class it accordingly
|
||||||
args.target.replaceClass('branch', 'emptybranch');
|
args.target.replaceClass('branch', 'emptybranch');
|
||||||
return true;
|
return true;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a branch into the tree provided with some XML
|
* Adds a branch into the tree provided with some XML
|
||||||
|
@ -227,7 +227,7 @@ M.block_navigation.classes.tree.prototype.add_branch = function(branchobj, targe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
};
|
||||||
/**
|
/**
|
||||||
* Toggle a branch as expanded or collapsed
|
* Toggle a branch as expanded or collapsed
|
||||||
* @param {Event} e
|
* @param {Event} e
|
||||||
|
@ -254,7 +254,7 @@ M.block_navigation.classes.tree.prototype.toggleexpansion = function(e) {
|
||||||
if (this.candock) {
|
if (this.candock) {
|
||||||
M.core_dock.resize();
|
M.core_dock.resize();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents a branch for a tree
|
* This class represents a branch for a tree
|
||||||
|
@ -282,7 +282,7 @@ M.block_navigation.classes.branch = function(tree, obj) {
|
||||||
// Construct from the provided xml
|
// Construct from the provided xml
|
||||||
this.construct_from_json(obj);
|
this.construct_from_json(obj);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
/**
|
/**
|
||||||
* Populates this branch from a JSON object
|
* Populates this branch from a JSON object
|
||||||
* @param {object} obj
|
* @param {object} obj
|
||||||
|
@ -301,7 +301,7 @@ M.block_navigation.classes.branch.prototype.construct_from_json = function(obj)
|
||||||
M.block_navigation.expandablebranchcount++;
|
M.block_navigation.expandablebranchcount++;
|
||||||
this.id = 'expandable_branch_'+M.block_navigation.expandablebranchcount;
|
this.id = 'expandable_branch_'+M.block_navigation.expandablebranchcount;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
/**
|
/**
|
||||||
* Injects a branch into the tree at the given location
|
* Injects a branch into the tree at the given location
|
||||||
* @param {element} element
|
* @param {element} element
|
||||||
|
@ -349,7 +349,7 @@ M.block_navigation.classes.branch.prototype.inject_into_dom = function(element)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.link === null) {
|
if (this.link === null) {
|
||||||
if (branchicon) {
|
if (branchicon) {
|
||||||
branchp.appendChild(branchicon);
|
branchp.appendChild(branchicon);
|
||||||
|
@ -377,7 +377,7 @@ M.block_navigation.classes.branch.prototype.inject_into_dom = function(element)
|
||||||
element.appendChild(branchli);
|
element.appendChild(branchli);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Causes the navigation block module to initalise the first time the module
|
* Causes the navigation block module to initalise the first time the module
|
||||||
|
|
|
@ -38,4 +38,4 @@ M.block_private_files.init_tree = function(Y, expand_all, htmlid) {
|
||||||
|
|
||||||
tree.render();
|
tree.render();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue