From: stevetruckstuff Date: Fri, 24 Feb 2006 22:34:14 +0000 (+0000) Subject: New template for advanced mailbox tree, which uses the dTree package. To use this... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=93222bea1b92663c2de1d29052133cd147607851;p=squirrelmail.git New template for advanced mailbox tree, which uses the dTree package. To use this template, it must first be installed through config/conf.pl git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10828 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/templates/default_advanced/images/base.gif b/templates/default_advanced/images/base.gif new file mode 100644 index 00000000..9ac0b117 Binary files /dev/null and b/templates/default_advanced/images/base.gif differ diff --git a/templates/default_advanced/images/cd.gif b/templates/default_advanced/images/cd.gif new file mode 100644 index 00000000..75038194 Binary files /dev/null and b/templates/default_advanced/images/cd.gif differ diff --git a/templates/default_advanced/images/empty.gif b/templates/default_advanced/images/empty.gif new file mode 100644 index 00000000..b5cf5237 Binary files /dev/null and b/templates/default_advanced/images/empty.gif differ diff --git a/templates/default_advanced/images/folder.gif b/templates/default_advanced/images/folder.gif new file mode 100644 index 00000000..eb129763 Binary files /dev/null and b/templates/default_advanced/images/folder.gif differ diff --git a/templates/default_advanced/images/folderopen.gif b/templates/default_advanced/images/folderopen.gif new file mode 100644 index 00000000..c5c31102 Binary files /dev/null and b/templates/default_advanced/images/folderopen.gif differ diff --git a/templates/default_advanced/images/globe.gif b/templates/default_advanced/images/globe.gif new file mode 100644 index 00000000..57123d0e Binary files /dev/null and b/templates/default_advanced/images/globe.gif differ diff --git a/templates/default_advanced/images/imgfolder.gif b/templates/default_advanced/images/imgfolder.gif new file mode 100644 index 00000000..e6d88034 Binary files /dev/null and b/templates/default_advanced/images/imgfolder.gif differ diff --git a/templates/default_advanced/images/join.gif b/templates/default_advanced/images/join.gif new file mode 100644 index 00000000..34dd4761 Binary files /dev/null and b/templates/default_advanced/images/join.gif differ diff --git a/templates/default_advanced/images/joinbottom.gif b/templates/default_advanced/images/joinbottom.gif new file mode 100644 index 00000000..48b81c80 Binary files /dev/null and b/templates/default_advanced/images/joinbottom.gif differ diff --git a/templates/default_advanced/images/line.gif b/templates/default_advanced/images/line.gif new file mode 100644 index 00000000..1a259eea Binary files /dev/null and b/templates/default_advanced/images/line.gif differ diff --git a/templates/default_advanced/images/minus.gif b/templates/default_advanced/images/minus.gif new file mode 100644 index 00000000..3d212a97 Binary files /dev/null and b/templates/default_advanced/images/minus.gif differ diff --git a/templates/default_advanced/images/minusbottom.gif b/templates/default_advanced/images/minusbottom.gif new file mode 100644 index 00000000..dc3198be Binary files /dev/null and b/templates/default_advanced/images/minusbottom.gif differ diff --git a/templates/default_advanced/images/musicfolder.gif b/templates/default_advanced/images/musicfolder.gif new file mode 100644 index 00000000..f620789f Binary files /dev/null and b/templates/default_advanced/images/musicfolder.gif differ diff --git a/templates/default_advanced/images/nolines_minus.gif b/templates/default_advanced/images/nolines_minus.gif new file mode 100644 index 00000000..2592ac20 Binary files /dev/null and b/templates/default_advanced/images/nolines_minus.gif differ diff --git a/templates/default_advanced/images/nolines_plus.gif b/templates/default_advanced/images/nolines_plus.gif new file mode 100644 index 00000000..f258ce21 Binary files /dev/null and b/templates/default_advanced/images/nolines_plus.gif differ diff --git a/templates/default_advanced/images/page.gif b/templates/default_advanced/images/page.gif new file mode 100644 index 00000000..42d7318c Binary files /dev/null and b/templates/default_advanced/images/page.gif differ diff --git a/templates/default_advanced/images/plus.gif b/templates/default_advanced/images/plus.gif new file mode 100644 index 00000000..b2c99723 Binary files /dev/null and b/templates/default_advanced/images/plus.gif differ diff --git a/templates/default_advanced/images/plusbottom.gif b/templates/default_advanced/images/plusbottom.gif new file mode 100644 index 00000000..b5671d89 Binary files /dev/null and b/templates/default_advanced/images/plusbottom.gif differ diff --git a/templates/default_advanced/images/question.gif b/templates/default_advanced/images/question.gif new file mode 100644 index 00000000..dd4e6850 Binary files /dev/null and b/templates/default_advanced/images/question.gif differ diff --git a/templates/default_advanced/images/trash.gif b/templates/default_advanced/images/trash.gif new file mode 100644 index 00000000..cfa0f000 Binary files /dev/null and b/templates/default_advanced/images/trash.gif differ diff --git a/templates/default_advanced/js/dtree.js b/templates/default_advanced/js/dtree.js new file mode 100644 index 00000000..2cb369d9 --- /dev/null +++ b/templates/default_advanced/js/dtree.js @@ -0,0 +1,695 @@ +/*--------------------------------------------------| + +| dTree 2.05 | www.destroydrop.com/javascript/tree/ | + +|---------------------------------------------------| + +| Copyright (c) 2002-2003 Geir Landr? | + +| | + +| This script can be used freely as long as all | + +| copyright messages are intact. | + +| | + +| Updated: 17.04.2003 | + +|--------------------------------------------------*/ + + + +// Node object + +function Node(id, pid, name, url, title, target, icon, iconOpen, open) { + + this.id = id; + + this.pid = pid; + + this.name = name; + + this.url = url; + + this.title = title; + + this.target = target; + + this.icon = icon; + + this.iconOpen = iconOpen; + + this._io = open || false; + + this._is = false; + + this._ls = false; + + this._hc = false; + + this._ai = 0; + + this._p; + +}; + + + +// Tree object +// imagePath parameter added by SquirrelMail Team +function dTree(objName, imagePath) { + + this.config = { + + target : null, + + folderLinks : true, + + useSelection : true, + + useCookies : true, + + useLines : true, + + useIcons : true, + + useStatusText : false, + + closeSameLevel : false, + + inOrder : false + + } + + this.icon = { + + root : imagePath+'/base.gif', + + folder : imagePath+'/folder.gif', + + folderOpen : imagePath+'/folderopen.gif', + + node : imagePath+'/page.gif', + + empty : imagePath+'/empty.gif', + + line : imagePath+'/line.gif', + + join : imagePath+'/join.gif', + + joinBottom : imagePath+'/joinbottom.gif', + + plus : imagePath+'/plus.gif', + + plusBottom : imagePath+'/plusbottom.gif', + + minus : imagePath+'/minus.gif', + + minusBottom : imagePath+'/minusbottom.gif', + + nlPlus : imagePath+'/nolines_plus.gif', + + nlMinus : imagePath+'/nolines_minus.gif' + + }; + + this.obj = objName; + + this.aNodes = []; + + this.aIndent = []; + + this.root = new Node(-1); + + this.selectedNode = null; + + this.selectedFound = false; + + this.completed = false; + + this.imagePath = imagePath; + +}; + + + +// Adds a new node to the node array + +dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) { + + this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open); + +}; + + + +// Open/close all nodes + +dTree.prototype.openAll = function() { + + this.oAll(true); + +}; + +dTree.prototype.closeAll = function() { + + this.oAll(false); + +}; + + + +// Outputs the tree to the page + +dTree.prototype.toString = function() { + + var str = '
\n'; + + if (document.getElementById) { + + if (this.config.useCookies) this.selectedNode = this.getSelected(); + + str += this.addNode(this.root); + + } else str += 'Browser not supported.'; + + str += '
'; + + if (!this.selectedFound) this.selectedNode = null; + + this.completed = true; + + return str; + +}; + + + +// Creates the tree structure + +dTree.prototype.addNode = function(pNode) { + + var str = ''; + + var n=0; + + if (this.config.inOrder) n = pNode._ai; + + for (n; n'; + + } + + if (node.url) { + + str += ''; + + str += node.name; + + if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += ''; + + str += ''; + + if (node._hc) { + + str += '
'; + + str += this.addNode(node); + + str += '
'; + + } + + this.aIndent.pop(); + + return str; + +}; + + + +// Adds the empty and line icons + +dTree.prototype.indent = function(node, nodeId) { + + var str = ''; + + if (this.root.id != node.pid) { + + for (var n=0; n'; + + (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1); + + if (node._hc) { + + str += ''; + + } else str += ''; + + } + + return str; + +}; + + + +// Checks if a node has any children and if it is the last sibling + +dTree.prototype.setCS = function(node) { + + var lastId; + + for (var n=0; n 0) { + $unseen_str = $unseen; + + // Add the total messages if desired + if ($settings['unreadNotificationDisplayTotal']) { + $unseen_str .= '/' . ($settings['unreadNotificationCummulative'] ? + $box['CummulativeMessageCount'] : + $box['MessageCount']); + } + + $unseen_str = '' . $unseen_str . + ''; + } + } + } + + /** + * Add folder icon. + */ + $img = ''; + $img_open = ''; + switch (true) { + case $box['IsInbox']: + $img = $image_path . 'base.gif'; + $img_open = $image_path . 'base.gif'; + break; + case $box['IsTrash']: + $img = $image_path . 'trash.gif'; + $img_open = $image_path . 'trash.gif'; + break; + case $box['IsNoSelect']: + case $box['IsNoInferiors']: + $img = $image_path . 'page.gif'; + $img_open = $image_path . 'page.gif'; + break; + default: + $img = $image_path . 'folder.gif'; + $img_open = $image_path . 'folderopen.gif'; + break; + } + + $display_folder = true; + if (!$settings['messageRecyclingEnabled'] && $box['IsTrash']) { + $display_folder = false; + } + + if($settings['messageRecyclingEnabled'] && $box['IsTrash']) { + // Boxes with unread messages should be emphasized + if ($box['UnreadCount'] > 0) { + $pre .= ''; + $end .= ''; + } + + // Print unread info + if ($box['UnreadCount'] > 0) { + if (!empty($unseen_str)) { + $end .= ' ('.$unseen_str.')'; + } + } + } else { + // Add a few other things for all other folders... + if (!$box['IsNoSelect']) { + // Boxes with unread messages should be emphasized + if ($box['UnreadCount'] > 0) { + $pre .= ''; + $end .= ''; + } + } + + // Display unread info... + if (!empty($unseen_str)) { + $end .= ' ('.$unseen_str.')'; + } + } + + $span = ''; + $spanend = ''; + if ($settings['useSpecialFolderColor'] && $box['IsSpecial']) { + $span = ''; + $spanend = ''; + } elseif ( $box['IsNoSelect'] ) { + $span = ''; + $spanend = ''; + } + + /** + * NOTE: Plugins would horribly break this advanced tree, so we are + * going to skip that part altogether. + */ + + $name = str_replace( + array(' ','<','>'), + array(' ','<','>'), + $box['MailboxName']); + $title = $name; + + if ($box['IsNoSelect']) { + $url = ''; + $target = ''; + } else { + $url = $box['ViewLink']['URL']; + $target = $box['ViewLink']['Target']; + $name = $span . $pre . $name . $end . $spanend; + } + + if ($display_folder) { + $out .= 'mailboxes.add('.$counter.', '.$parent_node.', ' . + '"'.addslashes($name).'", "'.$url.'", "'.$title.'", ' . + '"'.$target.'", ' . + '"'.$img.'", ' . + '"'.$img_open.'"' . + ');'."\n"; + } + } + + $parent_node = $counter; + for ($i = 0; $i + + +
+ +
+ + + + +
+ + + + +
+
+ + [] +
+
+

