From: <var...@us...> - 2015-04-20 16:56:54
|
Revision: 9688 http://sourceforge.net/p/phpwiki/code/9688 Author: vargenau Date: 2015-04-20 16:56:51 +0000 (Mon, 20 Apr 2015) Log Message: ----------- Make static templates in Edit Toolbar work Modified Paths: -------------- trunk/g trunk/lib/editpage.php trunk/locale/de/LC_MESSAGES/phpwiki.mo trunk/locale/es/LC_MESSAGES/phpwiki.mo trunk/locale/fr/LC_MESSAGES/phpwiki.mo trunk/locale/it/LC_MESSAGES/phpwiki.mo trunk/locale/ja/LC_MESSAGES/phpwiki.mo trunk/locale/nl/LC_MESSAGES/phpwiki.mo trunk/locale/po/de.po trunk/locale/po/es.po trunk/locale/po/fr.po trunk/locale/po/it.po trunk/locale/po/ja.po trunk/locale/po/nl.po trunk/locale/po/phpwiki.pot trunk/locale/po/sv.po trunk/locale/po/zh.po trunk/locale/sv/LC_MESSAGES/phpwiki.mo trunk/locale/zh/LC_MESSAGES/phpwiki.mo trunk/pgsrc/ReleaseNotes trunk/themes/default/toolbar.js Modified: trunk/g =================================================================== --- trunk/g 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/g 2015-04-20 16:56:51 UTC (rev 9688) @@ -184,7 +184,7 @@ define('ENABLE_AJAX', false); define('TOOLBAR_PAGELINK_PULLDOWN', false); - define('TOOLBAR_TEMPLATE_PULLDOWN', false); + define('TOOLBAR_TEMPLATE_PULLDOWN', 'Template*'); define('TOOLBAR_IMAGE_PULLDOWN', true); // Enable external pages Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/lib/editpage.php 2015-04-20 16:56:51 UTC (rev 9688) @@ -759,18 +759,17 @@ 'onclick' => "insertTags('<<RedirectTo page="','">>','"._('Page Name')."'); return true;"))); $toolbar->pushContent(HTML::img(array('src' => $WikiTheme->getImageURL("ed_templateplugin.png"), 'class' => 'toolbar', - 'alt' => _('Template'), - 'title' => _('Template'), + 'alt' => _('Insert Dynamic Template'), + 'title' => _('Insert Dynamic Template'), 'onclick' => "insertTags('{{','}}','"._('Template Name')."'); return true;"))); - + if (defined('TOOLBAR_TEMPLATE_PULLDOWN') and TOOLBAR_TEMPLATE_PULLDOWN) { + $toolbar->pushContent($this->templatePulldown(TOOLBAR_TEMPLATE_PULLDOWN)); + } $toolbar->pushContent($this->categoriesPulldown()); $toolbar->pushContent($this->pluginPulldown()); if (defined('TOOLBAR_PAGELINK_PULLDOWN') and TOOLBAR_PAGELINK_PULLDOWN) { $toolbar->pushContent($this->pagesPulldown(TOOLBAR_PAGELINK_PULLDOWN)); } - if (defined('TOOLBAR_TEMPLATE_PULLDOWN') and TOOLBAR_TEMPLATE_PULLDOWN) { - $toolbar->pushContent($this->templatePulldown(TOOLBAR_TEMPLATE_PULLDOWN)); - } if (defined('TOOLBAR_IMAGE_PULLDOWN') and TOOLBAR_IMAGE_PULLDOWN) { $toolbar->pushContent($this->imagePulldown()); } @@ -920,8 +919,8 @@ $pages_js = ''; while ($p = $page_iter->next()) { $rev = $p->getCurrentRevision(); - $toinsert = str_replace(array("\n", '"'), array('_nl', '_quot'), $rev->_get_content()); - $pages_js .= ",['" . $p->getName() . "','_nl$toinsert']"; + $toinsert = str_replace(array("\n", '"'), array('__nl__', '__quot__'), $rev->_get_content()); + $pages_js .= ",['" . $p->getName() . "','__nl__$toinsert']"; } $pages_js = substr($pages_js, 1); if (!empty($pages_js)) @@ -929,10 +928,10 @@ (array('class' => "toolbar", 'id' => 'tb-templates', 'src' => $WikiTheme->getImageURL("ed_template.png"), - 'title' => _("Insert Template"), - 'alt' => _("Insert Template"), + 'title' => _("Insert Static Template"), + 'alt' => _("Insert Static Template"), 'onclick' => "showPulldown('" . - _("Insert Template") + _("Insert Static Template") . "',[" . $pages_js . "],'" . _("Insert") . "','" . _("Close") . "','tb-templates')")); Modified: trunk/locale/de/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/es/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/it/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/ja/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/nl/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/po/de.po =================================================================== --- trunk/locale/po/de.po 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/locale/po/de.po 2015-04-20 16:56:51 UTC (rev 9688) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-10 17:01+0200\n" +"POT-Creation-Date: 2015-04-20 18:55+0200\n" "PO-Revision-Date: 2000-10-31 02:23+0200\n" "Last-Translator: Reini Urban <ru...@x-...>, Carsten Klapp " "<car...@us...>, Helmer Pardun <pardunpress@t-online." @@ -402,8 +402,8 @@ msgid "Page Name" msgstr "Seitenname" -msgid "Template" -msgstr "Vorlage" +msgid "Insert Dynamic Template" +msgstr "Dynamic Vorlage einfügen" msgid "Template Name" msgstr "Vorlagenname" @@ -423,8 +423,8 @@ msgid "Insert PageLink" msgstr "SeitenLink einfügen" -msgid "Insert Template" -msgstr "Vorlage einfügen" +msgid "Insert Static Template" +msgstr "Static Vorlage einfügen" msgid "Insert Image or Video" msgstr "Bild oder Video einfügen" @@ -2320,6 +2320,9 @@ msgid "CategoryCategory" msgstr "KategorieKategorie" +msgid "Template" +msgstr "Vorlage" + msgid "Category" msgstr "Kategorie" @@ -6080,18 +6083,18 @@ msgid "Y-m-d H:i" msgstr "" +#~ msgid "Bold text [alt-b]" +#~ msgstr "Fetter Text [alt-f]" + +#~ msgid "Italic text [alt-i]" +#~ msgstr "Kursiver Text [alt-k]" + #~ msgid "Strike" #~ msgstr "Durchstreichen" #~ msgid "Color" #~ msgstr "Farbe" -#~ msgid "Bold text [alt-b]" -#~ msgstr "Fetter Text [alt-f]" - -#~ msgid "Italic text [alt-i]" -#~ msgstr "Kursiver Text [alt-k]" - #~ msgid "H" #~ msgstr "H." Modified: trunk/locale/po/es.po =================================================================== --- trunk/locale/po/es.po 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/locale/po/es.po 2015-04-20 16:56:51 UTC (rev 9688) @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-10 17:01+0200\n" +"POT-Creation-Date: 2015-04-20 18:55+0200\n" "PO-Revision-Date: 2000-02-01 00:50-0500\n" "Last-Translator: Pablo Roca <pr...@cl...>\n" "Language-Team: \n" @@ -347,9 +347,8 @@ msgid "Strike-through text" msgstr "" -#, fuzzy msgid "Color text" -msgstr "Texto en negrilla" +msgstr "" msgid "Link to page" msgstr "Acoplamiento a la página" @@ -384,13 +383,11 @@ msgid "Sample table" msgstr "" -#, fuzzy msgid "Enumeration" -msgstr "Relación" +msgstr "" -#, fuzzy msgid "List" -msgstr "ListaPáginas" +msgstr "" msgid "Table of Contents" msgstr "Tabla de contenidos" @@ -401,12 +398,11 @@ msgid "Page Name" msgstr "Nombre de la Página" -msgid "Template" -msgstr "Plantilla" +msgid "Insert Dynamic Template" +msgstr "Inserte la dynamic plantilla" -#, fuzzy msgid "Template Name" -msgstr "Plantilla" +msgstr "" msgid "Undo Search & Replace" msgstr "Deshaga La Búsqueda Y Substitúyala" @@ -423,8 +419,8 @@ msgid "Insert PageLink" msgstr "Inserte el AcoplamientoDeLaPágina" -msgid "Insert Template" -msgstr "Inserte la plantilla" +msgid "Insert Static Template" +msgstr "Inserte la static plantilla" msgid "Insert Image or Video" msgstr "" @@ -2262,6 +2258,9 @@ msgid "CategoryCategory" msgstr "CategoriaCategoria" +msgid "Template" +msgstr "Plantilla" + msgid "Category" msgstr "Categoría" Modified: trunk/locale/po/fr.po =================================================================== --- trunk/locale/po/fr.po 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/locale/po/fr.po 2015-04-20 16:56:51 UTC (rev 9688) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-10 17:01+0200\n" +"POT-Creation-Date: 2015-04-20 18:55+0200\n" "PO-Revision-Date: 2004-06-22 21:10+0200\n" "Last-Translator: Pierrick Meignen <mei...@wa...>, Roland " "Trique <rol...@fr...>, Stéphane Gourichon <stephane.gourichon@lip6." @@ -401,8 +401,8 @@ msgid "Page Name" msgstr "Nom de la page" -msgid "Template" -msgstr "Modèle" +msgid "Insert Dynamic Template" +msgstr "Ajouter un modèle dynamique" msgid "Template Name" msgstr "Nom du modèle" @@ -422,8 +422,8 @@ msgid "Insert PageLink" msgstr "Insérer un lien" -msgid "Insert Template" -msgstr "Ajouter un modèle" +msgid "Insert Static Template" +msgstr "Ajouter un modèle statique" msgid "Insert Image or Video" msgstr "Ajouter une image ou une vidéo" @@ -2288,6 +2288,9 @@ msgid "CategoryCategory" msgstr "CatégorieCatégorie" +msgid "Template" +msgstr "Modèle" + msgid "Category" msgstr "Catégorie" @@ -5992,18 +5995,18 @@ msgid "Y-m-d H:i" msgstr "" +#~ msgid "Bold text [alt-b]" +#~ msgstr "Gras [alt-b]" + +#~ msgid "Italic text [alt-i]" +#~ msgstr "Italique [alt-i]" + #~ msgid "Strike" #~ msgstr "Biffé" #~ msgid "Color" #~ msgstr "Couleur" -#~ msgid "Bold text [alt-b]" -#~ msgstr "Gras [alt-b]" - -#~ msgid "Italic text [alt-i]" -#~ msgstr "Italique [alt-i]" - #~ msgid "Click a button to get an example text" #~ msgstr "Cliquer sur un bouton pour obtenir une exemple de texte" Modified: trunk/locale/po/it.po =================================================================== --- trunk/locale/po/it.po 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/locale/po/it.po 2015-04-20 16:56:51 UTC (rev 9688) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-10 17:01+0200\n" +"POT-Creation-Date: 2015-04-20 18:55+0200\n" "PO-Revision-Date: 2005-02-12 16:23+0100\n" "Last-Translator: Antonio Bonifati ant[(at)]monitor.deis.unical.it\n" "Language-Team: \n" @@ -340,9 +340,8 @@ msgid "Color text" msgstr "" -#, fuzzy msgid "Link to page" -msgstr "Pagine Simili" +msgstr "" msgid "PageName|optional label" msgstr "" @@ -365,9 +364,8 @@ msgid "Insert non-formatted text here" msgstr "" -#, fuzzy msgid "Your signature" -msgstr "La versione corrente" +msgstr "" msgid "Horizontal line" msgstr "" @@ -390,12 +388,11 @@ msgid "Page Name" msgstr "Nome della Pagina" -msgid "Template" -msgstr "" +msgid "Insert Dynamic Template" +msgstr "Inserto Dynamic Mascherina" -#, fuzzy msgid "Template Name" -msgstr "Nome della Pagina" +msgstr "" msgid "Undo Search & Replace" msgstr "" @@ -412,8 +409,8 @@ msgid "Insert PageLink" msgstr "Inserto Pagina" -msgid "Insert Template" -msgstr "Inserto Mascherina" +msgid "Insert Static Template" +msgstr "Inserto Static Mascherina" msgid "Insert Image or Video" msgstr "" @@ -2239,6 +2236,9 @@ msgid "CategoryCategory" msgstr "" +msgid "Template" +msgstr "Mascherina" + msgid "Category" msgstr "Categoria" Modified: trunk/locale/po/ja.po =================================================================== --- trunk/locale/po/ja.po 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/locale/po/ja.po 2015-04-20 16:56:51 UTC (rev 9688) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-10 17:01+0200\n" +"POT-Creation-Date: 2015-04-20 18:55+0200\n" "PO-Revision-Date: 2003-06-07 09:01+0900\n" "Last-Translator: Tadashi Jokagi <web...@el...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -328,9 +328,8 @@ msgid "Color text" msgstr "" -#, fuzzy msgid "Link to page" -msgstr "ページロック" +msgstr "" msgid "PageName|optional label" msgstr "" @@ -365,9 +364,8 @@ msgid "Enumeration" msgstr "" -#, fuzzy msgid "List" -msgstr "サブページ" +msgstr "" msgid "Table of Contents" msgstr "" @@ -378,12 +376,11 @@ msgid "Page Name" msgstr "ページ名" -msgid "Template" +msgid "Insert Dynamic Template" msgstr "" -#, fuzzy msgid "Template Name" -msgstr "ページ名" +msgstr "" msgid "Undo Search & Replace" msgstr "" @@ -400,7 +397,7 @@ msgid "Insert PageLink" msgstr "" -msgid "Insert Template" +msgid "Insert Static Template" msgstr "" msgid "Insert Image or Video" @@ -2262,6 +2259,9 @@ msgid "CategoryCategory" msgstr "" +msgid "Template" +msgstr "" + msgid "Category" msgstr "" Modified: trunk/locale/po/nl.po =================================================================== --- trunk/locale/po/nl.po 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/locale/po/nl.po 2015-04-20 16:56:51 UTC (rev 9688) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-10 17:01+0200\n" +"POT-Creation-Date: 2015-04-20 18:55+0200\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" @@ -334,9 +334,8 @@ msgid "Color text" msgstr "" -#, fuzzy msgid "Link to page" -msgstr "Zoek Pagina" +msgstr "" msgid "PageName|optional label" msgstr "" @@ -383,15 +382,14 @@ msgid "Page Name" msgstr "Pagina Naam" -msgid "Template" +msgid "Insert Dynamic Template" msgstr "" msgid "Template Name" msgstr "Template Naam" -#, fuzzy msgid "Undo Search & Replace" -msgstr "Zoek & Vervangt" +msgstr "" msgid "Insert Categories" msgstr "" @@ -405,7 +403,7 @@ msgid "Insert PageLink" msgstr "" -msgid "Insert Template" +msgid "Insert Static Template" msgstr "" msgid "Insert Image or Video" @@ -2229,6 +2227,9 @@ msgid "CategoryCategory" msgstr "" +msgid "Template" +msgstr "" + msgid "Category" msgstr "" Modified: trunk/locale/po/phpwiki.pot =================================================================== --- trunk/locale/po/phpwiki.pot 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/locale/po/phpwiki.pot 2015-04-20 16:56:51 UTC (rev 9688) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki-1.5.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-10 17:01+0200\n" +"POT-Creation-Date: 2015-04-20 18:55+0200\n" "PO-Revision-Date: 2002-12-14 17:51-0500\n" "Last-Translator: Reini Urban <ru...@us...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -376,7 +376,7 @@ msgid "Page Name" msgstr "" -msgid "Template" +msgid "Insert Dynamic Template" msgstr "" msgid "Template Name" @@ -397,7 +397,7 @@ msgid "Insert PageLink" msgstr "" -msgid "Insert Template" +msgid "Insert Static Template" msgstr "" msgid "Insert Image or Video" @@ -2221,6 +2221,9 @@ msgid "CategoryCategory" msgstr "" +msgid "Template" +msgstr "" + msgid "Category" msgstr "" Modified: trunk/locale/po/sv.po =================================================================== --- trunk/locale/po/sv.po 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/locale/po/sv.po 2015-04-20 16:56:51 UTC (rev 9688) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-10 17:01+0200\n" +"POT-Creation-Date: 2015-04-20 18:55+0200\n" "PO-Revision-Date: 2001-01-27 01:58+0200\n" "Last-Translator: Jon Åslund <jo...@he...>\n" "Language-Team: \n" @@ -329,9 +329,8 @@ msgid "Color text" msgstr "" -#, fuzzy msgid "Link to page" -msgstr "Sök Efter Sida" +msgstr "" msgid "PageName|optional label" msgstr "" @@ -378,7 +377,7 @@ msgid "Page Name" msgstr "Namn på Sidan" -msgid "Template" +msgid "Insert Dynamic Template" msgstr "" msgid "Template Name" @@ -399,7 +398,7 @@ msgid "Insert PageLink" msgstr "" -msgid "Insert Template" +msgid "Insert Static Template" msgstr "" msgid "Insert Image or Video" @@ -2223,6 +2222,9 @@ msgid "CategoryCategory" msgstr "" +msgid "Template" +msgstr "" + msgid "Category" msgstr "" Modified: trunk/locale/po/zh.po =================================================================== --- trunk/locale/po/zh.po 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/locale/po/zh.po 2015-04-20 16:56:51 UTC (rev 9688) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-04-10 17:01+0200\n" +"POT-Creation-Date: 2015-04-20 18:55+0200\n" "PO-Revision-Date: 2004-04-21 10:08+0800\n" "Last-Translator: DruryL <dr...@us...>\n" "Language-Team: DruryL <dr...@us...>\n" @@ -376,9 +376,8 @@ msgid "Sample table" msgstr "" -#, fuzzy msgid "Enumeration" -msgstr "相關連結" +msgstr "" #, fuzzy msgid "List" @@ -395,7 +394,7 @@ msgstr "頁面名稱" #, fuzzy -msgid "Template" +msgid "Insert Dynamic Template" msgstr "佈景主題" #, fuzzy @@ -420,7 +419,7 @@ msgstr "" #, fuzzy -msgid "Insert Template" +msgid "Insert Static Template" msgstr "佈景主題" msgid "Insert Image or Video" @@ -2314,6 +2313,10 @@ msgid "CategoryCategory" msgstr "" +#, fuzzy +msgid "Template" +msgstr "佈景主題" + msgid "Category" msgstr "" Modified: trunk/locale/sv/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/pgsrc/ReleaseNotes 2015-04-20 16:56:51 UTC (rev 9688) @@ -1,4 +1,4 @@ -Date: Wed, 10 Apr 2015 11:29:22 +0000 +Date: Mon, 20 Apr 2015 18:43:09 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.3) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -15,6 +15,7 @@ * Add WebM format in Video plugin * Update jscalendar to 1.0 * Remove Width and Height preferences modification in Edit Toolbar +* Make static templates in Edit Toolbar work == 1.5.3 2015-03-04 Marc-Etienne Vargenau == Modified: trunk/themes/default/toolbar.js =================================================================== --- trunk/themes/default/toolbar.js 2015-04-17 16:18:31 UTC (rev 9687) +++ trunk/themes/default/toolbar.js 2015-04-20 16:56:51 UTC (rev 9688) @@ -61,6 +61,10 @@ var txtarea = document.getElementById('edit-content'); text = unescapeSpecial(text); txtarea.value += '\n'+text; + } else if (fromid == 'tb-templates') { + text = text.replace(/__nl__/g, '\n'); + text = text.replace(/__quot__/g, '"'); + insertTags(text, '', '\n'); } else { insertTags(text, '', '\n'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |