mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-40142 navigation: fixed chainable issue with navigation JS
This commit is contained in:
parent
f192883305
commit
8a7d747581
4 changed files with 16 additions and 4 deletions
|
@ -391,11 +391,15 @@ BRANCH.prototype = {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Attaches required events to the branch structure.
|
* Attaches required events to the branch structure.
|
||||||
|
*
|
||||||
|
* @chainable
|
||||||
|
* @method wire
|
||||||
|
* @return {BRANCH} This function is chainable, it always returns itself.
|
||||||
*/
|
*/
|
||||||
wire : function() {
|
wire : function() {
|
||||||
this.node = this.node || Y.one('#'+this.get('id'));
|
this.node = this.node || Y.one('#'+this.get('id'));
|
||||||
if (!this.node) {
|
if (!this.node) {
|
||||||
return false;
|
return this;
|
||||||
}
|
}
|
||||||
if (this.get('expandable')) {
|
if (this.get('expandable')) {
|
||||||
this.node.setAttribute('data-expandable', '1');
|
this.node.setAttribute('data-expandable', '1');
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -391,11 +391,15 @@ BRANCH.prototype = {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Attaches required events to the branch structure.
|
* Attaches required events to the branch structure.
|
||||||
|
*
|
||||||
|
* @chainable
|
||||||
|
* @method wire
|
||||||
|
* @return {BRANCH} This function is chainable, it always returns itself.
|
||||||
*/
|
*/
|
||||||
wire : function() {
|
wire : function() {
|
||||||
this.node = this.node || Y.one('#'+this.get('id'));
|
this.node = this.node || Y.one('#'+this.get('id'));
|
||||||
if (!this.node) {
|
if (!this.node) {
|
||||||
return false;
|
return this;
|
||||||
}
|
}
|
||||||
if (this.get('expandable')) {
|
if (this.get('expandable')) {
|
||||||
this.node.setAttribute('data-expandable', '1');
|
this.node.setAttribute('data-expandable', '1');
|
||||||
|
|
|
@ -389,11 +389,15 @@ BRANCH.prototype = {
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Attaches required events to the branch structure.
|
* Attaches required events to the branch structure.
|
||||||
|
*
|
||||||
|
* @chainable
|
||||||
|
* @method wire
|
||||||
|
* @return {BRANCH} This function is chainable, it always returns itself.
|
||||||
*/
|
*/
|
||||||
wire : function() {
|
wire : function() {
|
||||||
this.node = this.node || Y.one('#'+this.get('id'));
|
this.node = this.node || Y.one('#'+this.get('id'));
|
||||||
if (!this.node) {
|
if (!this.node) {
|
||||||
return false;
|
return this;
|
||||||
}
|
}
|
||||||
if (this.get('expandable')) {
|
if (this.get('expandable')) {
|
||||||
this.node.setAttribute('data-expandable', '1');
|
this.node.setAttribute('data-expandable', '1');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue