[Svn] r2957 - in trunk/roundcubemail: . plugins/archive plugins/archive/skins plugins/archive/skins/default plugins/markasjunk plugins/markasjunk/skins plugins/markasjunk/skins/default

trac at roundcube.net trac at roundcube.net
Tue Sep 15 15:47:13 CEST 2009


Author: alec
Date: 2009-09-15 08:47:12 -0500 (Tue, 15 Sep 2009)
New Revision: 2957

Added:
   trunk/roundcubemail/plugins/archive/skins/
   trunk/roundcubemail/plugins/archive/skins/default/
   trunk/roundcubemail/plugins/archive/skins/default/archive_act.png
   trunk/roundcubemail/plugins/archive/skins/default/archive_pas.png
   trunk/roundcubemail/plugins/archive/skins/default/foldericon.png
   trunk/roundcubemail/plugins/markasjunk/skins/
   trunk/roundcubemail/plugins/markasjunk/skins/default/
   trunk/roundcubemail/plugins/markasjunk/skins/default/junk_act.png
   trunk/roundcubemail/plugins/markasjunk/skins/default/junk_pas.png
Removed:
   trunk/roundcubemail/plugins/archive/archive_act.png
   trunk/roundcubemail/plugins/archive/archive_pas.png
   trunk/roundcubemail/plugins/archive/foldericon.png
   trunk/roundcubemail/plugins/markasjunk/junk_act.png
   trunk/roundcubemail/plugins/markasjunk/junk_pas.png
Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/plugins/archive/archive.js
   trunk/roundcubemail/plugins/archive/archive.php
   trunk/roundcubemail/plugins/markasjunk/markasjunk.php
Log:
- Support skins in 'archive' and 'markasjunk' plugins


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2009-09-15 08:21:02 UTC (rev 2956)
+++ trunk/roundcubemail/CHANGELOG	2009-09-15 13:47:12 UTC (rev 2957)
@@ -1,6 +1,7 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Support skins in 'archive' and 'markasjunk' plugins
 - Added 'html_editor' hook (#1486068)
 - Fix DB constraint violation when populating messages cache (#1486052)
 - Password: added password strength options (#1486062)

Modified: trunk/roundcubemail/plugins/archive/archive.js
===================================================================
--- trunk/roundcubemail/plugins/archive/archive.js	2009-09-15 08:21:02 UTC (rev 2956)
+++ trunk/roundcubemail/plugins/archive/archive.js	2009-09-15 13:47:12 UTC (rev 2957)
@@ -29,8 +29,8 @@
     
     // set css style for archive folder
     var li;
-    if (rcmail.env.archive_folder && (li = rcmail.get_folder_li(rcmail.env.archive_folder)))
-      $(li).css('background-image', 'url(plugins/archive/foldericon.png)');
+    if (rcmail.env.archive_folder && rcmail.env.archive_folder_icon && (li = rcmail.get_folder_li(rcmail.env.archive_folder)))
+      $(li).css('background-image', 'url(' + rcmail.env.archive_folder_icon + ')');
   })
 }
 

