partkeepr

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

commit c3827a9b6a4f0bd7f3f9deb916b44f3a806d44b1
parent a5b047296543fb58565a31ec536d8fa7dc08d13a
Author: Felicitus <felicitus@felicitus.org>
Date:   Sat, 10 Oct 2015 12:11:16 +0200

Merge branch 'sf2migration' of github.com:partkeepr/PartKeepr into sf2migration

Diffstat:
M.gitignore | 1+
Mapp/AppKernel.php | 2+-
Mapp/PartKeeprRequirements.php | 4++--
Mapp/config/config.yml | 13+++++++++++++
Mcomposer.json | 3++-
Mcomposer.lock | 51+++++++++++++++++++++++++++++++++++++++++++++++----
Msrc/PartKeepr/AuthBundle/Tests/Controller/DefaultControllerTest.php | 2+-
Msrc/PartKeepr/AuthBundle/Tests/Services/UserPreferenceServiceTest.php | 2+-
Msrc/PartKeepr/AuthBundle/Tests/UserPreferenceTest.php | 2+-
Msrc/PartKeepr/CategoryBundle/Tests/AbstractMoveCategoryTest.php | 2+-
Msrc/PartKeepr/CoreBundle/Tests/SystemInformationTest.php | 2--
Msrc/PartKeepr/CoreBundle/Tests/SystemNoticeTest.php | 1-
Msrc/PartKeepr/CoreBundle/Tests/VersionServiceTest.php | 1-
Asrc/PartKeepr/CoreBundle/Tests/WebTestCase.php | 34++++++++++++++++++++++++++++++++++
Msrc/PartKeepr/CronLoggerBundle/Tests/CronLoggerTest.php | 2+-
Msrc/PartKeepr/DoctrineReflectionBundle/Command/GenerateEntityCommand.php | 4+---
Msrc/PartKeepr/DoctrineReflectionBundle/Services/ReflectionService.php | 1-
Msrc/PartKeepr/FrontendBundle/Controller/IndexController.php | 30------------------------------
Msrc/PartKeepr/FrontendBundle/Resources/public/css/PartKeepr.css | 1+
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js | 10+++++-----
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Grid/GridMenuPlugin.js | 4++--
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/MenuBar.js | 38+++++++++++++++++++-------------------
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditorWindow.js | 4++--
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartParameterGrid.js | 4++--
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartCategoryTree.js | 2+-
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js | 5++---
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/PartMeasurementUnit/PartMeasurementUnitGrid.js | 10++++------
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectGrid.js | 6++----
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/StorageLocation/StorageLocationGrid.js | 6++----
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/AttachmentGrid.js | 8++++----
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/SystemNoticeButton.js | 2+-
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/WebcamPanel.js | 2+-
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Dialogs/FileUploadDialog.js | 2+-
Msrc/PartKeepr/FrontendBundle/Resources/views/index.html.twig | 1+
Msrc/PartKeepr/PartBundle/Tests/StockTest.php | 2+-
Msrc/PartKeepr/ProjectBundle/Tests/ProjectTest.php | 2+-
Msrc/PartKeepr/SetupBundle/Controller/CacheWarmupSetupController.php | 12++++++++++++
Msrc/PartKeepr/SetupBundle/Resources/setup-data/units.yml | 2+-
Msrc/PartKeepr/TipOfTheDayBundle/Tests/SyncTipsTest.php | 2+-
Msrc/PartKeepr/TipOfTheDayBundle/Tests/TipOfTheDayTest.php | 2+-
Msrc/PartKeepr/UploadedFileBundle/Tests/FileControllerTest.php | 2+-
Msrc/PartKeepr/UploadedFileBundle/Tests/TemporaryFileControllerTest.php | 2+-
Aweb/spritesheets/.keep | 0
43 files changed, 175 insertions(+), 113 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -26,6 +26,7 @@ app/authkey.php /web/bundles/ /web/images/* +/web/spritesheets/* /web/js/* /web/css/* /app/bootstrap.php.cache diff --git a/app/AppKernel.php b/app/AppKernel.php @@ -23,7 +23,7 @@ class AppKernel extends Kernel new PartKeepr\DoctrineReflectionBundle\PartKeeprDoctrineReflectionBundle(), new PartKeepr\RESTBundle\PartKeeprRESTBundle(), new Escape\WSSEAuthenticationBundle\EscapeWSSEAuthenticationBundle(), - //new PartKeepr\ApiDocBundle\PartKeeprApiDocBundle(), + new SpriteGenerator\SpriteGeneratorBundle(), new Dunglas\ApiBundle\DunglasApiBundle(), new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), new Brainbits\FugueIconsBundle\BrainbitsFugueIconsBundle(), diff --git a/app/PartKeeprRequirements.php b/app/PartKeeprRequirements.php @@ -71,10 +71,10 @@ class PartKeeprRequirements extends SymfonyRequirements switch ($last) { // The 'G' modifier is available since PHP 5.1.0 case 'g': - $val *= 1024; + $val *= 1073741824; break; case 'm': - $val *= 1024; + $val *= 1048576; break; case 'k': $val *= 1024; diff --git a/app/config/config.yml b/app/config/config.yml @@ -58,6 +58,19 @@ dunglas_api: items_per_page: client_can_change: true +sprite_generator: + sprites: + fugue16: + inDir: %kernel.root_dir%/../vendor/brainbits/fugue-icons-bundle/src/Brainbits/FugueIconsBundle/Resources/public/icons/fugue/16/ + outImage: %kernel.root_dir%/../web/spritesheets/fugue-16.png + outCss: %kernel.root_dir%/../web/spritesheets/fugue-16.css + relativeImagePath: ./ + padding: 5 + spriteClass: fugue-icon + cssFormat: css + imagePositioning: one-column + imageGenerator: gd2 + fr3d_ldap: driver: host: "%fr3d_ldap.driver.host%" diff --git a/composer.json b/composer.json @@ -60,7 +60,8 @@ "atelierspierrot/famfamfam-silk-sprite": "^1.0", "reputation-vip/composer-assets-installer": "^1.0", "jms/translation-bundle": "dev-master", - "partkeepr/remote-file-loader": "dev-master" + "partkeepr/remote-file-loader": "dev-master", + "nfq-alpha/sprite-bundle": "^1.0" }, "require-dev": { "phpunit/phpunit": "4.8.*", diff --git a/composer.lock b/composer.lock @@ -4,7 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "f26f4b89b40219bd1f5f6c3837931fdc", + "hash": "6746a4a027b2b966629d9dd9b259db62", + "content-hash": "e56034902b7c1e0de0605a7e8979c902", "packages": [ { "name": "atelierspierrot/famfamfam-silk-sprite", @@ -1292,7 +1293,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dunglas/DunglasApiBundle/zipball/b30de689f94410c7dc0e449f2ecc15cfa8e70f54", + "url": "https://api.github.com/repos/dunglas/DunglasApiBundle/zipball/59bfc3925521c1167e3d5b72ae0e1e1d4345e3eb", "reference": "b30de689f94410c7dc0e449f2ecc15cfa8e70f54", "shasum": "" }, @@ -2358,6 +2359,48 @@ "time": "2015-09-30 21:35:45" }, { + "name": "nfq-alpha/sprite-bundle", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/nfq-alpha/sprite-generator.git", + "reference": "ca9e54285cd3c9f7f87003d67160379053ee8eb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nfq-alpha/sprite-generator/zipball/ca9e54285cd3c9f7f87003d67160379053ee8eb0", + "reference": "ca9e54285cd3c9f7f87003d67160379053ee8eb0", + "shasum": "" + }, + "require": { + "ext-gd": "*", + "php": ">=5.3.0", + "twig/twig": ">=1.0.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "SpriteGenerator": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kazimieras Butkus", + "email": "kazimieras@nfq.lt", + "role": "Developer" + } + ], + "description": "Generate sprites with PHP and twig templates", + "keywords": [ + "sprite" + ], + "time": "2014-09-15 11:00:13" + }, + { "name": "nikic/php-parser", "version": "v0.9.4", "source": { @@ -2698,7 +2741,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/2fb164fd889120a9d9ba19d825e270e5293eecc5", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/5a397dddee79edc15d1f88f421d51603277d8576", "reference": "2fb164fd889120a9d9ba19d825e270e5293eecc5", "shasum": "" }, @@ -3203,7 +3246,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/e5ed757d6dcd6fd60dde5da8b7cbec2fab7cb48a", + "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/bd331ce45d0ecf72354fb86068d5b01fb02a7fda", "reference": "e5ed757d6dcd6fd60dde5da8b7cbec2fab7cb48a", "shasum": "" }, diff --git a/src/PartKeepr/AuthBundle/Tests/Controller/DefaultControllerTest.php b/src/PartKeepr/AuthBundle/Tests/Controller/DefaultControllerTest.php @@ -3,7 +3,7 @@ namespace PartKeepr\AuthBundle\Tests\Controller; use Doctrine\Common\DataFixtures\ProxyReferenceRepository; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; use PartKeepr\AuthBundle\Entity\FOSUser; class DefaultControllerTest extends WebTestCase diff --git a/src/PartKeepr/AuthBundle/Tests/Services/UserPreferenceServiceTest.php b/src/PartKeepr/AuthBundle/Tests/Services/UserPreferenceServiceTest.php @@ -1,7 +1,7 @@ <?php namespace PartKeepr\AuthBundle\Tests\Services; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; use PartKeepr\AuthBundle\Entity\User; class UserPreferenceServiceTest extends WebTestCase diff --git a/src/PartKeepr/AuthBundle/Tests/UserPreferenceTest.php b/src/PartKeepr/AuthBundle/Tests/UserPreferenceTest.php @@ -2,7 +2,7 @@ namespace PartKeepr\AuthBundle\Tests; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; class UserPreferenceTest extends WebTestCase { diff --git a/src/PartKeepr/CategoryBundle/Tests/AbstractMoveCategoryTest.php b/src/PartKeepr/CategoryBundle/Tests/AbstractMoveCategoryTest.php @@ -4,7 +4,7 @@ namespace PartKeepr\CategoryBundle\Tests; use Doctrine\Common\DataFixtures\ProxyReferenceRepository; use Dunglas\ApiBundle\Api\IriConverter; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; use PartKeepr\CategoryBundle\Entity\AbstractCategory; abstract class AbstractMoveCategoryTest extends WebTestCase diff --git a/src/PartKeepr/CoreBundle/Tests/SystemInformationTest.php b/src/PartKeepr/CoreBundle/Tests/SystemInformationTest.php @@ -1,8 +1,6 @@ <?php namespace PartKeepr\CoreBundle\Tests; -use Liip\FunctionalTestBundle\Test\WebTestCase; - class SystemInformationTest extends WebTestCase { public function testSystemInformation() diff --git a/src/PartKeepr/CoreBundle/Tests/SystemNoticeTest.php b/src/PartKeepr/CoreBundle/Tests/SystemNoticeTest.php @@ -2,7 +2,6 @@ namespace PartKeepr\CoreBundle\Tests; use Dunglas\ApiBundle\Api\IriConverter; -use Liip\FunctionalTestBundle\Test\WebTestCase; class SystemNoticeTest extends WebTestCase { diff --git a/src/PartKeepr/CoreBundle/Tests/VersionServiceTest.php b/src/PartKeepr/CoreBundle/Tests/VersionServiceTest.php @@ -1,7 +1,6 @@ <?php namespace PartKeepr\CoreBundle\Tests; -use Liip\FunctionalTestBundle\Test\WebTestCase; use PartKeepr\CoreBundle\Services\VersionService; class VersionServiceTest extends WebTestCase diff --git a/src/PartKeepr/CoreBundle/Tests/WebTestCase.php b/src/PartKeepr/CoreBundle/Tests/WebTestCase.php @@ -0,0 +1,33 @@ +<?php +/** + * Created by PhpStorm. + * User: felicitus + * Date: 10/9/15 + * Time: 7:43 PM + */ + +namespace PartKeepr\CoreBundle\Tests; + + +/** + * Special WebTestCase which forces to load the AppKernel. This is because the base getKernelClass() method + * does wildcard matching on *Kernel.php within the app/ directory, and on some systems it might happen that + * SetupAppKernel gets loaded first, causing unit tests to fail. + * + */ +class WebTestCase extends \Liip\FunctionalTestBundle\Test\WebTestCase +{ + static protected function getKernelClass() + { + $dir = isset($_SERVER['KERNEL_DIR']) ? $_SERVER['KERNEL_DIR'] : self::getPhpUnitXmlDir(); + + $class = 'AppKernel'; + $file = $dir.'/'.$class.'.php'; + if (!file_exists($file)) { + return parent::getKernelClass(); + } + require_once $file; + + return $class; + } +}+ \ No newline at end of file diff --git a/src/PartKeepr/CronLoggerBundle/Tests/CronLoggerTest.php b/src/PartKeepr/CronLoggerBundle/Tests/CronLoggerTest.php @@ -1,7 +1,7 @@ <?php namespace PartKeepr\CronLoggerBundle\Tests; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; class CronLoggerTest extends WebTestCase { diff --git a/src/PartKeepr/DoctrineReflectionBundle/Command/GenerateEntityCommand.php b/src/PartKeepr/DoctrineReflectionBundle/Command/GenerateEntityCommand.php @@ -17,11 +17,9 @@ class GenerateEntityCommand extends ContainerAwareCommand public function execute(InputInterface $input, OutputInterface $output) { $reflectionService = $this->getContainer()->get("doctrine_reflection_service"); - $cacheDir = $this->getContainer()->get("kernel")->getCacheDir(); + $cacheDir = $this->getContainer()->get("kernel")->getRootDir()."/../web/bundles/doctrinereflection/"; $reflectionService->createCache($cacheDir); } - - } diff --git a/src/PartKeepr/DoctrineReflectionBundle/Services/ReflectionService.php b/src/PartKeepr/DoctrineReflectionBundle/Services/ReflectionService.php @@ -204,7 +204,6 @@ class ReflectionService public function createCache ($cacheDir) { - $cacheDir .= "/doctrinereflection"; @mkdir($cacheDir, 0777, true); $entities = $this->getEntities(); diff --git a/src/PartKeepr/FrontendBundle/Controller/IndexController.php b/src/PartKeepr/FrontendBundle/Controller/IndexController.php @@ -9,8 +9,6 @@ use PartKeepr\AuthBundle\Entity\User; use PartKeepr\PartKeepr; use PartKeepr\Util\Configuration; use Symfony\Bundle\FrameworkBundle\Controller\Controller; -use Symfony\Component\Finder\Finder; -use Symfony\Component\Finder\SplFileInfo; use Symfony\Component\Routing\Annotation\Route; class IndexController extends Controller @@ -77,34 +75,6 @@ class IndexController extends Controller } - $renderParams["models"] = $this->copyModels(); - return $this->render('PartKeeprFrontendBundle::index.html.twig', $renderParams); } - - /** - * Copies all generated models to the frontend directory - * - * @todo Refactor to auto-generate models to the correct directory. This is a workaround. - */ - protected function copyModels() - { - $cacheDir = $this->get("kernel")->getCacheDir(); - - $target = $this->get("kernel")->getRootDir()."/../web/bundles/doctrinereflection/"; - @mkdir($target, 0777, true); - - $finder = new Finder(); - $finder->files()->in($cacheDir."/doctrinereflection/"); - - $models = array(); - - foreach ($finder as $file) { - /** @var SplFileInfo $file */ - copy($file->getRealPath(), $target.$file->getBasename()); - $models[] = "bundles/doctrinereflection/".$file->getBasename(); - } - - return $models; - } } diff --git a/src/PartKeepr/FrontendBundle/Resources/public/css/PartKeepr.css b/src/PartKeepr/FrontendBundle/Resources/public/css/PartKeepr.css @@ -67,3 +67,4 @@ background-position: right; background-image: url(../images/partkeepr-logo.png); } + diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js @@ -91,19 +91,19 @@ Ext.define("PartKeepr.CategoryEditorTree", { this.menuCategoryDelete = Ext.create("Ext.menu.Item", { text: i18n("Delete Category"), handler: Ext.bind(this.confirmCategoryDelete, this), - icon: 'resources/silkicons/folder_delete.png' + iconCls: 'web-icon folder_delete' }); this.menuCategoryAdd = Ext.create("Ext.menu.Item", { text: i18n("Add Category"), handler: Ext.bind(this.showCategoryAddDialog, this), - icon: 'resources/silkicons/folder_add.png' + iconCls: 'web-icon folder_add' }); this.menuCategoryEdit = Ext.create("Ext.menu.Item", { text: i18n("Edit Category"), handler: Ext.bind(this.showCategoryEditDialog, this), - icon: 'resources/silkicons/folder_edit.png' + iconCls: 'web-icon folder_edit' }); this.menu = Ext.create('widget.menu', { @@ -117,14 +117,14 @@ Ext.define("PartKeepr.CategoryEditorTree", { createToolbar: function () { this.toolbarExpandButton = Ext.create("Ext.button.Button", { - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/toggle-expand.png', + iconCls: 'fugue-icon toggle-expand', tooltip: i18n("Expand All"), handler: this._onExpandClick, scope: this }); this.toolbarCollapseButton = Ext.create("Ext.button.Button", { - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/toggle.png', + iconCls: 'fugue-icon toggle', tooltip: i18n("Collapse All"), handler: this._onCollapseClick, scope: this diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Grid/GridMenuPlugin.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Grid/GridMenuPlugin.js @@ -32,8 +32,8 @@ Ext.define("PartKeepr.GridMenuPlugin", { text: i18n('Export as comma-delimited CSV (.csv)'), handler: this.exportCSV, scope: this - },,{ - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/blue-document-excel.png', + },{ + icon: 'blue-document-excel.png', text: i18n('Export as Excel XML (.xlsx)'), handler: this.exportXLSX, scope: this diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/MenuBar.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/MenuBar.js @@ -8,12 +8,12 @@ Ext.define('PartKeepr.MenuBar', { this.editMenu = Ext.create('Ext.menu.Menu', { items: [{ text: i18n('Projects'), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/drill.png', + iconCls: 'fugue-icon drill', handler: this.editProjects }, { text: i18n('Footprints'), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/fingerprint.png', + iconCls: 'fugue-icon fingerprint', handler: this.editFootprints },{ text: i18n('Manufacturers'), @@ -21,7 +21,7 @@ Ext.define('PartKeepr.MenuBar', { handler: this.editManufacturers },{ text: i18n('Storage Locations'), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/wooden-box.png', + iconCls: 'fugue-icon wooden-box', handler: this.editStorageLocations },{ text: i18n('Distributors'), @@ -35,11 +35,11 @@ Ext.define('PartKeepr.MenuBar', { },{ text: i18n('Part Measurement Units'), handler: this.editPartUnits, - icon: "bundles/brainbitsfugueicons/icons/fugue/16/ruler.png" + iconCls: "fugue-icon ruler" },{ text: i18n("Units"), handler: this.editUnits, - icon: 'bundles/partkeeprfrontend/images/icons/unit.png' + iconCls: 'fugue-icon unit' }] }); @@ -61,19 +61,19 @@ Ext.define('PartKeepr.MenuBar', { { text: i18n("System Information"), handler: this.showSystemInformation, - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/system-monitor.png' + iconCls: 'fugue-icon system-monitor ' },{ text: i18n("Project Reports"), handler: this.showProjectReports, - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/drill.png' + iconCls: 'fugue-icon drill' },{ text: i18n("System Notices"), handler: this.showSystemNotices, - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/service-bell.png' + iconCls: 'fugue-icon service-bell' },{ text: i18n("Stock History"), handler: this.showStockHistory, - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/notebook.png' + iconCls: 'fugue-icon notebook' },{ text: i18n("Print and Labeling"), glyph: 0xf02f, @@ -99,7 +99,7 @@ Ext.define('PartKeepr.MenuBar', { handler: this.disconnect },{ text: i18n("User Preferences"), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/gear.png', + iconCls: 'fugue-icon gear', handler: this.showUserPreferences } ] @@ -128,7 +128,7 @@ Ext.define('PartKeepr.MenuBar', { }, showUserPreferences: function () { var j = new PartKeepr.UserPreferencePanel({ - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/gear.png', + iconCls: 'fugue-icon gear', closable: true }); @@ -144,7 +144,7 @@ Ext.define('PartKeepr.MenuBar', { showSystemInformation: function () { var j = Ext.create("PartKeepr.SystemInformationGrid", { title: i18n("System Information"), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/system-monitor.png', + iconCls: 'fugue-icon system-monitor', closable: true, padding: "5 5 5 5" }); @@ -176,7 +176,7 @@ Ext.define('PartKeepr.MenuBar', { editStorageLocations: function () { var j = Ext.create("PartKeepr.StorageLocationEditorComponent", { title: i18n("Storage Locations"), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/wooden-box.png', + iconCls: 'fugue-icon wooden-box', closable: true }); @@ -186,7 +186,7 @@ Ext.define('PartKeepr.MenuBar', { editUnits: function () { var j = Ext.create("PartKeepr.UnitEditorComponent", { title: i18n("Units"), - icon: 'bundles/partkeeprfrontend/images/icons/unit.png', + iconCls: 'bundles/partkeeprfrontend/images/icons/unit', closable: true }); @@ -206,7 +206,7 @@ Ext.define('PartKeepr.MenuBar', { editFootprints: function () { var j = Ext.create("PartKeepr.FootprintEditorComponent", { title: i18n("Footprints"), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/fingerprint.png', + iconCls: 'fugue-icon fingerprint', closable: true }); @@ -236,7 +236,7 @@ Ext.define('PartKeepr.MenuBar', { editPartUnits: function () { var j = Ext.create("PartKeepr.PartMeasurementUnitEditorComponent", { title: i18n("Part Measurement Units"), - icon: "bundles/brainbitsfugueicons/icons/fugue/16/ruler.png", + iconCls: "fugue-icon ruler", closable: true }); @@ -246,7 +246,7 @@ Ext.define('PartKeepr.MenuBar', { editProjects: function () { var j = Ext.create("PartKeepr.ProjectEditorComponent", { title: i18n("Projects"), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/drill.png', + iconCls: 'fugue-icon drill', closable: true }); @@ -256,7 +256,7 @@ Ext.define('PartKeepr.MenuBar', { showProjectReports: function () { var j = Ext.create("PartKeepr.ProjectReportView", { title: i18n("Project Reports"), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/drill.png', + iconCls: 'fugue-icon drill', closable: true }); @@ -276,7 +276,7 @@ Ext.define('PartKeepr.MenuBar', { showStockHistory: function () { var j = Ext.create("PartKeepr.StockHistoryGrid", { title: i18n("Stock History"), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/notebook.png', + iconCls: 'fugue-icon notebook', closable: true }); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditorWindow.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditorWindow.js @@ -58,13 +58,13 @@ Ext.define('PartKeepr.PartEditorWindow', { this.saveButton = Ext.create("Ext.button.Button", { text: this.saveText, - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/disk.png', + iconCls: 'fugue-icon disk', handler: Ext.bind(this.onItemSave, this) }); this.cancelButton = Ext.create("Ext.button.Button", { text: this.cancelText, - icon: 'resources/silkicons/cancel.png', + icon: 'web-icon cancel.png', handler: Ext.bind(this.onCancelEdit, this) }); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartParameterGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartParameterGrid.js @@ -29,7 +29,7 @@ Ext.define('PartKeepr.PartParameterGrid', { disabled: true, itemId: 'delete', scope: this, - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/table--minus.png', + iconCls: 'fugue-icon table--minus', handler: this.onDeleteClick }); @@ -38,7 +38,7 @@ Ext.define('PartKeepr.PartParameterGrid', { items: [{ text: i18n('Add'), scope: this, - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/table--plus.png', + iconCls: 'fugue-icon table--plus', handler: this.onAddClick }, this.deleteButton] }]; diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartCategoryTree.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartCategoryTree.js @@ -14,7 +14,7 @@ Ext.define("PartKeepr.PartCategoryTree", { this.syncButton = Ext.create("Ext.button.Button", { tooltip: i18n("Reveal Category for selected part"), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/arrow-split-180.png', + iconCls: 'fugue-icon arrow-split-180', handler: Ext.bind(function () { this.fireEvent("syncCategory"); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js @@ -232,7 +232,7 @@ Ext.define('PartKeepr.PartsGrid', { { this.columns = [ { - header: '<img style="height: 10px;" src="bundles/brainbitsfugueicons/icons/fugue/16/paper-clip.png"/>', + header: '<span class="fugue-icon paper-clip"></span>', dataIndex: "", width: 30, tooltip: i18n("Has attachments?"), @@ -351,8 +351,7 @@ Ext.define('PartKeepr.PartsGrid', { { var ret = ""; if (rec.attachments().getCount() > 0) { - ret += '<img src="bundles/brainbitsfugueicons/icons/fugue/16/paper-clip.png" style="height: 10px; margin-top: 2px;" alt="' + i18n( - "Has attachments") + '" title="' + i18n("Has attachments") + '"/>'; + ret += '<span class="web-icon fugue-icon paper-clip" title="' + i18n("Has attachments") + '"/>'; } return ret; diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/PartMeasurementUnit/PartMeasurementUnitGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/PartMeasurementUnit/PartMeasurementUnitGrid.js @@ -15,19 +15,17 @@ Ext.define('PartKeepr.PartMeasurementUnitGrid', { } ], addButtonText: i18n("Add Part Measurement Unit"), - addButtonIcon: "bundles/brainbitsfugueicons/icons/fugue/16/ruler--plus.png", - addButtonIconCls: '', + addButtonIconCls: 'fugue-icon ruler--plus.png', deleteButtonText: i18n("Delete Part Measurement Unit"), - deleteButtonIcon: "bundles/brainbitsfugueicons/icons/fugue/16/ruler--minus.png", - deleteButtonIconCls: '', - defaultButtonIcon: "bundles/brainbitsfugueicons/icons/fugue/16/ruler--pencil.png", + deleteButtonIconCls: 'fugue-icon ruler--minus', + defaultButtonIconCls: "fugue-icon ruler--pencil", automaticPageSize: true, initComponent: function () { this.callParent(); this.defaultButton = Ext.create("Ext.button.Button", { - icon: this.defaultButtonIcon, + iconCls: this.defaultButtonIconCls, tooltip: i18n('Mark Part Measurement Unit as Default'), disabled: true, handler: this.onDefaultClick, diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectGrid.js @@ -8,10 +8,8 @@ Ext.define('PartKeepr.ProjectGrid', { {header: i18n("Project"), dataIndex: 'name', flex: 1} ], addButtonText: i18n("Add Project"), - addButtonIcon: 'bundles/brainbitsfugueicons/icons/fugue/16/drill--plus.png', - addButtonIconCls: '', + addButtonIconCls: 'fugue-icon drill--plus', deleteButtonText: i18n("Delete Project"), - deleteButtonIcon: 'bundles/brainbitsfugueicons/icons/fugue/16/drill--minus.png', - deleteButtonIconCls: '', + deleteButtonIconCls: 'fugue-icon drill--minus', automaticPageSize: true }); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/StorageLocation/StorageLocationGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/StorageLocation/StorageLocationGrid.js @@ -14,11 +14,9 @@ Ext.define('PartKeepr.StorageLocationGrid', { {header: i18n("Storage Location"), dataIndex: 'name', flex: 1} ], addButtonText: i18n("Add Storage Location"), - addButtonIcon: 'bundles/brainbitsfugueicons/icons/fugue/16/wooden-box--plus.png', - addButtonIconCls: '', + addButtonIconCls: 'fugue-icon wooden-box--plus.png', deleteButtonText: i18n("Delete Storage Location"), - deleteButtonIcon: 'bundles/brainbitsfugueicons/icons/fugue/16/wooden-box--minus.png', - deleteButtonIconCls: '', + deleteButtonIconCls: 'fugue-icon wooden-box--minus', initComponent: function () { this.callParent(); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/AttachmentGrid.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/AttachmentGrid.js @@ -26,7 +26,7 @@ Ext.define('PartKeepr.AttachmentGrid', { disabled: true, itemId: 'delete', scope: this, - icon: 'resources/silkicons/delete.png', + iconCls: 'web-icon delete.png', handler: this.onDeleteClick }); @@ -34,7 +34,7 @@ Ext.define('PartKeepr.AttachmentGrid', { text: i18n("View"), handler: this.onViewClick, scope: this, - icon: 'resources/silkicons/zoom.png', + iconCls: 'web-icon zoom', disabled: true }); @@ -42,7 +42,7 @@ Ext.define('PartKeepr.AttachmentGrid', { text: i18n("Take image"), handler: this.onWebcamClick, scope: this, - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/webcam.png' + iconCls: 'fugue-icon webcam' }); this.dockedItems = [{ @@ -50,7 +50,7 @@ Ext.define('PartKeepr.AttachmentGrid', { items: [{ text: i18n('Add'), scope: this, - icon: 'resources/silkicons/attach.png', + iconCls: 'web-icon attach', handler: this.onAddClick }, this.webcamButton, diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/SystemNoticeButton.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/SystemNoticeButton.js @@ -1,6 +1,6 @@ Ext.define('PartKeepr.SystemNoticeButton', { extend: 'PartKeepr.FadingButton', - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/service-bell.png', + iconCls: 'fugue-icon service-bell', tooltip: i18n("Unacknowledged System Notices"), /** diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/WebcamPanel.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/WebcamPanel.js @@ -30,7 +30,7 @@ Ext.define('PartKeepr.WebcamPanel', { { this.takePhotoButton = Ext.create("Ext.button.Button", { text: i18n("Take picture and upload"), - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/webcam.png', + iconCls: 'fugue-icon webcam', handler: this.takePhoto, scope: this }); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Dialogs/FileUploadDialog.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Dialogs/FileUploadDialog.js @@ -89,7 +89,7 @@ Ext.define('PartKeepr.FileUploadDialog', { this.uploadSizeButton = Ext.create("Ext.button.Button", { xtype: 'button', - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/information-frame.png', + iconCls: 'fugue-icon information-frame', handler: this.showUploadSizeInformation, scope: this }); diff --git a/src/PartKeepr/FrontendBundle/Resources/views/index.html.twig b/src/PartKeepr/FrontendBundle/Resources/views/index.html.twig @@ -18,6 +18,7 @@ 'js/packages/extjs6/build/packages/ux/classic/classic/resources/ux-all.css' 'js/packages/extjs6/build/packages/charts/classic/neptune/resources/charts-all.css' 'atelierspierrot/famfamfam-silk-sprite/silk-icons-sprite.css' + 'spritesheets/fugue-16.css' 'bundles/partkeeprfrontend/css/PartKeepr.css' %} <link rel="stylesheet" href="{{ asset_url }}"/> {% endstylesheets %} diff --git a/src/PartKeepr/PartBundle/Tests/StockTest.php b/src/PartKeepr/PartBundle/Tests/StockTest.php @@ -4,7 +4,7 @@ namespace PartKeepr\PartBundle\Tests; use Doctrine\Common\DataFixtures\ProxyReferenceRepository; use Doctrine\ORM\Query; use Dunglas\ApiBundle\Api\IriConverter; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; use PartKeepr\PartBundle\Entity\Part; class StockTest extends WebTestCase diff --git a/src/PartKeepr/ProjectBundle/Tests/ProjectTest.php b/src/PartKeepr/ProjectBundle/Tests/ProjectTest.php @@ -2,7 +2,7 @@ namespace PartKeepr\ProjectBundle\Tests; use Doctrine\Common\DataFixtures\ProxyReferenceRepository; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; use PartKeepr\PartBundle\Entity\Part; use Symfony\Component\HttpFoundation\File\UploadedFile; diff --git a/src/PartKeepr/SetupBundle/Controller/CacheWarmupSetupController.php b/src/PartKeepr/SetupBundle/Controller/CacheWarmupSetupController.php @@ -35,6 +35,18 @@ class CacheWarmupSetupController extends SetupController $application->run($input, $output); $input = new ArrayInput(array( + 'command' => 'nfq:sprite:generate', + )); + + $application->run($input, $output); + + $input = new ArrayInput(array( + 'command' => 'assets:install', + )); + + $application->run($input, $output); + + $input = new ArrayInput(array( 'command' => 'generate:extjs:entities', )); diff --git a/src/PartKeepr/SetupBundle/Resources/setup-data/units.yml b/src/PartKeepr/SetupBundle/Resources/setup-data/units.yml @@ -35,7 +35,7 @@ Ampere: symbol: A prefixes: - kilo - - milli + - micro - "-" - milli - nano diff --git a/src/PartKeepr/TipOfTheDayBundle/Tests/SyncTipsTest.php b/src/PartKeepr/TipOfTheDayBundle/Tests/SyncTipsTest.php @@ -1,7 +1,7 @@ <?php namespace PartKeepr\TipOfTheDayBundle\Tests; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; class SyncTipsTest extends WebTestCase { diff --git a/src/PartKeepr/TipOfTheDayBundle/Tests/TipOfTheDayTest.php b/src/PartKeepr/TipOfTheDayBundle/Tests/TipOfTheDayTest.php @@ -3,7 +3,7 @@ namespace PartKeepr\TipOfTheDayBundle\Tests; use Doctrine\Common\DataFixtures\ProxyReferenceRepository; use Dunglas\ApiBundle\Api\IriConverter; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; class TipOfTheDayTest extends WebTestCase { diff --git a/src/PartKeepr/UploadedFileBundle/Tests/FileControllerTest.php b/src/PartKeepr/UploadedFileBundle/Tests/FileControllerTest.php @@ -2,7 +2,7 @@ namespace PartKeepr\UploadedFileBundle\Tests; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; use Symfony\Component\HttpFoundation\File\UploadedFile; class FileControllerTest extends WebTestCase diff --git a/src/PartKeepr/UploadedFileBundle/Tests/TemporaryFileControllerTest.php b/src/PartKeepr/UploadedFileBundle/Tests/TemporaryFileControllerTest.php @@ -2,7 +2,7 @@ namespace PartKeepr\UploadedFileBundle\Tests; -use Liip\FunctionalTestBundle\Test\WebTestCase; +use PartKeepr\CoreBundle\Tests\WebTestCase; use Symfony\Component\HttpFoundation\File\UploadedFile; class TemporaryFileControllerTest extends WebTestCase diff --git a/web/spritesheets/.keep b/web/spritesheets/.keep