From 522a2253780a3f16423368b8908f678aad0ed216 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 30 Dec 2006 22:22:05 +0000 Subject: [PATCH] Add id attribute to hyperlink and image templates git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12025 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/page_header.php | 1 + functions/strings.php | 1 + functions/template/general_util.php | 2 ++ plugins/listcommands/functions.php | 1 + src/login.php | 2 ++ templates/default/hyperlink.tpl | 3 ++- templates/default/image.tpl | 3 ++- 7 files changed, 11 insertions(+), 2 deletions(-) diff --git a/functions/page_header.php b/functions/page_header.php index 8b4b6b77..f3ec7792 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -169,6 +169,7 @@ function makeInternalLink($path, $text, $target='') { // $oTemplate->assign('onclick', ''); $oTemplate->assign('class', ''); + $oTemplate->assign('id', ''); return $oTemplate->fetch('hyperlink.tpl'); } diff --git a/functions/strings.php b/functions/strings.php index a6096d9e..757ebdb2 100644 --- a/functions/strings.php +++ b/functions/strings.php @@ -816,6 +816,7 @@ function makeComposeLink($url, $text = null, $target='') { $oTemplate->assign('text', $text); $oTemplate->assign('onclick', "comp_in_new('$compuri','$compose_width','$compose_height')"); $oTemplate->assign('class', ''); + $oTemplate->assign('id', ''); return $oTemplate->fetch('hyperlink.tpl'); } diff --git a/functions/template/general_util.php b/functions/template/general_util.php index 512b9f1c..bb320a24 100644 --- a/functions/template/general_util.php +++ b/functions/template/general_util.php @@ -117,6 +117,8 @@ function getIcon($icon_theme_path, $icon_name, $text_icon, $alt_text='', $w=NULL $oTemplate->assign('border', ''); $oTemplate->assign('hspace', ''); $oTemplate->assign('vspace', ''); + $oTemplate->assign('class', ''); + $oTemplate->assign('id', ''); $icon = $oTemplate->fetch('image.tpl'); } else { diff --git a/plugins/listcommands/functions.php b/plugins/listcommands/functions.php index c2cf13d8..b906c8cc 100644 --- a/plugins/listcommands/functions.php +++ b/plugins/listcommands/functions.php @@ -67,6 +67,7 @@ function plugin_listcommands_menu_do() { $oTemplate->assign('target', '_blank'); $oTemplate->assign('text', $fieldsdescr[$cmd]); $oTemplate->assign('class', ''); + $oTemplate->assign('id', ''); $oTemplate->assign('onclick', ''); $output = $oTemplate->fetch('hyperlink.tpl'); $links[] = $output; diff --git a/src/login.php b/src/login.php index 5c35a887..670130f9 100644 --- a/src/login.php +++ b/src/login.php @@ -145,6 +145,8 @@ if (isset($org_logo) && $org_logo) { $oTemplate->assign('height', ''); } $oTemplate->assign('onclick', ''); + $oTemplate->assign('id', ''); + $oTemplate->assign('title', ''); $oTemplate->assign('align', ''); $oTemplate->assign('border', ''); $oTemplate->assign('hspace', ''); diff --git a/templates/default/hyperlink.tpl b/templates/default/hyperlink.tpl index 50f83888..52156d82 100644 --- a/templates/default/hyperlink.tpl +++ b/templates/default/hyperlink.tpl @@ -12,6 +12,7 @@ * (optional; may not be present) * + $onclick - onClick JavaScript handler (optional; may not be present) * + $class - CSS class name (optional; may not be present) + * + $id - ID name (optional; may not be present) * * @copyright © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License @@ -26,4 +27,4 @@ extract($t); -?>> +?>> diff --git a/templates/default/image.tpl b/templates/default/image.tpl index d9d4fbaa..3f06277d 100644 --- a/templates/default/image.tpl +++ b/templates/default/image.tpl @@ -7,6 +7,7 @@ * * The following variables are available in this template: * + $src - the image source path + * + $id - ID name (optional; may not be present) * + $class - CSS class name (optional; may not be present) * + $alt - alternative link text * (optional; may not be present) @@ -39,4 +40,4 @@ extract($t); -?> /> +?> /> -- 2.25.1