summaryrefslogtreecommitdiff
path: root/skins/default
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-03-09 13:23:24 +0000
committeralecpl <alec@alec.pl>2012-03-09 13:23:24 +0000
commit4be86f3a3779ef86be30e8451750130569d2cacd (patch)
tree9dc44ebaf3f064609bd92b5a1a7e0118c0cbdedc /skins/default
parent84d6e279e339cacaea4d3eb61290d54af1c1009b (diff)
- Unified (single) spellchecker button
Diffstat (limited to 'skins/default')
-rw-r--r--skins/default/common.css14
-rw-r--r--skins/default/functions.js38
-rw-r--r--skins/default/images/messageicons.gifbin1998 -> 2030 bytes
-rw-r--r--skins/default/images/messageicons.pngbin4062 -> 4098 bytes
-rw-r--r--skins/default/mail.css11
-rw-r--r--skins/default/templates/compose.html12
6 files changed, 72 insertions, 3 deletions
diff --git a/skins/default/common.css b/skins/default/common.css
index 31ecbe905..57fc1275a 100644
--- a/skins/default/common.css
+++ b/skins/default/common.css
@@ -495,6 +495,7 @@ body.iframe .boxtitle
padding: 2px 10px;
text-decoration: none;
min-height: 14px;
+ background: transparent;
}
.popupmenu li a.active,
@@ -504,7 +505,8 @@ body.iframe .boxtitle
color: #333;
}
-.popupmenu li a.active:hover
+.popupmenu li a.active:hover,
+.popupmenu.selectable li a.selected:hover
{
color: #fff;
background-color: #c00;
@@ -515,6 +517,16 @@ body.iframe .boxtitle
float: left;
}
+.popupmenu.selectable li a.selected
+{
+ background: url(images/messageicons.png) 2px -372px no-repeat;
+}
+
+.popupmenu.selectable li a
+{
+ padding-left: 20px;
+}
+
.darkbg
{
background-color: #F2F2F2 !important;
diff --git a/skins/default/functions.js b/skins/default/functions.js
index aab386b5e..fb7a05d4b 100644
--- a/skins/default/functions.js
+++ b/skins/default/functions.js
@@ -102,6 +102,7 @@ function rcube_mail_ui()
groupmenu: {id:'groupoptionsmenu', above:1},
mailboxmenu: {id:'mailboxoptionsmenu', above:1},
composemenu: {id:'composeoptionsmenu', editable:1, overlap:1},
+ spellmenu: {id:'spellmenu'},
// toggle: #1486823, #1486930
uploadmenu: {id:'attachment-form', editable:1, above:1, toggle:!bw.ie&&!bw.linux },
uploadform: {id:'upload-form', editable:1, toggle:!bw.ie&&!bw.linux }
@@ -351,6 +352,43 @@ save_listmenu: function()
rcmail.set_list_options(cols, sort, ord, thread == 'thread' ? 1 : 0);
},
+spellmenu: function(show)
+{
+ var link, li,
+ lang = rcmail.spellcheck_lang(),
+ menu = this.popups.spellmenu.obj,
+ ul = $('ul', menu);
+
+ if (!ul.length) {
+ ul = $('<ul>');
+
+ for (i in rcmail.env.spell_langs) {
+ li = $('<li>');
+ link = $('<a href="#">').text(rcmail.env.spell_langs[i])
+ .addClass('active').data('lang', i)
+ .click(function() {
+ rcmail.spellcheck_lang_set($(this).data('lang'));
+ });
+
+ link.appendTo(li);
+ li.appendTo(ul);
+ }
+
+ ul.appendTo(menu);
+ }
+
+ // select current language
+ $('li', ul).each(function() {
+ var el = $('a', this);
+ if (el.data('lang') == lang)
+ el.addClass('selected');
+ else if (el.hasClass('selected'))
+ el.removeClass('selected');
+ });
+
+ this.show_popupmenu('spellmenu', show);
+},
+
body_mouseup: function(evt, p)
{
var i, target = rcube_event.get_target(evt);
diff --git a/skins/default/images/messageicons.gif b/skins/default/images/messageicons.gif
index 80423dd1e..5c681e354 100644
--- a/skins/default/images/messageicons.gif
+++ b/skins/default/images/messageicons.gif
Binary files differ
diff --git a/skins/default/images/messageicons.png b/skins/default/images/messageicons.png
index d45f065ea..99038c732 100644
--- a/skins/default/images/messageicons.png
+++ b/skins/default/images/messageicons.png
Binary files differ
diff --git a/skins/default/mail.css b/skins/default/mail.css
index 33ddc08c6..b884eda87 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -38,6 +38,17 @@
opacity: 0.35;
}
+#messagetoolbar a.button.selected {
+ background-color: #ddd;
+ margin-left: 4px;
+ margin-right: 4px;
+ margin-top: -1px;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+}
+
#messagetoolbar a.checkmailSel {
background-position: 0 -32px;
}
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index 208c8263c..285a783a1 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -3,7 +3,9 @@
<head>
<title><roundcube:object name="productname" /> :: <roundcube:label name="compose" /></title>
<roundcube:include file="/includes/links.html" />
+<roundcube:if condition="config:enable_spellcheck" />
<link rel="stylesheet" type="text/css" href="/googiespell.css" />
+<roundcube:endif />
<script type="text/javascript" src="/functions.js"></script>
<script type="text/javascript" src="/splitter.js"></script>
<style type="text/css">
@@ -23,7 +25,12 @@
<div id="messagetoolbar">
<roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " />
<roundcube:button command="send" type="link" class="buttonPas send" classAct="button send" classSel="button sendSel" title="sendmessage" content=" " />
- <roundcube:button command="spellcheck" type="link" class="buttonPas spellcheck" classAct="button spellcheck" classSel="button spellcheckSel" title="checkspelling" content=" " />
+<roundcube:if condition="config:enable_spellcheck" />
+ <span class="dropbutton">
+ <roundcube:button command="spellcheck" type="link" class="buttonPas spellcheck" classAct="button spellcheck" classSel="button spellcheckSel" title="checkspelling" content=" " />
+ <span id="spellmenulink" onclick="rcmail_ui.show_popup('spellmenu');return false"></span>
+ </span>
+<roundcube:endif />
<roundcube:button name="addattachment" type="link" class="button attach" classAct="button attach" classSel="button attachSel" title="addattachment" onclick="rcmail_ui.show_popup('uploadmenu', true);return false" content=" " />
<roundcube:button command="insert-sig" type="link" class="buttonPas insertsig" classAct="button insertsig" classSel="button insertsigSel" title="insertsignature" content=" " />
<roundcube:button command="savedraft" type="link" class="buttonPas savedraft" classAct="button savedraft" classSel="button savedraftSel" title="savemessage" content=" " />
@@ -111,7 +118,6 @@
<roundcube:button type="input" command="list" class="button" label="cancel" tabindex="11" />
</div>
<div id="compose-editorfooter">
- <span id="spellcheck-control" style="margin-right:10px"></span>
<roundcube:if condition="!in_array('htmleditor', (array)config:dont_override)" />
<span>
<label><roundcube:label name="editortype" /></label>
@@ -143,6 +149,8 @@
</table>
</div>
+<div id="spellmenu" class="popupmenu selectable"></div>
+
</form>
<roundcube:object name="composeAttachmentForm" id="attachment-form" attachmentFieldSize="40" class="popupmenu" />