]> source.dussan.org Git - nextcloud-server.git/commitdiff
update page title
authorTom Needham <needham.thomas@gmail.com>
Mon, 9 Jan 2012 22:38:19 +0000 (22:38 +0000)
committerTom Needham <needham.thomas@gmail.com>
Mon, 9 Jan 2012 22:38:19 +0000 (22:38 +0000)
apps/files_texteditor/js/editor.js

index cf6d8217c675e4652c24a4fafc9c6a6ff0ffe55e..ff5615518af19f4df084627073599d18c84c4aad 100644 (file)
@@ -185,6 +185,8 @@ function showFileEditor(dir,filename){
                                                // Initialise the editor
                                                showControls(filename,result.data.write);
                                                $('table').fadeOut('slow', function() {
+                                                       // Update document title
+                                                       document.title = filename;
                                                        $('#editor').text(result.data.filecontents);
                                                        $('#editor').attr('data-dir', dir);
                                                        $('#editor').attr('data-filename', filename);
@@ -220,6 +222,8 @@ function hideFileEditor(){
        // Fade out editor
        $('#editor').fadeOut('slow', function(){
                $(this).remove();
+               // Reset document title
+               document.title = "ownCloud";
                var editorhtml = '<div id="editor"></div>';
                $('table').after(editorhtml);
                $('.actions,#file_access_panel').fadeIn('slow');