Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-08-28 19:08:05 +0300
committerGitHub <noreply@github.com>2017-08-28 19:08:05 +0300
commit35a49a0e5b4b111a5969cb2c5a9ee994ff9efb47 (patch)
treef3239439aa8a9ae7ad99c2a7670f847319d735b4 /js
parent4c223426be39fc3c9746fa68f8d33c2232a1c442 (diff)
parent3f4956f5157e6be04e153b4ebd6caf560d4c09c3 (diff)
Merge pull request #59 from nextcloud/hash-navigation
Allow using hash navigation withing the editor
Diffstat (limited to 'js')
-rw-r--r--js/editor.js19
1 files changed, 6 insertions, 13 deletions
diff --git a/js/editor.js b/js/editor.js
index ec30030..7f9e788 100644
--- a/js/editor.js
+++ b/js/editor.js
@@ -196,9 +196,7 @@ var Files_Texteditor = {
OCA.Files_Texteditor.$container,
OCA.Files_Texteditor.file
);
- if(!$('html').hasClass('ie8')) {
- history.pushState({file:filename, dir:context.dir}, 'Editor', '#editor');
- }
+ history.pushState({file:filename, dir:context.dir}, 'Editor', '#editor');
},
/**
@@ -324,11 +322,6 @@ var Files_Texteditor = {
} else {
_self.previewPluginOnChange = null;
}
-
- // IE8 support
- if(!OC.Util.hasSVGSupport()){ //replace all svg images with png images for browser that dont support svg
- OC.Util.replaceSVG();
- }
},
function(message){
// Oh dear
@@ -433,14 +426,14 @@ var Files_Texteditor = {
* Binds the control events on the control bar
*/
bindControlBar: function() {
- var self = this;
$('#editor_close').on('click', _.bind(this._onCloseTrigger, this));
$(window).resize(OCA.Files_Texteditor.setFilenameMaxLength);
- if(!$('html').hasClass('ie8')) {
- window.onpopstate = function () {
- self._onCloseTrigger();
+ window.onpopstate = function () {
+ var hash = location.hash.substr(1);
+ if (hash.substr(0, 6) !== 'editor') {
+ this._onCloseTrigger();
}
- }
+ }.bind(this);
},
/**