[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail:[13373]
From:       pdontthink () users ! sourceforge ! net
Date:       2008-12-19 0:18:57
Message-ID: E1LDT4z-00053a-52 () d5vjzd1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 13373
          http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13373&view=rev
Author:   pdontthink
Date:     2008-12-19 00:18:54 +0000 (Fri, 19 Dec 2008)

Log Message:
-----------
Add info option widget type

Modified Paths:
--------------
    branches/SM-1_4-STABLE/squirrelmail/functions/options.php

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/options.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/options.php	2008-12-19 00:12:54 UTC \
                (rev 13372)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/options.php	2008-12-19 00:18:54 UTC \
(rev 13373) @@ -33,6 +33,7 @@
 define('SMOPT_TYPE_BOOLEAN_RADIO', 13);
 define('SMOPT_TYPE_STRLIST_RADIO', 14);
 define('SMOPT_TYPE_SUBMIT', 15);
+define('SMOPT_TYPE_INFO', 16);
 
 /* Define constants for the layout scheme for edit lists. */
 define('SMOPT_EDIT_LIST_LAYOUT_LIST', 0);
@@ -132,7 +133,9 @@
         }
 
         /* Set the default save function. */
-        if (($type != SMOPT_TYPE_HIDDEN) && ($type != SMOPT_TYPE_COMMENT)) {
+        if ($type != SMOPT_TYPE_HIDDEN
+         && $type != SMOPT_TYPE_INFO
+         && $type != SMOPT_TYPE_COMMENT) {
             $this->save_function = SMOPT_SAVE_DEFAULT;
         } else {
             $this->save_function = SMOPT_SAVE_NOOP;
@@ -276,6 +279,9 @@
             case SMOPT_TYPE_SUBMIT:
                 $result = $this->createWidget_Submit();
                 break;
+            case SMOPT_TYPE_INFO:
+                $result = $this->createWidget_Info();
+                break;
             default:
                $result = '<font color="' . $color[2] . '">'
                        . sprintf(_("Option Type '%s' Not Found"), $this->type)
@@ -294,6 +300,11 @@
         return $result;
     }
 
+    function createWidget_Info() {
+        $result = htmlspecialchars($this->value) . "\n";
+        return $result;
+    }
+
     function createWidget_String() {
         switch ($this->size) {
             case SMOPT_SIZE_TINY:
@@ -1032,10 +1043,17 @@
                 if ($option->type == SMOPT_TYPE_TEXTAREA && \
                !empty($option->trailing_text))
                     $option->caption .= '<br /><small>' . $option->trailing_text . \
'</small>';  
-                echo html_tag( 'tr', "\n".
-                           html_tag( 'td', $option->caption . \
(!empty($option->caption) ? ':' : ''), 'right' ,'', 'valign="middle"' . \
                ($option->caption_wrap ? '' : ' style="white-space:nowrap"') ) .
-                           html_tag( 'td', $option->createHTMLWidget(), 'left' )
-                       ) ."\n";
+                global $color;
+                //$info_bgcolor = 0;
+                $info_bgcolor = 4;
+                $info_width = 80;
+                if ($option->type == SMOPT_TYPE_INFO)
+                    echo html_tag('tr', "\n" . html_tag('td', "\n" . \
html_tag('table', "\n" . html_tag('tr', "\n" . html_tag('td', "\n" . \
$option->createHTMLWidget())), '', $color[$info_bgcolor], 'width="' . $info_width . \
'%"'), 'center' ,'', 'colspan="2" valign="middle"')) ."\n"; +                else
+                    echo html_tag( 'tr', "\n".
+                               html_tag( 'td', $option->caption . \
(!empty($option->caption) ? ':' : ''), 'right' ,'', 'valign="middle"' . \
($option->caption_wrap ? '' : ' style="white-space:nowrap"') ) . +                    \
html_tag( 'td', $option->createHTMLWidget(), 'left' ) +                           ) \
."\n";  } else {
                 $hidden_options .= $option->createHTMLWidget();
             }


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
                https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic