Index: branches/wmf-deployment/extensions/LiquidThreads_alpha/LqtFunctions.php |
— | — | @@ -56,12 +56,6 @@ |
57 | 57 | 'lqtpagelimit', |
58 | 58 | array( 'LqtParserFunctions', 'lqtPageLimit' ) |
59 | 59 | ); |
60 | | - |
61 | | - global $wgLiquidThreadsAllowEmbedding; |
62 | | - |
63 | | - if ($wgLiquidThreadsAllowEmbedding) { |
64 | | - $parser->setHook( 'talkpage', array( 'LqtParserFunctions', 'lqtTalkPage' ) ); |
65 | | - } |
66 | 60 | |
67 | 61 | return true; |
68 | 62 | } |
Index: branches/wmf-deployment/extensions/LiquidThreads_alpha/i18n/Lqt.i18n.php |
— | — | @@ -7774,18 +7774,6 @@ |
7775 | 7775 | 'lqt-reply-subpage' => 'balas', |
7776 | 7776 | ); |
7777 | 7777 | |
7778 | | -/** Igbo (Igbo) |
7779 | | - * @author Ukabia |
7780 | | - */ |
7781 | | -$messages['ig'] = array( |
7782 | | - 'lqt_youhavenewmessages' => 'I nwere [$1 ókò ohúrù].', |
7783 | | - 'lqt-read-message-tooltip' => 'Wéfu ahiri nka na ókò ohúrù. |
7784 | | -Madu nwere I ki hü ya na ihü akíkó nke sinambu.', |
7785 | | - 'lqt-newmessages-n' => 'Ókò ohúrù ($1)', |
7786 | | - 'lqt_newmessages' => 'Ókò ohúrù', |
7787 | | - 'lqt_newmessages-title' => 'Ókò ohúrù', |
7788 | | -); |
7789 | | - |
7790 | 7778 | /** Ido (Ido) |
7791 | 7779 | * @author Malafaya |
7792 | 7780 | */ |
Index: branches/wmf-deployment/extensions/LiquidThreads_alpha/LiquidThreads.php |
— | — | @@ -212,6 +212,3 @@ |
213 | 213 | |
214 | 214 | /** Whether or not to allow users to activate/deactivate LiquidThreads per-page */ |
215 | 215 | $wgLiquidThreadsAllowUserControl = true; |
216 | | - |
217 | | -/** Allow embedding */ |
218 | | -$wgLiquidThreadsAllowEmbedding = true; |
Index: branches/wmf-deployment/extensions/LiquidThreads_alpha/classes/View.php |
— | — | @@ -843,50 +843,25 @@ |
844 | 844 | return; |
845 | 845 | } |
846 | 846 | |
847 | | - global $wgOut; |
848 | | - |
849 | | - $info = self::getScriptsAndStyles(); |
850 | | - |
851 | | - foreach( $info['inlineScripts'] as $script ) { |
852 | | - $wgOut->addInlineScript( $script ); |
853 | | - } |
854 | | - |
855 | | - foreach( $info['scripts'] as $script ) { |
856 | | - $wgOut->addScriptFile( $script ); |
857 | | - } |
858 | | - |
859 | | - foreach( $info['styles'] as $style ) { |
860 | | - $wgOut->addExtensionStyle( $style ); |
861 | | - } |
| 847 | + global $wgOut, $wgStylePath; |
| 848 | + global $wgScriptPath, $wgStyleVersion; |
| 849 | + global $wgEnableJS2system; |
| 850 | + global $wgLiquidThreadsExtensionName; |
862 | 851 | |
| 852 | + $wgOut->addInlineScript( 'var wgLqtMessages = ' . self::exportJSLocalisation() . ';' ); |
| 853 | + |
| 854 | + $basePath = "$wgScriptPath/extensions/$wgLiquidThreadsExtensionName"; |
| 855 | + |
| 856 | + $wgOut->addScriptFile( "$basePath/jquery/js2.combined.js" ); |
| 857 | + $wgOut->addExtensionStyle( "$basePath/jquery/jquery-ui-1.7.2.css" ); |
| 858 | + |
| 859 | + $wgOut->addScriptFile( "$basePath/jquery/jquery.autogrow.js" ); |
| 860 | + |
| 861 | + $wgOut->addScriptFile( "$basePath/lqt.js" ); |
| 862 | + $wgOut->addExtensionStyle( "$basePath/lqt.css?{$wgStyleVersion}" ); |
| 863 | + |
863 | 864 | self::$stylesAndScriptsDone = true; |
864 | 865 | } |
865 | | - |
866 | | - static function getScriptsAndStyles() { |
867 | | - global $wgLiquidThreadsExtensionName, $wgStylePath, $wgScriptPath, $wgStyleVersion; |
868 | | - $basePath = "$wgScriptPath/extensions/$wgLiquidThreadsExtensionName"; |
869 | | - |
870 | | - $inlineScripts = array( |
871 | | - 'var wgLqtMessages = ' . self::exportJSLocalisation() . ';', |
872 | | - ); |
873 | | - |
874 | | - $scripts = array( |
875 | | - "$basePath/jquery/js2.combined.js", |
876 | | - "$basePath/jquery/jquery.autogrow.js", |
877 | | - "$basePath/lqt.js", |
878 | | - ); |
879 | | - |
880 | | - $styles = array( |
881 | | - "$basePath/jquery/jquery-ui-1.7.2.css", |
882 | | - "$basePath/lqt.css?{$wgStyleVersion}", |
883 | | - ); |
884 | | - |
885 | | - return array( |
886 | | - 'inlineScripts' => $inlineScripts, |
887 | | - 'scripts' => $scripts, |
888 | | - 'styles' => $styles, |
889 | | - ); |
890 | | - } |
891 | 866 | |
892 | 867 | static function exportJSLocalisation() { |
893 | 868 | wfLoadExtensionMessages( 'LiquidThreads' ); |
Index: branches/wmf-deployment/extensions/LiquidThreads_alpha/classes/ParserFunctions.php |
— | — | @@ -20,52 +20,4 @@ |
21 | 21 | $parser->mOutput->setProperty( 'lqt-page-limit', $param ); |
22 | 22 | } |
23 | 23 | } |
24 | | - |
25 | | - static function lqtTalkPage( $parser, $args, $parser, $frame ) { |
26 | | - global $wgStyleVersion; |
27 | | - |
28 | | - // Grab article. |
29 | | - $title = null; |
30 | | - if ( $args['talkpage'] ) { |
31 | | - $title = Title::newFromText( $args['talkpage'] ); |
32 | | - } |
33 | | - if ( is_null($title) ) { |
34 | | - $title = $parser->getTitle(); |
35 | | - } |
36 | | - |
37 | | - $article = new Article( $title ); |
38 | | - $out = new OutputPage; |
39 | | - |
40 | | - global $wgUser, $wgRequest; |
41 | | - $view = new TalkpageView( $out, $article, $title, $wgUser, $wgRequest ); |
42 | | - |
43 | | - // Handle show/hide preferences. Header gone by default. |
44 | | - $view->hideItems( 'header' ); |
45 | | - |
46 | | - if ( array_key_exists( 'show', $args ) ) { |
47 | | - $show = explode( ' ', $args['show'] ); |
48 | | - $view->setShownItems( $show ); |
49 | | - } |
50 | | - |
51 | | - $view->show(); |
52 | | - |
53 | | - $scriptsStyles = LqtView::getScriptsAndStyles(); |
54 | | - $headItems = ''; |
55 | | - |
56 | | - foreach( $scriptsStyles['inlineScripts'] as $iscript ) { |
57 | | - $headItems .= Html::inlineScript( "\n$iscript\n" ); |
58 | | - } |
59 | | - |
60 | | - foreach( $scriptsStyles['scripts'] as $script ) { |
61 | | - $headItems .= Html::linkedScript( "$script?$wgStyleVersion" ); |
62 | | - } |
63 | | - |
64 | | - foreach( $scriptsStyles['styles'] as $style ) { |
65 | | - $headItems .= Html::linkedStyle( $style, 'all' ); |
66 | | - } |
67 | | - |
68 | | - $parser->getOutput()->addHeadItem( $headItems, 'lqt-talk-page' ); |
69 | | - |
70 | | - return $out->getHTML(); |
71 | | - } |
72 | 24 | } |
Index: branches/wmf-deployment/extensions/LiquidThreads_alpha/pages/TalkpageView.php |
— | — | @@ -3,8 +3,6 @@ |
4 | 4 | if ( !defined( 'MEDIAWIKI' ) ) die; |
5 | 5 | |
6 | 6 | class TalkpageView extends LqtView { |
7 | | - protected $mShowItems = array( 'toc', 'options', 'header' ); |
8 | | - |
9 | 7 | /* Added to SkinTemplateTabs hook in TalkpageView::show(). */ |
10 | 8 | static function customizeTalkpageTabs( $skintemplate, &$content_actions, $view ) { |
11 | 9 | // The arguments are passed in by reference. |
— | — | @@ -243,9 +241,7 @@ |
244 | 242 | |
245 | 243 | } |
246 | 244 | |
247 | | - if ( $this->shouldShow('header') ) { |
248 | | - $this->showHeader(); |
249 | | - } |
| 245 | + $this->showHeader(); |
250 | 246 | |
251 | 247 | $html = ''; |
252 | 248 | |
— | — | @@ -270,9 +266,7 @@ |
271 | 267 | $talkpageHeader = Xml::tags( 'div', array( 'class' => 'lqt-talkpage-header' ), |
272 | 268 | $talkpageHeader ); |
273 | 269 | |
274 | | - if ( $this->shouldShow('options') ) { |
275 | | - $this->output->addHTML( $talkpageHeader ); |
276 | | - } |
| 270 | + $this->output->addHTML( $talkpageHeader ); |
277 | 271 | |
278 | 272 | global $wgRequest; |
279 | 273 | if ( $this->methodApplies( 'talkpage_new_thread' ) ) { |
— | — | @@ -289,9 +283,9 @@ |
290 | 284 | |
291 | 285 | $threads = $this->getPageThreads( $pager ); |
292 | 286 | |
293 | | - if ( count( $threads ) > 0 && $this->shouldShow('toc') ) { |
| 287 | + if ( count( $threads ) > 0 ) { |
294 | 288 | $html .= $this->getTOC( $threads ); |
295 | | - } elseif ( count($threads) == 0 ) { |
| 289 | + } else { |
296 | 290 | $html .= Xml::tags( 'div', array( 'class' => 'lqt-no-threads' ), |
297 | 291 | wfMsgExt( 'lqt-no-threads', 'parseinline' ) ); |
298 | 292 | } |
— | — | @@ -359,28 +353,6 @@ |
360 | 354 | // Default |
361 | 355 | return LQT_NEWEST_CHANGES; |
362 | 356 | } |
363 | | - |
364 | | - // Hide a number of items from the view |
365 | | - // Valid values: toc, options, header |
366 | | - function hideItems( $items ) { |
367 | | - $this->mShowItems = array_diff( $this->mShowItems, (array)$items ); |
368 | | - } |
369 | | - |
370 | | - // Show a number of items in the view |
371 | | - // Valid values: toc, options, header |
372 | | - function showItems( $items ) { |
373 | | - $this->mShowItems = array_merge( $this->mShowItems, (array)$items ); |
374 | | - } |
375 | | - |
376 | | - // Whether or not to show an item |
377 | | - function shouldShow( $item ) { |
378 | | - return in_array( $item, $this->mShowItems ); |
379 | | - } |
380 | | - |
381 | | - // Set the items shown |
382 | | - function setShownItems( $items ) { |
383 | | - $this->mShowItems = $items; |
384 | | - } |
385 | 357 | } |
386 | 358 | |
387 | 359 | class LqtDiscussionPager extends IndexPager { |
Index: branches/wmf-deployment/extensions/LiquidThreads_alpha/lqt.js |
— | — | @@ -875,6 +875,7 @@ |
876 | 876 | }, |
877 | 877 | |
878 | 878 | 'handleAJAXSave' : function( e ) { |
| 879 | + e.preventDefault(); |
879 | 880 | var editform = $j(this).closest('.lqt-edit-form'); |
880 | 881 | var type = editform.find('input[name=lqt_method]').val(); |
881 | 882 | |
Property changes on: branches/wmf-deployment/extensions/LiquidThreads_alpha |
___________________________________________________________________ |
Name: svn:mergeinfo |
882 | 883 | - /trunk/extensions/LiquidThreads:57390,58990-61966 |
883 | 884 | + /trunk/extensions/LiquidThreads:57390,58990-61906 |