Skip to content

Commit

Permalink
frontend deps now shipped with yarn.
Browse files Browse the repository at this point in the history
  • Loading branch information
Praesidiarius committed Feb 2, 2020
1 parent 15c0dd3 commit 6852734
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 119 deletions.
2 changes: 2 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ./.yarnrc
--modules-folder public/vendor
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "oneplace/oneplace-core",
"description": "onePlace Core Application",
"type": "project",
"version": "1.0.10",
"version": "1.0.11",
"license": "BSD-3-Clause",
"keywords": [
"laminas",
Expand Down
88 changes: 4 additions & 84 deletions docs/book/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,93 +9,13 @@ $ composer create-project oneplace/oneplace-core my-app
After you successfully installed core, you may add 3rd party
dependencies for certain features (they are disabled if libs are not found)

Add them to ./public/vendor
the easiest way is to use yarn. if you dont have yarn, [get it here](https://legacy.yarnpkg.com/en/docs/install/#windows-stable)
you can also use npm if you like

* [jQuery UI 1.12.1](https://jqueryui.com/download/)
> For Drag & Drop Index Columns
```
.
+-- jquery-ui
| +-- jquery-ui.min.css
| +-- jquery-ui.min.js
$ cd my-app
$ yarn install
```

* [Apex Charts](https://apexcharts.com/)
> For all Daily Stats Charts and many more
```
.
+-- apexcharts
| +-- apexcharts.css
| +-- apexcharts.min.js
```

* [Font Awesome 5.12.0 Free or Pro](https://fontawesome.com/)
> For all icons across onePlace
```
.
+-- fontawesome
| +-- css
| | +-- all.min.css
| +-- webfonts
| | +-- fa-brands-400.eot/svg/ttf/woff/woff2
| | +-- ..(all fonts in package)
```

* [Filepond 4.9.4](https://github.com/pqina/filepond/releases)
* [file-validate-size](https://github.com/pqina/filepond-plugin-file-validate-size/releases)
* [file-validate-type](https://github.com/pqina/filepond-plugin-file-validate-type/releases)
* [image-validate-size](https://github.com/pqina/filepond-plugin-image-validate-size/releases)
* [image-crop](https://github.com/pqina/filepond-plugin-image-crop/releases)
* [image-preview](https://github.com/pqina/filepond-plugin-image-preview/releases)
* [image-resize](https://github.com/pqina/filepond-plugin-image-resize/releases)
* [image-exif-orientation](https://github.com/pqina/filepond-plugin-image-exif-orientation/releases)
* [image-transform](https://github.com/pqina/filepond-plugin-image-transform/releases)
> For Featured Image Upload
```
.
+-- filepond
| +-- filepond.css
| +-- filepond-plugin-image-preview.css
| +-- filepond.min.js
| +-- filepond-plugin-image-preview.js
```

* [Uppy 1.8.0](https://github.com/transloadit/uppy/releases)
* + @uppy/xhr-upload@1.4.2
> For Image Gallery Upload
```
.
+-- uppy
| +-- filepond.css
| +-- filepond-plugin-image-preview.css
| +-- filepond.min.js
| +-- filepond-plugin-image-preview.js
```

* [Summernote 0.8.15](https://github.com/summernote/summernote/releases)
> Texteditor
```
.
+-- summernote
| +-- summernote-bs4.min.js
| +-- summernote-bs4.min.css
| +-- lang
| +-- font
```

* [Select2 4.0.x](https://github.com/select2/select2/releases)
> For all Select und Multiselect Fields
```
.
+-- select2
| +-- css
| | +-- select2.min.css
| +-- js
| | +-- i18n
| | | +-- *.js (all languages you want/need)
| | +-- select2.full.min.js
```

## support for environment variables in setup

if you are testing and often have to deploy the same oneplace system.
Expand Down
4 changes: 2 additions & 2 deletions module/Application/src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class Module {
/**
* Module Version
*
* @since 1.0.10
* @since 1.0.11
*/
const VERSION = '1.0.10';
const VERSION = '1.0.11';

public function getConfig() : array {
return include __DIR__ . '/../config/module.config.php';
Expand Down
52 changes: 29 additions & 23 deletions module/Application/view/layout/layout-default.phtml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<?php

use Application\Controller\CoreController;
use Application\Module;

# Set App Title from Database if found
$sPlcTitle = 'onePlace';
if(isset(CoreController::$aGlobalSettings['app-title'])) {
$sPlcTitle = str_replace(['##VERSION##'], [Module::VERSION], CoreController::$aGlobalSettings['app-title']);
}
?>
<?= $this->doctype() ?>
<html lang="en">
<head>
<meta charset="utf-8">
<?= $this->headTitle('onePlace X - RC 1')->setSeparator(' - ')->setAutoEscape(false) ?>
<?= $this->headTitle($sPlcTitle)->setSeparator(' - ')->setAutoEscape(false) ?>

<?= $this->headMeta()
->appendName('viewport', 'width=device-width, initial-scale=1.0')
Expand All @@ -16,30 +22,30 @@ use Application\Controller\CoreController;

<!-- Le styles -->
<?= $this->headLink(['rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/img/favicon.ico'])
->prependStylesheet($this->basePath('css/style.css'))
->prependStylesheet($this->basePath('vendor/summernote/summernote-bs4.min.css'))
->prependStylesheet($this->basePath('vendor/fontawesome/css/all.min.css'))
->prependStylesheet($this->basePath('vendor/filepond/filepond-plugin-image-preview.min.css'))
->prependStylesheet($this->basePath('vendor/filepond/filepond.css'))
->prependStylesheet($this->basePath('vendor/apexcharts/css/apexcharts.css'))
->prependStylesheet($this->basePath('vendor/select2/css/select2.min.css'))
->prependStylesheet($this->basePath('vendor/jquery-ui/jquery-ui.min.css'))
->prependStylesheet($this->basePath('css/bootstrap.min.css'))
->prependStylesheet($this->basePath('/css/style.css'))
->prependStylesheet($this->basePath('/vendor/@fortawesome/fontawesome-free/css/all.min.css'))
->prependStylesheet($this->basePath('/vendor/summernote/dist/summernote-bs4.min.css'))
->prependStylesheet($this->basePath('/vendor/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css'))
->prependStylesheet($this->basePath('/vendor/filepond/dist/filepond.min.css'))
->prependStylesheet($this->basePath('/vendor/uppy/dist/uppy.min.css'))
->prependStylesheet($this->basePath('/vendor/apexcharts/dist/apexcharts.min.css'))
->prependStylesheet($this->basePath('/vendor/select2/dist/css/select2.min.css'))
->prependStylesheet($this->basePath('/vendor/bootstrap/dist/css/bootstrap.min.css'))
?>
<link href="https://transloadit.edgly.net/releases/uppy/v1.8.0/uppy.min.css" rel="stylesheet">

<!-- Scripts -->
<?= $this->inlineScript()
->prependFile($this->basePath('js/plc-message.js'))
->prependFile($this->basePath('js/listener.js'))
->prependFile($this->basePath('vendor/summernote/summernote-bs4.min.js'))
->prependFile($this->basePath('vendor/apexcharts/apexcharts.min.js'))
->prependFile($this->basePath('vendor/jquery-ui/jquery-ui.min.js'))
->prependFile($this->basePath('vendor/select2/js/select2.full.min.js'))
->prependFile($this->basePath('js/bootstrap.min.js'))
->prependFile($this->basePath('js/jquery-3.4.1.min.js'))
->prependFile($this->basePath('/js/plc-message.js'))
->prependFile($this->basePath('/js/listener.js'))
->prependFile($this->basePath('/vendor/@fortawesome/fontawesome-free/js/all.min.js'))
->prependFile($this->basePath('/vendor/sweetalert/dist/sweetalert.min.js'))
->prependFile($this->basePath('/vendor/summernote/dist/summernote-bs4.min.js'))
->prependFile($this->basePath('/vendor/apexcharts/dist/apexcharts.min.js'))
->prependFile($this->basePath('/vendor/jquery-ui-sortable/jquery-ui.min.js'))
->prependFile($this->basePath('/vendor/select2/dist/js/select2.full.min.js'))
->prependFile($this->basePath('/vendor/bootstrap/dist/js/bootstrap.min.js'))
->prependFile($this->basePath('/vendor/jquery/dist/jquery.min.js'))
?>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>

</head>
<body>
Expand All @@ -50,7 +56,7 @@ use Application\Controller\CoreController;
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="<?= $this->url('home') ?>">
<img src="<?= $this->basePath('img/logo_small_inv.png') ?>" height="28" alt="oneplace"/>&nbsp;onePlace X
<img src="<?= $this->basePath('/img/logo_small_inv.png') ?>" height="28" alt="oneplace"/>&nbsp;onePlace
</a>
</div>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
Expand All @@ -77,7 +83,7 @@ use Application\Controller\CoreController;
<div class="text-white px-2">
<?php
if(is_object(CoreController::$oSession->oUser)) {
$aUserXPInfo = CoreController::$oSession->oUser->getExperience();
$aUserXPInfo = CoreController::$oSession->oUser->getExperience();
?>
<?=CoreController::$oSession->oUser->getLabel()?>
- <small><?=$this->translate('Level')?> <?=$aUserXPInfo['level']?></small>
Expand Down Expand Up @@ -117,7 +123,7 @@ use Application\Controller\CoreController;
</div>
<hr>
<footer>
<p>&copy; 2010-<?= date('Y') ?> by Verein onePlace. Alle Rechte vorbehalten.</p>
<p>&copy; 2010-<?= date('Y') ?> by Verein onePlace. All rights reserved.</p>
</footer>
</div>
<?= $this->inlineScript() ?>
Expand Down
16 changes: 8 additions & 8 deletions module/Application/view/partial/viewform.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
</div>
<?php if($oItem->hasFeaturedImage()) { ?>
<!-- Load FilePond library -->
<script src="/vendor/filepond/filepond-plugin-image-exif-orientation.min.js"></script>
<script src="/vendor/filepond/filepond-plugin-file-validate-type.min.js"></script>
<script src="/vendor/filepond/filepond-plugin-image-validate-size.min.js"></script>
<script src="/vendor/filepond/filepond-plugin-image-resize.min.js"></script>
<script src="/vendor/filepond/filepond-plugin-image-crop.min.js"></script>
<script src="/vendor/filepond/filepond-plugin-image-preview.min.js"></script>
<script src="/vendor/filepond/filepond-plugin-image-transform.min.js"></script>
<script src="/vendor/filepond/filepond.min.js"></script>
<script src="/vendor/filepond-plugin-image-exif-orientation/dist/filepond-plugin-image-exif-orientation.min.js"></script>
<script src="/vendor/filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.min.js"></script>
<script src="/vendor/filepond-plugin-image-validate-size/dist/filepond-plugin-image-validate-size.min.js"></script>
<script src="/vendor/filepond-plugin-image-resize/dist/filepond-plugin-image-resize.min.js"></script>
<script src="/vendor/filepond-plugin-image-crop/dist/filepond-plugin-image-crop.min.js"></script>
<script src="/vendor/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.js"></script>
<script src="/vendor/filepond-plugin-image-transform/dist/filepond-plugin-image-transform.min.js"></script>
<script src="/vendor/filepond/dist/filepond.min.js"></script>
<!-- Turn all file input elements into ponds -->
<script>
const fieldsetElement = document.getElementById('filepond');
Expand Down
2 changes: 1 addition & 1 deletion module/Application/view/partial/viewformfield.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ switch($oField->type) {
break;
case 'gallery': ?>
<div id="drag-drop-area"></div>
<script src="https://transloadit.edgly.net/releases/uppy/v1.8.0/uppy.min.js"></script>
<script src="/vendor/uppy/dist/uppy.min.js"></script>
<script>
var uppy = Uppy.Core()
.use(Uppy.Dashboard, {
Expand Down
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "oneplace-core",
"version": "1.0.11",
"description": "oneplace core application",
"main": "index.js",
"repository": "https://github.com/Oneplc/PLC_X_Core",
"author": "Verein onePlace",
"license": "BSD-3",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.12.0",
"apexcharts": "^3.15.3",
"bootstrap": "^4.4.1",
"filepond": "^4.9.5",
"filepond-plugin-file-validate-size": "^2.2.0",
"filepond-plugin-file-validate-type": "^1.2.4",
"filepond-plugin-image-crop": "^2.0.3",
"filepond-plugin-image-exif-orientation": "^1.0.6",
"filepond-plugin-image-preview": "^4.6.0",
"filepond-plugin-image-resize": "^2.0.4",
"filepond-plugin-image-transform": "^3.7.1",
"filepond-plugin-image-validate-size": "^1.2.3",
"jquery": "^3.4.1",
"jquery-ui": "^1.12.1",
"jquery-ui-sortable": "^1.0.0",
"select2": "^4.0.13",
"summernote": "^0.8.15",
"sweetalert": "^2.1.2",
"uppy": "^1.8.0"
}
}

0 comments on commit 6852734

Please sign in to comment.