+Open All +  |   +Close All +'; + echo 'Purge Trash'; +} +?> +

+ +
+ +
\ No newline at end of file diff --git a/templates/default_advanced/stylesheet.tpl b/templates/default_advanced/stylesheet.tpl new file mode 100644 index 00000000..263fc316 --- /dev/null +++ b/templates/default_advanced/stylesheet.tpl @@ -0,0 +1,436 @@ + + *
  • SQM_BACKGROUND - background color + *
  • SQM_BACKGROUND_LEFT - background of folder tree + *
  • SQM_TEXT_STANDARD - text color + *
  • SQM_TEXT_STANDARD_LEFT - text color of folder tree + *
  • SQM_LINK - color of links + *
  • SQM_LINK_LEFT - color of links in folder tree + *
  • SQM_TEXT_SPECIAL - color of special folder links in folder tree + *
  • todo: other constants should be documented here + * + * + * Optional template variables + *
      + *
    • fontfamily - string with list of fonts used by selected style. + *
    • fontsize - integer with selected font size value. + *
    + * Variables are set to empty string, when value is not set. + * + * @copyright © 2005-2006 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package squirrelmail + * @subpackage templates + */ + +/* retrieve the template vars */ +extract($t); + +?> +/* older css template */ +body, td, th, dd, dt, h1, h2, h3, h4, h5, h6, p, ol, ul, li { + +} +body, small { + +} +td, th { + +} +textarea, pre { +font-family: monospace; + +} + +/* page body formatting */ +body { + color: ; + background-color: ; +} +body.sqm_leftMain { + color: ; + background-color: ; + text-align: left; +} + +/* right links */ +a:link, a:visited, a:hover, a:active { + color: ; +} + +/* left links */ +.sqm_leftMain a:link, .sqm_leftMain a:visited, .sqm_leftMain a:hover, .sqm_leftMain a:active { + color: ; +} +.leftunseen, .leftspecial, .leftspecial a:link, .leftspecial a:visited, .leftspecial a:hover, .leftspecial a:active { + color: ; +} +.leftrecent { + font-weight:bold; +} +.leftnoselect a:link, .leftnoselect a:visited, .leftnoselect a:hover, .leftnoselect a:active { + color: ; +} + +/* highlighted texts */ +.highlight { + color: ; +} + +/* left_main.tpl definitions */ +.sqm_wrapperTable { + border:0; + padding:0; + margin-left:auto; + margin-right:auto; + border-spacing:0; + width:99% + text-align:center; +} +sqm_leftMain table { + border:0; + padding:0; + margin:0; + border-spacing:0; + margin-left:auto; + margin-right:auto; +} +.sqm_folderHeader { + font-size:18px; + font-weight:bold; + text-align:center; +} +.sqm_clock { +} +.sqm_lastRefreshTime { + white-space: nowrap; +} +.sqm_refreshButton { +} + +.dtree { + font-size:11px; + white-space:nowrap; +} +.dtree p { + margin-top:12px; + margin-bottom:2px; + padding-bottom:4px; + text-align:center; + overflow: hidden; +} +.dtree a:hover { + text-decoration: underline; +} +.dtree a { + text-decoration:none; +} +.dtree img { + border:0; + vertical-align: middle; +} +.dtree a.node, .dtree a.nodeSel { + white-space: nowrap; + padding: 1px 2px 1px 2px; +} +.dtree a.node:hover, .dtree a.nodeSel:hover { + color: ; +} +.dtree a.nodeSel { + color: ; +} +.dtree .clip { + overflow: hidden; +} + +/* formating of error template */ +.thead_caption { + font-weight: bold; + text-align: center; +} + +.error_list { +} +.error_table { + color: ; + border: 2px solid ; + background-color: ; + width: 100%; +} +.error_thead { + background-color: ; +} +.error_thead_caption { + background-color: ; +} +.error_row { + color: ; +} +.error_val { + color: ; + width: 80%; + border: 2px solid ; + +} +.error_key { + width: 20%; + border: 2px solid ; + color: ; + font-weight: bold; + font-style: italic; + background-color: ; +} + +/* form fields */ +input.sqmtextfield{ +} +input.sqmpwfield { +} +input.sqmcheckbox { +} +input.sqmradiobox { +} +input.sqmhiddenfield { +} +input.sqmsubmitfield { +} +input.sqmresetfield { +} +input.sqmtextarea { +} + +/* basic definitions */ +.table_empty { + width:100%; + border:0; + margin:0; + padding:0; + border-spacing:0; +} + +.table_standard { + width:100%; + border:1px solid ; + padding:0; + margin:0; + border-spacing:0; +} + +em { + font-weight:bold; + font-style:normal; +} + +small { + font-size:80%; +} +img { + border:0; +} + +/* login.tpl definitions */ +#sqm_login table { + border:0; + margin:0; + padding:0; + border-spacing:0; + margin-left:auto; + margin-right:auto; +} +#sqm_login td { + padding:2px; +} + +.sqm_loginImage { + margin-left:auto; + margin-right:auto; + padding:2px; +} +.sqm_loginTop { + text-align:center; + font-size:80%; +} +.sqm_loginOrgName { + font-weight:bold; + text-align:center; + background: ; + width:350px; + border:0; +} +.sqm_loginFieldName { + text-align:right; + width:30%; +} +.sqm_loginFieldInput { + text-align:left; +} +.sqm_loginSubmit { + text-align:center; +} + +/* page_header.tpl definitions */ +.sqm_currentFolder { + background: ; + padding:2px; + text-align: ; +} +.sqm_headerSignout { + background: ; + padding:2px; + text-align: ; + font-weight:bold; +} +.sqm_topNavigation { + padding:2px; + text-align: ; +} +.sqm_providerInfo { + padding:2px; + text-align: ; +} + +/* message_list.tpl definitions */ +.table_messageListWrapper { + width:100%; + padding:0; + border-spacing:0; + border:0; + text-align:center; + margin-left:auto; + margin-right:auto; + background: ; +} + +.table_messageList { + width:100%; + padding:0; + border-spacing:0; + border:0; + text-align:center; + margin-left:auto; + margin-right:auto; + background: ; +} + +.table_messageList a { + white-space:nowrap; +} + +.table_messageList tr.headerRow { + text-align: ; + white-space:nowrap; + font-weight:bold; +} +.table_messageList td.spacer { + height:1px; + background: ; +} + +.table_messageList tr { + vertical-align:top; +} +.table_messageList tr.even { + background: ; +} +.table_messageList tr.odd { + background: ; +} +.table_messageList tr.mouse_over { + background: ; +} +.table_messageList tr.clicked { + background: ; +} + +.table_messageList td { + white-space:nowrap; +} +.table_messageList td.col_check { + text-align: ; +} +.table_messageList td.col_subject { + text-align: ; +} +.table_messageList td.col_flags { + text-align: ; +} +.table_messageList td.col_date { + text-align:center; +} +.table_messageList td.col_text { + text-align: ; +} + +.unread { + font-weight:bold; +} +.deleted { + color: ; +} +.flagged { + color: ; +} +.high_priority { + color: ; +} +.low_priority { + color: ; +} + +.col_checked { +} + +.links_paginator { + text-align: ; +} + +.message_count { + text-align:right; + font-size:8pt; +} + +.message_list_controls { + background: ; +} + +.message_control_button { + padding:0px; + margin:0px; +} +.message_control_buttons { + text-align: ; + font-size:10px; /* replaces tags to allow greater control of fonts w/ using an id. */ +} +.message_control_delete { + text-align: ; + font-size:10px; /* replaces tags to allow greater control of fonts w/ using an id. */ +} +.message_control_move { + text-align: ; + font-size:10px; /* replaces tags to allow greater control of fonts w/ using an id. */ +} + +.spacer { + height:5px; + background: ; +} + + diff --git a/templates/default_advanced/template.php b/templates/default_advanced/template.php new file mode 100644 index 00000000..625dfdbd --- /dev/null +++ b/templates/default_advanced/template.php @@ -0,0 +1,41 @@ + \ No newline at end of file