X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/fa300c83de0c9788beb4e833c2003618e7d20646..27f3af0b6c08485f3b06b10458c35da5827cd09e:/project/templates/explorer/panels/xmleditor.html diff --git a/project/templates/explorer/panels/xmleditor.html b/project/templates/explorer/panels/xmleditor.html index ea4c4433..90771a1a 100644 --- a/project/templates/explorer/panels/xmleditor.html +++ b/project/templates/explorer/panels/xmleditor.html @@ -1,55 +1,116 @@ {% load toolbar_tags %} {% toolbar %} +
+
A-
+
A+
+
- + + $(texteditor.frame).css({width: '100%', height: '100%'}); + + $('#toolbar-buttons li').wTooltip({ + delay: 1000, + style: { + border: "1px solid #7F7D67", + opacity: 0.9, + background: "#FBFBC6", + padding: "1px", + fontSize: "12px", + } + }); + + $('.decrease-font-size', panel).click(function() { + var frameBody = $('body', $(texteditor.frame).contents()); + console.log(frameBody.css('font-size')); + frameBody.css('font-size', parseInt(frameBody.css('font-size')) - 2); + }); + + $('.increase-font-size', panel).click(function() { + var frameBody = $('body', $(texteditor.frame).contents()); + console.log(frameBody.css('font-size')); + frameBody.css('font-size', parseInt(frameBody.css('font-size')) + 2); + }); + + this.texteditor = texteditor; + }, + + unload: function() { + this.texteditor = null; + }, + + + refresh: function() { + return false; + }, + + saveInfo: function(saveInfo) { + var myInfo = { + url: "{% url file_xml fpath %}", + postData: { + content: this.texteditor.getCode() + } + }; + $.extend(saveInfo, myInfo); + } +}; + +