]> granicus.if.org Git - transmission/commitdiff
(trunk web) remove cruft from Transmission.onRowClicked()
authorJordan Lee <jordan@transmissionbt.com>
Thu, 25 Aug 2011 09:21:05 +0000 (09:21 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Thu, 25 Aug 2011 09:21:05 +0000 (09:21 +0000)
web/javascript/transmission.js

index bfd3ea9bc1b9aa379d45f226b46127f6dbf42db2..e4d4edb7bec353af1d5fa0167234fc1dd7a71d93 100644 (file)
@@ -1584,50 +1584,50 @@ Transmission.prototype =
                this.remote.getInitialDataFor(null ,function(torrents) { tr.addTorrents(torrents); });
        },
 
-        onRowClicked: function(ev, row)
-        {
-                // Prevents click carrying to parent element
-                // which deselects all on click
-                ev.stopPropagation();
-                // but still hide the context menu if it is showing
-                $('#jqContextMenu').hide();
-
-                // 'Apple' button emulation on PC :
-                // Need settable meta-key and ctrl-key variables for mac emulation
-                var meta_key = ev.metaKey;
-                if (ev.ctrlKey && navigator.appVersion.toLowerCase().indexOf("mac") == -1)
-                        meta_key = true;
-
-                // Shift-Click - selects a range from the last-clicked row to this one
-                if (iPhone) {
-                        if (row.isSelected())
-                                this.showInspector();
-                        this.setSelectedRow(row, true);
-
-                } else if (ev.shiftKey) {
-                        this.selectRange(row, true);
-                        // Need to deselect any selected text
-                        window.focus();
-
-                // Apple-Click, not selected
-                } else if (!row.isSelected() && meta_key) {
-                        this.selectRow(row, true);
-
-                // Regular Click, not selected
-                } else if (!row.isSelected()) {
-                        this.setSelectedRow(row, true);
-
-                // Apple-Click, selected
-                } else if (row.isSelected() && meta_key) {
-                        this.deselectRow(row);
-
-                // Regular Click, selected
-                } else if (row.isSelected()) {
-                        this.setSelectedRow(row, true);
-                }
+       onRowClicked: function(ev, row)
+       {
+               // Prevents click carrying to parent element
+               // which deselects all on click
+               ev.stopPropagation();
+               // but still hide the context menu if it is showing
+               $('#jqContextMenu').hide();
+
+               // 'Apple' button emulation on PC :
+               // Need settable meta-key and ctrl-key variables for mac emulation
+               var meta_key = ev.metaKey;
+               if (ev.ctrlKey && navigator.appVersion.toLowerCase().indexOf("mac") == -1)
+                       meta_key = true;
+
+               // Shift-Click - selects a range from the last-clicked row to this one
+               if (iPhone) {
+                       if (row.isSelected())
+                               this.showInspector();
+                       this.setSelectedRow(row);
+
+               } else if (ev.shiftKey) {
+                       this.selectRange(row);
+                       // Need to deselect any selected text
+                       window.focus();
+
+               // Apple-Click, not selected
+               } else if (!row.isSelected() && meta_key) {
+                       this.selectRow(row);
+
+               // Regular Click, not selected
+               } else if (!row.isSelected()) {
+                       this.setSelectedRow(row);
+
+               // Apple-Click, selected
+               } else if (row.isSelected() && meta_key) {
+                       this.deselectRow(row);
+
+               // Regular Click, selected
+               } else if (row.isSelected()) {
+                       this.setSelectedRow(row);
+               }
 
                this._last_torrent_clicked = row.getTorrent().getId();
-        },
+       },
 
        addTorrents: function(new_torrents)
        {