Merge branch 'master' into sidebar

* master:
  show license not copyright SPR-794
  use proper translation mechanism for JS SPR-798
  added type ints for other plugins
  SPR-797 fix ID uniqueness
This commit is contained in:
Andreas Gohr 2017-02-14 11:21:52 +01:00
commit eaccab8168
17 changed files with 31 additions and 137 deletions

View file

@ -14,4 +14,3 @@ $conf['userPage'] = 'user:@USER@:';
$conf['user_ns'] = 'user'; $conf['user_ns'] = 'user';
$conf['hideTools'] = 0; $conf['hideTools'] = 0;
$conf['tasks_page'] = 'dashboard'; $conf['tasks_page'] = 'dashboard';
$conf['copyright'] = 'CosmoCode 2017';

View file

@ -12,4 +12,3 @@ $meta['userPage'] = array('string');
$conf['user_ns'] = array('string'); $conf['user_ns'] = array('string');
$meta['hideTools'] = array('onoff'); $meta['hideTools'] = array('onoff');
$meta['tasks_page'] = array('string'); $meta['tasks_page'] = array('string');
$meta['copyright'] = array('string');

View file

@ -1,4 +1,4 @@
#meta-box { #spr__meta-box {
position: relative; position: relative;
z-index: 10; z-index: 10;
display: inline-block; display: inline-block;

View file

@ -36,7 +36,7 @@
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
clear: both; clear: both;
} }
#meta-box { #spr__meta-box {
display: none; display: none;
} }
} }

View file

