Fixed upload.
[redakcja.git] / fixtures / przyciski.xml
index a8ad2c1..287a0cc 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
 <?xml version="1.0" encoding="utf-8"?>\r
-<django-objects version="1.0"><object pk="2" model="toolbar.buttongroup"><field type="CharField" name="name">Autokorekta</field><field type="SlugField" name="slug">autokorekta</field><field type="IntegerField" name="position">0</field></object><object pk="1" model="toolbar.buttongroup"><field type="CharField" name="name">Formatowanie</field><field type="SlugField" name="slug">formatowanie</field><field type="IntegerField" name="position">0</field></object><object pk="4" model="toolbar.button"><field type="CharField" name="label">Novelpages</field><field type="SlugField" name="slug">novelpages</field><field type="TextField" name="params">({exprs: [\r\r
+<django-objects version="1.0"><object pk="2" model="toolbar.buttongroup"><field type="CharField" name="name">Autokorekta</field><field type="SlugField" name="slug">autokorekta</field><field type="IntegerField" name="position">0</field></object><object pk="1" model="toolbar.buttongroup"><field type="CharField" name="name">Formatowanie</field><field type="SlugField" name="slug">formatowanie</field><field type="IntegerField" name="position">0</field></object><object pk="3" model="toolbar.buttongroup"><field type="CharField" name="name">Widok</field><field type="SlugField" name="slug">display_options</field><field type="IntegerField" name="position">2</field></object><object pk="5" model="toolbar.button"><field type="CharField" name="label">A&lt;sup&gt;+&lt;/sup&gt;</field><field type="SlugField" name="slug">increase_font_size</field><field type="TextField" name="params">({change: 2})</field><field to="toolbar.scriptlet" name="scriptlet" rel="ManyToOneRel">codemirror_fontsize</field><field type="CharField" name="key">+</field><field type="CharField" name="tooltip">Zwiększ rozmiar czcionki.</field><field to="toolbar.buttongroup" name="group" rel="ManyToManyRel"><object pk="3"></object></field></object><object pk="6" model="toolbar.button"><field type="CharField" name="label">A&lt;sup&gt;-&lt;/sup&gt;</field><field type="SlugField" name="slug">descrease_font_size</field><field type="TextField" name="params">({change: -2})</field><field to="toolbar.scriptlet" name="scriptlet" rel="ManyToOneRel">codemirror_fontsize</field><field type="CharField" name="key">-</field><field type="CharField" name="tooltip">Zmniejsz rozmiar czcionki.</field><field to="toolbar.buttongroup" name="group" rel="ManyToManyRel"><object pk="3"></object></field></object><object pk="7" model="toolbar.button"><field type="CharField" name="label">A&lt;sup&gt;=&lt;/sup&gt;</field><field type="SlugField" name="slug">reset_font_size</field><field type="TextField" name="params">({fontSize: 13})</field><field to="toolbar.scriptlet" name="scriptlet" rel="ManyToOneRel">codemirror_fontsize</field><field type="CharField" name="key">=</field><field type="CharField" name="tooltip">Przywróć orginalny rozmiar czcionki.</field><field to="toolbar.buttongroup" name="group" rel="ManyToManyRel"><object pk="3"></object></field></object><object pk="4" model="toolbar.button"><field type="CharField" name="label">Novelpages</field><field type="SlugField" name="slug">novelpages</field><field type="TextField" name="params">({exprs: [\r\r
   ["\\,\\.\\.|\\.\\,\\.|\\.\\.\\,", "..."],\r\r
   ["„", ",,"] /* DOUBLE LOW-9 QUOTATION MARK */\r\r
 ]})\r\r
   ["\\,\\.\\.|\\.\\,\\.|\\.\\.\\,", "..."],\r\r
   ["„", ",,"] /* DOUBLE LOW-9 QUOTATION MARK */\r\r
 ]})\r\r
@@ -50,4 +50,13 @@ else {
         cm.setLineContent(line, content);\r\r
         line = cm.nextLine(line);\r\r
     } while( !(line === false) );\r\r
         cm.setLineContent(line, content);\r\r
         line = cm.nextLine(line);\r\r
     } while( !(line === false) );\r\r
+}</field></object><object pk="codemirror_fontsize" model="toolbar.scriptlet"><field type="TextField" name="code">var texteditor = panel.texteditor;\r\r
+var frameBody = $('body', $(texteditor.frame).contents());\r\r
+\r\r
+if(params.fontSize) {\r\r
+    frameBody.css('font-size', params.fontSize);\r\r
+}\r\r
+else {\r\r
+    var old_size = parseInt(frameBody.css('font-size'));\r\r
+    frameBody.css('font-size', old_size + (params.change || 0) );\r\r
 }</field></object></django-objects>\r
 }</field></object></django-objects>\r