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 2018/09/06 13:21:42 UTC

[sling-org-apache-sling-app-cms] branch master updated: Cleaning up the optimizer screen and updating to use the snapshot version of the file optimizer

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 b394dab  Cleaning up the optimizer screen and updating to use the snapshot version of the file optimizer
b394dab is described below

commit b394dabe5cc15e152dd525fa54dc0ca9c0040a9c
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Sep 6 09:21:38 2018 -0400

    Cleaning up the optimizer screen and updating to use the snapshot
    version of the file optimizer
---
 builder/src/main/provisioning/cms.txt                    |  2 +-
 ui/src/main/frontend/src/scss/cms.scss                   | 16 ++++++++++++++--
 .../components/cms/optimizefile/optimizefile.jsp         | 12 ++++++------
 3 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/builder/src/main/provisioning/cms.txt b/builder/src/main/provisioning/cms.txt
index 2059785..493f3c4 100644
--- a/builder/src/main/provisioning/cms.txt
+++ b/builder/src/main/provisioning/cms.txt
@@ -21,7 +21,7 @@
 
 [artifacts startLevel=20]
 	org.apache.cocoon/cocoon-serializers-charsets/1.0.0
-	org.apache.sling/org.apache.sling.fileoptim/0.9.0
+	org.apache.sling/org.apache.sling.fileoptim/0.9.1-SNAPSHOT
     org.apache.sling/org.apache.sling.resourcemerger/1.3.6
     org.apache.sling/org.apache.sling.cms.core/${cms.version}
     org.apache.sling/org.apache.sling.cms.ui/${cms.version}
diff --git a/ui/src/main/frontend/src/scss/cms.scss b/ui/src/main/frontend/src/scss/cms.scss
index 3c57f91..f931bd9 100644
--- a/ui/src/main/frontend/src/scss/cms.scss
+++ b/ui/src/main/frontend/src/scss/cms.scss
@@ -31,6 +31,18 @@ body.cms {
 	}
 }
 
+dl {
+	padding: 1em 0;
+}
+
+dd {
+	padding-left: 1em;
+}
+
+dt {
+	font-weight: bold;
+}
+
 h1 {
 	font-size: 200%;
 }
@@ -74,9 +86,9 @@ h5 {
 	overflow: auto;
 }
 
-.Preview {
+.preview {
 	max-width: 100%;
-	padding: .5em;
+	padding: 1em;
 }
 
 table.dataTable thead .sorting:after,
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/optimizefile/optimizefile.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/optimizefile/optimizefile.jsp
index 888d686..4057b07 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/optimizefile/optimizefile.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/optimizefile/optimizefile.jsp
@@ -19,8 +19,8 @@
 <%@include file="/libs/sling-cms/global.jsp"%>
 <sling:adaptTo var="optimizer" adaptable="${slingRequest.requestPathInfo.suffixResource}" adaptTo="org.apache.sling.fileoptim.models.OptimizeResource" />
 <sling:adaptTo var="optimizedFile" adaptable="${sling:getRelativeResource(slingRequest.requestPathInfo.suffixResource,'jcr:content')}" adaptTo="org.apache.sling.fileoptim.models.OptimizedFile" />
-<div class="Grid Fit-Medium">
-	<div class="Cell Medium-50">
+<div class="columns">
+	<div class="column">
 		<h4>Info</h4>
 		<c:choose>
 			<c:when test="${optimizer.canOptimize && optimizer.result.optimized}">
@@ -52,7 +52,7 @@
 				</dl>
 				<form action="${slingRequest.requestPathInfo.suffix}" class="Form-Ajax" method="post">
 					<input type="hidden" name=":operation" value="fileoptim:optimize" />
-					<input type="submit" value="Optimize" />
+					<input type="submit" value="Optimize" class="button is-primary" />
 				</form>
 			</c:when>
 			<c:when test="${optimizer.optimized}">
@@ -73,7 +73,7 @@
 				</dl>
 				<form action="${slingRequest.requestPathInfo.suffix}" class="Form-Ajax" method="post">
 					<input type="hidden" name=":operation" value="fileoptim:restore" />
-					<input type="submit" value="Restore Original" />
+					<input type="submit" value="Restore Original" class="button is-primary" />
 				</form>
 			</c:when>
 			<c:otherwise>
@@ -81,8 +81,8 @@
 			</c:otherwise>
 		</c:choose>
 	</div>
-	<div class="Cell Medium-50">
+	<div class="column">
 		<h4>Preview</h4>
-		<object data="/system/fileoptim/preview?path=${slingRequest.requestPathInfo.suffix}" class="Preview"></object>
+		<object data="/system/fileoptim/preview?path=${slingRequest.requestPathInfo.suffix}" class="preview"></object>
 	</div>
 </div>