From fa2b2835560284fa986709f0a2db2e35a9733fef Mon Sep 17 00:00:00 2001 From: Ruediger Marwein Date: Mon, 26 Jul 2021 20:37:15 +0200 Subject: [PATCH] fixed id-selectors that get translated to fix non-english view, added mediamanager layout, fixed backlink view, added recent view --- assets/landing.css | 72 ++++++++++++++++---------------------------- assets/landing.js | 74 +++++++++++++++++++++++++++++++--------------- changelog.txt | 5 ++++ main.php | 4 +-- style.ini | 17 +++++------ 5 files changed, 91 insertions(+), 81 deletions(-) diff --git a/assets/landing.css b/assets/landing.css index 3dc9d8f..0e0dfbf 100644 --- a/assets/landing.css +++ b/assets/landing.css @@ -522,16 +522,19 @@ Resend password padding-left:20px; } +.act-recent #dw__recent ul, .act-revisions #page__revisions ul { list-style-type: none; padding:0; width:100%; } +.act-recent #dw__recent ul li, .act-revisions #page__revisions ul li { padding:5px; border: 1px solid #000; border-width: 0px 0px 1px 0px; } +.act-recent #dw__recent ul .li, .act-revisions #page__revisions ul .li { width:100%; display:flex; @@ -539,47 +542,53 @@ Resend password .act-revisions #page__revisions .li > input[type=checkbox] { width: 3%; } +.act-recent #dw__recent.li > .date, .act-revisions #page__revisions .li > .date { width: 20%; } +.act-recent #dw__recent .li > *, .act-revisions #page__revisions .li > * { display: inline-block; } + +.act-recent #dw__recent .li > .diff_link, .act-revisions #page__revisions .li > img, .act-revisions #page__revisions .li > .diff_link { text-align: center; width: 3%; } +.act-recent #dw__recent .li > a.wikilink1, .act-revisions #page__revisions .li > a.wikilink1 { width: 10%; } +.act-recent #dw__recent > .sum, .act-revisions #page__revisions .li > .sum { flex: 1; } +.act-recent #dw__recent > .user, .act-revisions #page__revisions .li > .user { text-align: right; flex: 1; } +.act-recent #dw__recent .li > .user + .act-recent #dw__recent .li > .sum, .act-revisions #page__revisions .li > .user + .act-revisions #page__revisions .li > .sum { width: 10%; } +.act-recent #dw__recent .li > .sizechange, .act-revisions #page__revisions .li > .sizechange { width: 15%; - text-align: right;; + text-align: right; } -/* -.act-revisions #page__revisions ul { - display: table; +.act-recent #dw__recent ul { + list-style-type: none; + padding: 0; + margin: 0; +} +.act-recent #dw__recent ul .li > * { + padding: 0 10px; } -.act-revisions #page__revisions ul li { - display: table-row; -} -.act-revisions #page__revisions ul li .li > * { - display: table-cell; -} -*/ .act-diff .diffnav { } .act-diff .diffnav > * { @@ -649,41 +658,12 @@ Resend password /** Media Manager **/ -.act-media #media__tree ul { - padding: 0; - position:relative; - border-top: 1px solid gray; + +.act-media .container-fluid { + max-width: 1920px; } -.act-media #media__tree > ul { -} -.act-media #media__tree li > img { - float: left; - margin-top: 10px; -} -.act-media #media__tree li .li { - height: 2em; - padding-left: 20px; - padding-top: 5px; -} -.act-media #media__tree > ul ul { - left: 1em; -} -.act-media .thumbs { - list-style-type: none; - padding: 0; - display: flex; - flex-wrap: wrap; - align-content: stretch; -} -.act-media .thumbs li { +.act-media #mediamanager__page .filelist .thumbs li { + border: 1px solid black; - width: 30%; - float:left; - margin: 3px; - padding: 10px; - text-align: center; -} - -.act-media .tabs { - + border-radius: 5px; } \ No newline at end of file diff --git a/assets/landing.js b/assets/landing.js index f50e013..351e524 100644 --- a/assets/landing.js +++ b/assets/landing.js @@ -1,4 +1,7 @@ jQuery(function($) { + + var mediaMgrInterval = null; + /** * Edit form */ @@ -47,10 +50,10 @@ jQuery(function($) { * Login Form */ (function() { - $loginHeadline = $('#login'); - if(!$loginHeadline.length) return; + $loginForm = $('#dw__login'); + if(!$loginForm.length) return; - $loginContainer = $loginHeadline.parent(); + $loginContainer = $loginForm.parent().parent(); $loginContainer.find('.level1').addClass('alert alert-warning'); $loginContainer.find('form').addClass('form-horizontal'); $loginContainer.find('input[name=u], input[name=p]').addClass('form-control'); @@ -66,10 +69,10 @@ jQuery(function($) { * Profile */ (function() { - $profileHeadline = $('#update_your_account_profile'); - if(!$profileHeadline.length) return; - $profileContainer = $profileHeadline.parent(); - $registerContainer = $profileContainer.find('#dw__register'); + var $profileForm = $('#dw__register'); + if(!$profileForm.length) return; + $profileContainer = $profileForm.parent().parent(); + $registerContainer = $profileForm; $registerContainer.find('input[type=text], input[type=password], input[type=email]').addClass('form-control'); $registerContainer.find('button[type=submit]').addClass('btn btn-primary'); //$('#dw__register').addClass('panel'); @@ -166,8 +169,13 @@ jQuery(function($) { potentialCurrent.addClass('bg-success'); } })(); - + /* Show recent */ + (function() { + $revisions = $('#dw__recent'); + if(!$revisions.length) return; + })(); + /* Diff revisions */ (function() { $diff = $('#differences'); @@ -194,28 +202,46 @@ jQuery(function($) { })(); (function() { - $resendpwHeadline = $('#send_new_password'); - if(!$resendpwHeadline.length) return; - $resendpw = $resendpwHeadline.parent(); + $resendpwForm = $('#dw__resendpwd'); + if(!$resendpwForm.length) return; + $resendpw = $resendpwForm.parent().parent(); $resendpw.find('.centeralign').removeClass('centeralign').addClass('panel alert alert-info'); $resendpw.find('form input[name=login]').addClass('form-control'); $resendpw.find('button').addClass('btn btn-primary'); })(); (function() { - $mediamanager = $('#mediamanager__page'); + var $mediamanager = $('#mediamanager__page'); if(!$mediamanager.length) return; - $mediamanager.addClass('row'); - $mediamanager.find('.panel.namespaces').addClass('col-md-3'); - $mediamanager.find('.panel.filelist').removeClass('ui-resizable').addClass('col-md-6'); - $mediamanager.find('.panel.file').addClass('col-md-3'); - // resizable does mess with the grid - //dw_mediamanager.$resizables().resizable('destroy'); - - //$mediamanager.find('.tabs').addClass('btn-group'); - //$mediamanager.find('.tabs li').addClass('btn btn-default'); - - // stuff inside ".thumbs" and ".rows" changes dynamically - + // Couldn't find another way than to overload this function to fix the panel resize width issue. + // Copied from dokuwiki's media.js + // changed 99.9% to 99% to avoid flow into second row. + dw_mediamanager.update_resizable = function() { + var $resizables = dw_mediamanager.$resizables(); + $resizables.resizable({ + handles: (jQuery('html[dir=rtl]').length ? 'w' : 'e'), + resize: function (event, ui) { + var $page = $mediamanager; + var widthFull = $page.width(); + var widthResizables = 0; + $resizables.each(function () { + widthResizables += jQuery(this).width(); + }); + var $filePanel = $page.find('div.panel.file'); + // set max width of resizable column + var widthOtherResizable = widthResizables - jQuery(this).width(); + var minWidthNonResizable = parseFloat($filePanel.css("min-width")); + var maxWidth = widthFull - (widthOtherResizable + minWidthNonResizable) - 1; + $resizables.resizable("option", "maxWidth", maxWidth); + // was: 99.9% + var relWidthNonResizable = 99 - (100 * widthResizables / widthFull); + $filePanel.width(relWidthNonResizable + '%'); + dw_mediamanager.resize(); + dw_mediamanager.opacity_slider(); + dw_mediamanager.portions_slider(); + } + }); + dw_mediamanager.resize(); + }; })(); }); \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 1a96b45..da37e90 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ ... +2021-07-26 +Fixed id selectors that get translated to unilingual ones in the same module to fix ACT=login,register,resendpw +Fixed ACT=backlink view +Added ACT=mediamanager,recent + 2021-07-18 Visually adjusted the areas of ACT=['show', 'profile', 'login', 'revisions', 'admin', 'diff', 'edit', 'preview', 'source'] Visually adjusted ACT=admin's stat page, config manager, user manager, revisions & differences, draft, resendpwd diff --git a/main.php b/main.php index eb85442..3719930 100644 --- a/main.php +++ b/main.php @@ -56,7 +56,7 @@ $loggedIn = $INPUT->server->str('REMOTE_USER'); - +
@@ -72,7 +72,7 @@ $loggedIn = $INPUT->server->str('REMOTE_USER'); - +