Changeset 9e55503 in github
- Timestamp:
- Jul 9, 2010 3:18:06 PM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- c7f7ce8
- Parents:
- c33e08a
- Location:
- skins/default
- Files:
-
- 7 edited
-
common.css (modified) (1 diff)
-
functions.js (modified) (12 diffs)
-
templates/addressbook.html (modified) (2 diffs)
-
templates/compose.html (modified) (2 diffs)
-
templates/mail.html (modified) (3 diffs)
-
templates/message.html (modified) (2 diffs)
-
templates/messageerror.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
skins/default/common.css
r087c7dc r9e55503 534 534 } 535 535 536 #searchm od536 #searchmenulink 537 537 { 538 538 position: absolute; -
skins/default/functions.js
rb218aa7 r9e55503 28 28 function rcube_mail_ui() 29 29 { 30 this.popup menus = {31 markmenu: 'markmessagemenu',32 searchmenu: 'searchmenu',33 messagemenu: 'messagemenu',34 listmenu: 'listmenu',35 dragmessagemenu: 'dragmessagemenu',36 groupmenu: 'groupoptionsmenu',37 mailboxmenu: 'mailboxoptionsmenu',38 composemenu: 'composeoptionsmenu',39 upload form:'attachment-form'30 this.popups = { 31 markmenu: {id:'markmessagemenu'}, 32 searchmenu: {id:'searchmenu', editable:1}, 33 messagemenu: {id:'messagemenu'}, 34 listmenu: {id:'listmenu', editable:1}, 35 dragmessagemenu:{id:'dragmessagemenu', sticky:1}, 36 groupmenu: {id:'groupoptionsmenu', above:1}, 37 mailboxmenu: {id:'mailboxoptionsmenu', above:1}, 38 composemenu: {id:'composeoptionsmenu', editable:1}, 39 uploadmenu: {id:'attachment-form', editable:1, above:1} 40 40 }; 41 41 42 42 var obj; 43 for (var k in this.popup menus) {44 obj = $('#'+this.popup menus[k])43 for (var k in this.popups) { 44 obj = $('#'+this.popups[k].id) 45 45 if (obj.length) 46 this[k] = obj; 46 this.popups[k].obj = obj; 47 else { 48 delete this.popups[k]; 49 } 47 50 } 48 51 } … … 50 53 rcube_mail_ui.prototype = { 51 54 52 show_popupmenu: function(obj, refname, show, above) 53 { 55 show_popup: function(popup, show) 56 { 57 if (typeof this[popup] == 'function') 58 return this[popup](show); 59 else 60 return this.show_popupmenu(popup, show); 61 }, 62 63 show_popupmenu: function(popup, show) 64 { 65 var obj = this.popups[popup].obj, 66 above = this.popups[popup].above, 67 ref = rcube_find_object(popup+'link'); 68 54 69 if (typeof show == 'undefined') 55 70 show = obj.is(':visible') ? false : true; 56 71 57 var ref = rcube_find_object(refname);58 72 if (show && ref) { 59 73 var pos = $(ref).offset(); … … 66 80 }, 67 81 68 show_markmenu: function(show) 69 { 70 this.show_popupmenu(this.markmenu, 'markreadbutton', show); 71 }, 72 73 show_messagemenu: function(show) 74 { 75 this.show_popupmenu(this.messagemenu, 'messagemenulink', show); 76 }, 77 78 show_groupmenu: function(show) 79 { 80 this.show_popupmenu(this.groupmenu, 'groupactionslink', show, true); 81 }, 82 83 show_mailboxmenu: function(show) 84 { 85 this.show_popupmenu(this.mailboxmenu, 'mboxactionslink', show, true); 86 }, 87 88 show_composemenu: function(show) 89 { 90 this.show_popupmenu(this.composemenu, 'composemenulink', show); 91 }, 92 93 show_uploadform: function(show) 82 dragmessagemenu: function(show) 83 { 84 this.popups.dragmessagemenu.obj[show?'show':'hide'](); 85 }, 86 87 uploadmenu: function(show) 94 88 { 95 89 if (typeof show == 'object') // called as event handler … … 98 92 $('#attachment-form input[type=file]').val(''); 99 93 100 this.show_popupmenu( this.uploadform, 'uploadformlink', show, true);101 102 if (this. uploadform.is(':visible'))94 this.show_popupmenu('uploadmenu', show); 95 96 if (this.popups.uploadmenu.obj.is(':visible')) 103 97 $('#attachment-form input[type=file]').click(); 104 98 }, 105 99 106 show_searchmenu: function(show) 107 { 100 searchmenu: function(show) 101 { 102 var obj = this.popups.searchmenu.obj, 103 ref = rcube_find_object('searchmenulink'); 104 108 105 if (typeof show == 'undefined') 109 show = this.searchmenu.is(':visible') ? false : true; 110 111 var ref = rcube_find_object('searchmod'); 106 show = obj.is(':visible') ? false : true; 107 112 108 if (show && ref) { 113 109 var pos = $(ref).offset(); 114 this.searchmenu.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)});115 this.searchmenu.find(":checked").attr('checked', false);110 obj.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}) 111 .find(':checked').attr('checked', false); 116 112 117 113 if (rcmail.env.search_mods) { … … 121 117 } 122 118 } 123 this.searchmenu[show?'show':'hide']();119 obj[show?'show':'hide'](); 124 120 }, 125 121 … … 138 134 }, 139 135 140 show_listmenu: function(show) 141 { 136 listmenu: function(show) 137 { 138 var obj = this.popups.listmenu.obj, 139 ref = rcube_find_object('listmenulink'); 140 142 141 if (typeof show == 'undefined') 143 show = this.listmenu.is(':visible') ? false : true; 144 145 var ref = rcube_find_object('listmenulink'); 142 show = obj.is(':visible') ? false : true; 143 146 144 if (show && ref) { 147 145 var pos = $(ref).offset(), 148 menuwidth = this.listmenu.width(),146 menuwidth = obj.width(), 149 147 pagewidth = $(document).width(); 150 148 … … 152 150 pos.left = pos.left - menuwidth; 153 151 154 this.listmenu.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)});152 obj.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}); 155 153 // set form values 156 154 $('input[name="sort_col"][value="'+rcmail.env.sort_col+'"]').attr('checked', 1); … … 172 170 } 173 171 174 this.listmenu[show?'show':'hide']();172 obj[show?'show':'hide'](); 175 173 176 174 if (show) { … … 192 190 open_listmenu: function(e) 193 191 { 194 this. show_listmenu();192 this.listmenu(); 195 193 }, 196 194 197 195 save_listmenu: function() 198 196 { 199 this. show_listmenu();197 this.listmenu(); 200 198 201 199 var sort = $('input[name="sort_col"]:checked').val(), … … 210 208 body_mouseup: function(evt, p) 211 209 { 212 var target = rcube_event.get_target(evt); 213 214 if (this.markmenu && this.markmenu.is(':visible') && target != rcube_find_object('markreadbutton')) 215 this.show_markmenu(false); 216 else if (this.messagemenu && this.messagemenu.is(':visible') && target != rcube_find_object('messagemenulink')) 217 this.show_messagemenu(false); 218 else if (this.dragmessagemenu && this.dragmessagemenu.is(':visible') && !rcube_mouse_is_over(evt, rcube_find_object('dragmessagemenu'))) 219 this.dragmessagemenu.hide(); 220 else if (this.groupmenu && this.groupmenu.is(':visible') && target != rcube_find_object('groupactionslink')) 221 this.show_groupmenu(false); 222 else if (this.mailboxmenu && this.mailboxmenu.is(':visible') && target != rcube_find_object('mboxactionslink')) 223 this.show_mailboxmenu(false); 224 else if (this.composemenu && this.composemenu.is(':visible') && target != rcube_find_object('composemenulink') 225 && !this.target_overlaps(target, this.popupmenus.composemenu)) { 226 this.show_composemenu(false); 227 } 228 else if (this.uploadform && this.uploadform.is(':visible') && target != rcube_find_object('uploadformlink') 229 && !this.target_overlaps(target, this.popupmenus.uploadform)) { 230 this.show_uploadform(false); 231 } 232 else if (this.listmenu && this.listmenu.is(':visible') && target != rcube_find_object('listmenulink') 233 && !this.target_overlaps(target, this.popupmenus.listmenu)) { 234 this.show_listmenu(false); 235 } 236 else if (this.searchmenu && this.searchmenu.is(':visible') && target != rcube_find_object('searchmod') 237 && !this.target_overlaps(target, this.popupmenus.searchmenu)) { 238 this.show_searchmenu(false); 210 var i, target = rcube_event.get_target(evt); 211 212 for (i in this.popups) { 213 if (this.popups[i].obj.is(':visible') && target != rcube_find_object(i+'link') 214 && (!this.popups[i].editable || !this.target_overlaps(target, this.popups[i].id)) 215 && (!this.popups[i].sticky || !rcube_mouse_is_over(evt, rcube_find_object(this.popups[i].id))) 216 ) { 217 this.show_popup(i, false); 218 } 239 219 } 240 220 }, … … 254 234 { 255 235 if (rcube_event.get_keycode(evt) == 27) { 256 for (var k in this.popup menus) {257 if (this [k] && this[k].is(':visible'))258 this [k].hide();236 for (var k in this.popups) { 237 if (this.popups[k].obj.is(':visible')) 238 this.show_popup(k, false); 259 239 } 260 240 } … … 448 428 rcmail.addEventListener('menu-open', 'open_listmenu', rcmail_ui); 449 429 rcmail.addEventListener('menu-save', 'save_listmenu', rcmail_ui); 450 rcmail.addEventListener('aftersend-attachment', ' show_uploadform', rcmail_ui);430 rcmail.addEventListener('aftersend-attachment', 'uploadmenu', rcmail_ui); 451 431 rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui); 452 432 rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); -
skins/default/templates/addressbook.html
r087c7dc r9e55503 30 30 31 31 <div id="quicksearchbar"> 32 <roundcube:button name="searchm od" id="searchmod" image="/images/icons/glass.png" />32 <roundcube:button name="searchmenulink" id="searchmenulink" image="/images/icons/glass.png" /> 33 33 <roundcube:object name="searchform" id="quicksearchbox" /> 34 34 <roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" /> … … 43 43 <div class="boxfooter"> 44 44 <roundcube:button command="group-create" type="link" title="newcontactgroup" class="buttonPas addgroup" classAct="button addgroup" content=" " /> 45 <roundcube:button name="group actions" id="groupactionslink" type="link" title="groupactions" class="button groupactions" onclick="rcmail_ui.show_groupmenu();return false" content=" " />45 <roundcube:button name="groupmenulink" id="groupmenulink" type="link" title="groupactions" class="button groupactions" onclick="rcmail_ui.show_popup('groupmenu');return false" content=" " /> 46 46 </div> 47 47 </div> -
skins/default/templates/compose.html
rc33e08a r9e55503 25 25 <roundcube:button command="send" type="link" class="buttonPas send" classAct="button send" classSel="button sendSel" title="sendmessage" content=" " /> 26 26 <roundcube:button command="spellcheck" type="link" class="buttonPas spellcheck" classAct="button spellcheck" classSel="button spellcheckSel" title="checkspelling" content=" " /> 27 <roundcube:button name="addattachment" type="link" class="button attach" classAct="button attach" classSel="button attachSel" title="addattachment" onclick="rcmail_ui.show_ uploadform();return false" content=" " />27 <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=" " /> 28 28 <roundcube:button command="insert-sig" type="link" class="buttonPas insertsig" classAct="button insertsig" classSel="button insertsigSel" title="insertsignature" content=" " /> 29 29 <roundcube:button command="savedraft" type="link" class="buttonPas savedraft" classAct="button savedraft" classSel="button savedraftSel" title="savemessage" content=" " /> 30 30 <roundcube:container name="toolbar" id="compose-toolbar" /> 31 <roundcube:button name="messageoptions" id="composemenulink" type="link" class="button messagemenu" title="messageoptions" onclick="rcmail_ui.show_ composemenu();return false" content=" " />31 <roundcube:button name="messageoptions" id="composemenulink" type="link" class="button messagemenu" title="messageoptions" onclick="rcmail_ui.show_popup('composemenu', true);return false" content=" " /> 32 32 </div> 33 33 … … 40 40 </div> 41 41 <div class="boxfooter"> 42 <roundcube:button name="upload form" id="uploadformlink" type="link" title="addattachment" class="button addgroup" onclick="rcmail_ui.show_uploadform();return false" content=" " />42 <roundcube:button name="uploadmenulink" id="uploadmenulink" type="link" title="addattachment" class="button addgroup" onclick="rcmail_ui.show_popup('uploadmenu', true);return false" content=" " /> 43 43 </div> 44 44 </div> -
skins/default/templates/mail.html
r087c7dc r9e55503 32 32 </div> 33 33 <div class="boxfooter"> 34 <!--<roundcube:button name="togglequota" type="link" title="showquota" class="buttonPas showinfo" classAct="button showinfo" onclick="rcmail_ui.toggle_quotadisplay();return false" content=" " />--> 35 <roundcube:button name="mboxactions" id="mboxactionslink" type="link" title="folderactions" class="button groupactions" onclick="rcmail_ui.show_mailboxmenu();return false" content=" " /> 34 <roundcube:button name="mailboxmenulink" id="mailboxmenulink" type="link" title="folderactions" class="button groupactions" onclick="rcmail_ui.show_popup('mailboxmenu');return false" content=" " /> 36 35 37 36 <roundcube:if condition="env:quota" /> … … 126 125 <roundcube:button command="delete" type="link" class="buttonPas delete" classAct="button delete" classSel="button deleteSel" title="deletemessage" content=" " /> 127 126 <roundcube:container name="toolbar" id="messagetoolbar" /> 128 <roundcube:button name="mark readbutton" id="markreadbutton" type="link" class="button markmessage" title="markmessages" onclick="rcmail_ui.show_markmenu();return false" content=" " />129 <roundcube:button name="messagemenulink" id="messagemenulink" type="link" class="button messagemenu" title="messageactions" onclick="rcmail_ui.show_ messagemenu();return false" content=" " />127 <roundcube:button name="markmenulink" id="markmenulink" type="link" class="button markmessage" title="markmessages" onclick="rcmail_ui.show_popup('markmenu');return false" content=" " /> 128 <roundcube:button name="messagemenulink" id="messagemenulink" type="link" class="button messagemenu" title="messageactions" onclick="rcmail_ui.show_popup('messagemenu');return false" content=" " /> 130 129 </div> 131 130 … … 158 157 <roundcube:object name="searchfilter" class="searchfilter" /> 159 158 </div> 160 <roundcube:button name="searchm od" id="searchmod" image="/images/icons/glass_roll.png" onclick="rcmail_ui.show_searchmenu();return false" title="searchmod" />159 <roundcube:button name="searchmenulink" id="searchmenulink" image="/images/icons/glass_roll.png" onclick="rcmail_ui.show_popup('searchmenu');return false" title="searchmod" /> 161 160 <roundcube:object name="searchform" id="quicksearchbox" /> 162 161 <roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" /> -
skins/default/templates/message.html
r087c7dc r9e55503 26 26 <roundcube:button command="delete" type="link" class="buttonPas delete" classAct="button delete" classSel="button deleteSel" title="deletemessage" content=" " /> 27 27 <roundcube:container name="toolbar" id="messagetoolbar" /> 28 <roundcube:button name="messagemenulink" id="messagemenulink" type="link" class="button messagemenu" title="messageactions" onclick="rcmail_ui.show_ messagemenu();return false" content=" " />28 <roundcube:button name="messagemenulink" id="messagemenulink" type="link" class="button messagemenu" title="messageactions" onclick="rcmail_ui.show_popup('messagemenu');return false" content=" " /> 29 29 <roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mboxlist" /> 30 30 </div> … … 40 40 </div> 41 41 <div class="boxfooter"> 42 <roundcube:button name="m boxactions" id="mboxactionslink" type="link" title="folderactions" class="button groupactions" onclick="rcmail_ui.show_mailboxmenu();return false" content=" " />42 <roundcube:button name="mailboxmenulink" id="mailboxmenulink" type="link" title="folderactions" class="button groupactions" onclick="rcmail_ui.show_popup('mailboxmenu');return false" content=" " /> 43 43 </div> 44 44 </div> -
skins/default/templates/messageerror.html
r087c7dc r9e55503 46 46 </div> 47 47 <div class="boxfooter"> 48 <roundcube:button name="m boxactions" id="mboxactionslink" type="link" title="folderactions" class="button groupactions" onclick="rcmail_ui.show_mailboxmenu();return false" content=" " />48 <roundcube:button name="mailboxmenulink" id="mailboxmenulink" type="link" title="folderactions" class="button groupactions" onclick="rcmail_ui.show_popup('mailboxmenu');return false" content=" " /> 49 49 </div> 50 50 </div>
Note: See TracChangeset
for help on using the changeset viewer.
