[Pkg-owncloud-commits] [owncloud] 13/122: An idea to suggest that this is just a sample of the full text

David Prévot taffit at moszumanska.debian.org
Sat May 9 00:00:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit a968877a8b0454861dc27b763023ce52429a39dc
Author: Olivier Paroz <github at oparoz.com>
Date:   Sat Apr 18 22:11:36 2015 +0200

    An idea to suggest that this is just a sample of the full text
---
 apps/files_sharing/css/public.css | 11 +++++++++++
 apps/files_sharing/js/public.js   |  5 ++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css
index b3d2aae..7aa898b 100644
--- a/apps/files_sharing/css/public.css
+++ b/apps/files_sharing/css/public.css
@@ -29,6 +29,7 @@
 
 #imgframe .text-preview {
 	display: inline-block;
+	position: relative;
 	text-align: left;
 	white-space: pre-wrap;
 	overflow-y: auto;
@@ -41,6 +42,16 @@
 	-moz-user-select: none;
 	-ms-user-select: none;
 	user-select: none;
+	z-index: 1;
+}
+
+#imgframe .watermark {
+	color: #E3E3E3;
+	font-size: 75pt;
+	position: absolute;
+	width: 80%;
+	top: 100px;
+	z-index: 0;
 }
 
 /* fix multiselect bar offset on shared page */
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index f80d5e1..c08b7c7 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -118,7 +118,7 @@ OCA.Sharing.PublicApp = {
 				url: url,
 				headers: {Range: "bytes=0-1000"}
 			}).then(function (data) {
-				var textDiv = $('<span/>').addClass('text-preview');
+				var textDiv = $('<div/>').addClass('text-preview');
 				textDiv.text(data);
 				textDiv.appendTo('#imgframe');
 				var divHeight = textDiv.height();
@@ -129,6 +129,9 @@ OCA.Sharing.PublicApp = {
 				if (divHeight > previewHeight) {
 					textDiv.height(previewHeight);
 				}
+				var watermark = $('<div/>').addClass('watermark');
+				watermark.text('SAMPLE');
+				watermark.appendTo('#imgframe');
 			});
 		} else if (previewSupported === 'true' ||
 			mimetype.substr(0, mimetype.indexOf('/')) === 'image' &&

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list