Changeset 8529
- Timestamp:
- May 25, 2009, 3:46:25 PM (14 years ago)
- Location:
- trunk/web/javascript
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/javascript/torrent.js
r8527 r8529 44 44 top_e.className = 'torrent'; 45 45 top_e.id = 'torrent_' + data.id; 46 top_e._torrent = this; 46 47 var element = $(top_e); 47 48 element._torrent = this; … … 95 96 // Set the torrent click observer 96 97 element.bind('click', {element: element}, this.clickTorrent); 97 if (!iPhone) element.bind('contextmenu', {element: element}, this.rightClickTorrent);98 98 99 99 // Safari hack - first torrent needs to be moved down for some reason. Seems to be ok when … … 148 148 this._element = element; 149 149 element._torrent = this; 150 element[0]._torrent = this; 150 151 this.refreshHTML( ); 151 152 }, … … 207 208 * 208 209 *--------------------------------------------*/ 209 210 /*211 * Process a right-click event on this torrent212 */213 rightClickTorrent: function(event)214 {215 // don't stop the event! need it for the right-click menu216 217 var t = event.data.element._torrent;218 if ( !t.isSelected( ) )219 t._controller.setSelectedTorrent( t );220 },221 210 222 211 /* -
trunk/web/javascript/transmission.js
r8527 r8529 289 289 boundingElement: $('div#torrent_container'), 290 290 boundingRightPad: 20, 291 boundingBottomPad: 5 291 boundingBottomPad: 5, 292 onContextMenu: function(e) { 293 tr.setSelectedTorrent( $(e.target).closest('.torrent')[0]._torrent, true ); 294 return true; 295 } 292 296 }); 293 297 },
Note: See TracChangeset
for help on using the changeset viewer.