]> source.dussan.org Git - nextcloud-server.git/commitdiff
An idea to suggest that this is just a sample of the full text
authorOlivier Paroz <github@oparoz.com>
Sat, 18 Apr 2015 20:11:36 +0000 (22:11 +0200)
committerOlivier Paroz <github@oparoz.com>
Thu, 23 Apr 2015 16:19:21 +0000 (18:19 +0200)
apps/files_sharing/css/public.css
apps/files_sharing/js/public.js

index b3d2aae3fd97602641bf6a0370daff914ddd2932..7aa898b489d6a219f8d7f989772ce2e4c4e92519 100644 (file)
@@ -29,6 +29,7 @@
 
 #imgframe .text-preview {
        display: inline-block;
+       position: relative;
        text-align: left;
        white-space: pre-wrap;
        overflow-y: auto;
        -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 */
index f80d5e15de9b8c04760a19b8ca63e457b490f340..c08b7c7859c1ff3fb21a8e3090aefa627f313f1e 100644 (file)
@@ -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' &&