onmouseover effect in turba
Ronnie Garcia
ronnie@mk2.net
Sun, 27 Jan 2002 20:35:23 +0100
---------------------- multipart/mixed attachment
Hey,
Here is an unified patch against Turba HEAD, to add an onmouseover effect
on the objects list, just like IMP.
In case the attachment has been dropped, you can find it there :
http://www.oveanet.fr/onmouseover-turba.patch.txt
Rgds,
Ronnie.
---------------------- multipart/mixed attachment
diff -ruN turba/config/html.php.dist turba-ronnie/config/html.php.dist
--- turba/config/html.php.dist Fri Sep 15 16:37:36 2000
+++ turba-ronnie/config/html.php.dist Sun Jan 27 14:57:18 2002
@@ -1,7 +1,14 @@
<?php
-
-/* CSS properties unique to Turba.
+/*
+ * $Horde$
+ *=20
+ * CSS properties unique to Turba.
* This file is parsed by css.php, and used to produce a stylesheet.
*/
+
+$css['.listitem']['background-color'] =3D '#ffffff';
+$css['.listitem-hi']['background-color'] =3D '#e5e5e5';
+$css['.oldlistitem']['background-color'] =3D '#cccccc';
+$css['.oldlistitem-hi']['background-color'] =3D '#b2b2b2';
=20
?>
diff -ruN turba/lib/ListView.php turba-ronnie/lib/ListView.php
--- turba/lib/ListView.php Fri Feb 09 20:36:50 2001
+++ turba-ronnie/lib/ListView.php Sun Jan 27 03:27:14 2002
@@ -44,7 +44,8 @@
*/
function display()
{
- $i =3D 0;
+ require TURBA_BASE . '/config/html.php';
+ $i =3D 0;
$this->list->reset();
while ($ob =3D $this->list->next()) {
include $this->template;
diff -ruN turba/search.php turba-ronnie/search.php
--- turba/search.php Sun Jan 27 18:22:02 2002
+++ turba-ronnie/search.php Sun Jan 27 18:58:42 2002
@@ -23,6 +23,7 @@
require_once TURBA_BASE . '/lib/Source.php';
require TURBA_BASE . '/config/sources.php';
require TURBA_BASE . '/config/attributes.php';
+require TURBA_BASE . '/config/html.php';
=20
if ($registry->registry['mail']['compose'] =3D=3D 'imp') {
$compose_url =3D 'javascript:open_compose_win(compose());';
diff -ruN turba/templates/search/oldrow.inc =
turba-ronnie/templates/search/oldrow.inc
--- turba/templates/search/oldrow.inc Fri Jan 25 00:27:28 2002
+++ turba-ronnie/templates/search/oldrow.inc Sun Jan 27 03:01:14 2002
@@ -12,22 +12,22 @@
}
}
?>
-<tr>
- <td class=3D"control" align=3D"center">
+<tr class=3D"oldlistitem" =
onmouseover=3D"javascript:style.background=3D'<?=3D =
$css['.oldlistitem-hi']['background-color'] ?>'" =
onmouseout=3D"javascript:style.background=3D'<?=3D =
$css['.oldlistitem']['background-color'] ?>'">
+ <td align=3D"center">
<input type=3D"checkbox" name=3D"to" onclick=3D"toggleTo('<?php =
if (isset($address['email'])) echo urlencode($address['email']) ?>');" =
/>
</td>
- <td class=3D"control" align=3D"center">
+ <td align=3D"center">
<input type=3D"checkbox" name=3D"cc" onclick=3D"toggleCc('<?php =
if (isset($address['email'])) echo urlencode($address['email']) ?>');" =
/>
</td>
- <td class=3D"control" align=3D"center">
+ <td align=3D"center">
<input type=3D"checkbox" name=3D"bcc" =
onclick=3D"toggleBcc('<?php if (isset($address['email'])) echo =
urlencode($address['email']) ?>');" />
</td>
- <td class=3D"control">
+ <td>
<input type=3D"hidden" name=3D"addresses[]" value=3D"<?=3D =
$addresses[$i] ?>">
<?=3D =
Horde::link(Horde::applicationUrl('displayobject.php?source=3D' . =
urlencode($GLOBALS['source']) . '&key=3D' . =
urlencode($address['__key'])), $address['name']), =
!empty($address['name']) ? $address['name'] : _("[Edit]") ?></a>
</td>
<?php foreach ($show as $field): ?>
- <td class=3D"control">
+ <td>
<?=3D $field ?>
</td>
<?php endforeach; ?>
diff -ruN turba/templates/search/row.inc =
turba-ronnie/templates/search/row.inc
--- turba/templates/search/row.inc Sun Jan 27 18:22:50 2002
+++ turba-ronnie/templates/search/row.inc Sun Jan 27 02:53:00 2002
@@ -23,22 +23,22 @@
$show[$column] =3D ' ';
}
}
-?><tr>
- <td class=3D"text" align=3D"center">
+?><tr class=3D"listitem" =
onmouseover=3D"javascript:style.background=3D'<?=3D =
$css['.listitem-hi']['background-color'] ?>';" =
onmouseout=3D"javascript:style.background=3D'<?=3D =
$css['.listitem']['background-color'] ?>';">
+ <td align=3D"center">
<input type=3D"checkbox" name=3D"to" onclick=3D"toggleTo('<?=3D =
urlencode($address) ?>');" />
</td>
- <td class=3D"text" align=3D"center">
+ <td align=3D"center">
<input type=3D"checkbox" name=3D"cc" onclick=3D"toggleCc('<?=3D =
urlencode($address) ?>');" />
</td>
- <td class=3D"text" align=3D"center">
+ <td align=3D"center">
<input type=3D"checkbox" name=3D"bcc" =
onclick=3D"toggleBcc('<?=3D urlencode($address) ?>');" />
</td>
- <td class=3D"text">
+ <td>
<input type=3D"hidden" name=3D"addresses[]" value=3D"<?=3D =
base64_encode(serialize(array('source' =3D> $GLOBALS['source'], 'name' =
=3D> $ob->getValue('name'), 'email' =3D> $ob->getValue('email'), '__key' =
=3D> $ob->getValue('__key')))) ?>" />
<?php if ($ob->hasValue('__key')): ?><?=3D =
Horde::link(Horde::applicationUrl('displayobject.php?source=3D' . =
urlencode($GLOBALS['source']) . '&key=3D' . =
urlencode($ob->getValue('__key'))), $ob->getValue('name')); ?><?php =
endif; ?><?=3D $ob->hasValue('name') ? $ob->getValue('name') : =
_("[Edit]") ?><?php if ($ob->hasValue('__key')): ?></a><?php endif; ?>
</td>
<?php foreach ($show as $field): ?>
- <td class=3D"text">
+ <td>
<?=3D $field ?>
</td>
<?php endforeach; ?>
---------------------- multipart/mixed attachment--