Skip to content

Commit

Permalink
setup fix user
Browse files Browse the repository at this point in the history
  • Loading branch information
Praesidiarius committed Jan 28, 2020
1 parent 5e275fc commit cf2ce5a
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 37 deletions.
3 changes: 3 additions & 0 deletions docs/book/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Using composer
$ composer create-project oneplace/oneplace-core my-app
```

You also need to add some 3rd party assets to make onePlace
fully work. See [Installation](/installation)

## Support
* Issues: [github.com/oneplc/plc_x_core/issues](https://github.com/oneplc/plc_x_core/issues)
* Source: [github.com/oneplc/plc_x_core/](https://github.com/oneplc/plc_x_core/)
Expand Down
64 changes: 64 additions & 0 deletions docs/book/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Installation

Using composer

```bash
$ 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

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

* [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)
> For Featured Image Upload
```
.
+-- filepond
| +-- filepond.css
| +-- filepond.min.js
```

* [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
```
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ nav:
- Home: index.md
- Introduction: intro.md
- 'Quick Start': quick-start.md
- 'Advanced Configuration':
- 'Advanced':
- 'Installation': installation.md
- 'Themes': themes.md
site_name: oneplace-core
site_description: "onePlace Application Framework Core Module"
Expand Down
4 changes: 4 additions & 0 deletions module/Application/src/Controller/SetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ public function indexAction() {
'button_icon_position'=>'left',
'form_label_spacing'=>2,
'theme'=>'default',
'created_by'=>1,
'created_date'=>date('Y-m-d H:i:s',time()),
'modified_by'=>1,
'modified_date'=>date('Y-m-d H:i:s',time()),
]);

$iAdminUserID = $oUserTbl->lastInsertValue;
Expand Down
7 changes: 6 additions & 1 deletion module/Application/view/layout/layout-default.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,26 @@ 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/fontawesome/css/all.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'))
?>

<!-- Scripts -->
<?= $this->inlineScript()
->prependFile($this->basePath('js/plc-message.js'))
->prependFile($this->basePath('js/listener.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'))
?>
<script src="https://kit.fontawesome.com/11e0d8bba0.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>

</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark" role="navigation">
Expand Down
3 changes: 2 additions & 1 deletion module/Application/view/partial/indextable.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
foreach($this->layout()->aIndexColumns as $oCol) { ?>
<th id="<?=$this->sTableName?>_<?=$oCol->fieldkey?>" style="width:<?=$oCol->width?>;">
<?=$oCol->label?>
<?=$oCol->label?> <i class="fas fa-arrows-alt-h plc-index-table-column-sort" style="color:grey;"></i>
</th>
<?php } ?>
</tr>
Expand Down Expand Up @@ -46,6 +46,7 @@ echo $this->paginationControl(
<script>
$(function() {
$( ".plc-core-basic-table thead tr" ).sortable({
handle: '.plc-index-table-column-sort',
update: function( event, ui ) {
var sortedIDs = $( ".plc-core-basic-table thead tr" ).sortable( "toArray" );
$.post('/user/updateindexcolumnsort',{table:'<?=$this->sTableName?>',columns:sortedIDs},function(retVal) {
Expand Down
48 changes: 14 additions & 34 deletions module/Application/view/partial/viewform.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -44,47 +44,27 @@
<script src="https://unpkg.com/filepond/dist/filepond.js"></script>
<!-- Turn all file input elements into ponds -->
<script>
FilePond.registerPlugin(FilePondPluginImageExifOrientation);
FilePond.registerPlugin(FilePondPluginFileValidateSize);
FilePond.registerPlugin(FilePondPluginFileValidateType);
FilePond.registerPlugin(FilePondPluginImageValidateSize);
FilePond.registerPlugin(FilePondPluginImagePreview);
FilePond.registerPlugin(FilePondPluginImageTransform);
FilePond.registerPlugin(FilePondPluginImageCrop);
FilePond.registerPlugin(FilePondPluginImageResize);
// We register the plugins required to do
// image previews, cropping, resizing, etc.
/**
FilePond.registerPlugin(
FilePondPluginFileValidateType,
FilePondPluginImageExifOrientation,
FilePondPluginImagePreview,
FilePondPluginImageCrop,
FilePondPluginImageResize,
FilePondPluginImageTransform,
FilePondPluginImageEdit
);
**/

// Select the file input and use
// create() to turn it into a pond
FilePond.registerPlugin(
FilePondPluginFileValidateType,
FilePondPluginImageExifOrientation,
FilePondPluginImagePreview,
FilePondPluginImageCrop,
FilePondPluginImageResize,
FilePondPluginImageTransform
);
FilePond.create(
document.getElementById('filepondtest'),
document.querySelector('input'),
{
labelIdle: `Drag & Drop your picture or <span class="filepond--label-action">Browse</span>`,
stylePanelLayout: 'compact circle',
styleLoadIndicatorPosition: 'center bottom',
styleProgressIndicatorPosition: 'right bottom',
styleButtonRemoveItemPosition: 'left bottom',
styleButtonProcessItemPosition: 'right bottom',
imagePreviewHeight: 170,
imageCropAspectRatio: '1:1',
imageResizeTargetWidth: 200,
imageResizeTargetHeight: 200,
maxFileSize:'1MB',
acceptedFileTypes:['image/png', 'image/jpeg'],
imageValidateSizeMinWidth:500,
imageValidateSizeMinHeight:500
stylePanelLayout: 'compact circle',
styleLoadIndicatorPosition: 'center bottom',
styleProgressIndicatorPosition: 'right bottom',
styleButtonRemoveItemPosition: 'left bottom',
styleButtonProcessItemPosition: 'right bottom'
}
);

Expand Down

0 comments on commit cf2ce5a

Please sign in to comment.