7604 |
25 Feb 19 |
nicklas |
/* $Id $ |
7604 |
25 Feb 19 |
nicklas |
2 |
------------------------------------------------------------------ |
7604 |
25 Feb 19 |
nicklas |
Copyright (C) 2013 Nicklas Nordborg |
7604 |
25 Feb 19 |
nicklas |
4 |
|
7604 |
25 Feb 19 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
7604 |
25 Feb 19 |
nicklas |
Available at http://base.thep.lu.se/ |
7604 |
25 Feb 19 |
nicklas |
7 |
|
7604 |
25 Feb 19 |
nicklas |
BASE is free software; you can redistribute it and/or |
7604 |
25 Feb 19 |
nicklas |
modify it under the terms of the GNU General Public License |
7604 |
25 Feb 19 |
nicklas |
as published by the Free Software Foundation; either version 3 |
7604 |
25 Feb 19 |
nicklas |
of the License, or (at your option) any later version. |
7604 |
25 Feb 19 |
nicklas |
12 |
|
7604 |
25 Feb 19 |
nicklas |
BASE is distributed in the hope that it will be useful, |
7604 |
25 Feb 19 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
7604 |
25 Feb 19 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7604 |
25 Feb 19 |
nicklas |
GNU General Public License for more details. |
7604 |
25 Feb 19 |
nicklas |
17 |
|
7604 |
25 Feb 19 |
nicklas |
You should have received a copy of the GNU General Public License |
7604 |
25 Feb 19 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
7604 |
25 Feb 19 |
nicklas |
20 |
------------------------------------------------------------------ |
7604 |
25 Feb 19 |
nicklas |
21 |
|
7604 |
25 Feb 19 |
nicklas |
@author Nicklas |
7604 |
25 Feb 19 |
nicklas |
23 |
*/ |
7604 |
25 Feb 19 |
nicklas |
'use strict'; |
7604 |
25 Feb 19 |
nicklas |
25 |
|
7604 |
25 Feb 19 |
nicklas |
var FileManager = function() |
7604 |
25 Feb 19 |
nicklas |
27 |
{ |
7604 |
25 Feb 19 |
nicklas |
var fileManager = {}; |
7604 |
25 Feb 19 |
nicklas |
var tableAttributes = {'table-id': 'files', 'item-type': 'FILE'}; |
7604 |
25 Feb 19 |
nicklas |
30 |
|
7604 |
25 Feb 19 |
nicklas |
31 |
/** |
7604 |
25 Feb 19 |
nicklas |
Initialize the page. |
7604 |
25 Feb 19 |
nicklas |
33 |
*/ |
7604 |
25 Feb 19 |
nicklas |
fileManager.initPage = function() |
7604 |
25 Feb 19 |
nicklas |
35 |
{ |
7604 |
25 Feb 19 |
nicklas |
var pageId = Doc.getPageId(); |
7604 |
25 Feb 19 |
nicklas |
if (pageId == 'edit-page') |
7604 |
25 Feb 19 |
nicklas |
38 |
{ |
7604 |
25 Feb 19 |
nicklas |
// Save + Close buttons |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnSave', fileManager.save); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('close', App.closeWindow); |
7604 |
25 Feb 19 |
nicklas |
42 |
|
7604 |
25 Feb 19 |
nicklas |
// Tab validation |
7604 |
25 Feb 19 |
nicklas |
TabControl.addTabValidator('settings.info', fileManager.validateFile); |
7857 |
20 Oct 20 |
nicklas |
TabControl.addTabActivateListener('settings.annotations', fileManager.loadAnnotationsFrame); |
7604 |
25 Feb 19 |
nicklas |
46 |
|
7604 |
25 Feb 19 |
nicklas |
// MIME type |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('selectMimeType', fileManager.selectMimeType); |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('selectMimeType', 'base-selected', fileManager.setMimeTypeCallback); |
7604 |
25 Feb 19 |
nicklas |
50 |
|
7604 |
25 Feb 19 |
nicklas |
// Select fileserver |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('server_id.select', fileManager.selectFileServer); |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('server_id', 'base-selected', Items.onItemSelected); |
7604 |
25 Feb 19 |
nicklas |
54 |
|
7604 |
25 Feb 19 |
nicklas |
// URL |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('url', 'change', fileManager.urlOnChange); |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('url', 'keyup', fileManager.urlOnChange); |
7604 |
25 Feb 19 |
nicklas |
58 |
|
7604 |
25 Feb 19 |
nicklas |
59 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (pageId == 'view-page') |
7604 |
25 Feb 19 |
nicklas |
61 |
{ |
7604 |
25 Feb 19 |
nicklas |
var fileController = Items.getController('FILE'); |
7604 |
25 Feb 19 |
nicklas |
fileController.url = 'filemanager/files/index.jsp'; |
7604 |
25 Feb 19 |
nicklas |
var itemId = Data.get('page-data', 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
var attributes = {'item-type': 'FILE', 'item-id': itemId}; |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnEdit', Buttons.editItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnDelete', Buttons.deleteItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnRestore', Buttons.restoreItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnUsingItems', Buttons.showUsingItems, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnDeletePermanently', Buttons.deleteItemPermanently, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnShare', Buttons.shareItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnSetOwner', Buttons.setOwner, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnExport', Buttons.runPlugin, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnImport', Buttons.runPlugin, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnRunPlugin', Buttons.runPlugin, attributes); |
7604 |
25 Feb 19 |
nicklas |
76 |
|
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnCompress', fileManager.compressFile, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnDecompress', fileManager.decompressFile, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnEditFileData', fileManager.editFileData, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('moveOffline', fileManager.moveToLocation); |
7604 |
25 Feb 19 |
nicklas |
81 |
|
7857 |
20 Oct 20 |
nicklas |
TabControl.addTabActivateListener('main.annotations', AnnotationsList.loadOnce); |
7604 |
25 Feb 19 |
nicklas |
TabControl.addTabActivateListener('main.history', History.loadOnce); |
7604 |
25 Feb 19 |
nicklas |
84 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (pageId == 'list-page') |
7604 |
25 Feb 19 |
nicklas |
86 |
{ |
7604 |
25 Feb 19 |
nicklas |
var attributes = {'item-type': 'FILE'}; |
7604 |
25 Feb 19 |
nicklas |
88 |
|
7604 |
25 Feb 19 |
nicklas |
var fileController = Items.getController('FILE'); |
7604 |
25 Feb 19 |
nicklas |
fileController.url = 'filemanager/files/index.jsp'; |
7604 |
25 Feb 19 |
nicklas |
91 |
|
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnNewDirectory', Buttons.newItem); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnUpload', fileManager.uploadFile); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnNewURL', Buttons.newItem, attributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnEditMultipleFiles', fileManager.editMultipleFiles); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnDeleteItems', Buttons.deleteItems, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnRestoreItems', Buttons.restoreItems, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnShareItems', Buttons.shareItems, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnSetOwner', Buttons.setOwnerOfItems, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnColumns', Buttons.configureColumns, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnExport', Buttons.runListPlugin, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnImport', Buttons.runListPlugin, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnRunPlugin', Buttons.runListPlugin, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
104 |
|
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('close', App.closeWindow); |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler('btnOk', Buttons.returnSelected, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
107 |
|
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('mnuMoveToDirectory', 'click', fileManager.selectDirectory); |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('mnuMoveToDirectory', 'base-selected', fileManager.moveToDirectory); |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('mnuMoveOffline', 'click', fileManager.moveToLocation); |
7604 |
25 Feb 19 |
nicklas |
111 |
|
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler('reloadOnNotify', 'base-notify', App.reloadWindow); |
7604 |
25 Feb 19 |
nicklas |
113 |
|
7604 |
25 Feb 19 |
nicklas |
if (Data.int('page-data', 'is-search')) |
7604 |
25 Feb 19 |
nicklas |
115 |
{ |
7604 |
25 Feb 19 |
nicklas |
var numFiles = Data.int('page-data', 'files-found'); |
7604 |
25 Feb 19 |
nicklas |
var numDirectories = Data.int('page-data', 'directories-found'); |
7604 |
25 Feb 19 |
nicklas |
parent.frames.directories.Directories.updateSearchResults(numFiles, numDirectories); |
7604 |
25 Feb 19 |
nicklas |
119 |
} |
7604 |
25 Feb 19 |
nicklas |
120 |
|
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['files']; |
7604 |
25 Feb 19 |
nicklas |
var mode = frm.mode ? frm.mode.value : 'default'; |
7604 |
25 Feb 19 |
nicklas |
if (mode == 'selectone') |
7604 |
25 Feb 19 |
nicklas |
124 |
{ |
7604 |
25 Feb 19 |
nicklas |
var path = Data.get('page-data', 'current-path'); |
7604 |
25 Feb 19 |
nicklas |
if (path) |
7604 |
25 Feb 19 |
nicklas |
127 |
{ |
7604 |
25 Feb 19 |
nicklas |
window.top.SelectFile.setSelectedDirectory(frm.directory_id.value, path); |
7604 |
25 Feb 19 |
nicklas |
129 |
} |
7604 |
25 Feb 19 |
nicklas |
130 |
} |
7604 |
25 Feb 19 |
nicklas |
131 |
|
7983 |
22 Jun 21 |
nicklas |
Events.addEventHandler('main', 'drop', fileManager.dropFiles); |
7983 |
22 Jun 21 |
nicklas |
Events.addEventHandler('main', 'dragover', fileManager.dragFiles); |
7604 |
25 Feb 19 |
nicklas |
134 |
} |
7604 |
25 Feb 19 |
nicklas |
135 |
} |
7604 |
25 Feb 19 |
nicklas |
136 |
|
7983 |
22 Jun 21 |
nicklas |
var filesToUpload; |
7983 |
22 Jun 21 |
nicklas |
fileManager.dropFiles = function(event) |
7983 |
22 Jun 21 |
nicklas |
139 |
{ |
7983 |
22 Jun 21 |
nicklas |
if (event.dataTransfer.types.indexOf('Files') == -1) return; // There are no files so we don't care |
7983 |
22 Jun 21 |
nicklas |
141 |
|
7983 |
22 Jun 21 |
nicklas |
// Stop all default things from happening |
7983 |
22 Jun 21 |
nicklas |
event.preventDefault(); |
7983 |
22 Jun 21 |
nicklas |
event.stopPropagation(); |
7983 |
22 Jun 21 |
nicklas |
145 |
|
7983 |
22 Jun 21 |
nicklas |
var items = event.dataTransfer.items; |
7983 |
22 Jun 21 |
nicklas |
// Check if the dropped items are files or directories |
7983 |
22 Jun 21 |
nicklas |
filesToUpload = []; |
7988 |
30 Jun 21 |
nicklas |
for (var i = 0; i < items.length; i++) |
7983 |
22 Jun 21 |
nicklas |
150 |
{ |
7983 |
22 Jun 21 |
nicklas |
var fe = items[i].webkitGetAsEntry(); |
7988 |
30 Jun 21 |
nicklas |
if (fe.isFile || fe.isDirectory) |
7983 |
22 Jun 21 |
nicklas |
153 |
{ |
7988 |
30 Jun 21 |
nicklas |
filesToUpload[filesToUpload.length] = fe; |
7983 |
22 Jun 21 |
nicklas |
155 |
} |
7983 |
22 Jun 21 |
nicklas |
156 |
} |
7983 |
22 Jun 21 |
nicklas |
if (filesToUpload.length == 0) return; // Only directories |
7983 |
22 Jun 21 |
nicklas |
158 |
|
7983 |
22 Jun 21 |
nicklas |
// Open upload dialog |
7983 |
22 Jun 21 |
nicklas |
var toDir = Data.int(event.currentTarget, 'directory-id') || |
7983 |
22 Jun 21 |
nicklas |
Data.int('page-data', 'current-directory-id'); |
7983 |
22 Jun 21 |
nicklas |
162 |
|
7983 |
22 Jun 21 |
nicklas |
var url = '../upload/drag_drop_upload.jsp?ID='+App.getSessionId(); |
7983 |
22 Jun 21 |
nicklas |
url += '&toDir='+toDir; |
7988 |
30 Jun 21 |
nicklas |
url += '&numFiles='+filesToUpload.length; |
7990 |
01 Jul 21 |
nicklas |
Dialogs.openPopup(url, 'DragDropUpload', 700, 450); |
7983 |
22 Jun 21 |
nicklas |
167 |
} |
7983 |
22 Jun 21 |
nicklas |
168 |
|
7983 |
22 Jun 21 |
nicklas |
fileManager.getFilesToUpload = function() |
7983 |
22 Jun 21 |
nicklas |
170 |
{ |
7983 |
22 Jun 21 |
nicklas |
return filesToUpload; |
7983 |
22 Jun 21 |
nicklas |
172 |
} |
7983 |
22 Jun 21 |
nicklas |
173 |
|
7983 |
22 Jun 21 |
nicklas |
var highlightedSubdir = null; |
7983 |
22 Jun 21 |
nicklas |
var highlightedElement = null; |
7983 |
22 Jun 21 |
nicklas |
var hideTooltipTimer = null; |
7983 |
22 Jun 21 |
nicklas |
fileManager.dragFiles = function(event) |
7983 |
22 Jun 21 |
nicklas |
178 |
{ |
7983 |
22 Jun 21 |
nicklas |
if (event.dataTransfer.types.indexOf('Files') == -1) return; // There are no files so we don't care |
7983 |
22 Jun 21 |
nicklas |
180 |
|
7983 |
22 Jun 21 |
nicklas |
// Stop all default things from happening |
7983 |
22 Jun 21 |
nicklas |
event.preventDefault(); |
7983 |
22 Jun 21 |
nicklas |
event.stopPropagation(); |
7983 |
22 Jun 21 |
nicklas |
184 |
|
7983 |
22 Jun 21 |
nicklas |
// Find out which directory we are uploading to |
7983 |
22 Jun 21 |
nicklas |
var subdir = Data.get(event.currentTarget, 'directory-path'); // The target is a "sub-directory" row in the listing |
7983 |
22 Jun 21 |
nicklas |
var maindir = Data.get('page-data', 'current-path'); // Main directory (is not set when searching) |
7983 |
22 Jun 21 |
nicklas |
if (!subdir && !maindir) |
7983 |
22 Jun 21 |
nicklas |
189 |
{ |
7983 |
22 Jun 21 |
nicklas |
event.dataTransfer.dropEffect = "none"; // No drop here! |
7983 |
22 Jun 21 |
nicklas |
return; |
7983 |
22 Jun 21 |
nicklas |
192 |
} |
7983 |
22 Jun 21 |
nicklas |
var allowUpload = Data.int(event.currentTarget, 'upload-permission'); |
7983 |
22 Jun 21 |
nicklas |
event.dataTransfer.dropEffect = allowUpload ? "copy" : "none"; |
7983 |
22 Jun 21 |
nicklas |
195 |
|
7983 |
22 Jun 21 |
nicklas |
// Highlight the current directory if it is a sub-directory |
7983 |
22 Jun 21 |
nicklas |
if (subdir != highlightedSubdir) |
7983 |
22 Jun 21 |
nicklas |
198 |
{ |
7983 |
22 Jun 21 |
nicklas |
if (highlightedElement) Doc.removeClass(highlightedElement, 'drop-upload'); |
7983 |
22 Jun 21 |
nicklas |
if (subdir) |
7983 |
22 Jun 21 |
nicklas |
201 |
{ |
7983 |
22 Jun 21 |
nicklas |
highlightedElement = event.currentTarget; |
7983 |
22 Jun 21 |
nicklas |
highlightedSubdir = subdir; |
7983 |
22 Jun 21 |
nicklas |
Doc.addClass(highlightedElement, 'drop-upload'); |
7983 |
22 Jun 21 |
nicklas |
205 |
} |
7983 |
22 Jun 21 |
nicklas |
else |
7983 |
22 Jun 21 |
nicklas |
207 |
{ |
7983 |
22 Jun 21 |
nicklas |
highlightedElement = null; |
7983 |
22 Jun 21 |
nicklas |
highlightedSubdir = null; |
7983 |
22 Jun 21 |
nicklas |
210 |
} |
7983 |
22 Jun 21 |
nicklas |
211 |
} |
7983 |
22 Jun 21 |
nicklas |
212 |
|
7983 |
22 Jun 21 |
nicklas |
// Display tooltip |
7983 |
22 Jun 21 |
nicklas |
var tt = Doc.element('uploadTooltip'); |
7983 |
22 Jun 21 |
nicklas |
if (allowUpload) |
7983 |
22 Jun 21 |
nicklas |
216 |
{ |
7983 |
22 Jun 21 |
nicklas |
Doc.removeClass(tt, 'error'); |
7983 |
22 Jun 21 |
nicklas |
tt.innerHTML = 'Upload to '+(subdir || maindir).replace(/\//g, '/<wbr>'); |
7983 |
22 Jun 21 |
nicklas |
219 |
} |
7983 |
22 Jun 21 |
nicklas |
else |
7983 |
22 Jun 21 |
nicklas |
221 |
{ |
7983 |
22 Jun 21 |
nicklas |
Doc.addClass(tt, 'error'); |
7983 |
22 Jun 21 |
nicklas |
tt.innerHTML = 'Not allowed to upload to '+(subdir || maindir).replace(/\//g, '/<wbr>'); |
7983 |
22 Jun 21 |
nicklas |
224 |
} |
7983 |
22 Jun 21 |
nicklas |
tt.style.left = Math.max(0, Math.min(event.clientX-tt.clientWidth/2, window.innerWidth-tt.offsetWidth))+'px'; |
7983 |
22 Jun 21 |
nicklas |
tt.style.top = event.clientY < window.innerHeight-30-tt.offsetHeight ? (event.clientY+30)+'px' : (event.clientY-100-tt.offsetHeight)+'px'; |
7983 |
22 Jun 21 |
nicklas |
Doc.show(tt); |
7983 |
22 Jun 21 |
nicklas |
228 |
|
7983 |
22 Jun 21 |
nicklas |
// Set a timer for hiding the tooltip since we never get any event when dragging ends |
7983 |
22 Jun 21 |
nicklas |
if (hideTooltipTimer) clearTimeout(hideTooltipTimer); |
7983 |
22 Jun 21 |
nicklas |
hideTooltipTimer = setTimeout(fileManager.hideFileUploadTooltip, 500); |
7983 |
22 Jun 21 |
nicklas |
232 |
} |
7983 |
22 Jun 21 |
nicklas |
233 |
|
7983 |
22 Jun 21 |
nicklas |
fileManager.hideFileUploadTooltip = function() |
7983 |
22 Jun 21 |
nicklas |
235 |
{ |
7983 |
22 Jun 21 |
nicklas |
if (highlightedElement) |
7983 |
22 Jun 21 |
nicklas |
237 |
{ |
7983 |
22 Jun 21 |
nicklas |
Doc.removeClass(highlightedElement, 'drop-upload'); |
7983 |
22 Jun 21 |
nicklas |
highlightedElement = null; |
7983 |
22 Jun 21 |
nicklas |
highlightedSubdir = null; |
7983 |
22 Jun 21 |
nicklas |
241 |
} |
7983 |
22 Jun 21 |
nicklas |
Doc.hide('uploadTooltip'); |
7983 |
22 Jun 21 |
nicklas |
243 |
} |
7983 |
22 Jun 21 |
nicklas |
244 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.initElements = function(element, autoInit) |
7604 |
25 Feb 19 |
nicklas |
246 |
{ |
7604 |
25 Feb 19 |
nicklas |
if (autoInit == 'upload-file') |
7604 |
25 Feb 19 |
nicklas |
248 |
{ |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler(element, fileManager.uploadFile); |
7604 |
25 Feb 19 |
nicklas |
250 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (autoInit == 'open-directory') |
7604 |
25 Feb 19 |
nicklas |
252 |
{ |
7604 |
25 Feb 19 |
nicklas |
Buttons.addClickHandler(element, fileManager.openDirectory); |
7604 |
25 Feb 19 |
nicklas |
254 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (autoInit == 'file-item') |
7604 |
25 Feb 19 |
nicklas |
256 |
{ |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler(element, 'click', fileManager.onFileSelected, tableAttributes); |
7604 |
25 Feb 19 |
nicklas |
258 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (autoInit == 'file-check') |
7604 |
25 Feb 19 |
nicklas |
260 |
{ |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler(element, 'change', fileManager.onFileChecked); |
7703 |
11 Apr 19 |
nicklas |
if (element.checked) Events.sendChangeEvent(element); |
7604 |
25 Feb 19 |
nicklas |
263 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (autoInit == 'directory-item') |
7604 |
25 Feb 19 |
nicklas |
265 |
{ |
7604 |
25 Feb 19 |
nicklas |
Events.addEventHandler(element, 'click', fileManager.onDirectorySelected); |
7604 |
25 Feb 19 |
nicklas |
267 |
} |
7983 |
22 Jun 21 |
nicklas |
else if (autoInit == 'directory-row') |
7983 |
22 Jun 21 |
nicklas |
269 |
{ |
7983 |
22 Jun 21 |
nicklas |
Events.addEventHandler(element, 'drop', fileManager.dropFiles); |
7983 |
22 Jun 21 |
nicklas |
Events.addEventHandler(element, 'dragover', fileManager.dragFiles); |
7983 |
22 Jun 21 |
nicklas |
272 |
} |
7604 |
25 Feb 19 |
nicklas |
273 |
} |
7604 |
25 Feb 19 |
nicklas |
274 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.uploadFile = function(event) |
7604 |
25 Feb 19 |
nicklas |
276 |
{ |
7604 |
25 Feb 19 |
nicklas |
var fileId = Data.get(event.currentTarget, 'file-id'); |
7604 |
25 Feb 19 |
nicklas |
278 |
|
7604 |
25 Feb 19 |
nicklas |
var url = 'index.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
if (fileId) |
7604 |
25 Feb 19 |
nicklas |
281 |
{ |
7604 |
25 Feb 19 |
nicklas |
url += '&cmd=UploadFile&item_id='+fileId; |
7604 |
25 Feb 19 |
nicklas |
283 |
} |
7604 |
25 Feb 19 |
nicklas |
else |
7604 |
25 Feb 19 |
nicklas |
285 |
{ |
7604 |
25 Feb 19 |
nicklas |
url += '&cmd=UploadNewFile'; |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['files']; |
7604 |
25 Feb 19 |
nicklas |
var directoryId = frm.directory_id.value; |
7604 |
25 Feb 19 |
nicklas |
url += '&directory_id='+directoryId; |
7604 |
25 Feb 19 |
nicklas |
290 |
} |
7604 |
25 Feb 19 |
nicklas |
var controller = Items.getController('FILE'); |
7604 |
25 Feb 19 |
nicklas |
Dialogs.openPopup(url, 'UploadFile', controller.width, controller.height); |
7604 |
25 Feb 19 |
nicklas |
293 |
} |
7604 |
25 Feb 19 |
nicklas |
294 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.editMultipleFiles = function() |
7604 |
25 Feb 19 |
nicklas |
296 |
{ |
7604 |
25 Feb 19 |
nicklas |
if (!Table.checkIfSelected('files', /^\d+$/)) |
7604 |
25 Feb 19 |
nicklas |
298 |
{ |
7604 |
25 Feb 19 |
nicklas |
return; |
7604 |
25 Feb 19 |
nicklas |
300 |
} |
7604 |
25 Feb 19 |
nicklas |
Table.submitToPopup('files', 'EditMultiple', 600, 400); |
7604 |
25 Feb 19 |
nicklas |
302 |
} |
7604 |
25 Feb 19 |
nicklas |
303 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.selectDirectory = function(event) |
7604 |
25 Feb 19 |
nicklas |
305 |
{ |
7604 |
25 Feb 19 |
nicklas |
if (!Table.checkIfSelected('files')) |
7604 |
25 Feb 19 |
nicklas |
307 |
{ |
7604 |
25 Feb 19 |
nicklas |
return; |
7604 |
25 Feb 19 |
nicklas |
309 |
} |
7604 |
25 Feb 19 |
nicklas |
var url = '../directories/index.jsp?ID=' + App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&mode=selectonedirectory&title=Move+to'; |
7604 |
25 Feb 19 |
nicklas |
url += '&callback='+event.currentTarget.id; |
7604 |
25 Feb 19 |
nicklas |
Dialogs.openPopup(url, 'SelectDirectory', 500, 500); |
7604 |
25 Feb 19 |
nicklas |
314 |
} |
7604 |
25 Feb 19 |
nicklas |
315 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.moveToDirectory = function(event) |
7604 |
25 Feb 19 |
nicklas |
317 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['files']; |
7604 |
25 Feb 19 |
nicklas |
Forms.addHidden(frm, 'newdirectory_id', event.detail.id); |
7604 |
25 Feb 19 |
nicklas |
frm.cmd.value = 'MoveToDirectory'; |
7604 |
25 Feb 19 |
nicklas |
frm.submit(); |
7604 |
25 Feb 19 |
nicklas |
322 |
} |
7604 |
25 Feb 19 |
nicklas |
323 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.moveToLocation = function(event) |
7604 |
25 Feb 19 |
nicklas |
325 |
{ |
7604 |
25 Feb 19 |
nicklas |
var moveTo = Data.get(event.currentTarget, 'location'); |
7604 |
25 Feb 19 |
nicklas |
var fileId = Data.get(event.currentTarget, 'file-id'); |
7604 |
25 Feb 19 |
nicklas |
if (fileId) |
7604 |
25 Feb 19 |
nicklas |
329 |
{ |
7604 |
25 Feb 19 |
nicklas |
// Single file mode |
7604 |
25 Feb 19 |
nicklas |
if (moveTo == 'OFFLINE') |
7604 |
25 Feb 19 |
nicklas |
332 |
{ |
7604 |
25 Feb 19 |
nicklas |
var msg = "This action will remove the file data of the selected file from the server.\n"; |
7604 |
25 Feb 19 |
nicklas |
msg += "If you need the data again you have to re-upload the file.\n\n"; |
7604 |
25 Feb 19 |
nicklas |
msg += "Continue?"; |
7604 |
25 Feb 19 |
nicklas |
if (!confirm(msg)) return; |
7604 |
25 Feb 19 |
nicklas |
337 |
} |
7604 |
25 Feb 19 |
nicklas |
338 |
|
7604 |
25 Feb 19 |
nicklas |
var url = 'index.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&cmd=MoveItem&move='+moveTo; |
7604 |
25 Feb 19 |
nicklas |
url += '&item_id='+fileId; |
7604 |
25 Feb 19 |
nicklas |
location.replace(url); |
7604 |
25 Feb 19 |
nicklas |
343 |
} |
7604 |
25 Feb 19 |
nicklas |
else |
7604 |
25 Feb 19 |
nicklas |
345 |
{ |
7604 |
25 Feb 19 |
nicklas |
// Table mode |
7604 |
25 Feb 19 |
nicklas |
if (!Table.checkIfSelected('files')) |
7604 |
25 Feb 19 |
nicklas |
348 |
{ |
7604 |
25 Feb 19 |
nicklas |
return; |
7604 |
25 Feb 19 |
nicklas |
350 |
} |
7604 |
25 Feb 19 |
nicklas |
351 |
|
7604 |
25 Feb 19 |
nicklas |
if (moveTo == 'OFFLINE') |
7604 |
25 Feb 19 |
nicklas |
353 |
{ |
7604 |
25 Feb 19 |
nicklas |
var msg = "This action will remove the file data of the selected file(s) from the server.\n"; |
7604 |
25 Feb 19 |
nicklas |
msg += "If you need the data again you have to re-upload the file(s).\n\n"; |
7604 |
25 Feb 19 |
nicklas |
msg += "Continue?"; |
7604 |
25 Feb 19 |
nicklas |
if (!confirm(msg)) return; |
7604 |
25 Feb 19 |
nicklas |
358 |
} |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['files']; |
7604 |
25 Feb 19 |
nicklas |
Forms.addHidden(frm, 'move', moveTo); |
7604 |
25 Feb 19 |
nicklas |
frm.cmd.value = 'MoveItems'; |
7604 |
25 Feb 19 |
nicklas |
frm.submit(); |
7604 |
25 Feb 19 |
nicklas |
363 |
} |
7604 |
25 Feb 19 |
nicklas |
364 |
} |
7604 |
25 Feb 19 |
nicklas |
365 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.openDirectory = function(event) |
7604 |
25 Feb 19 |
nicklas |
367 |
{ |
7604 |
25 Feb 19 |
nicklas |
var directoryId = Data.get(event.currentTarget, 'directory-id'); |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['files']; |
7604 |
25 Feb 19 |
nicklas |
var currentId = frm.directory_id.value; |
7604 |
25 Feb 19 |
nicklas |
parent.frames['directories'].Directories.synchronizeTo(directoryId, currentId); |
7604 |
25 Feb 19 |
nicklas |
372 |
} |
7604 |
25 Feb 19 |
nicklas |
373 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.compressFile = function(event) |
7604 |
25 Feb 19 |
nicklas |
375 |
{ |
7604 |
25 Feb 19 |
nicklas |
var progress = '../../common/progress_reporter.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
progress += '&progress=compress&title=Compressing file'; |
7604 |
25 Feb 19 |
nicklas |
Dialogs.openPopup(progress, 'CompressFile', 300, 200); |
7604 |
25 Feb 19 |
nicklas |
379 |
|
7604 |
25 Feb 19 |
nicklas |
var url = 'index.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&cmd=CompressItem&item_id='+Data.get(event.currentTarget, 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
location.replace(url); |
7604 |
25 Feb 19 |
nicklas |
383 |
} |
7604 |
25 Feb 19 |
nicklas |
384 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.decompressFile = function(event) |
7604 |
25 Feb 19 |
nicklas |
386 |
{ |
7604 |
25 Feb 19 |
nicklas |
var progress = '../../common/progress_reporter.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
progress += '&progress=decompress&title=Decompressing file'; |
7604 |
25 Feb 19 |
nicklas |
Dialogs.openPopup(progress, 'DecompressFile', 300, 200); |
7604 |
25 Feb 19 |
nicklas |
390 |
|
7604 |
25 Feb 19 |
nicklas |
var url = 'index.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&cmd=DecompressItem&item_id='+Data.get(event.currentTarget, 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
location.replace(url); |
7604 |
25 Feb 19 |
nicklas |
394 |
} |
7604 |
25 Feb 19 |
nicklas |
395 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.editFileData = function() |
7604 |
25 Feb 19 |
nicklas |
397 |
{ |
7604 |
25 Feb 19 |
nicklas |
var fileId = Data.get('page-data', 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
var url = 'index.jsp?ID='+App.getSessionId(); |
7604 |
25 Feb 19 |
nicklas |
url += '&cmd=EditFileData&item_id='+fileId; |
7604 |
25 Feb 19 |
nicklas |
Dialogs.openPopup(url, 'EditFileData', 800, 600); |
7604 |
25 Feb 19 |
nicklas |
402 |
} |
7604 |
25 Feb 19 |
nicklas |
403 |
|
7604 |
25 Feb 19 |
nicklas |
// Called when radio button or checkbox for a file is clicked |
7604 |
25 Feb 19 |
nicklas |
// Should update the text in the 'Selected files' field in the |
7604 |
25 Feb 19 |
nicklas |
// parent form |
7604 |
25 Feb 19 |
nicklas |
fileManager.onFileChecked = function(event) |
7604 |
25 Feb 19 |
nicklas |
408 |
{ |
7604 |
25 Feb 19 |
nicklas |
var element = event.currentTarget; |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['files']; |
7604 |
25 Feb 19 |
nicklas |
var mode = frm.mode ? frm.mode.value : 'default'; |
7604 |
25 Feb 19 |
nicklas |
if (mode == 'selectone') |
7604 |
25 Feb 19 |
nicklas |
413 |
{ |
7604 |
25 Feb 19 |
nicklas |
window.top.SelectFile.setSelectedFile(element.value, element.title); |
7604 |
25 Feb 19 |
nicklas |
415 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (mode == 'selectmultiple' || mode == 'selectmultiplenobuttons') |
7604 |
25 Feb 19 |
nicklas |
417 |
{ |
7604 |
25 Feb 19 |
nicklas |
if (element.checked) |
7604 |
25 Feb 19 |
nicklas |
419 |
{ |
7604 |
25 Feb 19 |
nicklas |
window.top.SelectFile.addSelected(element.value, element.title); |
7604 |
25 Feb 19 |
nicklas |
421 |
} |
7604 |
25 Feb 19 |
nicklas |
else |
7604 |
25 Feb 19 |
nicklas |
423 |
{ |
7604 |
25 Feb 19 |
nicklas |
window.top.SelectFile.removeSelected(element.value); |
7604 |
25 Feb 19 |
nicklas |
425 |
} |
7604 |
25 Feb 19 |
nicklas |
426 |
} |
7604 |
25 Feb 19 |
nicklas |
427 |
} |
7604 |
25 Feb 19 |
nicklas |
428 |
|
7604 |
25 Feb 19 |
nicklas |
// Called when name of file is clicked |
7604 |
25 Feb 19 |
nicklas |
// Should select/toggle radio button or checkbox and |
7604 |
25 Feb 19 |
nicklas |
// update the text in the 'Selected files' field in the |
7604 |
25 Feb 19 |
nicklas |
// parent form |
7604 |
25 Feb 19 |
nicklas |
fileManager.onFileSelected = function(event) |
7604 |
25 Feb 19 |
nicklas |
434 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['files']; |
7604 |
25 Feb 19 |
nicklas |
var mode = frm.mode ? frm.mode.value : 'default'; |
7604 |
25 Feb 19 |
nicklas |
var fileId = Data.get(event.currentTarget, 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
var path = Data.get(event.currentTarget, 'path'); |
7604 |
25 Feb 19 |
nicklas |
439 |
|
7604 |
25 Feb 19 |
nicklas |
if (mode == 'selectone') |
7604 |
25 Feb 19 |
nicklas |
441 |
{ |
7604 |
25 Feb 19 |
nicklas |
var index = Forms.checkRadio(frm.item_id, fileId); |
7604 |
25 Feb 19 |
nicklas |
window.top.SelectFile.setSelectedFile(fileId, path); |
7604 |
25 Feb 19 |
nicklas |
window.top.SelectFile.returnSelected(); |
7604 |
25 Feb 19 |
nicklas |
App.closeWindow(); |
7604 |
25 Feb 19 |
nicklas |
446 |
} |
7604 |
25 Feb 19 |
nicklas |
else if (mode == 'selectmultiple' || mode == 'selectmultiplenobuttons') |
7604 |
25 Feb 19 |
nicklas |
448 |
{ |
7604 |
25 Feb 19 |
nicklas |
var checkbox = Table.toggleCheckBox('files', fileId); |
7604 |
25 Feb 19 |
nicklas |
if (checkbox.checked) |
7604 |
25 Feb 19 |
nicklas |
451 |
{ |
7604 |
25 Feb 19 |
nicklas |
window.top.SelectFile.addSelected(fileId, path); |
7604 |
25 Feb 19 |
nicklas |
453 |
} |
7604 |
25 Feb 19 |
nicklas |
else |
7604 |
25 Feb 19 |
nicklas |
455 |
{ |
7604 |
25 Feb 19 |
nicklas |
window.top.SelectFile.removeSelected(fileId); |
7604 |
25 Feb 19 |
nicklas |
457 |
} |
7604 |
25 Feb 19 |
nicklas |
458 |
} |
7604 |
25 Feb 19 |
nicklas |
else |
7604 |
25 Feb 19 |
nicklas |
460 |
{ |
7604 |
25 Feb 19 |
nicklas |
Items.itemOnClick(event); |
7604 |
25 Feb 19 |
nicklas |
462 |
} |
7604 |
25 Feb 19 |
nicklas |
463 |
} |
7604 |
25 Feb 19 |
nicklas |
464 |
|
7604 |
25 Feb 19 |
nicklas |
// Called when name of directory is clicked |
7604 |
25 Feb 19 |
nicklas |
// Should select/toggle radio button or checkbox and |
7604 |
25 Feb 19 |
nicklas |
// update the text in the 'Selected files' field in the |
7604 |
25 Feb 19 |
nicklas |
// parent form |
7604 |
25 Feb 19 |
nicklas |
fileManager.onDirectorySelected = function(event) |
7604 |
25 Feb 19 |
nicklas |
470 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['files']; |
7604 |
25 Feb 19 |
nicklas |
var mode = frm.mode ? frm.mode.value : 'default'; |
7604 |
25 Feb 19 |
nicklas |
var directoryId = Data.get(event.currentTarget, 'item-id'); |
7604 |
25 Feb 19 |
nicklas |
var path = Data.get(event.currentTarget, 'path'); |
7604 |
25 Feb 19 |
nicklas |
if (mode == 'selectone') |
7604 |
25 Feb 19 |
nicklas |
476 |
{ |
7604 |
25 Feb 19 |
nicklas |
window.top.SelectFile.setSelectedDirectory(directoryId, path); |
7604 |
25 Feb 19 |
nicklas |
478 |
} |
7604 |
25 Feb 19 |
nicklas |
else |
7604 |
25 Feb 19 |
nicklas |
480 |
{ |
7604 |
25 Feb 19 |
nicklas |
Items.itemOnClick(event); |
7604 |
25 Feb 19 |
nicklas |
482 |
} |
7604 |
25 Feb 19 |
nicklas |
483 |
} |
7604 |
25 Feb 19 |
nicklas |
484 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.validateFile = function() |
7604 |
25 Feb 19 |
nicklas |
486 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['file']; |
7604 |
25 Feb 19 |
nicklas |
if (Strings.trim(frm.name.value) == '') |
7604 |
25 Feb 19 |
nicklas |
489 |
{ |
7604 |
25 Feb 19 |
nicklas |
Forms.showNotification(frm.name, 'You must enter a name'); |
7604 |
25 Feb 19 |
nicklas |
return false; |
7604 |
25 Feb 19 |
nicklas |
492 |
} |
7604 |
25 Feb 19 |
nicklas |
if (frm.url && Strings.trim(frm.url.value) == '') |
7604 |
25 Feb 19 |
nicklas |
494 |
{ |
7604 |
25 Feb 19 |
nicklas |
Forms.showNotification(frm.url, 'You must enter a URL'); |
7604 |
25 Feb 19 |
nicklas |
return false; |
7604 |
25 Feb 19 |
nicklas |
497 |
} |
7604 |
25 Feb 19 |
nicklas |
return true; |
7604 |
25 Feb 19 |
nicklas |
499 |
} |
7604 |
25 Feb 19 |
nicklas |
500 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.save = function() |
7604 |
25 Feb 19 |
nicklas |
502 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['file']; |
7604 |
25 Feb 19 |
nicklas |
if (TabControl.validateActiveTab('settings')) |
7604 |
25 Feb 19 |
nicklas |
505 |
{ |
7857 |
20 Oct 20 |
nicklas |
Annotations.saveModifiedAnnotationsToForm(frm); |
7604 |
25 Feb 19 |
nicklas |
frm.submit(); |
7604 |
25 Feb 19 |
nicklas |
508 |
} |
7604 |
25 Feb 19 |
nicklas |
509 |
} |
7604 |
25 Feb 19 |
nicklas |
510 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.selectMimeType = function() |
7604 |
25 Feb 19 |
nicklas |
512 |
{ |
7604 |
25 Feb 19 |
nicklas |
Dialogs.selectItem('MIMETYPE', 'selectMimeType', 0); |
7604 |
25 Feb 19 |
nicklas |
514 |
} |
7604 |
25 Feb 19 |
nicklas |
515 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.setMimeTypeCallback = function(event) |
7604 |
25 Feb 19 |
nicklas |
517 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['file']; |
7604 |
25 Feb 19 |
nicklas |
frm.mime_type.value = event.detail.name; |
7604 |
25 Feb 19 |
nicklas |
520 |
} |
7604 |
25 Feb 19 |
nicklas |
521 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.selectFileServer = function() |
7604 |
25 Feb 19 |
nicklas |
523 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['file']; |
7604 |
25 Feb 19 |
nicklas |
var url = ''; |
7604 |
25 Feb 19 |
nicklas |
if (frm.server_id.length > 1) |
7604 |
25 Feb 19 |
nicklas |
527 |
{ |
7604 |
25 Feb 19 |
nicklas |
var id = Math.abs(parseInt(frm.server_id[1].value)); |
7604 |
25 Feb 19 |
nicklas |
url += '&item_id='+id; |
7604 |
25 Feb 19 |
nicklas |
530 |
} |
7604 |
25 Feb 19 |
nicklas |
Dialogs.selectItem('FILESERVER', 'server_id', 0, url); |
7604 |
25 Feb 19 |
nicklas |
532 |
} |
7604 |
25 Feb 19 |
nicklas |
533 |
|
7604 |
25 Feb 19 |
nicklas |
fileManager.urlOnChange = function() |
7604 |
25 Feb 19 |
nicklas |
535 |
{ |
7604 |
25 Feb 19 |
nicklas |
var frm = document.forms['file']; |
7604 |
25 Feb 19 |
nicklas |
var url = frm.url.value; |
7604 |
25 Feb 19 |
nicklas |
var lastAutoChange = Data.get(frm.url, 'last-auto-change', ''); |
7604 |
25 Feb 19 |
nicklas |
539 |
|
7604 |
25 Feb 19 |
nicklas |
if (url && (lastAutoChange == frm.name.value)) |
7604 |
25 Feb 19 |
nicklas |
541 |
{ |
7604 |
25 Feb 19 |
nicklas |
var end = url.lastIndexOf('/'); |
7604 |
25 Feb 19 |
nicklas |
if (end >= 0) url = url.substring(end+1); |
7604 |
25 Feb 19 |
nicklas |
frm.name.value = url; |
7604 |
25 Feb 19 |
nicklas |
Data.set(frm.url, 'last-auto-change', url); |
7604 |
25 Feb 19 |
nicklas |
546 |
} |
7604 |
25 Feb 19 |
nicklas |
547 |
} |
7857 |
20 Oct 20 |
nicklas |
548 |
|
7857 |
20 Oct 20 |
nicklas |
fileManager.loadAnnotationsFrame = function() |
7857 |
20 Oct 20 |
nicklas |
550 |
{ |
7857 |
20 Oct 20 |
nicklas |
Annotations.autoLoadEditFrame(null, ItemSubtype.getSubtypeId('subtype_id'), null); |
7857 |
20 Oct 20 |
nicklas |
552 |
} |
7604 |
25 Feb 19 |
nicklas |
553 |
|
7857 |
20 Oct 20 |
nicklas |
554 |
|
7604 |
25 Feb 19 |
nicklas |
return fileManager; |
7604 |
25 Feb 19 |
nicklas |
556 |
}(); |
7604 |
25 Feb 19 |
nicklas |
557 |
|
7604 |
25 Feb 19 |
nicklas |
Doc.onLoad(FileManager.initPage); |
7604 |
25 Feb 19 |
nicklas |
Doc.addElementInitializer(FileManager.initElements); |