Commits

Chris Leonello committed 6ed271c

Updated build and more rework on examples.

Comments (0)

Files changed (6)

           <fileset dir="examples">
             <exclude name="_*" />
             <exclude name="bug*" />
+            <exclude name="footer.inc" />
           </fileset>
         </copy>
         
           </redirector>
         </apply>
 
+        <!-- now remove said php files -->
+
+        <delete>
+          <fileset dir="${DIST_DIR}/examples">
+            <include name="*.php" />
+            <include name="closer.html" />
+            <include name="commonScripts.html" />
+            <include name="topbanner.html" />
+          </fileset>
+        </delete>
+
+        <replaceregexp match='href="([a-zA-Z0-9][a-zA-Z0-9_\-]+).php"\>Next' replace='href="\1.html"\>Next' flags="g">
+          <fileset dir="${DIST_DIR}/examples" includes="*.html" />
+        </replaceregexp>
+
+        <replaceregexp match='href="([a-zA-Z0-9][a-zA-Z0-9_\-]+).php"\>Previous' replace='href="\1.html"\>Previous' flags="g">
+          <fileset dir="${DIST_DIR}/examples" includes="*.html" />
+        </replaceregexp>
+
         <replaceregexp match='src="../src/' replace='src="../' flags="g">
           <fileset dir="${DIST_DIR}/examples" includes="*.html" />
         </replaceregexp>
           <mapper type="glob" from="jquery.jqplot.css" to="jquery.jqplot.min.css" />
         </apply>
 
-        <echo message="minifing file: example.css" />
+        <echo message="minifing file: examples.css" />
         <apply executable="java" parallel="false" verbose="true" dest="${DIST_DIR}/examples">
           <fileset dir="${DIST_DIR}/examples">
-            <include name="example.css" />
+            <include name="examples.css" />
           </fileset>
           <arg line="-jar" />
           <arg path="${YUICompressor}" />
+          <arg value="--type" />
+          <arg value="css" />
           <arg value="--charset" />
           <arg value="ANSI" />
           <arg value="-o" />
           <targetfile />
-          <mapper type="glob" from="example.css" to="example.min.css" />
+          <mapper type="glob" from="examples.css" to="examples.min.css" />
+        </apply>
+
+        <echo message="minifing file: example.js" />
+        <apply executable="java" parallel="false" verbose="true" dest="${DIST_DIR}/examples">
+          <fileset dir="${DIST_DIR}/examples">
+            <include name="example.js" />
+          </fileset>
+          <arg line="-jar" />
+          <arg path="${YUICompressor}" />
+          <arg value="--type" />
+          <arg value="js" />
+          <arg value="--charset" />
+          <arg value="ANSI" />
+          <arg value="-o" />
+          <targetfile />
+          <mapper type="glob" from="example.js" to="example.min.js" />
         </apply>
 
         <echo message="minifing plugin files" />
           <fileset dir="${DIST_DIR}/examples" includes="*.html" />
         </replaceregexp>
         
-        <replaceregexp match='example.css' replace='example.min.css' flags="g">
+        <replaceregexp match='examples.css' replace='examples.min.css' flags="g">
           <fileset dir="${DIST_DIR}/examples" includes="*.html" />
         </replaceregexp>
         
   <target name="compress" depends="dist, min, docs" description="Create the zip, gzip, and bzip compressed archives for downloading">
       <zip destfile="${DIST_DIR}/jquery.jqplot.${version}r${HG_ID}.zip"
        basedir=""
