Commit e500d06a authored by ZeMKI's avatar ZeMKI

Layout optimization + bugfix

* optimized interview layout with tailwind
* email registration bugfix
* optimized package.json
* javascript optimization
parent f4fb3bfd
......@@ -93,4 +93,92 @@ V
X
(resources/views/layouts/footer.blade.php,7/a/7aca1ab0495aeaddb9e00c05a972f06c6ffaa618
7
.php_cs,e/4/e4a2b85c3025fbd0d06aca90525574bd273d5780
\ No newline at end of file
.php_cs,e/4/e4a2b85c3025fbd0d06aca90525574bd273d5780
Z
*resources/views/auth/layouts/app.blade.php,2/8/2800665b7e7839c7da5ad6b3c56e3616fd9d39dd
>
app/Action.php,6/1/618a8fde58f45d1425f95c446bffdf0f985cc287
?
app/Sorting.php,7/a/7aa3ac0c2a8cff52c97cc81324f00218efeb8180
=
app/Study.php,a/d/addf0e1e407d334b7c293c13e8524c0b456c5989
<
app/User.php,5/1/5158cc6821d0344345606af2834807beae093242
?
app/Profile.php,8/8/881a2ae98b5b990a7e824c02d80f28e66095f748
F
app/PermissionUser.php,1/3/1308cf61311729023b2bf05204aaea64a8486f8f
u
Edatabase/migrations/2018_10_04_145119_create_users_profiles_table.php,5/7/57d0171e7b9b084d48df66981425564497081858
K
config/laratrust_seeder.php,5/e/5e7e09534fcbc675ffabfa23b25594c77a530ed2
p
@database/migrations/2018_06_18_083851_laratrust_setup_tables.php,d/8/d89ebbaa1a9e38b5b47fa1ece075d136dd0cfa28
L
app/Policies/StudyPolicy.php,2/b/2bc8468bea10528e77dd1625c941d2440ac3ad9c
N
app/Policies/SortingPolicy.php,4/9/497db594ec75e3982c01d76b2d3ce182c3a597e9
P
app/Policies/InterviewPolicy.php,c/7/c735fbd333ecbea47644d309c8733d371531bc5a
X
(app/Http/Controllers/StudyController.php,b/d/bd3d6a69fe1aa6ca8e64bf2dbdc39d9684ad3f28
G
resources/sass/app.scss,6/9/696b15fe36d84dad397f5ce5f7e3dcc57e97154b
N
resources/sass/_variables.scss,0/3/03558bd6a32167ec4feca77dd1eac7140125d428
Q
!resources/sass/_bulma_custom.scss,9/b/9bd4be1504c12da80079ab2b40e20205af4a3d7f
J
resources/sass/_bulma.scss,d/6/d69857389fd352c5cfbb859dcde32d810892e4aa
<
package.json,7/0/7030d0b2f71b999ff89a343de08c414af32fc93a
W
'resources/views/admin/sidebar.blade.php,e/d/eda51a1dd60614035b5a7e9277bb3aec550a0630
N
resources/views/home.blade.php,a/2/a2a516abb04bf3dd73ba4b569b16cc453e3ac2bb
j
:resources/views/vendor/pagination/simple-default.blade.php,8/7/874af1e55464cd2c61e97ba82776f0d1e4ccb2ef
n
>resources/views/vendor/pagination/simple-bootstrap-4.blade.php,8/d/8ddab8167a249e54a58df4921ba74c1a27b9b2f5
g
7resources/views/vendor/pagination/semantic-ui.blade.php,a/8/a8e4890be40341f26c00683af6b429b59ea6e146
c
3resources/views/vendor/pagination/default.blade.php,4/9/49a506f60b4f465c9cd12984d3eab888759fc308
Z
*resources/views/admin/supervisor.blade.php,8/2/82855da82686d21f3fb627c8115570c37c2b0f07
g
7resources/views/vendor/pagination/bootstrap-4.blade.php,3/e/3ed5d3234db6e3bdfabf8847c0f08162cf40622a
]
-resources/views/admin/notifications.blade.php,b/1/b141f663eedb15f77969ec5af505c58076e2fa19
W
'resources/js/components/actiontable.vue,c/f/cf7e230d638ad66e84c9bd05ec9e38fa1f7fa69f
Y
)resources/views/admin/dashboard.blade.php,1/0/1093a76db08f3ddf79c6888fc2ecb5d680599229
\
,resources/views/admin/newdashboard.blade.php,4/5/4585066649afd59ea56333a371398c2426260315
X
(app/Http/Controllers/AdminController.php,6/3/6389281a0549e2d082e549816c38a36d49df26e6
V
&resources/views/admin/layout.blade.php,2/1/21a681a3935f2afd05988ab9db2db514d5414635
n
>database/migrations/2019_09_19_101358_create_actions_table.php,0/e/0e35b91a014b9680f2f4aa0a6424b915b4f250cb
_
/app/Http/Middleware/CheckForMaintenanceMode.php,5/1/517282fc128eb17514eb4e2badfd0a7cadb6db23
_
/app/Http/Middleware/RedirectIfAuthenticated.php,4/0/40d54a318fd625143db9d72eb6edc2d5c100b557
P
app/Http/Middleware/Language.php,b/1/b169b2e83078d19b946c2a15c6ae4ff87b1dbc92
V
&app/Http/Middleware/EncryptCookies.php,d/1/d1c845bb53088a07a617eb722a5d18a081064976
@
app/RoleUser.php,6/8/685190a98abd44103f4ae67a7e6079856e8f195d
J
app/Exceptions/Handler.php,3/b/3badd23b42804fa4016b5b9734a7b35c12ec27e4
S
#app/Http/Middleware/TrimStrings.php,5/8/58688ed0cc90f74fadfaaad4bebd416689c8ea2f
T
$app/Http/Middleware/Authenticate.php,f/7/f7ec0e145842212dd9c0763d10bb0aaa68d3280a
<
app/Role.php,5/0/506466bcf9d9bc1f32f19b46aa47d9cf4fbbe185
C
app/Http/Kernel.php,4/0/405f423e61f666bcedb754ae8befdce9e746176e
\ No newline at end of file
......
......@@ -32,6 +32,8 @@ class SortingController extends Controller
$data['sorting_screenshot'] = $imageData;
$data['sorting_number'] = $sorting;
$data['study'] = $study;
$data['pdf'] = false;
return view('sorting.view', $data);
}
......@@ -43,7 +45,7 @@ class SortingController extends Controller
*/
public function download(Interview $interview, $sorting)
{
$this->authorize('view', [Sorting::class, $interview]);
$this->authorize('view', [Sorting::class, $interview,]);
$study = Study::where('id', '=', $interview->study_id)->first();
$data['interview'] = $interview;
foreach ($interview->files as $file) {
......@@ -54,6 +56,7 @@ class SortingController extends Controller
$data['sorting_screenshot'] = $imageData;
$data['sorting_number'] = $sorting;
$data['study'] = $study;
$data['pdf'] = true;
$pdf = PDF::setPaper('a4', 'landscape')->loadView('sorting.view', $data);
return $pdf->stream();
}
......
......@@ -219,10 +219,6 @@ return [
'Helper' => App\Helpers\Helper::class,
'PDF' => Barryvdh\DomPDF\Facade::class,
],
/*
* Deploy secret for Gitlab automatic Deployment
*/
'deploy_secret' => env('APP_DEPLOY_SECRET'),
]
];
......@@ -56,8 +56,8 @@ return [
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
'address' => env('MAIL_FROM_ADDRESS', 'mesoftware@uni-bremen.de'),
'name' => env('MAIL_FROM_NAME', 'Mesort'),
],
/*
......
......@@ -18,7 +18,7 @@ class CreateActionsTable extends Migration
$table->string('name', 255);
$table->text('description')->nullable();
$table->text('url');
$table->integer('user_id')->nullable()->unsigned()->references('id')->on('token')->onDelete('cascade');
$table->integer('user_id')->nullable()->unsigned()->references('id')->on('users')->onDelete('cascade');
$table->datetime('time');
$table->timestamps();
......
......@@ -826,24 +826,6 @@
"@babel/helper-plugin-utils": "^7.8.3"
}
},
"@babel/polyfill": {
"version": "7.8.7",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.8.7.tgz",
"integrity": "sha512-LeSfP9bNZH2UOZgcGcZ0PIHUt1ZuHub1L3CVmEyqLxCeDLm4C5Gi8jRH8ZX2PNpDhQCo0z6y/+DIs2JlliXW8w==",
"dev": true,
"requires": {
"core-js": "^2.6.5",
"regenerator-runtime": "^0.13.4"
},
"dependencies": {
"core-js": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
"dev": true
}
}
},
"@babel/preset-env": {
"version": "7.9.0",
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.0.tgz",
......@@ -2659,11 +2641,6 @@
}
}
},
"base64-arraybuffer": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz",
"integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ=="
},
"base64-js": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
......@@ -2946,11 +2923,6 @@
"resolved": "https://registry.npmjs.org/bulma/-/bulma-0.7.5.tgz",
"integrity": "sha512-cX98TIn0I6sKba/DhW0FBjtaDpxTelU166pf7ICXpCCuplHWyu6C9LYZmL5PEsnePIeJaiorsTEzzNk3Tsm1hw=="
},
"bulma-extensions": {
"version": "6.2.7",
"resolved": "https://registry.npmjs.org/bulma-extensions/-/bulma-extensions-6.2.7.tgz",
"integrity": "sha512-y3dHsxlCYkuxUg87KKN9H4InM8NCk8tdnrlxLkYak8sd2WQdllg3wP2Nv41lj8X46uPXX2ADP0MO65LlXPHt/Q=="
},
"bytes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
......@@ -3833,14 +3805,6 @@
"timsort": "^0.3.0"
}
},
"css-line-break": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-1.1.1.tgz",
"integrity": "sha512-1feNVaM4Fyzdj4mKPIQNL2n70MmuYzAXZ1aytlROFX1JsOo070OsugwGjj7nl6jnDJWHDM8zRZswkmeYVWZJQA==",
"requires": {
"base64-arraybuffer": "^0.2.0"
}
},
"css-loader": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/css-loader/-/css-loader-1.0.1.tgz",
......@@ -6112,28 +6076,161 @@
}
},
"glob-all": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/glob-all/-/glob-all-3.1.0.tgz",
"integrity": "sha1-iRPd+17hrHgSZWJBsD1SF8ZLAqs=",
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/glob-all/-/glob-all-3.2.1.tgz",
"integrity": "sha512-x877rVkzB3ipid577QOp+eQCR6M5ZyiwrtaYgrX/z3EThaSPFtLDwBXFHc3sH1cG0R0vFYI5SRYeWMMSEyXkUw==",
"dev": true,
"requires": {
"glob": "^7.0.5",
"yargs": "~1.2.6"
"glob": "^7.1.2",
"yargs": "^15.3.1"
},
"dependencies": {
"minimist": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz",
"integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=",
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true
},
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
"dev": true,
"requires": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^6.2.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"requires": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
}
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
"requires": {
"p-locate": "^4.1.0"
}
},
"p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
"requires": {
"p-limit": "^2.2.0"
}
},
"path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
},
"string-width": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
"integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
}
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.0"
}
},
"wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
}
},
"yargs": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-1.2.6.tgz",
"integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=",
"version": "15.3.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz",
"integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==",
"dev": true,
"requires": {
"minimist": "^0.1.0"
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
"find-up": "^4.1.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.1"
}
},
"yargs-parser": {
"version": "18.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.2.tgz",
"integrity": "sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ==",
"dev": true,
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
}
}
......@@ -6479,24 +6576,6 @@
"resolved": "https://registry.npmjs.org/html-to-image/-/html-to-image-0.1.1.tgz",
"integrity": "sha512-UAjpXmokENeOyzfLwL0+zQ502lXyg6pkzVUmRjtljOH9dR/YdEYQhWrQ/O14hmH5/1L7jv1aOupU4Zi3Y8+iow=="
},
"html2canvas": {
"version": "1.0.0-rc.5",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.0.0-rc.5.tgz",
"integrity": "sha512-DtNqPxJNXPoTajs+lVQzGS1SULRI4GQaROeU5R41xH8acffHukxRh/NBVcTBsfCkJSkLq91rih5TpbEwUP9yWA==",
"requires": {
"css-line-break": "1.1.1"
}
},
"html2pdf.js": {
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/html2pdf.js/-/html2pdf.js-0.9.2.tgz",
"integrity": "sha512-lWV/dZEDfwX6tGQ2mrjyMCiEgXp9bLn74nxzGkuzWYeWMJ/0col2BJfVI7rflh2vkQd7PXEHTZ6AYe7m8OPrlQ==",
"requires": {
"es6-promise": "^4.2.5",
"html2canvas": "^1.0.0-alpha.12",
"jspdf": "^1.4.1"
}
},
"http-deceiver": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
......@@ -7733,12 +7812,13 @@
}
},
"laravel-mix-polyfill": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/laravel-mix-polyfill/-/laravel-mix-polyfill-1.1.1.tgz",
"integrity": "sha512-Ww4mastMJF5T9hiWOOELBqjOKAU0zZcbKE2s0T89O7zIh6Ne4tirF+dI2RjfwMq/sivFU1l01gPKgy4EtTH52g==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/laravel-mix-polyfill/-/laravel-mix-polyfill-2.0.0.tgz",
"integrity": "sha512-r5OO3B82P9kA9FZPyw4v3ZBTAP474kWG08TkYI6A+hjf7eHLo+NSXq+FYLAw2LWL01I2H3pdChcPU7FJopHvaA==",
"dev": true,
"requires": {
"@babel/polyfill": "^7.4.4"
"core-js": "^2.6.9 || ^3.1.4",
"regenerator-runtime": "^0.13.2"
}
},
"laravel-mix-purgecss": {
......@@ -12228,9 +12308,9 @@
}
},
"popper.js": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==",
"version": "2.0.0-next.4",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-2.0.0-next.4.tgz",
"integrity": "sha512-rwX+OiRozGJyNzo+b39WE1yh1VE7+FuDAbMIP1j3hUQN4DP0WEOEbRlHC7dDgoIDpBQSm5rr+nCoPktbQCNhFQ==",
"dev": true
},
"portfinder": {
......
......@@ -52,10 +52,8 @@ Vue.use(Vuex);
Vue.component('new-study', require('./components/newstudy.vue').default);
Vue.component('new-edit-user', require('./components/modalnewedituser.vue').default);
Vue.component('user-overview', require('./components/overviewuser.vue').default);
Vue.component('new-interview', require('./components/newinterview.vue').default);
Vue.component('sorting', require('./components/sorting.vue').default);
Vue.component('consultsorting', require('./components/consultsorting.vue').default);
Vue.component('userpart', require('./components/userpart.vue').default);
Vue.component('interview-list', require('./components/interviewlist.vue').default);
Vue.component('new-token', require('./components/newtokenmodal.vue').default);
......
<template>
<section style="margin-left:auto;margin-right:auto;position: fixed;">
<button class="button is-danger" v-if="!loadingprogress > 0" id="downloadbutton" style="display: flex;z-index: 1000;margin: 5px;position: fixed;" @click="download" >{{ trans('export PDF') }}</button>
<img v-show="!loading" :src="screenshot" id="sorting" style="max-width: 100%;max-height: 100%;position:fixed;left:10%">
<div class="columns" style="top:50%;left: 50%;position: fixed;" :class="loading? 'columns loading' : 'columns'"></div>
<div id="bottom" v-show="!loading" style="display: flex;z-index: 1000;margin: 5px;position: fixed;bottom:0px;width:100%;background-color:#e9e7e3;display: inline;">
<span style="left:50%;display: inline-flex;margin: 0 auto;">{{studyname}} - {{interviewname}}</span>
</div>
</div>
</section>
<section style="margin-left:auto;margin-right:auto;position: fixed;">
<button class="button is-danger" v-if="!loading" id="downloadbutton"
style="display: flex;z-index: 1000;margin: 5px;position: fixed;" @click="download">{{ trans('export PDF') }}
</button>
<img v-show="!loading" :src="screenshot" id="sorting"
style="max-width: 100%;max-height: 100%;position:fixed;left:10%">
<div class="fixed" style="top:50%;left: 50%;"
:class="loading? 'loading' : ''"></div>
<div id="bottom" class="flex fixed inline" v-show="!loading"
style="z-index: 1000;margin: 5px;bottom:0px;width:100%;background-color:#e9e7e3">
<span style="left:50%;display: inline-flex;margin: 0 auto;">{{studyname}} - {{interviewname}}</span>
</div>
</section>
</template>
<script>
import jsPDF from 'jspdf'
import html2canvas from 'html2canvas'
var addEvent = function(object, type, callback) {
if (object == null || typeof(object) == 'undefined') return;
if (object.addEventListener) {
object.addEventListener(type, callback, false);
} else if (object.attachEvent) {
object.attachEvent("on" + type, callback);
} else {
object["on"+type] = callback;
}
};
$(document).keydown(function(event) {
if (event.ctrlKey==true && (event.which == '61' || event.which == '107' || event.which == '173' || event.which == '109' || event.which == '187' || event.which == '189' ) ) {
event.preventDefault();
}
// 107 Num Key +
// 109 Num Key -
// 173 Min Key hyphen/underscor Hey
// 61 Plus key +/= key
});
$(window).bind('mousewheel DOMMouseScroll', function (event) {
if (event.ctrlKey == true) {
event.preventDefault();
}
});
export default {
props: ['studyname','interviewname','screenshot'],
data() {
return {
sortableOptions: {
chosenClass: 'is-selected'
},
tokens:[],
loading: false,
loadingprogress: 0,
drag: false,
parentPos: "",
tokenvalues: "",
maxvalue: 100,
minvalue: 0,
bounds: {},
outmost: 0,
center_x: 0,
center_y: 0,
startingWidth: 100,
startingHeigth: 100,
}
}
,created(){
let self = this;
this.tokens = this.atokens;
},
methods:{
download () {
this.loadingprogress = 30;
let self = this;
let opt = {
optimized: true,
logging:false
};
self.loadingprogress = 45;
document.querySelector("#sorting").style.width = document.getElementById("sorting").offsetWidth+"px";
document.querySelector("#sorting").style.height = document.getElementById("sorting").offsetHeight+"px";
document.querySelector("#bottom").style.width = document.getElementById("bottom").offsetWidth+"px";
document.querySelector("#bottom").style.height = document.getElementById("bottom").offsetHeight+"px";
var all = document.getElementsByTagName("*");
console.log(document.getElementById("sorting").offsetWidth+"px");
for (var i=0, max=all.length; i < max; i++) {
all[i].style.height = all[i].offsetHeight+"px";
all[i].style.width = all[i].offsetWidth+"px";
console.log(all[i].style.bottom);
}
html2canvas(document.body,opt).then(function(canvas) {
self.loading = true;
self.loadingprogress = 55;
var jpegUrl = canvas.toDataURL("image/svg+xml").toString();
var img = new Image();
self.loadingprogress = 60;
img.src = jpegUrl;
self.loadingprogress = 80;
img.onload = function () {
self.loadingprogress = 90;
var pdf = new jsPDF('l','px','a4',true);
var left = 15, top = 40;
var width = pdf.internal.pageSize.getWidth();
var height = pdf.internal.pageSize.getHeight();
width = width * 1;
height = height * 1;
pdf.text(5, 25, "Mesort");
pdf.addImage(img, 'SVG',5, 0,180,140, undefined,'FAST');
pdf.save(self.studyname+' - '+ self.interviewname +'.pdf');
self.loading = false;
self.loadingprogress = 0;
};
});
},
handleResize: function(){
console.log("eda");
settokenposition();
},
beforeDestroy: function () {
window.removeEventListener('resize', this.handleResize)
import jsPDF from 'jspdf'
$(document).keydown(function (event) {
if (event.ctrlKey == true && (event.which == '61' || event.which == '107' || event.which == '173' || event.which == '109' || event.which == '187' || event.which == '189')) {
event.preventDefault();
}
// 107 Num Key +
// 109 Num Key -