From fbf9e9d682e580dc2d020d23ecc173315327ec1e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 9 Mar 2017 16:15:10 +0100 Subject: [PATCH 01/41] integrate QC plugin (ajax branch) This refactors the page-attribute area a bit and intergrates the new ajax branch of the QC plugin. I'm not really happy about the included file - it should probably be moved to our Template class instead. --- css/area_nav-breadcrumb.less | 139 ------------------------------ css/area_nav-page-attributes.less | 30 +++++++ css/plugins/qc.less | 28 +++++- js/plugins/do_tasks.js | 94 ++++++++++---------- js/plugins/qc.js | 37 ++++++++ main.php | 3 +- script.js | 1 + style.ini | 1 + tpl/nav-page-attributes.php | 57 ++++++++++++ tpl/nav-page-quality-tasks.php | 54 ------------ 10 files changed, 200 insertions(+), 244 deletions(-) create mode 100644 css/area_nav-page-attributes.less create mode 100644 js/plugins/qc.js create mode 100755 tpl/nav-page-attributes.php delete mode 100755 tpl/nav-page-quality-tasks.php diff --git a/css/area_nav-breadcrumb.less b/css/area_nav-breadcrumb.less index cd3f5b6..4376701 100755 --- a/css/area_nav-breadcrumb.less +++ b/css/area_nav-breadcrumb.less @@ -67,145 +67,6 @@ padding: .1em .1em 0; } } - - -/* + + + + + icon list + + + + + */ - .page-attributes { - list-style: none; - float: right; - display: inline-block; - max-width: 30%; - margin: -.45em 0 0; - padding: 0; - @media @screen_max-xs{ - max-width: 90%; - } - - > li { - .btn-usertools-wrapper(); // uniform li - .btn-usertools-num(); - - float: left; - - > strong, - > a { - display: block; - width: auto; - min-height: 2em; - border: 1px solid @color-border; - border-radius: @border-radius; - color: @color-nav; - text-align: center; - margin: 0; - } - - .prefix { - .btn-prefix (); - .icon-clipboard(); - } - -/* check !!! */ - &.do_none { - position: relative; - - strong { - background-color: @color-site-bg; - } - - .num { - background-color: @color-border; - color: @color-nav; - } - } -/* end check !!! */ - - &.plugin__qc { - display: inline-block; - overflow: visible; - position: static; - } - } // li - - a { - transition: @transition color, @transition background-color, @transition border-color; - - &[aria-expanded="false"] + #plugin__qc__wrapper { - display: none; - } - - &:hover, - &:active, - &:focus { - background-color: @button_color; - border-color: @button_background; - color: @button_background; - - .prefix { - color: @button_background; - } - } - } - - #plugin__qc__wrapper { - position: absolute; - right: 0; - width: auto; - border: 0 none; - background: @background_page-header; - background: -webkit-linear-gradient(top, @background_page-header, @color-content-bg); - background: linear-gradient(top, @background_page-header, @color-content-bg); - box-shadow: @box-shadow-bottom; - z-index: 2000; - - #plugin__qc__out{ - h1 { - font-size: @font-size-head3; - } - - h2 { - margin-top: 1.6em; - font-size: @font-size-head5; - } - > h1, - > h2, - > p, - > dl, - > div { - padding-left: 1rem; - margin-left: 0; - } - - > div p { - padding-left: 0; - margin-left: 0; - } - } - - &[aria-hidden="false"] { - margin-top: .5rem; - } - } - - #plugin__qc__icon { - display: none; - } - - #plugin__qc__link { - position: relative; - - .prefix { - .icon-emo-happy(); - - width: 100%; - font-size: @font-size-default; - - &::before { - width: 100%; - margin: .1em 0 0; - } - } - } - } } diff --git a/css/area_nav-page-attributes.less b/css/area_nav-page-attributes.less new file mode 100644 index 0000000..228f667 --- /dev/null +++ b/css/area_nav-page-attributes.less @@ -0,0 +1,30 @@ +/** + * Page Attribute Icons in the breadcrumb bar + */ +.page-attributes { + list-style: none; + float: right; + display: inline-block; + max-width: 30%; + margin: -.45em 0 0; + padding: 0; + @media @screen_max-xs { + max-width: 90%; + } + + > li { + .btn-usertools-wrapper(); // uniform li + .btn-usertools-num(); + + position: relative; + float: left; + display: block; + width: auto; + min-height: 2em; + border: 1px solid @color-border; + border-radius: @border-radius; + color: @color-nav; + text-align: center; + margin: 0; + } +} diff --git a/css/plugins/qc.less b/css/plugins/qc.less index dff5a32..42c57a5 100644 --- a/css/plugins/qc.less +++ b/css/plugins/qc.less @@ -1,6 +1,26 @@ -#plugin__qc__wrapper{ - font-size: @font-size-default; - p{ - font-size: @font-size-default; +/** + * Styles for the QC plugin + */ + +// icon in page attributes +.page-attributes .plugin_qc { + .qc_icon { + margin: 0; + width: 2em; + height: 2em; + + svg { + margin-top: 0.1em; + margin-left: 0.1em; + width: 1.6em; + height: 1.6em; + } } } + +// output +.qc-output { + font-size: 90%; + border-bottom: 1px solid @ini_border; +} + diff --git a/js/plugins/do_tasks.js b/js/plugins/do_tasks.js index 78a8f34..1ff8717 100755 --- a/js/plugins/do_tasks.js +++ b/js/plugins/do_tasks.js @@ -1,47 +1,49 @@ -( function( $, spc ) { - - var togglePageAnalysis = function(){ - var $this = $('.page-attributes').find('.plugin__qc'); - try{ - var $link = $this.find('#plugin__qc__link'), - $container = $this.find('#plugin__qc__wrapper'); - - if($container.length < 1){ - $this.remove(); - }else{ - $container.attr('aria-hidden','true'); - var $icon = $container.find('#plugin__qc__icon'); - $container.find('#plugin__qc__out').removeAttr('style'); - $link.on( 'click', function(e){ - e.preventDefault(); - $icon.trigger('click'); - var oldState = ($link.attr('aria-expanded')=== "true" ); - $container.attr('aria-hidden',oldState); - $(this).attr('aria-expanded',!oldState); - - }); - - if($container.length > 0){ - var num = $container.attr('data-errors'); - if(num){ - $link.find('.num').empty().append(num); - $link.closest('li').removeClass('do_none'); - } - } - - } - - }catch(err){ - $this.remove(); - } - }; - - $(function(){ - togglePageAnalysis(); - }); - -} )( jQuery, spc ); - - - +// FIXME figure out what this did and why +// ( function( $, spc ) { +// +// var togglePageAnalysis = function(){ +// var $this = $('.page-attributes').find('.plugin__qc'); +// try{ +// var $link = $this.find('#plugin__qc__link'), +// $container = $this.find('#plugin__qc__wrapper'); +// +// if($container.length < 1){ +// $this.remove(); +// }else{ +// $container.attr('aria-hidden','true'); +// var $icon = $container.find('#plugin__qc__icon'); +// $container.find('#plugin__qc__out').removeAttr('style'); +// $link.on( 'click', function(e){ +// e.preventDefault(); +// $icon.trigger('click'); +// var oldState = ($link.attr('aria-expanded')=== "true" ); +// $container.attr('aria-hidden',oldState); +// $(this).attr('aria-expanded',!oldState); +// +// }); +// +// if($container.length > 0){ +// var num = $container.attr('data-errors'); +// if(num){ +// $link.find('.num').empty().append(num); +// $link.closest('li').removeClass('do_none'); +// } +// } +// +// } +// +// }catch(err){ +// $this.remove(); +// } +// }; +// +// $(function(){ +// togglePageAnalysis(); +// }); +// +// } )( jQuery, spc ); +// +// +// +// diff --git a/js/plugins/qc.js b/js/plugins/qc.js new file mode 100644 index 0000000..65d795b --- /dev/null +++ b/js/plugins/qc.js @@ -0,0 +1,37 @@ +/** + * Add custom QC functionality instead of using the plugin's mechanism + */ +jQuery(function () { + var $panel = jQuery('div.qc-output').hide(); + + // load summary + jQuery('.page-attributes .plugin_qc a').load( + DOKU_BASE + '/lib/exe/ajax.php', + { + call: 'plugin_qc_short', + id: JSINFO['id'] + }, + function () { + jQuery(this).find('span span').addClass('num'); + } + ).click(function (e) { + e.preventDefault(); + + if ($panel.html() == '') { + // load output + $panel.load( + DOKU_BASE + '/lib/exe/ajax.php', + { + call: 'plugin_qc_long', + id: JSINFO['id'] + }, + function () { + $panel.dw_show(); + } + ); + } else { + $panel.dw_toggle(); + } + }); + +}); diff --git a/main.php b/main.php index 2934e3f..22fa813 100755 --- a/main.php +++ b/main.php @@ -230,7 +230,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content "; /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ /* page quality / page tasks */ /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ - include('tpl/nav-page-quality-tasks.php'); + include('tpl/nav-page-attributes.php'); ?> +
'; +} + + +if($qcPlugin && $qcPlugin->shouldShow()) { + echo '
  • '; // filled by javascript +} + + +if($doPlugin !== null) { + $count = $doPlugin->getPageTaskCount(); + $num = $count['count']; + $title = ""; + + if($num == 0) { // no tasks - does not exist do in plug-in + $class = "do_none"; + $title = tpl_getLang('tasks_page_none'); + } elseif($count['undone'] == 0) { // all tasks done + $class = 'do_done'; + $title = $this->getLang('title_alldone'); + } elseif($count['late'] == 0) { // open tasks but none late + $class = 'do_undone'; + $title = sprintf($this->getLang('title_intime'), $count['undone']); + } else { // late tasks + $class = 'do_late'; + $title = sprintf($this->getLang('title_late'), $count['undone'], $count['late']); + } + $markup = "
  • " . tpl_getLang('prefix_tasks_page') . " " . $num . "
  • "; + + echo $markup; +} + +if($doPlugin !== null || $qcPlugin !== null) { + echo ""; +} + + + +/* + + +$out = '
    '; +$out .= $count['undone']; +$out .= '
    '; + +if($return) return $out; +echo $out;*/ diff --git a/tpl/nav-page-quality-tasks.php b/tpl/nav-page-quality-tasks.php deleted file mode 100755 index 2a1977c..0000000 --- a/tpl/nav-page-quality-tasks.php +++ /dev/null @@ -1,54 +0,0 @@ - - -"; - } - if ($qc) { - echo "
  • ".tpl_getLang('quality_trigger')."0"; - $qc->tplErrorCount(); - echo "
  • "; - } - if ($doPlugin !== null ) { - $count = $doPlugin->getPageTaskCount(); - $num = $count['count']; - $title = ""; - - if($num == 0){ // no tasks - does not exist do in plug-in - $class = "do_none"; - $title = tpl_getLang('tasks_page_none'); - } elseif($count['undone'] == 0){ // all tasks done - $class = 'do_done'; - $title = $this->getLang('title_alldone'); - }elseif($count['late'] == 0) { // open tasks but none late - $class = 'do_undone'; - $title = sprintf($this->getLang('title_intime'), $count['undone']); - } else { // late tasks - $class = 'do_late'; - $title = sprintf($this->getLang('title_late'), $count['undone'], $count['late']); - } - $markup = "
  • ".tpl_getLang('prefix_tasks_page')." ".$num."
  • "; - - echo $markup; - } - - if ($doPlugin !== null ||$qc ) { - echo ""; - } - -/* - - -$out = '
    '; -$out .= $count['undone']; -$out .= '
    '; - -if($return) return $out; -echo $out;*/ From a94fc7a514a474778ffdc5e7e998f441ce1d2576 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 9 Mar 2017 16:16:19 +0100 Subject: [PATCH 02/41] give tabs a class for special styling I nearly needed that but then didn't. but it might come in handy --- tpl/nav-meta-box.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tpl/nav-meta-box.php b/tpl/nav-meta-box.php index 77328c5..abf95a3 100755 --- a/tpl/nav-meta-box.php +++ b/tpl/nav-meta-box.php @@ -9,7 +9,7 @@ $tabs = \dokuwiki\template\sprintdoc\Template::getInstance()->getMetaBoxTabs();
  •  
  • '; + echo '
  • '; echo '
    View Larger Map'; + echo '
    '; + echo '
    '; + } + } + ?>
    Date: Mon, 10 Apr 2017 13:11:17 +0200 Subject: [PATCH 06/41] SPR-742: Konfigurierbarkeit history colors --- css/area_forms.less | 50 ++++--------- css/area_recent.less | 163 +++++++++++++++++++++++++++++++++++++++++++ css/base.less | 2 +- style.ini | 1 + 4 files changed, 179 insertions(+), 37 deletions(-) create mode 100644 css/area_recent.less diff --git a/css/area_forms.less b/css/area_forms.less index 6469546..3d329be 100644 --- a/css/area_forms.less +++ b/css/area_forms.less @@ -25,34 +25,6 @@ form { width: 48.5%; } } - - - // older version (history) - .dokuwiki & > .no > ul > li { - min-height: 2rem; - vertical-align: baseline; - - a, - span, - img { - vertical-align: baseline; - } - - img { - margin-left: 4px; - margin-right: 4px; - } - - input[type="checkbox"] { - margin-bottom: .2rem; - } - - span.user bdi { - a { - vertical-align: baseline; - } - } - } } fieldset { @@ -130,6 +102,20 @@ keygen { padding-right: .3rem; } +input[type="radio"], +input[type="checkbox"] { + min-height: 1rem; +} + +input[type="radio"], +input[type="checkbox"], +input[type="image"] { + padding: 0; + border-style: none; + //box-shadow: none; :in ie picture and checkbox disappear +} + + input:active, input:focus, textarea:active, @@ -141,14 +127,6 @@ keygen:focus { border-color: #999; } -input[type="radio"], -input[type="checkbox"], -input[type="image"] { - padding: 0; - border-style: none; - box-shadow: none; -} - input[type="file"] { padding-top: .1rem; padding-bottom: .1rem; diff --git a/css/area_recent.less b/css/area_recent.less new file mode 100644 index 0000000..a24ca63 --- /dev/null +++ b/css/area_recent.less @@ -0,0 +1,163 @@ +/** + * This file provides the design styles for page revisions + * + * @author Jana Deutschlaender + */ + + +.dokuwiki { + +/* + + + + + list of changes + + + + + */ + form.changes { + li { + .sizechange { + color: @color-editBox; + + &.positive { + background-color: #cfc; + } + + &.negative { + background-color: #fdd; + } + } + } + + > .no > ul > li { + min-height: @formfield_min-height; + vertical-align: baseline; + margin-bottom: @small-spacing; + + .li { + line-height: 150%; + + > * { + min-height: 10px; + } + } + + a, + span, + img { + vertical-align: baseline; + } + + img { + margin-left: @small-spacing; + margin-right: @small-spacing; + } + + input[type="checkbox"] { + margin: 0 .5rem .2rem -1.5rem; + } + + span.user bdi { + a { + vertical-align: baseline; + } + } + } + } + + +/* + + + + + view of differents + + + + + */ + a.difflink { + color: @ini_existing; + + * { + color: inherit; + } + } + + .diffnav { + a { + background-color: @ini_background; + border: solid 1px @ini_background; + border-radius: @ini_default_border_radius; + color: @ini_nav_menu_color; + transition: @transition background-color, @transition color, @transition border-color; + + &::before { + background-color: inherit; + border: 0 none; + color: inherit; + } + + &:hover, + &:focus, + &:active { + background-color: @ini_nav_menu_color; + border: solid 1px @ini_nav_menu_color; + color: @ini_background; + + &::before { + background-color: inherit; + color: inherit; + } + } + } + } + + table.diff { + background-color: #fff; + border: solid 1px #fff; + border-top-width: 10px; + border-bottom-width: 10px; + + &.diff_inline { + border-top-width: 0; + + .diffnav { + padding-top: 10px; + padding-bottom: 10px; + } + } + + th { + background-color: @ini_background_content; + color: @ini_text; + padding-top: 10px; + padding-bottom: 10px; + + &.minor { + color: #999; + } + } + + td { + &.diff-blockheader { + background-color: #cfc; + color: @color-editBox; + } + + &.diff-context { + background-color: #eee; + color: @color-editBox; + } + } + + .diff-addedline { + background-color: #cfc; + color: @color-editBox; + + strong { + background-color: transparent; + color: #f00; + } + } + + .diff-deletedline { + background-color: #fdd; + color: @color-editBox; + + * { + color: inherit; + } + + strong { + background-color: transparent; + color: #f00; + } + } + } +} diff --git a/css/base.less b/css/base.less index 8d8a53f..aa93313 100755 --- a/css/base.less +++ b/css/base.less @@ -69,7 +69,7 @@ /* edit mode */ @highlight-odd-ini_text: fade(@ini_background_content, 95%); @highlight-even-ini_text: fade(@ini_text, 5%); -@color-editBox: #252525; // editmode for tables +@color-editBox: #252525; // editmode for tables, revision states //@nolinkedicon-ini_background: fade(@ini_background, 10%); diff --git a/style.ini b/style.ini index 1fd8b20..64a8289 100755 --- a/style.ini +++ b/style.ini @@ -79,6 +79,7 @@ css/area_togglelink.less = all css/area_forms.less = all css/area_search.less = all css/area_tabs.less = all +css/area_recent.less = all css/template_admin.less = all From 068280a2210ea5cc3e82602077940e97fb25a74d Mon Sep 17 00:00:00 2001 From: Silke Pisulla Date: Mon, 10 Apr 2017 13:11:39 +0200 Subject: [PATCH 07/41] SPR-908: QS - padding in nav (aside) --- css/area_main-sidebar-nav.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/area_main-sidebar-nav.less b/css/area_main-sidebar-nav.less index 681dd4d..b01ce83 100755 --- a/css/area_main-sidebar-nav.less +++ b/css/area_main-sidebar-nav.less @@ -111,7 +111,7 @@ flex-grow: 0; border-right: 1px solid @ini_nav_menu_color; text-align: center; - margin-right: @margin-small; + margin-right: 4%; color: inherit; // simple fake icon From c2ab07c1193aa25828223e7153a1848b4a396d1d Mon Sep 17 00:00:00 2001 From: Silke Pisulla Date: Mon, 10 Apr 2017 13:11:55 +0200 Subject: [PATCH 08/41] SPR-908: QS - comment --- css/area_msg.less | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/css/area_msg.less b/css/area_msg.less index 1e2ad9e..205b7ab 100644 --- a/css/area_msg.less +++ b/css/area_msg.less @@ -1,3 +1,10 @@ +/** + * This file provides the design styles for message block + * + * @author Jana Deutschlaender + */ + + .msg-area { clear: both; padding-top: 1.6rem; From 242e80d53557283370047522d7fbef0686c04978 Mon Sep 17 00:00:00 2001 From: Silke Pisulla Date: Mon, 10 Apr 2017 13:12:45 +0200 Subject: [PATCH 09/41] SPR-908: QS - no break in (except linebreak is needed) --- css/base_design.less | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/base_design.less b/css/base_design.less index 9d68d7b..d56d117 100755 --- a/css/base_design.less +++ b/css/base_design.less @@ -514,6 +514,10 @@ pre { padding: .7em 1em; } +code:not([class]) { + display: inline-block; +} + blockquote { border: solid @ini_border; border-width: 0 0 0 .25em; From 3002141dc6cded63a33426f4abd2d5897822eeb5 Mon Sep 17 00:00:00 2001 From: Silke Pisulla Date: Mon, 10 Apr 2017 13:13:11 +0200 Subject: [PATCH 10/41] SPR-908: QS - better transition in usertool icons --- css/area_nav-usertools.less | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/css/area_nav-usertools.less b/css/area_nav-usertools.less index 87959cd..aec94c5 100755 --- a/css/area_nav-usertools.less +++ b/css/area_nav-usertools.less @@ -141,10 +141,6 @@ bdi, bdi:first-of-type { color: @ini_nav_menu_hover_bg; - - //&::before { - // color: inherit; - //} } } } @@ -152,7 +148,7 @@ bdi { display: inline-block; color: inherit; - transition: @transition color; + //transition: @transition color; } bdi:first-of-type { @@ -168,7 +164,7 @@ left: -2px; font-size: 1.4rem; margin: 0; - transition: @transition color; + //transition: @transition color; @media @screen_min-xxlg { top: -.25rem; From 8aca7d1e5b17e27bcc5b558ebb69235fda98eef2 Mon Sep 17 00:00:00 2001 From: Silke Pisulla Date: Mon, 10 Apr 2017 13:33:51 +0200 Subject: [PATCH 11/41] SPR-908: QS - ie11 --- css/area_nav-usertools.less | 5 +++++ css/base.less | 1 + 2 files changed, 6 insertions(+) diff --git a/css/area_nav-usertools.less b/css/area_nav-usertools.less index aec94c5..65e9e7d 100755 --- a/css/area_nav-usertools.less +++ b/css/area_nav-usertools.less @@ -86,6 +86,7 @@ position: relative; min-height: 26px; + height: 1rem; // for IE11 overflow: visible; background: @ini_nav_menu_hover_bg; // for removing bg-image border: 0 none; @@ -95,6 +96,10 @@ margin-right: -.3rem; padding: 0 .2em 0 0; + @media @screen_only-xlg { + padding-bottom: .1em; + } + @media @screen_min-xxlg { margin-top: -(@space-min-xxlg); } diff --git a/css/base.less b/css/base.less index aa93313..fa91942 100755 --- a/css/base.less +++ b/css/base.less @@ -153,6 +153,7 @@ @screen_only-md: ~"only screen and (min-width: 800px) and (max-width: " ~"@{break-max-md}px)"; @screen_only-lg: ~"only screen and (min-width: " ~"@{break-min-md}px) and (max-width: " ~"@{break-max-xlg}px)"; +@screen_only-xlg: ~"only screen and (min-width: " ~"@{break-min-xlg}px) and (max-width: " ~"@{break-max-xxlg}px)"; @screen_xs-lg: ~"only screen and (min-width: " ~"@{break-min-xs}px) and (max-width: " ~"@{break-max-md}px)"; From ba5f92bc02323b15a023bd2ac7b7af8b284e0108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 10 Apr 2017 13:43:43 +0200 Subject: [PATCH 12/41] Adjust to changed main html --- detail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detail.php b/detail.php index 70ddd7c..5cce646 100755 --- a/detail.php +++ b/detail.php @@ -117,7 +117,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
    @@ -227,11 +226,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');
    -

    -
    - ← -

    -
    From 6f352bafb27d6b8a6819ca65a04198c78d30d566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 10 Apr 2017 13:49:08 +0200 Subject: [PATCH 14/41] function tpl_img_meta reliably exists --- detail.php | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/detail.php b/detail.php index 9aa119e..fdd2cbc 100755 --- a/detail.php +++ b/detail.php @@ -167,7 +167,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');

    - - -
    - $tag){ - $t = array(); - if (!empty($tag[0])) { - $t = array($tag[0]); - } - if(is_array($tag[3])) { - $t = array_merge($t,$tag[3]); - } - $value = tpl_img_getTag($t); - if ($value) { - echo '
    '.$lang[$tag[1]].':
    '; - if ($tag[2] == 'date') { - echo dformat($value); - } else { - echo hsc($value); - } - echo '
    '; - } - } - ?> -
    -
    From ecb77cc51cadc644f63b3cf5e3c2a7d1fb3c45a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 10 Apr 2017 13:49:54 +0200 Subject: [PATCH 15/41] Fix indent and more style-issues in details.php --- detail.php | 103 ++++++++++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/detail.php b/detail.php index fdd2cbc..8c87871 100755 --- a/detail.php +++ b/detail.php @@ -9,21 +9,25 @@ */ // must be run from within DokuWiki -if (!defined('DOKU_INC')) die(); +if (!defined('DOKU_INC')) { + die(); +} header('X-UA-Compatible: IE=edge,chrome=1'); ?> - + - + - <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?> - [<?php echo strip_tags($conf['title'])?>] + <?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?> + [<?php echo strip_tags($conf['title']) ?>] - - - + + + @@ -43,7 +47,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
    - - +
    - @@ -201,11 +209,10 @@ header('X-UA-Compatible: IE=edge,chrome=1'); -
    +
    -
  • ' . $elem . '
  • '; + },array_filter($data['items'])); + + /** + * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + * Begin shims as a temporary solution until the svg-approach is mainlined and the plugins have adapted + * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + */ + global $ACT; + if (act_clean($ACT) === 'show') { + /** @var \action_plugin_move_rename $move */ + $move = plugin_load('action', 'move_rename'); + if ($move && $move->getConf('pagetools_integration')) { + $attr = array( + 'style' => 'background-image: none;', + ); + $item = \dokuwiki\template\sprintdoc\tpl::pageToolItem('', $move->getLang('renamepage'), __DIR__ . '/images/tools/41-format-paint.svg', $attr); + $data['items'][] = '
  • ' . $item . '
  • '; + } + + /** @var \action_plugin_odt_export $odt */ + $odt = plugin_load('action', 'odt_export'); + if ($odt && $odt->getConf('showexportbutton')) { + global $ID, $REV; + $params = array('do' => 'export_odt'); + if ($REV) { + $params['rev'] = $REV; + } + $attr = array( + 'class' => 'action export_pdf', + 'style' => 'background-image: none;', + ); + $svg = __DIR__ . '/images/tools/43-file-delimeted.svg'; + $item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $odt->getLang('export_odt_button'), $svg, $attr); + $data['items'][] = '
  • ' . $item . '
  • '; + } + + /** @var \action_plugin_dw2pdf $dw2pdf */ + $dw2pdf = plugin_load('action', 'dw2pdf'); + if ($dw2pdf && $dw2pdf->getConf('showexportbutton')) { + global $ID, $REV; + + $params = array('do' => 'export_pdf'); + if ($REV) { + $params['rev'] = $REV; + } + $attr = array( + 'class' => 'action export_pdf', + 'style' => 'background-image: none;', + ); + $svg = __DIR__ . '/images/tools/40-pdf-file.svg'; + $item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $dw2pdf->getLang('export_pdf_button'), $svg, $attr); + $data['items'][] = '
  • ' . $item . '
  • '; + } + } + /** + * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + * End of shims + * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + */ + + $data['items']['top'] = '
  • ' . static::pageToolAction('top') . '
  • '; + return $data; + } } diff --git a/tpl/nav-page-tools.php b/tpl/nav-page-tools.php index f57d335..1cd38a8 100755 --- a/tpl/nav-page-tools.php +++ b/tpl/nav-page-tools.php @@ -9,82 +9,13 @@
      'main-svg', - 'items' => array( - 'edit' => dokuwiki\template\sprintdoc\tpl::pageToolAction('edit'), - 'revert' => dokuwiki\template\sprintdoc\tpl::pageToolAction('revert'), - 'revisions' => dokuwiki\template\sprintdoc\tpl::pageToolAction('revisions'), - 'backlink' => dokuwiki\template\sprintdoc\tpl::pageToolAction('backlink'), - 'subscribe' => dokuwiki\template\sprintdoc\tpl::pageToolAction('subscribe'), - 'top' => dokuwiki\template\sprintdoc\tpl::pageToolAction('top'), - ) - ); - + $data = dokuwiki\template\sprintdoc\tpl::assemblePageTools(); foreach ($data['items'] as $k => $html) { - if ($html) { - echo "
    • $html
    • "; - } + echo $html; } - /** - * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - * Begin shims as a temporary solution until the svg-approach is mainlined and the plugins have adapted - * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - */ - global $ACT; - if (act_clean($ACT) === 'show') { - /** @var action_plugin_move_rename $move */ - $move = plugin_load('action', 'move_rename'); - if ($move && $move->getConf('pagetools_integration')) { - $attr = array( - 'style' => 'background-image: none;', - ); - $item = \dokuwiki\template\sprintdoc\tpl::pageToolItem('', $move->getLang('renamepage'), __DIR__ . '/../images/tools/41-format-paint.svg', $attr); - echo '
    • ' . $item . '
    • '; - } - /** @var action_plugin_odt_export $odt */ - $odt = plugin_load('action', 'odt_export'); - if ($odt && $odt->getConf('showexportbutton')) { - global $ID, $REV; - $params = array('do' => 'export_odt'); - if ($REV) { - $params['rev'] = $REV; - } - $attr = array( - 'class' => 'action export_pdf', - 'style' => 'background-image: none;', - ); - $svg = __DIR__ . '/../images/tools/43-file-delimeted.svg'; - $item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $odt->getLang('export_odt_button'), $svg, $attr); - echo '
    • ' . $item . '
    • '; - } - - /** @var action_plugin_dw2pdf $dw2pdf */ - $dw2pdf = plugin_load('action', 'dw2pdf'); - if ($dw2pdf && $dw2pdf->getConf('showexportbutton')) { - global $ID, $REV; - - $params = array('do' => 'export_pdf'); - if ($REV) { - $params['rev'] = $REV; - } - $attr = array( - 'class' => 'action export_pdf', - 'style' => 'background-image: none;', - ); - $svg = __DIR__ . '/../images/tools/40-pdf-file.svg'; - $item = \dokuwiki\template\sprintdoc\tpl::pageToolItem(wl($ID, $params, false, '&'), $dw2pdf->getLang('export_pdf_button'), $svg, $attr); - echo '
    • ' . $item . '
    • '; - } - } - /** - * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - * End of shims - * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - */ ?>
    From 9161dde6469491dc934c9c23d730ad0eb9f2a7a9 Mon Sep 17 00:00:00 2001 From: Silke Pisulla Date: Thu, 13 Apr 2017 15:29:36 +0200 Subject: [PATCH 28/41] SPR-869: QC Plugin icon qs --- css/area_nav-page-attributes.less | 41 +++++++++++++++++-------------- css/base_mixins.less | 4 +-- css/plugins/qc.less | 10 +++++--- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/css/area_nav-page-attributes.less b/css/area_nav-page-attributes.less index 6cfa847..f433a32 100644 --- a/css/area_nav-page-attributes.less +++ b/css/area_nav-page-attributes.less @@ -1,6 +1,10 @@ /** * Page Attribute Icons in the breadcrumb bar */ + + +/* + + + + + icons in breadcrumb area + + + + + */ + .page-attributes { list-style: none; float: right; @@ -8,17 +12,11 @@ max-width: 30%; margin: -.45em 0 0; padding: 0; + @media @screen_max-xs { max-width: 90%; } - li.plugin_qc .qc_icon svg { - margin-left: 0; - margin-top: 0.2em; - width: 1.5em; - height: 1.5em; - } - > li { .btn-usertools-wrapper(); // uniform li .btn-usertools-num(); @@ -28,26 +26,34 @@ display: block; width: auto; min-height: @toggle-size; - border: 1px solid @wikiicons-border; - border-radius: @ini_default_border_radius; text-align: center; margin: 0 .25rem; + strong { + display: block; + min-height: 1.64rem; + border: 1px solid @wikiicons-border; + border-radius: @ini_default_border_radius; + } + a { display: block; width: auto; - min-height: 26px; - &:hover, &:focus, &:active { + min-height: 1.64rem; + border: 1px solid @wikiicons-border; + border-radius: @ini_default_border_radius; + + &:hover, + &:focus, + &:active { background-color: @ini_nav_menu_hover_color; border-color: @ini_nav_menu_hover_color; color: @ini_nav_menu_hover_bg; - span.qc_icon { - &.qc_bad, &.qc_meh, &.qc_good { - fill: @ini_nav_menu_hover_bg; - color: @ini_nav_menu_hover_bg; - } - } + span { + fill: @ini_nav_menu_hover_bg; + color: @ini_nav_menu_hover_bg; + } } } @@ -59,6 +65,5 @@ font-size: 1.2rem; line-height: 1; } - } } diff --git a/css/base_mixins.less b/css/base_mixins.less index 82a5291..f287552 100755 --- a/css/base_mixins.less +++ b/css/base_mixins.less @@ -200,7 +200,7 @@ font-size: @font-size-default; @media @screen_min-xxlg { - margin-top: .25rem; + margin-top: .22rem; } @media @screen_max-xxlg { @@ -208,7 +208,7 @@ } @media @screen_max-md { - margin-top: .25rem; + margin-top: .2rem; } } diff --git a/css/plugins/qc.less b/css/plugins/qc.less index df44e98..71d3167 100644 --- a/css/plugins/qc.less +++ b/css/plugins/qc.less @@ -2,23 +2,25 @@ * Styles for the QC plugin */ -// icon in page attributes + +/* + + + + + icon in page attributes3 + + + + + */ + .page-attributes .plugin_qc { .qc_icon { margin: 0; svg { - margin-top: 0.1em; - margin-left: 0.1em; + margin-top: .1em; width: 1.6em; height: 1.6em; + font-size: (@font-size-small - .06); } } } + // output .qc-output { font-size: 90%; border-bottom: 1px solid @ini_border; } - From b457c328a9a6b6ccd9bb3fdb0e76e30bbb4ca958 Mon Sep 17 00:00:00 2001 From: Silke Pisulla Date: Thu, 13 Apr 2017 15:35:03 +0200 Subject: [PATCH 29/41] SPR-908: QS - wiki-icons --- css/area_nav-page-attributes.less | 4 ++++ css/plugins/do_tasks.less | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/css/area_nav-page-attributes.less b/css/area_nav-page-attributes.less index f433a32..a04dfa6 100644 --- a/css/area_nav-page-attributes.less +++ b/css/area_nav-page-attributes.less @@ -65,5 +65,9 @@ font-size: 1.2rem; line-height: 1; } + + .num { + top: -.6em; + } } } diff --git a/css/plugins/do_tasks.less b/css/plugins/do_tasks.less index 261f5de..6b66253 100755 --- a/css/plugins/do_tasks.less +++ b/css/plugins/do_tasks.less @@ -19,7 +19,6 @@ ul.page-attributes { } .num { - margin-top: 1px; background-color: @noopentasks-border; // fix color: @noopentasks-color; // fix } From e302d67fb601311046a86f685e4d745f7d8a7e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Tue, 18 Apr 2017 13:24:33 +0200 Subject: [PATCH 30/41] Remove references to removed options In commit cb7cc643bf8e0ff0a632314222134a32ded8ae21 the other options were removed, as discussed. This commit now removes references to these options from the codebase. SPR-754 --- Template.php | 4 ++-- main.php | 6 +++--- tpl/favicon_tiles.php | 10 +++++----- tpl/nav-usertools-buttons.php | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Template.php b/Template.php index 7eae3ae..df7ef52 100644 --- a/Template.php +++ b/Template.php @@ -181,7 +181,7 @@ class Template { 'img', array( 'class' => 'mobile-hide', - 'src' => array(tpl_getConf('logo'), 'wiki:logo-wide.png', 'wiki:logo.png'), + 'src' => array('wiki:logo-wide.png', 'wiki:logo.png'), 'alt' => $title, ), 0, 0 @@ -190,7 +190,7 @@ class Template { 'img', array( 'class' => 'mobile-only', - 'src' => array('wiki:logo-32x32.png', 'wiki:favicon.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')), + 'src' => array('wiki:logo-32x32.png', 'wiki:favicon.png', 'wiki:logo-square.png', 'wiki:logo.png'), 'alt' => $title, ), 32, 32 diff --git a/main.php b/main.php index 25e0d4d..ea4794e 100755 --- a/main.php +++ b/main.php @@ -20,7 +20,7 @@ if (empty($JSINFO['template'])) { } $JSINFO['template']['sprintdoc'] = array('sidebar_toggle_elements' => tpl_getConf('sidebar_sections')); -$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && !empty($_SERVER['REMOTE_USER']) ); +$showTools = true; $showSidebar = true; /* */ ?> @@ -118,7 +118,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content "; - + ?>
    'shortcut icon', - 'href' => array('wiki:favicon.ico', 'wiki:favicon.png', tpl_getConf('logo')) + 'href' => array('wiki:favicon.ico', 'wiki:favicon.png') ), 0, 0 // no scaling ); @@ -29,7 +29,7 @@ foreach(array(57, 60, 72, 76, 114, 120, 144, 152, 180) as $size) { array( 'rel' => 'apple-touch-icon', 'sizes' => $size . 'x' . $size, - 'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')) + 'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png') ), $size, $size ); @@ -42,7 +42,7 @@ foreach(array(32, 96, 192) as $size) { array( 'rel' => 'icon', 'sizes' => $size . 'x' . $size, - 'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')) + 'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png') ), $size, $size ); @@ -54,7 +54,7 @@ foreach(array(70, 310) as $size) { 'meta', array( 'name' => 'msapplication-square' . $size . 'x' . $size . 'logo', - 'content' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')) + 'content' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png') ), $size, $size ); @@ -66,7 +66,7 @@ foreach(array(array(310, 150)) as $size) { 'meta', array( 'name' => 'msapplication-wide' . $size[0] . 'x' . $size[1] . 'logo', - 'content' => array('wiki:logo-' . $size[0] . 'x' . $size[1] . '.png', 'wiki:logo-wide.png', 'wiki:logo.png', tpl_getConf('logo')) + 'content' => array('wiki:logo-' . $size[0] . 'x' . $size[1] . '.png', 'wiki:logo-wide.png', 'wiki:logo.png') ), $size[0], $size[1] ); diff --git a/tpl/nav-usertools-buttons.php b/tpl/nav-usertools-buttons.php index 1caff4c..c780267 100755 --- a/tpl/nav-usertools-buttons.php +++ b/tpl/nav-usertools-buttons.php @@ -32,11 +32,11 @@ $class = 'opentask opentasks'; break; } - $linktarget = tpl_getConf('tasks_page'); + $doInner = "".tpl_getLang('prefix_tasks_user')." ".count($tasks).""; if($linktarget){ if (substr($linktarget, 0, 1) !== ':') { - $linktarget = tpl_getConf('user_ns'). $_SERVER['REMOTE_USER'] .':' . $linktarget; + $linktarget = 'user:' . $_SERVER['REMOTE_USER'] .':' . 'dashboard'; } if($num == 0){ echo '
  • '.$doInner.'
  • '; From 270380eb001a10e985baf59e370be64dabfed1f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Tue, 18 Apr 2017 13:48:52 +0200 Subject: [PATCH 31/41] Remove $showTools, because it is set to true Since the config-option for hide-tools no longer exists, this variable has become superflous. --- tpl/nav-page-tools.php | 33 ++++++++++++++++----------------- tpl/nav-usertools-buttons.php | 2 +- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/tpl/nav-page-tools.php b/tpl/nav-page-tools.php index 1cd38a8..c261be0 100755 --- a/tpl/nav-page-tools.php +++ b/tpl/nav-page-tools.php @@ -1,24 +1,23 @@ - - - + ?> + +
    + diff --git a/tpl/nav-usertools-buttons.php b/tpl/nav-usertools-buttons.php index c780267..7c99099 100755 --- a/tpl/nav-usertools-buttons.php +++ b/tpl/nav-usertools-buttons.php @@ -1,7 +1,7 @@ + if ($conf['useacl']): ?>