You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2019/11/15 13:50:17 UTC

[sling-org-apache-sling-app-cms] branch master updated: Fixing search alignment issues for SLING-8836

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git


The following commit(s) were added to refs/heads/master by this push:
     new 8bb7c77  Fixing search alignment issues for SLING-8836
8bb7c77 is described below

commit 8bb7c778d42629d0f73c5204a8a71b93b2d76836
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri Nov 15 08:50:06 2019 -0500

    Fixing search alignment issues for SLING-8836
---
 ui/src/main/frontend/js/cms.nav.js                  |  6 +++---
 ui/src/main/frontend/scss/cms.scss                  | 21 +++++++++++++++------
 .../cms/contentbreadcrumb/contentbreadcrumb.jsp     |  9 +++++++++
 .../components/cms/contentgrid/contentgrid.jsp      |  9 ---------
 .../components/cms/contenttable/contenttable.jsp    |  9 ---------
 5 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/ui/src/main/frontend/js/cms.nav.js b/ui/src/main/frontend/js/cms.nav.js
index d295b11..461531f 100644
--- a/ui/src/main/frontend/js/cms.nav.js
+++ b/ui/src/main/frontend/js/cms.nav.js
@@ -46,7 +46,7 @@
         callbacks : {
             created: function () {
                 let cnav = this;
-                var search = cnav.querySelector('input[name=search]'),
+                var search = document.querySelector('.contentnav-search input[name=search]'),
                     filter = function (event) {
                         event.stopPropagation();
                         event.preventDefault();
@@ -71,9 +71,9 @@
                             item.classList.add('is-hidden');
                         }
                     });
-                    cnav.querySelector('input[name=search]').value = resourceParam;
+                    document.querySelector('.contentnav-search input[name=search]').value = resourceParam;
                 } else if (searchParam) {
-                    cnav.querySelector('input[name=search]').value = searchParam;
+                    document.querySelector('.contentnav-search input[name=search]').value = searchParam;
                     filter(new Event('fake'));
                 }
             }
diff --git a/ui/src/main/frontend/scss/cms.scss b/ui/src/main/frontend/scss/cms.scss
index cae78d7..069083d 100644
--- a/ui/src/main/frontend/scss/cms.scss
+++ b/ui/src/main/frontend/scss/cms.scss
@@ -63,6 +63,11 @@ h5 {
     font-size: 120%;
 }
 
+.breadcrumb {
+    display:flex;
+    justify-content: space-between;
+} 
+
 .card.is-selected {
     border: 1px solid $violet;
 }
@@ -80,6 +85,11 @@ h5 {
     }
 }
 
+.contentnav-search {
+    display: flex;
+    margin-block-end: 0;
+}
+
 .has-padding-1 {
     padding: .5em;
 }
@@ -116,6 +126,10 @@ h5 {
     position: relative;
 }
 
+.is-selected .is-linked {
+    border: 1px solid $primary;
+}
+
 .is-vhidden {
     position: absolute !important;
     top: -9999px !important;
@@ -184,7 +198,7 @@ h5 {
 
 .scroll-container {
     overflow-y: auto;
-    height: calc(100vh - 190px);
+    height: calc(100vh - 205px);
     overflow-x: hidden;
     padding: 2px;
     @media screen and (max-width: $tablet - 1px) {
@@ -213,11 +227,6 @@ h5 {
     padding: .5em;
 }
 
-.table__filter {
-    display: inline-block;
-    float: right;
-}
-
 .table__wrapper {
     overflow: auto;
 }
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
index 1fc2a82..7c09b1f 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
@@ -33,4 +33,13 @@
             </a>
         </li>
     </ul>
+    <form method="get" class="contentnav-search">
+        <p class="control has-icons-left">
+            <label class="is-vhidden" for="search-term">Search</label>
+            <input class="input is-small" type="text" name="search" id="search-term">
+            <span class="icon is-small is-left">
+                <i class="jam jam-search" aria-hidden="true"></i>
+            </span>
+        </p>
+    </form>
 </nav>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp
index 0bb2c75..f00a883 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp
@@ -18,15 +18,6 @@
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
 <div class="reload-container scroll-container contentnav" data-path="${resource.path}.grid.html${slingRequest.requestPathInfo.suffix}">
-    <form method="get" class="table__filter">
-        <p class="control has-icons-left">
-            <label class="is-vhidden" for="search-term">Search</label>
-            <input class="input is-small" type="text" name="search" id="search-term">
-            <span class="icon is-small is-left">
-                <i class="jam jam-search" aria-hidden="true"></i>
-            </span>
-        </p>
-    </form>
     <div class="tile is-ancestor">
         <c:forEach var="child" items="${sling:listChildren(slingRequest.requestPathInfo.suffixResource)}" varStatus="status">
             <c:set var="showCard" value="${false}" />
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
index cde6ae5..74f9567 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
@@ -18,15 +18,6 @@
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
  <div class="reload-container table__wrapper scroll-container contentnav" data-path="${resource.path}.html${slingRequest.requestPathInfo.suffix}">
-    <form method="get" class="table__filter">
-        <p class="control has-icons-left">
-            <label class="is-vhidden" for="search-term">Search</label>
-            <input class="input is-small" type="text" name="search" id="search-term">
-            <span class="icon is-small is-left">
-                <i class="jam jam-search" aria-hidden="true"></i>
-            </span>
-        </p>
-    </form>
     <table class="table is-fullwidth is-striped sortable">
         <thead>
             <tr>