Changeset 9b3fdc2 in github
- Timestamp:
- Mar 19, 2010 7:20:12 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 02f7cb8
- Parents:
- f093291
- Files:
-
- 1 added
- 12 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_imap.php (modified) (3 diffs)
-
program/include/rcube_template.php (modified) (1 diff)
-
program/js/app.js (modified) (7 diffs)
-
program/localization/en_US/labels.inc (modified) (1 diff)
-
program/localization/en_US/messages.inc (modified) (1 diff)
-
program/localization/pl_PL/labels.inc (modified) (1 diff)
-
program/localization/pl_PL/messages.inc (modified) (2 diffs)
-
program/steps/mail/copy.inc (added)
-
program/steps/mail/func.inc (modified) (3 diffs)
-
skins/default/common.css (modified) (1 diff)
-
skins/default/functions.js (modified) (4 diffs)
-
skins/default/templates/mail.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r15e00bd r9b3fdc2 2 2 =========================== 3 3 4 - Implemented messages copying using drag&drop + SHIFT (#1484086) 4 5 - Improved performance of folders operations (#1486525) 5 6 - Fix blocked.gif attachment is not attached to the message (#1486516) -
program/include/rcube_imap.php
r15e00bd r9b3fdc2 2203 2203 $from_mbox = $from_mbox ? $this->mod_mailbox($from_mbox) : $this->mailbox; 2204 2204 2205 // convert the list of uids to array 2206 $a_uids = is_string($uids) ? explode(',', $uids) : (is_array($uids) ? $uids : NULL); 2207 2208 // exit if no message uids are specified 2209 if (!is_array($a_uids) || empty($a_uids)) 2210 return false; 2211 2205 2212 // make sure mailbox exists 2206 2213 if ($to_mbox != 'INBOX' && !$this->mailbox_exists($tbox)) … … 2211 2218 return false; 2212 2219 } 2213 2214 // convert the list of uids to array2215 $a_uids = is_string($uids) ? explode(',', $uids) : (is_array($uids) ? $uids : NULL);2216 2217 // exit if no message uids are specified2218 if (!is_array($a_uids) || empty($a_uids))2219 return false;2220 2220 2221 2221 // flag messages as read before moving them … … 2267 2267 2268 2268 return $moved; 2269 } 2270 2271 2272 /** 2273 * Copy a message from one mailbox to another 2274 * 2275 * @param string List of UIDs to copy, separated by comma 2276 * @param string Target mailbox 2277 * @param string Source mailbox 2278 * @return boolean True on success, False on error 2279 */ 2280 function copy_message($uids, $to_mbox, $from_mbox='') 2281 { 2282 $fbox = $from_mbox; 2283 $tbox = $to_mbox; 2284 $to_mbox = $this->mod_mailbox($to_mbox); 2285 $from_mbox = $from_mbox ? $this->mod_mailbox($from_mbox) : $this->mailbox; 2286 2287 // convert the list of uids to array 2288 $a_uids = is_string($uids) ? explode(',', $uids) : (is_array($uids) ? $uids : NULL); 2289 2290 // exit if no message uids are specified 2291 if (!is_array($a_uids) || empty($a_uids)) 2292 return false; 2293 2294 // make sure mailbox exists 2295 if ($to_mbox != 'INBOX' && !$this->mailbox_exists($tbox)) 2296 { 2297 if (in_array($tbox, $this->default_folders)) 2298 $this->create_mailbox($tbox, true); 2299 else 2300 return false; 2301 } 2302 2303 // copy messages 2304 $iil_copy = iil_C_Copy($this->conn, join(',', $a_uids), $from_mbox, $to_mbox); 2305 $copied = !($iil_copy === false || $iil_copy < 0); 2306 2307 if ($copied) { 2308 $this->_clear_messagecount($to_mbox); 2309 } 2310 2311 return $copied; 2269 2312 } 2270 2313 -
program/include/rcube_template.php
rfe7d78a r9b3fdc2 861 861 $attrib['href'] = '#'; 862 862 } 863 if ($command ) {863 if ($command && !$attrib['onclick']) { 864 864 $attrib['onclick'] = sprintf( 865 865 "return %s.command('%s','%s',this)", -
program/js/app.js
rc16986b r9b3fdc2 198 198 if (this.env.action=='show' || this.env.action=='preview') 199 199 { 200 this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', ' delete',200 this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'copy', 'delete', 201 201 'open', 'mark', 'edit', 'viewsource', 'download', 'print', 'load-attachment', 'load-headers', true); 202 202 … … 673 673 else if (this.task == 'addressbook' && this.drag_active) 674 674 this.copy_contact(null, props); 675 break; 676 677 case 'copy': 678 if (this.task == 'mail') 679 this.copy_messages(props); 675 680 break; 676 681 … … 1195 1200 // handle mouse release when dragging 1196 1201 if (this.drag_active && model && this.env.last_folder_target) { 1202 var mbox = model[this.env.last_folder_target].id; 1203 1197 1204 $(this.get_folder_li(this.env.last_folder_target)).removeClass('droptarget'); 1198 this.command('moveto', model[this.env.last_folder_target].id);1199 1205 this.env.last_folder_target = null; 1200 1206 list.draglayer.hide(); 1207 1208 if (!this.drag_menu(e, mbox)) 1209 this.command('moveto', mbox); 1201 1210 } 1202 1211 … … 1208 1217 this.buttons_sel = {}; 1209 1218 } 1219 }; 1220 1221 this.drag_menu = function(e, mbox) 1222 { 1223 var modkey = rcube_event.get_modifier(e); 1224 var menu = $('#'+this.gui_objects.message_dragmenu); 1225 1226 if (menu && modkey == SHIFT_KEY) { 1227 var pos = rcube_event.get_mouse_pos(e); 1228 this.env.drag_mbox = mbox; 1229 menu.css({top: (pos.y-10)+'px', left: (pos.x-10)+'px'}).show(); 1230 return true; 1231 } 1232 }; 1233 1234 this.drag_menu_action = function(action) 1235 { 1236 var menu = $('#'+this.gui_objects.message_dragmenu); 1237 if (menu) { 1238 menu.hide(); 1239 } 1240 this.command(action, this.env.drag_mbox); 1241 this.env.drag_mbox = null; 1210 1242 }; 1211 1243 … … 1390 1422 this.enable_command('reply', 'reply-all', 'forward', false); 1391 1423 this.enable_command('show', 'print', 'open', 'edit', 'download', 'viewsource', selected); 1392 this.enable_command('delete', 'moveto', ' mark', (list.selection.length > 0 ? true : false));1424 this.enable_command('delete', 'moveto', 'copy', 'mark', (list.selection.length > 0 ? true : false)); 1393 1425 } 1394 1426 else 1395 1427 { 1396 1428 this.enable_command('show', 'reply', 'reply-all', 'forward', 'print', 'edit', 'open', 'download', 'viewsource', selected); 1397 this.enable_command('delete', 'moveto', ' mark', (list.selection.length > 0 ? true : false));1429 this.enable_command('delete', 'moveto', 'copy', 'mark', (list.selection.length > 0 ? true : false)); 1398 1430 } 1399 1431 … … 2120 2152 else 2121 2153 $(row.obj).removeClass('unroot'); 2154 }; 2155 2156 // copy selected messages to the specified mailbox 2157 this.copy_messages = function(mbox) 2158 { 2159 // exit if current or no mailbox specified or if selection is empty 2160 if (!mbox || mbox == this.env.mailbox || (!this.env.uid && (!this.message_list || !this.message_list.get_selection().length))) 2161 return; 2162 2163 var add_url = '&_target_mbox='+urlencode(mbox)+'&_from='+(this.env.action ? this.env.action : ''); 2164 var a_uids = new Array(); 2165 2166 if (this.env.uid) 2167 a_uids[0] = this.env.uid; 2168 else 2169 { 2170 var selection = this.message_list.get_selection(); 2171 var id; 2172 for (var n=0; n<selection.length; n++) { 2173 id = selection[n]; 2174 a_uids[a_uids.length] = id; 2175 } 2176 } 2177 2178 // send request to server 2179 this.http_post('copy', '_uid='+a_uids.join(',')+'&_mbox='+urlencode(this.env.mailbox)+add_url, false); 2122 2180 }; 2123 2181 … … 4626 4684 this.show_contentframe(false); 4627 4685 // disable commands useless when mailbox is empty 4628 this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', ' delete',4686 this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'copy', 'delete', 4629 4687 'mark', 'viewsource', 'open', 'edit', 'download', 'print', 'load-attachment', 4630 4688 'purge', 'expunge', 'select-all', 'select-none', 'sort', -
program/localization/en_US/labels.inc
rf52c936f r9b3fdc2 60 60 $labels['messagenrof'] = 'Message $nr of $count'; 61 61 62 $labels['copy'] = 'Copy'; 63 $labels['move'] = 'Move'; 62 64 $labels['moveto'] = 'Move to...'; 63 65 $labels['download'] = 'Download'; -
program/localization/en_US/messages.inc
re4acbbd r9b3fdc2 87 87 $messages['errorsavingcontact'] = 'Could not save the contact address'; 88 88 $messages['movingmessage'] = 'Moving message...'; 89 $messages['copyingmessage'] = 'Copying message...'; 89 90 $messages['receiptsent'] = 'Successfully sent a read receipt'; 90 91 $messages['errorsendingreceipt'] = 'Could not send the receipt'; -
program/localization/pl_PL/labels.inc
r71e7545 r9b3fdc2 54 54 $labels['messagenrof'] = 'WiadomoÅÄ $nr z $count'; 55 55 $labels['moveto'] = 'PrzenieÅ do...'; 56 $labels['move'] = 'PrzenieÅ'; 57 $labels['copy'] = 'Kopiuj'; 56 58 $labels['download'] = 'Pobierz'; 57 59 $labels['filename'] = 'Nazwa pliku'; -
program/localization/pl_PL/messages.inc
r71e7545 r9b3fdc2 7 7 | | 8 8 | Language file of the RoundCube Webmail client | 9 | Copyright (C) 2005-20 09, RoundCube Dev. - Switzerland |9 | Copyright (C) 2005-2010, RoundCube Dev. - Switzerland | 10 10 | Licensed under the GNU GPL | 11 11 | | … … 114 114 $messages['errorsavingcontact'] = 'Nie moÅŒna byÅo zapisaÄ adresu kontaktu'; 115 115 $messages['movingmessage'] = 'Przenoszenie wiadomoÅci...'; 116 $messages['copyingmessage'] = 'Kopiowanie wiadomoÅci...'; 116 117 $messages['receiptsent'] = 'PomyÅlnie wysÅano potwierdzenie dostarczenia'; 117 118 $messages['errorsendingreceipt'] = 'Nie moÅŒna wysÅaÄ potwierdzenia'; -
program/steps/mail/func.inc
r15e00bd r9b3fdc2 131 131 132 132 if (!$OUTPUT->ajax_call) 133 $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage'); 133 $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 134 'movingmessage', 'copyingmessage', 'copy', 'move'); 134 135 135 136 $OUTPUT->set_pagetitle(rcmail_localize_foldername($mbox_name)); … … 1458 1459 } 1459 1460 1460 1461 1461 function rcmail_search_filter($attrib) 1462 1462 { … … 1490 1490 return $out; 1491 1491 } 1492 1492 1493 1493 1494 // register UI objects -
skins/default/common.css
rc16986b r9b3fdc2 350 350 } 351 351 352 .popupmenu ul 353 { 354 margin: -4px 0; 355 padding: 0; 356 list-style: none; 357 } 358 359 .popupmenu ul li 360 { 361 font-size: 11px; 362 white-space: nowrap; 363 min-width: 100px; 364 margin: 3px -4px; 365 } 366 367 .popupmenu li a 368 { 369 display: block; 370 color: #a0a0a0; 371 padding: 2px 10px; 372 text-decoration: none; 373 min-height: 14px; 374 } 375 376 .popupmenu li a.active, 377 .popupmenu li a.active:active, 378 .popupmenu li a.active:visited 379 { 380 color: #333; 381 } 382 383 .popupmenu li a.active:hover 384 { 385 color: #fff; 386 background-color: #c00; 387 } 388 389 352 390 353 391 /***** common table settings ******/ -
skins/default/functions.js
rf52c936f r9b3fdc2 126 126 this.messagemenu = $('#messagemenu'); 127 127 this.listmenu = $('#listmenu'); 128 this.dragmessagemenu = $('#dragmessagemenu'); 128 129 } 129 130 … … 260 261 else if (this.messagemenu && this.messagemenu.is(':visible') && target != rcube_find_object('messagemenulink')) 261 262 this.show_messagemenu(false); 263 else if (this.dragmessagemenu && this.dragmessagemenu.is(':visible') && !rcube_mouse_is_over(evt, rcube_find_object('dragmessagemenu'))) 264 this.dragmessagemenu.hide(); 262 265 else if (this.listmenu && this.listmenu.is(':visible') && target != rcube_find_object('listmenulink')) { 263 266 var menu = rcube_find_object('listmenu'); … … 291 294 if (this.listmenu && this.listmenu.is(':visible')) 292 295 this.show_listmenu(false); 296 if (this.dragmessagemenu && this.dragmessagemenu.is(':visible')) 297 this.dragmessagemenu.hide(); 293 298 } 294 299 } … … 305 310 rcmail.addEventListener('menu-open', 'open_listmenu', rcmail_ui); 306 311 rcmail.addEventListener('menu-save', 'save_listmenu', rcmail_ui); 307 } 312 rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); 313 } -
skins/default/templates/mail.html
rf52c936f r9b3fdc2 153 153 </div> 154 154 155 <div id="dragmessagemenu" class="popupmenu"> 156 <ul> 157 <li><roundcube:button command="moveto" onclick="return rcmail.drag_menu_action('moveto')" label="move" classAct="active" /></li> 158 <li><roundcube:button command="copy" onclick="return rcmail.drag_menu_action('copy')" label="copy" classAct="active" /></li> 159 </ul> 160 </div> 161 155 162 <div id="listmenu" class="popupmenu"> 156 163 <fieldset class="thinbordered"><legend><roundcube:label name="listmode" /></legend>
Note: See TracChangeset
for help on using the changeset viewer.
