From c16986be7f5f4df21bfc85a93a2c35f38c86bf12 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 17 Mar 2010 14:21:07 -0400
Subject: [PATCH] - use popupmenu style for attachments upload form - move .popupmenu style definition to common.css
---
skins/default/common.css | 21 ++++++++++++++++++++-
program/steps/mail/compose.inc | 2 +-
skins/default/mail.css | 26 --------------------------
skins/default/templates/compose.html | 2 +-
program/js/app.js | 6 +++---
5 files changed, 25 insertions(+), 32 deletions(-)
diff --git a/program/js/app.js b/program/js/app.js
index 7aca3d8..87ee76c 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2832,7 +2832,7 @@
{
if (!this.gui_objects.uploadbox)
return false;
-
+
var elm, list;
if (elm = this.gui_objects.uploadbox)
{
@@ -2842,8 +2842,8 @@
elm.style.top = (pos.top + list.offsetHeight + 10) + 'px';
elm.style.left = pos.left + 'px';
}
-
- elm.style.visibility = a ? 'visible' : 'hidden';
+
+ $(elm).toggle();
}
// clear upload form
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index a5b0a34..a8b2fa5 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -901,7 +901,7 @@
html::div(null, rcmail_compose_attachment_field(array('size' => $attrib[attachmentfieldsize]))) .
html::div('hint', rcube_label(array('name' => 'maxuploadsize', 'vars' => array('size' => $max_filesize)))) .
html::div('buttons',
- $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "document.getElementById('$attrib[id]').style.visibility='hidden'")) . ' ' .
+ $button->show(rcube_label('close'), array('class' => 'button', 'onclick' => "$('#$attrib[id]').hide()")) . ' ' .
$button->show(rcube_label('upload'), array('class' => 'button mainaction', 'onclick' => JS_OBJECT_NAME . ".command('send-attachment', this.form)"))
)
)
diff --git a/skins/default/common.css b/skins/default/common.css
index 44bb4f5..5977087 100644
--- a/skins/default/common.css
+++ b/skins/default/common.css
@@ -330,6 +330,25 @@
padding-right: 10px;
}
+.popupmenu
+{
+ position: absolute;
+ top: 32px;
+ left: 90px;
+ width: auto;
+ display: none;
+ background-color: #fff;
+ background-color: rgba(255, 255, 255, 0.95);
+ border: 1px solid #999;
+ padding: 4px;
+ z-index: 240;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ -moz-box-shadow: 1px 1px 12px #999;
+ -webkit-box-shadow: #999 1px 1px 12px;
+}
+
/***** common table settings ******/
@@ -532,7 +551,7 @@
opacity: 0.8;
}
-
+
/***** onclick menu list *****/
ul.toolbarmenu
diff --git a/skins/default/mail.css b/skins/default/mail.css
index 7d1cb33..6b105ac 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -164,25 +164,6 @@
padding-left: 2px;
}
-.popupmenu
-{
- position: absolute;
- top: 32px;
- left: 90px;
- width: auto;
- display: none;
- background-color: #fff;
- background-color: rgba(255, 255, 255, 0.95);
- border: 1px solid #999;
- padding: 4px;
- z-index: 240;
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- -moz-box-shadow: 1px 1px 12px #999;
- -webkit-box-shadow: #999 1px 1px 12px;
-}
-
#searchmenu
{
width: 160px;
@@ -1304,14 +1285,7 @@
#attachment-form
{
- position: absolute;
- top: 150px;
- left: 20px;
- z-index: 200;
padding: 6px;
- visibility: hidden;
- border: 1px solid #CCCCCC;
- background-color: #F9F9F9;
}
#attachment-form div
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index 661ec4d..3b9cd40 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -101,7 +101,7 @@
</form>
-<roundcube:object name="composeAttachmentForm" id="attachment-form" attachmentFieldSize="40" />
+<roundcube:object name="composeAttachmentForm" id="attachment-form" attachmentFieldSize="40" class="popupmenu" />
</body>
</html>
--
Gitblit v1.9.1