| | |
| | | $('#modal_ok').attr('onclick','').unbind('click'); |
| | | }); |
| | | $('#logout').click(fm_logout); |
| | | fm_get_login(); // nach Ermittlung der Benutzerkennung wird TinyMCE initialisert |
| | | fm_get_login(); |
| | | fm_get_list(''); |
| | | fm_init_uploader(); |
| | | //fm_dok_editor_init(''); |
| | | /*window.onresize = function() { |
| | | fm_resize_editor(); |
| | | };*/ |
| | | } |
| | | |
| | | function fm_resize_editor() { |
| | | |
| | | window.clearTimeout(tmo); |
| | | tmo = window.setTimeout(function () { |
| | | //$('.mce-edit-area').height(ht - 100); |
| | | |
| | | try { |
| | | var myHeight = $('.zentrum').height() - $('.nord').height() - 4; |
| | | ed.theme.resizeTo('100%', myHeight); // sets the dimensions of the editable area |
| | | } catch (err) { |
| | | } |
| | | |
| | | |
| | | }, 200); |
| | | |
| | | |
| | | /* |
| | | if (ed) { |
| | | try { |
| | | var myHeight = $('.zentrum').height() - $('.nord').height() - 4; |
| | | ed.theme.resizeTo('100%', myHeight); // sets the dimensions of the editable area |
| | | } catch (err) { |
| | | } |
| | | } |
| | | */ |
| | | } |
| | | |
| | | function fm_get_path(uid) { |
| | |
| | | //console.log('base: ' + pdir + uid); |
| | | return pdir + uid; |
| | | } |
| | | /* |
| | | * Initialisierung von TinyMCE als separate Funktion, damit |
| | | * die Benutzerkennung nach deren Ermittlung als Teil des |
| | | * Basisverzeichnisses dienen kann |
| | | * |
| | | * Pruefen: Kann man das vor jedem Editor-Aufruf machen oder aber |
| | | * Teile wie z.B. das Basisverzeichnis spaeter wieder aendern? |
| | | * |
| | | * @param {String} uid die userid die auf das Basisverzeichnis verweist |
| | | * @returns {undefined} |
| | | */ |
| | | |
| | | function fm_dok_editor_init(uid) { |
| | | var base = fm_get_path(uid); |
| | | //console.log("calling tinymce.init with base: " + base + "/"); |
| | |
| | | width: "100%", |
| | | height: '100%', |
| | | document_base_url : base + "/", |
| | | /*autoresize_bottom_margin : 1,*/ |
| | | setup: function (editor) { |
| | | ed = editor; |
| | | } |
| | |
| | | $('#ansicht').click(fm_ansicht_umschalten); |
| | | fm_set_modus(); |
| | | }); |
| | | } |
| | | |
| | | /* |
| | | function fm_bcr_step2(dirs, dirList) { |
| | | if(dirs.length > 0) { |
| | | dirList.push(new BcrFile(rp + '/' + dirs[dirs.length-1], dirs[dirs.length-1])); |
| | | $.get('tpl-bcr2.txt', function(template) { |
| | | $('#bcnav').append(Mustache.render(template, dirList[dirList.length-1])); |
| | | $('#bcnav').append($('#tpl-bcr3').html()); |
| | | fm_bcr_end(); |
| | | }); |
| | | //template = $('#tpl-bcr2').html(); |
| | | //Mustache.parse(template); // optional, speeds up future uses |
| | | //$('#bcnav').append(Mustache.render(template, dirList[dirList.length-1])); |
| | | } else { |
| | | $.get('tpl-bcr2.txt', function(template) { |
| | | $('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | $('#bcnav').append($('#tpl-bcr3').html()); |
| | | fm_bcr_end(); |
| | | }); |
| | | //template = $('#tpl-bcr2').html(); |
| | | //Mustache.parse(template); // optional, speeds up future uses |
| | | //$('#bcnav').append(Mustache.render(template, dirList[0])); |
| | | } |
| | | } |
| | | */ |
| | | |
| | | function fm_bcr_3() { |
| | | $.get('tpl-bcr3.txt', function(template) { |
| | | $('#bcnav').append(template); |
| | | }); |
| | | } |
| | | |
| | | function fm_bcr_end() { |
| | | $('.breadcrumb-item').click(fm_bc_click); |
| | | $('#ansicht').click(fm_ansicht_umschalten); |
| | | fm_set_modus(); |
| | | } |
| | | |
| | | function fm_menu_datei_speichern() { |