openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 8dec4a330860235914b76bacdeed18efd0e14500
parent 4ca60099235656be44dbade8eca55bc458933988
Author: dankert <openrat@jandankert.de>
Date:   Mon,  6 Dec 2021 22:56:52 +0100

Fixes: Layout fix for search; unique results in search.

Diffstat:
Mmodules/cms/action/SearchAction.class.php | 16+++++++++-------
Mmodules/cms/ui/themes/default/style/openrat-search.less | 1+
Mmodules/cms/ui/themes/default/style/openrat.css | 3++-
Mmodules/cms/ui/themes/default/style/openrat.min.css | 2+-
4 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/modules/cms/action/SearchAction.class.php b/modules/cms/action/SearchAction.class.php @@ -81,8 +81,10 @@ class SearchAction extends BaseAction if ( $searchFlag & self::FLAG_ID ) { - if ( BaseObject::available( intval($searchText) ) ) - $listObjectIds[] = intval( $searchText ); + if ( BaseObject::available( intval($searchText) ) ) { + + $listObjectIds[intval($searchText)] = intval( $searchText ); + } if ( $this->userIsAdmin() ) { @@ -97,7 +99,7 @@ class SearchAction extends BaseAction 'name' => $user->fullname, 'desc' => $user->desc, 'lastchange_date' => 0 ); - $resultList[] = $userResult; + $resultList['u'.$user->userid] = $userResult; } catch( \util\exception\ObjectNotFoundException $e) { ; // userid is unknown @@ -117,7 +119,7 @@ class SearchAction extends BaseAction 'name' => $user->fullname, 'desc' => $user->desc, 'lastchange_date' => 0); - $resultList[] = $userResult; + $resultList['u'.$user->userid] = $userResult; } } @@ -163,7 +165,7 @@ class SearchAction extends BaseAction $o = new BaseObject( $objectid ); $o->load(); if ($o->hasRight( Permission::ACL_READ )) - $resultList[] = array( + $resultList['o'.$objectid] = array( 'id' => $objectid, 'type' => $o->getType(), 'name' => $o->filename, @@ -178,8 +180,8 @@ class SearchAction extends BaseAction $t->load(); $p = new Project( $t->projectid ); $o = new BaseObject( $p->getRootObjectId() ); - if ($o->hasRight( Permission::ACL_READ )) - $resultList[] = array( + if ($o->hasRight( Permission::ACL_PROP )) + $resultList['t'.$templateid] = array( 'id' => $templateid, 'type'=> 'template', 'name'=> $t->name, diff --git a/modules/cms/ui/themes/default/style/openrat-search.less b/modules/cms/ui/themes/default/style/openrat-search.less @@ -13,6 +13,7 @@ border-bottom: 0.1em solid; .or-input { border: 0; + padding: 0; box-shadow: 0 0 0 !important; border-radius: 0; width: 8em; diff --git a/modules/cms/ui/themes/default/style/openrat.css b/modules/cms/ui/themes/default/style/openrat.css @@ -1267,6 +1267,7 @@ th { } .or-search-input .or-input { border: 0; + padding: 0; box-shadow: 0 0 0 !important; border-radius: 0; width: 8em; @@ -1284,7 +1285,7 @@ th { .or-search-result-entry { padding-top: 0.2em; } -/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22var%5C%2Fwww%5C%2Flocalhost%5C%2Fcms%5C%2Fmodules%5C%2Fcms%5C%2Fui%5C%2Fthemes%5C%2Fdefault%5C%2Fstyle%5C%2Fopenrat-search.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22AAII%2CGAHD%2COAGE%3BCACC%3B%3BAAEF%2CGAND%2COAME%3BCACC%3B%3BAAGF%2CGAVD%2COAUE%3BCACC%2C0BAAA%3B%3BAADF%2CGAVD%2COAUE%2CMAEC%3BCACE%3BCACA%2C4BAAA%3BCACA%3BCACA%3B%3BAAMA%2CGAtBL%2COAmBE%2CWAEC%2CWACG%3BCACC%3B%3BAAEF%2CGAzBL%2COAmBE%2CWAEC%2CWAIG%3BCACC%3B%3BAAON%2CGAjCD%2COAiCE%3BCACC%3BCACA%3B%3BAAEA%2CGArCH%2COAiCE%2COAIE%3BCACC%22%7D */ +/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22var%5C%2Fwww%5C%2Flocalhost%5C%2Fcms%5C%2Fmodules%5C%2Fcms%5C%2Fui%5C%2Fthemes%5C%2Fdefault%5C%2Fstyle%5C%2Fopenrat-search.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22AAII%2CGAHD%2COAGE%3BCACC%3B%3BAAEF%2CGAND%2COAME%3BCACC%3B%3BAAGF%2CGAVD%2COAUE%3BCACC%2C0BAAA%3B%3BAADF%2CGAVD%2COAUE%2CMAEC%3BCACE%3BCACA%3BCACA%2C4BAAA%3BCACA%3BCACA%3B%3BAAMA%2CGAvBL%2COAoBE%2CWAEC%2CWACG%3BCACC%3B%3BAAEF%2CGA1BL%2COAoBE%2CWAEC%2CWAIG%3BCACC%3B%3BAAON%2CGAlCD%2COAkCE%3BCACC%3BCACA%3B%3BAAEA%2CGAtCH%2COAkCE%2COAIE%3BCACC%22%7D */ /* Include style: /default/style/openrat-selector */ .or-selector-tree { display: none; diff --git a/modules/cms/ui/themes/default/style/openrat.min.css b/modules/cms/ui/themes/default/style/openrat.min.css @@ -14,7 +14,7 @@ .or-nojs-text{display: block}.or-visible-for-nojs{display: none} /*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family: 'Oxygen', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;font-size: 0.9em;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%}body{margin: 0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display: block}audio,canvas,progress,video{display: inline-block;vertical-align: baseline}audio:not([controls]){display: none;height: 0}[hidden],template{display: none}a{background: transparent}a:active,a:hover{outline: 0}abbr[title]{border-bottom: 1px dotted}b,strong{font-weight: bold}dfn{font-style: italic}h1{font-size: 1.2em;margin: .67em 0}mark{background: #ff0;color: #000}small{font-size: 80%}sub,sup{font-size: 75%;line-height: 0;position: relative;vertical-align: baseline}sup{top: -0.5em}sub{bottom: -0.25em}img{border: 0}svg:not(:root){overflow: hidden}figure{margin: 1em 40px}hr{-moz-box-sizing: content-box;box-sizing: content-box;height: 0}pre{overflow: auto}code,kbd,pre,samp,time{font-family: 'Source Code Pro', monospace, monospace;font-size: 1em}button,input,optgroup,select,textarea{color: inherit;background-color: inherit;font: inherit;margin: 0}button{overflow: visible}button,select{text-transform: none}button,html input[type="button"]{-webkit-appearance: button;cursor: pointer}button[disabled],html input[disabled]{cursor: default}button input::-moz-focus-inner{border: 0;padding: 0}input{line-height: normal}input[type="reset"],input[type="submit"]{-webkit-appearance: button;cursor: pointer}input[type="checkbox"],input[type="radio"]{box-sizing: border-box;padding: 0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height: auto}input[type="search"]{-webkit-appearance: textfield;-moz-box-sizing: content-box;-webkit-box-sizing: content-box;box-sizing: content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance: none}fieldset{border: 1px solid #c0c0c0;margin: 0 2px;padding: .35em .625em .75em}legend{border: 0;padding: 0}textarea{overflow: auto}optgroup{font-weight: bold}table{border-collapse: collapse;border-spacing: 0}td,th{padding: 0;text-align: left}*,::before,::after{box-sizing: border-box} .or-notice{border-style: solid;border-width: 1px 1px 1px 1em;border-color: #000;padding: 1.1em;position: relative;width: 90%;margin: 1em;border-radius: .2em;-moz-border-radius: .2em;-webkit-border-radius: .2em;-khtml-border-radius: .2em}@media only screen and (max-width: 55rem){.or-notice{border-radius: 0;-moz-border-radius: 0;-webkit-border-radius: 0;-khtml-border-radius: 0;border-style: solid;border-width: 1px 0 0 1em;margin: 0;font-size: 0.75em;width: 100%}}.or-notice-container{display: block;position: fixed;bottom: 0;right: 0;padding: 0;width: 50%;z-index: 5}@media only screen and (max-width: 55rem){.or-notice-container{right: 0;bottom: 0;width: 100%;padding: 0}}.or-notice-toolbar{float: right;margin: 0 .2em;font-size: 2em;color: gray;cursor: pointer}.or-notice:hover .or-notice-toolbar{color: black}.or-notice div.text{font-weight: bold}.or-notice-text{font-size: 1.1em}.or-notice-log{font-family: 'Source Code Pro', Monospace, Monospaced, Courier;height: 15em;overflow-y: scroll} -.or-search--on-active{display: none}.or-search--on-inactive{display: inline}.or-search-input{border-bottom: .1em solid}.or-search-input .or-input{border: 0;box-shadow: 0 0 0 !important;border-radius: 0;width: 8em}.or-search--is-active .or-search--on-active{display: inline}.or-search--is-active .or-search--on-inactive{display: none}.or-search-result{display: none;padding: 1em}.or-search-result-entry{padding-top: 0.2em} +.or-search--on-active{display: none}.or-search--on-inactive{display: inline}.or-search-input{border-bottom: .1em solid}.or-search-input .or-input{border: 0;padding: 0;box-shadow: 0 0 0 !important;border-radius: 0;width: 8em}.or-search--is-active .or-search--on-active{display: inline}.or-search--is-active .or-search--on-inactive{display: none}.or-search-result{display: none;padding: 1em}.or-search-result-entry{padding-top: 0.2em} .or-selector-tree{display: none}.or-selector-search{display: none}.or-selector--is-tree-active .or-selector-tree{display: block}.or-selector--is-search-active .or-selector-search{display: block} html,body{width: 100%;height: 100%}@media only screen and (min-width: 56rem){body:before{content: "";position: fixed;left: 0;right: 0;z-index: -1;width: 100%;height: 100%;display: block;background-size: cover;background-position: center;background-repeat: no-repeat}}.or-editor-toolbar{font-size: 1.5em}iframe{width: 100%;height: 500px;display: block}a:link,a:visited{font-weight: normal;text-decoration: none}a:active,a:hover{font-weight: normal;text-decoration: none}.or-act-clickable{cursor: pointer}.CodeMirror{height: auto}.or-search > .or-input{box-shadow: none !important;background-color: transparent !important}.or--initial-hidden{opacity: 0}.or-view-flying-button{display: block;bottom: 1em;right: 1em;position: absolute}.or-linklist{display: flex;flex-direction: column;padding: 10% 20%}.or-linklist > .or-linklist-line{border: 1px solid;margin-top: 1em;padding: 1em;border-radius: .5em;-moz-border-radius: .5em;-webkit-border-radius: .5em;-khtml-border-radius: .5em}.or-dirty{font-weight: bold}.or-draggable{cursor: move}.or-droppable--active{background-color: #3c8b2e !important;cursor: move;z-index: 3}.or-droppable--hover{background-color: #08f169 !important;cursor: move;z-index: 3}.or--invisible{visibility: hidden}.or--visible{visibility: visible}.or-link{color: inherit}.or-link--is-active{font-weight: bold}legend{font-size: 1.1em;font-weight: bold;padding: 0 .5em}