From 667c0ae1752df5de879f7395a01e9bacf9786160 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sat, 18 Sep 2010 11:04:02 +0000 Subject: [PATCH] fixed unterminated JS statements --- lib/cookies.js | 16 +++++++------- lib/javascript-static.js | 48 ++++++++++++++++++++-------------------- lib/ufo.js | 28 +++++++++++------------ 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/lib/cookies.js b/lib/cookies.js index 966b7c2cebf..c9c2004baae 100644 --- a/lib/cookies.js +++ b/lib/cookies.js @@ -39,7 +39,7 @@ function cookie(name, value, expires, path, domain, secure) if (i == 0) break; } return null; - } + }; // Set cookie this.set=function() @@ -63,7 +63,7 @@ function cookie(name, value, expires, path, domain, secure) // Re-initialize this.expires=expStore; - } + }; // Kill cookie this.kill=function() @@ -72,13 +72,13 @@ function cookie(name, value, expires, path, domain, secure) ((this.path) ? "; path=" + this.path : "") + ((this.domain) ? "; domain=" + this.domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; - } + }; // Change cookie settings. - this.changeName=function(chName) { this.kill(); this.name=chName; this.set(); } - this.changeVal=function(chVal) { this.kill(); this.value=chVal; this.set(); } - this.changeExp=function(chExp) { this.kill(); this.expires=chExp; this.set(); } - this.changePath=function(chPath) { this.kill(); this.path=chPath; this.set(); } - this.changeDomain=function(chDom) { this.kill(); this.domain=chDom; this.set(); } + this.changeName=function(chName) { this.kill(); this.name=chName; this.set(); }; + this.changeVal=function(chVal) { this.kill(); this.value=chVal; this.set(); }; + this.changeExp=function(chExp) { this.kill(); this.expires=chExp; this.set(); }; + this.changePath=function(chPath) { this.kill(); this.path=chPath; this.set(); }; + this.changeDomain=function(chDom) { this.kill(); this.domain=chDom; this.set(); }; this.changeSecurity=function(chSec) { this.kill(); this.secure=chSec; this.set(); } } diff --git a/lib/javascript-static.js b/lib/javascript-static.js index f1baae64918..1776d3ac2fe 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -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') + var hide = Y.Node.create(''+config.tooltipVisible+''); hide.setAttribute('src', this.get('iconVisible')).on('click', this.updateState, this, true); - var show = Y.Node.create(''+config.tooltipHidden+'') + var show = Y.Node.create(''+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 } }); -} \ No newline at end of file +}; \ No newline at end of file diff --git a/lib/ufo.js b/lib/ufo.js index e4643bec5ec..ad8f28cd8d0 100644 --- a/lib/ufo.js +++ b/lib/ufo.js @@ -19,7 +19,7 @@ var UFO = { pluginType: "", fv: [0,0], foList: [], - + create: function(FO, id) { if (!UFO.uaHas("w3cdom") || UFO.uaHas("ieMac")) return; UFO.getFlashVersion(); @@ -58,20 +58,20 @@ var UFO = { } document.getElementById(id).style.visibility = "visible"; }, - + createCSS: function(selector, declaration) { - var _h = document.getElementsByTagName("head")[0]; + var _h = document.getElementsByTagName("head")[0]; var _s = UFO.createElement("style"); if (!UFO.uaHas("ieWin")) _s.appendChild(document.createTextNode(selector + " {" + declaration + "}")); // bugs in IE/Win _s.setAttribute("type", "text/css"); - _s.setAttribute("media", "screen"); + _s.setAttribute("media", "screen"); _h.appendChild(_s); if (UFO.uaHas("ieWin") && document.styleSheets && document.styleSheets.length > 0) { var _ls = document.styleSheets[document.styleSheets.length - 1]; if (typeof _ls.addRule == "object") _ls.addRule(selector, declaration); } }, - + setContainerCSS: function(id) { var _fo = UFO.foList[id]; var _w = /%/.test(_fo.width) ? "" : "px"; @@ -92,7 +92,7 @@ var UFO = { createObjParam: function(el, aName, aValue) { var _p = UFO.createElement("param"); - _p.setAttribute("name", aName); + _p.setAttribute("name", aName); _p.setAttribute("value", aValue); el.appendChild(_p); }, @@ -123,9 +123,9 @@ var UFO = { return false; } }, - + getFlashVersion: function() { - if (UFO.fv[0] != 0) return; + if (UFO.fv[0] != 0) return; if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") { UFO.pluginType = "npapi"; var _d = navigator.plugins["Shockwave Flash"].description; @@ -142,10 +142,10 @@ var UFO = { var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch(e) { - try { + try { var _a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); UFO.fv = [6, 0]; - _a.AllowScriptAccess = "always"; // throws if fp < 6.47 + _a.AllowScriptAccess = "always"; // throws if fp < 6.47 } catch(e) { if (UFO.fv[0] == 6) return; @@ -172,7 +172,7 @@ var UFO = { } return true; }, - + hasFlashVersion: function(major, release) { return (UFO.fv[0] > major || (UFO.fv[0] == major && UFO.fv[1] >= release)) ? true : false; }, @@ -226,7 +226,7 @@ var UFO = { _e.innerHTML = '' + _objPar + ''; } }, - + createDialog: function(id) { var _fo = UFO.foList[id]; UFO.createCSS("html", "height:100%; overflow:hidden;"); @@ -264,7 +264,7 @@ var UFO = { cleanupIELeaks: function() { var _o = document.getElementsByTagName("object"); - var _l = _o.length + var _l = _o.length; for (var i = 0; i < _l; i++) { _o[i].style.display = "none"; for (var x in _o[i]) { @@ -295,7 +295,7 @@ if (typeof window.attachEvent != "undefined" && UFO.uaHas("ieWin")) { function onDOMComplete(w, f) { var d = w.document, done = false; //create temporary node to check scroll left ( see http://www.hedgerwow.com/360/dhtml/ie-dom-ondocumentready.html) - var tempNode = document.createElement('document:ready'); + var tempNode = document.createElement('document:ready'); wait(); if ((/WebKit|KHTML|MSIE/i).test(navigator.userAgent)) { poll();