';
let files = response.files;
let directories = response.directories;
@@ -252,18 +262,50 @@ window.Quantumviewfiles = function(Filemanager, ViewfilesElement, options) {
qvf.trigger('clickFile', element);
if(self.options.metafile === '1') {
- jQuery.get("/administrator/index.php?option=com_quantummanager&task=quantumviewfiles.getMetaFile&path=" + encodeURIComponent(qvf.path) + '&name=' + encodeURIComponent(element.getAttribute('data-filep'))).done(function (response) {
+ jQuery.get("/administrator/index.php?option=com_quantummanager&task=quantumviewfiles.getMetaFile&path=" + encodeURIComponent(qvf.path) + '&name=' + encodeURIComponent(element.getAttribute('data-file'))).done(function (response) {
response = JSON.parse(response);
- if(response.length > 0) {
+ if(response.global !== undefined || response.find !== undefined) {
self.viewMeta.classList.remove('hidden');
- let html = '
';
- for(let i=0;i' + response[i] + '';
+ let html = '';
+
+ if(response.global !== undefined) {
+ html += '';
+ for (let i in response.global) {
+ html += '' + response.global[i].key + ' | ' + response.global[i].value + ' |
';
+ }
+ html += '
';
+ }
+
+ if(response.find !== undefined) {
+ if(Object.keys(response.find).length > 0) {
+ html += '' + QuantumviewfilesLang.metaFileShow + '';
+ html += '';
+ }
}
- html += '
';
self.viewMeta.querySelector('.meta-file-list').innerHTML = html;
+ let buttonToggleTags = self.viewMeta.querySelector('.show-all-tags');
+
+ if(buttonToggleTags !== null) {
+ let metaFind = self.viewMeta.querySelector('.meta-find');
+ buttonToggleTags.addEventListener('click', function () {
+ if(this.classList.contains('active')) {
+ this.classList.remove('active');
+ this.innerHTML = QuantumviewfilesLang.metaFileShow;
+ metaFind.classList.add('meta-hidden');
+ } else {
+ this.classList.add('active');
+ this.innerHTML = QuantumviewfilesLang.metaFileHide;
+ metaFind.classList.remove('meta-hidden');
+ }
+ });
+ }
+
} else {
self.viewMeta.classList.add('hidden');
}
@@ -568,6 +610,7 @@ window.Quantumviewfiles = function(Filemanager, ViewfilesElement, options) {
if(fileP.indexOf('index.php') === -1) {
file = path.replace('root', path) + '/' + fileP;
+
file = "/images/com_quantummanager/cache/" + file + '?' + QuantumUtils.randomInteger(111111, 999999);
if(fileExs.toLowerCase() === 'svg') {
@@ -635,8 +678,8 @@ window.Quantumviewfiles = function(Filemanager, ViewfilesElement, options) {
});
Filemanager.events.add(this, 'updatePath', function (fm, el) {
- //вырубаем кнопки для выделенного
+ //вырубаем кнопки для выделенного
if(fm.Quantumtoolbar !== undefined && fm.Quantumtoolbar.buttonsList['viewfilesDelete'] !== undefined) {
fm.Quantumtoolbar.buttonsList['viewfilesDelete'].classList.add('btn-hide');
}
diff --git a/quantummanager.xml b/quantummanager.xml
index 255caf8..2f40dd6 100644
--- a/quantummanager.xml
+++ b/quantummanager.xml
@@ -7,7 +7,7 @@
https://delo-design.ru
Copyright (C) 2019 "Delo Design". All rights reserved.
GNU General Public License version 2 or later; see LICENSE.txt
-
1.0.3
+
1.1
COM_QUANTUMMANAGER_XML_DESCRIPTION
script.php