From: Ɓukasz Rekucki Date: Fri, 28 Aug 2009 14:23:18 +0000 (+0200) Subject: Merge branch 'master' of git@stigma:platforma X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/12e7b7cbf07c8633f3093df7b4898156cca768f6?hp=f02d58db2f0a5f06c38d669c4b4c4fff95e55395 Merge branch 'master' of git@stigma:platforma --- 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/static/js/editor.js b/project/static/js/editor.js index 131c8632..7b145626 100644 --- a/project/static/js/editor.js +++ b/project/static/js/editor.js @@ -86,8 +86,7 @@ Panel.prototype.otherPanelChanged = function(other) { } Panel.prototype.markChanged = function () { - if(!this.wrap.hasClass('changed') ) // TODO: is this needed ? - this.wrap.addClass('changed'); + this.wrap.addClass('changed'); } Panel.prototype.changed = function () { diff --git a/project/templates/explorer/panels/xmleditor.html b/project/templates/explorer/panels/xmleditor.html index f93e6eaa..2253609c 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; },