Skip to content

Commit f4daa17

Browse files
committed
Show filename when open mindmap file
1 parent 860d9ed commit f4daa17

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

js/mindmap.js

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var FilesMindMap = {
22
_currentContext: null,
33
_file: {},
44
_fileList: null,
5+
_lastTitle: '',
56
init: function() {
67
this.registerFileActions();
78
this.hackFileIcon();
@@ -36,6 +37,8 @@ var FilesMindMap = {
3637
// replace the controls with our own
3738
$('#app-content #controls').removeClass('hidden');
3839

40+
document.title = this._lastTitle;
41+
3942
if (!$('#mimetype').val()) {
4043
this._fileList.addAndFetchFileInfo(this._file.dir + '/' + this._file.name, '');
4144
} else {
@@ -87,6 +90,9 @@ var FilesMindMap = {
8790
window.alert('save');
8891
};
8992

93+
self._lastTitle = document.title;
94+
document.title = self._file.name + ' - ' + OC.theme.title;
95+
9096
// iframe.find('#close-button').click(function() {
9197
// self.hide();
9298
// });

0 commit comments

Comments
 (0)