@ -6,7 +6,7 @@
/* + + + + + + + + + + + + + + + + + + + + + + + */ /* + + + + + + + + + + + + + + + + + + + + + + + */
/* magic matcher bar with form on top of page */ /* magic matcher bar with form on top of page */
#dokuwiki_magic-matcher { #spr__magic-matcher {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@ -98,7 +98,7 @@ a.jiralink {
/* + + + + + no js version + + + + + */ /* + + + + + no js version + + + + + */
.no-js { .no-js {
#dokuwiki_magic-matcher { #spr__magic-matcher {
display: none; display: none;
} }
} }
@ -108,7 +108,7 @@ a.jiralink {
/* max-width: 1023px */ /* max-width: 1023px */
@media @screen_max-lg { @media @screen_max-lg {
#dokuwiki_magic-matcher { #spr__magic-matcher {
#magicmatcher__context { #magicmatcher__context {
.chosen-container-single { .chosen-container-single {
width: 20% !important; width: 20% !important;
@ -122,7 +122,7 @@ a.jiralink {
} }
@media @screen_max-md { @media @screen_max-md {
#dokuwiki_magic-matcher { #spr__magic-matcher {
position: relative; position: relative;
.container { .container {
@ -142,7 +142,7 @@ a.jiralink {
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
@media print { @media print {
#dokuwiki_magic-matcher { #spr__magic-matcher {
display: none; display: none;
} }
} }

View file

@ -1,8 +1,8 @@
(function ($, spc, $lang) { (function ($, spc) {
var toggleTabs = function () { var toggleTabs = function () {
var $metaBox = $('#meta-box'), var $metaBox = $('#spr__meta-box'),
$tabLinks = $metaBox.find('.meta-tabs').find('a'), $tabLinks = $metaBox.find('.meta-tabs').find('a'),
$tabPanels = $metaBox.find('.meta-content').find('.tab-pane'); $tabPanels = $metaBox.find('.meta-content').find('.tab-pane');
@ -45,8 +45,8 @@
findJiraTickets = function(){ findJiraTickets = function(){
var $tickets = $('#dokuwiki__content').find('a.jiralink'); var $tickets = $('#dokuwiki__content').find('a.jiralink');
if($tickets.length >0){ if($tickets.length >0){
var $panel = $('#tab-jira'), var $panel = $('#spr__tab-jira'),
$num = $('a[href="#tab-jira"]').find('.num'); $num = $('a[href="#spr__tab-jira"]').find('.num');
if($panel.length > 0 && $num.length > 0){ if($panel.length > 0 && $num.length > 0){
$num.empty().append($tickets.length); $num.empty().append($tickets.length);
@ -61,11 +61,11 @@
} }
}, },
findSitemap = function(){ findSitemap = function(){
var $panel = $('#tab-toc'), var $panel = $('#spr__tab-toc'),
$toc = $panel.find('ul'), $toc = $panel.find('ul'),
$num = $('a[href="#tab-toc"]').find('.num'); $num = $('a[href="#spr__tab-toc"]').find('.num');
if($toc.length == 0){ if($toc.length == 0){
$panel.append('<div><p>'+$_LANG['meta_box_sitemap_none']+'</p></div>'); $panel.append('<div><p>'+LANG.template.sprintdoc.meta_box_toc_none+'</p></div>');
}else{ }else{
$num.empty().append('1'); $num.empty().append('1');
} }
@ -77,5 +77,5 @@
findSitemap(); findSitemap();
}); });
})(jQuery, spc, $_LANG); })(jQuery, spc);

View file

@ -1,40 +0,0 @@
var $lang = {};
$lang['direct_prefix'] = 'Direkt';
$lang['direct_content_main'] = 'Hauptinhalt dieser Seite';
$lang['direct_menu_main'] = 'Hauptmenü';
$lang['adjunct_start_logo_text'] = 'Logo: ';
$lang['adjunct_linked_logo_text'] = '. Link zur Startseite';
$lang['nav-area-head'] = 'Navigationsmenüs und Suche';
$lang['head_magic_matcher'] = 'MagicMatcher';
$lang['head_quick_search'] = 'wikiübergreifende Schnellsuche';
$lang['head_menu_main'] = 'Hauptmenü';
$lang['head_menu_status'] = 'Seitenstatus';
$lang['head_breadcrumb'] = 'Standortanzeiger';
$lang['head_menu_trace'] = 'zuletzt angesehen';
$lang['meta_box_jira_tickets_none'] = 'Keine Jira-Tickets verknüpft';
$lang['meta_box_tags_none'] = 'Keine Tags verknüpft';
$lang['meta_box_sitemap_none'] = 'keine Sitemap vorhanden';
$lang['quality_trigger'] = 'Seitenanalyse ein- bzw. ausblenden';
$lang['prefix_tasks'] = 'offene Aufgaben: ';
$lang['prefix_tasks_user'] = 'Ihre offenen Aufgaben: ';
$lang['prefix_tasks_page'] = 'offene Aufgaben auf dieser Seite: ';
$lang['tasks_page_none'] = 'keine offenen Aufgaben für diese Seite';
$lang['discussion'] = 'Diskussion';
$lang['back_to_article'] = 'Zurück zum Artikel';
$lang['userpage'] = 'Benutzer-Seite';
$lang['__existing__'] = 'Schriftfarbe für Links zu vorhandenen Webseiten';
$lang['__missing__'] = 'Schriftfarbe für Links zu nicht vorhandenen Webseiten';
$lang['__site_width__'] = 'The width of the full site (can be any length unit: %, px, em, ...)';
$lang['__sidebar_width__'] = 'The width of the sidebar, if any (can be any length unit: %, px, em, ...)';
$lang['__button_color__'] = 'Schriftfarbe für Buttons';
$lang['__button_background__'] = 'Hintergrundfarbe für Buttons';

View file

@ -25,7 +25,7 @@ $lang['jump_to_quicksearch'] = 'Springe zur Schnellsuche';
$lang['meta_box_jira_tickets_none'] = 'Keine Jira-Tickets verknüpft'; $lang['meta_box_jira_tickets_none'] = 'Keine Jira-Tickets verknüpft';
$lang['meta_box_tags_none'] = 'Keine Tags verknüpft'; $lang['meta_box_tags_none'] = 'Keine Tags verknüpft';
$lang['meta_box_sitemap_none'] = 'keine Sitemap vorhanden'; $lang['js']['meta_box_toc_none'] = 'kein Inhaltsverzeichnis vorhanden';
$lang['quality_trigger'] = 'Seitenanalyse ein- bzw. ausblenden'; $lang['quality_trigger'] = 'Seitenanalyse ein- bzw. ausblenden';

View file

@ -1,38 +0,0 @@
var $lang = {};
$lang['direct_prefix'] = 'jump to';
$lang['direct_content_main'] = 'main content';
$lang['direct_menu_main'] = 'main menu';
$lang['adjunct_start_logo_text'] = 'Logo: ';
$lang['adjunct_linked_logo_text'] = '. homepage link';
$lang['nav-area-head'] = 'menus and quick search';
$lang['head_magic_matcher'] = 'MagicMatcher';
$lang['head_quick_search'] = 'quick search';
$lang['head_menu_main'] = 'main menu';
$lang['head_menu_status'] = 'site status';
$lang['head_breadcrumb'] = 'location indicator';
$lang['head_menu_trace'] = 'trace / visited last';
$lang['meta_box_jira_tickets_none'] = 'jira associated tickets found: none';
$lang['meta_box_tags_none'] = 'jira associated tickets found: none';
$lang['meta_box_sitemap_none'] = 'no sitemap available';
$lang['quality_trigger'] = 'toggle page analysis';
$lang['prefix_tasks'] = 'open tasks: ';
$lang['prefix_tasks_user'] = 'your open tasks: ';
$lang['prefix_tasks_page'] = 'open tasks for this page: ';
$lang['tasks_page_none'] = 'no open tasks for this page';
$lang['discussion'] = 'Discussion';
$lang['back_to_article'] = 'Back to article';
$lang['userpage'] = 'User page';
$lang['__existing__'] = 'The color for links to existing pages';
$lang['__missing__'] = 'The color for links to non-existing pages';
$lang['__site_width__'] = 'The width of the full site (can be any length unit: %, px, em, ...)';
$lang['__sidebar_width__'] = 'The width of the sidebar, if any (can be any length unit: %, px, em, ...)';
$lang['__button_color__'] = 'Color for buttons';
$lang['__button_background__'] = 'Backgroundcolor for buttons';

View file

@ -25,7 +25,7 @@ $lang['jump_to_quicksearch'] = 'Jump to quick search';
$lang['meta_box_jira_tickets_none'] = 'jira associated tickets found: none'; $lang['meta_box_jira_tickets_none'] = 'jira associated tickets found: none';
$lang['meta_box_tags_none'] = 'tags found: none'; $lang['meta_box_tags_none'] = 'tags found: none';
$lang['meta_box_sitemap_none'] = 'no sitemap available'; $lang['js']['meta_box_toc_none'] = 'no Table of Contents available';
$lang['quality_trigger'] = 'toggle page analysis'; $lang['quality_trigger'] = 'toggle page analysis';

View file

@ -239,6 +239,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* User Tools and MagicMatcher Bar */ /* User Tools and MagicMatcher Bar */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/** @var \helper_plugin_magicmatcher_context $mm */
$mm = plugin_load('helper', 'magicmatcher_context'); $mm = plugin_load('helper', 'magicmatcher_context');
$navClass = ""; $navClass = "";
if($mm){ if($mm){
@ -319,7 +320,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
</div> </div>
<div id="dokuwiki__content" class="page main-content"> <div id="dokuwiki__content" class="page main-content">
<div id="meta-box"> <div id="spr__meta-box">
<h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_meta_box') ?></h6> <h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_meta_box') ?></h6>
<?php <?php
@ -389,7 +390,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
/* copyright */ /* copyright */
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
echo "&copy; ".tpl_getConf('copyright'); tpl_license('');
?> ?>
</p> </p>
</div> </div>

View file

@ -1,34 +1,6 @@
var $_LANG = {};
/* DOKUWIKI:include js/base/helper.js */ /* DOKUWIKI:include js/base/helper.js */
/* DOKUWIKI:include js/base/spc.js */ /* DOKUWIKI:include js/base/spc.js */
( function( $, spc, lang ) {
var setLang = function(){
try{
if(lang==="de"){
/* DOKUWIKI:include lang/de/lang.js */
} else if(lang==="en"){
/* DOKUWIKI:include lang/en/lang.js */
} else{
/* default */
/* DOKUWIKI:include lang/de/lang.js */
}
$_LANG = $lang;
}catch(err){
}
};
$(function(){
setLang();
});
} )( jQuery, spc, wikiLang );
/* DOKUWIKI:include js/plugins/do_tasks.js */ /* DOKUWIKI:include js/plugins/do_tasks.js */
/* DOKUWIKI:include js/sidebar-menu.js */ /* DOKUWIKI:include js/sidebar-menu.js */

View file

@ -2,7 +2,7 @@
if (!defined('DOKU_INC')) die(); if (!defined('DOKU_INC')) die();
?> ?>
<div id="dokuwiki_direct" class="nav-direct no-print"> <div id="spr__direct" class="nav-direct no-print">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">

View file

@ -2,7 +2,7 @@
if (!defined('DOKU_INC')) die(); if (!defined('DOKU_INC')) die();
?> ?>
<div id="dokuwiki_magic-matcher" class="magic-matcher no-print"> <div id="spr__magic-matcher" class="magic-matcher no-print">
<div class="container"> <div class="container">
<?php <?php
echo "<h6 class=\"sr-only\" role=\"heading\" aria-level=\"2\">".tpl_getLang('head_magic_matcher')."</h6>"; echo "<h6 class=\"sr-only\" role=\"heading\" aria-level=\"2\">".tpl_getLang('head_magic_matcher')."</h6>";

View file

@ -5,19 +5,19 @@
<div class="tab-container"> <div class="tab-container">
<ul class="meta-tabs"> <ul class="meta-tabs">
<li><a href="#tab-toc" aria-expanded="false"><span class="prefix"><?php echo $lang['toc']?></span></a></li> <li><a href="#spr__tab-toc" aria-expanded="false"><span class="prefix"><?php echo $lang['toc']?></span></a></li>
<li><a href="#tab-tags" aria-expanded="false"><span class="prefix">Tags <span class="num">0</span></span></a></li> <li><a href="#spr__tab-tags" aria-expanded="false"><span class="prefix">Tags <span class="num">0</span></span></a></li>
<li><a href="#tab-jira" aria-expanded="false"><span class="prefix">Jira <span class="num">0</span></span></a></li> <li><a href="#spr__tab-jira" aria-expanded="false"><span class="prefix">Jira <span class="num">0</span></span></a></li>
</ul> </ul>
<div class="meta-content"> <div class="meta-content">
<div class="box-content"> <div class="box-content">
<div id="tab-toc" class="tab-pane" aria-hidden="true"> <div id="spr__tab-toc" class="tab-pane" aria-hidden="true">
<?php tpl_toc(); ?> <?php tpl_toc(); ?>
</div> </div>
<div id="tab-tags" class="tab-pane" aria-hidden="true"> <div id="spr__tab-tags" class="tab-pane" aria-hidden="true">
<div> <div>
<?php <?php
if ($tags !== null) { if ($tags !== null) {
@ -29,7 +29,7 @@
</div> </div>
</div> </div>
<div id="tab-jira" class="tab-pane" aria-hidden="true"> <div id="spr__tab-jira" class="tab-pane" aria-hidden="true">
<div> <div>
<p><?php echo tpl_getLang('meta_box_jira_tickets_none') ?></p> <p><?php echo tpl_getLang('meta_box_jira_tickets_none') ?></p>
</div> </div>

View file

@ -3,7 +3,7 @@
?> ?>
<?php <?php
/** @var \helper_plugin_qc $qc */ /** @var \helper_plugin_do $doPlugin */
$doPlugin = plugin_load('helper','do'); $doPlugin = plugin_load('helper','do');
/** @var \helper_plugin_qc $qc */ /** @var \helper_plugin_qc $qc */

View file

@ -13,6 +13,7 @@
}?> }?>
<?php /* tasks do Plug-In */ <?php /* tasks do Plug-In */
/** @var \helper_plugin_do $doplugin */
$doplugin = plugin_load('helper','do'); $doplugin = plugin_load('helper','do');
if ($doplugin !== null && isset($_SERVER['REMOTE_USER'])) { if ($doplugin !== null && isset($_SERVER['REMOTE_USER'])) {
$tasks = $doplugin->loadTasks(array('status' => array('undone'),'user' => $_SERVER['REMOTE_USER'])); $tasks = $doplugin->loadTasks(array('status' => array('undone'),'user' => $_SERVER['REMOTE_USER']));