Index: trunk/extensions/CentralNotice/special/SpecialBannerController.php |
— | — | @@ -197,23 +197,8 @@ |
198 | 198 | } |
199 | 199 | // This function is deprecated |
200 | 200 | function toggleNotice() { |
201 | | - var notice = document.getElementById('centralNotice'); |
202 | | - if (!wgNoticeToggleState) { |
203 | | - notice.className = notice.className.replace('collapsed', 'expanded'); |
204 | | - toggleNoticeCookie('0'); // Expand banners |
205 | | - } else { |
206 | | - notice.className = notice.className.replace('expanded', 'collapsed'); |
207 | | - toggleNoticeCookie('1'); // Collapse banners |
208 | | - } |
209 | | - wgNoticeToggleState = !wgNoticeToggleState; |
| 201 | + hideBanner(); |
210 | 202 | } |
211 | | -// This function is deprecated |
212 | | -function toggleNoticeCookie(state) { |
213 | | - var e = new Date(); |
214 | | - e.setTime( e.getTime() + (7*24*60*60*1000) ); // one week |
215 | | - var work='hidesnmessage='+state+'; expires=' + e.toGMTString() + '; path=/'; |
216 | | - document.cookie = work; |
217 | | -} |
218 | 203 | |
219 | 204 | JAVASCRIPT; |
220 | 205 | return $script; |
Index: trunk/extensions/CentralNotice/centralnotice.js |
— | — | @@ -67,15 +67,9 @@ |
68 | 68 | var bannerField = document.getElementById('templateBody'); |
69 | 69 | switch( buttonType ) { |
70 | 70 | case 'close': // Insert close button |
71 | | - if ( $( '#fundraising' ).is( ':checked' ) ) { |
72 | | - var buttonValue = '<a href="#" onclick="hideBanner(\'fundraising\');return false;">' |
73 | | - + '<img border="0" src="' + mw.config.get( 'stylepath' ) |
74 | | - + '/common/images/closewindow.png" alt="Close" /></a>'; |
75 | | - } else { |
76 | | - var buttonValue = '<a href="#" onclick="hideBanner();return false;">' |
77 | | - + '<img border="0" src="' + mw.config.get( 'stylepath' ) |
78 | | - + '/common/images/closewindow.png" alt="Close" /></a>'; |
79 | | - } |
| 71 | + var buttonValue = '<a href="#" onclick="hideBanner();return false;">' |
| 72 | + + '<img border="0" src="' + mw.config.get( 'stylepath' ) |
| 73 | + + '/common/images/closewindow.png" alt="Close" /></a>'; |
80 | 74 | break; |
81 | 75 | } |
82 | 76 | if (document.selection) { |