From: zuber Date: Fri, 28 Aug 2009 12:05:51 +0000 (+0200) Subject: Zmiana rozmiaru czcionki w edytorze. Closes #16. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/27f3af0b6c08485f3b06b10458c35da5827cd09e?ds=sidebyside;hp=97aa78da4fbb0c6acec66ac04ef5aa6121cbc913 Zmiana rozmiaru czcionki w edytorze. Closes #16. --- diff --git a/project/static/css/master.css b/project/static/css/master.css index 1b428fde..604b69a7 100644 --- a/project/static/css/master.css +++ b/project/static/css/master.css @@ -240,8 +240,6 @@ label { .toolbar-tabs { height: 21px; -/* z-index: 1000;*/ -/* overflow: hidden;*/ } .toolbar-tabs li:hover, .toolbar-tabs li.active { @@ -272,6 +270,33 @@ label { cursor: default; } +.change-font-size { + width: 45px; + height: 18px; + padding: 3px 0 0; + position: absolute; + top: 0; + right: 0; +} + +.change-font-size div { + float: left; + text-align: center; + width: 20px; + font-size: 13px; + margin: 1px; + cursor: default; + border-radius: 2px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; +} + +.change-font-size div:hover { + background-color: #EEE; + border: 1px solid #AAA; + margin: 0; +} + /* =========================== */ /* = DublinCore Editor panel = */ /* =========================== */ diff --git a/project/templates/explorer/panels/xmleditor.html b/project/templates/explorer/panels/xmleditor.html index 7651ffb1..90771a1a 100644 --- a/project/templates/explorer/panels/xmleditor.html +++ b/project/templates/explorer/panels/xmleditor.html @@ -1,6 +1,10 @@ {% load toolbar_tags %} {% toolbar %} +
+
A-
+
A+
+
@@ -74,6 +78,18 @@ panel_hooks = { } }); + $('.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; },