X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/58e0903a3f0e1e105a11638b18b588e9eb6a8b9e..d0f4d65ea3c131745a0d5412f804f92369004e65:/apps/toolbar/fixtures/initial_data.yaml?ds=inline
diff --git a/apps/toolbar/fixtures/initial_data.yaml b/apps/toolbar/fixtures/initial_data.yaml
index 723732d2..ba3148a6 100644
--- a/apps/toolbar/fixtures/initial_data.yaml
+++ b/apps/toolbar/fixtures/initial_data.yaml
@@ -4,6 +4,9 @@
- fields: {name: Autokorekta, position: 0, slug: autokorekta}
model: toolbar.buttongroup
pk: 2
+- fields: {name: Autotagowanie, position: 0, slug: autotagowanie}
+ model: toolbar.buttongroup
+ pk: 28
- fields: {name: Bloki, position: 0, slug: bloki}
model: toolbar.buttongroup
pk: 21
@@ -22,9 +25,6 @@
- fields: {name: "Pocz\u0105tek dramatu", position: 0, slug: poczatek-dramatu}
model: toolbar.buttongroup
pk: 22
-- fields: {name: Polecenia, position: 0, slug: polecenia}
- model: toolbar.buttongroup
- pk: 27
- fields: {name: Przypisy, position: 0, slug: przypisy}
model: toolbar.buttongroup
pk: 26
@@ -34,83 +34,100 @@
- fields: {name: Style znakowe, position: 0, slug: style-znakowe}
model: toolbar.buttongroup
pk: 15
+- fields: {name: Uwaga, position: 0, slug: uwaga}
+ model: toolbar.buttongroup
+ pk: 29
- fields: {name: Wersy, position: 0, slug: wersy}
model: toolbar.buttongroup
pk: 17
- fields:
- group: [14, 12]
accesskey: a
+ group: [14, 12]
label: akapit
link: ''
- params: '{"tag": "akap"}'
+ params: '{"padding_top": 1, "padding_bottom": 3, "tag": "akap"}'
scriptlet: insert_tag
slug: akapit
tooltip: wstawia akapit
model: toolbar.button
pk: 39
- fields:
- group: [14]
accesskey: ''
+ group: [14]
label: akapit cd.
link: ''
- params: '{"tag": "akap_cd"}'
+ params: '{"padding_top": 1, "padding_bottom": 3, "tag": "akap_cd"}'
scriptlet: insert_tag
slug: akapit-cd
tooltip: "ci\u0105g dalszy akapitu po wewn\u0105trzakapitowym wtr\u0105ceniu"
model: toolbar.button
pk: 40
- fields:
- group: [14]
accesskey: d
+ group: [14]
label: akapit dialogowy
link: ''
- params: '{"tag": "akap_dialog"}'
+ params: '{"padding_top": 1, "padding_bottom": 3, "tag": "akap_dialog"}'
scriptlet: insert_tag
slug: akapit-dialogowy
tooltip: wstawia akapit dialogowy
model: toolbar.button
pk: 41
- fields:
- group: [1]
accesskey: ''
+ group: [28]
+ label: akapity
+ link: ''
+ params: '{"tag": "akap"}'
+ scriptlet: autotag
+ slug: akapity
+ tooltip: "autotagowanie akapit\xF3w"
+ model: toolbar.button
+ pk: 97
+- fields:
+ accesskey: ''
+ group: [1]
label: akt
link: ''
- params: '{"tag": "akt"}'
+ params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_akt"}'
scriptlet: insert_tag
slug: akt
tooltip: ''
model: toolbar.button
pk: 14
- fields:
- group: [13]
accesskey: ''
+ group: [13]
label: autor
link: ''
- params: '{"tag": "autor_utworu"}'
+ params: '{"padding_top": 1, "padding_bottom": 2, "tag": "autor_utworu"}'
scriptlet: insert_tag
slug: autor
tooltip: ''
model: toolbar.button
pk: 32
- fields:
- group: [2]
accesskey: ''
+ group: [2]
label: Podstawowa
link: ''
params: '[["fulltextregexp", {"exprs": [["\ufeff", ""], ["$[\\s]*\\d+[\\s]*^",
- ""], ["-\\s*^", ""], ["\\,\\.\\.|\\.\\,\\.|\\.\\.\\,", "..."]]}], ["lineregexp",
- {"exprs": [["^\\s+|\\s+$", ""], ["\\s+", " "], ["(,,)\\s+|\\s+(\")", "$1"],
- ["(\\d)[\u2014-](\\d)", "$1--$2"], ["[\u2014]", "---"], ["<(/?)P([aert])",
- "<$1p$2"], ["([^\\.])(\\s*)
\\s*-+\\s*",
+ "--- "]]}], ["lineregexp", {"exprs": [["^\\s+|\\s+$", ""],
+ ["\\s+", " "], ["(,,)\\s+", "$1"], ["\\s+(\")", "$1"], ["([^\\.])(\\s*)AKT$1"],
+ ["^SCENA(\\s\\w*)$", "SCENA$1"], ["([A-Z\u0104\u0106\u0118\u0141\u0143\u00d3\u015a\u017b\u0179]{2}[A-Z\u0104\u0106\u0118\u0141\u0143\u00d3\u015a\u017b\u0179\\s]+)$",
+ "$1"]]}'
+ scriptlet: lineregexp
+ slug: nagl-dramatu
+ tooltip: "autotagowanie akt\xF3w, scen, nag\u0142\xF3wk\xF3w os\xF3b"
+ model: toolbar.button
+ pk: 103
+- fields:
+ accesskey: ''
+ group: [12]
label: "nag\u0142\xF3wek kwestii"
link: ''
- params: '{"tag": "naglowek_osoba"}'
+ params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_osoba"}'
scriptlet: insert_tag
slug: naglowek-kwestii
tooltip: "nag\u0142\xF3wek kwestii - nazwa osoby"
model: toolbar.button
pk: 16
- fields:
- group: [22]
accesskey: ''
+ group: [22]
label: "nag\u0142\xF3wek listy"
link: ''
- params: '{"tag": "naglowek_listy"}'
+ params: '{"padding_top": 1, "padding_bottom": 2, "tag": "naglowek_listy"}'
scriptlet: insert_tag
slug: naglowek-listy
tooltip: "nag\u0142\xF3wek listy os\xF3b"
model: toolbar.button
pk: 94
- fields:
- group: [13]
accesskey: ''
+ group: [13]
label: nazwa utworu
link: ''
- params: '{"tag": "nazwa_utworu"}'
+ params: '{"padding_top": 1, "padding_bottom": 2, "tag": "nazwa_utworu"}'
scriptlet: insert_tag
slug: nazwa-utworu
tooltip: ''
model: toolbar.button
pk: 33
- fields:
- group: [13]
accesskey: ''
+ group: [13]
label: nota
link: ''
params: '{"tag": "nota"}'
@@ -410,19 +487,30 @@
model: toolbar.button
pk: 35
- fields:
- group: [11]
accesskey: ''
+ group: [13]
+ label: nota red.
+ link: ''
+ params: '{"padding_top": 1, "padding_bottom": 3, "tag": "nota_red"}'
+ scriptlet: insert_tag
+ slug: nota-red
+ tooltip: nota redakcyjna
+ model: toolbar.button
+ pk: 104
+- fields:
+ accesskey: ''
+ group: [11]
label: opowiadanie
link: ''
- params: '{"tag": "opowiadanie"}'
+ params: '{"padding_top": 1, "padding_bottom": 4, "tag": "opowiadanie"}'
scriptlet: insert_tag
slug: opowiadanie
tooltip: ''
model: toolbar.button
pk: 18
- fields:
- group: [12]
accesskey: b
+ group: [12]
label: osoba
link: ''
params: '{"tag": "osoba"}'
@@ -432,19 +520,19 @@
model: toolbar.button
pk: 64
- fields:
- group: [22]
accesskey: ''
+ group: [22]
label: osoba na liscie
link: ''
- params: '{"tag": "lista_osoba"}'
+ params: '{"padding_top": 1, "padding_bottom": 1, "tag": "lista_osoba"}'
scriptlet: insert_tag
slug: osoba-na-liscie
tooltip: "nazwa osoby na liscie os\xF3b"
model: toolbar.button
pk: 95
- fields:
- group: [1]
accesskey: ''
+ group: [1]
label: "podrozdzia\u0142"
link: ''
params: '{"tag": "naglowek_podrozdzial"}'
@@ -454,8 +542,8 @@
model: toolbar.button
pk: 12
- fields:
- group: [1]
accesskey: ''
+ group: [1]
label: "podtytu\u0142"
link: ''
params: '{"tag": "podtytul"}'
@@ -465,19 +553,19 @@
model: toolbar.button
pk: 34
- fields:
- group: [11]
accesskey: ''
+ group: [11]
label: "powie\u015B\u0107"
link: ''
- params: '{"tag": "powiesc"}'
+ params: '{"padding_top": 1, "padding_bottom": 4, "tag": "powiesc"}'
scriptlet: insert_tag
slug: powiesc
tooltip: ''
model: toolbar.button
pk: 19
- fields:
- group: []
accesskey: ''
+ group: []
label: Wydrukuj
link: print/xml
params: '[]'
@@ -487,8 +575,8 @@
model: toolbar.button
pk: 86
- fields:
- group: [26]
accesskey: ''
+ group: [26]
label: przypis autorski
link: ''
params: '{"tag": "pa"}'
@@ -498,8 +586,8 @@
model: toolbar.button
pk: 68
- fields:
- group: [26]
accesskey: ''
+ group: [26]
label: przypis edytorski
link: ''
params: '{"tag": "pe"}'
@@ -509,8 +597,8 @@
model: toolbar.button
pk: 71
- fields:
- group: [26]
accesskey: ''
+ group: [26]
label: przypis redaktorski
link: ''
params: '{"tag": "pr"}'
@@ -520,8 +608,8 @@
model: toolbar.button
pk: 70
- fields:
- group: [26]
accesskey: ''
+ group: [26]
label: "przypis t\u0142umacza"
link: ''
params: '{"tag": "pt"}'
@@ -531,19 +619,19 @@
model: toolbar.button
pk: 69
- fields:
- group: [1]
accesskey: ''
+ group: [1]
label: "rozdzia\u0142"
link: ''
- params: '{"tag": "naglowek_rozdzial"}'
+ params: '{"padding_top": 1, "padding_bottom": 4, "tag": "naglowek_rozdzial"}'
scriptlet: insert_tag
slug: rozdzial
tooltip: ''
model: toolbar.button
pk: 11
- fields:
- group: [1]
accesskey: ''
+ group: [1]
label: scena
link: ''
params: '{"tag": "naglowek_scena"}'
@@ -553,8 +641,8 @@
model: toolbar.button
pk: 15
- fields:
- group: [16]
accesskey: ''
+ group: [16]
label: asterysk
link: ''
params: '{"nocontent": "true", "tag": "sekcja_asterysk"}'
@@ -564,8 +652,8 @@
model: toolbar.button
pk: 54
- fields:
- group: [16]
accesskey: ''
+ group: [16]
label: linia
link: ''
params: '{"nocontent": "true", "tag": "separator_linia"}'
@@ -575,8 +663,8 @@
model: toolbar.button
pk: 55
- fields:
- group: [16]
accesskey: ''
+ group: [16]
label: "\u015Bwiat\u0142o"
link: ''
params: '{"nocontent": "true", "tag": "sekcja_swiatlo"}'
@@ -586,8 +674,8 @@
model: toolbar.button
pk: 53
- fields:
- group: [15]
accesskey: ''
+ group: [15]
label: "s\u0142owo obce"
link: ''
params: '{"tag": "slowo_obce"}'
@@ -597,8 +685,19 @@
model: toolbar.button
pk: 46
- fields:
- group: [1]
accesskey: ''
+ group: [2]
+ label: slug
+ link: ''
+ params: '[]'
+ scriptlet: slugify
+ slug: slug
+ tooltip: slugifikacja
+ model: toolbar.button
+ pk: 105
+- fields:
+ accesskey: ''
+ group: [1]
label: "\u015Br\xF3dtytu\u0142"
link: ''
params: '{"tag": "srodtytul"}'
@@ -608,31 +707,30 @@
model: toolbar.button
pk: 13
- fields:
- group: [2]
- accesskey: ''
- label: "Usu\u0144 spacj\u0119"
- link: ''
- params: '{"exprs": [["^\\s+|\\s+$", ""], ["\\s+", " "], ["(,,)\\s+", "$1"],
- ["\\s+(\")", "$1"]]}'
- scriptlet: lineregexp
- slug: strip_whitespace
- tooltip: "Usuwa zb\u0119dne spacj\u0119 z dokumentu."
- model: toolbar.button
- pk: 3
-- fields:
- group: [12, 17]
accesskey: s
+ group: [12, 17]
label: strofa
link: ''
- params: '{"tag": "strofa"}'
+ params: '{"padding_top": 1, "padding_bottom": 3, "tag": "strofa"}'
scriptlet: insert_stanza
slug: strofa
tooltip: "wstawia strof\u0119"
model: toolbar.button
pk: 81
- fields:
- group: [11]
accesskey: ''
+ group: [28]
+ label: strofy
+ link: ''
+ params: '{"tag": "strofa"}'
+ scriptlet: autotag
+ slug: strofy
+ tooltip: autotagowanie strof
+ model: toolbar.button
+ pk: 99
+- fields:
+ accesskey: ''
+ group: [11]
label: "tag g\u0142\xF3wny"
link: ''
params: '{"tag": "utwor"}'
@@ -642,8 +740,8 @@
model: toolbar.button
pk: 17
- fields:
- group: [2]
accesskey: u
+ group: [2]
label: "A\u2193"
link: ''
params: '[]'
@@ -653,8 +751,8 @@
model: toolbar.button
pk: 76
- fields:
- group: [15]
accesskey: ''
+ group: [15]
label: "tytu\u0142 dzie\u0142a"
link: ''
params: '{"tag": "tytul_dziela"}'
@@ -664,8 +762,8 @@
model: toolbar.button
pk: 92
- fields:
- group: [15]
accesskey: ''
+ group: [15]
label: "tytu\u0142 dzie\u0142a typ 1"
link: ''
params: '{"tag": "tytul_dziela", "attrs": {"typ": "1"}}'
@@ -675,8 +773,8 @@
model: toolbar.button
pk: 45
- fields:
- group: [27]
accesskey: ''
+ group: [29]
label: uwaga
link: ''
params: '{"tag": "uwaga"}'
@@ -686,8 +784,8 @@
model: toolbar.button
pk: 51
- fields:
- group: [14, 17]
accesskey: ''
+ group: [14, 17]
label: wers akap.
link: ''
params: '{"tag": "wers_akap"}'
@@ -697,8 +795,8 @@
model: toolbar.button
pk: 83
- fields:
- group: [12, 17]
accesskey: ''
+ group: [12, 17]
label: wers cd.
link: ''
params: '{"tag": "wers_cd"}'
@@ -708,8 +806,8 @@
model: toolbar.button
pk: 85
- fields:
- group: [12, 17]
accesskey: w
+ group: [12, 17]
label: "wers mocno wci\u0119ty"
link: ''
params: '{"tag": "wers_wciety", "attrs": {"typ": ""}}'
@@ -719,8 +817,8 @@
model: toolbar.button
pk: 84
- fields:
- group: [12, 17]
accesskey: q
+ group: [12, 17]
label: "wers wci\u0119ty"
link: ''
params: '{"tag": "wers_wciety", "attrs": {"typ": "1"}}'
@@ -730,8 +828,19 @@
model: toolbar.button
pk: 91
- fields:
- group: [15]
accesskey: ''
+ group: [28]
+ label: "wersy wci\u0119te"
+ link: ''
+ params: '{"padding": 1, "tag": "wers_wciety", "split": 1}'
+ scriptlet: autotag
+ slug: wersy-wciete
+ tooltip: "autotagowanie wers\xF3w wci\u0119tych"
+ model: toolbar.button
+ pk: 100
+- fields:
+ accesskey: ''
+ group: [15]
label: www
link: ''
params: '{"tag": "www"}'
@@ -741,8 +850,8 @@
model: toolbar.button
pk: 48
- fields:
- group: [15]
accesskey: ''
+ group: [12, 15]
label: "wyr\xF3\u017Cnienie"
link: ''
params: '{"tag": "wyroznienie"}'
@@ -752,19 +861,19 @@
model: toolbar.button
pk: 44
- fields:
- group: [11]
accesskey: ''
+ group: [11]
label: wywiad
link: ''
- params: '{"tag": "wywiad"}'
+ params: '{"padding_top": 1, "padding_bottom": 4, "tag": "wywiad"}'
scriptlet: insert_tag
slug: wywiad
tooltip: ''
model: toolbar.button
pk: 25
- fields:
- group: [21]
accesskey: ''
+ group: [21]
label: "wywiad odpowied\u017A"
link: ''
params: '{"tag": "wywiad_odp"}'
@@ -774,8 +883,8 @@
model: toolbar.button
pk: 73
- fields:
- group: [21]
accesskey: ''
+ group: [21]
label: wywiad pytanie
link: ''
params: '{"tag": "wywiad_pyt"}'
@@ -785,21 +894,8 @@
model: toolbar.button
pk: 72
- fields:
- group: [2]
accesskey: ''
- label: "Zamie\u0144 dywiz"
- link: ''
- params: '{"exprs": [["(\\s)-(\\s)", "$1---$2"], ["^(\\s*)-(\\s)", "$1---$2"],
- ["(\\s)-(\\s*)$", "$1---$2"], ["(\\d)[\u2014\u2013\u2010-](\\d)", "$1--$2"],
- ["\u2014\u2013\u2010", "---"]]}'
- scriptlet: lineregexp
- slug: zamien_dywiz
- tooltip: "Zamienia '\u2014' na '---', oraz '1\u20142' na '1--2'."
- model: toolbar.button
- pk: 2
-- fields:
group: [16]
- accesskey: ''
label: "zast\u0119pnik wersu"
link: ''
params: '{"tag": "zastepnik_wersu"}'
@@ -808,6 +904,10 @@
tooltip: wykropkowanie wersu
model: toolbar.button
pk: 56
+- fields: {code: "$(params).each(function() {\n $.log(this[0], this[1]);\n \
+ \ editor.callScriptlet(this[0], panel, this[1]);\n\n});"}
+ model: toolbar.scriptlet
+ pk: macro
- fields: {code: "var texteditor = panel.texteditor;\nvar text = texteditor.selection();\n\
var start_tag = '<'+params.tag;\nfor (var attr in params.attrs) {\n \
\ start_tag += ' '+attr+'=\"' + params.attrs[attr] + '\"';\n};\nstart_tag\
@@ -845,6 +945,9 @@
\ cm.selectLines( cm.nthLine(cpos.line), cpos.character )"}
model: toolbar.scriptlet
pk: lineregexp
+- fields: {code: '-'}
+ model: toolbar.scriptlet
+ pk: autotag
- fields: {code: "editor.showPopup('generic-info', 'Przetwarzanie zaznaczonego tekstu...',\
\ '', -1);\n$.log(editor, panel, params);\nvar cm = panel.texteditor;\n\
var exprs = $.map(params.exprs, function(expr) {\n var opts = \"mg\"\
@@ -862,10 +965,6 @@
\ cm.nthLine(cpos.line), cpos.character );\n}"}
model: toolbar.scriptlet
pk: fulltextregexp
-- fields: {code: "$(params).each(function() {\n $.log(this[0], this[1]);\n \
- \ editor.callScriptlet(this[0], panel, this[1]);\n\n});"}
- model: toolbar.scriptlet
- pk: macro
- fields: {code: "var cm = panel.texteditor;\r\nvar text = cm.selection();\r\n\r\
\nif(!text) return;\r\nvar repl = '';\r\nvar lcase = text.toLowerCase();\r\
\nvar ucase = text.toUpperCase();\r\n\r\nif(lcase == text) repl = ucase;\
@@ -892,4 +991,7 @@
\r\n\r\n\r\n\r\n\r\n\r\n\r\npanel.fireEvent('contentChanged');"}
model: toolbar.scriptlet
pk: insert_stanza
+- fields: {code: '-'}
+ model: toolbar.scriptlet
+ pk: slugify