From: Łukasz Rekucki Date: Fri, 4 Sep 2009 11:06:59 +0000 (+0200) Subject: Przyciski do zmiany czcionki. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/1c64c03bd096ac6c92bee4361926611be3d22259?hp=5e0dd39c630bae5dabc96f33a16419f066d6f435 Przyciski do zmiany czcionki. --- diff --git a/apps/toolbar/templates/toolbar/toolbar.html b/apps/toolbar/templates/toolbar/toolbar.html index 29528c16..21135305 100644 --- a/apps/toolbar/templates/toolbar/toolbar.html +++ b/apps/toolbar/templates/toolbar/toolbar.html @@ -21,7 +21,7 @@ ui:action-params="{{ button.params|escape }}" {% if button.key %}ui:hotkey="{{ button.key|keycode }}"{% endif %} {% if button.tooltip %}ui:tooltip="{{ button.tooltip }}"{% endif %} > - {{ button.label }} + {{ button.label|safe }} {% endfor %}

diff --git a/dump_toolbar.sh b/dump_toolbar.sh new file mode 100755 index 00000000..3bac9fe6 --- /dev/null +++ b/dump_toolbar.sh @@ -0,0 +1 @@ +./project/manage.py dumpdata --format=xml toolbar > fixtures/przyciski.xml diff --git a/fixtures/przyciski.xml b/fixtures/przyciski.xml index a8ad2c19..287a0cc9 100644 --- a/fixtures/przyciski.xml +++ b/fixtures/przyciski.xml @@ -1,5 +1,5 @@ -Autokorektaautokorekta0Formatowanieformatowanie0Novelpagesnovelpages({exprs: [ +Autokorektaautokorekta0Formatowanieformatowanie0Widokdisplay_options2A<sup>+</sup>increase_font_size({change: 2})codemirror_fontsize+Zwiększ rozmiar czcionki.A<sup>-</sup>descrease_font_size({change: -2})codemirror_fontsize-Zmniejsz rozmiar czcionki.A<sup>=</sup>reset_font_size({fontSize: 13})codemirror_fontsize=Przywróć orginalny rozmiar czcionki.Novelpagesnovelpages({exprs: [ ["\\,\\.\\.|\\.\\,\\.|\\.\\.\\,", "..."], ["„", ",,"] /* DOUBLE LOW-9 QUOTATION MARK */ ]}) @@ -50,4 +50,13 @@ else { cm.setLineContent(line, content); line = cm.nextLine(line); } while( !(line === false) ); +}var texteditor = panel.texteditor; +var frameBody = $('body', $(texteditor.frame).contents()); + +if(params.fontSize) { + frameBody.css('font-size', params.fontSize); +} +else { + var old_size = parseInt(frameBody.css('font-size')); + frameBody.css('font-size', old_size + (params.change || 0) ); } diff --git a/project/templates/explorer/panels/xmleditor.html b/project/templates/explorer/panels/xmleditor.html index 39a05e52..76018ca7 100644 --- a/project/templates/explorer/panels/xmleditor.html +++ b/project/templates/explorer/panels/xmleditor.html @@ -1,15 +1,9 @@ {% load toolbar_tags %} -
-
A-
-
A+
-
-
- {% toolbar %}