Modified: trunk/roundcubemail/plugins/archive/archive.php
===================================================================
--- trunk/roundcubemail/plugins/archive/archive.php	2009-09-15 08:21:02 UTC (rev 2956)
+++ trunk/roundcubemail/plugins/archive/archive.php	2009-09-15 13:47:12 UTC (rev 2957)
@@ -17,18 +17,22 @@
   {
     $this->register_action('plugin.archive', array($this, 'request_action'));
 
-    # There is no "Archived flags"
-    # $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
+    // There is no "Archived flags"
+    // $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
     
     $rcmail = rcmail::get_instance();
-    if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show') && ($archive_folder = $rcmail->config->get('archive_mbox'))) {
+    if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show')
+      && ($archive_folder = $rcmail->config->get('archive_mbox'))) {
+
+      $skin_path = 'skins/'.$rcmail->output->config['skin'];
+
       $this->include_script('archive.js');
       $this->add_texts('localization', true);
       $this->add_button(
         array(
             'command' => 'plugin.archive',
-            'imagepas' => 'archive_pas.png',
-            'imageact' => 'archive_act.png',
+            'imagepas' => $skin_path.'/archive_pas.png',
+            'imageact' => $skin_path.'/archive_act.png',
             'title' => 'buttontitle',
             'domain' => $this->ID,
         ),
@@ -39,13 +43,13 @@
 
       // set env variable for client
       $rcmail->output->set_env('archive_folder', $archive_folder);
+      $rcmail->output->set_env('archive_folder_icon', $this->url($skin_path.'/foldericon.png'));
 
       // add archive folder to the list of default mailboxes
       if (($default_folders = $rcmail->config->get('default_imap_folders')) && !in_array($archive_folder, $default_folders)) {
         $default_folders[] = $archive_folder;
         $rcmail->config->set('default_imap_folders', $default_folders);
-      }
-      
+      }  
     }
     else if ($rcmail->task == 'settings') {
       $dont_override = $rcmail->config->get('dont_override', array());

Deleted: trunk/roundcubemail/plugins/archive/archive_act.png
===================================================================
(Binary files differ)

Deleted: trunk/roundcubemail/plugins/archive/archive_pas.png
===================================================================
(Binary files differ)

Deleted: trunk/roundcubemail/plugins/archive/foldericon.png
===================================================================
(Binary files differ)

Added: trunk/roundcubemail/plugins/archive/skins/default/archive_act.png
===================================================================
(Binary files differ)


Property changes on: trunk/roundcubemail/plugins/archive/skins/default/archive_act.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/roundcubemail/plugins/archive/skins/default/archive_pas.png
===================================================================
(Binary files differ)


Property changes on: trunk/roundcubemail/plugins/archive/skins/default/archive_pas.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/roundcubemail/plugins/archive/skins/default/foldericon.png
===================================================================
(Binary files differ)


Property changes on: trunk/roundcubemail/plugins/archive/skins/default/foldericon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Deleted: trunk/roundcubemail/plugins/markasjunk/junk_act.png
===================================================================
(Binary files differ)

Deleted: trunk/roundcubemail/plugins/markasjunk/junk_pas.png
===================================================================
(Binary files differ)

Modified: trunk/roundcubemail/plugins/markasjunk/markasjunk.php
===================================================================
--- trunk/roundcubemail/plugins/markasjunk/markasjunk.php	2009-09-15 08:21:02 UTC (rev 2956)
+++ trunk/roundcubemail/plugins/markasjunk/markasjunk.php	2009-09-15 13:47:12 UTC (rev 2957)
@@ -20,10 +20,13 @@
     
     $rcmail = rcmail::get_instance();
     if ($rcmail->action == '' || $rcmail->action == 'show') {
+      $skin_path = 'skins/'.$rcmail->output->config['skin'];
       $this->include_script('markasjunk.js');
       $this->add_texts('localization', true);
-      $this->add_button(array('command' => 'plugin.markasjunk', 'imagepas' => 'junk_pas.png',
-        'imageact' => 'junk_act.png', 'title' => 'markasjunk.buttontitle'), 'toolbar');
+      $this->add_button(array('command' => 'plugin.markasjunk',
+        'imagepas' => $skin_path.'/junk_pas.png',
+        'imageact' => $skin_path.'/junk_act.png',
+	'title' => 'markasjunk.buttontitle'), 'toolbar');
     }
   }
 

Added: trunk/roundcubemail/plugins/markasjunk/skins/default/junk_act.png
===================================================================
(Binary files differ)


Property changes on: trunk/roundcubemail/plugins/markasjunk/skins/default/junk_act.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/roundcubemail/plugins/markasjunk/skins/default/junk_pas.png
===================================================================
(Binary files differ)


Property changes on: trunk/roundcubemail/plugins/markasjunk/skins/default/junk_pas.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list