| | |
| | | /* |
| | | Dateiverwaltung - File management in your browser |
| | | Copyright (C) 2017 Ulrich Hilger, http://uhilger.de |
| | | |
| | | This program is free software: you can redistribute it and/or modify |
| | | it under the terms of the GNU Affero General Public License as |
| | | published by the Free Software Foundation, either version 3 of the |
| | | License, or (at your option) any later version. |
| | | |
| | | This program is distributed in the hope that it will be useful, |
| | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| | | GNU Affero General Public License for more details. |
| | | |
| | | You should have received a copy of the GNU Affero General Public License |
| | | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| | | */ |
| | | |
| | | var cm; |
| | | var pfad = ''; |
| | | var modus = 'kacheln'; |
| | |
| | | fm_get_list(pfad); |
| | | } |
| | | |
| | | function fm_dateiwahl() { |
| | | function fm_dateiwahl(ev) { |
| | | var elem = this; |
| | | //console.log('dateiwahl nach click, event shift: ' + ev.shiftKey + ", event ctrl: " + ev.ctrlKey); |
| | | if(modus == 'kacheln') { |
| | | if($(elem).children(0).hasClass('fa-folder')) { |
| | | var ordner = $(elem).text().trim(); |
| | |
| | | } |
| | | fm_get_list(pfad); |
| | | } else if($(elem).children(0).hasClass('fa-file')) { |
| | | $('.datei-gewaehlt').removeClass('datei-gewaehlt'); |
| | | if(/*ev.shiftKey || */ ev.ctrlKey) { |
| | | // mehrere Dateien sollen gewaehlt werden |
| | | } else { |
| | | $('.datei-gewaehlt').removeClass('datei-gewaehlt'); |
| | | } |
| | | $(elem).children(0).addClass('datei-gewaehlt'); |
| | | } else { |
| | | //console.log('kein folder oder file...'); |
| | | } |
| | | } else { |
| | | if($(elem).find('.datei-elem').children(0).hasClass('fa-file-o')) { |
| | | $('.table-info').removeClass('table-info'); |
| | | if(/*ev.shiftKey || */ ev.ctrlKey) { |
| | | // mehrere Dateien sollen gewaehlt werden |
| | | } else { |
| | | $('.table-info').removeClass('table-info'); |
| | | } |
| | | $(elem).addClass('table-info'); |
| | | $('.datei-gewaehlt').removeClass('datei-gewaehlt'); |
| | | $(elem).find('.dateiname').addClass('datei-gewaehlt'); |