Skip to content
This repository
Browse code

ENHANCEMENT: Ntfcatn. image embedding(trac #7438)

Adding an additional warning / notification message, when author embedds an external image.
  • Loading branch information...
commit 5f94d230002d25cab906a27ae0705953c7d0d9d8 1 parent f79d2df
mightycoco authored June 25, 2012 chillu committed August 16, 2012
1  css/AssetUploadField.css
@@ -22,6 +22,7 @@ body.cms.ss-uploadfield-edit-iframe .fieldholder-small label, .composite.ss-asse
22 22
 .ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-preview { position: absolute; height: 30px; width: 40px; overflow: hidden; z-index: 1; }
23 23
 .ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-preview .no-preview { display: block; height: 100%; width: 100%; background: url("../images/icons/document.png") 2px 0px no-repeat; }
24 24
 .ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item-info { position: relative; height: 30px; overflow: hidden; background-color: #5db4df; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5db4df), color-stop(8%, #5db1dd), color-stop(50%, #439bcb), color-stop(54%, #3f99cd), color-stop(96%, #207db6), color-stop(100%, #1e7cba)); background-image: -webkit-linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); background-image: -moz-linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); background-image: -o-linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); background-image: -ms-linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); background-image: linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); }
  25
+.ss-assetuploadfield .ss-uploadfield-files .ss-uploadfield-item .info { position: relative; padding: 7px; overflow: hidden; background-color: #FFBE66; border: 1px solid #FF9300; }
25 26
 .ss-assetuploadfield .ss-uploadfield-files .ui-state-error .ss-uploadfield-item-info { background-color: #c11f1d; padding-right: 130px; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c11f1d), color-stop(4%, #bf1d1b), color-stop(8%, #b71b1c), color-stop(15%, #b61e1d), color-stop(27%, #b11d1d), color-stop(31%, #ab1d1c), color-stop(42%, #a51b1b), color-stop(46%, #9f1b19), color-stop(50%, #9f1b19), color-stop(54%, #991c1a), color-stop(58%, #971a18), color-stop(62%, #911b1b), color-stop(65%, #911b1b), color-stop(88%, #7e1816), color-stop(92%, #771919), color-stop(100%, #731817)); background-image: -webkit-linear-gradient(top, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); background-image: -moz-linear-gradient(top, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); background-image: -o-linear-gradient(top, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); background-image: -ms-linear-gradient(top, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); background-image: linear-gradient(top, #c11f1d 0%, #bf1d1b 4%, #b71b1c 8%, #b61e1d 15%, #b11d1d 27%, #ab1d1c 31%, #a51b1b 42%, #9f1b19 46%, #9f1b19 50%, #991c1a 54%, #971a18 58%, #911b1b 62%, #911b1b 65%, #7e1816 88%, #771919 92%, #731817 100%); }
26 27
 .ss-assetuploadfield .ss-uploadfield-files .ui-state-error .ss-uploadfield-item-info .ss-uploadfield-item-name { width: 100%; cursor: default; background: #bcb9b9; background: rgba(201, 198, 198, 0.9); }
27 28
 .ss-assetuploadfield .ss-uploadfield-files .ui-state-error .ss-uploadfield-item-info .ss-uploadfield-item-name .name { text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.7); }
4  forms/HtmlEditorField.php
@@ -896,6 +896,10 @@ public function getOembed() {
896 896
 	public function appCategory() {
897 897
 		return 'embed';
898 898
 	}
  899
+	
  900
+	public function getInfo() {
  901
+		return $this->oembed->info;
  902
+	}
899 903
 }
900 904
 
901 905
 class HtmlEditorField_Image extends HtmlEditorField_File {
1  lang/en.yml
@@ -548,5 +548,6 @@ en:
548 548
     STARTALL: 'Start all'
549 549
     STARTALLINFO: 'Start all uploads'
550 550
     Saved: Saved
  551
+    HOTLINKINFO: Info: This image will be hotlinked. Please ensure you have permissions from the original site creator to do so.
551 552
   Versioned:
552 553
     has_many_Versions: Versions
1  lang/en_GB.yml
@@ -513,5 +513,6 @@ en_GB:
513 513
     STARTALL: 'Start all'
514 514
     STARTALLINFO: 'Start all uploads'
515 515
     Saved: Saved
  516
+    HOTLINKINFO: Info: This image will be hotlinked. Please ensure you have permissions from the original site creator to do so.
516 517
   Versioned:
517 518
     has_many_Versions: Versions
1  oembed/Oembed.php
@@ -253,6 +253,7 @@ protected function loadData() {
253 253
 				$data['provider_url'] = $protocoll.$host;
254 254
 				$data['width'] = imagesx($image);
255 255
 				$data['height'] = imagesy($image);
  256
+				$data['info'] = _t('UploadField.HOTLINKINFO', 'Info: This image will be hotlinked. Please ensure you have permissions from the original site creator to do so.');
256 257
 			}
257 258
 		}
258 259
 
7  scss/AssetUploadField.scss
@@ -88,6 +88,13 @@ body.cms.ss-uploadfield-edit-iframe, .composite.ss-assetuploadfield .details fie
88 88
 			padding: 0;
89 89
 			overflow: hidden;
90 90
 			position: relative;
  91
+			.info {
  92
+				position: relative; 
  93
+				padding: 7px; 
  94
+				overflow: hidden; 
  95
+				background-color: #FFBE66; 
  96
+				border: 1px solid #FF9300;
  97
+			}
91 98
 		}
92 99
 		.ss-uploadfield-item-preview {
93 100
 			position: absolute;
14  templates/Includes/HtmlEditorField_viewfile.ss
@@ -38,11 +38,13 @@
38 38
 				</div>
39 39
 			</div>
40 40
 		</div>
41  
-	<div class="details ss-uploadfield-item-editform loading">
42  
-		<fieldset>
43  
-			<% loop Fields %>
44  
-				$FieldHolder
45  
-			<% end_loop %>
46  
-		</fieldset>
  41
+		<% if Info %><div class="info">$Info</div><% end_if %>
  42
+		<div class="details ss-uploadfield-item-editform loading">
  43
+			<fieldset>
  44
+				<% loop Fields %>
  45
+					$FieldHolder
  46
+				<% end_loop %>
  47
+			</fieldset>
  48
+		</div>
47 49
 	</div>
48 50
 </div>

0 notes on commit 5f94d23

Please sign in to comment.
Something went wrong with that request. Please try again.