X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5913c54d19b8f6775633176032161d49f9b2f1aa..df341bdd09208d2b0f84060454cc0000df19deba:/src/redakcja/static/js/wiki/view_annotations.js diff --git a/src/redakcja/static/js/wiki/view_annotations.js b/src/redakcja/static/js/wiki/view_annotations.js index b55effd0..771909b9 100644 --- a/src/redakcja/static/js/wiki/view_annotations.js +++ b/src/redakcja/static/js/wiki/view_annotations.js @@ -6,7 +6,6 @@ function AnnotationsPerspective(options){ var old_callback = options.callback || function() { }; - this.noupdate_hash_onenter = true; this.vsplitbar = 'PRZYPISY'; options.callback = function(){ @@ -27,7 +26,7 @@ self.$annos.hide(); self.$error.hide(); - self.$spinner.show(100, function(){ + self.$spinner.fadeIn(100, function() { self.refresh(self, atype); }); }); @@ -35,10 +34,10 @@ old_callback.call(this); }; - $.wiki.Perspective.call(this, options); + $.wiki.SidebarPerspective.call(this, options); } - AnnotationsPerspective.prototype = new $.wiki.Perspective(); + AnnotationsPerspective.prototype = new $.wiki.SidebarPerspective(); AnnotationsPerspective.prototype.updateAnnotationIds = function(self){ self.annotationToAnchor = {}; @@ -62,7 +61,7 @@ }, error: function(text) { $.unblockUI(); - self.$error.html(text); + self.$error.html('
' + text + '
'); self.$spinner.hide(); self.$error.show(); } @@ -84,7 +83,7 @@ var persp = $.wiki.activePerspective(); if (persp == 'CodeMirrorPerspective') { - xml = $.wiki.perspectives[persp].codemirror.getCode(); + xml = $.wiki.perspectives[persp].codemirror.getValue(); } else if (persp == 'VisualPerspective') { html2text({ @@ -93,7 +92,7 @@ xml = text; }, error: function(text){ - self.$error.html('

Wystąpił błąd:

' + text + '
'); + self.$error.html('

Wystąpił błąd:

' + text + '
'); self.$spinner.hide(); self.$error.show(); } @@ -110,7 +109,7 @@ var error = $('parsererror', doc); if (error.length > 0) { - self.$error.html('Błąd parsowania XML.'); + self.$error.html('
Błąd parsowania XML.'); self.$spinner.hide(); self.$error.show(); } @@ -124,7 +123,7 @@ if (annos.length == 0) { - self.$annos.html('Nie ma żadnych przypisów'); + self.$annos.html('
Nie ma żadnych przypisów
'); self.$spinner.hide(); self.$annos.show(); } @@ -152,7 +151,7 @@ }(xml_text), error: function(text) { $.unblockUI(); - self.$error.html(text); + self.$error.html('
' + text + '
'); self.$spinner.hide(); self.$error.show(); } @@ -163,10 +162,8 @@ AnnotationsPerspective.prototype.onEnter = function(){ - $.wiki.Perspective.prototype.onEnter.call(this); + $.wiki.SidebarPerspective.prototype.onEnter.call(this); - $('.vsplitbar').not('.active').trigger('click'); - $(".vsplitbar-title").html("↓ PRZYPISY ↓"); this.$refresh.filter('.active').trigger('click'); };