X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/483b49a917211353f1707012c77531cc0d06d99f..452e9a06fe01f0501893df257366689024b54492:/apps/toolbar/fixtures/initial_data.yaml diff --git a/apps/toolbar/fixtures/initial_data.yaml b/apps/toolbar/fixtures/initial_data.yaml index e158c080..7ff8e302 100644 --- a/apps/toolbar/fixtures/initial_data.yaml +++ b/apps/toolbar/fixtures/initial_data.yaml @@ -25,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 @@ -37,6 +34,9 @@ - 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 @@ -274,7 +274,7 @@ pk: 38 - fields: accesskey: '' - group: [27] + group: [] label: extra link: '' params: '{"tag": "extra"}' @@ -305,6 +305,28 @@ tooltip: "wstawia kwesti\u0119" model: toolbar.button pk: 82 +- fields: + accesskey: '' + group: [12] + label: kwestioakapit + link: '' + params: '[["insert_tag", {"tag": "akap"}], ["insert_tag", {"tag": "kwestia"}]]' + scriptlet: macro + slug: kwestioakapit + tooltip: '' + model: toolbar.button + pk: 101 +- fields: + accesskey: '' + group: [12] + label: kwestiostrofa + link: '' + params: '[["insert_stanza", {"tag": "strofa"}], ["insert_tag", {"tag": "kwestia"}]]' + scriptlet: macro + slug: kwestiostrofa + tooltip: '' + model: toolbar.button + pk: 102 - fields: accesskey: '' group: [11] @@ -404,6 +426,19 @@ tooltip: "Zamienia cudzys\u0142owy podw\xF3jne na niemieckie" model: toolbar.button pk: 3 +- fields: + accesskey: '' + group: [28] + label: "nag\u0142. dramatu" + link: '' + params: '{"exprs": [["^AKT(\\s\\w*)$", "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] @@ -714,7 +749,7 @@ pk: 45 - fields: accesskey: '' - group: [27] + group: [29] label: uwaga link: '' params: '{"tag": "uwaga"}' @@ -844,6 +879,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\ @@ -881,6 +920,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\"\ @@ -898,10 +940,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;\ @@ -928,7 +966,4 @@ \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: autotag