Adding button to cancel add group action. #15

Closed
wants to merge 10 commits into
from
View
@@ -4434,9 +4434,10 @@ function rcube_webmail()
return;
if (!this.name_input) {
- this.name_input = $('<input>').attr('type', 'text').data('tt', type);
+ this.name_input = $('<input>').attr('type', 'text').attr('style', 'margin-left:5px;').data('tt', type);
+ this.cancel_button = $('<a>').attr('class', 'canceladd').attr('onclick', 'rcmail.reset_add_input()').attr('href', '#');
this.name_input.bind('keydown', function(e){ return rcmail.add_input_keydown(e); });
- this.name_input_li = $('<li>').addClass(type).append(this.name_input);
+ this.name_input_li = $('<li>').addClass(type).append(this.cancel_button,this.name_input);
var li = type == 'contactsearch' ? $('li:last', this.gui_objects.folderlist) : $('ul.groups li:last', this.get_folder_li(this.env.source,'',true));
if (li.length)
@@ -179,6 +179,16 @@
background: url(images/icons/folders.png) 5px -108px no-repeat;
}
+#directorylist li a.canceladd {
+ background: url(images/icons/reset.gif) no-repeat;
+ display: inline;
+ margin-right: -13px;
+ margin-left: -12px;
+ padding-top: 0px;
+ cursor: auto;
+}
+
+#directorylist li.contactgroup,
#directorylist li ul li a
{
padding-left: 45px;
@@ -337,6 +337,15 @@ a.deletebutton {
background: url(images/buttons.png) -7px -377px no-repeat;
}
+#directorylist li a.canceladd {
+ background: url(images/buttons.png) -1000px 0 no-repeat;
+ background-position: -26px -317px;
+ display: inline;
+ padding: 4px 24px 5px 0px;
+ cursor: auto;
+ margin-left:5px;
+}
+
#import-box {
position: absolute;
bottom: 28px;
View
@@ -178,7 +178,7 @@ function rcube_mail_ui()
if (rcmail.env.action == '') {
new rcube_splitter({ id:'addressviewsplitterd', p1:'#addressview-left', p2:'#addressview-right',
- orientation:'v', relative:true, start:226, min:150, size:12, render:resize_leftcol }).init();
+ orientation:'v', relative:true, start:226, min:225, size:12, render:resize_leftcol }).init();
@jmatth

jmatth Jul 31, 2012

Without this the add group box and cancel button get squashed together when the div gets too small.

new rcube_splitter({ id:'addressviewsplitter', p1:'#addresslist', p2:'#contacts-box',
orientation:'v', relative:true, start:286, min:270, size:12 }).init();