r81348 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81347‎ | r81348 | r81349 >
Date:23:09, 1 February 2011
Author:yaron
Status:deferred
Tags:
Comment:
Replaced minified jqPlot JS files with their original equivalents, fixed paths for latest RL version, other attempted RL fixes
Modified paths:
  • /trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotBar.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotPie.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotPie.php
@@ -38,22 +38,22 @@
3939
4040 $resourceTemplate = array(
4141 'localBasePath' => $srfgIP . '/jqPlot',
42 - 'remoteExtPath' => 'SemanticResultFormats'
 42+ 'remoteExtPath' => 'SemanticResultFormats/jqPlot'
4343 );
4444 $wgResourceModules['ext.srf.jqplot'] = $resourceTemplate + array(
4545 'scripts' => array(
46 - 'jquery.jqplot.min.js',
 46+ 'jquery.jqplot.js',
4747 ),
4848 'styles' => array(
4949 'jquery.jqplot.css',
5050 ),
5151 'dependencies' => array(
52 - 'jquery',
5352 ),
5453 );
5554 $wgResourceModules['ext.srf.jqplotpie'] = $resourceTemplate + array(
5655 'scripts' => array(
57 - 'jqplot.pieRenderer.min.js',
 56+ 'jqplot.pieRenderer.js',
 57+ 'excanvas.js',
5858 ),
5959 'styles' => array(
6060 ),
@@ -65,6 +65,7 @@
6666
6767 protected function loadJavascriptAndCSS() {
6868 global $wgOut;
 69+ $wgOut->addModules( 'ext.srf.jqplot' );
6970 $wgOut->addModules( 'ext.srf.jqplotpie' );
7071 }
7172
@@ -92,11 +93,11 @@
9394
9495 if ( !$srfgJQPlotIncluded ) {
9596 $srfgJQPlotIncluded = true;
96 - $wgOut->addScript( '<!--[if IE]><script language="javascript" type="text/javascript" src="' . $srfgScriptPath . '/jqPlot/excanvas.min.js"></script><![endif]-->' );
97 - $wgOut->addScriptFile( "$srfgScriptPath/jqPlot/jquery.jqplot.min.js" );
 97+ $wgOut->addScript( '<!--[if IE]><script language="javascript" type="text/javascript" src="' . $srfgScriptPath . '/jqPlot/excanvas.js"></script><![endif]-->' );
 98+ $wgOut->addScriptFile( "$srfgScriptPath/jqPlot/jquery.jqplot.js" );
9899 }
99100
100 - $wgOut->addScriptFile( "$srfgScriptPath/jqPlot/jqplot.pieRenderer.min.js" );
 101+ $wgOut->addScriptFile( "$srfgScriptPath/jqPlot/jqplot.pieRenderer.js" );
101102
102103 // CSS file
103104 $wgOut->addExtensionStyle( "$srfgScriptPath/jqPlot/jquery.jqplot.css" );
Index: trunk/extensions/SemanticResultFormats/jqPlot/SRF_jqPlotBar.php
@@ -57,25 +57,25 @@
5858
5959 $resourceTemplate = array(
6060 'localBasePath' => $srfgIP . '/jqPlot',
61 - 'remoteExtPath' => 'SemanticResultFormats'
 61+ 'remoteExtPath' => 'SemanticResultFormats/jqPlot'
6262 );
6363 $wgResourceModules['ext.srf.jqplot'] = $resourceTemplate + array(
6464 'scripts' => array(
65 - 'jquery.jqplot.min.js',
 65+ 'jquery.jqplot.js',
6666 ),
6767 'styles' => array(
6868 'jquery.jqplot.css',
6969 ),
7070 'dependencies' => array(
71 - 'jquery',
7271 ),
7372 );
7473 $wgResourceModules['ext.srf.jqplotbar'] = $resourceTemplate + array(
7574 'scripts' => array(
76 - 'jqplot.categoryAxisRenderer.min.js',
77 - 'jqplot.barRenderer.min.js',
78 - 'jqplot.canvasAxisTickRenderer.min.js',
79 - 'jqplot.canvasTextRenderer.min.js',
 75+ 'jqplot.categoryAxisRenderer.js',
 76+ 'jqplot.barRenderer.js',
 77+ 'jqplot.canvasAxisTickRenderer.js',
 78+ 'jqplot.canvasTextRenderer.js',
 79+ 'excanvas.js',
8080 ),
8181 'styles' => array(
8282 ),
@@ -116,15 +116,15 @@
117117 }
118118
119119 if ( !$srfgJQPlotIncluded ) {
120 - $wgOut->addScript( '<!--[if IE]><script language="javascript" type="text/javascript" src="' . $srfgScriptPath . '/jqPlot/excanvas.min.js"></script><![endif]-->' );
121 - $scripts[] = "$srfgScriptPath/jqPlot/jquery.jqplot.min.js";
 120+ $wgOut->addScript( '<!--[if IE]><script language="javascript" type="text/javascript" src="' . $srfgScriptPath . '/jqPlot/excanvas.js"></script><![endif]-->' );
 121+ $scripts[] = "$srfgScriptPath/jqPlot/jquery.jqplot.js";
122122 $srfgJQPlotIncluded = true;
123123 }
124124
125 - $scripts[] = "$srfgScriptPath/jqPlot/jqplot.categoryAxisRenderer.min.js";
126 - $scripts[] = "$srfgScriptPath/jqPlot/jqplot.barRenderer.min.js";
127 - $scripts[] = "$srfgScriptPath/jqPlot/jqplot.canvasAxisTickRenderer.min.js";
128 - $scripts[] = "$srfgScriptPath/jqPlot/jqplot.canvasTextRenderer.min.js";
 125+ $scripts[] = "$srfgScriptPath/jqPlot/jqplot.categoryAxisRenderer.js";
 126+ $scripts[] = "$srfgScriptPath/jqPlot/jqplot.barRenderer.js";
 127+ $scripts[] = "$srfgScriptPath/jqPlot/jqplot.canvasAxisTickRenderer.js";
 128+ $scripts[] = "$srfgScriptPath/jqPlot/jqplot.canvasTextRenderer.js";
129129
130130 foreach ( $scripts as $script ) {
131131 $wgOut->addScriptFile( $script );

Status & tagging log