MDL-14632 Improved the output code of the settings block and fixed typo of toogle to toggle.
This commit is contained in:
@@ -66,8 +66,8 @@ function navigation_tree (treename, key) {
|
||||
this.cachedcontent = null;
|
||||
this.cachedfooter = null;
|
||||
this.position = 'block';
|
||||
this.tooglesidetabdisplay = '[[tooglesidetabdisplay]]';
|
||||
this.toogleblockdisplay = '[[toogleblockdisplay]]';
|
||||
this.togglesidetabdisplay = '[[togglesidetabdisplay]]';
|
||||
this.toggleblockdisplay = '[[toggleblockdisplay]]';
|
||||
this.sideblockwidth = null;
|
||||
if (window[this.name]) {
|
||||
if (window[this.name].expansions) {
|
||||
@@ -76,17 +76,17 @@ function navigation_tree (treename, key) {
|
||||
if (window[this.name].instance) {
|
||||
this.instance = window[this.name].instance;
|
||||
}
|
||||
if (window[this.name].tooglesidetabdisplay) {
|
||||
this.tooglesidetabdisplay = window[this.name].tooglesidetabdisplay;
|
||||
if (window[this.name].togglesidetabdisplay) {
|
||||
this.togglesidetabdisplay = window[this.name].togglesidetabdisplay;
|
||||
}
|
||||
if (window[this.name].toogleblockdisplay) {
|
||||
this.toogleblockdisplay = window[this.name].toogleblockdisplay;
|
||||
if (window[this.name].toggleblockdisplay) {
|
||||
this.toggleblockdisplay = window[this.name].toggleblockdisplay;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Initialise function used to attach the initial events to the navigation tree
|
||||
* This function attachs toogles and ajax calls
|
||||
* This function attachs toggles and ajax calls
|
||||
*/
|
||||
navigation_tree.prototype.initialise = function() {
|
||||
if (!document.getElementById(this.name)) {
|
||||
@@ -272,6 +272,7 @@ navigation_tree.prototype.add_branch = function(branchxml, target, depth) {
|
||||
* @param {element} e Event object
|
||||
*/
|
||||
navigation_tree.prototype.toggle_block_display = function(e) {
|
||||
YAHOO.util.Event.preventDefault(e);
|
||||
if (e !== null) {
|
||||
YAHOO.util.Event.stopPropagation(e);
|
||||
}
|
||||
@@ -311,8 +312,8 @@ navigation_tree.prototype.move_to_sidebar_popout = function(e) {
|
||||
if (moveicon.length>0) {
|
||||
for (var j=0;j<moveicon.length;j++) {
|
||||
moveicon[j].src = moveicon[j].src.replace(/movetosidetab/, 'movetoblock');
|
||||
moveicon[j].setAttribute('alt', this.toogleblockdisplay);
|
||||
moveicon[j].setAttribute('title', this.toogleblockdisplay);
|
||||
moveicon[j].setAttribute('alt', this.toggleblockdisplay);
|
||||
moveicon[j].setAttribute('title', this.toggleblockdisplay);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -389,8 +390,8 @@ navigation_tree.prototype.move_to_block_position = function(e) {
|
||||
if (moveicon.length>0) {
|
||||
for (var j=0;j<moveicon.length;j++) {
|
||||
moveicon[j].src = moveicon[j].src.replace(/movetoblock/, 'movetosidetab');
|
||||
moveicon[j].setAttribute('alt', this.tooglesidetabdisplay);
|
||||
moveicon[j].setAttribute('title', this.tooglesidetabdisplay);
|
||||
moveicon[j].setAttribute('alt', this.togglesidetabdisplay);
|
||||
moveicon[j].setAttribute('title', this.togglesidetabdisplay);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -833,4 +834,4 @@ function remove_shadow(el) {
|
||||
shadows[i].parentNode.removeChild(shadows[i]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user