| Index: branches/RL2/extensions/Gadgets/modules/ext.gadgets.gadgetmanager.css |
| — | — | @@ -23,6 +23,13 @@ |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
| | 27 | + * Gadget list |
| | 28 | + */ |
| | 29 | +.client-js .mw-gadgets-gadget:hover { |
| | 30 | + cursor: pointer; |
| | 31 | +} |
| | 32 | + |
| | 33 | +/** |
| 27 | 34 | * The PropCloud |
| 28 | 35 | */ |
| 29 | 36 | .mw-gadgetmanager-propcloud { |
| Index: branches/RL2/extensions/Gadgets/modules/ext.gadgets.gadgetmanager.js |
| — | — | @@ -142,6 +142,26 @@ |
| 143 | 143 | } |
| 144 | 144 | } ); |
| 145 | 145 | |
| | 146 | + // Entire gadget list item is clickable |
| | 147 | + $( '.mw-gadgets-gadget' ).click( function( e ) { |
| | 148 | + e.preventDefault(); |
| | 149 | + var t, |
| | 150 | + id = $( this ).data( 'gadget-id' ); |
| | 151 | + |
| | 152 | + if ( ga.conf.userIsAllowed['gadgets-definition-edit'] ) { |
| | 153 | + ga.ui.startGadgetEditor( id ); |
| | 154 | + return; |
| | 155 | + } |
| | 156 | + // Use localized page name if possible to avoid redirect |
| | 157 | + if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Gadgets' ) { |
| | 158 | + t = new mw.Title( mw.config.get( 'wgTitle' ) + '/' + id, -1 ); |
| | 159 | + } else { |
| | 160 | + t = new mw.Title( 'Gadgets/' + id, -1 ); |
| | 161 | + } |
| | 162 | + window.location.href = t.getUrl(); |
| | 163 | + return false; |
| | 164 | + } ); |
| | 165 | + |
| 146 | 166 | if ( ga.conf.userIsAllowed['gadgets-definition-create'] ) { |
| 147 | 167 | var createTab = mw.util.addPortletLink( |
| 148 | 168 | // Not all skins use the new separated tabs yet, |