From fe83748f02fa9828f272172a4197ec3aca05f428 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 08 Mar 2012 05:42:08 -0500
Subject: [PATCH] - Larry: Add quota indicator in folder manager

---
 skins/larry/templates/folders.html |    3 +++
 skins/larry/styles.css             |   14 ++++++++++++--
 skins/larry/mail.css               |   10 ----------
 skins/larry/ui.js                  |    4 +++-
 4 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/skins/larry/mail.css b/skins/larry/mail.css
index 04caad4..8737a42 100644
--- a/skins/larry/mail.css
+++ b/skins/larry/mail.css
@@ -934,16 +934,6 @@
 	border: 0;
 }
 
-#quotadisplay {
-	left: 6px;
-	font-size: 12px;
-	font-weight: bold;
-	text-shadow: 0px 1px 1px #fff;
-	padding-left: 30px;
-	height: 18px;
-	background: url(images/quota.png) -100px 0 no-repeat;
-}
-
 /*** message composition ***/
 
 #composeview-left {
diff --git a/skins/larry/styles.css b/skins/larry/styles.css
index 268b55d..f2d05a9 100644
--- a/skins/larry/styles.css
+++ b/skins/larry/styles.css
@@ -1475,6 +1475,18 @@
 }
 
 
+/*** quota indicator ***/
+
+#quotadisplay {
+	left: 6px;
+	font-size: 12px;
+	font-weight: bold;
+	text-shadow: 0px 1px 1px #fff;
+	padding-left: 30px;
+	height: 18px;
+	background: url(images/quota.png) -100px 0 no-repeat;
+}
+
 /*** popup menus ***/
 
 .popupmenu,
@@ -1922,5 +1934,3 @@
 	padding: 0;
 	margin-left: 0;
 }
-
-
diff --git a/skins/larry/templates/folders.html b/skins/larry/templates/folders.html
index e7238f3..54616be 100644
--- a/skins/larry/templates/folders.html
+++ b/skins/larry/templates/folders.html
@@ -21,6 +21,9 @@
 </div>
 <div class="boxfooter">
 	<roundcube:button command="create-folder" type="link" title="createfolder" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="mailboxmenulink" id="mailboxmenulink" type="link" title="folderactions" class="listbutton groupactions" onclick="UI.show_popup('mailboxmenu');return false" innerClass="inner" content="&#9881;" />
+	<roundcube:if condition="env:quota" />
+		<roundcube:object name="quotaDisplay" id="quotadisplay" class="countdisplay" display="text" />
+	<roundcube:endif />
 </div>
 </div>
 
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index d7ef9ae..8a66a8c 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -134,6 +134,8 @@
       if (rcmail.env.action == 'folders') {
         new rcube_splitter({ id:'folderviewsplitter', p1:'#folderslist', p2:'#folder-details',
           orientation:'v', relative:true, start:305, min:150, size:12 }).init();
+
+        rcmail.addEventListener('setquota', update_quota);
       }
       else if (rcmail.env.action == 'identities') {
         new rcube_splitter({ id:'identviewsplitter', p1:'#identitieslist', p2:'#identity-details',
@@ -337,7 +339,7 @@
     else {
       $('#googie_edit_layer').height(h+'px');
     }
-    
+
     var abooks = $('#directorylist');
     $('#compose-contacts .scroller').css('top', abooks.position().top + abooks.outerHeight());
   }

--
Gitblit v1.9.1