From 72e600c359c8185846607bd21626b7ce675160e3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 13 Aug 2012 03:56:43 -0400 Subject: [PATCH] removed ie polyfills --- client.js | 74 +++++++++---------------------------------------------- 1 file changed, 11 insertions(+), 63 deletions(-) diff --git a/client.js b/client.js index fdb43a6e..93048c5a 100644 --- a/client.js +++ b/client.js @@ -117,57 +117,6 @@ CloudClient.Cache.clear = (function(){ } }); -/* object contain poyfills of functions */ -var PolyFills = { - setDocumentHead : (function(){ - document.head = document.getElementsByTagName("head")[0]; - }), - - getElementsByClassName: (function(pFunc){ - var lThis = this; - - /* если нет функции поиска по класам, - * а её нет в IE, - * - используем jquery - * при необходимости - * можна заменить на любой другой код - */ - if(!document.getElementsByClassName){ - Util.jsload('//code.jquery.com/jquery-1.8.0.min.js',{ - onload: function(){ - /* сохраняем переменную jQuery себе в область видимости */ - document.getElementsByClassName = function(pClassName){ - return window.jQuery('.'+pClassName)[0]; - }; - - /* if no getByClassName maybe - * we have no document.head and - * doucment.body - */ - lThis.setDocumentHead(); - - if(typeof pFunc === 'function') - pFunc(); - }, - onerror: function(){ - Util.jsload(CloudClient.LIBDIRCLIENT + 'jquery.js', - function(){ - getByClass=function(pClassName){ - return window.jQuery('.'+pClassName)[0]; - }; - - lThis.setDocumentHead(); - - if(typeof pFunc === 'function') - pFunc(); - }); - } - }); - } - }) - -}; - /* Object contain additional system functional */ CloudClient.Util = (function(){ /* @@ -377,9 +326,7 @@ CloudClient.Util = (function(){ if (document.getElementsByClassName) return document.getElementsByClassName(pClass); - else PolyFills.getElementsByClassName(function(){ - return document.getElementsByClassName(pClass); - }); + else return $('.'+pClass); }; /* private members */ @@ -939,7 +886,7 @@ CloudClient._changeLinks = function(pPanelID) */ /* номер ссылки очистки кэша*/ /* номер ссылки иконки обновления страницы */ - var lREFRESHICON=0; + var lREFRESHICON = 0; /* путь в ссылке, который говорит * что js отключен @@ -947,20 +894,21 @@ CloudClient._changeLinks = function(pPanelID) var lNoJS_s = CloudFunc.NOJS; var lFS_s = CloudFunc.FS; - for(var i=0;i