fixed unterminated JS statements
This commit is contained in:
+24
-24
@@ -48,7 +48,7 @@ M.util.image_url = function(imagename, component) {
|
||||
|
||||
M.util.create_UFO_object = function (eid, FO) {
|
||||
UFO.create(FO, eid);
|
||||
}
|
||||
};
|
||||
|
||||
M.util.in_array = function(item, array){
|
||||
for( var i = 0; i<array.length; i++){
|
||||
@@ -57,7 +57,7 @@ M.util.in_array = function(item, array){
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Init a collapsible region, see print_collapsible_region in weblib.php
|
||||
@@ -285,7 +285,7 @@ M.util.show_confirm_dialog = function(e, args) {
|
||||
simpledialog.render(document.body);
|
||||
simpledialog.show();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/** Useful for full embedding of various stuff */
|
||||
M.util.init_maximised_embed = function(Y, id) {
|
||||
@@ -359,7 +359,7 @@ M.util.init_select_autosubmit = function(Y, formid, selectid, nothing) {
|
||||
if ((nothing===false || select.get('value') != nothing) && lastindex != select.get('selectedIndex')) {
|
||||
this.submit();
|
||||
}
|
||||
}
|
||||
};
|
||||
// Attach the change event to the keypress, blur, and click actions.
|
||||
// We don't use the change event because IE fires it on every arrow up/down
|
||||
// event.... usability
|
||||
@@ -425,7 +425,7 @@ M.util.init_toggle_class_on_click = function(Y, id, cssselector, toggleclassname
|
||||
node.all(cssselector+'.'+toggleclassname).removeClass(toggleclassname);
|
||||
}
|
||||
}, node);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialises a colour picker
|
||||
@@ -585,30 +585,30 @@ M.util.init_colour_picker = function(Y, id, previewconf) {
|
||||
}
|
||||
return hex;
|
||||
}
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Initialise the colour picker :) Hoorah
|
||||
*/
|
||||
colourpicker.init();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
M.util.init_block_hider = function(Y, config) {
|
||||
Y.use('base', 'node', function(Y) {
|
||||
M.util.block_hider = M.util.block_hider || (function(){
|
||||
var blockhider = function() {
|
||||
blockhider.superclass.constructor.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
blockhider.prototype = {
|
||||
initializer : function(config) {
|
||||
this.set('block', '#'+this.get('id'))
|
||||
this.set('block', '#'+this.get('id'));
|
||||
var b = this.get('block'),
|
||||
t = b.one('.title'),
|
||||
a = null;
|
||||
if (t && (a = t.one('.block_action'))) {
|
||||
var hide = Y.Node.create('<img class="block-hider-hide" alt="'+config.tooltipVisible+'" title="'+config.tooltipVisible+'" />')
|
||||
var hide = Y.Node.create('<img class="block-hider-hide" alt="'+config.tooltipVisible+'" title="'+config.tooltipVisible+'" />');
|
||||
hide.setAttribute('src', this.get('iconVisible')).on('click', this.updateState, this, true);
|
||||
var show = Y.Node.create('<img class="block-hider-show" alt="'+config.tooltipHidden+'" title="'+config.tooltipHidden+'" />')
|
||||
var show = Y.Node.create('<img class="block-hider-show" alt="'+config.tooltipHidden+'" title="'+config.tooltipHidden+'" />');
|
||||
show.setAttribute('src', this.get('iconHidden')).on('click', this.updateState, this, false);
|
||||
a.insert(show, 0).insert(hide, 0);
|
||||
}
|
||||
@@ -621,7 +621,7 @@ M.util.init_block_hider = function(Y, config) {
|
||||
this.get('block').removeClass('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Y.extend(blockhider, Y.Base, blockhider.prototype, {
|
||||
NAME : 'blockhider',
|
||||
ATTRS : {
|
||||
@@ -644,7 +644,7 @@ M.util.init_block_hider = function(Y, config) {
|
||||
})();
|
||||
new M.util.block_hider(config);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//=== old legacy JS code, hopefully to be replaced soon by M.xx.yy and YUI3 code ===
|
||||
|
||||
@@ -1007,7 +1007,7 @@ emoticons_help = {
|
||||
}
|
||||
emoticons_help.inputarea.focus();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/** Close the current browser window. */
|
||||
function close_window(e) {
|
||||
@@ -1104,7 +1104,7 @@ function stripHTML(str) {
|
||||
Number.prototype.fixed=function(n){
|
||||
with(Math)
|
||||
return round(Number(this)*pow(10,n))/pow(10,n);
|
||||
}
|
||||
};
|
||||
function update_progress_bar (id, width, pt, msg, es){
|
||||
var percent = pt*100;
|
||||
var status = document.getElementById("status_"+id);
|
||||
@@ -1252,7 +1252,7 @@ M.util.help_icon = {
|
||||
help = this;
|
||||
help.overlay.hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
help_content_overlay.init();
|
||||
M.util.help_icon.instance = help_content_overlay;
|
||||
M.util.help_icon.instance.display(event, args);
|
||||
@@ -1264,7 +1264,7 @@ M.util.help_icon = {
|
||||
init : function(Y) {
|
||||
this.Y = Y;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Custom menu namespace
|
||||
@@ -1289,7 +1289,7 @@ M.core_custom_menu = {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to store form manipulation methods and enhancments
|
||||
@@ -1348,7 +1348,7 @@ M.form.init_smartselect = function(Y, id, options) {
|
||||
this.currenttext = this.nodes.select.all('option').item(this.currentvalue).get('innerHTML');
|
||||
|
||||
var options = Array();
|
||||
options[''] = {text:this.currenttext,value:'',depth:0,children:[]}
|
||||
options[''] = {text:this.currenttext,value:'',depth:0,children:[]};
|
||||
this.nodes.select.all('option').each(function(option, index) {
|
||||
var rawtext = option.get('innerHTML');
|
||||
var text = rawtext.replace(/^( )*/, '');
|
||||
@@ -1498,10 +1498,10 @@ M.form.init_smartselect = function(Y, id, options) {
|
||||
this.shownevent.detach();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
smartselect.init(Y, id, options, {select:select});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
M.util.init_flvflowplayer = function (id, playerpath, fileurl) {
|
||||
$f(id, playerpath, {
|
||||
@@ -1516,7 +1516,7 @@ M.util.init_flvflowplayer = function (id, playerpath, fileurl) {
|
||||
autoBuffering: true
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
M.util.init_mp3flowplayer = function (id, playerpath, audioplayerpath, fileurl, color) {
|
||||
|
||||
@@ -1543,7 +1543,7 @@ M.util.init_mp3flowplayer = function (id, playerpath, audioplayerpath, fileurl,
|
||||
autoPlay: false
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
M.util.init_mp3flowplayerplugin = function (id, playerpath, audioplayerpath, fileurl, color) {
|
||||
$f(id, playerpath, {
|
||||
@@ -1570,4 +1570,4 @@ M.util.init_mp3flowplayerplugin = function (id, playerpath, audioplayerpath, fil
|
||||
autoPlay: false
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user