@@ -178,7 +178,6 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
178
178
type: { default: 'info' },
179
179
duration: null
180
180
},
181
-
182
181
data: function data() {
183
182
return {
184
183
notif_group: [],
@@ -200,7 +199,6 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
200
199
});
201
200
},
202
201
203
-
204
202
methods: {
205
203
checkForGroup: function checkForGroup() {
206
204
return this.notif_group.length > 1 && this.notif_group.filter(function (item) {
@@ -21106,6 +21104,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
21106
21104
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue_lightbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue_lightbox__);
21107
21105
__webpack_require__("./resources/assets/js/shared.js");
21108
21106
21107
+ $.ajaxSetup({
21108
+ cache: false,
21109
+ headers: {
21110
+ 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
21111
+ }
21112
+ });
21113
+
21109
21114
/* Libs */
21110
21115
window.dropzone = __webpack_require__("./node_modules/dropzone/dist/dropzone.js");
21111
21116
Vue.use(__webpack_require__("./node_modules/vue-tippy/vue-tippy.js"));
@@ -21126,13 +21131,6 @@ __webpack_require__("./resources/assets/vendor/MediaManager/js/script.js");
21126
21131
/***/ "./resources/assets/vendor/MediaManager/js/script.js":
21127
21132
/***/ (function(module, exports) {
21128
21133
21129
- $.ajaxSetup({
21130
- cache: false,
21131
- headers: {
21132
- 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
21133
- }
21134
- });
21135
-
21136
21134
var manager = new Vue({
21137
21135
el: '#app',
21138
21136
data: {
@@ -21141,11 +21139,30 @@ var manager = new Vue({
21141
21139
directories: [],
21142
21140
filterdList: [],
21143
21141
bulkList: [],
21144
- showBy: null,
21145
- currentFilterName: null,
21146
- selectedFile: null,
21147
- searchItemsCount: null,
21148
- searchFor: null
21142
+ showBy: undefined,
21143
+ currentFilterName: undefined,
21144
+ selectedFile: undefined,
21145
+ searchItemsCount: undefined,
21146
+ searchFor: undefined
21147
+ },
21148
+ computed: {
21149
+ allFiles: function allFiles() {
21150
+ if (typeof this.filterdList !== 'undefined' && this.filterdList.length > 0) {
21151
+ return this.filterdList;
21152
+ } else {
21153
+ return this.files.items;
21154
+ }
21155
+ },
21156
+ allItemsCount: function allItemsCount() {
21157
+ if (typeof this.allFiles !== 'undefined' && this.allFiles.length > 0) {
21158
+ return this.allFiles.length;
21159
+ }
21160
+ },
21161
+ bulkItemsCount: function bulkItemsCount() {
21162
+ if (typeof this.bulkList !== 'undefined' && this.bulkList.length > 0) {
21163
+ return this.bulkList.length;
21164
+ }
21165
+ }
21149
21166
},
21150
21167
methods: {
21151
21168
/* Main */
@@ -21155,7 +21172,7 @@ var manager = new Vue({
21155
21172
$('#file_loader').show();
21156
21173
this.searchFor = '';
21157
21174
this.showFilesOfType('all');
21158
- this.showBy = null ;
21175
+ this.showBy = undefined ;
21159
21176
21160
21177
var folder_location = '';
21161
21178
@@ -21166,7 +21183,7 @@ var manager = new Vue({
21166
21183
}
21167
21184
21168
21185
// files list
21169
- $.post(media_root_url + '/ files', {
21186
+ $.post(route('media. files') , {
21170
21187
folder: folder_location
21171
21188
}, function (res) {
21172
21189
_this.files = res;
@@ -21195,7 +21212,7 @@ var manager = new Vue({
21195
21212
confirm_delete: function confirm_delete(files) {
21196
21213
var _this2 = this;
21197
21214
21198
- $.post(media_root_url + '/ delete_file_folder', {
21215
+ $.post(route('media. delete_file_folder') , {
21199
21216
folder_location: this.folders,
21200
21217
deleted_files: files
21201
21218
}, function (res) {
@@ -21227,7 +21244,7 @@ var manager = new Vue({
21227
21244
21228
21245
var destination = $('#move_folder_dropdown').val();
21229
21246
21230
- $.post(media_root_url + '/ move_file', {
21247
+ $.post(route('media. move_file') , {
21231
21248
folder_location: this.folders,
21232
21249
destination: destination,
21233
21250
moved_files: files
@@ -21331,7 +21348,7 @@ var manager = new Vue({
21331
21348
this.folders.push(file.name);
21332
21349
this.getFiles(this.folders);
21333
21350
}
21334
- manager.currentFilterName = null ;
21351
+ manager.currentFilterName = undefined ;
21335
21352
},
21336
21353
goToFolder: function goToFolder(index) {
21337
21354
if (!this.isBulkSelecting()) {
@@ -21389,7 +21406,7 @@ var manager = new Vue({
21389
21406
}
21390
21407
if (val == 'all') {
21391
21408
this.filterdList = [];
21392
- this.currentFilterName = null ;
21409
+ this.currentFilterName = undefined ;
21393
21410
} else {
21394
21411
this.filterdList = this.files.items.filter(function (item) {
21395
21412
return _this5.fileTypeIs(item, val);
@@ -21512,7 +21529,7 @@ var manager = new Vue({
21512
21529
}
21513
21530
},
21514
21531
updateDirsList: function updateDirsList() {
21515
- $.post(media_root_url + '/ directories', {
21532
+ $.post(route('media. directories') , {
21516
21533
folder_location: manager.folders
21517
21534
}, function (data) {
21518
21535
manager.directories = data;
@@ -21537,27 +21554,6 @@ var manager = new Vue({
21537
21554
return name.replace(/(.[^.]*)$/, '');
21538
21555
}
21539
21556
},
21540
-
21541
- computed: {
21542
- allFiles: function allFiles() {
21543
- if (typeof this.filterdList !== 'undefined' && this.filterdList.length > 0) {
21544
- return this.filterdList;
21545
- } else {
21546
- return this.files.items;
21547
- }
21548
- },
21549
- allItemsCount: function allItemsCount() {
21550
- if (typeof this.allFiles !== 'undefined' && this.allFiles.length > 0) {
21551
- return this.allFiles.length;
21552
- }
21553
- },
21554
- bulkItemsCount: function bulkItemsCount() {
21555
- if (typeof this.bulkList !== 'undefined' && this.bulkList.length > 0) {
21556
- return this.bulkList.length;
21557
- }
21558
- }
21559
- },
21560
-
21561
21557
watch: {
21562
21558
allFiles: function allFiles(newVal) {
21563
21559
if (newVal.length < 1) {
@@ -21615,18 +21611,18 @@ var manager = new Vue({
21615
21611
this.clearSelected();
21616
21612
this.selectFirst();
21617
21613
}
21618
- this.searchItemsCount = null ;
21614
+ this.searchItemsCount = undefined ;
21619
21615
},
21620
21616
searchItemsCount: function searchItemsCount(val) {
21621
21617
// make sure "no_files" is hidden when search query is cleared
21622
- if (val == null ) {
21618
+ if (val == undefined ) {
21623
21619
$('#no_files').hide();
21624
21620
}
21625
21621
},
21626
21622
showBy: function showBy(val) {
21627
21623
if (val) {
21628
21624
if (val == 'clear') {
21629
- this.showBy = null ;
21625
+ this.showBy = undefined ;
21630
21626
}
21631
21627
this.selectFirst();
21632
21628
}
@@ -21720,7 +21716,7 @@ $(function () {
21720
21716
if (!manager.selectedFileIs('folder')) {
21721
21717
return false;
21722
21718
}
21723
- manager.currentFilterName = null ;
21719
+ manager.currentFilterName = undefined ;
21724
21720
manager.folders.push(manager.selectedFile.name);
21725
21721
manager.getFiles(manager.folders);
21726
21722
}
@@ -21738,7 +21734,7 @@ $(function () {
21738
21734
manager.folders = manager.folders.splice(0, index);
21739
21735
manager.getFiles(manager.folders);
21740
21736
}
21741
- manager.currentFilterName = null ;
21737
+ manager.currentFilterName = undefined ;
21742
21738
}
21743
21739
21744
21740
// go to first / last item
@@ -21758,6 +21754,34 @@ $(function () {
21758
21754
$('#upload').trigger('click');
21759
21755
}
21760
21756
}
21757
+
21758
+ // quick view for images / play audio or video
21759
+ if (!manager.isBulkSelecting()) {
21760
+ if (keycode(e) == 'space' && e.target == document.body) {
21761
+ // prevent body from scrolling
21762
+ e.preventDefault();
21763
+
21764
+ // play audio/video
21765
+ if (manager.selectedFileIs('video') || manager.selectedFileIs('audio')) {
21766
+ return $('.player')[0].paused ? $('.player')[0].play() : $('.player')[0].pause();
21767
+ }
21768
+
21769
+ // quick view image
21770
+ if (manager.selectedFileIs('image')) {
21771
+ if (manager.lightBoxIsActive()) {
21772
+ $('#vue-lightboxOverlay').trigger('click');
21773
+ } else {
21774
+ $('.quickView').trigger('click');
21775
+ }
21776
+ }
21777
+ }
21778
+
21779
+ // quick view image "esc"
21780
+ if (keycode(e) == 'esc' && manager.selectedFileIs('image') && manager.lightBoxIsActive()) {
21781
+ $('#vue-lightboxOverlay').trigger('click');
21782
+ e.preventDefault();
21783
+ }
21784
+ }
21761
21785
/* end of no bulk selection */
21762
21786
21763
21787
// when there are files
@@ -21793,31 +21817,6 @@ $(function () {
21793
21817
}
21794
21818
}
21795
21819
/* end when lightbox is not active */
21796
-
21797
- if (keycode(e) == 'space' && e.target == document.body) {
21798
- // prevent body from scrolling
21799
- e.preventDefault();
21800
-
21801
- // play audio/video
21802
- if (manager.selectedFileIs('video') || manager.selectedFileIs('audio')) {
21803
- return $('.player')[0].paused ? $('.player')[0].play() : $('.player')[0].pause();
21804
- }
21805
-
21806
- // quick view image
21807
- if (manager.selectedFileIs('image')) {
21808
- if (manager.lightBoxIsActive()) {
21809
- $('#vue-lightboxOverlay').trigger('click');
21810
- } else {
21811
- $('.quickView').trigger('click');
21812
- }
21813
- }
21814
- }
21815
-
21816
- // quick view image "esc"
21817
- if (keycode(e) == 'esc' && manager.selectedFileIs('image') && manager.lightBoxIsActive()) {
21818
- $('#vue-lightboxOverlay').trigger('click');
21819
- e.preventDefault();
21820
- }
21821
21820
}
21822
21821
/* end of there are files */
21823
21822
@@ -21964,7 +21963,7 @@ $(function () {
21964
21963
});
21965
21964
21966
21965
$('#new_folder_submit').click(function () {
21967
- $.post(media_root_url + '/ new_folder', {
21966
+ $.post(route('media. new_folder') , {
21968
21967
current_path: manager.files.path,
21969
21968
new_folder_name: $('#new_folder_name').val()
21970
21969
}, function (data) {
@@ -22049,7 +22048,7 @@ $(function () {
22049
22048
var ext = filename.substring(filename.lastIndexOf('.') + 1);
22050
22049
var new_filename = $('#new_filename').val() + ('.' + ext);
22051
22050
22052
- $.post(media_root_url + '/ rename_file', {
22051
+ $.post(route('media. rename_file') , {
22053
22052
folder_location: manager.folders,
22054
22053
filename: filename,
22055
22054
new_filename: new_filename
0 commit comments