-       includes="${DIST_DIR}/excanvas*.js ${DIST_DIR}/jquery.js ${DIST_DIR}/jquery.min.js ${DIST_DIR}/jquery.jqplot.* ${DIST_DIR}/*.txt ${DIST_DIR}/plugins/* ${DIST_DIR}/examples/* ${DIST_DIR}/examples/images/* ${DIST_DIR}/examples/jquery-ui/css/ui-lightness/* ${DIST_DIR}/examples/jquery-ui/css/ui-lightness/images/* ${DIST_DIR}/examples/jquery-ui/js/* ${DIST_DIR}/docs/* ${DIST_DIR}/docs/files/* ${DIST_DIR}/docs/files/examples/* ${DIST_DIR}/docs/files/images/* ${DIST_DIR}/docs/files/plugins/* ${DIST_DIR}/docs/index/* ${DIST_DIR}/docs/javascript/* ${DIST_DIR}/docs/search/* ${DIST_DIR}/docs/styles/*"
+       includes="${DIST_DIR}/excanvas*.js ${DIST_DIR}/jquery.js ${DIST_DIR}/jquery.min.js ${DIST_DIR}/jquery.jqplot.* ${DIST_DIR}/*.txt ${DIST_DIR}/plugins/* ${DIST_DIR}/examples/* ${DIST_DIR}/examples/images/* ${DIST_DIR}/examples/syntaxhighlighter/* ${DIST_DIR}/examples/syntaxhighlighter/scripts/* ${DIST_DIR}/examples/syntaxhighlighter/styles/* ${DIST_DIR}/examples/jquery-ui/css/ui-lightness/* ${DIST_DIR}/examples/jquery-ui/css/ui-lightness/images/* ${DIST_DIR}/examples/jquery-ui/js/* ${DIST_DIR}/docs/* ${DIST_DIR}/docs/files/* ${DIST_DIR}/docs/files/examples/* ${DIST_DIR}/docs/files/images/* ${DIST_DIR}/docs/files/plugins/* ${DIST_DIR}/docs/index/* ${DIST_DIR}/docs/javascript/* ${DIST_DIR}/docs/search/* ${DIST_DIR}/docs/styles/*"
       />
       <tar destfile="${DIST_DIR}/jquery.jqplot.${version}r${HG_ID}.tar.gz" compression="gzip">
           <zipfileset src="${DIST_DIR}/jquery.jqplot.${version}r${HG_ID}.zip"/>

examples/candlestick.php

 <pre class="common brush:js"></pre>
 
 <script class="common" type="text/javascript">
-    $.jqplot.config.enablePlugins = true;
     
     ohlc = [['07/06/2009', 138.7, 139.68, 135.18, 135.4],
     ['06/29/2009', 143.46, 144.66, 139.79, 140.02],
     
 </script>
 
-<script class="code" type="text/javascript">$(document).ready(function(){       
+<script class="code" type="text/javascript">$(document).ready(function(){  
+    $.jqplot.config.enablePlugins = true;     
     plot1 = $.jqplot('chart1',[ohlc],{
       title: 'Chart',
       axesDefaults:{},

examples/commonScripts.html

 
     <script class="include" type="text/javascript" src="../src/jquery.jqplot.js"></script>
-    <script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script>
-    <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushJScript.js"></script>
-    <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushXml.js"></script>
+    <script type="text/javascript" src="syntaxhighlighter/scripts/shCore.min.js"></script>
+    <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushJScript.min.js"></script>
+    <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushXml.min.js"></script>

examples/donutTest.html

   <script language="javascript" type="text/javascript" src="../src/plugins/jqplot.donutRenderer.js"></script>
   <!-- END: load jqplot -->
 
-  <script type="text/javascript" src="donutTest.js"></script>
   <style type="text/css">
     #code {
         font: 10pt "Andale Mono", Monaco, "Courier New", sans-serif ;
 <div class="example-nav">
   <?php
     $tmpnames = scandir('./');
+    $skip = array('opener.php', 'bodyOpener.php', 'nav.php', 'closer.html', 'commonScripts.html', 'topbanner.html');
     
     foreach( $tmpnames as $value) {
-        if (preg_match('/^[a-z0-9][a-z0-9_\-]+\.html$/i', $value)) {
-          $files[] = $value;
+        if (preg_match('/^[a-z0-9][a-z0-9_\-]+\.(html|php)$/i', $value)) {
+          if (! in_array($value, $skip)) {
+            $files[] = $value;
+          }
         }
     }
     $fcount = count($files);
 <div class="example-nav">
   <?php
     $tmpnames = scandir('./');
+    $skip = array('opener.php', 'bodyOpener.php', 'nav.php', 'closer.html', 'commonScripts.html', 'topbanner.html');
     
     foreach( $tmpnames as $value) {
-        if (preg_match('/^[a-z0-9][a-z0-9_\-]+\.html$/i', $value)) {
-          $files[] = $value;
+        if (preg_match('/^[a-z0-9][a-z0-9_\-]+\.(html|php)$/i', $value)) {
+          if (! in_array($value, $skip)) {
+            $files[] = $value;
+          }
         }
     }
+
     $fcount = count($files);
     $parts = explode("/", $_SERVER['SCRIPT_NAME']);
     $curfile = end($parts);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.