[Svn] r3728 - in trunk/roundcubemail: program/include program/localization/de_CH program/localization/de_DE program/localization/en_US skins/default skins/default/templates

trac at roundcube.net trac at roundcube.net
Tue Jun 8 22:50:15 CEST 2010


Author: thomasb
Date: 2010-06-08 15:50:15 -0500 (Tue, 08 Jun 2010)
New Revision: 3728

Modified:
   trunk/roundcubemail/program/include/rcube_template.php
   trunk/roundcubemail/program/localization/de_CH/labels.inc
   trunk/roundcubemail/program/localization/de_DE/labels.inc
   trunk/roundcubemail/program/localization/en_US/labels.inc
   trunk/roundcubemail/skins/default/addressbook.css
   trunk/roundcubemail/skins/default/common.css
   trunk/roundcubemail/skins/default/functions.js
   trunk/roundcubemail/skins/default/settings.css
   trunk/roundcubemail/skins/default/templates/addressbook.html
   trunk/roundcubemail/skins/default/templates/editidentity.html
   trunk/roundcubemail/skins/default/templates/identities.html
   trunk/roundcubemail/skins/default/templates/mail.html
   trunk/roundcubemail/skins/default/templates/message.html
Log:
Unify directory/mailbox list actions

Modified: trunk/roundcubemail/program/include/rcube_template.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_template.php	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/program/include/rcube_template.php	2010-06-08 20:50:15 UTC (rev 3728)
@@ -770,7 +770,6 @@
      */
     public function button($attrib)
     {
-        static $sa_buttons = array();
         static $s_button_count = 100;
 
         // these commands can be called directly via url
@@ -787,26 +786,11 @@
         else {
             $attrib['type'] = ($attrib['image'] || $attrib['imagepas'] || $attrib['imageact']) ? 'image' : 'link';
         }
+
         $command = $attrib['command'];
 
-        // take the button from the stack
-        if ($attrib['name'] && $sa_buttons[$attrib['name']]) {
-            $attrib = $sa_buttons[$attrib['name']];
-        }
-        else if($attrib['image'] || $attrib['imageact'] || $attrib['imagepas'] || $attrib['class']) {
-            // add button to button stack
-            if (!$attrib['name']) {
-                $attrib['name'] = $command;
-            }
-            if (!$attrib['image']) {
-                $attrib['image'] = $attrib['imagepas'] ? $attrib['imagepas'] : $attrib['imageact'];
-            }
-            $sa_buttons[$attrib['name']] = $attrib;
-        }
-        else if ($command && $sa_buttons[$command]) {
-            // get saved button for this command/name
-            $attrib = $sa_buttons[$command];
-        }
+        if ($attrib['task'])
+          $command = $attrib['task'] . '.' . $command;
 
         if (!$attrib['id']) {
             $attrib['id'] =  sprintf('rcmbtn%d', $s_button_count++);
@@ -849,6 +833,9 @@
             if (in_array($attrib['command'], rcmail::$main_tasks)) {
                 $attrib['href'] = rcmail_url(null, null, $attrib['command']);
             }
+            else if ($attrib['task'] && in_array($attrib['task'], rcmail::$main_tasks)) {
+                $attrib['href'] = rcmail_url($attrib['command'], null, $attrib['task']);
+            }
             else if (in_array($attrib['command'], $a_static_commands)) {
                 $attrib['href'] = rcmail_url($attrib['command']);
             }
@@ -861,7 +848,11 @@
         if (!$attrib['href']) {
             $attrib['href'] = '#';
         }
-        if ($command && !$attrib['onclick']) {
+        if ($attrib['task']) {
+            if ($attrib['classact'])
+                $attrib['class'] = $attrib['classact'];
+        }
+        else if ($command && !$attrib['onclick']) {
             $attrib['onclick'] = sprintf(
                 "return %s.command('%s','%s',this)",
                 JS_OBJECT_NAME,

Modified: trunk/roundcubemail/program/localization/de_CH/labels.inc
===================================================================
--- trunk/roundcubemail/program/localization/de_CH/labels.inc	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/program/localization/de_CH/labels.inc	2010-06-08 20:50:15 UTC (rev 3728)
@@ -148,6 +148,7 @@
 $labels['listsorting'] = 'Sortierung';
 $labels['listorder'] = 'Ordnung';
 $labels['listmode'] = 'Anzeigemodus';
+$labels['folderactions'] = 'Ordneraktionen...';
 $labels['compact'] = 'Packen';
 $labels['empty'] = 'Leeren';
 $labels['purge'] = 'Aufräumen';

Modified: trunk/roundcubemail/program/localization/de_DE/labels.inc
===================================================================
--- trunk/roundcubemail/program/localization/de_DE/labels.inc	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/program/localization/de_DE/labels.inc	2010-06-08 20:50:15 UTC (rev 3728)
@@ -148,6 +148,7 @@
 $labels['listsorting'] = 'Sortierung';
 $labels['listorder'] = 'Ordnung';
 $labels['listmode'] = 'Anzeigemodus';
+$labels['folderactions'] = 'Ordneraktionen...';
 $labels['compact'] = 'Packen';
 $labels['empty'] = 'Leeren';
 $labels['purge'] = 'Bereinigen';

Modified: trunk/roundcubemail/program/localization/en_US/labels.inc
===================================================================
--- trunk/roundcubemail/program/localization/en_US/labels.inc	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/program/localization/en_US/labels.inc	2010-06-08 20:50:15 UTC (rev 3728)
@@ -177,6 +177,7 @@
 $labels['listorder'] = 'Sorting order';
 $labels['listmode'] = 'List view mode';
 
+$labels['folderctions'] = 'Folder actions...';
 $labels['compact'] = 'Compact';
 $labels['empty'] = 'Empty';
 $labels['purge'] = 'Purge';

Modified: trunk/roundcubemail/skins/default/addressbook.css
===================================================================
--- trunk/roundcubemail/skins/default/addressbook.css	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/skins/default/addressbook.css	2010-06-08 20:50:15 UTC (rev 3728)
@@ -110,65 +110,12 @@
   overflow: hidden;
 }
 
-#directorylistwarp
-{
-  position: absolute;
-  top: 20px;
-  bottom: 22px;
-  left: 0;
-  right: 0;
-  overflow-y: auto;
-  overflow-x: hidden;
-}
-
-#groups-title
-{
-  position: absolute;
-  top: 0;
-  left: 0;
-  right: 0;
-}
-
 #directorylistbox input
 {
   display: absolute;
   margin: 2px;
 }
 
-#directorylistbuttons
-{
-  display: block;
-  position: absolute;
-  bottom: 0px;
-  left: 0px;
-  right: 0px;
-  height: 22px;
-  border-top: 1px solid #999;
-  background: url('images/listheader.gif') top left repeat-x #CCC;
-}
-
-#directorylistbuttons a.button,
-#directorylistbuttons a.buttonPas
-{
-  display: block;
-  float: left;
-  width: 34px;
-  height: 22px;
-  padding: 0px;
-  margin: 0;
-  overflow: hidden;
-  background: url('images/icons/groupactions.png') 0 0 no-repeat transparent;
-  opacity: 0.99; /* this is needed to make buttons appear correctly in Chrome */
-}
-
-#directorylistbuttons a.groupactions {
-  background-position: 0 -26px;
-}
-
-#directorylistbuttons a.buttonPas {
-  opacity: 0.35;
-}
-
 #addresslist
 {
   position: absolute;

Modified: trunk/roundcubemail/skins/default/common.css
===================================================================
--- trunk/roundcubemail/skins/default/common.css	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/skins/default/common.css	2010-06-08 20:50:15 UTC (rev 3728)
@@ -389,8 +389,60 @@
   background-color: #c00;
 }
 
-    
+#directorylist-title
+{
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+}
 
+#directorylistwarp
+{
+  position: absolute;
+  top: 20px;
+  bottom: 22px;
+  left: 0;
+  right: 0;
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+
+#directorylistbuttons
+{
+  display: block;
+  position: absolute;
+  bottom: 0px;
+  left: 0px;
+  right: 0px;
+  height: 22px;
+  border-top: 1px solid #999;
+  background: url('images/listheader.gif') top left repeat-x #CCC;
+}
+
+#directorylistbuttons a.button,
+#directorylistbuttons a.buttonPas
+{
+  display: block;
+  float: left;
+  width: 34px;
+  height: 22px;
+  padding: 0px;
+  margin: 0;
+  overflow: hidden;
+  background: url('images/icons/groupactions.png') 0 0 no-repeat transparent;
+  opacity: 0.99; /* this is needed to make buttons appear correctly in Chrome */
+}
+
+#directorylistbuttons a.groupactions {
+  background-position: 0 -26px;
+}
+
+#directorylistbuttons a.buttonPas {
+  opacity: 0.35;
+}
+
+
 /***** common table settings ******/
 
 table.records-table thead tr td
@@ -655,6 +707,7 @@
   margin: 0 2px;
 }
 
