Changeset 2610 in subversion
- Timestamp:
- Jun 5, 2009 4:12:26 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/js/app.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/js/app.js
r2607 r2610 1266 1266 if (height = li.firstChild.offsetHeight) { 1267 1267 pos = $(li.firstChild).offset(); 1268 this.env.folder_coords[k] = { x1:pos.left, y1:pos.top, x2:pos.left + li.firstChild.offsetWidth, y2:pos.top + height, on:0 }; 1268 this.env.folder_coords[k] = { x1:pos.left, y1:pos.top, 1269 x2:pos.left + li.firstChild.offsetWidth, y2:pos.top + height, on:0 }; 1269 1270 } 1270 1271 } … … 1276 1277 { 1277 1278 this.drag_active = false; 1279 this.env.last_folder_target = null; 1278 1280 1279 1281 // over the folders 1280 1282 if (this.gui_objects.folderlist && this.env.folder_coords) { 1281 1283 for (var k in this.env.folder_coords) { 1282 if ( k == this.env.last_folder_target) {1284 if (this.env.folder_coords[k].on) 1283 1285 $(this.get_folder_li(k)).removeClass('droptarget'); 1284 this.env.last_folder_target = null;1285 }1286 1286 } 1287 1287 } … … 1299 1299 mouse = rcube_event.get_mouse_pos(e); 1300 1300 pos = this.env.folderlist_coords; 1301 1302 1301 mouse.y += toffset; 1303 1302 1304 1303 // if mouse pointer is outside of folderlist 1305 1304 if (mouse.x < pos.x1 || mouse.x >= pos.x2 || mouse.y < pos.y1 || mouse.y >= pos.y2) { 1306 if (this.env.last_folder_target) {1305 if (this.env.last_folder_target) { 1307 1306 $(this.get_folder_li(this.env.last_folder_target)).removeClass('droptarget'); 1308 this.env.last_folder_target = null; 1309 } 1307 this.env.folder_coords[this.env.last_folder_target].on = 0; 1308 this.env.last_folder_target = null; 1309 } 1310 1310 return; 1311 1311 } 1312 1312 1313 1313 var last = this.env.last_folder_target; 1314 1314 1315 // over the folders 1315 1316 for (var k in this.env.folder_coords) { 1316 1317 pos = this.env.folder_coords[k]; 1317 if ((mouse.x >= pos.x1) && (mouse.x < pos.x2) 1318 && (mouse.y >= pos.y1) && (mouse.y < pos.y2) 1318 if (mouse.x >= pos.x1 && mouse.x < pos.x2 && mouse.y >= pos.y1 && mouse.y < pos.y2 1319 1319 && this.check_droptarget(k)) { 1320 if (k == last)1321 continue;1322 1320 $(this.get_folder_li(k)).addClass('droptarget'); 1323 1321 this.env.last_folder_target = k; 1324 1322 this.env.folder_coords[k].on = 1; 1325 1323 } 1326 else if (pos.on){ 1327 if (k == last) 1328 this.env.last_folder_target = null; 1324 else if (pos.on) { 1325 $(this.get_folder_li(k)).removeClass('droptarget'); 1329 1326 this.env.folder_coords[k].on = 0; 1330 $(this.get_folder_li(k)).removeClass('droptarget');1331 1327 } 1332 1328 }
Note: See TracChangeset
for help on using the changeset viewer.
