Server : Apache System : Linux webd348.cluster026.gra.hosting.ovh.net 5.15.148-ovh-vps-grsec-zfs-classid #1 SMP Thu Feb 8 09:41:04 UTC 2024 x86_64 User : hednacluml ( 122243) PHP Version : 8.3.9 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/hednacluml/chretien/local/cache-js/ |
/* #PRODUIRE{fond=javascript/porte_plume_start.js,hash=80dc86f43c63c6438f68f1a05a71b5bb,inserer_auto_name_texte=1,lang=ru} md5:37ba18058b620e2f51303af2aadb7162 */ barre_outils_edition = { "nameSpace": "edition", "previewAutoRefresh": false, "onEnter": { "keepDefault": false, "selectionType": "return", "replaceWith": "\n" }, "onShiftEnter": { "keepDefault": false, "replaceWith": "\n_ " }, "onCtrlEnter": { "keepDefault": false, "replaceWith": "\n\n" }, "markupSet": [ { "name": "{{{\u041f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a}}}", "key": "H", "className": "outil_header1", "openWith": "\n{{{", "closeWith": "}}}\n", "selectionType": "line" }, { "name": "{{\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439}}", "key": "B", "className": "outil_bold", "replaceWith": function(h){ return espace_si_accolade(h, '{{', '}}');}, "selectionType": "word" }, { "name": "{\u041a\u0443\u0440\u0441\u0438\u0432}", "key": "I", "className": "outil_italic", "replaceWith": function(h){ return espace_si_accolade(h, '{', '}');}, "selectionType": "word" }, { "name": "\u0421\u043f\u0438\u0441\u043e\u043a", "className": "outil_liste_ul separateur_avant", "replaceWith": function(h){ return outil_liste(h, '*');}, "selectionType": "line", "forceMultiline": true, "dropMenu": [ { "id": "liste_ol", "name": "\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a", "className": "outil_liste_ol", "replaceWith": function(h){ return outil_liste(h, '#');}, "display": true, "selectionType": "line", "forceMultiline": true }, { "id": "desindenter", "name": "\u0423\u0431\u0440\u0430\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f", "className": "outil_desindenter", "replaceWith": function(h){return outil_desindenter(h);}, "display": true, "selectionType": "line", "forceMultiline": true }, { "id": "indenter", "name": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f", "className": "outil_indenter", "replaceWith": function(h){return outil_indenter(h);}, "display": true, "selectionType": "line", "forceMultiline": true } ] }, { "name": "\u0421\u0434\u0435\u043b\u0430\u0442\u044c [\u0441\u0441\u044b\u043b\u043a\u043e\u0439->http:\/\/...]", "key": "L", "className": "outil_link separateur separateur_apres sepLink", "openWith": "[", "closeWith": "->[![\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 ( \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 URL http:\/\/www.monsite.com \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0430\u0442\u044c\u0438).]!]]" }, { "name": "\u0421\u0434\u0435\u043b\u0430\u0442\u044c [[\u0441\u043d\u043e\u0441\u043a\u0443]]", "className": "outil_notes separateur_avant", "openWith": "[[", "closeWith": "]]", "selectionType": "word" }, { "name": "<quote>\u0426\u0438\u0442\u0430\u0442\u0430<\/quote>", "key": "Q", "className": "outil_quote separateur separateur_apres sepGuillemets", "openWith": "\n<quote>", "closeWith": "<\/quote>\n", "selectionType": "word", "dropMenu": [ { "id": "barre_poesie", "name": "\u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f <poesie>\u043f\u043e\u044d\u0437\u0438\u0438<\/poesie>", "className": "outil_poesie", "openWith": "\n<poesie>", "closeWith": "<\/poesie>\n", "display": true, "selectionType": "line" } ] }, { "name": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u00ab \u0434\u0432\u043e\u0439\u043d\u044b\u043c\u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438 \u00bb", "className": "outil_guillemets", "openWith": "«", "closeWith": "»", "lang": [ "fr", "eo", "cpf", "ar", "es" ], "selectionType": "word", "dropMenu": [ { "id": "guillemets_simples", "name": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u201c\u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438\u201d", "className": "outil_guillemets_simples", "openWith": "“", "closeWith": "”", "display": true, "lang": [ "fr", "eo", "cpf", "ar", "es" ], "selectionType": "word" } ] }, { "name": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u00ab \u0434\u0432\u043e\u0439\u043d\u044b\u043c\u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438 \u00bb", "className": "outil_guillemets_de", "openWith": "„", "closeWith": "“", "lang": [ "bg", "de", "pl", "hr", "src" ], "selectionType": "word", "dropMenu": [ { "id": "guillemets_de_simples", "name": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u201c\u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438\u201d", "className": "outil_guillemets_de_simples", "openWith": "‚", "closeWith": "‘", "display": true, "lang": [ "bg", "de", "pl", "hr", "src" ], "selectionType": "word" } ] }, { "name": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u00ab \u0434\u0432\u043e\u0439\u043d\u044b\u043c\u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438 \u00bb", "className": "outil_guillemets_simples separateur_avant", "openWith": "“", "closeWith": "”", "lang_not": [ "fr", "eo", "cpf", "ar", "es", "bg", "de", "pl", "hr", "src" ], "selectionType": "word", "dropMenu": [ { "id": "guillemets_autres_simples", "name": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u201c\u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438\u201d", "className": "outil_guillemets_uniques", "openWith": "‘", "closeWith": "’", "display": true, "lang_not": [ "fr", "eo", "cpf", "ar", "es", "bg", "de", "pl", "hr", "src" ], "selectionType": "word" } ] }, { "name": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b", "className": "outil_caracteres separateur separateur_apres sepCaracteres", "dropMenu": [ { "id": "A_grave", "name": "\u0421\u0438\u043c\u0432\u043e\u043b \u00c0", "className": "outil_a_maj_grave", "replaceWith": "À", "display": true, "lang": [ "fr", "eo", "cpf" ] }, { "id": "E_aigu", "name": "\u0421\u0438\u043c\u0432\u043e\u043b \u00c9", "className": "outil_e_maj_aigu", "replaceWith": "É", "display": true, "lang": [ "fr", "eo", "cpf" ] }, { "id": "E_grave", "name": "\u0421\u0438\u043c\u0432\u043e\u043b \u00c8", "className": "outil_e_maj_grave", "replaceWith": "È", "display": true, "lang": [ "fr", "eo", "cpf" ] }, { "id": "aelig", "name": "\u0421\u0438\u043c\u0432\u043e\u043b \u00e6", "className": "outil_aelig", "replaceWith": "æ", "display": true, "lang": [ "fr", "eo", "cpf" ] }, { "id": "AElig", "name": "\u0421\u0438\u043c\u0432\u043e\u043b \u00c6", "className": "outil_aelig_maj", "replaceWith": "Æ", "display": true, "lang": [ "fr", "eo", "cpf" ] }, { "id": "oe", "name": "\u0421\u0438\u043c\u0432\u043e\u043b \u0153", "className": "outil_oe", "replaceWith": "œ", "display": true, "lang": [ "fr" ] }, { "id": "OE", "name": "\u0421\u0438\u043c\u0432\u043e\u043b \u0152", "className": "outil_oe_maj", "replaceWith": "Œ", "display": true, "lang": [ "fr" ] }, { "id": "Ccedil", "name": "\u0421\u0438\u043c\u0432\u043e\u043b \u00c7", "className": "outil_ccedil_maj", "replaceWith": "Ç", "display": true, "lang": [ "fr", "eo", "cpf" ] }, { "id": "uppercase", "name": "\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u041f\u0420\u041e\u041f\u0418\u0421\u041d\u042b\u041c\u0418", "className": "outil_uppercase", "replaceWith": function(markitup) { return markitup.selection.toUpperCase() }, "display": true, "lang": [ "fr", "en" ] }, { "id": "lowercase", "name": "\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438", "className": "outil_lowercase", "replaceWith": function(markitup) { return markitup.selection.toLowerCase() }, "display": true, "lang": [ "fr", "en" ] }, { "id": "arrow", "name": "fleche", "className": "outil_fleche", "replaceWith": "→", "display": true } ] }, { "name": "utiliser un outil d'Escal", "className": "outil_ajouts_escal separateur_avant", "dropMenu": [ { "id": "escal_aide", "name": "apporter <aide>une aide<\/aide>", "className": "outil_escal_aide", "openWith": "\n<aide>", "closeWith": "<\/aide>\n", "display": true, "selectionType": "line" }, { "id": "escal_important", "name": "une <important>remarque importante<\/important>", "className": "outil_escal_important", "openWith": "\n<important>", "closeWith": "<\/important>\n", "display": true, "selectionType": "line" }, { "id": "escal_avertissement", "name": "une <avertissement>remarque moyennement importante<\/avertissement>", "className": "outil_escal_avertissement", "openWith": "\n<avertissement>", "closeWith": "<\/avertissement>\n", "display": true, "selectionType": "line" }, { "id": "escal_info", "name": "une <info>information<\/info>", "className": "outil_escal_info", "openWith": "\n<info>", "closeWith": "<\/info>\n", "display": true, "selectionType": "line" }, { "id": "escal_centrer", "name": "<centrer>centrer le paragraphe<\/centrer>", "className": "outil_escal_centrer", "openWith": "\n[|", "closeWith": "|]\n", "display": true, "selectionType": "line" } ] }, { "name": "\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 (code)", "className": "outil_code separateur separateur_apres sepCode", "openWith": "`", "closeWith": "`", "dropMenu": [ { "id": "cadre", "name": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 (cadre)", "className": "outil_cadre", "openWith": "```\n", "closeWith": "\n```", "display": true } ] } ] } // remplace ou cree -* ou -** ou -# ou -## function outil_liste(h, c) { if ((s = h.selection) && (r = s.match(/^-([*#]+) (.*)$/))) { r[1] = r[1].replace(/[#*]/g, c); s = '-'+r[1]+' '+r[2]; } else { s = '-' + c + ' '+s; } return s; } // indente des -* ou -# function outil_indenter(h) { if (s = h.selection) { if (s.substr(0,2)=='-*') { s = '-**' + s.substr(2); } else if (s.substr(0,2)=='-#') { s = '-##' + s.substr(2); } else { s = '-* ' + s; } } return s; } // desindente des -* ou -** ou -# ou -## function outil_desindenter(h){ if (s = h.selection) { if (s.substr(0,3)=='-**') { s = '-*' + s.substr(3); } else if (s.substr(0,3)=='-* ') { s = s.substr(3); } else if (s.substr(0,3)=='-##') { s = '-#' + s.substr(3); } else if (s.substr(0,3)=='-# ') { s = s.substr(3); } } return s; } // ajouter un espace avant, apres un {qqc} pour ne pas que // gras {{}} suivi de italique {} donnent {{{}}}, mais { {{}} } function espace_si_accolade(h, openWith, closeWith){ if (s = h.selection) { // accolade dans la selection if (s.charAt(0)=='{') { return openWith + ' ' + s + ' ' + closeWith; } // accolade avant la selection else if (c = h.textarea.selectionStart) { if (h.textarea.value.charAt(c-1) == '{') { return ' ' + openWith + s + closeWith + ' '; } } } return openWith + s + closeWith; } barre_outils_forum = { "nameSpace": "forum", "previewAutoRefresh": false, "onEnter": { "keepDefault": false, "selectionType": "return", "replaceWith": "\n" }, "onShiftEnter": { "keepDefault": false, "replaceWith": "\n_ " }, "onCtrlEnter": { "keepDefault": false, "replaceWith": "\n\n" }, "markupSet": [ { "name": "{{\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439}}", "key": "B", "className": "outil_bold", "replaceWith": function(h){ return espace_si_accolade(h, '{{', '}}');}, "selectionType": "word" }, { "name": "{\u041a\u0443\u0440\u0441\u0438\u0432}", "key": "I", "className": "outil_italic separateur_avant", "replaceWith": function(h){ return espace_si_accolade(h, '{', '}');}, "selectionType": "word" }, { "name": "\u0421\u0434\u0435\u043b\u0430\u0442\u044c [\u0441\u0441\u044b\u043b\u043a\u043e\u0439->http:\/\/...]", "key": "L", "className": "outil_link separateur separateur_apres sepLink separateur_avant", "openWith": "[", "closeWith": "->[![\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 ( \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 URL http:\/\/www.monsite.com \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0430\u0442\u044c\u0438).]!]]" }, { "name": "<quote>\u0426\u0438\u0442\u0430\u0442\u0430<\/quote>", "key": "Q", "className": "outil_quote separateur separateur_apres sepGuillemets", "openWith": "\n<quote>", "closeWith": "<\/quote>\n", "selectionType": "word" }, { "name": "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code> \u0442\u0435\u043a\u0441\u0442 <\/code>", "className": "outil_barre_code", "openWith": "<code>", "closeWith": "<\/code>", "selectionType": "word", "dropMenu": [ { "id": "barre_cadre", "name": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c <cadre>\u0442\u0435\u043a\u0441\u0442<\/cadre>", "className": "outil_barre_cadre", "openWith": "\n<cadre>", "closeWith": "<\/cadre>\n", "display": true, "selectionType": "line" } ] }, { "name": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u00ab \u0434\u0432\u043e\u0439\u043d\u044b\u043c\u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438 \u00bb", "className": "outil_guillemets", "openWith": "«", "closeWith": "»", "lang": [ "fr", "eo", "cpf", "ar", "es" ], "selectionType": "word", "dropMenu": [ { "id": "guillemets_simples", "name": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u201c\u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438\u201d", "className": "outil_guillemets_simples", "openWith": "“", "closeWith": "”", "display": true, "lang": [ "fr", "eo", "cpf", "ar", "es" ], "selectionType": "word" } ] }, { "name": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u00ab \u0434\u0432\u043e\u0439\u043d\u044b\u043c\u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438 \u00bb", "className": "outil_guillemets_de", "openWith": "„", "closeWith": "“", "lang": [ "bg", "de", "pl", "hr", "src" ], "selectionType": "word", "dropMenu": [ { "id": "guillemets_de_simples", "name": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u201c\u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438\u201d", "className": "outil_guillemets_de_simples", "openWith": "‚", "closeWith": "‘", "display": true, "lang": [ "bg", "de", "pl", "hr", "src" ], "selectionType": "word" } ] }, { "name": "\u0412\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u00ab \u0434\u0432\u043e\u0439\u043d\u044b\u043c\u0438 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438 \u00bb", "className": "outil_guillemets_simples separateur_avant", "openWith": "“", "closeWith": "”", "lang_not": [ "fr", "eo", "cpf", "ar", "es", "bg", "de", "pl", "hr", "src" ], "selectionType": "word", "dropMenu": [ { "id": "guillemets_autres_simples", "name": "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u201c\u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438\u201d", "className": "outil_guillemets_uniques", "openWith": "‘", "closeWith": "’", "display": true, "lang_not": [ "fr", "eo", "cpf", "ar", "es", "bg", "de", "pl", "hr", "src" ], "selectionType": "word" } ] } ] } // remplace ou cree -* ou -** ou -# ou -## function outil_liste(h, c) { if ((s = h.selection) && (r = s.match(/^-([*#]+) (.*)$/))) { r[1] = r[1].replace(/[#*]/g, c); s = '-'+r[1]+' '+r[2]; } else { s = '-' + c + ' '+s; } return s; } // indente des -* ou -# function outil_indenter(h) { if (s = h.selection) { if (s.substr(0,2)=='-*') { s = '-**' + s.substr(2); } else if (s.substr(0,2)=='-#') { s = '-##' + s.substr(2); } else { s = '-* ' + s; } } return s; } // desindente des -* ou -** ou -# ou -## function outil_desindenter(h){ if (s = h.selection) { if (s.substr(0,3)=='-**') { s = '-*' + s.substr(3); } else if (s.substr(0,3)=='-* ') { s = s.substr(3); } else if (s.substr(0,3)=='-##') { s = '-#' + s.substr(3); } else if (s.substr(0,3)=='-# ') { s = s.substr(3); } } return s; } // ajouter un espace avant, apres un {qqc} pour ne pas que // gras {{}} suivi de italique {} donnent {{{}}}, mais { {{}} } function espace_si_accolade(h, openWith, closeWith){ if (s = h.selection) { // accolade dans la selection if (s.charAt(0)=='{') { return openWith + ' ' + s + ' ' + closeWith; } // accolade avant la selection else if (c = h.textarea.selectionStart) { if (h.textarea.value.charAt(c-1) == '{') { return ' ' + openWith + s + closeWith + ' '; } } } return openWith + s + closeWith; } barre_outils_vide = { "nameSpace": "vide", "previewAutoRefresh": false, "markupSet": [] } ;(function($){ // 2 fonctions pour appeler le porte plume reutilisables pour d'autres plugins // on envoie dedans la selection jquery qui doit etre effectuee // ce qui evite des appels direct a markitup, aucazou on change de lib un jour $.fn.barre_outils = function(nom, settings) { options = { lang:'ru' }; $.extend(options, settings); return $(this) .not('.markItUpEditor, .no_barre') .markItUp(eval('barre_outils_' + nom), {lang:options.lang}) .trigger('markItUpEditor.loaded') .parent().find('.markItUpButton a').attr('tabindex', -1) // ne pas tabuler les boutons .end(); }; $.fn.barre_previsualisation = function(settings) { options = { previewParserPath:"index.php?action=porte_plume_previsu", // ici une url relative pour prive/public textEditer:"Изменить", textVoir:"Пред.просмотр" }; $.extend(options, settings); return $(this) .not('.pp_previsualisation, .no_previsualisation') .previsu_spip(options) .trigger('markItUpPreview.loaded') .parent().find('.markItUpTabs a').attr('tabindex', -1) // ne pas tabuler les onglets .end(); }; $(window).on('load', function(){ // ajoute les barres d'outils markitup function barrebouilles(){ // fonction generique appliquee aux classes CSS : // inserer_barre_forum, inserer_barre_edition, inserer_previsualisation $('.formulaire_spip textarea.inserer_barre_forum').barre_outils('forum'); $('.formulaire_spip textarea.inserer_barre_edition').barre_outils('edition'); $('.formulaire_spip textarea.inserer_previsualisation').barre_previsualisation(); // fonction specifique aux formulaires de SPIP : // barre de forum $('textarea.textarea_forum').barre_outils('forum'); $('.formulaire_forum textarea[name=texte]').barre_outils('forum'); // barre d'edition et onglets de previsualisation $('.formulaire_spip textarea[name=texte]') .barre_outils('edition').end() .barre_previsualisation(); } barrebouilles(); onAjaxLoad(barrebouilles); }); })(jQuery);