Merge branch 'master' of gitlab.cosmocode.de:deutschlaender/sprintdoc-template into spis_SPR-950

This commit is contained in:
Silke Pisulla 2017-04-24 12:47:39 +02:00
commit 8f9af64d4e
5 changed files with 26 additions and 35 deletions

View file

@ -88,7 +88,7 @@ class Template {
* @return array * @return array
*/ */
public function getMetaBoxTabs() { public function getMetaBoxTabs() {
global $lang; global $lang, $INFO;
$tabs = array(); $tabs = array();
$toc = tpl_toc(true); $toc = tpl_toc(true);
@ -106,7 +106,7 @@ class Template {
'id' => 'spr__tab-tags', 'id' => 'spr__tab-tags',
'label' => tpl_getLang('tab_tags'), 'label' => tpl_getLang('tab_tags'),
'tab' => $this->plugins['tagging']->tpl_tags(false), 'tab' => $this->plugins['tagging']->tpl_tags(false),
'count' => null, // FIXME 'count' => count($this->plugins['tagging']->findItems(array('pid' => $INFO['id']), 'tag')),
); );
} }

View file

@ -21,7 +21,6 @@
z-index: 2; z-index: 2;
top: 0; top: 0;
float: right; float: right;
margin-top: 0;
form div.no { form div.no {
button { button {

View file

@ -2,12 +2,10 @@
* This file provides styles for do-task plugin * This file provides styles for do-task plugin
*/ */
/* + + + + + global + + + + + */ /* + + + + + global + + + + + */
ul.page-attributes { ul.page-attributes {
.plugin__do_pagetasks { .plugin_do_pagetasks {
&.do_none {
position: relative; position: relative;
border-radius: @ini_default_border_radius; // @ini_default_border_radius vs. @fix_border-radius border-radius: @ini_default_border_radius; // @ini_default_border_radius vs. @fix_border-radius
@ -18,6 +16,7 @@ ul.page-attributes {
color: @ini_text_webframe; color: @ini_text_webframe;
} }
&.do_none {
.num { .num {
background-color: @noopentasks-border; // fix background-color: @noopentasks-border; // fix
color: @noopentasks-color; // fix color: @noopentasks-color; // fix

View file

@ -12,18 +12,19 @@ jQuery(function () {
$nav.find('div.nav-panel').hide(); // close all panels $nav.find('div.nav-panel').hide(); // close all panels
jQuery('body').addClass('wide-content'); jQuery('body').addClass('wide-content');
removeToggleStorage(); removeToggleStorage();
window.sessionStorage.setItem('wide-content', true);
}, },
/** /**
* removes information about the toggle-state * removes information about the toggle-state
*/ */
removeToggleStorage = function () { removeToggleStorage = function () {
for (var index=0; index <= sessionStorage.length; index += 1) { for (var index=0; index <= window.sessionStorage.length; index += 1) {
var item = sessionStorage.getItem('sidebar-section-' + index + '-open'); var item = window.sessionStorage.getItem('sidebar-section-' + index + '-open');
if (!item) { if (!item) {
break; continue;
} }
sessionStorage.removeItem('sidebar-section-' + index + '-open'); window.sessionStorage.removeItem('sidebar-section-' + index + '-open');
} }
}, },
@ -32,7 +33,7 @@ jQuery(function () {
*/ */
setDefaultContent = function () { setDefaultContent = function () {
jQuery('body').removeClass('wide-content'); jQuery('body').removeClass('wide-content');
window.sessionStorage.setItem('wide-content', false);
}, },
/** /**
@ -60,7 +61,7 @@ jQuery(function () {
focusFirstSubLink($panel); focusFirstSubLink($panel);
} }
}); });
sessionStorage.setItem('sidebar-section-' + $toggler.data('index') + '-open', !isOpen); window.sessionStorage.setItem('sidebar-section-' + $toggler.data('index') + '-open', !isOpen);
}, },
/** /**
@ -123,7 +124,7 @@ jQuery(function () {
$toggler.parent('li').addClass('toggler'); $toggler.parent('li').addClass('toggler');
} }
if (sessionStorage.getItem('sidebar-section-' + index + '-open') === 'true') { if (window.sessionStorage.getItem('sidebar-section-' + index + '-open') === 'true') {
$wrap.css('display', 'block'); $wrap.css('display', 'block');
} }
@ -166,6 +167,10 @@ jQuery(function () {
setWideContent(); setWideContent();
} }
}); });
if (window.sessionStorage.getItem('wide-content') === 'true') {
setWideContent();
}
}, },
/** /**

View file

@ -35,7 +35,7 @@ if($doPlugin !== null) {
$class = 'do_late'; $class = 'do_late';
$title = sprintf(tpl_getLang('tasks_page_late'), $count['undone'], $count['late']); $title = sprintf(tpl_getLang('tasks_page_late'), $count['undone'], $count['late']);
} }
$markup = "<li class=\"plugin__do_pagetasks $class\" title=\"$title\"><strong><span class=\"prefix\">" . tpl_getLang('prefix_tasks_page') . " </span><span class=\"num\">{$count['undone']}</span></strong></li>"; $markup = "<li class=\"plugin_do_pagetasks $class\" title=\"$title\"><strong><span class=\"num\">{$count['undone']}</span><span class=\"prefix\">" . tpl_getLang('prefix_tasks_page') . " </span></strong></li>";
echo $markup; echo $markup;
} }
@ -43,15 +43,3 @@ if($doPlugin !== null) {
if($doPlugin !== null || $qcPlugin !== null) { if($doPlugin !== null || $qcPlugin !== null) {
echo "</ul>"; echo "</ul>";
} }
/*
$out = '<div class="plugin__do_pagetasks" title="' . $title . '"><span class="' . $class . '">';
$out .= $count['undone'];
$out .= '</span></div>';
if($return) return $out;
echo $out;*/