+div.popupmenu ul li.separator_below,
 ul.toolbarmenu li.separator_below
 {
   border-bottom: 1px solid #ccc;
@@ -662,6 +715,7 @@
   padding-bottom: 2px;
 }
 
+div.popupmenu ul li.separator_above,
 ul.toolbarmenu li.separator_above
 {
   border-top: 1px solid #ccc;

Modified: trunk/roundcubemail/skins/default/functions.js
===================================================================
--- trunk/roundcubemail/skins/default/functions.js	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/skins/default/functions.js	2010-06-08 20:50:15 UTC (rev 3728)
@@ -131,7 +131,8 @@
     messagemenu:'messagemenu',
     listmenu:'listmenu',
     dragmessagemenu:'dragmessagemenu',
-    groupmenu:'groupoptionsmenu'
+    groupmenu:'groupoptionsmenu',
+    mailboxmenu:'mailboxoptionsmenu'
   };
   
   var obj;
@@ -173,6 +174,11 @@
   this.show_popupmenu(this.groupmenu, 'groupactionslink', show, true);
 },
 
+show_mailboxmenu: function(show)
+{
+  this.show_popupmenu(this.mailboxmenu, 'mboxactionslink', show, true);
+},
+
 show_searchmenu: function(show)
 {
   if (typeof show == 'undefined')
@@ -289,6 +295,8 @@
     this.dragmessagemenu.hide();
   else if (this.groupmenu &&  this.groupmenu.is(':visible') && target != rcube_find_object('groupactionslink'))
     this.show_groupmenu(false);
+  else if (this.mailboxmenu &&  this.mailboxmenu.is(':visible') && target != rcube_find_object('mboxactionslink'))
+    this.show_mailboxmenu(false);
   else if (this.listmenu && this.listmenu.is(':visible') && target != rcube_find_object('listmenulink')) {
     var menu = rcube_find_object('listmenu');
     while (target.parentNode) {

Modified: trunk/roundcubemail/skins/default/settings.css
===================================================================
--- trunk/roundcubemail/skins/default/settings.css	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/skins/default/settings.css	2010-06-08 20:50:15 UTC (rev 3728)
@@ -75,11 +75,22 @@
 
 #identities-list
 {
-  bottom: 60px;
+  bottom: 30px;
   width: 420px;
   border: 1px solid #999999;
 }
 
+#identitieslistwarp
+{
+  position: absolute;
+  top: 0px;
+  bottom: 22px;
+  left: 0;
+  right: 0;
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+
 #listbuttons
 {
   position: absolute;
@@ -192,7 +203,7 @@
   top: 95px;
   left: 450px;
   right: 20px;
-  bottom: 60px;
+  bottom: 30px;
   border: 1px solid #999999;
   overflow: auto;
   background-color: #F2F2F2;

Modified: trunk/roundcubemail/skins/default/templates/addressbook.html
===================================================================
--- trunk/roundcubemail/skins/default/templates/addressbook.html	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/skins/default/templates/addressbook.html	2010-06-08 20:50:15 UTC (rev 3728)
@@ -35,7 +35,7 @@
 </div>
 
 <div id="directorylistbox">
-<div id="groups-title" class="boxtitle"><roundcube:label name="groups" /></div>
+<div id="directorylist-title" class="boxtitle"><roundcube:label name="groups" /></div>
 <div id="directorylistwarp">
   <roundcube:object name="directorylist" id="directorylist" />
   <roundcube:object name="groupslist" id="contactgroupslist" />

Modified: trunk/roundcubemail/skins/default/templates/editidentity.html
===================================================================
--- trunk/roundcubemail/skins/default/templates/editidentity.html	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/skins/default/templates/editidentity.html	2010-06-08 20:50:15 UTC (rev 3728)
@@ -12,13 +12,14 @@
 <roundcube:include file="/includes/settingstabs.html" />
 
 <div id="identities-list">
+<div id="identitieslistwarp">
 <roundcube:object name="identitiesList" id="identities-table" class="records-table" cellspacing="0" summary="Identities list" editIcon="" />
 </div>
+<div id="directorylistbuttons">
+<roundcube:button command="add" type="link" title="newidentity" class="buttonPas addgroup" classAct="button addgroup" content=" " condition="config:identities_level:0<2" />
+</div>
+</div>
 
-<p id="listbuttons">
-<roundcube:button command="add" type="input" label="newidentity" class="button" condition="config:identities_level:0<2" />
-</p>
-
 <div id="identity-details">
 <div id="identity-title" class="boxtitle"><roundcube:object name="steptitle" /></div>
 

Modified: trunk/roundcubemail/skins/default/templates/identities.html
===================================================================
--- trunk/roundcubemail/skins/default/templates/identities.html	2010-06-08 13:39:57 UTC (rev 3727)
+++ trunk/roundcubemail/skins/defaul