Index: trunk/phase3/skins/common/preview.js |
— | — | @@ -33,7 +33,10 @@ |
34 | 34 | // with the content of the loaded page |
35 | 35 | var copyContent = page.find( copyElements[i] ).contents(); |
36 | 36 | $j(copyElements[i]).empty().append( copyContent ); |
| 37 | + var newClasses = page.find( copyElements[i] ).attr('class'); |
| 38 | + $j(copyElements[i]).attr( 'class', newClasses ); |
37 | 39 | } |
| 40 | + |
38 | 41 | $j('#wikiPreview').slideDown(); |
39 | 42 | } ); |
40 | 43 | } |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -2604,6 +2604,8 @@ |
2605 | 2605 | $wgOut->setSubtitle( wfMsgHtml( 'delete-backlink', $deleteBackLink ) ); |
2606 | 2606 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2607 | 2607 | $wgOut->addWikiMsg( 'confirmdeletetext' ); |
| 2608 | + |
| 2609 | + wfRunHooks( 'ArticleConfirmDelete', array( $this, $wgOut, &$reason ) ); |
2608 | 2610 | |
2609 | 2611 | if( $wgUser->isAllowed( 'suppressrevision' ) ) { |
2610 | 2612 | $suppress = "<tr id=\"wpDeleteSuppressRow\" name=\"wpDeleteSuppressRow\"> |
— | — | @@ -2703,14 +2705,14 @@ |
2704 | 2706 | $wgOut->addWikiMsg( 'deletedtext', $deleted, $loglink ); |
2705 | 2707 | $wgOut->returnToMain( false ); |
2706 | 2708 | wfRunHooks('ArticleDeleteComplete', array(&$this, &$wgUser, $reason, $id)); |
| 2709 | + } |
| 2710 | + } else { |
| 2711 | + if( $error == '' ) { |
| 2712 | + $wgOut->showFatalError( wfMsgExt( 'cannotdelete', array( 'parse' ) ) ); |
| 2713 | + $wgOut->addHTML( Xml::element( 'h2', null, LogPage::logName( 'delete' ) ) ); |
| 2714 | + LogEventsList::showLogExtract( $wgOut, 'delete', $this->mTitle->getPrefixedText() ); |
2707 | 2715 | } else { |
2708 | | - if( $error == '' ) { |
2709 | | - $wgOut->showFatalError( wfMsgExt( 'cannotdelete', array( 'parse' ) ) ); |
2710 | | - $wgOut->addHTML( Xml::element( 'h2', null, LogPage::logName( 'delete' ) ) ); |
2711 | | - LogEventsList::showLogExtract( $wgOut, 'delete', $this->mTitle->getPrefixedText() ); |
2712 | | - } else { |
2713 | | - $wgOut->showFatalError( $error ); |
2714 | | - } |
| 2716 | + $wgOut->showFatalError( $error ); |
2715 | 2717 | } |
2716 | 2718 | } |
2717 | 2719 | } |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1581,6 +1581,12 @@ |
1582 | 1582 | END |
1583 | 1583 | ); |
1584 | 1584 | |
| 1585 | + if (!$this->preview) { |
| 1586 | + $wgOut->addHTML( Xml::tags( 'div', |
| 1587 | + array( 'class' => 'catlinks catlinks-allhidden', |
| 1588 | + 'id' => 'catlinks' ), ' ' ) ); |
| 1589 | + } |
| 1590 | + |
1585 | 1591 | if ( $this->isConflict && wfRunHooks( 'EditPageBeforeConflictDiff', array( &$this, &$wgOut ) ) ) { |
1586 | 1592 | $wgOut->wrapWikiMsg( '==$1==', "yourdiff" ); |
1587 | 1593 | |
— | — | @@ -2318,37 +2324,7 @@ |
2319 | 2325 | return $buttons; |
2320 | 2326 | } |
2321 | 2327 | |
2322 | | - /** |
2323 | | - * Output preview text only. This can be sucked into the edit page |
2324 | | - * via JavaScript, and saves the server time rendering the skin as |
2325 | | - * well as theoretically being more robust on the client (doesn't |
2326 | | - * disturb the edit box's undo history, won't eat your text on |
2327 | | - * failure, etc). |
2328 | | - * |
2329 | | - * @todo This doesn't include category or interlanguage links. |
2330 | | - * Would need to enhance it a bit, <s>maybe wrap them in XML |
2331 | | - * or something...</s> that might also require more skin |
2332 | | - * initialization, so check whether that's a problem. |
2333 | | - */ |
2334 | | - function livePreview() { |
2335 | | - global $wgOut; |
2336 | | - $wgOut->disable(); |
2337 | | - header( 'Content-type: text/xml; charset=utf-8' ); |
2338 | | - header( 'Cache-control: no-cache' ); |
2339 | 2328 | |
2340 | | - $previewText = $this->getPreviewText(); |
2341 | | - #$categories = $skin->getCategoryLinks(); |
2342 | | - |
2343 | | - $s = |
2344 | | - '<?xml version="1.0" encoding="UTF-8" ?>' . "\n" . |
2345 | | - Xml::tags( 'livepreview', null, |
2346 | | - Xml::element( 'preview', null, $previewText ) |
2347 | | - #. Xml::element( 'category', null, $categories ) |
2348 | | - ); |
2349 | | - echo $s; |
2350 | | - } |
2351 | | - |
2352 | | - |
2353 | 2329 | /** |
2354 | 2330 | * Get a diff between the current contents of the edit box and the |
2355 | 2331 | * version of the page we're editing from. |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -902,14 +902,11 @@ |
903 | 903 | |
904 | 904 | $classes = 'catlinks'; |
905 | 905 | |
906 | | - if( strpos( $catlinks, '<div id="mw-normal-catlinks">' ) === false && |
907 | | - strpos( $catlinks, '<div id="mw-hidden-catlinks" class="mw-hidden-cats-hidden">' ) !== false ) { |
| 906 | + if( strpos( $catlinks, '<div id="mw-normal-catlinks">' ) === false ) { |
908 | 907 | $classes .= ' catlinks-allhidden'; |
909 | 908 | } |
910 | 909 | |
911 | | - if( !empty( $catlinks ) ){ |
912 | | - return "<div id='catlinks' class='$classes'>{$catlinks}</div>"; |
913 | | - } |
| 910 | + return "<div id='catlinks' class='$classes'>{$catlinks}</div>"; |
914 | 911 | } |
915 | 912 | |
916 | 913 | function getQuickbarCompensator( $rows = 1 ) { |