[Phpfreechat-svn] SF.net SVN: phpfreechat: [1169] trunk
Status: Beta
Brought to you by:
kerphi
|
From: <gpi...@us...> - 2007-08-30 19:17:27
|
Revision: 1169
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1169&view=rev
Author: gpinzone
Date: 2007-08-30 12:17:03 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Updated rest of files that use both class and className.
Modified Paths:
--------------
trunk/data/public/js/pfcclient.js
trunk/data/public/js/pfcgui.js
trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php
trunk/demo/demo50_data/mytheme/customize.js.php
Modified: trunk/data/public/js/pfcclient.js
===================================================================
--- trunk/data/public/js/pfcclient.js 2007-08-30 16:40:39 UTC (rev 1168)
+++ trunk/data/public/js/pfcclient.js 2007-08-30 19:17:03 UTC (rev 1169)
@@ -1197,18 +1197,18 @@
var nickidlst = this.getChanMeta(chanid,'users')['nickid'];
var nickdiv = this.gui.getOnlineContentFromTabId(chanid);
var ul = document.createElement('ul');
- if (is_ie)
- ul.setAttribute('className', 'pfc_nicklist'); // IE
+ if (! is_ie)
+ ul.setAttribute('class', 'pfc_nicklist');
else
- ul.setAttribute('class', 'pfc_nicklist');
+ ul.setAttribute('className', 'pfc_nicklist'); // for IE
for (var i=0; i<nickidlst.length; i++)
{
var nickid = nickidlst[i];
var li = this.buildNickItem(nickid);
- if (is_ie)
- li.setAttribute('className', 'pfc_nickitem_'+nickid); // IE
+ if (! is_ie)
+ li.setAttribute('class', 'pfc_nickitem_'+nickid);
else
- li.setAttribute('class', 'pfc_nickitem_'+nickid);
+ li.setAttribute('className', 'pfc_nickitem_'+nickid); // for IE
ul.appendChild(li);
}
var fc = nickdiv.firstChild;
@@ -1231,24 +1231,24 @@
var usermeta = this.getAllUserMeta(nickid);
var div = document.createElement('div');
- if (is_ie)
+ if (! is_ie)
+ div.setAttribute('class', 'pfc_nickwhois');
+ else
div.setAttribute('className', 'pfc_nickwhois'); // for IE
- else
- div.setAttribute('class', 'pfc_nickwhois');
var p = document.createElement('p');
- if (is_ie)
+ if (! is_ie)
+ p.setAttribute('class', 'pfc_nickwhois_header');
+ else
p.setAttribute('className', 'pfc_nickwhois_header'); // for IE
- else
- p.setAttribute('class', 'pfc_nickwhois_header');
div.appendChild(p);
// add the close button
var img = document.createElement('img');
- if (is_ie)
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickwhois_close');
+ else
img.setAttribute('className', 'pfc_nickwhois_close'); // for IE
- else
- img.setAttribute('class', 'pfc_nickwhois_close');
img.pfc_parent = div;
img.onclick = function(evt){
this.pfc_parent.style.display = 'none';
@@ -1279,15 +1279,15 @@
{
var tr = document.createElement('tr');
var td1 = document.createElement('td');
- if (is_ie)
+ if (! is_ie)
+ td1.setAttribute('class', 'pfc_nickwhois_c1');
+ else
td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE
+ var td2 = document.createElement('td');
+ if (! is_ie)
+ td2.setAttribute('class', 'pfc_nickwhois_c2');
else
- td1.setAttribute('class', 'pfc_nickwhois_c1');
- var td2 = document.createElement('td');
- if (is_ie)
td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE
- else
- td2.setAttribute('class', 'pfc_nickwhois_c2');
td1.appendChild(document.createTextNode(k));
td2.appendChild(document.createTextNode(v));
tr.appendChild(td1);
@@ -1301,10 +1301,10 @@
if (pfc.getUserMeta(nickid,'nick') != this.nickname)
{
var p = document.createElement('p');
- if (is_ie)
+ if (! is_ie)
+ p.setAttribute('class', 'pfc_nickwhois_pv');
+ else
p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE
- else
- p.setAttribute('class', 'pfc_nickwhois_pv');
var a = document.createElement('a');
a.setAttribute('href', '');
a.pfc_nickid = nickid;
@@ -1358,20 +1358,20 @@
else
img.setAttribute('src', this.res.getFileUrl('images/user.gif'));
img.style.marginRight = '5px';
- if (is_ie)
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickbutton');
+ else
img.setAttribute('className', 'pfc_nickbutton'); // for IE
- else
- img.setAttribute('class', 'pfc_nickbutton');
a.appendChild(img);
// nobr is not xhtml valid but it's a workeround
// for IE which doesn't support 'white-space: pre' css rule
var nobr = document.createElement('nobr');
var span = document.createElement('span');
- if (is_ie)
+ if (! is_ie)
+ span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
+ else
span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE
- else
- span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
span.appendChild(document.createTextNode(nick));
nobr.appendChild(span);
a.appendChild(nobr);
Modified: trunk/data/public/js/pfcgui.js
===================================================================
--- trunk/data/public/js/pfcgui.js 2007-08-30 16:40:39 UTC (rev 1168)
+++ trunk/data/public/js/pfcgui.js 2007-08-30 19:17:03 UTC (rev 1169)
@@ -81,8 +81,10 @@
if (this.tabids[i] == tabid)
{
// select the tab
- tabtitle.setAttribute('class', 'selected');
- tabtitle.setAttribute('className', 'selected'); // for IE6
+ if (! is_ie)
+ tabtitle.setAttribute('class', 'selected');
+ else
+ tabtitle.setAttribute('className', 'selected'); // for IE
//Element.addClassName(tabtitle, 'selected');
tab_to_show = tabcontent;
this.current_tab = this.tabs[i];
@@ -91,8 +93,10 @@
else
{
// unselect the tab
- tabtitle.setAttribute('class', '');
- tabtitle.setAttribute('className', ''); // for IE6
+ if (! is_ie)
+ tabtitle.setAttribute('class', '');
+ else
+ tabtitle.setAttribute('className', ''); // for IE
//Element.removeClassName(tabtitle, 'selected');
tabcontent.style.display = 'none';
}
@@ -133,8 +137,10 @@
// if the chat content doesn't exists yet, just create a cached one
cc = document.createElement('div');
cc.setAttribute('id', 'pfc_chat_'+tabid);
- cc.setAttribute('class', 'pfc_chat');
- cc.setAttribute('className', 'pfc_chat'); // for IE6
+ if (! is_ie)
+ cc.setAttribute('class', 'pfc_chat');
+ else
+ cc.setAttribute('className', 'pfc_chat'); // for IE
// Element.addClassName(cc, 'pfc_chat');
cc.style.display = "block"; // needed by IE6 to show the online div at startup (first loaded page)
@@ -151,8 +157,10 @@
oc = document.createElement('div');
oc.setAttribute('id', 'pfc_online_'+tabid);
- oc.setAttribute('class', 'pfc_online');
- oc.setAttribute('className', 'pfc_online'); // for IE6
+ if (! is_ie)
+ oc.setAttribute('class', 'pfc_online');
+ else
+ oc.setAttribute('className', 'pfc_online'); // for IE
//Element.addClassName(oc, 'pfc_online');
// I set the border style here because seting it in the CSS is not taken in account
// oc.style.borderLeft = "1px solid #555";
@@ -226,8 +234,10 @@
li_title.appendChild(li_div);
var a1 = document.createElement('a');
- a1.setAttribute('class', 'pfc_tabtitle');
- a1.setAttribute('className', 'pfc_tabtitle'); // for IE6
+ if (! is_ie)
+ a1.setAttribute('class', 'pfc_tabtitle');
+ else
+ a1.setAttribute('className', 'pfc_tabtitle'); // for IE
a1.setAttribute('href', '#');
a1.pfc_tabid = tabid;
a1.onclick = function(){pfc.gui.setTabById(this.pfc_tabid); return false;}
@@ -263,8 +273,10 @@
}
a2.alt = pfc.res.getLabel('Close this tab');
a2.title = a2.alt;
- a2.setAttribute('class', 'pfc_tabclose');
- a2.setAttribute('className', 'pfc_tabclose'); // for IE6
+ if (! is_ie)
+ a2.setAttribute('class', 'pfc_tabclose');
+ else
+ a2.setAttribute('className', 'pfc_tabclose'); // for IE
var img = document.createElement('img');
img.setAttribute('src', pfc.res.getFileUrl('images/tab_remove.gif'));
a2.appendChild(img);
@@ -274,8 +286,10 @@
var div_content = document.createElement('div');
div_content.setAttribute('id', 'pfc_channel_content'+tabid);
// Element.addClassName(div_content, 'pfc_content');
- div_content.setAttribute('class', 'pfc_content');
- div_content.setAttribute('className', 'pfc_content'); // for IE6
+ if (! is_ie)
+ div_content.setAttribute('class', 'pfc_content');
+ else
+ div_content.setAttribute('className', 'pfc_content'); // for IE
div_content.style.display = 'none';
var div_chat = this.getChatContentFromTabId(tabid);
@@ -354,13 +368,17 @@
{
if (div.blinkstat == true)
{
- div.setAttribute('class', 'pfc_tabblink1');
- div.setAttribute('className', 'pfc_tabblink1'); // for IE6
+ if (! is_ie)
+ div.setAttribute('class', 'pfc_tabblink1');
+ else
+ div.setAttribute('className', 'pfc_tabblink1'); // for IE
}
else
{
- div.setAttribute('class', 'pfc_tabblink2');
- div.setAttribute('className', 'pfc_tabblink2'); // for IE6
+ if (! is_ie)
+ div.setAttribute('class', 'pfc_tabblink2');
+ else
+ div.setAttribute('className', 'pfc_tabblink2'); // for IE
}
div.blinkstat = !div.blinkstat;
div.blinktimeout = setTimeout('pfc.gui.notifyTab(\''+tabid+'\');', 500);
@@ -389,8 +407,10 @@
var div = $('pfc_tabdiv'+tabid);
if (div)
{
- div.removeAttribute('class');
- div.removeAttribute('className'); // for IE6
+ if (! is_ie)
+ div.removeAttribute('class');
+ else
+ div.removeAttribute('className'); // for IE
clearTimeout(div.blinktimeout);
}
},
@@ -432,8 +452,10 @@
var bbc = clist_v[i];
var elt = document.createElement('img');
elt.bbc = bbc;
- elt.setAttribute('class', 'pfc_color');
- elt.setAttribute('className', 'pfc_color'); // for IE6
+ if (! is_ie)
+ elt.setAttribute('class', 'pfc_color');
+ else
+ elt.setAttribute('className', 'pfc_color'); // for IE
elt.setAttribute('id', 'pfc_color_'+bbc);
elt.style.backgroundColor = '#'+bbc;
elt.setAttribute('src', pfc.res.getFileUrl('images/color_transparent.gif'));
Modified: trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php
===================================================================
--- trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-30 16:40:39 UTC (rev 1168)
+++ trunk/demo/demo34_add_a_link_on_nicknames/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169)
@@ -32,16 +32,20 @@
else
img.setAttribute('src', this.res.getFileUrl('images/user.gif'));
img.style.marginRight = '5px';
- img.setAttribute('class', 'pfc_nickbutton');
- img.setAttribute('className', 'pfc_nickbutton'); // for IE6
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickbutton');
+ else
+ img.setAttribute('className', 'pfc_nickbutton'); // for IE
a.appendChild(img);
// nobr is not xhtml valid but it's a workeround
// for IE which doesn't support 'white-space: pre' css rule
var nobr = document.createElement('nobr');
var span = document.createElement('span');
- span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
- span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE6
+ if (! is_ie)
+ span.setAttribute('class', 'pfc_nickmarker pfc_nick_'+nickid);
+ else
+ span.setAttribute('className', 'pfc_nickmarker pfc_nick_'+nickid); // for IE
span.appendChild(document.createTextNode(nick));
nobr.appendChild(span);
a.appendChild(nobr);
Modified: trunk/demo/demo50_data/mytheme/customize.js.php
===================================================================
--- trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-30 16:40:39 UTC (rev 1168)
+++ trunk/demo/demo50_data/mytheme/customize.js.php 2007-08-30 19:17:03 UTC (rev 1169)
@@ -3,18 +3,24 @@
var usermeta = this.getAllUserMeta(nickid);
var div = document.createElement('div');
- div.setAttribute('class', 'pfc_nickwhois');
- div.setAttribute('className', 'pfc_nickwhois'); // for IE6
+ if (! is_ie)
+ div.setAttribute('class', 'pfc_nickwhois');
+ else
+ div.setAttribute('className', 'pfc_nickwhois'); // for IE
var p = document.createElement('p');
- p.setAttribute('class', 'pfc_nickwhois_header');
- p.setAttribute('className', 'pfc_nickwhois_header'); // for IE6
+ if (! is_ie)
+ p.setAttribute('class', 'pfc_nickwhois_header');
+ else
+ p.setAttribute('className', 'pfc_nickwhois_header'); // for IE
div.appendChild(p);
// add the close button
var img = document.createElement('img');
- img.setAttribute('class', 'pfc_nickwhois_close');
- img.setAttribute('className', 'pfc_nickwhois_close'); // for IE6
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickwhois_close');
+ else
+ img.setAttribute('className', 'pfc_nickwhois_close'); // for IE
img.pfc_parent = div;
img.onclick = function(evt){
this.pfc_parent.style.display = 'none';
@@ -46,11 +52,15 @@
{
var tr = document.createElement('tr');
var td1 = document.createElement('td');
- td1.setAttribute('class', 'pfc_nickwhois_c1');
- td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE6
+ if (! is_ie)
+ td1.setAttribute('class', 'pfc_nickwhois_c1');
+ else
+ td1.setAttribute('className', 'pfc_nickwhois_c1'); // for IE
var td2 = document.createElement('td');
- td2.setAttribute('class', 'pfc_nickwhois_c2');
- td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE6
+ if (! is_ie)
+ td2.setAttribute('class', 'pfc_nickwhois_c2');
+ else
+ td2.setAttribute('className', 'pfc_nickwhois_c2'); // for IE
td1.appendChild(document.createTextNode(k));
td2.appendChild(document.createTextNode(v));
tr.appendChild(td1);
@@ -65,8 +75,10 @@
{
var img = document.createElement('img');
img.setAttribute('src',this.getUserMeta(nickid,'avatar'));
- img.setAttribute('class', 'pfc_nickwhois_avatar');
- img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE6
+ if (! is_ie)
+ img.setAttribute('class', 'pfc_nickwhois_avatar');
+ else
+ img.setAttribute('className', 'pfc_nickwhois_avatar'); // for IE
div.appendChild(img);
}
@@ -74,8 +86,10 @@
if (pfc.getUserMeta(nickid,'nick') != this.nickname)
{
var p = document.createElement('p');
- p.setAttribute('class', 'pfc_nickwhois_pv');
- p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE6
+ if (! is_ie)
+ p.setAttribute('class', 'pfc_nickwhois_pv');
+ else
+ p.setAttribute('className', 'pfc_nickwhois_pv'); // for IE
var a = document.createElement('a');
a.setAttribute('href', '');
a.pfc_nickid = nickid;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|