initial commit
This commit is contained in:
commit
d0da0569d7
15
.editorconfig
Executable file
15
.editorconfig
Executable file
@ -0,0 +1,15 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
46
.env.example
Executable file
46
.env.example
Executable file
@ -0,0 +1,46 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||
5
.gitattributes
vendored
Executable file
5
.gitattributes
vendored
Executable file
@ -0,0 +1,5 @@
|
||||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.scss linguist-vendored
|
||||
*.js linguist-vendored
|
||||
CHANGELOG.md export-ignore
|
||||
14
.gitignore
vendored
Executable file
14
.gitignore
vendored
Executable file
@ -0,0 +1,14 @@
|
||||
/node_modules
|
||||
/public/hot
|
||||
/public/storage
|
||||
/public/upload
|
||||
/storage/*.key
|
||||
/vendor
|
||||
.env
|
||||
.env.backup
|
||||
.phpunit.result.cache
|
||||
Homestead.json
|
||||
Homestead.yaml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
/vue/node_modules
|
||||
13
.styleci.yml
Executable file
13
.styleci.yml
Executable file
@ -0,0 +1,13 @@
|
||||
php:
|
||||
preset: laravel
|
||||
disabled:
|
||||
- unused_use
|
||||
finder:
|
||||
not-name:
|
||||
- index.php
|
||||
- server.php
|
||||
js:
|
||||
finder:
|
||||
not-name:
|
||||
- webpack.mix.js
|
||||
css: true
|
||||
78
README.md
Executable file
78
README.md
Executable file
@ -0,0 +1,78 @@
|
||||
<p align="center"><img src="https://res.cloudinary.com/dtfbvvkyp/image/upload/v1566331377/laravel-logolockup-cmyk-red.svg" width="400"></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" alt="License"></a>
|
||||
</p>
|
||||
|
||||
## About Laravel
|
||||
|
||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
|
||||
|
||||
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
||||
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
||||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
||||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
||||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
||||
- [Robust background job processing](https://laravel.com/docs/queues).
|
||||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
||||
|
||||
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
||||
|
||||
## Learning Laravel
|
||||
|
||||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
|
||||
|
||||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
||||
|
||||
## Laravel Sponsors
|
||||
|
||||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
|
||||
|
||||
- **[Vehikl](https://vehikl.com/)**
|
||||
- **[Tighten Co.](https://tighten.co)**
|
||||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||
- **[64 Robots](https://64robots.com)**
|
||||
- **[Cubet Techno Labs](https://cubettech.com)**
|
||||
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
||||
- **[British Software Development](https://www.britishsoftware.co)**
|
||||
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
|
||||
- **[DevSquad](https://devsquad.com)**
|
||||
- [UserInsights](https://userinsights.com)
|
||||
- [Fragrantica](https://www.fragrantica.com)
|
||||
- [SOFTonSOFA](https://softonsofa.com/)
|
||||
- [User10](https://user10.com)
|
||||
- [Soumettre.fr](https://soumettre.fr/)
|
||||
- [CodeBrisk](https://codebrisk.com)
|
||||
- [1Forge](https://1forge.com)
|
||||
- [TECPRESSO](https://tecpresso.co.jp/)
|
||||
- [Runtime Converter](http://runtimeconverter.com/)
|
||||
- [WebL'Agence](https://weblagence.com/)
|
||||
- [Invoice Ninja](https://www.invoiceninja.com)
|
||||
- [iMi digital](https://www.imi-digital.de/)
|
||||
- [Earthlink](https://www.earthlink.ro/)
|
||||
- [Steadfast Collective](https://steadfastcollective.com/)
|
||||
- [We Are The Robots Inc.](https://watr.mx/)
|
||||
- [Understand.io](https://www.understand.io/)
|
||||
- [Abdel Elrafa](https://abdelelrafa.com)
|
||||
- [Hyper Host](https://hyper.host)
|
||||
- [Appoly](https://www.appoly.co.uk)
|
||||
- [OP.GG](https://op.gg)
|
||||
|
||||
## Contributing
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## License
|
||||
|
||||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
72
composer.json
Executable file
72
composer.json
Executable file
@ -0,0 +1,72 @@
|
||||
{
|
||||
"name": "laravel/laravel",
|
||||
"type": "project",
|
||||
"description": "The Laravel Framework.",
|
||||
"keywords": [
|
||||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^7.2",
|
||||
"alexusmai/laravel-file-manager": "^2.5",
|
||||
"fideloper/proxy": "^4.0",
|
||||
"jeroennoten/laravel-adminlte": "^3.0",
|
||||
"laravel/framework": "^8.0",
|
||||
"laravel/horizon": "^5.6",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "3.0",
|
||||
"phpoffice/phpspreadsheet": "^1.18",
|
||||
"phpoffice/phpword": "^0.17.0",
|
||||
"predis/predis": "^1.1",
|
||||
"prewk/xml-string-streamer": "^1.0",
|
||||
"ramsey/uuid": "^4.1",
|
||||
"spatie/browsershot": "^3.50"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.5",
|
||||
"facade/ignition": "^2.3.6",
|
||||
"fzaninotto/faker": "^1.4",
|
||||
"mockery/mockery": "^1.0",
|
||||
"nunomaduro/collision": "^5.0",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": []
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/"
|
||||
},
|
||||
"classmap": [
|
||||
"database/seeds",
|
||||
"database/factories"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"scripts": {
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi"
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"@php artisan key:generate --ansi"
|
||||
]
|
||||
}
|
||||
}
|
||||
9223
composer.lock
generated
Executable file
9223
composer.lock
generated
Executable file
File diff suppressed because it is too large
Load Diff
2
js/extern.js
vendored
Normal file
2
js/extern.js
vendored
Normal file
File diff suppressed because one or more lines are too long
37
js/extern.js.LICENSE.txt
Normal file
37
js/extern.js.LICENSE.txt
Normal file
@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* core-base v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* devtools-if v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* message-compiler v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* shared v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* vue-devtools v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*! PhotoSwipe - v4.1.3 - 2019-01-08
|
||||
* http://photoswipe.com
|
||||
* Copyright (c) 2019 Dmitry Semenov; */
|
||||
|
||||
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
|
||||
* http://photoswipe.com
|
||||
* Copyright (c) 2019 Dmitry Semenov; */
|
||||
2
js/externMP.js
vendored
Normal file
2
js/externMP.js
vendored
Normal file
File diff suppressed because one or more lines are too long
37
js/externMP.js.LICENSE.txt
Normal file
37
js/externMP.js.LICENSE.txt
Normal file
@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* core-base v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* devtools-if v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* message-compiler v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* shared v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* vue-devtools v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*! PhotoSwipe - v4.1.3 - 2019-01-08
|
||||
* http://photoswipe.com
|
||||
* Copyright (c) 2019 Dmitry Semenov; */
|
||||
|
||||
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
|
||||
* http://photoswipe.com
|
||||
* Copyright (c) 2019 Dmitry Semenov; */
|
||||
4
mix-manifest.json
Normal file
4
mix-manifest.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"/js/extern.js": "/js/extern.js",
|
||||
"/js/externMP.js": "/js/externMP.js"
|
||||
}
|
||||
25860
package-lock.json
generated
Normal file
25860
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
59
package.json
Executable file
59
package.json
Executable file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"watch": "export NODE_OPTIONS=--openssl-legacy-provider; npm run development -- --watch",
|
||||
"watch-poll": "npm run watch -- --watch-poll",
|
||||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||
"prod": "export NODE_OPTIONS=--openssl-legacy-provider;npm run production",
|
||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/webpack-env": "^1.17.0",
|
||||
"@vue/compiler-sfc": "^3.2.37",
|
||||
"axios": "^0.19.2",
|
||||
"cross-env": "^5.1",
|
||||
"laravel-mix": "^5.0.9",
|
||||
"laravel-mix-vue3": "^0.7.0",
|
||||
"lodash": "^4.17.13",
|
||||
"resolve-url-loader": "^2.3.1",
|
||||
"sass": "^1.15.2",
|
||||
"sass-loader": "^8.0.0",
|
||||
"vue": "^3.2.36",
|
||||
"vue-loader": "^17.0.0",
|
||||
"vue-template-compiler": "^2.7.8"
|
||||
},
|
||||
"name": "ekoterm",
|
||||
"description": "<p align=\"center\"><img src=\"https://res.cloudinary.com/dtfbvvkyp/image/upload/v1566331377/laravel-logolockup-cmyk-red.svg\" width=\"400\"></p>",
|
||||
"version": "1.0.0",
|
||||
"main": "webpack.mix.js",
|
||||
"directories": {
|
||||
"test": "tests"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "alfa-m@orion2180.startdedicated.net:gitrepos/grejanje/"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"code-mirror-themes": "^1.0.0",
|
||||
"codemirror": "^6.0.1",
|
||||
"codemirror-editor-vue3": "^2.1.7",
|
||||
"codemirror-frontmatters": "^1.0.2",
|
||||
"cropperjs": "^1.5.12",
|
||||
"laravel-file-manager": "^3.0.3",
|
||||
"mitt": "^3.0.0",
|
||||
"photoswipe": "^5.3.7",
|
||||
"plyr": "^3.7.2",
|
||||
"transliteration": "^2.3.5",
|
||||
"vue-axios": "^3.5.2",
|
||||
"vue-codemirror": "^6.0.2",
|
||||
"vue-fancybox": "^1.0.3",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue3-picture-swipe": "^3.0.6",
|
||||
"vuex": "^4.0.2"
|
||||
}
|
||||
}
|
||||
37
phpunit.xml
Executable file
37
phpunit.xml
Executable file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false">
|
||||
<testsuites>
|
||||
<testsuite name="Unit">
|
||||
<directory suffix="Test.php">./tests/Unit</directory>
|
||||
</testsuite>
|
||||
|
||||
<testsuite name="Feature">
|
||||
<directory suffix="Test.php">./tests/Feature</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./app</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<php>
|
||||
<server name="APP_ENV" value="testing"/>
|
||||
<server name="BCRYPT_ROUNDS" value="4"/>
|
||||
<server name="CACHE_DRIVER" value="array"/>
|
||||
<server name="DB_CONNECTION" value="sqlite"/>
|
||||
<server name="DB_DATABASE" value=":memory:"/>
|
||||
<server name="MAIL_DRIVER" value="array"/>
|
||||
<server name="QUEUE_CONNECTION" value="sync"/>
|
||||
<server name="SESSION_DRIVER" value="array"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
21
public/.htaccess
Executable file
21
public/.htaccess
Executable file
@ -0,0 +1,21 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews -Indexes
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
RewriteRule ^ %1 [L,R=301]
|
||||
|
||||
# Handle Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
19441
public/js/app.js
vendored
Normal file
19441
public/js/app.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
24318
public/js/bmwExtern.js
vendored
Normal file
24318
public/js/bmwExtern.js
vendored
Normal file
File diff suppressed because one or more lines are too long
29
public/js/bmwExtern.js.LICENSE.txt
Normal file
29
public/js/bmwExtern.js.LICENSE.txt
Normal file
@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* core-base v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* devtools-if v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* message-compiler v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* shared v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* vue-devtools v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
2
public/js/extern.js
vendored
Normal file
2
public/js/extern.js
vendored
Normal file
File diff suppressed because one or more lines are too long
37
public/js/extern.js.LICENSE.txt
Normal file
37
public/js/extern.js.LICENSE.txt
Normal file
@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* core-base v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* devtools-if v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* message-compiler v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* shared v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* vue-devtools v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*! PhotoSwipe - v4.1.3 - 2019-01-08
|
||||
* http://photoswipe.com
|
||||
* Copyright (c) 2019 Dmitry Semenov; */
|
||||
|
||||
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
|
||||
* http://photoswipe.com
|
||||
* Copyright (c) 2019 Dmitry Semenov; */
|
||||
2
public/js/externMP.js
vendored
Normal file
2
public/js/externMP.js
vendored
Normal file
File diff suppressed because one or more lines are too long
37
public/js/externMP.js.LICENSE.txt
Normal file
37
public/js/externMP.js.LICENSE.txt
Normal file
@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* core-base v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* devtools-if v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* message-compiler v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* shared v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* vue-devtools v9.2.2
|
||||
* (c) 2022 kazuya kawaguchi
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*! PhotoSwipe - v4.1.3 - 2019-01-08
|
||||
* http://photoswipe.com
|
||||
* Copyright (c) 2019 Dmitry Semenov; */
|
||||
|
||||
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
|
||||
* http://photoswipe.com
|
||||
* Copyright (c) 2019 Dmitry Semenov; */
|
||||
2
public/js/file-manager.js
vendored
Normal file
2
public/js/file-manager.js
vendored
Normal file
File diff suppressed because one or more lines are too long
18
public/js/file-manager.js.LICENSE.txt
Normal file
18
public/js/file-manager.js.LICENSE.txt
Normal file
@ -0,0 +1,18 @@
|
||||
/*!
|
||||
* Cropper.js v1.5.12
|
||||
* https://fengyuanchen.github.io/cropperjs
|
||||
*
|
||||
* Copyright 2015-present Chen Fengyuan
|
||||
* Released under the MIT license
|
||||
*
|
||||
* Date: 2021-06-12T08:00:17.411Z
|
||||
*/
|
||||
|
||||
/*!
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <http://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
621
public/js/jquery.blockUI.js
vendored
Executable file
621
public/js/jquery.blockUI.js
vendored
Executable file
@ -0,0 +1,621 @@
|
||||
/*!
|
||||
* jQuery blockUI plugin
|
||||
* Version 2.70.0-2014.11.23
|
||||
* Requires jQuery v1.7 or later
|
||||
*
|
||||
* Examples at: http://malsup.com/jquery/block/
|
||||
* Copyright (c) 2007-2013 M. Alsup
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
|
||||
*/
|
||||
|
||||
;(function() {
|
||||
/*jshint eqeqeq:false curly:false latedef:false */
|
||||
"use strict";
|
||||
|
||||
function setup($) {
|
||||
$.fn._fadeIn = $.fn.fadeIn;
|
||||
|
||||
var noOp = $.noop || function() {};
|
||||
|
||||
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
|
||||
// confusing userAgent strings on Vista)
|
||||
var msie = /MSIE/.test(navigator.userAgent);
|
||||
var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
|
||||
var mode = document.documentMode || 0;
|
||||
var setExpr = $.isFunction( document.createElement('div').style.setExpression );
|
||||
|
||||
// global $ methods for blocking/unblocking the entire page
|
||||
$.blockUI = function(opts) { install(window, opts); };
|
||||
$.unblockUI = function(opts) { remove(window, opts); };
|
||||
|
||||
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
|
||||
$.growlUI = function(title, message, timeout, onClose) {
|
||||
var $m = $('<div class="growlUI"></div>');
|
||||
if (title) $m.append('<h1>'+title+'</h1>');
|
||||
if (message) $m.append('<h2>'+message+'</h2>');
|
||||
if (timeout === undefined) timeout = 3000;
|
||||
|
||||
// Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications
|
||||
var callBlock = function(opts) {
|
||||
opts = opts || {};
|
||||
|
||||
$.blockUI({
|
||||
message: $m,
|
||||
fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700,
|
||||
fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000,
|
||||
timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout,
|
||||
centerY: false,
|
||||
showOverlay: false,
|
||||
onUnblock: onClose,
|
||||
css: $.blockUI.defaults.growlCSS
|
||||
});
|
||||
};
|
||||
|
||||
callBlock();
|
||||
var nonmousedOpacity = $m.css('opacity');
|
||||
$m.mouseover(function() {
|
||||
callBlock({
|
||||
fadeIn: 0,
|
||||
timeout: 30000
|
||||
});
|
||||
|
||||
var displayBlock = $('.blockMsg');
|
||||
displayBlock.stop(); // cancel fadeout if it has started
|
||||
displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency
|
||||
}).mouseout(function() {
|
||||
$('.blockMsg').fadeOut(1000);
|
||||
});
|
||||
// End konapun additions
|
||||
};
|
||||
|
||||
// plugin method for blocking element content
|
||||
$.fn.block = function(opts) {
|
||||
if ( this[0] === window ) {
|
||||
$.blockUI( opts );
|
||||
return this;
|
||||
}
|
||||
var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
|
||||
this.each(function() {
|
||||
var $el = $(this);
|
||||
if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
|
||||
return;
|
||||
$el.unblock({ fadeOut: 0 });
|
||||
});
|
||||
|
||||
return this.each(function() {
|
||||
if ($.css(this,'position') == 'static') {
|
||||
this.style.position = 'relative';
|
||||
$(this).data('blockUI.static', true);
|
||||
}
|
||||
this.style.zoom = 1; // force 'hasLayout' in ie
|
||||
install(this, opts);
|
||||
});
|
||||
};
|
||||
|
||||
// plugin method for unblocking element content
|
||||
$.fn.unblock = function(opts) {
|
||||
if ( this[0] === window ) {
|
||||
$.unblockUI( opts );
|
||||
return this;
|
||||
}
|
||||
return this.each(function() {
|
||||
remove(this, opts);
|
||||
});
|
||||
};
|
||||
|
||||
$.blockUI.version = 2.70; // 2nd generation blocking at no extra cost!
|
||||
|
||||
// override these in your code to change the default behavior and style
|
||||
$.blockUI.defaults = {
|
||||
// message displayed when blocking (use null for no message)
|
||||
message: '<h1>Please wait...</h1>',
|
||||
|
||||
title: null, // title string; only used when theme == true
|
||||
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
|
||||
|
||||
theme: false, // set to true to use with jQuery UI themes
|
||||
|
||||
// styles for the message when blocking; if you wish to disable
|
||||
// these and use an external stylesheet then do this in your code:
|
||||
// $.blockUI.defaults.css = {};
|
||||
css: {
|
||||
padding: 0,
|
||||
margin: 0,
|
||||
width: '30%',
|
||||
top: '40%',
|
||||
left: '35%',
|
||||
textAlign: 'center',
|
||||
color: '#000',
|
||||
border: '3px solid #aaa',
|
||||
backgroundColor:'#fff',
|
||||
cursor: 'wait'
|
||||
},
|
||||
|
||||
// minimal style set used when themes are used
|
||||
themedCSS: {
|
||||
width: '30%',
|
||||
top: '40%',
|
||||
left: '35%'
|
||||
},
|
||||
|
||||
// styles for the overlay
|
||||
overlayCSS: {
|
||||
backgroundColor: '#000',
|
||||
opacity: 0.6,
|
||||
cursor: 'wait'
|
||||
},
|
||||
|
||||
// style to replace wait cursor before unblocking to correct issue
|
||||
// of lingering wait cursor
|
||||
cursorReset: 'default',
|
||||
|
||||
// styles applied when using $.growlUI
|
||||
growlCSS: {
|
||||
width: '350px',
|
||||
top: '10px',
|
||||
left: '',
|
||||
right: '10px',
|
||||
border: 'none',
|
||||
padding: '5px',
|
||||
opacity: 0.6,
|
||||
cursor: 'default',
|
||||
color: '#fff',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius':'10px',
|
||||
'-moz-border-radius': '10px',
|
||||
'border-radius': '10px'
|
||||
},
|
||||
|
||||
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
|
||||
// (hat tip to Jorge H. N. de Vasconcelos)
|
||||
/*jshint scripturl:true */
|
||||
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
|
||||
|
||||
// force usage of iframe in non-IE browsers (handy for blocking applets)
|
||||
forceIframe: false,
|
||||
|
||||
// z-index for the blocking overlay
|
||||
baseZ: 1000,
|
||||
|
||||
// set these to true to have the message automatically centered
|
||||
centerX: true, // <-- only effects element blocking (page block controlled via css above)
|
||||
centerY: true,
|
||||
|
||||
// allow body element to be stetched in ie6; this makes blocking look better
|
||||
// on "short" pages. disable if you wish to prevent changes to the body height
|
||||
allowBodyStretch: true,
|
||||
|
||||
// enable if you want key and mouse events to be disabled for content that is blocked
|
||||
bindEvents: true,
|
||||
|
||||
// be default blockUI will supress tab navigation from leaving blocking content
|
||||
// (if bindEvents is true)
|
||||
constrainTabKey: true,
|
||||
|
||||
// fadeIn time in millis; set to 0 to disable fadeIn on block
|
||||
fadeIn: 200,
|
||||
|
||||
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
|
||||
fadeOut: 400,
|
||||
|
||||
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
|
||||
timeout: 0,
|
||||
|
||||
// disable if you don't want to show the overlay
|
||||
showOverlay: true,
|
||||
|
||||
// if true, focus will be placed in the first available input field when
|
||||
// page blocking
|
||||
focusInput: true,
|
||||
|
||||
// elements that can receive focus
|
||||
focusableElements: ':input:enabled:visible',
|
||||
|
||||
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
|
||||
// no longer needed in 2012
|
||||
// applyPlatformOpacityRules: true,
|
||||
|
||||
// callback method invoked when fadeIn has completed and blocking message is visible
|
||||
onBlock: null,
|
||||
|
||||
// callback method invoked when unblocking has completed; the callback is
|
||||
// passed the element that has been unblocked (which is the window object for page
|
||||
// blocks) and the options that were passed to the unblock call:
|
||||
// onUnblock(element, options)
|
||||
onUnblock: null,
|
||||
|
||||
// callback method invoked when the overlay area is clicked.
|
||||
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
|
||||
onOverlayClick: null,
|
||||
|
||||
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
|
||||
quirksmodeOffsetHack: 4,
|
||||
|
||||
// class name of the message block
|
||||
blockMsgClass: 'blockMsg',
|
||||
|
||||
// if it is already blocked, then ignore it (don't unblock and reblock)
|
||||
ignoreIfBlocked: false
|
||||
};
|
||||
|
||||
// private data and functions follow...
|
||||
|
||||
var pageBlock = null;
|
||||
var pageBlockEls = [];
|
||||
|
||||
function install(el, opts) {
|
||||
var css, themedCSS;
|
||||
var full = (el == window);
|
||||
var msg = (opts && opts.message !== undefined ? opts.message : undefined);
|
||||
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
||||
|
||||
if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
|
||||
return;
|
||||
|
||||
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
|
||||
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
|
||||
if (opts.onOverlayClick)
|
||||
opts.overlayCSS.cursor = 'pointer';
|
||||
|
||||
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
|
||||
msg = msg === undefined ? opts.message : msg;
|
||||
|
||||
// remove the current block (if there is one)
|
||||
if (full && pageBlock)
|
||||
remove(window, {fadeOut:0});
|
||||
|
||||
// if an existing element is being used as the blocking content then we capture
|
||||
// its current place in the DOM (and current display style) so we can restore
|
||||
// it when we unblock
|
||||
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
|
||||
var node = msg.jquery ? msg[0] : msg;
|
||||
var data = {};
|
||||
$(el).data('blockUI.history', data);
|
||||
data.el = node;
|
||||
data.parent = node.parentNode;
|
||||
data.display = node.style.display;
|
||||
data.position = node.style.position;
|
||||
if (data.parent)
|
||||
data.parent.removeChild(node);
|
||||
}
|
||||
|
||||
$(el).data('blockUI.onUnblock', opts.onUnblock);
|
||||
var z = opts.baseZ;
|
||||
|
||||
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
|
||||
// layer1 is the iframe layer which is used to supress bleed through of underlying content
|
||||
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
|
||||
// layer3 is the message content that is displayed while blocking
|
||||
var lyr1, lyr2, lyr3, s;
|
||||
if (msie || opts.forceIframe)
|
||||
lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
|
||||
else
|
||||
lyr1 = $('<div class="blockUI" style="display:none"></div>');
|
||||
|
||||
if (opts.theme)
|
||||
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
|
||||
else
|
||||
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
|
||||
|
||||
if (opts.theme && full) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
|
||||
if ( opts.title ) {
|
||||
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
||||
}
|
||||
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
||||
s += '</div>';
|
||||
}
|
||||
else if (opts.theme) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
|
||||
if ( opts.title ) {
|
||||
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || ' ')+'</div>';
|
||||
}
|
||||
s += '<div class="ui-widget-content ui-dialog-content"></div>';
|
||||
s += '</div>';
|
||||
}
|
||||
else if (full) {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
|
||||
}
|
||||
else {
|
||||
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
|
||||
}
|
||||
lyr3 = $(s);
|
||||
|
||||
// if we have a message, style it
|
||||
if (msg) {
|
||||
if (opts.theme) {
|
||||
lyr3.css(themedCSS);
|
||||
lyr3.addClass('ui-widget-content');
|
||||
}
|
||||
else
|
||||
lyr3.css(css);
|
||||
}
|
||||
|
||||
// style the overlay
|
||||
if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
|
||||
lyr2.css(opts.overlayCSS);
|
||||
lyr2.css('position', full ? 'fixed' : 'absolute');
|
||||
|
||||
// make iframe layer transparent in IE
|
||||
if (msie || opts.forceIframe)
|
||||
lyr1.css('opacity',0.0);
|
||||
|
||||
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
|
||||
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
|
||||
$.each(layers, function() {
|
||||
this.appendTo($par);
|
||||
});
|
||||
|
||||
if (opts.theme && opts.draggable && $.fn.draggable) {
|
||||
lyr3.draggable({
|
||||
handle: '.ui-dialog-titlebar',
|
||||
cancel: 'li'
|
||||
});
|
||||
}
|
||||
|
||||
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
|
||||
var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
|
||||
if (ie6 || expr) {
|
||||
// give body 100% height
|
||||
if (full && opts.allowBodyStretch && $.support.boxModel)
|
||||
$('html,body').css('height','100%');
|
||||
|
||||
// fix ie6 issue when blocked element has a border width
|
||||
if ((ie6 || !$.support.boxModel) && !full) {
|
||||
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
|
||||
var fixT = t ? '(0 - '+t+')' : 0;
|
||||
var fixL = l ? '(0 - '+l+')' : 0;
|
||||
}
|
||||
|
||||
// simulate fixed position
|
||||
$.each(layers, function(i,o) {
|
||||
var s = o[0].style;
|
||||
s.position = 'absolute';
|
||||
if (i < 2) {
|
||||
if (full)
|
||||
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
|
||||
else
|
||||
s.setExpression('height','this.parentNode.offsetHeight + "px"');
|
||||
if (full)
|
||||
s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
|
||||
else
|
||||
s.setExpression('width','this.parentNode.offsetWidth + "px"');
|
||||
if (fixL) s.setExpression('left', fixL);
|
||||
if (fixT) s.setExpression('top', fixT);
|
||||
}
|
||||
else if (opts.centerY) {
|
||||
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
|
||||
s.marginTop = 0;
|
||||
}
|
||||
else if (!opts.centerY && full) {
|
||||
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
|
||||
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
|
||||
s.setExpression('top',expression);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// show the message
|
||||
if (msg) {
|
||||
if (opts.theme)
|
||||
lyr3.find('.ui-widget-content').append(msg);
|
||||
else
|
||||
lyr3.append(msg);
|
||||
if (msg.jquery || msg.nodeType)
|
||||
$(msg).show();
|
||||
}
|
||||
|
||||
if ((msie || opts.forceIframe) && opts.showOverlay)
|
||||
lyr1.show(); // opacity is zero
|
||||
if (opts.fadeIn) {
|
||||
var cb = opts.onBlock ? opts.onBlock : noOp;
|
||||
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
|
||||
var cb2 = msg ? cb : noOp;
|
||||
if (opts.showOverlay)
|
||||
lyr2._fadeIn(opts.fadeIn, cb1);
|
||||
|
||||
if (msg)
|
||||
lyr3._fadeIn(opts.fadeIn, cb2);
|
||||
}
|
||||
else {
|
||||
if (opts.showOverlay)
|
||||
lyr2.show();
|
||||
if (msg)
|
||||
lyr3.show();
|
||||
if (opts.onBlock)
|
||||
opts.onBlock.bind(lyr3)();
|
||||
}
|
||||
|
||||
// bind key and mouse events
|
||||
bind(1, el, opts);
|
||||
|
||||
if (full) {
|
||||
pageBlock = lyr3[0];
|
||||
pageBlockEls = $(opts.focusableElements,pageBlock);
|
||||
if (opts.focusInput)
|
||||
setTimeout(focus, 20);
|
||||
}
|
||||
else
|
||||
center(lyr3[0], opts.centerX, opts.centerY);
|
||||
|
||||
if (opts.timeout) {
|
||||
// auto-unblock
|
||||
var to = setTimeout(function() {
|
||||
if (full)
|
||||
$.unblockUI(opts);
|
||||
else
|
||||
$(el).unblock(opts);
|
||||
}, opts.timeout);
|
||||
$(el).data('blockUI.timeout', to);
|
||||
}
|
||||
}
|
||||
|
||||
// remove the block
|
||||
function remove(el, opts) {
|
||||
var count;
|
||||
var full = (el == window);
|
||||
var $el = $(el);
|
||||
var data = $el.data('blockUI.history');
|
||||
var to = $el.data('blockUI.timeout');
|
||||
if (to) {
|
||||
clearTimeout(to);
|
||||
$el.removeData('blockUI.timeout');
|
||||
}
|
||||
opts = $.extend({}, $.blockUI.defaults, opts || {});
|
||||
bind(0, el, opts); // unbind events
|
||||
|
||||
if (opts.onUnblock === null) {
|
||||
opts.onUnblock = $el.data('blockUI.onUnblock');
|
||||
$el.removeData('blockUI.onUnblock');
|
||||
}
|
||||
|
||||
var els;
|
||||
if (full) // crazy selector to handle odd field errors in ie6/7
|
||||
els = $('body').children().filter('.blockUI').add('body > .blockUI');
|
||||
else
|
||||
els = $el.find('>.blockUI');
|
||||
|
||||
// fix cursor issue
|
||||
if ( opts.cursorReset ) {
|
||||
if ( els.length > 1 )
|
||||
els[1].style.cursor = opts.cursorReset;
|
||||
if ( els.length > 2 )
|
||||
els[2].style.cursor = opts.cursorReset;
|
||||
}
|
||||
|
||||
if (full)
|
||||
pageBlock = pageBlockEls = null;
|
||||
|
||||
if (opts.fadeOut) {
|
||||
count = els.length;
|
||||
els.stop().fadeOut(opts.fadeOut, function() {
|
||||
if ( --count === 0)
|
||||
reset(els,data,opts,el);
|
||||
});
|
||||
}
|
||||
else
|
||||
reset(els, data, opts, el);
|
||||
}
|
||||
|
||||
// move blocking element back into the DOM where it started
|
||||
function reset(els,data,opts,el) {
|
||||
var $el = $(el);
|
||||
if ( $el.data('blockUI.isBlocked') )
|
||||
return;
|
||||
|
||||
els.each(function(i,o) {
|
||||
// remove via DOM calls so we don't lose event handlers
|
||||
if (this.parentNode)
|
||||
this.parentNode.removeChild(this);
|
||||
});
|
||||
|
||||
if (data && data.el) {
|
||||
data.el.style.display = data.display;
|
||||
data.el.style.position = data.position;
|
||||
data.el.style.cursor = 'default'; // #59
|
||||
if (data.parent)
|
||||
data.parent.appendChild(data.el);
|
||||
$el.removeData('blockUI.history');
|
||||
}
|
||||
|
||||
if ($el.data('blockUI.static')) {
|
||||
$el.css('position', 'static'); // #22
|
||||
}
|
||||
|
||||
if (typeof opts.onUnblock == 'function')
|
||||
opts.onUnblock(el,opts);
|
||||
|
||||
// fix issue in Safari 6 where block artifacts remain until reflow
|
||||
var body = $(document.body), w = body.width(), cssW = body[0].style.width;
|
||||
body.width(w-1).width(w);
|
||||
body[0].style.width = cssW;
|
||||
}
|
||||
|
||||
// bind/unbind the handler
|
||||
function bind(b, el, opts) {
|
||||
var full = el == window, $el = $(el);
|
||||
|
||||
// don't bother unbinding if there is nothing to unbind
|
||||
if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
|
||||
return;
|
||||
|
||||
$el.data('blockUI.isBlocked', b);
|
||||
|
||||
// don't bind events when overlay is not in use or if bindEvents is false
|
||||
if (!full || !opts.bindEvents || (b && !opts.showOverlay))
|
||||
return;
|
||||
|
||||
// bind anchors and inputs for mouse and key events
|
||||
var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
|
||||
if (b)
|
||||
$(document).bind(events, opts, handler);
|
||||
else
|
||||
$(document).unbind(events, handler);
|
||||
|
||||
// former impl...
|
||||
// var $e = $('a,:input');
|
||||
// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
|
||||
}
|
||||
|
||||
// event handler to suppress keyboard/mouse events when blocking
|
||||
function handler(e) {
|
||||
// allow tab navigation (conditionally)
|
||||
if (e.type === 'keydown' && e.keyCode && e.keyCode == 9) {
|
||||
if (pageBlock && e.data.constrainTabKey) {
|
||||
var els = pageBlockEls;
|
||||
var fwd = !e.shiftKey && e.target === els[els.length-1];
|
||||
var back = e.shiftKey && e.target === els[0];
|
||||
if (fwd || back) {
|
||||
setTimeout(function(){focus(back);},10);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
var opts = e.data;
|
||||
var target = $(e.target);
|
||||
if (target.hasClass('blockOverlay') && opts.onOverlayClick)
|
||||
opts.onOverlayClick(e);
|
||||
|
||||
// allow events within the message content
|
||||
if (target.parents('div.' + opts.blockMsgClass).length > 0)
|
||||
return true;
|
||||
|
||||
// allow events for content that is not being blocked
|
||||
return target.parents().children().filter('div.blockUI').length === 0;
|
||||
}
|
||||
|
||||
function focus(back) {
|
||||
if (!pageBlockEls)
|
||||
return;
|
||||
var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
|
||||
if (e)
|
||||
e.focus();
|
||||
}
|
||||
|
||||
function center(el, x, y) {
|
||||
var p = el.parentNode, s = el.style;
|
||||
var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
|
||||
var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
|
||||
if (x) s.left = l > 0 ? (l+'px') : '0';
|
||||
if (y) s.top = t > 0 ? (t+'px') : '0';
|
||||
}
|
||||
|
||||
function sz(el, p) {
|
||||
return parseInt($.css(el,p),10)||0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*global define:true */
|
||||
if (typeof define === 'function' && define.amd && define.amd.jQuery) {
|
||||
define(['jquery'], setup);
|
||||
} else {
|
||||
setup(jQuery);
|
||||
}
|
||||
|
||||
})();
|
||||
5
public/mix-manifest.json
Normal file
5
public/mix-manifest.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"/js/extern.js": "/js/extern.js",
|
||||
"/js/externMP.js": "/js/externMP.js",
|
||||
"/js/file-manager.js": "/js/file-manager.js"
|
||||
}
|
||||
35
resources/views/Admin/alokator/edit.blade.php
Executable file
35
resources/views/Admin/alokator/edit.blade.php
Executable file
@ -0,0 +1,35 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
@foreach ($obj as $key => $field)
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="{{ $key }}">{{ $field['label'] }}</label>
|
||||
@switch($field['type'])
|
||||
@case('text')
|
||||
<input name="{{ $key }}" id="{{ $key }}" type="text" class="form-control" value="{{$data->$key ?? ''}}">
|
||||
@break
|
||||
@case('select')
|
||||
<select name="{{ $key }}" id="{{ $key }}" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($field['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->$key == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="btn-sm btn-danger cancel" rel="{{ $data->id ?? "" }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
509
resources/views/Admin/alokator/index.blade.php
Executable file
509
resources/views/Admin/alokator/index.blade.php
Executable file
@ -0,0 +1,509 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/".$general['cont_name'];
|
||||
@endphp
|
||||
@if($parents['grupa']||$parents['objekat'])
|
||||
<div class="row mb-3">
|
||||
<div class="col-lg-12 col-xl-6">
|
||||
<div class="h3">unutar:</div>
|
||||
<table class="hiddenAtLoad d-none table table-striped table-bordered"
|
||||
id="dep_table"
|
||||
data-toggle="table"
|
||||
data-pagination="false"
|
||||
data-search="false"
|
||||
data-show-columns="false"
|
||||
data-show-footer="false"
|
||||
data-show-header="false"
|
||||
data-detail-formatter="def_detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th data-align="center" data-formatter="breadFormatter" data-events="breadEvents"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($parents['grupa'])
|
||||
@foreach ($parents['grupa'] as $key => $field)
|
||||
<tr data-id="1">
|
||||
<td>Grupe</td>
|
||||
<td>{{ $field->ime_grupe}}, {{ $field->j_grad }} ({{ $field->j_tip }})</td>
|
||||
<td>grupa</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@if($parents['objekat'])
|
||||
<tr data-id="2" data-qs="getrelObj={{ $parents['objekat']->j_grupa_ids}}">
|
||||
<td>Objekta</td>
|
||||
<td>{{ $parents['objekat']->prezime}} {{ $parents['objekat']->ime}}, {{ $parents['objekat']->j_ulica }} ({{ $parents['objekat']->j_grad }})</td>
|
||||
<td>objekat</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($parents['prostorija'])
|
||||
<tr data-id="3" data-qs="getrelProst={{ $parents['prostorija']->objekat_id}}">
|
||||
<td>Prostorije</td>
|
||||
<td>{{ $parents['prostorija']->j_tip_prostorije}} ({{ $parents['prostorija']->dim_duzina}} x {{ $parents['prostorija']->dim_sirina }})</td>
|
||||
<td>prostorija</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($parents['radijator'])
|
||||
<tr data-id="3" data-qs="getrelRadi={{ $parents['prostorija']->id}}">
|
||||
<td>Radijatora</td>
|
||||
<td>{{ $parents['radijator']->id}} {{ $parents['radijator']->j_tip_radijatora}} (priklj vent: {{ $parents['radijator']->j_tip_cola}}, vent: {{ $parents['radijator']->j_tip_ventila}})</td>
|
||||
<td>radijator</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div id="toolbar" class="">
|
||||
<div class="">
|
||||
<select name="f_mesta" id="f_mesta" class="filter ui search fluid normal dropdown f_mesta">
|
||||
<option value="">Sva mesta</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-toolbar="#toolbar"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="{{ $ajaxUrl }}/browse?{{ $qstring }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
data-query-params="queryParams"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endforeach
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui.label {
|
||||
background-color: #EEE;
|
||||
color: #666 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
.ui.label .icon:before {
|
||||
content: '\f00d';
|
||||
font-family: fontAwesome;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.ui.label .icon:hover:before {
|
||||
color: #F00;
|
||||
}
|
||||
.ui.selection.dropdown {
|
||||
min-height: inherit;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||
overflow: visible !important;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
$(".f_mesta").dropdown({
|
||||
apiSettings: {
|
||||
url: '/admin/api/mesta',
|
||||
cache: false,
|
||||
},
|
||||
filterRemoteData: true,
|
||||
});
|
||||
$('.filter').dropdown('setting', 'onChange', function(){
|
||||
$("#listing_table").bootstrapTable('refresh',{pageNumber: 1});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function queryParams(params) {
|
||||
$.each($(".filter"), function( key, value ){
|
||||
console.log(value);
|
||||
params[$(value).attr('name')] = $(value).dropdown('get value');
|
||||
});
|
||||
// params['status'] = $("input[name='status']:checked").val();
|
||||
return params;
|
||||
}
|
||||
|
||||
function breadFormatter(value, row) {
|
||||
var t = [];
|
||||
switch(value) {
|
||||
case 'grupa':
|
||||
break;
|
||||
case 'objekat':
|
||||
t.push('<a class="objekat" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na objekat"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
case 'prostorija':
|
||||
t.push('<a class="prostorija" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na prostoriju"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
case 'radijator':
|
||||
t.push('<a class="radijator" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na radijator"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
}
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit mr-2" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
@if($getRelated === false)
|
||||
t.push('<a class="related mr-2" href="javascript:void(0)" title="Relacije"><i class="fa fa-filter"></i></a>');
|
||||
@endif
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit?'+queryStr, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create?'+queryStr, function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$('.ui.dropdown').dropdown();
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#grad_id").change(function() {
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url+'?'+queryStr,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
if(response.data){
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('refresh');
|
||||
}
|
||||
}else
|
||||
$("#listing_table").bootstrapTable('refresh');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
window.breadEvents = {
|
||||
'click .objekat': function (e, value, row, index) {
|
||||
window.location.href = '/admin/objekat?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
'click .prostorija': function (e, value, row, index) {
|
||||
window.location.href = '/admin/prostorija?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
'click .radijator': function (e, value, row, index) {
|
||||
window.location.href = '/admin/radijator?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .related': function (e, value, row, index) {
|
||||
window.location.href = '/admin/alokator?getrelAlok=' + row.radijator_id;
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
20
resources/views/Admin/dashboard.blade.php
Executable file
20
resources/views/Admin/dashboard.blade.php
Executable file
@ -0,0 +1,20 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', 'Dashboard')
|
||||
|
||||
@section('content_header')
|
||||
<h1>Dashboard</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p></p>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script>
|
||||
|
||||
</script>
|
||||
@stop
|
||||
9
resources/views/Admin/errors/general.blade.php
Executable file
9
resources/views/Admin/errors/general.blade.php
Executable file
@ -0,0 +1,9 @@
|
||||
@extends('adminlte::page')
|
||||
@section('content')
|
||||
<div class="error-page">
|
||||
<h2 class="headline text-danger">500</h2>
|
||||
<div class="error-content pt-5">
|
||||
<h3><i class="fas fa-exclamation-triangle text-danger"></i> Oops! Something went wrong.</h3>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
37
resources/views/Admin/grupa/edit.blade.php
Executable file
37
resources/views/Admin/grupa/edit.blade.php
Executable file
@ -0,0 +1,37 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
@foreach ($obj as $key => $field)
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="{{ $key }}">{{ $field['label'] }}</label>
|
||||
@switch($field['type'])
|
||||
@case('text')
|
||||
<input name="{{ $key }}" id="{{ $key }}" type="text" class="form-control" value="{{$data->$key ?? ''}}">
|
||||
@break
|
||||
@case('select')
|
||||
<select name="{{ $key }}" id="{{ $key }}" class="form-control">
|
||||
@foreach ($field['fetch']() as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->$key == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include("Admin.uredjaj.attach_index", ['id' => $data->id, 'type' => 'grupa'])
|
||||
@include("Admin.grupa.tip_obracuna_index", ['id' => $data->id])
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="btn-sm btn-danger cancel" rel="{{ $data->id ?? '' }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
370
resources/views/Admin/grupa/index.blade.php
Executable file
370
resources/views/Admin/grupa/index.blade.php
Executable file
@ -0,0 +1,370 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-6">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new hideOnEdit" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="/admin/{{ $general['cont_name'] }}/browse"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-search="false"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
<th data-field="j_tip" data-sortable="true">
|
||||
Tip
|
||||
</th>
|
||||
<th data-field="ime_grupe" data-sortable="true">
|
||||
Naziv
|
||||
</th>
|
||||
<th data-field="j_grad" data-sortable="true">
|
||||
Grad
|
||||
</th>
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = "/admin/{{ $general['cont_name'] }}";
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete hideOnEdit mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit hideOnEdit mr-2" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
t.push('<a class="xml mr-2" href="javascript:void(0)" title="Genrisanje XML-a"><i class="fas fa-fw fa-code "></i></a>');
|
||||
t.push('<a class="objekti" href="javascript:void(0)" title="Objekti u ovoj grupi"><i class="fa fa-arrow-alt-circle-right"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit', function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create', function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.data)
|
||||
{
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else
|
||||
window.location.href = '';
|
||||
}
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#editor_container a.hideOnEdit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .objekti': function (e, value, row, index) {
|
||||
window.location.href = '/admin/objekat?getrelObj=' + row.id;
|
||||
},
|
||||
'click .xml': function (e, value, row, index) {
|
||||
window.location.href = '/admin/xml/' + row.id;
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#editor_container a.hideOnEdit').addClass('d-none');
|
||||
// $('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
20
resources/views/Admin/grupa/tip_obracuna_attach.blade.php
Normal file
20
resources/views/Admin/grupa/tip_obracuna_attach.blade.php
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="col-12 bg-uredjaj-edit">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="obracun_id">Obračun</label>
|
||||
<select name="obracun_id" id="obracun_id" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($obracuni as $key => $obracun)
|
||||
<option value="{{ $obracun->id }}">{{ $obracun->ime_tipa }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12 mb-2">
|
||||
<button type="button" class="btn-sm btn-secondary uredjaj_cancel">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-secondary uredjaj_submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
122
resources/views/Admin/grupa/tip_obracuna_index.blade.php
Normal file
122
resources/views/Admin/grupa/tip_obracuna_index.blade.php
Normal file
@ -0,0 +1,122 @@
|
||||
<style type="text/css">
|
||||
.card-header {
|
||||
background-color: rgba(0,0,0,.03);
|
||||
}
|
||||
.card-header, .card-body {
|
||||
padding: 0.6rem;
|
||||
}
|
||||
#tipObrContainer .fa {
|
||||
color: magenta;
|
||||
}
|
||||
</style>
|
||||
<div id="tipObrContainer" data-id="{{ $id }}" class="row">
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
getObracunForm();
|
||||
});
|
||||
|
||||
function getObracunForm() {
|
||||
$("#tipObrContainer").empty();
|
||||
var formData = [];
|
||||
formData.push({name:'grupa_id', value: $("#tipObrContainer").data('id') });
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
$("#tipObrContainer").load('/admin/grupa/{{ $id }}/getTipObracuna', formData, function() {
|
||||
$(this).find(".linkObracun").click(function (e) {
|
||||
loadObrLinkFrom($(this));
|
||||
return false;
|
||||
});
|
||||
$(this).find(".unLinkObracun").click(function (e) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Unlink ?',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var btn = $(this);
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
formData.push({name:'grupa_id', value: $("#tipObrContainer").data('id') });
|
||||
formData.push({name:'obracun_id', value: btn.data('id') });
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: '/admin/grupa/{{ $id }}/unlinkObracun',
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
getObracunForm();
|
||||
},
|
||||
error: function (response) {
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function loadObrLinkFrom(element) {
|
||||
var newEl = $( "<div id='LinkObrContainer'></div>" );
|
||||
var mRow = element.parent();
|
||||
mRow.after(newEl);
|
||||
|
||||
var formData = [];
|
||||
formData.push({name:'grupa_id', value: $("#tipObrContainer").data('id') });
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
url: '/admin/grupa/{{ $id }}/unlinkObracun',
|
||||
|
||||
$("#LinkObrContainer").load('/admin/grupa/{{ $id }}/linkObracunLoadForm', formData, function() {
|
||||
$(this).find('.dropdown').dropdown();
|
||||
$(this).find(".uredjaj_cancel").click(function (e) {
|
||||
$("#LinkObrContainer").remove();
|
||||
return false;
|
||||
});
|
||||
$(this).find(".uredjaj_submit").click(function (e) {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
var token = false;
|
||||
for(const [index, el] of formData.entries()) {
|
||||
if(el.name == '_token'){
|
||||
token = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!token){
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
}
|
||||
$.ajax({
|
||||
url: '/admin/grupa/{{ $id }}/linkObracun',
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
getObracunForm();
|
||||
if(response.error) {
|
||||
}else{
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
}
|
||||
});
|
||||
|
||||
$("#uredjajEditContainer").remove();
|
||||
mRow.addClass('d-flex').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
22
resources/views/Admin/grupa/tip_obracuna_list.blade.php
Normal file
22
resources/views/Admin/grupa/tip_obracuna_list.blade.php
Normal file
@ -0,0 +1,22 @@
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-header">
|
||||
Dodeljeni tipovi obračuna
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center pb-1">
|
||||
<a href="#" data-id="0" class="hideOnEdit ml-auto linkObracun"><i class="fa fa-link" aria-hidden="true"></i></a>
|
||||
</div>
|
||||
<div class="row editcontainer">
|
||||
</div>
|
||||
<ul id="list" class="list-group">
|
||||
@foreach($obracuni as $key => $obracun_tip)
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<b>{{ $obracun_tip->ime_tipa }}</b>
|
||||
<a href="#" data-id="{{$obracun_tip->id}}" class="hideOnEdit ml-auto unLinkObracun"><i class="fa fa-unlink" aria-hidden="true"></i></a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
20
resources/views/Admin/index.blade.php
Executable file
20
resources/views/Admin/index.blade.php
Executable file
@ -0,0 +1,20 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', 'Dashboard')
|
||||
|
||||
@section('content_header')
|
||||
<h1>Dashboard</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<p>Welcome to this beautiful admin panel.</p>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="/css/admin_custom.css">
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script>
|
||||
</script>
|
||||
@stop
|
||||
99
resources/views/Admin/izvestaji/radni_nalog/index.blade.php
Executable file
99
resources/views/Admin/izvestaji/radni_nalog/index.blade.php
Executable file
@ -0,0 +1,99 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', 'Dashboard')
|
||||
|
||||
@section('content_header')
|
||||
<h1>{!! $general['title'] !!}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/".$general['cont_name'];
|
||||
@endphp
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="{{ $ajaxUrl }}/browse"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="false"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endforeach
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="report" href="javascript:void(0)" data-id="'+row.id+'" title="Radni nalog"><i class="fa fa-file"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
window.optEvents = {
|
||||
'click .report': function (e, value, row, index) {
|
||||
window.location.href = '/admin/izvestaji/radni_nalog/' + row.id;
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
@stop
|
||||
28
resources/views/Admin/korisnici/edit.blade.php
Executable file
28
resources/views/Admin/korisnici/edit.blade.php
Executable file
@ -0,0 +1,28 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="ime_grada">Ime grada</label>
|
||||
<input name="ime_grada" id="ime_grada" type="text" class="form-control" value="{{$data->ime_grada ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="post_broj">Ime grada</label>
|
||||
<input name="post_broj" id="post_broj" type="text" class="form-control" value="{{$data->post_broj ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="zoom btn-sm btn-danger cancel" rel="{{ $data->id ?? "" }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
369
resources/views/Admin/korisnici/index.blade.php
Executable file
369
resources/views/Admin/korisnici/index.blade.php
Executable file
@ -0,0 +1,369 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', 'Gradovi')
|
||||
|
||||
@section('content_header')
|
||||
<h1>Gradovi</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-6">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
Lista gradova
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="false"
|
||||
data-url="/admin/gradovi/browse"
|
||||
data-unique-id="id"
|
||||
data-sort-name="ime_grada"
|
||||
data-sort-order="asc"
|
||||
data-search="false"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
<th data-field="ime_grada" data-sortable="true">
|
||||
Ime
|
||||
</th>
|
||||
<th data-field="post_broj" data-sortable="true">
|
||||
Postanski broj
|
||||
</th>
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="card text-white bg-info mb-2 zoom col-6" style="max-width: 18rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">12dfs sdf sdf sdf sdfsdfsd</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-primary mb-2 zoom" style="max-width: 18rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title align-middle">Primary card title</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-primary mb-2 zoom" style="max-width: 18rem;">
|
||||
<div class="card-body text-primary">
|
||||
<h5 class="card-title">Primary card title</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = "/admin/gradovi";
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit', function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create', function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function openEditor(element, index){
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
// $('.bsToggle').bootstrapToggle();
|
||||
$(".role_check").change(function() {
|
||||
var id = $(this).attr('id');
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$(".role_check").each(function(key, value){
|
||||
if($(value).attr('id') != id) {
|
||||
$(value).prop('checked', false).change();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.data)
|
||||
{
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else
|
||||
window.location.href = '';
|
||||
}
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
339
resources/views/Admin/objekat/edit.blade.php
Executable file
339
resources/views/Admin/objekat/edit.blade.php
Executable file
@ -0,0 +1,339 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="card">
|
||||
<div class="card-header font-weight-bolder text-primary">
|
||||
Podaci objekta
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="grad_id">Grad</label>
|
||||
<select name="grad_id" id="grad_id" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($obj['grad_id']['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->grad_id == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="ulica_id">Ulica</label>
|
||||
<select name="ulica_id" id="ulica_id" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($obj['ulica_id']['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->ulica_id == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="position-relative form-group">
|
||||
<label for="broj">Broj</label>
|
||||
<input name="broj" id="broj" type="text" class="form-control" value="{{$data->broj ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="position-relative form-group">
|
||||
<label for="ulaz">Ulaz</label>
|
||||
<input name="ulaz" id="ulaz" type="text" class="form-control" value="{{$data->ulaz ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="position-relative form-group">
|
||||
<label for="stan">Stan</label>
|
||||
<input name="stan" id="stan" type="text" class="form-control" value="{{$data->stan ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="position-relative form-group">
|
||||
<label for="sprat">Sprat</label>
|
||||
<input name="sprat" id="sprat" type="text" class="form-control" value="{{$data->sprat ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="tip_tarife">Tip tarife</label>
|
||||
<select name="tip_tarife" id="tip_tarife" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($obj['tip_tarife']['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->tip_tarife == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="grupa_id">Grupa</label>
|
||||
<select name="grupa_id[]" id="grupa_id" multiple class="form-control multiple ui search fluid normal dropdown server">
|
||||
@foreach ($data->grupe as $grupa)
|
||||
<option value="{{ $grupa->id }}" selected>{{ $grupa->ime_grupe . ', ' . $grupa->grad->ime_grada . '(' . $grupa->tip->ime_tipa . ')'}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="position-relative form-group">
|
||||
<label for="tarifna_grupa">Tarifna grupa</label>
|
||||
<input name="tarifna_grupa" id="tarifna_grupa" type="text" class="form-control" value="{{$data->tarifna_grupa ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="position-relative form-group">
|
||||
<label for="ind_kom">Ind kom</label>
|
||||
<input name="ind_kom" id="ind_kom" type="text" class="form-control" value="{{$data->ind_kom ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="position-relative form-group">
|
||||
<label for="povrsina">Povrsina</label>
|
||||
<input name="povrsina" id="povrsina" type="text" class="form-control" value="{{$data->povrsina ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="position-relative form-group">
|
||||
<label for="proc_povrsine">Procena povrsine</label>
|
||||
<input name="proc_povrsine" id="proc_povrsine" type="text" class="form-control" value="{{$data->proc_povrsine ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="position-relative form-group">
|
||||
<label for="ind_kal_zajednicki">Ind. kal. zajednicki</label>
|
||||
<input name="ind_kal_zajednicki" id="ind_kal_zajednicki" type="text" class="form-control" value="{{$data->ind_kal_zajednicki ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="position-relative form-group">
|
||||
<label for="ind_iskljucen">Ind. iskljucen</label>
|
||||
<input name="ind_iskljucen" id="ind_iskljucen" type="text" class="form-control" value="{{$data->ind_iskljucen ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="position-relative form-group">
|
||||
<label for="ind_los_kal">Ind. los. kal.</label>
|
||||
<input name="ind_los_kal" id="ind_los_kal" type="text" class="form-control" value="{{$data->ind_los_kal ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="position-relative form-group">
|
||||
<label for="los_koeficient">Los. koeficient</label>
|
||||
<input name="los_koeficient" id="los_koeficient" type="text" class="form-control" value="{{$data->los_koeficient ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="position-relative form-group">
|
||||
<label for="ind_alokator">Ind. alokator</label>
|
||||
<input name="ind_alokator" id="ind_alokator" type="text" class="form-control" value="{{$data->ind_alokator ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card @if(count($data->grupe)==0) d-none @endif" id="obracun_specific_fields">
|
||||
<div class="card-header font-weight-bolder text-primary">
|
||||
Polja vezana za obračun
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data->grupe as $grupa)
|
||||
@if(count($grupa->tipoviObracuna)>0)
|
||||
@foreach ($grupa->tipoviObracuna as $obracun)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($i++ == 1) active @endif" id="obr-{{ $obracun->id }}-tab" data-toggle="tab" href="#obr-{{ $obracun->id }}" role="tab" aria-controls="obr-{{ $obracun->id }}" aria-selected="true">{{ $obracun->ime_tipa }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach ($data->grupe as $grupa)
|
||||
@if(count($grupa->tipoviObracuna)>0)
|
||||
@foreach ($grupa->tipoviObracuna as $tipObracuna)
|
||||
@php
|
||||
$className = "App\\Services\\Obracuni\\" . $tipObracuna->ime_klase;
|
||||
$obrClass = new $className();
|
||||
$polja = $obrClass->getObracunSpecificFields();
|
||||
dd($polja);
|
||||
@endphp
|
||||
<div class="tab-pane fade show @if($i++ == 1) active @endif" id="obr-{{ $tipObracuna->id }}" role="tabpanel" aria-labelledby="obr-{{ $tipObracuna->id }}-tab">
|
||||
@if(isset($polja))
|
||||
@include("Admin.objekat.partial_formgen", ['obj' => $polja, 'obracun' => $tipObracuna, 'data' => $data->extr_obracun_fields[$tipObracuna->id]])
|
||||
@else
|
||||
Ne postoje polja definisana za ovaj tip obračuna
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header font-weight-bolder text-primary">
|
||||
Podaci o vlasniku objekta
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="prezime">Prezime</label>
|
||||
<input name="prezime" id="prezime" type="text" class="form-control" value="{{$data->prezime ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="ime">Ime</label>
|
||||
<input name="ime" id="ime" type="text" class="form-control" value="{{$data->ime ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="telefon">Telefon</label>
|
||||
<input name="telefon" id="telefon" type="text" class="form-control" value="{{$data->telefon ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="jmbg">JMBG/PIB</label>
|
||||
<input name="jmbg" id="jmbg" type="text" class="form-control" value="{{$data->jmbg ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="icheck-success">
|
||||
<input type="checkbox" name="adr_vlasnika_razl_check" value="1" @if($vl_adresa->grad) checked @endif id="adr_vlasnika_razl_check" />
|
||||
<label class="text-success" for="adr_vlasnika_razl_check">Adresa vlasnika se razlikuje od adrese objekta</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="adr_vlasnika" class="form-row @if(!$vl_adresa->grad) d-none @endif">
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="vl_grad_id">Grad</label>
|
||||
<select name="vl_grad_id" id="vl_grad_id" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($obj['grad_id']['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($vl_adresa->grad_id == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="vl_ulica_id">Ulica</label>
|
||||
<select name="vl_ulica_id" id="vl_ulica_id" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($obj['ulica_id']['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($vl_adresa->ulica_id == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="position-relative form-group">
|
||||
<label for="vl_broj">Broj</label>
|
||||
<input name="vl_broj" id="vl_broj" type="text" class="form-control" value="{{$vl_adresa->broj ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="position-relative form-group">
|
||||
<label for="vl_ulaz">Ulaz</label>
|
||||
<input name="vl_ulaz" id="vl_ulaz" type="text" class="form-control" value="{{$vl_adresa->ulaz ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="position-relative form-group">
|
||||
<label for="vl_stan">Stan</label>
|
||||
<input name="vl_stan" id="vl_stan" type="text" class="form-control" value="{{$vl_adresa->stan ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="icheck-default">
|
||||
<input type="checkbox" name="adr_zakupac_check" value="1" @if($zakup_adresa->grad) checked @endif id="adr_zakupac_check" />
|
||||
<label class="text-default" for="adr_zakupac_check">Postoji zakupac</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card @if(!$zakup_adresa->grad) d-none @endif" id="adr_zakupac">
|
||||
<div class="card-header font-weight-bolder text-primary">
|
||||
Podaci o zakupcu objekta
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="zak_prezime">Prezime</label>
|
||||
<input name="zak_prezime" id="zak_prezime" type="text" class="form-control" value="{{$zakup_adresa->prezime ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="zak_ime">Ime</label>
|
||||
<input name="zak_ime" id="zak_ime" type="text" class="form-control" value="{{$zakup_adresa->ime ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="zak_telefon">Telefon</label>
|
||||
<input name="zak_telefon" id="zak_telefon" type="text" class="form-control" value="{{$zakup_adresa->telefon ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="zak_jmbg">JMBG/PIB</label>
|
||||
<input name="zak_jmbg" id="zak_jmbg" type="text" class="form-control" value="{{$zakup_adresa->jmbg ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="zak_grad_id">Grad</label>
|
||||
<select name="zak_grad_id" id="zak_grad_id" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($obj['grad_id']['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($zakup_adresa->grad_id == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="zak_ulica_id">Ulica</label>
|
||||
<select name="zak_ulica_id" id="zak_ulica_id" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($obj['ulica_id']['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($zakup_adresa->ulica_id == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="position-relative form-group">
|
||||
<label for="zak_broj">zak_Broj</label>
|
||||
<input name="zak_broj" id="zak_broj" type="text" class="form-control" value="{{$zakup_adresa->broj ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="position-relative form-group">
|
||||
<label for="zak_ulaz">Ulaz</label>
|
||||
<input name="zak_ulaz" id="zak_ulaz" type="text" class="form-control" value="{{$zakup_adresa->ulaz ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="position-relative form-group">
|
||||
<label for="zak_stan">Stan</label>
|
||||
<input name="zak_stan" id="zak_stan" type="text" class="form-control" value="{{$zakup_adresa->stan ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include("Admin.uredjaj.attach_index", ['id' => $data->id, 'type' => 'objekat'])
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="btn-sm btn-danger cancel" rel="{{ $data->id ?? "" }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
485
resources/views/Admin/objekat/index.blade.php
Executable file
485
resources/views/Admin/objekat/index.blade.php
Executable file
@ -0,0 +1,485 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/".$general['cont_name'];
|
||||
@endphp
|
||||
@if($parents['grupa'])
|
||||
<div class="row mb-3">
|
||||
<div class="col-lg-12 col-xl-6">
|
||||
<div class="h3">unutar:</div>
|
||||
<table class="hiddenAtLoad d-none table table-striped table-bordered"
|
||||
id="dep_table"
|
||||
data-toggle="table"
|
||||
data-pagination="false"
|
||||
data-search="false"
|
||||
data-show-columns="false"
|
||||
data-show-footer="false"
|
||||
data-show-header="false"
|
||||
data-detail-formatter="def_detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th data-align="center"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($parents['grupa'])
|
||||
@foreach ($parents['grupa'] as $key => $field)
|
||||
<tr data-id="1">
|
||||
<td>Grupe</td>
|
||||
<td>{{ $field->ime_grupe}}, {{ $field->j_grad }} ({{ $field->j_tip }})</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="{{ $ajaxUrl }}/browse?{{ $qstring }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
@if($field['list'])
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui.label {
|
||||
background-color: #EEE;
|
||||
color: #666 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
.ui.label .icon:before {
|
||||
content: '\f00d';
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.ui.label .icon:hover:before {
|
||||
color: #F00;
|
||||
}
|
||||
|
||||
</style>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/icheck-bootstrap/3.0.1/icheck-bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/transition.min.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/label.min.css" />
|
||||
<link href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/css/bootstrap4-toggle.min.css" rel="stylesheet">
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/js/bootstrap4-toggle.min.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
// var ajaxUrl = "/admin/{{ $general['cont_name'] }}";
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit mr-2" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
@if($getRelated === false)
|
||||
t.push('<a class="related mr-2" href="javascript:void(0)" title="Relacije"><i class="fa fa-filter"></i></a>');
|
||||
@endif
|
||||
t.push('<a class="prostorije" href="javascript:void(0)" title="Prostorije u ovom objektu"><i class="fa fa-arrow-alt-circle-right"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit?'+queryStr, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create?'+queryStr, function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$('.bsToggle').bootstrapToggle();
|
||||
$( "#adr_vlasnika_razl_check" ).change(function(e) {
|
||||
if(this.checked)
|
||||
$("#adr_vlasnika").removeClass('d-none');
|
||||
else
|
||||
$("#adr_vlasnika").addClass('d-none');
|
||||
});
|
||||
$( "#adr_zakupac_check" ).change(function(e) {
|
||||
if(this.checked)
|
||||
$("#adr_zakupac").removeClass('d-none');
|
||||
else
|
||||
$("#adr_zakupac").addClass('d-none');
|
||||
});
|
||||
$('.ui.dropdown:not(.server)').dropdown();
|
||||
$('#grupa_id').dropdown({
|
||||
onChange: function(value, text, $choice) {
|
||||
$('#grupa_id').dropdown('setup menu', []);
|
||||
console.log('bla');
|
||||
},
|
||||
apiSettings: {
|
||||
method: 'POST',
|
||||
cache: false,
|
||||
saveRemoteData: false,
|
||||
on: 'click',
|
||||
url: '/admin/grupa/getAssignableGroups',
|
||||
data: { '_token': '{{ csrf_token() }}'},
|
||||
beforeSend: function (settings) {
|
||||
settings.data.ids = $('#grupa_id').val().join();
|
||||
settings.data.query = settings.urlData.query;
|
||||
return settings;
|
||||
},
|
||||
onResponse: function(response) {
|
||||
var query = this.urlData.query;
|
||||
return {
|
||||
success: true,
|
||||
results: response.results.filter(function(value) { return value.name.toLowerCase().indexOf(query) >= 0 })
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
$('#grupa_id').dropdown('setup menu', []);
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#grad_id").change(function() {
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
});
|
||||
|
||||
$("#vl_grad_id").change(function() {
|
||||
$("#vl_ulica_id").load('/admin/objekat/ulicepogradu/'+$("#vl_grad_id").val());
|
||||
});
|
||||
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url+'?'+queryStr,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.data)
|
||||
{
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else
|
||||
window.location.href = '';
|
||||
}
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .related': function (e, value, row, index) {
|
||||
window.location.href = '/admin/objekat?getrelObj=' + row.j_grupa_ids;
|
||||
},
|
||||
'click .prostorije': function (e, value, row, index) {
|
||||
window.location.href = '/admin/prostorija?getrelProst=' + row.id;
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
30
resources/views/Admin/objekat/partial_formgen.blade.php
Normal file
30
resources/views/Admin/objekat/partial_formgen.blade.php
Normal file
@ -0,0 +1,30 @@
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
@foreach ($obj as $key => $field)
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="os[{{ $obracun->id }}][{{ $key }}]">{{ $field->label }}</label>
|
||||
@switch($field->type)
|
||||
@case('text')
|
||||
<input name=os[{{ $obracun->id }}][{{ $key }}]" id=os[{{ $obracun->id }}][{{ $key }}]" type="text" class="form-control" value="{{$data[$key] ?? ''}}">
|
||||
@break
|
||||
@case('select')
|
||||
<select name=os[{{ $obracun->id }}][{{ $key }}]" id=os[{{ $obracun->id }}][{{ $key }}]" class="form-control">
|
||||
@foreach ($field->values as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data[$key] == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@case('true_false')
|
||||
<div class="col-12">
|
||||
<input class="bsToggle" id=os[{{ $obracun->id }}][{{ $key }}]" name=os[{{ $obracun->id }}][{{ $key }}]" type="checkbox" data-toggle="toggle" data-on="{{ $field->true_val }}" data-off="{{ $field->false_val }}" data-onstyle="success" value="{{ $field->true_val }}" data-offstyle="danger" data-width="75" @if ($data[$key]==$field->true_val) checked @endif>
|
||||
</div>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
35
resources/views/Admin/obracun/edit.blade.php
Normal file
35
resources/views/Admin/obracun/edit.blade.php
Normal file
@ -0,0 +1,35 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
@foreach ($obj as $key => $field)
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="{{ $key }}">{{ $field['label'] }}</label>
|
||||
@switch($field['type'])
|
||||
@case('text')
|
||||
<input name="{{ $key }}" id="{{ $key }}" type="text" class="form-control" value="{{$data->$key ?? ''}}">
|
||||
@break
|
||||
@case('select')
|
||||
<select name="{{ $key }}" id="{{ $key }}" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($field['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->$key == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="btn-sm btn-danger cancel" rel="{{ $data->id ?? "" }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
19
resources/views/Admin/obracun/explore.blade.php
Normal file
19
resources/views/Admin/obracun/explore.blade.php
Normal file
@ -0,0 +1,19 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', 'Dashboard')
|
||||
|
||||
@section('content_header')
|
||||
<h1>Dashboard</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div id="app">Test</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/file-manager.js"></script>
|
||||
@stop
|
||||
448
resources/views/Admin/obracun/index.blade.php
Normal file
448
resources/views/Admin/obracun/index.blade.php
Normal file
@ -0,0 +1,448 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/".$general['cont_name'];
|
||||
@endphp
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="{{ $ajaxUrl }}/browse?{{ $qstring }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-sortable="true" data-visible="true">
|
||||
#
|
||||
</th>
|
||||
<th
|
||||
data-field="created_at"
|
||||
data-sortable="true"
|
||||
data-formatter="dateFormatter"
|
||||
data-visible="true">
|
||||
Kreiran
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
@if($field['list'])
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui.label {
|
||||
background-color: #EEE;
|
||||
color: #666 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
.ui.label .icon:before {
|
||||
content: '\f00d';
|
||||
font-family: fontAwesome;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.ui.label .icon:hover:before {
|
||||
color: #F00;
|
||||
}
|
||||
.ui.selection.dropdown {
|
||||
min-height: inherit;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||
overflow: visible !important;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
// var ajaxUrl = "/admin/{{ $general['cont_name'] }}";
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function breadFormatter(value, row) {
|
||||
var t = [];
|
||||
switch(value) {
|
||||
case 'grupa':
|
||||
break;
|
||||
case 'objekat':
|
||||
t.push('<a class="objekat" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na objekat"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
}
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
|
||||
// if(row.status == 0) {
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
// }
|
||||
// t.push('<a class="edit mr-2" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
// if(row.status == 0) {
|
||||
t.push('<a class="mr-2" href="{{ $ajaxUrl }}/' + row.id + '/explore" title="Pregled fajlova"><i class="fa fa-folder-open"></i></a>');
|
||||
// t.push('<a class="next" href="javascript:void(0)" title="Detalji"><i class="fa fa-arrow-alt-circle-right"></i></a>');
|
||||
// }
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function dateFormatter(value, row) {
|
||||
if(Date.parse(value)) {
|
||||
const date = new Date(value);
|
||||
return new Intl.DateTimeFormat("lt-LT", {year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit'}).format(date);
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit?'+queryStr, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create?'+queryStr, function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
// function statusFormatter(value, row, index) {
|
||||
// switch(row.status) {
|
||||
// case 0:
|
||||
// return '<div class="badge badge-pill pl-2 pr-2 badge-success">Otvoren</div>';
|
||||
// break;
|
||||
// case 1:
|
||||
// return '<div class="badge badge-pill pl-2 pr-2 badge-warning">Zaključan</div>';
|
||||
// break;
|
||||
// case 2:
|
||||
// return '<div class="badge badge-pill pl-2 pr-2 badge-danger">Arhiviran</div>';
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$('.ui.dropdown').dropdown();
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url+'?'+queryStr,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.data)
|
||||
{
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else
|
||||
window.location.href = '';
|
||||
}
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
window.breadEvents = {
|
||||
'click .objekat': function (e, value, row, index) {
|
||||
window.location.href = '/admin/objekat?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .next': function (e, value, row, index) {
|
||||
window.location.href = '/admin/ocitavanje/' + row.id + '/detalji';
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
601
resources/views/Admin/ocitavanje/detalji_index.blade.php
Executable file
601
resources/views/Admin/ocitavanje/detalji_index.blade.php
Executable file
@ -0,0 +1,601 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/" . $general['cont_name'] . "/" . $parent. "/detalji";
|
||||
@endphp
|
||||
<div id="" class="card col-6">
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
Očitavanje: <b>{{ $ocitavanje->godina }} {{ $ocitavanje->j_mesec }} {{ $ocitavanje->naziv }}</b>
|
||||
</div>
|
||||
</div>
|
||||
<div id="logsCard" class="d-none card bg-info col-6">
|
||||
<div class="card-header" id="headingOne">
|
||||
<h5 class="mb-0">
|
||||
<button class="btn btn-warning" data-toggle="collapse" data-target="#logsContainer" aria-expanded="true" aria-controls="logsContainer">
|
||||
Error logs
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="logsContainer" class="collapse show" data-parent="#logsCard">
|
||||
<div class="card-body">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="errorLog_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="10"
|
||||
data-search="false"
|
||||
data-url="{{ $ajaxUrl }}/browseLogs?{{ $qstring }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="logRowStyle"
|
||||
data-row-attributes="logRowAttributes"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="logDetailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-sortable="true">
|
||||
#
|
||||
</th>
|
||||
<th data-field="created_at" data-sortable="true" data-formatter="logDateFormatter">
|
||||
Kreiran
|
||||
</th>
|
||||
<th data-align="center"
|
||||
data-formatter="logOptFormatter"
|
||||
data-events="logOptEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new mr-2" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
<a class="mr-2" href="{{ $ajaxUrl.'/uploadXML' }}" title="Upload XML"><i class="fa fa-file-code"></i></a>
|
||||
<a class="mr-2" href="{{ $ajaxUrl.'/uploadExcel' }}" title="Upload EXCEL"><i class="fa fa-file-excel"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="{{ $ajaxUrl }}/browse?{{ $qstring }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-sortable="true" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
@if($field['list'])
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui.label {
|
||||
background-color: #EEE;
|
||||
color: #666 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
.ui.label .icon:before {
|
||||
content: '\f00d';
|
||||
font-family: fontAwesome;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.ui.label .icon:hover:before {
|
||||
color: #F00;
|
||||
}
|
||||
.ui.selection.dropdown {
|
||||
min-height: inherit;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||
overflow: visible !important;
|
||||
}
|
||||
input[type="file"] {
|
||||
display: none;
|
||||
}
|
||||
.xml-file-upload {
|
||||
border: none;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
color: #007bff;
|
||||
cursor: pointer;
|
||||
}
|
||||
#errorLog_table .fa {
|
||||
color: black;
|
||||
}
|
||||
#errorLog_table.table {
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function breadFormatter(value, row) {
|
||||
var t = [];
|
||||
switch(value) {
|
||||
case 'grupa':
|
||||
break;
|
||||
case 'objekat':
|
||||
t.push('<a class="objekat" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na objekat"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
}
|
||||
// console.log(value);
|
||||
// console.log(row);
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
@if($ocitavanje->status == 0)
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit mr-2" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
@endif
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function logOptFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="view mr-2" href="javascript:void(0)" title="View"><i class="fa fa-eye"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function logDateFormatter(value, row) {
|
||||
if(Date.parse(value)) {
|
||||
const date = new Date(value);
|
||||
return new Intl.DateTimeFormat("lt-LT", {year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit'}).format(date);
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit?'+queryStr, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create?'+queryStr, function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function statusFormatter(value, row, index) {
|
||||
switch(row.status) {
|
||||
case 0:
|
||||
return '<div class="badge badge-pill pl-2 pr-2 badge-success">Otvoren</div>';
|
||||
break;
|
||||
case 1:
|
||||
return '<div class="badge badge-pill pl-2 pr-2 badge-warning">Zaključan</div>';
|
||||
break;
|
||||
case 2:
|
||||
return '<div class="badge badge-pill pl-2 pr-2 badge-danger">Arhiviran</div>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$('.ui.dropdown').dropdown();
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url+'?'+queryStr,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.data)
|
||||
{
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else
|
||||
window.location.href = '';
|
||||
}
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
window.breadEvents = {
|
||||
'click .objekat': function (e, value, row, index) {
|
||||
window.location.href = '/admin/objekat?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
}
|
||||
|
||||
$('#errorLog_table').on('load-success.bs.table', function(data, status, jqXHR) {
|
||||
let rows = $('#errorLog_table').bootstrapTable('getData').length;
|
||||
if(rows < 1) {
|
||||
$("#logsCard").addClass('d-none');
|
||||
}else{
|
||||
$("#logsCard").removeClass('d-none');
|
||||
}
|
||||
});
|
||||
|
||||
window.logOptEvents = {
|
||||
'click .view': function (e, value, row, index) {
|
||||
blockElement($(e.currentTarget).parents('.card'));
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/getLog/' + row.id ,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: 'GET',
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
let a = document.createElement('a')
|
||||
a.href = response.url
|
||||
a.download = response.url.split('/').pop()
|
||||
document.body.appendChild(a)
|
||||
a.click()
|
||||
document.body.removeChild(a);
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/deleteLog/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#errorLog_table").bootstrapTable('refresh');
|
||||
// $("#errorLog_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .next': function (e, value, row, index) {
|
||||
window.location.href = '/admin/ocitavanje/detalji/'+row.id;
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
339
resources/views/Admin/ocitavanje/detalji_uploadExcel.blade.php
Normal file
339
resources/views/Admin/ocitavanje/detalji_uploadExcel.blade.php
Normal file
@ -0,0 +1,339 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/" . $general['cont_name'] . "/" . $parent. "/detalji";
|
||||
@endphp
|
||||
<div id="" class="card col-6">
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
Očitavanje: <b>{{ $ocitavanje->godina }} {{ $ocitavanje->j_mesec }} {{ $ocitavanje->naziv }}</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div id="" class="card col-6">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<form id="xmlUploadForm">
|
||||
<div class="row">
|
||||
<div class="col-12 pb-2">
|
||||
<select name="distributer" id="distributer" class="form-control ui search fluid normal dropdown">
|
||||
<option value="0">Distributer</option>
|
||||
@foreach ($distributeri as $key => $value)
|
||||
<option value="{{ $value->id }}">{{ $value->naziv }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-grp">
|
||||
<div class="form-grp-label">
|
||||
U slučaju već postojećih vrednosti:
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-check-input" type="radio" name="overwrite" id="overwrite1" value="1" checked>
|
||||
<label class="form-check-label" for="overwrite1">
|
||||
Prepiši postojeće
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-check-input" type="radio" name="overwrite" id="overwrite2" value="0">
|
||||
<label class="form-check-label" for="overwrite2">
|
||||
Preskoči postojeće
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="uploadContainer col border">
|
||||
<div class="row">
|
||||
<div class="imgWrapper col-12 p-2">
|
||||
<div data-type="upload" class="dropzone upl-dropzone dz-clickable" id="upl-dropzone">
|
||||
<div class="dz-message d-flex flex-column">
|
||||
<i class="fa fa-cloud-upload-alt"></i>
|
||||
Drag and drop or click
|
||||
</div>
|
||||
<div class="fallback">
|
||||
<input name="file" type="file" multiple />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="submit_container" class="d-none form-row pt-2">
|
||||
<div class="col-12">
|
||||
@csrf
|
||||
<button type="submit" class="btn-sm btn-primary submit float-right">Učitavanje</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-none">
|
||||
<div id="previewTPL" class="dz-preview dz-file-preview">
|
||||
<div class="dz-details">
|
||||
<div class="dz-error-message"><span data-dz-errormessage></span></div>
|
||||
</div>
|
||||
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.upl-dropzone {
|
||||
border: 2px dashed #dedede;
|
||||
border-radius: 5px;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.upl-dropzone.dz-clickable .dz-message, .upl-dropzone.dz-clickable .dz-message * {
|
||||
cursor: pointer;
|
||||
}
|
||||
.upl-dropzone i{
|
||||
font-size: 5rem;
|
||||
}
|
||||
.dz-message i{
|
||||
font-size: 5rem;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
.upl-dropzone .dz-message {
|
||||
color: rgba(0,0,0,.54);
|
||||
font-weight: 500;
|
||||
font-size: initial;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.dz-drag-hover {
|
||||
border: 2px solid #dedede !important;
|
||||
}
|
||||
.dz-drag-hover .dz-message {
|
||||
opacity: 0.5 !important;
|
||||
}
|
||||
.dz-error-message span {
|
||||
color: red;
|
||||
font-weight: 400;
|
||||
}
|
||||
.imgWrapper {
|
||||
text-align: center;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.form-grp .form-group{
|
||||
padding-left: 1rem;
|
||||
}
|
||||
.form-grp .form-group label{
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
.form-grp-label {
|
||||
font-size: 1.1rem;
|
||||
font-weight: bold;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
<link href="/vendor/icheck/skins/all.css" rel="stylesheet">
|
||||
<link href="/vendor/dropzone/dropzone.css" rel="stylesheet">
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script src="/vendor/icheck/icheck.js"></script>
|
||||
<script src="/vendor/dropzone/dropzone.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
var dropzone;
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-red',
|
||||
radioClass: 'iradio_square-red',
|
||||
increaseArea: '30%' // optional
|
||||
});
|
||||
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
|
||||
dropzone = new Dropzone(".upl-dropzone", {
|
||||
url: "{{ $ajaxUrl.'/uploadExcel' }}",
|
||||
addRemoveLinks: true,
|
||||
uploadMultiple: false,
|
||||
maxFiles: 1,
|
||||
paramName: 'file',
|
||||
acceptedFiles: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
accept: function(file, done) {
|
||||
blockElement($("#xmlUploadForm"));
|
||||
done();
|
||||
},
|
||||
maxfilesexceeded: function(file) {
|
||||
this.removeAllFiles();
|
||||
this.addFile(file);
|
||||
},
|
||||
init: function() {
|
||||
this.on("removedfile", function(file) {
|
||||
if(this.files.length == 0) {
|
||||
$("#submit_container").addClass('d-none');
|
||||
}
|
||||
});
|
||||
this.on("addedfile", function(file) {
|
||||
});
|
||||
this.on("sending", function(file, xhr, formData) {
|
||||
formData.append("_token", '{{ csrf_token() }}');
|
||||
formData.append("type", $(this.element).data('type'));
|
||||
});
|
||||
this.on("complete", function(file) {
|
||||
unBlockAll();
|
||||
});
|
||||
this.on("success", function(file, response) {
|
||||
file.id = response.id;
|
||||
$("#submit_container").removeClass('d-none');
|
||||
});
|
||||
this.on("error", function(file, errorMessage) {
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on( 'submit', '#xmlUploadForm', function (e) {
|
||||
e.preventDefault();
|
||||
blockElement($(this));
|
||||
$("#submit_container .submit").attr('disabled','disabled');
|
||||
|
||||
var form = $(this).closest("form");
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
formData.push({name:'files', value: JSON.stringify(dropzone.files)});
|
||||
formData.push({name:'distributer', value: $("#distributer").val()});
|
||||
formData.push({name:'overwrite', value: $("input[name='overwrite']:checked").val()});
|
||||
|
||||
var data = {msg: null, running: true};
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/processExcel',
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
$("#submit_container .submit").removeAttr('disabled');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
$("#submit_container .submit").removeAttr('disabled');
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@stop
|
||||
389
resources/views/Admin/ocitavanje/detalji_uploadXML.blade.php
Normal file
389
resources/views/Admin/ocitavanje/detalji_uploadXML.blade.php
Normal file
@ -0,0 +1,389 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/" . $general['cont_name'] . "/" . $parent. "/detalji";
|
||||
@endphp
|
||||
<div id="" class="card col-6">
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
Očitavanje: <b>{{ $ocitavanje->godina }} {{ $ocitavanje->j_mesec }} {{ $ocitavanje->naziv }}</b>
|
||||
</div>
|
||||
</div>
|
||||
<div id="progress" class="d-none card col-6 p-3">
|
||||
<div class="justify-content-center align-items-center">
|
||||
<b>Progress:</b>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-animated bg-success progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hiddenAtLoad d-none">
|
||||
<div id="" class="card col-6">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<form id="xmlUploadForm">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-grp">
|
||||
<div class="form-grp-label">
|
||||
U slučaju već postojećih vrednosti:
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-check-input" type="radio" name="overwrite" id="overwrite1" value="1" checked>
|
||||
<label class="form-check-label" for="overwrite1">
|
||||
Prepiši postojeće
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="form-check-input" type="radio" name="overwrite" id="overwrite2" value="0">
|
||||
<label class="form-check-label" for="overwrite2">
|
||||
Preskoči postojeće
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="uploadContainer col border">
|
||||
<div class="row">
|
||||
<div class="imgWrapper col-12 p-2">
|
||||
<div data-type="upload" class="dropzone upl-dropzone dz-clickable" id="upl-dropzone">
|
||||
<div class="dz-message d-flex flex-column">
|
||||
<i class="fa fa-cloud-upload-alt"></i>
|
||||
Drag and drop or click
|
||||
</div>
|
||||
<div class="fallback">
|
||||
<input name="file" type="file" multiple />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="submit_container" class="d-none form-row pt-2">
|
||||
<div class="col-12">
|
||||
@csrf
|
||||
<button type="submit" class="btn-sm btn-primary submit float-right">Učitavanje</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-none">
|
||||
<div id="previewTPL" class="dz-preview dz-file-preview">
|
||||
<div class="dz-details">
|
||||
<div class="dz-error-message"><span data-dz-errormessage></span></div>
|
||||
</div>
|
||||
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.upl-dropzone {
|
||||
border: 2px dashed #dedede;
|
||||
border-radius: 5px;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.upl-dropzone.dz-clickable .dz-message, .upl-dropzone.dz-clickable .dz-message * {
|
||||
cursor: pointer;
|
||||
}
|
||||
.upl-dropzone i{
|
||||
font-size: 5rem;
|
||||
}
|
||||
.dz-message i{
|
||||
font-size: 5rem;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
.upl-dropzone .dz-message {
|
||||
color: rgba(0,0,0,.54);
|
||||
font-weight: 500;
|
||||
font-size: initial;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.dz-drag-hover {
|
||||
border: 2px solid #dedede !important;
|
||||
}
|
||||
.dz-drag-hover .dz-message {
|
||||
opacity: 0.5 !important;
|
||||
}
|
||||
.dz-error-message span {
|
||||
color: red;
|
||||
font-weight: 400;
|
||||
}
|
||||
.imgWrapper {
|
||||
text-align: center;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.form-grp .form-group{
|
||||
padding-left: 1rem;
|
||||
}
|
||||
.form-grp .form-group label{
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
.form-grp-label {
|
||||
font-size: 1.1rem;
|
||||
font-weight: bold;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
<link href="/vendor/icheck/skins/all.css" rel="stylesheet">
|
||||
<link href="/vendor/dropzone/dropzone.css" rel="stylesheet">
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script src="/vendor/icheck/icheck.js"></script>
|
||||
<script src="/vendor/dropzone/dropzone.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
var dropzone;
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-red',
|
||||
radioClass: 'iradio_square-red',
|
||||
increaseArea: '30%' // optional
|
||||
});
|
||||
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
|
||||
dropzone = new Dropzone(".upl-dropzone", {
|
||||
url: "{{ $ajaxUrl.'/uploadXML' }}",
|
||||
addRemoveLinks: true,
|
||||
uploadMultiple: false,
|
||||
paramName: 'file',
|
||||
acceptedFiles: '.xml',
|
||||
accept: function(file, done) {
|
||||
blockElement($("#xmlUploadForm"));
|
||||
done();
|
||||
},
|
||||
init: function() {
|
||||
this.on("removedfile", function(file) {
|
||||
if(this.files.length == 0) {
|
||||
$("#submit_container").addClass('d-none');
|
||||
}
|
||||
});
|
||||
this.on("addedfile", function(file) {
|
||||
});
|
||||
this.on("sending", function(file, xhr, formData) {
|
||||
formData.append("_token", '{{ csrf_token() }}');
|
||||
formData.append("type", $(this.element).data('type'));
|
||||
});
|
||||
this.on("complete", function(file) {
|
||||
unBlockAll();
|
||||
});
|
||||
this.on("success", function(file, response) {
|
||||
file.id = response.id;
|
||||
$("#submit_container").removeClass('d-none');
|
||||
});
|
||||
this.on("error", function(file, errorMessage) {
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on( 'submit', '#xmlUploadForm', function (e) {
|
||||
e.preventDefault();
|
||||
blockElement($(this));
|
||||
$("#submit_container .submit").attr('disabled','disabled');
|
||||
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
formData.push({name:'files', value: JSON.stringify(dropzone.files)});
|
||||
formData.push({name:'overwrite', value: $("input[name='overwrite']:checked").val()});
|
||||
// var status = data.msg.status;
|
||||
// var percent = status.current/status.max * 100;
|
||||
|
||||
var data = {msg: null, running: true};
|
||||
changeStatus(data, 'ImportOcitavanje');
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/processXML',
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
if(response.error)
|
||||
{
|
||||
}else{
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
|
||||
// var runningJobs = JSON.parse('{!! $runningJobsJS !!}');
|
||||
var runningJobs = [];
|
||||
(function poll() {
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/getImportStatus',
|
||||
type: "GET",
|
||||
success: function(data) {
|
||||
parsePollResults(data);
|
||||
},
|
||||
dataType: "json",
|
||||
complete: setTimeout(() => poll(), 3000),
|
||||
timeout: 2000
|
||||
})
|
||||
})();
|
||||
|
||||
function parsePollResults(data) {
|
||||
var t = Object.entries(data);
|
||||
for (var i = t.length - 1; i >= 0; i--) {
|
||||
var prop = t[i][0];
|
||||
if(typeof runningJobs[prop] === 'undefined'){
|
||||
runningJobs[prop] = {};
|
||||
changeStatus(data[prop], prop);
|
||||
}else if(data[prop].running != runningJobs[prop].running) {
|
||||
changeStatus(data[prop], prop);
|
||||
}
|
||||
if(data[prop].running){
|
||||
updateStatus(data[prop], prop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateStatus(data, prop) {
|
||||
var el = prop;
|
||||
if(data.msg) {
|
||||
var status = data.msg.status;
|
||||
var percent = status.current/status.max * 100;
|
||||
}else{
|
||||
var percent = 0;
|
||||
}
|
||||
|
||||
$('#progress').find('.progress-bar').css('width', percent+'%');
|
||||
}
|
||||
|
||||
function changeStatus(data, prop) {
|
||||
runningJobs[prop].running = data.running;
|
||||
var el = prop;
|
||||
if(data.running) {
|
||||
blockElement($("#xmlUploadForm"));
|
||||
$("#progress").removeClass('d-none');
|
||||
$("#submit_container .submit").attr('disabled','disabled');
|
||||
}else{
|
||||
$('#progress').find('.progress-bar').css('width', '100%');
|
||||
sleep(500).then(() => {
|
||||
dropzone.removeAllFiles();
|
||||
$("#progress").addClass('d-none');
|
||||
unBlockAll();
|
||||
$("#submit_container .submit").removeAttr('disabled');
|
||||
});
|
||||
// await new Promise(r => setTimeout(r, 500));
|
||||
}
|
||||
}
|
||||
|
||||
function sleep (time) {
|
||||
return new Promise((resolve) => setTimeout(resolve, time));
|
||||
}
|
||||
|
||||
</script>
|
||||
@stop
|
||||
35
resources/views/Admin/ocitavanje/edit.blade.php
Executable file
35
resources/views/Admin/ocitavanje/edit.blade.php
Executable file
@ -0,0 +1,35 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
@foreach ($obj as $key => $field)
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="{{ $key }}">{{ $field['label'] }}</label>
|
||||
@switch($field['type'])
|
||||
@case('text')
|
||||
<input name="{{ $key }}" id="{{ $key }}" type="text" class="form-control" value="{{$data->$key ?? ''}}">
|
||||
@break
|
||||
@case('select')
|
||||
<select name="{{ $key }}" id="{{ $key }}" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($field['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->$key == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="btn-sm btn-danger cancel" rel="{{ $data->id ?? "" }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
449
resources/views/Admin/ocitavanje/index.blade.php
Executable file
449
resources/views/Admin/ocitavanje/index.blade.php
Executable file
@ -0,0 +1,449 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/".$general['cont_name'];
|
||||
@endphp
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="{{ $ajaxUrl }}/browse?{{ $qstring }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-sortable="true" data-visible="true">
|
||||
#
|
||||
</th>
|
||||
<th
|
||||
data-field="created_at"
|
||||
data-sortable="true"
|
||||
data-formatter="dateFormatter"
|
||||
data-visible="true">
|
||||
Kreiran
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
@if($field['list'])
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th data-field="status" data-sortable="true" data-align="center" data-formatter="statusFormatter">Status</th>
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui.label {
|
||||
background-color: #EEE;
|
||||
color: #666 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
.ui.label .icon:before {
|
||||
content: '\f00d';
|
||||
font-family: fontAwesome;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.ui.label .icon:hover:before {
|
||||
color: #F00;
|
||||
}
|
||||
.ui.selection.dropdown {
|
||||
min-height: inherit;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||
overflow: visible !important;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
// var ajaxUrl = "/admin/{{ $general['cont_name'] }}";
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function breadFormatter(value, row) {
|
||||
var t = [];
|
||||
switch(value) {
|
||||
case 'grupa':
|
||||
break;
|
||||
case 'objekat':
|
||||
t.push('<a class="objekat" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na objekat"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
}
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
|
||||
// if(row.status == 0) {
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
// }
|
||||
t.push('<a class="edit mr-2" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
// if(row.status == 0) {
|
||||
t.push('<a class="mr-2" href="{{ $ajaxUrl }}/' + row.id + '/statistika" title="Statistika"><i class="fa fa-binoculars"></i></a>');
|
||||
t.push('<a class="next" href="javascript:void(0)" title="Detalji"><i class="fa fa-arrow-alt-circle-right"></i></a>');
|
||||
// }
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function dateFormatter(value, row) {
|
||||
if(Date.parse(value)) {
|
||||
const date = new Date(value);
|
||||
return new Intl.DateTimeFormat("lt-LT", {year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit'}).format(date);
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit?'+queryStr, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create?'+queryStr, function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function statusFormatter(value, row, index) {
|
||||
switch(row.status) {
|
||||
case 0:
|
||||
return '<div class="badge badge-pill pl-2 pr-2 badge-success">Otvoren</div>';
|
||||
break;
|
||||
case 1:
|
||||
return '<div class="badge badge-pill pl-2 pr-2 badge-warning">Zaključan</div>';
|
||||
break;
|
||||
case 2:
|
||||
return '<div class="badge badge-pill pl-2 pr-2 badge-danger">Arhiviran</div>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$('.ui.dropdown').dropdown();
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url+'?'+queryStr,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.data)
|
||||
{
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else
|
||||
window.location.href = '';
|
||||
}
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
window.breadEvents = {
|
||||
'click .objekat': function (e, value, row, index) {
|
||||
window.location.href = '/admin/objekat?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .next': function (e, value, row, index) {
|
||||
window.location.href = '/admin/ocitavanje/' + row.id + '/detalji';
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
489
resources/views/Admin/ocitavanje/statistika.blade.php
Normal file
489
resources/views/Admin/ocitavanje/statistika.blade.php
Normal file
@ -0,0 +1,489 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
<div class="h4 pt-2">{{ $general['sub_title'] }}</div>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div id="" class="card col-6">
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
Očitavanje: <b>{{ $ocitavanje->godina }} {{ $ocitavanje->j_mesec }} {{ $ocitavanje->naziv }}</b>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main_container">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-6">
|
||||
<div class="small-box bg-info">
|
||||
<div class="inner">
|
||||
<h3>Očitano: {{ $sume['kalorimetar - zbirni']['ocitano'] }}<br>Ukupno: {{ $sume['kalorimetar - zbirni']['prisutno'] }}</h3>
|
||||
<p>Zbirni kalorimetri</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-fw fa-microchip "></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-6">
|
||||
<div class="small-box bg-warning">
|
||||
<div class="inner">
|
||||
<h3>Očitano: {{ $sume['kalorimetar - individualni']['ocitano'] }}<br>Ukupno: {{ $sume['kalorimetar - individualni']['prisutno'] }}</h3>
|
||||
<p>Individualni kalorimetri</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-fw fa-microchip "></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-6">
|
||||
<div class="small-box bg-success">
|
||||
<div class="inner">
|
||||
<h3>Očitano: {{ $sume['alokator']['ocitano'] }}<br>Ukupno: {{ $sume['alokator']['prisutno'] }}</h3>
|
||||
<p>Alokatori</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fas fa-fw fa-microchip "></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="action_container" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
Kreirani obračuni
|
||||
</div>
|
||||
<div class="card-tools hideOnEdit">
|
||||
<button class="btn btn-info add_new hideOnCreate">
|
||||
Kreiraj novi obračun
|
||||
</button>
|
||||
<button disabled="" class="btn btn-info showOnCreate">
|
||||
<span role="status" aria-hidden="true" class="btnspn spinner-border spinner-border-sm"></span>
|
||||
Kreiranje novog obračuna je u toku
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div"></div>
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="/admin/obracun/browse?ocitavanje={{ $ocitavanje->id }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-sortable="true" data-visible="true">
|
||||
#
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
@if($field['list'])
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th data-field="godina" data-sortable="true" data-align="center">Godina</th>
|
||||
<th data-field="mesec" data-sortable="true" data-align="center">Mesec</th>
|
||||
<th data-field="closed" data-sortable="true" data-align="center" data-formatter="statusFormatter">Otvoren</th>
|
||||
<th
|
||||
data-field="created_at"
|
||||
data-sortable="true"
|
||||
data-formatter="dateFormatter"
|
||||
data-visible="true">
|
||||
Kreiran
|
||||
</th>
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<script src="https://unpkg.com/ionicons@5.4.0/dist/ionicons.js"></script>
|
||||
<style type="text/css">
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
|
||||
#action_container.in_progress {
|
||||
|
||||
}
|
||||
|
||||
#action_container.in_editmode .hideOnEdit {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#action_container .showOnCreate {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#action_container.in_createmode .showOnCreate {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#action_container.in_createmode .hideOnCreate {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = '/admin/obracun';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete mr-2 hideOnEdit" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit mr-2 hideOnEdit" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function dateFormatter(value, row) {
|
||||
if(Date.parse(value)) {
|
||||
const date = new Date(value);
|
||||
return new Intl.DateTimeFormat("lt-LT", {year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit'}).format(date);
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
|
||||
function statusFormatter(value, row, index) {
|
||||
switch(row.closed) {
|
||||
case 0:
|
||||
return '<div class="badge badge-pill pl-2 pr-2 badge-success">Da</div>';
|
||||
break;
|
||||
case 1:
|
||||
return '<div class="badge badge-pill pl-2 pr-2 badge-danger">Ne</div>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit?'+queryStr, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create?'+queryStr, function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$('#action_container').addClass('in_editmode');
|
||||
$('.ui.dropdown').dropdown();
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
formData.push({name:'ocitavanjeID', value: '{{ $ocitavanje->id }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url+'?'+queryStr,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.data) {
|
||||
if(response.status == 'updated') {
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else{
|
||||
changeStatus({msg: "", running: true}, 'ObracunCreation');
|
||||
clearTimeout(pollTimer);
|
||||
pollTimer = setTimeout(poll, 5000);
|
||||
}
|
||||
}
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#action_container').removeClass('in_editmode');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
$('#action_container').removeClass('in_editmode');
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1){
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
}else{
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
}
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#action_container').removeClass('in_editmode');
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
window.optEvents = {
|
||||
'click .next': function (e, value, row, index) {
|
||||
window.location.href = '/admin/ocitavanje/detalji/'+row.id;
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#action_container').addClass('in_editmode');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
let runningJobs = [];
|
||||
let pollTimer;
|
||||
poll();
|
||||
function poll() {
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/getCreationStatus',
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
timeout: 2000,
|
||||
success: (data) => {
|
||||
parsePollResults(data);
|
||||
},
|
||||
complete: () => {
|
||||
pollTimer = setTimeout(poll, 3000);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function parsePollResults(data) {
|
||||
var t = Object.entries(data);
|
||||
for (var i = t.length - 1; i >= 0; i--) {
|
||||
var prop = t[i][0];
|
||||
if(typeof runningJobs[prop] === 'undefined'){
|
||||
runningJobs[prop] = {};
|
||||
changeStatus(data[prop], prop);
|
||||
}else if(data[prop].running != runningJobs[prop].running) {
|
||||
changeStatus(data[prop], prop);
|
||||
}
|
||||
if(data[prop].running){
|
||||
updateStatus(data[prop], prop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateStatus(data, prop) {
|
||||
}
|
||||
|
||||
function changeStatus(data, prop) {
|
||||
runningJobs[prop].running = data.running;
|
||||
var el = prop;
|
||||
if(data.running) {
|
||||
$("#action_container").addClass('in_createmode');
|
||||
}else{
|
||||
$("#action_container").removeClass('in_createmode');
|
||||
$("#listing_table").bootstrapTable('refresh');
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
@ -0,0 +1,64 @@
|
||||
@extends('Admin.pdf_izvestaji.base_bootstrap')
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
th.bordeless {
|
||||
border-bottom-width: 0px !important;
|
||||
}
|
||||
.table {
|
||||
font-size: 0.7rem !important;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12 pb-4">
|
||||
<p class="fs-2 fw-bold">{{ $data['naslov'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@foreach ($data['grupe'] as $grupa)
|
||||
<div class="pb-2" style="page-break-inside: avoid;">
|
||||
<div class="row">
|
||||
<div class="col-12 pb-2">
|
||||
<p class="fs-4 fw-bold">{{ $grupa['ime'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 pb-2">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Potrošački broj</th>
|
||||
<th scope="col">Ime i prezime</th>
|
||||
<th scope="col">Broj impulsa</th>
|
||||
<th scope="col">Procenat učešća<br>prema ukupnom<br>broju impulsa</th>
|
||||
<th scope="col">Površina</th>
|
||||
<th scope="col">Procenat površine</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($grupa['objekti'] as $objekat)
|
||||
<tr>
|
||||
<th scope="row">{{ $objekat['sifra'] }}</th>
|
||||
<th scope="row">{{ $objekat['vlasnik'] }}</th>
|
||||
<th scope="row">{{ number_format($objekat['impulsi'], 3) }}</th>
|
||||
<th scope="row">{{ $objekat['impulsi']>0.0 ? number_format($objekat['sumUtrosak']/$grupa['ukupnaSnaga']*100.0, 4) : '' }}</th>
|
||||
<th scope="row">{{ number_format($objekat['povrsina'], 2) }}</th>
|
||||
<th scope="row">{{ $objekat['procpovrsine'] }}</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
<th class="bordeless" scope="row">{{ number_format($grupa['ukupniImpulsi'], 3) }}</th>
|
||||
<th class="bordeless" scope="row">100.000</th>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@stop
|
||||
|
||||
@ -0,0 +1,120 @@
|
||||
@extends('Admin.pdf_izvestaji.base_bootstrap')
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
th.bordeless {
|
||||
border-bottom-width: 0px !important;
|
||||
}
|
||||
.table {
|
||||
font-size: 0.7rem !important;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@section('content')
|
||||
@foreach ($data['objekti'] as $objekat)
|
||||
<div class="pb-4" style="page-break-inside: avoid;">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 pb-2">
|
||||
<p class="text-center fs-4 fw-bold">{{ $data['naslov'] }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="text-end">Šifra:</div>
|
||||
</div>
|
||||
<div class="col-sm-4 fw-bold">
|
||||
{{ $objekat['sifra'] }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="text-end">Vlasnik:</div>
|
||||
</div>
|
||||
<div class="col-sm-4 fw-bold">
|
||||
{{ $objekat['vlasnik'] }}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="text-end">Zbir svih alokatora:</div>
|
||||
</div>
|
||||
<div class="col-sm-2 fw-bold">
|
||||
{{ $data['ukupniImpulsi'] }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="text-end">Adresa:</div>
|
||||
</div>
|
||||
<div class="col-sm-4 fw-bold">
|
||||
{{ $objekat['mesto'] }}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="text-end">Procenat:</div>
|
||||
</div>
|
||||
<div class="col-sm-2 fw-bold">
|
||||
{{ number_format($objekat['sumUtrosak']/$data['ukupnaSnaga']*100.0, 4) }} %
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="text-end"></div>
|
||||
</div>
|
||||
<div class="col-sm-4 fw-bold">
|
||||
{{ $objekat['adresa'] }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="text-end">Površina:</div>
|
||||
</div>
|
||||
<div class="col-sm-4 fw-bold">
|
||||
{{ $objekat['povrsina'] }} m2
|
||||
</div>
|
||||
</div>
|
||||
<div class="row pt-2">
|
||||
<div class="col-12">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Radio address</th>
|
||||
<th scope="col">Prostorija</th>
|
||||
<th scope="col">{{ $data['datumCol1'] }}</th>
|
||||
<th scope="col">{{ $data['datumCol2'] }}</th>
|
||||
<th scope="col">Razlika</th>
|
||||
<th scope="col">Kc</th>
|
||||
<th scope="col">Snaga</th>
|
||||
<th scope="col">Impulsi</th>
|
||||
<th scope="col">Proc.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($objekat['uredjaji'] as $uredjaj)
|
||||
<tr>
|
||||
<th scope="row">{{ $uredjaj['radio'] }}</th>
|
||||
<th scope="row">{{ $uredjaj['prostorija'] }}</th>
|
||||
<th scope="row">{{ $uredjaj['stanje1'] }}</th>
|
||||
<th scope="row">{{ $uredjaj['stanje2'] }}</th>
|
||||
<th scope="row">{{ $uredjaj['razlika'] }}</th>
|
||||
<th scope="row">{{ $uredjaj['kc'] }}</th>
|
||||
<th scope="row">{{ $uredjaj['snaga'] }}</th>
|
||||
<th scope="row">{{ $uredjaj['razlika']>0.0 ? number_format($uredjaj['razlika'], 3) : '' }}</th>
|
||||
<th scope="row">{{ $uredjaj['razlika']>0.0 ? number_format($uredjaj['utroseno']/$data['ukupnaSnaga']*100.0, 4) : '' }}</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
<th class="bordeless" scope="row">{{ $objekat['sumImpulsi'] }}</th>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
<th class="bordeless" scope="row"> </th>
|
||||
<th class="bordeless" scope="row">{{ $objekat['sumImpulsi']>0.0 ? number_format($objekat['sumImpulsi'], 3) : '' }}</th>
|
||||
<th class="bordeless" scope="row">{{ $objekat['sumImpulsi']>0.0 ? number_format($objekat['sumUtrosak']/$data['ukupnaSnaga']*100.0, 4) : '' }}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@stop
|
||||
|
||||
16
resources/views/Admin/pdf_izvestaji/base_bootstrap.blade.php
Normal file
16
resources/views/Admin/pdf_izvestaji/base_bootstrap.blade.php
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta content="" name="description">
|
||||
<meta content="" name="keywords">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
@php $css_File = file_get_contents(public_path('/pdf_izvestaji/css/bootstrap.min.css')); @endphp
|
||||
<style type="text/css">{!! $css_File; !!}</style>
|
||||
@yield("css");
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@yield("content")
|
||||
</body>
|
||||
|
||||
</html>
|
||||
35
resources/views/Admin/prostorija/edit.blade.php
Executable file
35
resources/views/Admin/prostorija/edit.blade.php
Executable file
@ -0,0 +1,35 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
@foreach ($obj as $key => $field)
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="{{ $key }}">{{ $field['label'] }}</label>
|
||||
@switch($field['type'])
|
||||
@case('text')
|
||||
<input name="{{ $key }}" id="{{ $key }}" type="text" class="form-control" value="{{$data->$key ?? ''}}">
|
||||
@break
|
||||
@case('select')
|
||||
<select name="{{ $key }}" id="{{ $key }}" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($field['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->$key == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="btn-sm btn-danger cancel" rel="{{ $data->id ?? "" }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
466
resources/views/Admin/prostorija/index.blade.php
Executable file
466
resources/views/Admin/prostorija/index.blade.php
Executable file
@ -0,0 +1,466 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/".$general['cont_name'];
|
||||
@endphp
|
||||
@if($parents['grupa']||$parents['objekat'])
|
||||
<div class="row mb-3">
|
||||
<div class="col-lg-12 col-xl-6">
|
||||
<div class="h3">unutar:</div>
|
||||
<table class="hiddenAtLoad d-none table table-striped table-bordered"
|
||||
id="dep_table"
|
||||
data-toggle="table"
|
||||
data-pagination="false"
|
||||
data-search="false"
|
||||
data-show-columns="false"
|
||||
data-show-footer="false"
|
||||
data-show-header="false"
|
||||
data-detail-formatter="def_detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th data-align="center" data-formatter="breadFormatter" data-events="breadEvents"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($parents['grupa'])
|
||||
@foreach ($parents['grupa'] as $key => $field)
|
||||
<tr data-id="1">
|
||||
<td>Grupe</td>
|
||||
<td>{{ $field->ime_grupe}}, {{ $field->j_grad }} ({{ $field->j_tip }})</td>
|
||||
<td>grupa</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@if($parents['objekat'])
|
||||
<tr data-id="2" data-qs="getrelObj={{ $parents['objekat']->j_grupa_ids}}">
|
||||
<td>Objekta</td>
|
||||
<td>{{ $parents['objekat']->prezime}} {{ $parents['objekat']->ime}}, {{ $parents['objekat']->j_ulica }} ({{ $parents['objekat']->j_grad }})</td>
|
||||
<td>objekat</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="{{ $ajaxUrl }}/browse?{{ $qstring }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
@if($field['list'])
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui.label {
|
||||
background-color: #EEE;
|
||||
color: #666 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
.ui.label .icon:before {
|
||||
content: '\f00d';
|
||||
font-family: fontAwesome;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.ui.label .icon:hover:before {
|
||||
color: #F00;
|
||||
}
|
||||
.ui.selection.dropdown {
|
||||
min-height: inherit;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||
overflow: visible !important;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
// var ajaxUrl = "/admin/{{ $general['cont_name'] }}";
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function breadFormatter(value, row) {
|
||||
var t = [];
|
||||
switch(value) {
|
||||
case 'grupa':
|
||||
break;
|
||||
case 'objekat':
|
||||
t.push('<a class="objekat" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na objekat"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
}
|
||||
// console.log(value);
|
||||
// console.log(row);
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit mr-2" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
@if($getRelated === false)
|
||||
t.push('<a class="related mr-2" href="javascript:void(0)" title="Relacije"><i class="fa fa-filter"></i></a>');
|
||||
@endif
|
||||
t.push('<a class="next" href="javascript:void(0)" title="Radijatori"><i class="fa fa-arrow-alt-circle-right"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit?'+queryStr, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create?'+queryStr, function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$('.ui.dropdown').dropdown();
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#grad_id").change(function() {
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url+'?'+queryStr,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.data)
|
||||
{
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else
|
||||
window.location.href = '';
|
||||
}
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
window.breadEvents = {
|
||||
'click .objekat': function (e, value, row, index) {
|
||||
window.location.href = '/admin/objekat?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .related': function (e, value, row, index) {
|
||||
window.location.href = '/admin/prostorija?getrelProst=' + row.objekat_id;
|
||||
},
|
||||
'click .next': function (e, value, row, index) {
|
||||
window.location.href = '/admin/radijator?getrelRadi='+row.id;
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
36
resources/views/Admin/radijator/edit.blade.php
Executable file
36
resources/views/Admin/radijator/edit.blade.php
Executable file
@ -0,0 +1,36 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
@foreach ($obj as $key => $field)
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="{{ $key }}">{{ $field['label'] }}</label>
|
||||
@switch($field['type'])
|
||||
@case('text')
|
||||
<input name="{{ $key }}" id="{{ $key }}" type="text" class="form-control" value="{{$data->$key ?? ''}}">
|
||||
@break
|
||||
@case('select')
|
||||
<select name="{{ $key }}" id="{{ $key }}" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($field['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->$key == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@include("Admin.uredjaj.attach_index", ['id' => $data->id, 'type' => 'radijator'])
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="btn-sm btn-danger cancel" rel="{{ $data->id ?? "" }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
472
resources/views/Admin/radijator/index.blade.php
Executable file
472
resources/views/Admin/radijator/index.blade.php
Executable file
@ -0,0 +1,472 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/".$general['cont_name'];
|
||||
@endphp
|
||||
@if($parents['grupa']||$parents['objekat'])
|
||||
<div class="row mb-3">
|
||||
<div class="col-lg-12 col-xl-6">
|
||||
<div class="h3">unutar:</div>
|
||||
<table class="hiddenAtLoad d-none table table-striped table-bordered"
|
||||
id="dep_table"
|
||||
data-toggle="table"
|
||||
data-pagination="false"
|
||||
data-search="false"
|
||||
data-show-columns="false"
|
||||
data-show-footer="false"
|
||||
data-show-header="false"
|
||||
data-detail-formatter="def_detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th data-align="center" data-formatter="breadFormatter" data-events="breadEvents"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($parents['grupa'])
|
||||
@foreach ($parents['grupa'] as $key => $field)
|
||||
<tr data-id="1">
|
||||
<td>Grupe</td>
|
||||
<td>{{ $field->ime_grupe}}, {{ $field->j_grad }} ({{ $field->j_tip }})</td>
|
||||
<td>grupa</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@if($parents['objekat'])
|
||||
<tr data-id="2" data-qs="getrelObj={{ $parents['objekat']->j_grupa_ids}}">
|
||||
<td>Objekta</td>
|
||||
<td>{{ $parents['objekat']->prezime}} {{ $parents['objekat']->ime}}, {{ $parents['objekat']->j_ulica }} ({{ $parents['objekat']->j_grad }})</td>
|
||||
<td>objekat</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($parents['prostorija'])
|
||||
<tr data-id="3" data-qs="getrelProst={{ $parents['prostorija']->objekat_id}}">
|
||||
<td>Prostorije</td>
|
||||
<td>{{ $parents['prostorija']->j_tip_prostorije}} ({{ $parents['prostorija']->dim_duzina}} x {{ $parents['prostorija']->dim_sirina }})</td>
|
||||
<td>prostorija</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="{{ $ajaxUrl }}/browse?{{ $qstring }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
@if($field['list'])
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui.label {
|
||||
background-color: #EEE;
|
||||
color: #666 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
.ui.label .icon:before {
|
||||
content: '\f00d';
|
||||
font-family: fontAwesome;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.ui.label .icon:hover:before {
|
||||
color: #F00;
|
||||
}
|
||||
.ui.selection.dropdown {
|
||||
min-height: inherit;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||
overflow: visible !important;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function breadFormatter(value, row) {
|
||||
var t = [];
|
||||
switch(value) {
|
||||
case 'grupa':
|
||||
break;
|
||||
case 'objekat':
|
||||
t.push('<a class="objekat" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na objekat"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
case 'prostorija':
|
||||
t.push('<a class="prostorija" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na prostoriju"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
}
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit mr-2" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
@if($getRelated === false)
|
||||
t.push('<a class="related mr-2" href="javascript:void(0)" title="Relacije"><i class="fa fa-filter"></i></a>');
|
||||
@endif
|
||||
// t.push('<a class="next" href="javascript:void(0)" title="Radijatori"><i class="fa fa-arrow-alt-circle-right"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit?'+queryStr, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create?'+queryStr, function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$('.ui.dropdown').dropdown();
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#grad_id").change(function() {
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url+'?'+queryStr,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
if(response.data){
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('refresh');
|
||||
}
|
||||
}else
|
||||
$("#listing_table").bootstrapTable('refresh');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
window.breadEvents = {
|
||||
'click .objekat': function (e, value, row, index) {
|
||||
window.location.href = '/admin/objekat?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
'click .prostorija': function (e, value, row, index) {
|
||||
window.location.href = '/admin/prostorija?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .related': function (e, value, row, index) {
|
||||
window.location.href = '/admin/radijator?getrelRadi=' + row.prostorija_id;
|
||||
},
|
||||
'click .next': function (e, value, row, index) {
|
||||
window.location.href = '/admin/alokator?getrelAlok=' + row.id;
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
47
resources/views/Admin/sifarnici/edit.blade.php
Executable file
47
resources/views/Admin/sifarnici/edit.blade.php
Executable file
@ -0,0 +1,47 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
@foreach ($obj['fields'] as $key => $field)
|
||||
@if($field['type']=='area')
|
||||
<div class="col-md-12">
|
||||
@else
|
||||
<div class="col-md-6">
|
||||
@endif
|
||||
<div class="position-relative form-group">
|
||||
<label for="{{ $key }}">{{ $field['label'] }}</label>
|
||||
@switch($field['type'])
|
||||
@case('area')
|
||||
<textarea name="{{ $key }}" id="{{ $key }}" class="form-control" >{{$data->$key ?? ''}}</textarea>
|
||||
@break
|
||||
@case('text')
|
||||
<input name="{{ $key }}" id="{{ $key }}" type="text" class="form-control" value="{{$data->$key ?? ''}}">
|
||||
@break
|
||||
@case('select')
|
||||
<select name="{{ $key }}" id="{{ $key }}" class="form-control">
|
||||
@foreach ($field['fetch']() as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->$key == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@case('true_false')
|
||||
<div class="col-12">
|
||||
<input class="bsToggle" id="{{ $key }}" name="{{ $key }}" type="checkbox" data-toggle="toggle" data-on="Da" data-off="Ne" data-onstyle="success" value="1" data-offstyle="danger" data-width="75" @if ($data->$key==1) checked @endif>
|
||||
</div>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="btn-sm btn-danger cancel" rel="{{ $data->id ?? '' }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
66
resources/views/Admin/sifarnici/index.blade.php
Executable file
66
resources/views/Admin/sifarnici/index.blade.php
Executable file
@ -0,0 +1,66 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', 'Gradovi')
|
||||
|
||||
@section('content_header')
|
||||
<h1>Šifarnici</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div id="list_container" class="row">
|
||||
@foreach ($obj as $key => $field)
|
||||
<div data-target="{{ $key }}" class="card text-white bg-info mb-2 zoom col-6 ml-1" style="max-width: 18rem;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ $field['title'] }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = "/admin/gradovi";
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#list_container').on( 'click', '.card', function (e) {
|
||||
window.location.href = '/admin/sifarnik/' + $(this).data('target');
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
369
resources/views/Admin/sifarnici/list.blade.php
Executable file
369
resources/views/Admin/sifarnici/list.blade.php
Executable file
@ -0,0 +1,369 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $obj['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $obj['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-6">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
Postojeći elementi
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-url="/admin/sifarnik/{{ $route }}/browse"
|
||||
data-unique-id="id"
|
||||
data-sort-name="{{ $obj['sort'][0] }}"
|
||||
data-sort-order="{{ $obj['sort'][1] }}"
|
||||
data-search="true"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
@foreach ($obj['fields'] as $key => $field)
|
||||
@if($field['list'])
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<link href="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/css/bootstrap4-toggle.min.css" rel="stylesheet">
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/gitbrent/bootstrap4-toggle@3.6.1/js/bootstrap4-toggle.min.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = "/admin/sifarnik/{{ $route }}";
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/add', function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function openEditor(element, index){
|
||||
$('.bsToggle').bootstrapToggle();
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$(".role_check").change(function() {
|
||||
var id = $(this).attr('id');
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$(".role_check").each(function(key, value){
|
||||
if($(value).attr('id') != id) {
|
||||
$(value).prop('checked', false).change();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.data)
|
||||
{
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else
|
||||
window.location.href = '';
|
||||
}
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
30
resources/views/Admin/uredjaj/attach_edit.blade.php
Executable file
30
resources/views/Admin/uredjaj/attach_edit.blade.php
Executable file
@ -0,0 +1,30 @@
|
||||
<div class="col-12 bg-uredjaj-edit">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="uredjaj_serijski_broj">Serijski broj</label>
|
||||
<input name="uredjaj_serijski_broj" id="uredjaj_serijski_broj" type="text" class="form-control" value="{{$uredjaj->serijski_broj ?? ''}}">
|
||||
</div>
|
||||
</div>
|
||||
@if(count($urDef['allowed_types'])>1)
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="uredjaj_tip_uredjaja">Serijski broj</label>
|
||||
<select name="uredjaj_tip_uredjaja" id="uredjaj_tip_uredjaja" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($urDef['allowed_types'] as $key => $value)
|
||||
<option value="{{ $value }}" @if($uredjaj->tip_uredjaja == $value) selected @endif>{{ $tipovi[$value] }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12 mb-2">
|
||||
<input type="hidden" name="uredjaj_id" value="{{$uredjaj->id ?? '0'}}">
|
||||
<button type="button" class="btn-sm btn-secondary uredjaj_cancel" rel="{{ $data->id ?? '' }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-secondary uredjaj_submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
228
resources/views/Admin/uredjaj/attach_index.blade.php
Executable file
228
resources/views/Admin/uredjaj/attach_index.blade.php
Executable file
@ -0,0 +1,228 @@
|
||||
<style type="text/css">
|
||||
.card-header {
|
||||
background-color: rgba(0,0,0,.03);
|
||||
}
|
||||
.card-header, .card-body {
|
||||
padding: 0.6rem;
|
||||
}
|
||||
#uAttach .fa {
|
||||
color: green;
|
||||
}
|
||||
.bg-uredjaj-edit {
|
||||
background-color: #a0eb7a;
|
||||
}
|
||||
</style>
|
||||
<div id="uAttach" data-id="{{ $id }}" data-type="{{ $type }}" class="row">
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
getAttachForm();
|
||||
});
|
||||
|
||||
function getAttachForm() {
|
||||
$("#uAttach").empty();
|
||||
var formData = [];
|
||||
formData.push({name:'uredjaj_attached_to', value: $("#uAttach").data('id') });
|
||||
formData.push({name:'uredjaj_parent_type', value: $("#uAttach").data('type') });
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
$("#uAttach").load('/admin/uredjaj/getAttached', formData, function() {
|
||||
$(this).find(".addUredjaj").click(function (e) {
|
||||
loadEditFrom($(this));
|
||||
return false;
|
||||
});
|
||||
$(this).find(".linkUredjaj").click(function (e) {
|
||||
loadLinkFrom($(this));
|
||||
return false;
|
||||
});
|
||||
$(this).find(".editUredjaj").click(function (e) {
|
||||
loadEditFrom($(this));
|
||||
return false;
|
||||
});
|
||||
$(this).find(".deleteUredjaj").click(function (e) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete ?',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var btn = $(this);
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
formData.push({name:'uredjaj_id', value: btn.data('id') });
|
||||
formData.push({name:'uredjaj_attached_to', value: $("#uAttach").data('id') });
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: '/admin/uredjaj/attachDelete',
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
getAttachForm();
|
||||
},
|
||||
error: function (response) {
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$(this).find(".unLinkUredjaj").click(function (e) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Unlink ?',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var btn = $(this);
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
formData.push({name:'uredjaj_id', value: btn.data('id') });
|
||||
formData.push({name:'uredjaj_attached_to', value: $("#uAttach").data('id') });
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: '/admin/uredjaj/attachUnlink',
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
getAttachForm();
|
||||
},
|
||||
error: function (response) {
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function loadLinkFrom(element) {
|
||||
var newEl = $( "<div id='uredjajLinkContainer'></div>" );
|
||||
var mRow = element.parent();
|
||||
mRow.after(newEl);
|
||||
|
||||
var formData = [];
|
||||
formData.push({name:'uredjaj_attached_to', value: $("#uAttach").data('id') });
|
||||
formData.push({name:'uredjaj_parent_type', value: $("#uAttach").data('type') });
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
$("#uredjajLinkContainer").load('/admin/uredjaj/attachLinkLoadForm', formData, function() {
|
||||
$(this).find('.dropdown').dropdown();
|
||||
$(this).find(".uredjaj_cancel").click(function (e) {
|
||||
$("#uredjajLinkContainer").remove();
|
||||
return false;
|
||||
});
|
||||
$(this).find(".uredjaj_submit").click(function (e) {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
var token = false;
|
||||
for(const [index, el] of formData.entries()) {
|
||||
if(el.name == '_token'){
|
||||
token = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!token){
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
}
|
||||
$.ajax({
|
||||
url: '/admin/uredjaj/attachLinkSave',
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
getAttachForm();
|
||||
if(response.error) {
|
||||
}else{
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
}
|
||||
});
|
||||
|
||||
$("#uredjajEditContainer").remove();
|
||||
mRow.addClass('d-flex').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function loadEditFrom(element) {
|
||||
|
||||
var id = element.data('id');
|
||||
var newEl = $( "<div id='uredjajEditContainer'></div>" );
|
||||
var mRow = element.parent();
|
||||
mRow.after(newEl);
|
||||
|
||||
var formData = [];
|
||||
formData.push({name:'uredjaj_attached_to', value: $("#uAttach").data('id') });
|
||||
formData.push({name:'uredjaj_parent_type', value: $("#uAttach").data('type') });
|
||||
formData.push({name:'uredjaj_id', value: id });
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
$("#uredjajEditContainer").load('/admin/uredjaj/attachEdit', formData, function() {
|
||||
mRow.removeClass('d-flex').addClass('d-none');
|
||||
$(this).find(".uredjaj_cancel").click(function (e) {
|
||||
$("#uredjajEditContainer").remove();
|
||||
mRow.addClass('d-flex').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
$(this).find(".uredjaj_submit").click(function (e) {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
var token = false;
|
||||
for(const [index, el] of formData.entries()) {
|
||||
if(el.name == '_token'){
|
||||
token = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!token){
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
}
|
||||
formData.push({name:'uredjaj_attached_to', value: $("#uAttach").data('id') });
|
||||
formData.push({name:'uredjaj_parent_type', value: $("#uAttach").data('type') });
|
||||
$.ajax({
|
||||
url: '/admin/uredjaj/attachSave',
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
getAttachForm();
|
||||
if(response.error) {
|
||||
}else{
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
}
|
||||
});
|
||||
|
||||
$("#uredjajEditContainer").remove();
|
||||
mRow.addClass('d-flex').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
21
resources/views/Admin/uredjaj/attach_link.blade.php
Executable file
21
resources/views/Admin/uredjaj/attach_link.blade.php
Executable file
@ -0,0 +1,21 @@
|
||||
<div class="col-12 bg-uredjaj-edit">
|
||||
<div class="form-row">
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="uredjaj_id">Serijski broj</label>
|
||||
<select name="uredjaj_id" id="uredjaj_id" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($uredjaji as $key => $uredjaj)
|
||||
<option value="{{ $uredjaj->id }}">{{ $uredjaj->serijski_broj }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12 mb-2">
|
||||
<input type="hidden" name="uredjaj_attached_to" value="{{$uredjaj_attached_to ?? '0'}}">
|
||||
<button type="button" class="btn-sm btn-secondary uredjaj_cancel">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-secondary uredjaj_submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
27
resources/views/Admin/uredjaj/attach_list.blade.php
Executable file
27
resources/views/Admin/uredjaj/attach_list.blade.php
Executable file
@ -0,0 +1,27 @@
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-header">
|
||||
Prikljuceni merni uredjaj(i)
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if($urDef['single_uredjaj']===false || ($urDef['single_uredjaj'] && count($uredjaji)==0))
|
||||
<div class="d-flex justify-content-between align-items-center pb-1">
|
||||
<a href="#" data-id="0" class="ml-auto pr-2 hideOnEdit addUredjaj"><i class="fa fa-plus-square" aria-hidden="true"></i></a>
|
||||
<a href="#" data-id="0" class="hideOnEdit linkUredjaj"><i class="fa fa-link" aria-hidden="true"></i></a>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row editcontainer">
|
||||
</div>
|
||||
<ul id="list" class="list-group">
|
||||
@foreach($uredjaji as $key => $uredjaj)
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<b>{{ $uredjaj->serijski_broj }}</b> - {{ $tipovi[$uredjaj->tip_uredjaja] }}
|
||||
<a href="#" data-id="{{$uredjaj->id}}" class="hideOnEdit editUredjaj ml-auto pr-2"><i class="fa fa-edit" aria-hidden="true"></i></a>
|
||||
<a href="#" data-id="{{$uredjaj->id}}" class="hideOnEdit deleteUredjaj pr-2"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||
<a href="#" data-id="{{$uredjaj->id}}" class="hideOnEdit unLinkUredjaj"><i class="fa fa-unlink" aria-hidden="true"></i></a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
35
resources/views/Admin/uredjaj/edit.blade.php
Executable file
35
resources/views/Admin/uredjaj/edit.blade.php
Executable file
@ -0,0 +1,35 @@
|
||||
<form data-id="{{$data->id ?? '0'}}" id="form2">
|
||||
<div class="form-row">
|
||||
<div class="col">
|
||||
<div class="form-row">
|
||||
@foreach ($obj as $key => $field)
|
||||
<div class="col-md-6">
|
||||
<div class="position-relative form-group">
|
||||
<label for="{{ $key }}">{{ $field['label'] }}</label>
|
||||
@switch($field['type'])
|
||||
@case('text')
|
||||
<input name="{{ $key }}" id="{{ $key }}" type="text" class="form-control" value="{{$data->$key ?? ''}}">
|
||||
@break
|
||||
@case('select')
|
||||
<select name="{{ $key }}" id="{{ $key }}" class="form-control ui search fluid normal dropdown">
|
||||
@foreach ($field['fetch']($data) as $key1 => $value1)
|
||||
<option value="{{ $key1 }}" @if($data->$key == $key1) selected @endif>{{ $value1 }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@break
|
||||
@endswitch
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="col-12">
|
||||
<input type="hidden" name="id" value="{{$data->id ?? '0'}}">
|
||||
@csrf
|
||||
<button type="button" class="btn-sm btn-danger cancel" rel="{{ $data->id ?? "" }}">Cancel</button>
|
||||
<button type="button" class="btn-sm btn-primary submit float-right">Snimi</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
30
resources/views/Admin/uredjaj/edit_attach.blade.php
Executable file
30
resources/views/Admin/uredjaj/edit_attach.blade.php
Executable file
@ -0,0 +1,30 @@
|
||||
@isset($data->uredjajDef)
|
||||
<style type="text/css">
|
||||
.card-header {
|
||||
background-color: rgba(0,0,0,.03);
|
||||
}
|
||||
.card-header, .card-body {
|
||||
padding: 0.6rem;
|
||||
}
|
||||
</style>
|
||||
<div id="uAttach" class="row">
|
||||
<div class="col-12">
|
||||
<div class="card bg-light">
|
||||
<div class="card-header">
|
||||
Prikljuceni merni uredjaj(i)
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ $data->uredjajDef['allowed_types'][0] }}
|
||||
<ul id="list" class="list-group mt-4 pb-4">
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<a href="#"><i class="fa fa-plus-square pr-3" aria-hidden="true"></i></a>Pay Car Insurance
|
||||
<a href="#" class="ml-auto pr-3"><i class="fa fa-edit" aria-hidden="true"></i></a>
|
||||
<a href="#"><i class="fa fa-trash" aria-hidden="true"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
{{ dd($data->uredjajDef) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endisset
|
||||
449
resources/views/Admin/uredjaj/index.blade.php
Executable file
449
resources/views/Admin/uredjaj/index.blade.php
Executable file
@ -0,0 +1,449 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', $general['title'])
|
||||
|
||||
@section('content_header')
|
||||
<h1>{{ $general['title'] }}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$ajaxUrl = "/admin/".$general['cont_name'];
|
||||
@endphp
|
||||
<div id="editor_container">
|
||||
<div id="" class="card col-12">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
{{ $general['sub_title'] }}
|
||||
</div>
|
||||
<div class="card-tools">
|
||||
<a class="add_new" href="javascript:void(0)" title="Add')"><i class="fa fa-plus-square"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body justify-content-center align-items-center">
|
||||
<div id="toolbar" class="">
|
||||
<div class="">
|
||||
<select name="f_mesta" id="f_mesta" class="filter ui search fluid normal dropdown f_mesta">
|
||||
<option value="">Sva mesta</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="">
|
||||
<div class="col-12 pb-2">
|
||||
<div class="col-12 d-none pt-2 pb-2" id="editor_div">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="hiddenAtLoad d-none table-striped"
|
||||
id="listing_table"
|
||||
data-toggle="table"
|
||||
data-toolbar="#toolbar"
|
||||
data-pagination="true"
|
||||
data-side-pagination="server"
|
||||
data-page-size="25"
|
||||
data-search="true"
|
||||
data-url="{{ $ajaxUrl }}/browse?{{ $qstring }}"
|
||||
data-unique-id="id"
|
||||
data-sort-name="id"
|
||||
data-sort-order="desc"
|
||||
data-id-field="id"
|
||||
data-show-footer="false"
|
||||
data-row-style="rowStyle"
|
||||
data-row-attributes="rowAttributes"
|
||||
data-detail-view="true"
|
||||
data-detail-view-icon="true"
|
||||
data-detail-formatter="detailFormatter"
|
||||
data-query-params="queryParams"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="id" data-visible="false">
|
||||
#
|
||||
</th>
|
||||
@foreach ($fields as $key => $field)
|
||||
<th data-field="@if(array_key_exists('display_field', $field)){{ $field['display_field'] }}@else{{ $key }}@endif" data-sortable="true">
|
||||
{{ $field['label'] }}
|
||||
</th>
|
||||
@endforeach
|
||||
<th data-align="center"
|
||||
data-formatter="optFormatter"
|
||||
data-events="optEvents"
|
||||
data-sortable="false">
|
||||
Akcije
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner_overlay" id="spinner_overlay">
|
||||
<div class="w-100 d-flex justify-content-center align-items-center">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
<style type="text/css">
|
||||
.zoom {
|
||||
transition:all .2s;
|
||||
position: inherit;
|
||||
text-align: center;
|
||||
}
|
||||
.zoom .card-body {
|
||||
}
|
||||
.zoom .card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
float: none;
|
||||
}
|
||||
.zoom:hover {
|
||||
z-index:25;
|
||||
transform:scale(1.15);
|
||||
box-shadow:0 .46875rem 4.1875rem rgba(4,9,20,.05),0 .9375rem 2.40625rem rgba(4,9,20,.05),0 .25rem 1.3125rem rgba(4,9,20,.06),0 .125rem 1.1875rem rgba(4,9,20,.06);
|
||||
cursor:pointer;
|
||||
background:#fff
|
||||
}
|
||||
|
||||
td.editor, #editor_div {
|
||||
background-color: #F5DEB3 !important;
|
||||
}
|
||||
.spinner {
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
-webkit-animation: rotation .6s infinite linear;
|
||||
-moz-animation: rotation .6s infinite linear;
|
||||
-o-animation: rotation .6s infinite linear;
|
||||
animation: rotation .6s infinite linear;
|
||||
border-left: 6px solid rgba(0, 174, 239, .15);
|
||||
border-right: 6px solid rgba(0, 174, 239, .15);
|
||||
border-bottom: 6px solid rgba(0, 174, 239, .15);
|
||||
border-top: 6px solid rgba(0, 174, 239, .8);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
@-webkit-keyframes rotation {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes rotation {
|
||||
from {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes rotation {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner_overlay {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ui.label {
|
||||
background-color: #EEE;
|
||||
color: #666 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
.ui.label .icon:before {
|
||||
content: '\f00d';
|
||||
font-family: fontAwesome;
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.ui.label .icon:hover:before {
|
||||
color: #F00;
|
||||
}
|
||||
.ui.selection.dropdown {
|
||||
min-height: inherit;
|
||||
}
|
||||
.bootstrap-table .fixed-table-container .fixed-table-body {
|
||||
overflow: visible !important;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
var blocked = [];
|
||||
var ajaxUrl = '{{ $ajaxUrl }}';
|
||||
var queryStr = '{{ $qstring ?? '' }}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
$(".f_mesta").dropdown({
|
||||
apiSettings: {
|
||||
url: '/admin/api/mesta',
|
||||
cache: false,
|
||||
},
|
||||
filterRemoteData: true,
|
||||
});
|
||||
$('.filter').dropdown('setting', 'onChange', function(){
|
||||
$("#listing_table").bootstrapTable('refresh',{pageNumber: 1});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#listing_table').on('load-success.bs.table post-body.bs.table', function(data, status, jqXHR) {
|
||||
$('th:first-child, td:first-child', $(this)).addClass('d-none');;
|
||||
});
|
||||
|
||||
function queryParams(params) {
|
||||
$.each($(".filter"), function( key, value ){
|
||||
params[$(value).attr('name')] = $(value).dropdown('get value');
|
||||
});
|
||||
// params['status'] = $("input[name='status']:checked").val();
|
||||
return params;
|
||||
}
|
||||
|
||||
function breadFormatter(value, row) {
|
||||
var t = [];
|
||||
switch(value) {
|
||||
case 'grupa':
|
||||
break;
|
||||
case 'objekat':
|
||||
t.push('<a class="objekat" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na objekat"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
case 'prostorija':
|
||||
t.push('<a class="prostorija" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na prostoriju"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
case 'radijator':
|
||||
t.push('<a class="radijator" href="javascript:void(0)" data-id="'+row.id+'" title="Idi na radijator"><i class="fa fa-arrow-alt-circle-left"></i></a>');
|
||||
break;
|
||||
}
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function optFormatter(value, row) {
|
||||
var t = [];
|
||||
t.push('<a class="delete mr-2" href="javascript:void(0)" data-id="'+row.id+'" title="Delete"><i class="fa fa-trash"></i></a>');
|
||||
t.push('<a class="edit mr-2" href="javascript:void(0)" title="Edit"><i class="fa fa-edit"></i></a>');
|
||||
t.push('<a class="related mr-2" href="javascript:void(0)" title="Relacije"><i class="fa fa-filter"></i></a>');
|
||||
return t.join('');
|
||||
}
|
||||
|
||||
function detailFormatter(index, row, element) {
|
||||
element.addClass('editor').load(ajaxUrl + '/'+row.id+'/edit?'+queryStr, function() {
|
||||
openEditor(element, index);
|
||||
});
|
||||
}
|
||||
|
||||
$(".add_new").click(function () {
|
||||
$("#editor_div").addClass('editor').removeClass('d-none').load(ajaxUrl + '/create?'+queryStr, function() {
|
||||
$('#listing_table').removeClass('table-hover');
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
|
||||
openEditor($("#editor_div"), -1);
|
||||
});
|
||||
})
|
||||
|
||||
function rowAttributes(row, index) {
|
||||
return {
|
||||
'data-id': row.id
|
||||
}
|
||||
}
|
||||
|
||||
function openEditor(element, index){
|
||||
$('.ui.dropdown').dropdown();
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
element.find(':input').first().focus();
|
||||
element.keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('.submit').click();
|
||||
return false;
|
||||
}
|
||||
if(e.which == 27) {
|
||||
$('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#grad_id").change(function() {
|
||||
$("#ulica_id").load('/admin/objekat/ulicepogradu/'+$("#grad_id").val());
|
||||
});
|
||||
$('.submit', element).click(function() {
|
||||
var form = $(this).closest("form");
|
||||
var formData = form.serializeArray();
|
||||
|
||||
form.removeClass('was-validated');
|
||||
$.each($('.is-invalid'), function(key, value){
|
||||
$(value).removeClass('is-invalid').parent().find('.invalid-feedback').remove();
|
||||
});
|
||||
|
||||
blockElement($(this).parents('.card'));
|
||||
var url = ajaxUrl ;
|
||||
if(index == -1) {
|
||||
var method = "POST";
|
||||
}else {
|
||||
var method = "PUT";
|
||||
url = url + '/'+form.data('id');
|
||||
}
|
||||
$.ajax({
|
||||
url: url+'?'+queryStr,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: method,
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
if(response.data){
|
||||
if($("#listing_table").bootstrapTable('getRowByUniqueId', response.data.id)){
|
||||
$("#listing_table").bootstrapTable('updateByUniqueId', {id: response.data.id, row: response.data});
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('refresh');
|
||||
}
|
||||
}else
|
||||
$("#listing_table").bootstrapTable('refresh');
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
if (response.status == 422) {
|
||||
$.each(response.responseJSON.errors, function (i, error) {
|
||||
var el = $(document).find('#'+i);
|
||||
el.addClass('is-invalid');
|
||||
el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
});
|
||||
}else{
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$('.cancel', element).click(function() {
|
||||
if(index == -1)
|
||||
$("#editor_div").removeClass('editor').addClass('d-none').html('');
|
||||
else
|
||||
$('#listing_table').addClass('table-hover').bootstrapTable('collapseRow', index);
|
||||
$('#listing_table i.noedit').addClass('d-none');
|
||||
$('#listing_table a.edit').removeClass('d-none');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
window.breadEvents = {
|
||||
'click .objekat': function (e, value, row, index) {
|
||||
window.location.href = '/admin/objekat?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
'click .prostorija': function (e, value, row, index) {
|
||||
window.location.href = '/admin/prostorija?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
'click .radijator': function (e, value, row, index) {
|
||||
window.location.href = '/admin/radijator?' + $(e.currentTarget).closest('tr').data('qs');
|
||||
},
|
||||
}
|
||||
|
||||
window.optEvents = {
|
||||
'click .related': function (e, value, row, index) {
|
||||
window.location.href = '/admin/radijator?getrelAlok=' + row.id;
|
||||
},
|
||||
'click .edit': function (e, value, row, index) {
|
||||
$('#listing_table').removeClass('table-hover').bootstrapTable('expandRow', index);
|
||||
$('#listing_table a.edit').addClass('d-none');
|
||||
$('#listing_table i.noedit').removeClass('d-none');
|
||||
},
|
||||
'click .delete': function (e, value, row, index) {
|
||||
var popOpts={
|
||||
placement: 'left',
|
||||
title: 'Delete Item',
|
||||
html: true,
|
||||
trigger: 'focus',
|
||||
content: '<a class="btn btn-xs btn-danger decline" href="javascript:void(0)"><i class="fas fa-times"></i> Ne</a> <a class="btn btn-xs btn-success pull-right popover-confirm" href="javascript:void(0)"><i class="fas fa-check"></i> Da</a>',
|
||||
}
|
||||
$(e.currentTarget).popover(popOpts).popover('show').on('shown.bs.popover', function(e) {
|
||||
var pdelete=$(this);
|
||||
var pop=$(".popover");
|
||||
var popButtons=pop.find('a').click(function(){
|
||||
if($(this).is('.popover-confirm')){
|
||||
var formData = [];
|
||||
formData.push({name:'_token', value: '{{ csrf_token() }}'});
|
||||
blockElement($(this).parents('.card'));
|
||||
$.ajax({
|
||||
url: ajaxUrl + '/' + row.id,
|
||||
dataType: "json",
|
||||
data: formData,
|
||||
type: "DELETE",
|
||||
cache: false,
|
||||
success: function (response) {
|
||||
unBlockAll();
|
||||
if(response.error)
|
||||
{
|
||||
$('#ModalLabel').html(response.error.title);
|
||||
$('#ModalBody').html(response.error.msg);
|
||||
$("#AlertModal").modal('show');
|
||||
}else{
|
||||
$("#listing_table").bootstrapTable('removeByUniqueId', response.data.id);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
unBlockAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
pdelete.popover('dispose');
|
||||
});
|
||||
});
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function blockElement(element)
|
||||
{
|
||||
var bl = $("#spinner_overlay").clone();
|
||||
bl.removeAttr('id').appendTo(element);
|
||||
bl.css("display","flex");
|
||||
blocked.push(bl);
|
||||
}
|
||||
|
||||
function unBlockAll()
|
||||
{
|
||||
for (var i = blocked.length - 1; i >= 0; i--) {
|
||||
blocked[i].remove();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@stop
|
||||
175
resources/views/Admin/xml/index.blade.php
Executable file
175
resources/views/Admin/xml/index.blade.php
Executable file
@ -0,0 +1,175 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', 'Izbor formata')
|
||||
|
||||
@section('content_header')
|
||||
<h1>Izbor tipa XML izlaza</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<div class="row mb-3">
|
||||
<div class="col-lg-12 col-xl-6">
|
||||
<div class="h4">Izabrana grupa:</div>
|
||||
<table class="hiddenAtLoad d-none table table-striped table-bordered"
|
||||
id="dep_table"
|
||||
data-toggle="table"
|
||||
data-pagination="false"
|
||||
data-search="false"
|
||||
data-show-columns="false"
|
||||
data-show-footer="false"
|
||||
data-show-header="false"
|
||||
data-detail-formatter="def_detailFormatter"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr data-id="1">
|
||||
<td>{{ $izabrana->ime_grupe}}, {{ $izabrana->j_grad }} ({{ $izabrana->j_tip }})</td>
|
||||
</tr>
|
||||
<tr data-id="1">
|
||||
<td>
|
||||
Ser. br. glavnog kalorimetra: <b>{{ $glavniKalorimetar }}</b><br>
|
||||
Broj individualnih kalorimetara: <b>{{ $kalorimetri }}</b><br>
|
||||
Broj alokatora: <b>{{ $alokatori }}</b><br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-xl-6">
|
||||
<div class="card">
|
||||
<div class="card-header font-weight-bolder text-primary">
|
||||
Izbor tipa
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form id="kaloriRead" class="form-inline" method="post" action="/admin/xml/create/kaloriRead">
|
||||
<div class="col-8">
|
||||
<div class="col-12">
|
||||
<div class="form-group mb-2 float-right">
|
||||
<label class="mr-2" for="uredjaji_po_falju" class="float-left">Broj uređaja po fajlu</label>
|
||||
<input type="text" class="form-control float-right" id="uredjaji_po_falju" name="uredjaji_po_falju" aria-describedby="emailHelp" placeholder="neograničen">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="grupaID" value="{{ $grupaID }}">
|
||||
@csrf
|
||||
</div>
|
||||
<div class="col-4 float-right">
|
||||
<button id="readKalorimetar" type="submit" @if($kalorimetri==0) disabled @endif class="float-right btn btn-success">Kalorimetar Read</button>
|
||||
@csrf
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form id="alokatorRead" class="form-inline" method="post" action="/admin/xml/create/alokatorRead">
|
||||
<div class="col-8">
|
||||
<div class="col-12">
|
||||
<div class="form-group mb-2 float-right">
|
||||
<label class="mr-2" for="uredjaji_po_falju" class="float-left">Broj uređaja po fajlu</label>
|
||||
<input type="text" class="form-control float-right" id="uredjaji_po_falju" name="uredjaji_po_falju" aria-describedby="emailHelp" placeholder="neograničen">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="grupaID" value="{{ $grupaID }}">
|
||||
@csrf
|
||||
</div>
|
||||
<div class="col-4 float-right">
|
||||
<button id="readAlokator" type="submit" type="button" @if($alokatori==0) disabled @endif class="float-right btn btn-success">Alokator Read</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="col-4 float-right">
|
||||
<button id="writeAlokator" type="button" @if($alokatori==0) disabled @endif class="float-right btn btn-success">Alokator parametrizacija</button>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<form id="alokatorParam" class="form-inline" method="post" action="/admin/xml/create/alokatorParam">
|
||||
<div class="col-12">
|
||||
<div class="form-group mb-2 float-right">
|
||||
<label class="mr-2" for="setDay" class="float-left">Set day</label>
|
||||
<input type="text" class="form-control float-right" id="setDay" aria-describedby="emailHelp" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group mb-2 float-right">
|
||||
<label class="mr-2" for="adjustClock">Adjust clock</label>
|
||||
<input type="text" class="form-control" id="adjustClock" aria-describedby="emailHelp" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group mb-2 float-right">
|
||||
<label class="mr-2" for="summerStart">Summer start</label>
|
||||
<input type="text" class="form-control" id="summerStart" aria-describedby="emailHelp" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group mb-2 float-right">
|
||||
<label class="mr-2" for="winterStart">Winter start</label>
|
||||
<input type="text" class="form-control" id="winterStart" aria-describedby="emailHelp" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group mb-2 float-right">
|
||||
<label class="mr-2" for="summerPeriod">Summer period</label>
|
||||
<input type="text" class="form-control" id="summerPeriod" aria-describedby="emailHelp" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="grupaID" value="{{ $grupaID }}">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/icheck-bootstrap/3.0.1/icheck-bootstrap.min.css">
|
||||
@stop
|
||||
@section('js')
|
||||
<script src="/js/jquery.blockUI.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".hiddenAtLoad").removeClass('d-none');
|
||||
});
|
||||
|
||||
// $('#form2').on( 'click', "#readKalorimetar", function (e) {
|
||||
// var formData = $('#form2').serializeArray();
|
||||
// $.ajax({
|
||||
// url: '/admin/xml/create/kaloriRead',
|
||||
// dataType: "json",
|
||||
// type: "POST",
|
||||
// data: formData,
|
||||
// cache: false,
|
||||
// success: function (response) {
|
||||
// window.location.href = '/admin/lostpassword/success';
|
||||
// },
|
||||
// error: function (response) {
|
||||
// if (response.status == 419) {
|
||||
// location.reload(true);
|
||||
// }
|
||||
// if (response.status == 422) {
|
||||
// $.each(response.responseJSON.errors, function (i, error) {
|
||||
// var el = $(document).find('#'+i);
|
||||
// el.addClass('is-invalid');
|
||||
// el.after($('<div class="invalid-feedback">'+error[0]+'</div>'));
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// });
|
||||
|
||||
</script>
|
||||
@stop
|
||||
61
resources/views/vendor/adminlte/auth/auth-page.blade.php
vendored
Executable file
61
resources/views/vendor/adminlte/auth/auth-page.blade.php
vendored
Executable file
@ -0,0 +1,61 @@
|
||||
@extends('adminlte::master')
|
||||
|
||||
@php( $dashboard_url = View::getSection('dashboard_url') ?? config('adminlte.dashboard_url', 'home') )
|
||||
|
||||
@if (config('adminlte.use_route_url', false))
|
||||
@php( $dashboard_url = $dashboard_url ? route($dashboard_url) : '' )
|
||||
@else
|
||||
@php( $dashboard_url = $dashboard_url ? url($dashboard_url) : '' )
|
||||
@endif
|
||||
|
||||
@section('adminlte_css')
|
||||
@stack('css')
|
||||
@yield('css')
|
||||
@stop
|
||||
|
||||
@section('classes_body'){{ ($auth_type ?? 'login') . '-page' }}@stop
|
||||
|
||||
@section('body')
|
||||
<div class="{{ $auth_type ?? 'login' }}-box">
|
||||
|
||||
{{-- Logo --}}
|
||||
<div class="{{ $auth_type ?? 'login' }}-logo">
|
||||
<a href="{{ $dashboard_url }}">
|
||||
<img src="{{ asset(config('adminlte.logo_img')) }}" height="50">
|
||||
{!! config('adminlte.logo', '<b>Admin</b>LTE') !!}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{-- Card Box --}}
|
||||
<div class="card {{ config('adminlte.classes_auth_card', 'card-outline card-primary') }}">
|
||||
|
||||
{{-- Card Header --}}
|
||||
@hasSection('auth_header')
|
||||
<div class="card-header {{ config('adminlte.classes_auth_header', '') }}">
|
||||
<h3 class="card-title float-none text-center">
|
||||
@yield('auth_header')
|
||||
</h3>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{-- Card Body --}}
|
||||
<div class="card-body {{ $auth_type ?? 'login' }}-card-body {{ config('adminlte.classes_auth_body', '') }}">
|
||||
@yield('auth_body')
|
||||
</div>
|
||||
|
||||
{{-- Card Footer --}}
|
||||
@hasSection('auth_footer')
|
||||
<div class="card-footer {{ config('adminlte.classes_auth_footer', '') }}">
|
||||
@yield('auth_footer')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('adminlte_js')
|
||||
@stack('js')
|
||||
@yield('js')
|
||||
@stop
|
||||
96
resources/views/vendor/adminlte/auth/login.blade.php
vendored
Executable file
96
resources/views/vendor/adminlte/auth/login.blade.php
vendored
Executable file
@ -0,0 +1,96 @@
|
||||
@extends('adminlte::auth.auth-page', ['auth_type' => 'login'])
|
||||
|
||||
@section('adminlte_css_pre')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/icheck-bootstrap/icheck-bootstrap.min.css') }}">
|
||||
@stop
|
||||
|
||||
@php( $login_url = View::getSection('login_url') ?? config('adminlte.login_url', 'login') )
|
||||
@php( $register_url = View::getSection('register_url') ?? config('adminlte.register_url', 'register') )
|
||||
@php( $password_reset_url = View::getSection('password_reset_url') ?? config('adminlte.password_reset_url', 'password/reset') )
|
||||
|
||||
@if (config('adminlte.use_route_url', false))
|
||||
@php( $login_url = $login_url ? route($login_url) : '' )
|
||||
@php( $register_url = $register_url ? route($register_url) : '' )
|
||||
@php( $password_reset_url = $password_reset_url ? route($password_reset_url) : '' )
|
||||
@else
|
||||
@php( $login_url = $login_url ? url($login_url) : '' )
|
||||
@php( $register_url = $register_url ? url($register_url) : '' )
|
||||
@php( $password_reset_url = $password_reset_url ? url($password_reset_url) : '' )
|
||||
@endif
|
||||
|
||||
@section('auth_header', __('adminlte::adminlte.login_message'))
|
||||
|
||||
@section('auth_body')
|
||||
<form action="{{ $login_url }}" method="post">
|
||||
{{ csrf_field() }}
|
||||
|
||||
{{-- Email field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="email" name="email" class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}"
|
||||
value="{{ old('email') }}" placeholder="{{ __('adminlte::adminlte.email') }}" autofocus>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-envelope {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('email'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Password field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" name="password" class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}"
|
||||
placeholder="{{ __('adminlte::adminlte.password') }}">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('password'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Login field --}}
|
||||
<div class="row">
|
||||
<div class="col-7">
|
||||
<div class="icheck-primary">
|
||||
<input type="checkbox" name="remember" id="remember">
|
||||
<label for="remember">{{ __('adminlte::adminlte.remember_me') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<button type=submit class="btn btn-block {{ config('adminlte.classes_auth_btn', 'btn-flat btn-primary') }}">
|
||||
<span class="fas fa-sign-in-alt"></span>
|
||||
{{ __('adminlte::adminlte.sign_in') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@stop
|
||||
|
||||
@section('auth_footer')
|
||||
{{-- Password reset link --}}
|
||||
@if($password_reset_url)
|
||||
<p class="my-0">
|
||||
<a href="{{ $password_reset_url }}">
|
||||
{{ __('adminlte::adminlte.i_forgot_my_password') }}
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
|
||||
{{-- Register link --}}
|
||||
@if($register_url)
|
||||
<p class="my-0">
|
||||
<a href="{{ $register_url }}">
|
||||
{{ __('adminlte::adminlte.register_a_new_membership') }}
|
||||
</a>
|
||||
</p>
|
||||
@endif
|
||||
@stop
|
||||
87
resources/views/vendor/adminlte/auth/passwords/confirm.blade.php
vendored
Executable file
87
resources/views/vendor/adminlte/auth/passwords/confirm.blade.php
vendored
Executable file
@ -0,0 +1,87 @@
|
||||
@extends('adminlte::master')
|
||||
|
||||
@section('adminlte_css')
|
||||
@yield('css')
|
||||
@stop
|
||||
|
||||
@section('classes_body', 'lockscreen')
|
||||
|
||||
@php( $password_reset_url = View::getSection('password_reset_url') ?? config('adminlte.password_reset_url', 'password/reset') )
|
||||
@php( $dashboard_url = View::getSection('dashboard_url') ?? config('adminlte.dashboard_url', 'home') )
|
||||
|
||||
@if (config('adminlte.use_route_url', false))
|
||||
@php( $password_reset_url = $password_reset_url ? route($password_reset_url) : '' )
|
||||
@php( $dashboard_url = $dashboard_url ? route($dashboard_url) : '' )
|
||||
@else
|
||||
@php( $password_reset_url = $password_reset_url ? url($password_reset_url) : '' )
|
||||
@php( $dashboard_url = $dashboard_url ? url($dashboard_url) : '' )
|
||||
@endif
|
||||
|
||||
@section('body')
|
||||
<div class="lockscreen-wrapper">
|
||||
|
||||
{{-- Lockscreen logo --}}
|
||||
<div class="lockscreen-logo">
|
||||
<a href="{{ $dashboard_url }}">
|
||||
<img src="{{ asset(config('adminlte.logo_img')) }}" height="50">
|
||||
{!! config('adminlte.logo', '<b>Admin</b>LTE') !!}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{-- Lockscreen user name --}}
|
||||
<div class="lockscreen-name">
|
||||
{{ isset(Auth::user()->name) ? Auth::user()->name : Auth::user()->email }}
|
||||
</div>
|
||||
|
||||
{{-- Lockscreen item --}}
|
||||
<div class="lockscreen-item">
|
||||
@if(config('adminlte.usermenu_image'))
|
||||
<div class="lockscreen-image">
|
||||
<img src="{{ Auth::user()->adminlte_image() }}" alt="{{ Auth::user()->name }}">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('password.confirm') }}"
|
||||
class="lockscreen-credentials @if(!config('adminlte.usermenu_image'))ml-0 @endif">
|
||||
@csrf
|
||||
|
||||
<div class="input-group">
|
||||
<input id="password" type="password" name="password" autocomplete="current-password"
|
||||
class="form-control @error('password') is-invalid @enderror"
|
||||
placeholder="{{ __('adminlte::adminlte.password') }}" required autofocus>
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn">
|
||||
<i class="fas fa-arrow-right text-muted"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{-- Password error alert --}}
|
||||
@error('password')
|
||||
<div class="lockscreen-subitem text-center" role="alert">
|
||||
<b class="text-danger">{{ $message }}</b>
|
||||
</div>
|
||||
@enderror
|
||||
|
||||
{{-- Help block --}}
|
||||
<div class="help-block text-center">
|
||||
{{ __('adminlte::adminlte.confirm_password_message') }}
|
||||
</div>
|
||||
|
||||
{{-- Additional links --}}
|
||||
<div class="text-center">
|
||||
<a href="{{ $password_reset_url }}">
|
||||
{{ __('adminlte::adminlte.i_forgot_my_password') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('adminlte_js')
|
||||
@stack('js')
|
||||
@yield('js')
|
||||
@stop
|
||||
48
resources/views/vendor/adminlte/auth/passwords/email.blade.php
vendored
Executable file
48
resources/views/vendor/adminlte/auth/passwords/email.blade.php
vendored
Executable file
@ -0,0 +1,48 @@
|
||||
@extends('adminlte::auth.auth-page', ['auth_type' => 'login'])
|
||||
|
||||
@php( $password_email_url = View::getSection('password_email_url') ?? config('adminlte.password_email_url', 'password/email') )
|
||||
|
||||
@if (config('adminlte.use_route_url', false))
|
||||
@php( $password_email_url = $password_email_url ? route($password_email_url) : '' )
|
||||
@else
|
||||
@php( $password_email_url = $password_email_url ? url($password_email_url) : '' )
|
||||
@endif
|
||||
|
||||
@section('auth_header', __('adminlte::adminlte.password_reset_message'))
|
||||
|
||||
@section('auth_body')
|
||||
|
||||
@if(session('status'))
|
||||
<div class="alert alert-success">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form action="{{ $password_email_url }}" method="post">
|
||||
{{ csrf_field() }}
|
||||
|
||||
{{-- Email field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="email" name="email" class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}"
|
||||
value="{{ old('email') }}" placeholder="{{ __('adminlte::adminlte.email') }}" autofocus>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-envelope {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('email'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Send reset link button --}}
|
||||
<button type="submit" class="btn btn-block {{ config('adminlte.classes_auth_btn', 'btn-flat btn-primary') }}">
|
||||
<span class="fas fa-share-square"></span>
|
||||
{{ __('adminlte::adminlte.send_password_reset_link') }}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
@stop
|
||||
77
resources/views/vendor/adminlte/auth/passwords/reset.blade.php
vendored
Executable file
77
resources/views/vendor/adminlte/auth/passwords/reset.blade.php
vendored
Executable file
@ -0,0 +1,77 @@
|
||||
@extends('adminlte::auth.auth-page', ['auth_type' => 'login'])
|
||||
|
||||
@php( $password_reset_url = View::getSection('password_reset_url') ?? config('adminlte.password_reset_url', 'password/reset') )
|
||||
|
||||
@if (config('adminlte.use_route_url', false))
|
||||
@php( $password_reset_url = $password_reset_url ? route($password_reset_url) : '' )
|
||||
@else
|
||||
@php( $password_reset_url = $password_reset_url ? url($password_reset_url) : '' )
|
||||
@endif
|
||||
|
||||
@section('auth_header', __('adminlte::adminlte.password_reset_message'))
|
||||
|
||||
@section('auth_body')
|
||||
<form action="{{ $password_reset_url }}" method="post">
|
||||
{{ csrf_field() }}
|
||||
|
||||
{{-- Token field --}}
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
{{-- Email field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="email" name="email" class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}"
|
||||
value="{{ old('email') }}" placeholder="{{ __('adminlte::adminlte.email') }}" autofocus>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-envelope {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('email'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Password field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" name="password"
|
||||
class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}"
|
||||
placeholder="{{ __('adminlte::adminlte.password') }}">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('password'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Password confirmation field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" name="password_confirmation"
|
||||
class="form-control {{ $errors->has('password_confirmation') ? 'is-invalid' : '' }}"
|
||||
placeholder="{{ trans('adminlte::adminlte.retype_password') }}">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('password_confirmation'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Confirm password reset button --}}
|
||||
<button type="submit" class="btn btn-block {{ config('adminlte.classes_auth_btn', 'btn-flat btn-primary') }}">
|
||||
<span class="fas fa-sync-alt"></span>
|
||||
{{ __('adminlte::adminlte.reset_password') }}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
@stop
|
||||
101
resources/views/vendor/adminlte/auth/register.blade.php
vendored
Executable file
101
resources/views/vendor/adminlte/auth/register.blade.php
vendored
Executable file
@ -0,0 +1,101 @@
|
||||
@extends('adminlte::auth.auth-page', ['auth_type' => 'register'])
|
||||
|
||||
@php( $login_url = View::getSection('login_url') ?? config('adminlte.login_url', 'login') )
|
||||
@php( $register_url = View::getSection('register_url') ?? config('adminlte.register_url', 'register') )
|
||||
|
||||
@if (config('adminlte.use_route_url', false))
|
||||
@php( $login_url = $login_url ? route($login_url) : '' )
|
||||
@php( $register_url = $register_url ? route($register_url) : '' )
|
||||
@else
|
||||
@php( $login_url = $login_url ? url($login_url) : '' )
|
||||
@php( $register_url = $register_url ? url($register_url) : '' )
|
||||
@endif
|
||||
|
||||
@section('auth_header', __('adminlte::adminlte.register_message'))
|
||||
|
||||
@section('auth_body')
|
||||
<form action="{{ $register_url }}" method="post">
|
||||
{{ csrf_field() }}
|
||||
|
||||
{{-- Name field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" name="name" class="form-control {{ $errors->has('name') ? 'is-invalid' : '' }}"
|
||||
value="{{ old('name') }}" placeholder="{{ __('adminlte::adminlte.full_name') }}" autofocus>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-user {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('name'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('name') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Email field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="email" name="email" class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}"
|
||||
value="{{ old('email') }}" placeholder="{{ __('adminlte::adminlte.email') }}">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-envelope {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('email'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Password field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" name="password"
|
||||
class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}"
|
||||
placeholder="{{ __('adminlte::adminlte.password') }}">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('password'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Confirm password field --}}
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" name="password_confirmation"
|
||||
class="form-control {{ $errors->has('password_confirmation') ? 'is-invalid' : '' }}"
|
||||
placeholder="{{ __('adminlte::adminlte.retype_password') }}">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock {{ config('adminlte.classes_auth_icon', '') }}"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if($errors->has('password_confirmation'))
|
||||
<div class="invalid-feedback">
|
||||
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- Register button --}}
|
||||
<button type="submit" class="btn btn-block {{ config('adminlte.classes_auth_btn', 'btn-flat btn-primary') }}">
|
||||
<span class="fas fa-user-plus"></span>
|
||||
{{ __('adminlte::adminlte.register') }}
|
||||
</button>
|
||||
|
||||
</form>
|
||||
@stop
|
||||
|
||||
@section('auth_footer')
|
||||
<p class="my-0">
|
||||
<a href="{{ $login_url }}">
|
||||
{{ __('adminlte::adminlte.i_already_have_a_membership') }}
|
||||
</a>
|
||||
</p>
|
||||
@stop
|
||||
23
resources/views/vendor/adminlte/auth/verify.blade.php
vendored
Executable file
23
resources/views/vendor/adminlte/auth/verify.blade.php
vendored
Executable file
@ -0,0 +1,23 @@
|
||||
@extends('adminlte::auth.auth-page', ['auth_type' => 'login'])
|
||||
|
||||
@section('auth_header', __('adminlte::adminlte.verify_message'))
|
||||
|
||||
@section('auth_body')
|
||||
|
||||
@if(session('resent'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ __('adminlte::adminlte.verify_email_sent') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ __('adminlte::adminlte.verify_check_your_email') }}
|
||||
{{ __('adminlte::adminlte.verify_if_not_recieved') }},
|
||||
|
||||
<form class="d-inline" method="POST" action="{{ route('verification.resend') }}">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-link p-0 m-0 align-baseline">
|
||||
{{ __('adminlte::adminlte.verify_request_another') }}
|
||||
</button>.
|
||||
</form>
|
||||
|
||||
@stop
|
||||
4
resources/views/vendor/adminlte/components/form/button.blade.php
vendored
Normal file
4
resources/views/vendor/adminlte/components/form/button.blade.php
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
<button type="{{ $type }}" {{ $attributes->merge(['class' => "btn btn-{$theme}"]) }}>
|
||||
@isset($icon) <i class="{{ $icon }}"></i> @endisset
|
||||
@isset($label) {{ $label }} @endisset
|
||||
</button>
|
||||
98
resources/views/vendor/adminlte/components/form/date-range.blade.php
vendored
Normal file
98
resources/views/vendor/adminlte/components/form/date-range.blade.php
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Date Range Input --}}
|
||||
<input id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
|
||||
@overwrite
|
||||
|
||||
{{-- Add plugin initialization and configuration code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
let usrCfg = _AdminLTE_DateRange.parseCfg( @json($config) );
|
||||
|
||||
// Check if default set of ranges should be enabled.
|
||||
|
||||
@isset($enableDefaultRanges)
|
||||
usrCfg.ranges = usrCfg.ranges || _AdminLTE_DateRange.defaultRanges;
|
||||
let range = usrCfg.ranges['{{ $enableDefaultRanges }}'];
|
||||
|
||||
if (Array.isArray(range)) {
|
||||
usrCfg.startDate = range[0];
|
||||
usrCfg.endDate = range[1];
|
||||
}
|
||||
@endisset
|
||||
|
||||
$('#{{ $id }}').daterangepicker(usrCfg);
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
{{-- Register Javascript utility class for this component --}}
|
||||
|
||||
@once
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
class _AdminLTE_DateRange {
|
||||
|
||||
/**
|
||||
* A default set of ranges options.
|
||||
*/
|
||||
static defaultRanges = {
|
||||
'Today': [
|
||||
moment(),
|
||||
moment()
|
||||
],
|
||||
'Yesterday': [
|
||||
moment().subtract(1, 'days'),
|
||||
moment().subtract(1, 'days')
|
||||
],
|
||||
'Last 7 Days': [
|
||||
moment().subtract(6, 'days'),
|
||||
moment()
|
||||
],
|
||||
'Last 30 Days': [
|
||||
moment().subtract(29, 'days'),
|
||||
moment()
|
||||
],
|
||||
'This Month': [
|
||||
moment().startOf('month'),
|
||||
moment().endOf('month')
|
||||
],
|
||||
'Last Month': [
|
||||
moment().subtract(1, 'month').startOf('month'),
|
||||
moment().subtract(1, 'month').endOf('month')
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the php plugin configuration and eval the javascript code.
|
||||
*
|
||||
* cfg: A json with the php side configuration.
|
||||
*/
|
||||
static parseCfg(cfg)
|
||||
{
|
||||
for (const prop in cfg) {
|
||||
let v = cfg[prop];
|
||||
|
||||
if (typeof v === 'string' && v.startsWith('js:')) {
|
||||
cfg[prop] = eval(v.slice(3));
|
||||
} else if (typeof v === 'object') {
|
||||
cfg[prop] = _AdminLTE_DateRange.parseCfg(v);
|
||||
}
|
||||
}
|
||||
|
||||
return cfg;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
40
resources/views/vendor/adminlte/components/form/input-color.blade.php
vendored
Normal file
40
resources/views/vendor/adminlte/components/form/input-color.blade.php
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Input Color --}}
|
||||
<input id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
|
||||
@overwrite
|
||||
|
||||
{{-- Add plugin initialization and configuration code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
|
||||
// Create a method to set the addon color.
|
||||
|
||||
let setAddonColor = function()
|
||||
{
|
||||
let color = $('#{{ $id }}').data('colorpicker').getValue();
|
||||
|
||||
$('#{{ $id }}').closest('.input-group')
|
||||
.find('.input-group-text > i')
|
||||
.css('color', color);
|
||||
}
|
||||
|
||||
// Init the plugin and register the change event listener.
|
||||
|
||||
$('#{{ $id }}').colorpicker( @json($config) )
|
||||
.on('change', setAddonColor);
|
||||
|
||||
// Set the initial color for the addon.
|
||||
|
||||
setAddonColor();
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
55
resources/views/vendor/adminlte/components/form/input-date.blade.php
vendored
Normal file
55
resources/views/vendor/adminlte/components/form/input-date.blade.php
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Input Date --}}
|
||||
<input id="{{ $id }}" name="{{ $name }}" data-target="#{{ $id }}" data-toggle="datetimepicker"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
|
||||
@overwrite
|
||||
|
||||
{{-- Add plugin initialization and configuration code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
let usrCfg = _AdminLTE_InputDate.parseCfg( @json($config) );
|
||||
$('#{{ $id }}').datetimepicker(usrCfg);
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
{{-- Register Javascript utility class for this component --}}
|
||||
|
||||
@once
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
class _AdminLTE_InputDate {
|
||||
|
||||
/**
|
||||
* Parse the php plugin configuration and eval the javascript code.
|
||||
*
|
||||
* cfg: A json with the php side configuration.
|
||||
*/
|
||||
static parseCfg(cfg)
|
||||
{
|
||||
for (const prop in cfg) {
|
||||
let v = cfg[prop];
|
||||
|
||||
if (typeof v === 'string' && v.startsWith('js:')) {
|
||||
cfg[prop] = eval(v.slice(3));
|
||||
} else if (typeof v === 'object') {
|
||||
cfg[prop] = _AdminLTE_InputDate.parseCfg(v);
|
||||
}
|
||||
}
|
||||
|
||||
return cfg;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
70
resources/views/vendor/adminlte/components/form/input-file.blade.php
vendored
Normal file
70
resources/views/vendor/adminlte/components/form/input-file.blade.php
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
<div class="custom-file">
|
||||
|
||||
{{-- Custom file input --}}
|
||||
<input type="file" id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
|
||||
{{-- Custom file label --}}
|
||||
<label class="custom-file-label text-truncate" for="{{ $id }}"
|
||||
@isset($legend) data-browse="{{ $legend }}" @endisset>
|
||||
{{ $placeholder }}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
@overwrite
|
||||
|
||||
{{-- Add the plugin initialization code --}}
|
||||
|
||||
@once
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {bsCustomFileInput.init();})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
|
||||
{{-- Setup the height and font size of the plugin when using sm/lg sizes --}}
|
||||
{{-- NOTE: this may change with newer plugin or Bootstrap versions --}}
|
||||
|
||||
@once
|
||||
@push('css')
|
||||
<style type="text/css">
|
||||
|
||||
{{-- SM size setup --}}
|
||||
.input-group-sm .custom-file-label:after {
|
||||
height: 1.8125rem;
|
||||
line-height: 1.25;
|
||||
}
|
||||
.input-group-sm .custom-file-label {
|
||||
height: calc(1.8125rem + 2px);
|
||||
line-height: 1.25;
|
||||
}
|
||||
.input-group-sm .custom-file {
|
||||
height: calc(1.8125rem + 2px);
|
||||
font-size: .875rem;
|
||||
}
|
||||
|
||||
{{-- LG size setup --}}
|
||||
.input-group-lg .custom-file-label:after {
|
||||
height: 2.875rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.input-group-lg .custom-file-label {
|
||||
height: calc(2.875rem + 2px);
|
||||
line-height: 1.6;
|
||||
}
|
||||
.input-group-lg .custom-file {
|
||||
height: calc(2.875rem + 2px);
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
@endonce
|
||||
58
resources/views/vendor/adminlte/components/form/input-group-component.blade.php
vendored
Normal file
58
resources/views/vendor/adminlte/components/form/input-group-component.blade.php
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
<div class="{{ $makeFormGroupClass() }}">
|
||||
|
||||
{{-- Input label --}}
|
||||
@isset($label)
|
||||
<label for="{{ $id }}" @isset($labelClass) class="{{ $labelClass }}" @endisset>
|
||||
{{ $label }}
|
||||
</label>
|
||||
@endisset
|
||||
|
||||
{{-- Input group --}}
|
||||
<div class="{{ $makeInputGroupClass() }}">
|
||||
|
||||
{{-- Input prepend slot --}}
|
||||
@isset($prependSlot)
|
||||
<div class="input-group-prepend">{{ $prependSlot }}</div>
|
||||
@endisset
|
||||
|
||||
{{-- Input group item --}}
|
||||
@yield('input_group_item')
|
||||
|
||||
{{-- Input append slot --}}
|
||||
@isset($appendSlot)
|
||||
<div class="input-group-append">{{ $appendSlot }}</div>
|
||||
@endisset
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Error feedback --}}
|
||||
@if($isInvalid() && ! isset($disableFeedback))
|
||||
<span class="invalid-feedback d-block" role="alert">
|
||||
<strong>{{ $errors->first($errorKey) }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Extra style customization for invalid input groups --}}
|
||||
|
||||
@once
|
||||
@push('css')
|
||||
<style type="text/css">
|
||||
|
||||
{{-- Highlight invalid input groups with a box-shadow --}}
|
||||
|
||||
.adminlte-invalid-igroup {
|
||||
box-shadow: 0 .25rem 0.5rem rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
{{-- Setup a red border on elements inside prepend/append add-ons --}}
|
||||
|
||||
.adminlte-invalid-igroup > .input-group-prepend > *,
|
||||
.adminlte-invalid-igroup > .input-group-append > * {
|
||||
border-color: #dc3545 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
@endonce
|
||||
122
resources/views/vendor/adminlte/components/form/input-slider.blade.php
vendored
Normal file
122
resources/views/vendor/adminlte/components/form/input-slider.blade.php
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Input Slider --}}
|
||||
<input id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
|
||||
@overwrite
|
||||
|
||||
{{-- Add plugin initialization and configuration code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
let usrCfg = @json($config);
|
||||
|
||||
// Check for disabled attribute (alternative to data-slider-enable).
|
||||
|
||||
@isset($attributes['disabled'])
|
||||
usrCfg.enabled = false;
|
||||
@endisset
|
||||
|
||||
// Check for min, max and step attributes (alternatives to
|
||||
// data-slider-min, data-slider-max and data-slider-step).
|
||||
|
||||
@isset($attributes['min'])
|
||||
usrCfg.min = {{ $attributes['min'] }};
|
||||
@endisset
|
||||
|
||||
@isset($attributes['max'])
|
||||
usrCfg.max = {{ $attributes['max'] }};
|
||||
@endisset
|
||||
|
||||
@isset($attributes['step'])
|
||||
usrCfg.step = {{ $attributes['step'] }};
|
||||
@endisset
|
||||
|
||||
// Check for value attribute (alternative to data-slider-value).
|
||||
|
||||
@isset($attributes['value'])
|
||||
usrCfg.value = {{ $attributes['value'] }};
|
||||
@endisset
|
||||
|
||||
// Initialize the plugin.
|
||||
|
||||
let slider = $('#{{ $id }}').bootstrapSlider(usrCfg);
|
||||
|
||||
// Fix height conflict when orientation is vertical.
|
||||
|
||||
let or = slider.bootstrapSlider('getAttribute', 'orientation');
|
||||
|
||||
if (or == 'vertical') {
|
||||
$('#' + usrCfg.id).css('height', '210px');
|
||||
slider.bootstrapSlider('relayout');
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
{{-- Add CSS workarounds for the plugin --}}
|
||||
{{-- NOTE: this may change with newer plugin versions --}}
|
||||
|
||||
@push('css')
|
||||
<style type="text/css">
|
||||
|
||||
{{-- Setup plugin color --}}
|
||||
|
||||
@isset($color)
|
||||
|
||||
#{{ $config['id'] }} .slider-handle {
|
||||
background: {{ $color }};
|
||||
}
|
||||
#{{ $config['id'] }} .slider-selection {
|
||||
background: {{ $color }};
|
||||
opacity: 0.5;
|
||||
}
|
||||
#{{ $config['id'] }} .slider-tick.in-selection {
|
||||
background: {{ $color }};
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
@endisset
|
||||
|
||||
{{-- Set flex property when using addons slots --}}
|
||||
|
||||
@if(isset($appendSlot) || isset($prependSlot))
|
||||
|
||||
#{{ $config['id'] }} {
|
||||
flex: 1 1 0;
|
||||
align-self: center;
|
||||
@isset($appendSlot) margin-right: 5px; @endisset
|
||||
@isset($prependSlot) margin-left: 5px; @endisset
|
||||
}
|
||||
|
||||
@endif
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
{{-- Setup custom invalid style --}}
|
||||
{{-- NOTE: this may change with newer plugin versions --}}
|
||||
|
||||
@once
|
||||
@push('css')
|
||||
<style type="text/css">
|
||||
|
||||
.adminlte-invalid-islgroup .slider-track,
|
||||
.adminlte-invalid-islgroup > .input-group-prepend > *,
|
||||
.adminlte-invalid-islgroup > .input-group-append > * {
|
||||
box-shadow: 0 .25rem 0.5rem rgba(255,0,0,.25);
|
||||
}
|
||||
|
||||
.adminlte-invalid-islgroup .slider-vertical {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
@endonce
|
||||
60
resources/views/vendor/adminlte/components/form/input-switch.blade.php
vendored
Normal file
60
resources/views/vendor/adminlte/components/form/input-switch.blade.php
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Input Switch --}}
|
||||
<input type="checkbox" id="{{ $id }}" name="{{ $name }}" value="true"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
|
||||
@overwrite
|
||||
|
||||
{{-- Add plugin initialization and configuration code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
$('#{{ $id }}').bootstrapSwitch( @json($config) );
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
{{-- Setup the height/font of the plugin when using sm/lg sizes --}}
|
||||
{{-- NOTE: this may change with newer plugin versions --}}
|
||||
|
||||
@once
|
||||
@push('css')
|
||||
<style type="text/css">
|
||||
|
||||
{{-- MD (default) size setup --}}
|
||||
.input-group .bootstrap-switch-handle-on,
|
||||
.input-group .bootstrap-switch-handle-off {
|
||||
height: 2.25rem !important;
|
||||
}
|
||||
|
||||
{{-- LG size setup --}}
|
||||
.input-group-lg .bootstrap-switch-handle-on,
|
||||
.input-group-lg .bootstrap-switch-handle-off {
|
||||
height: 2.875rem !important;
|
||||
font-size: 1.25rem !important;
|
||||
}
|
||||
|
||||
{{-- SM size setup --}}
|
||||
.input-group-sm .bootstrap-switch-handle-on,
|
||||
.input-group-sm .bootstrap-switch-handle-off {
|
||||
height: 1.8125rem !important;
|
||||
font-size: .875rem !important;
|
||||
}
|
||||
|
||||
{{-- Custom invalid style setup --}}
|
||||
|
||||
.adminlte-invalid-iswgroup > .bootstrap-switch-wrapper,
|
||||
.adminlte-invalid-iswgroup > .input-group-prepend > *,
|
||||
.adminlte-invalid-iswgroup > .input-group-append > * {
|
||||
box-shadow: 0 .25rem 0.5rem rgba(255,0,0,.25);
|
||||
}
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
@endonce
|
||||
9
resources/views/vendor/adminlte/components/form/input.blade.php
vendored
Normal file
9
resources/views/vendor/adminlte/components/form/input.blade.php
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Input --}}
|
||||
<input id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
|
||||
@overwrite
|
||||
23
resources/views/vendor/adminlte/components/form/select-bs.blade.php
vendored
Normal file
23
resources/views/vendor/adminlte/components/form/select-bs.blade.php
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Select --}}
|
||||
<select id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
{{ $slot }}
|
||||
</select>
|
||||
|
||||
@overwrite
|
||||
|
||||
{{-- Add plugin initialization and configuration code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
$('#{{ $id }}').selectpicker( @json($config) );
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
11
resources/views/vendor/adminlte/components/form/select.blade.php
vendored
Normal file
11
resources/views/vendor/adminlte/components/form/select.blade.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Select --}}
|
||||
<select id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
{{ $slot }}
|
||||
</select>
|
||||
|
||||
@overwrite
|
||||
68
resources/views/vendor/adminlte/components/form/select2.blade.php
vendored
Normal file
68
resources/views/vendor/adminlte/components/form/select2.blade.php
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Select --}}
|
||||
<select id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}>
|
||||
{{ $slot }}
|
||||
</select>
|
||||
|
||||
@overwrite
|
||||
|
||||
{{-- Add plugin initialization and configuration code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
$('#{{ $id }}').select2( @json($config) );
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
{{-- Setup the height and font size of the plugin when using sm/lg sizes --}}
|
||||
{{-- NOTE: this may change with newer plugin versions --}}
|
||||
|
||||
@once
|
||||
@push('css')
|
||||
<style type="text/css">
|
||||
|
||||
{{-- SM size setup --}}
|
||||
.input-group-sm .select2-selection--single {
|
||||
height: calc(1.8125rem + 2px) !important
|
||||
}
|
||||
.input-group-sm .select2-selection--single .select2-selection__rendered,
|
||||
.input-group-sm .select2-selection--single .select2-selection__placeholder {
|
||||
font-size: .875rem !important;
|
||||
line-height: 2.125;
|
||||
}
|
||||
.input-group-sm .select2-selection--multiple {
|
||||
min-height: calc(1.8125rem + 2px) !important
|
||||
}
|
||||
.input-group-sm .select2-selection--multiple .select2-selection__rendered {
|
||||
font-size: .875rem !important;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
{{-- LG size setup --}}
|
||||
.input-group-lg .select2-selection--single {
|
||||
height: calc(2.875rem + 2px) !important;
|
||||
}
|
||||
.input-group-lg .select2-selection--single .select2-selection__rendered,
|
||||
.input-group-lg .select2-selection--single .select2-selection__placeholder {
|
||||
font-size: 1.25rem !important;
|
||||
line-height: 2.25;
|
||||
}
|
||||
.input-group-lg .select2-selection--multiple {
|
||||
min-height: calc(2.875rem + 2px) !important
|
||||
}
|
||||
.input-group-lg .select2-selection--multiple .select2-selection__rendered {
|
||||
font-size: 1.25rem !important;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
@endonce
|
||||
68
resources/views/vendor/adminlte/components/form/text-editor.blade.php
vendored
Normal file
68
resources/views/vendor/adminlte/components/form/text-editor.blade.php
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Summernote Textarea --}}
|
||||
<textarea id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}
|
||||
>{{ $slot }}</textarea>
|
||||
|
||||
@overwrite
|
||||
|
||||
{{-- Add plugin initialization and configuration code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
let usrCfg = @json($config);
|
||||
|
||||
// Check for placeholder attribute.
|
||||
|
||||
@isset($attributes['placeholder'])
|
||||
usrCfg['placeholder'] = "{{ $attributes['placeholder'] }}";
|
||||
@endisset
|
||||
|
||||
// Initialize the plugin.
|
||||
|
||||
$('#{{ $id }}').summernote(usrCfg);
|
||||
|
||||
// Check for disabled attribute.
|
||||
|
||||
@isset($attributes['disabled'])
|
||||
$('#{{ $id }}').summernote('disable');
|
||||
@endisset
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
{{-- Setup the font size of the plugin when using sm/lg sizes --}}
|
||||
{{-- NOTE: this may change with newer plugin versions --}}
|
||||
|
||||
@once
|
||||
@push('css')
|
||||
<style type="text/css">
|
||||
|
||||
{{-- SM size setup --}}
|
||||
.input-group-sm .note-editor {
|
||||
font-size: .875rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
{{-- LG size setup --}}
|
||||
.input-group-lg .note-editor {
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
{{-- Setup custom invalid style --}}
|
||||
|
||||
.adminlte-invalid-itegroup .note-editor {
|
||||
box-shadow: 0 .25rem 0.5rem rgba(0,0,0,.25);
|
||||
border-color: #dc3545 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
@endonce
|
||||
10
resources/views/vendor/adminlte/components/form/textarea.blade.php
vendored
Normal file
10
resources/views/vendor/adminlte/components/form/textarea.blade.php
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
@extends('adminlte::components.form.input-group-component')
|
||||
|
||||
@section('input_group_item')
|
||||
|
||||
{{-- Textarea --}}
|
||||
<textarea id="{{ $id }}" name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => $makeItemClass()]) }}
|
||||
>{{ $slot }}</textarea>
|
||||
|
||||
@overwrite
|
||||
154
resources/views/vendor/adminlte/components/layout/navbar-notification.blade.php
vendored
Normal file
154
resources/views/vendor/adminlte/components/layout/navbar-notification.blade.php
vendored
Normal file
@ -0,0 +1,154 @@
|
||||
{{-- Navbar notification --}}
|
||||
|
||||
<li class="{{ $makeListItemClass() }}" id="{{ $id }}">
|
||||
|
||||
{{-- Link --}}
|
||||
<a @if($enableDropdownMode) href="" @endif {{ $attributes->merge($makeAnchorDefaultAttrs()) }}>
|
||||
|
||||
{{-- Icon --}}
|
||||
<i class="{{ $makeIconClass() }}"></i>
|
||||
|
||||
{{-- Badge --}}
|
||||
<span class="{{ $makeBadgeClass() }}">{{ $badgeLabel }}</span>
|
||||
|
||||
</a>
|
||||
|
||||
{{-- Dropdown Menu --}}
|
||||
@if($enableDropdownMode)
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
|
||||
|
||||
{{-- Custom dropdown content provided by external source --}}
|
||||
<div class="adminlte-dropdown-content"></div>
|
||||
|
||||
{{-- Dropdown divider --}}
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
{{-- Dropdown footer with link --}}
|
||||
<a href="{{ $attributes->get('href') }}" class="dropdown-item dropdown-footer">
|
||||
@isset($dropdownFooterLabel)
|
||||
{{ $dropdownFooterLabel }}
|
||||
@else
|
||||
<i class="fas fa-lg fa-search-plus"></i>
|
||||
@endisset
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
</li>
|
||||
|
||||
{{-- If required, update the notification periodically --}}
|
||||
|
||||
@if (! is_null($makeUpdateUrl()) && $makeUpdatePeriod() > 0)
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
|
||||
// Method to get new notification data from the configured url.
|
||||
|
||||
let updateNotification = (nLink) =>
|
||||
{
|
||||
// Make an ajax call to the configured url. The response should be
|
||||
// an object with the new data. The supported properties are:
|
||||
// 'label', 'label_color', 'icon_color' and 'dropdown'.
|
||||
|
||||
$.ajax({
|
||||
url: "{{ $makeUpdateUrl() }}"
|
||||
})
|
||||
.done((data) => {
|
||||
nLink.update(data);
|
||||
})
|
||||
.fail(function(jqXHR, textStatus, errorThrown) {
|
||||
console.log(jqXHR, textStatus, errorThrown);
|
||||
});
|
||||
};
|
||||
|
||||
// First load of the notification data.
|
||||
|
||||
let nLink = new _AdminLTE_NavbarNotification("{{ $id }}");
|
||||
updateNotification(nLink);
|
||||
|
||||
// Periodically update the notification.
|
||||
|
||||
setInterval(updateNotification, {{ $makeUpdatePeriod() }}, nLink);
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@endif
|
||||
|
||||
{{-- Register Javascript utility class for this component --}}
|
||||
|
||||
@once
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
class _AdminLTE_NavbarNotification {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* target: The id of the target notification link.
|
||||
*/
|
||||
constructor(target)
|
||||
{
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the notification link.
|
||||
*
|
||||
* data: An object with the new data.
|
||||
*/
|
||||
update(data)
|
||||
{
|
||||
// Check if target and data exists.
|
||||
|
||||
let t = $(`li#${this.target}`);
|
||||
|
||||
if (t.length <= 0 || ! data) {
|
||||
return;
|
||||
}
|
||||
|
||||
let badge = t.find(".navbar-badge");
|
||||
let icon = t.find(".nav-link > i");
|
||||
let dropdown = t.find(".adminlte-dropdown-content");
|
||||
|
||||
// Update the badge label.
|
||||
|
||||
if (data.label && data.label > 0) {
|
||||
badge.html(data.label);
|
||||
} else {
|
||||
badge.empty();
|
||||
}
|
||||
|
||||
// Update the badge color.
|
||||
|
||||
if (data.label_color) {
|
||||
badge.removeClass((idx, classes) => {
|
||||
return (classes.match(/(^|\s)badge-\S+/g) || []).join(' ');
|
||||
}).addClass(`badge-${data.label_color} badge-pill`);
|
||||
}
|
||||
|
||||
// Update the icon color.
|
||||
|
||||
if (data.icon_color) {
|
||||
icon.removeClass((idx, classes) => {
|
||||
return (classes.match(/(^|\s)text-\S+/g) || []).join(' ');
|
||||
}).addClass(`text-${data.icon_color}`);
|
||||
}
|
||||
|
||||
// Update the dropdown content.
|
||||
|
||||
if (data.dropdown && dropdown.length > 0) {
|
||||
dropdown.html(data.dropdown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
60
resources/views/vendor/adminlte/components/tool/datatable.blade.php
vendored
Normal file
60
resources/views/vendor/adminlte/components/tool/datatable.blade.php
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
{{-- Table --}}
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<table id="{{ $id }}" style="width:100%" {{ $attributes->merge(['class' => $makeTableClass()]) }}>
|
||||
|
||||
{{-- Table head --}}
|
||||
<thead @isset($headTheme) class="thead-{{ $headTheme }}" @endisset>
|
||||
<tr>
|
||||
@foreach($heads as $th)
|
||||
<th @isset($th['width']) style="width:{{ $th['width'] }}%" @endisset
|
||||
@isset($th['no-export']) dt-no-export @endisset>
|
||||
{{ is_array($th) ? ($th['label'] ?? '') : $th }}
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{{-- Table body --}}
|
||||
<tbody>{{ $slot }}</tbody>
|
||||
|
||||
{{-- Table footer --}}
|
||||
@isset($withFooter)
|
||||
<tfoot @isset($footerTheme) class="thead-{{ $footerTheme }}" @endisset>
|
||||
<tr>
|
||||
@foreach($heads as $th)
|
||||
<th>{{ is_array($th) ? ($th['label'] ?? '') : $th }}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endisset
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Add plugin initialization and configuration code --}}
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
$(() => {
|
||||
$('#{{ $id }}').DataTable( @json($config) );
|
||||
})
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
{{-- Add CSS styling --}}
|
||||
|
||||
@isset($beautify)
|
||||
@push('css')
|
||||
<style type="text/css">
|
||||
#{{ $id }} tr td, #{{ $id }} tr th {
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
@endisset
|
||||
36
resources/views/vendor/adminlte/components/tool/modal.blade.php
vendored
Normal file
36
resources/views/vendor/adminlte/components/tool/modal.blade.php
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<div {{ $attributes->merge(['class' => $makeModalClass(), 'id' => $id]) }}
|
||||
@isset($staticBackdrop) data-backdrop="static" data-keyboard="false" @endisset>
|
||||
|
||||
<div class="{{ $makeModalDialogClass() }}">
|
||||
<div class="modal-content">
|
||||
|
||||
{{--Modal header --}}
|
||||
<div class="{{ $makeModalHeaderClass() }}">
|
||||
<h4 class="modal-title">
|
||||
@isset($icon)<i class="{{ $icon }} mr-2"></i>@endisset
|
||||
@isset($title){{ $title }}@endisset
|
||||
</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{{-- Modal body --}}
|
||||
@if(! $slot->isEmpty())
|
||||
<div class="modal-body">{{ $slot }}</div>
|
||||
@endif
|
||||
|
||||
{{-- Modal footer --}}
|
||||
<div class="modal-footer">
|
||||
@isset($footerSlot)
|
||||
{{ $footerSlot }}
|
||||
@else
|
||||
<x-adminlte-button class="{{ $makeCloseButtonClass }}"
|
||||
data-dismiss="modal" label="Close"/>
|
||||
@endisset
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
26
resources/views/vendor/adminlte/components/widget/alert.blade.php
vendored
Normal file
26
resources/views/vendor/adminlte/components/widget/alert.blade.php
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
<div {{ $attributes->merge(['class' => $makeAlertClass()]) }}>
|
||||
|
||||
{{-- Dismiss button --}}
|
||||
@isset($dismissable)
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">
|
||||
×
|
||||
</button>
|
||||
@endisset
|
||||
|
||||
{{-- Alert header --}}
|
||||
@if(! empty($title) || ! empty($icon))
|
||||
<h5>
|
||||
@if(! empty($icon))
|
||||
<i class="icon {{ $icon }}"></i>
|
||||
@endif
|
||||
|
||||
@if(! empty($title))
|
||||
{{ $title }}
|
||||
@endif
|
||||
</h5>
|
||||
@endif
|
||||
|
||||
{{-- Alert content --}}
|
||||
{{ $slot }}
|
||||
|
||||
</div>
|
||||
14
resources/views/vendor/adminlte/components/widget/callout.blade.php
vendored
Normal file
14
resources/views/vendor/adminlte/components/widget/callout.blade.php
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<div {{ $attributes->merge(['class' => $makeCalloutClass()]) }}>
|
||||
|
||||
{{-- Callout title --}}
|
||||
@if(! empty($title) || ! empty($icon))
|
||||
<h5 @isset($titleClass) class="{{ $titleClass }}" @endisset>
|
||||
@isset($icon) <i class="{{ $icon }} mr-2"></i> @endisset
|
||||
@isset($title) {{ $title }} @endisset
|
||||
</h5>
|
||||
@endif
|
||||
|
||||
{{-- Callout content --}}
|
||||
{{ $slot }}
|
||||
|
||||
</div>
|
||||
43
resources/views/vendor/adminlte/components/widget/card.blade.php
vendored
Normal file
43
resources/views/vendor/adminlte/components/widget/card.blade.php
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<div {{ $attributes->merge(['class' => $makeCardClass()]) }}>
|
||||
|
||||
{{-- Card header --}}
|
||||
<div class="{{ $makeCardHeaderClass() }}">
|
||||
|
||||
{{-- Title --}}
|
||||
<h3 class="{{ $makeCardTitleClass() }}">
|
||||
@isset($icon)<i class="{{ $icon }} mr-2"></i>@endisset
|
||||
@isset($title){{ $title }}@endisset
|
||||
</h3>
|
||||
|
||||
{{-- Tools --}}
|
||||
<div class="card-tools">
|
||||
@isset($maximizable)
|
||||
<x-adminlte-button theme="tool" data-card-widget="maximize" icon="fas fa-lg fa-expand"/>
|
||||
@endisset
|
||||
|
||||
@if($collapsible === 'collapsed')
|
||||
<x-adminlte-button theme="tool" data-card-widget="collapse" icon="fas fa-lg fa-plus"/>
|
||||
@elseif (isset($collapsible))
|
||||
<x-adminlte-button theme="tool" data-card-widget="collapse" icon="fas fa-lg fa-minus"/>
|
||||
@endif
|
||||
|
||||
@isset($removable)
|
||||
<x-adminlte-button theme="tool" data-card-widget="remove" icon="fas fa-lg fa-times"/>
|
||||
@endisset
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Card body --}}
|
||||
@if(! $slot->isEmpty())
|
||||
<div class="card-body">{{ $slot }}</div>
|
||||
@endif
|
||||
|
||||
{{-- Card overlay --}}
|
||||
@if($disabled)
|
||||
<div class="overlay">
|
||||
<i class="fas fa-2x fa-ban text-gray"></i>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
102
resources/views/vendor/adminlte/components/widget/info-box.blade.php
vendored
Normal file
102
resources/views/vendor/adminlte/components/widget/info-box.blade.php
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
<div {{ $attributes->merge(['class' => $makeBoxClass()]) }}>
|
||||
|
||||
{{-- Box icon --}}
|
||||
@isset($icon)
|
||||
<span class="{{ $makeIconClass() }}">
|
||||
<i class="{{ $icon }}"></i>
|
||||
</span>
|
||||
@endisset
|
||||
|
||||
{{-- Box content --}}
|
||||
<div class="info-box-content">
|
||||
|
||||
{{-- Box title --}}
|
||||
@isset($title)
|
||||
<span class="info-box-text">{{ $title }}</span>
|
||||
@endisset
|
||||
|
||||
{{-- Box short text --}}
|
||||
@isset($text)
|
||||
<span class="info-box-number">{{ $text }}</span>
|
||||
@endisset
|
||||
|
||||
{{-- Box progress bar --}}
|
||||
@if(isset($progress) && isset($attributes['id']))
|
||||
<x-adminlte-progress value="{{ $progress }}" theme="{{ $progressTheme }}"
|
||||
id="progress-{{ $attributes['id'] }}"/>
|
||||
@elseif(isset($progress))
|
||||
<x-adminlte-progress value="{{ $progress }}" theme="{{ $progressTheme }}"/>
|
||||
@endif
|
||||
|
||||
{{-- Box long description --}}
|
||||
@isset($description)
|
||||
<span class="progress-description">{{ $description }}</span>
|
||||
@endisset
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{-- Register Javascript utility class for this component --}}
|
||||
|
||||
@once
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
class _AdminLTE_InfoBox {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* target: The id of the target info box.
|
||||
*/
|
||||
constructor(target)
|
||||
{
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the info box.
|
||||
*
|
||||
* data: An object with the new data.
|
||||
*/
|
||||
update(data)
|
||||
{
|
||||
// Check if target and data exists.
|
||||
|
||||
let t = $(`#${this.target}`);
|
||||
|
||||
if (t.length <= 0 || ! data) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update available data.
|
||||
|
||||
if (data.title) {
|
||||
t.find('.info-box-text').html(data.title);
|
||||
}
|
||||
|
||||
if (data.text) {
|
||||
t.find('.info-box-number').html(data.text);
|
||||
}
|
||||
|
||||
if (data.icon) {
|
||||
t.find('.info-box-icon i').attr('class', data.icon);
|
||||
}
|
||||
|
||||
if (data.description) {
|
||||
t.find('.progress-description').html(data.description);
|
||||
}
|
||||
|
||||
// Update progress bar.
|
||||
|
||||
if (data.progress) {
|
||||
let pBar = new _AdminLTE_Progress(`progress-${this.target}`);
|
||||
pBar.setValue(data.progress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
32
resources/views/vendor/adminlte/components/widget/profile-col-item.blade.php
vendored
Normal file
32
resources/views/vendor/adminlte/components/widget/profile-col-item.blade.php
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<div {{ $attributes->merge(['class' => "col-{$size}"]) }}>
|
||||
|
||||
<div class="description-block">
|
||||
|
||||
{{-- Icon --}}
|
||||
@isset($icon)
|
||||
<i class="{{ $icon }}"></i>
|
||||
@endisset
|
||||
|
||||
{{-- Header --}}
|
||||
@isset($title)
|
||||
<h5 class="description-header">
|
||||
@if(! empty($url))
|
||||
<a href="{{ $url }}">{{ $title }}</a>
|
||||
@else
|
||||
{{ $title }}
|
||||
@endif
|
||||
</h5>
|
||||
@endisset
|
||||
|
||||
{{-- Text --}}
|
||||
@isset($text)
|
||||
<p class="description-text">
|
||||
<span class="{{ $makeTextWrapperClass() }}">
|
||||
{{ $text }}
|
||||
</span>
|
||||
</p>
|
||||
@endisset
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user