X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/d2d235d21ca86ea846ef0b6174f2820df086f4d7..8f0bfbd922b46c4d9e484343694aaa141de5b4fc:/apps/toolbar/fixtures/initial_data.yaml diff --git a/apps/toolbar/fixtures/initial_data.yaml b/apps/toolbar/fixtures/initial_data.yaml index a117f9b1..7ff8e302 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,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 @@ -70,6 +73,17 @@ tooltip: wstawia akapit dialogowy model: toolbar.button pk: 41 +- fields: + 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] @@ -99,9 +113,11 @@ link: '' params: '[["fulltextregexp", {"exprs": [["\ufeff", ""], ["$[\\s]*\\d+[\\s]*^", ""], ["-\\s*^", ""], ["\\,\\.\\.|\\.\\,\\.|\\.\\.\\,", "..."], ["<(/?)P([aert])", - "<$1p$2"], ["[\u2014\u2013\u2010-]+", "---"], ["(\\d)---(\\d)", "$1--$2"], - ["(\\S)---(\\S)", "$1-$2"]]}], ["lineregexp", {"exprs": [["^\\s+|\\s+$", - ""], ["\\s+", " "], ["(,,)\\s+", "$1"], ["\\s+(\")", "$1"], ["([^\\.])(\\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] @@ -641,6 +692,17 @@ tooltip: "wstawia strof\u0119" model: toolbar.button pk: 81 +- fields: + 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] @@ -687,7 +749,7 @@ pk: 45 - fields: accesskey: '' - group: [27] + group: [29] label: uwaga link: '' params: '{"tag": "uwaga"}' @@ -740,6 +802,17 @@ tooltip: "wstawia wers wci\u0119ty" model: toolbar.button pk: 91 +- fields: + 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] @@ -806,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\ @@ -843,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\"\ @@ -860,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;\