partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit ae1bcfc9c787a3be47de5e0c583f53bb812c87da
parent ef6bda69d603f3b0373b8869bd8922d465653080
Author: Felicitus <felicitus@felicitus.org>
Date:   Fri,  4 Jan 2013 22:25:13 +0100

Fixed full_debug in the frontend

Diffstat:
Mbuild.xml | 24++++++++++++++++++++++++
Msrc/backend/PartKeepr/Console/Commands/MinifyJSCommand.php | 18++++++++++++++++++
Msrc/frontend/templates/index.tpl | 1-
3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/build.xml b/build.xml @@ -182,6 +182,30 @@ </else> </if> + <echo>Copying Ext.ux.Wizard</echo> + <copy overwrite="false" todir="frontend/js/Ext.ux/"> + <fileset dir="3rdparty/ext-wizard/Ext.ux.Wizard/"> + <include name="Ext.ux.Wizard.Card.js" /> + <include name="Ext.ux.Wizard.CardLayout.js" /> + <include name="Ext.ux.Wizard.Header.js" /> + <include name="Ext.ux.Wizard.js" /> + </fileset> + </copy> + + <echo>Copying Ext.ux.Exporter</echo> + <copy overwrite="false" todir="frontend/js/Ext.ux.Exporter/"> + <fileset dir="3rdparty/Ext.ux.Exporter"> + <include name="Base64.js" /> + <include name="Formatter.js" /> + <include name="Button.js" /> + <include name="Exporter.js" /> + <include name="downloadify.min.js" /> + <include name="wikiFormatter/*" /> + <include name="excelFormatter/*" /> + <include name="csvFormatter/*" /> + </fileset> + </copy> + <echo>Copying phpjs</echo> <mkdir dir="frontend/js/org.phpjs.lib/" /> <if> diff --git a/src/backend/PartKeepr/Console/Commands/MinifyJSCommand.php b/src/backend/PartKeepr/Console/Commands/MinifyJSCommand.php @@ -4,6 +4,7 @@ namespace PartKeepr\Console\Commands; use Symfony\Component\Console\Input\InputArgument, Symfony\Component\Console\Input\InputOption, Symfony\Component\Console, + PartKeepr\PartKeepr, PartKeepr\Util\Minifier\Minifier, PartKeepr\Util\Minifier\jsminMinifier, PartKeepr\Util\Minifier\yuiCompressorMinifier, @@ -55,6 +56,23 @@ EOT $orderedFileList = $this->getOrderedFileList($sourceDirs); + // Write out the used JS files which are required for the full debug frontend mode. + // @todo Fix that some time - it's a bit ugly. + + $frontendFiles = array(); + + foreach ($orderedFileList as $orderedFile) { + $orderedFile = str_replace(PartKeepr::getRootDirectory()."/src/frontend/", "", $orderedFile); + $orderedFile = str_replace(PartKeepr::getRootDirectory()."/3rdparty/extjs/examples/ux/", "js/Ext.ux/", $orderedFile); + $orderedFile = str_replace(PartKeepr::getRootDirectory()."/3rdparty/ext-wizard/Ext.ux.Wizard/", "js/Ext.ux/", $orderedFile); + $orderedFile = str_replace(PartKeepr::getRootDirectory()."/3rdparty/Ext.ux.Exporter/", "js/Ext.ux.Exporter/", $orderedFile); + + $frontendFiles[] = $orderedFile; + } + file_put_contents( + PartKeepr::getRootDirectory() . "/partkeepr.jsfiles", + serialize($frontendFiles)); + if (count($orderedFileList) == 0) { throw new \RuntimeException("No files in the source directories found."); } diff --git a/src/frontend/templates/index.tpl b/src/frontend/templates/index.tpl @@ -24,7 +24,6 @@ {% for i in scripts %} <script type="text/javascript" src="{{ i }}"></script> {% endfor %} - <script type="text/javascript" src="js/Ext.ux/Ext.ux.formatter-all-debug.js"></script> {% else %} <script type="text/javascript" src="extjs/ext-all-debug.js"></script> <script type="text/javascript" src="js/partkeepr-debug.js"></script>