Максим Червонный (fiskus_boulder) wrote in changelog,
Максим Червонный
fiskus_boulder
changelog

[livejournal] r20571: LJSUP-9873: RTE - lj-cut highlight

Committer: mchervonniy
LJSUP-9873: RTE - lj-cut highlight
U   trunk/htdocs/js/ck/plugins/livejournal/plugin.js
Modified: trunk/htdocs/js/ck/plugins/livejournal/plugin.js
===================================================================
--- trunk/htdocs/js/ck/plugins/livejournal/plugin.js	2011-11-18 08:35:55 UTC (rev 20570)
+++ trunk/htdocs/js/ck/plugins/livejournal/plugin.js	2011-11-18 08:51:32 UTC (rev 20571)
@@ -479,6 +479,59 @@
 				updateFrames();
 			});
 
+			//////////  CSS for inner editor's elements  //////////////
+			editor.addCss('.lj-cut {\
+				margin: 5px 0;\
+				width: 100%;\
+				cursor: pointer;\
+				height: 9px!important;\
+				background-color: #FFF;\
+				border: 0 dashed #BCBCBC;\
+				background: url(/js/ck/images/ljcut.png) no-repeat 0 0;\
+			}');
+			editor.addCss('.lj-cut-open {\
+				background-position: 0 2px;\
+				border-width: 0 0 1px;\
+			}');
+			editor.addCss('.lj-cut-close {\
+				border-width: 1px 0 0;\
+				background-position: 0 -8px;\
+			}');
+			editor.addCss('.lj-embed {\
+				background: #CCCCCC url(' + CKEDITOR.getUrl(this.path + 'images/placeholder_flash.png') + ') no-repeat center center;\
+				border: 1px dotted #000000;\
+				height: 80px;\
+				width: 100%;\
+			}');
+			editor.addCss('.lj-poll {\
+				width:100%;\
+				border: #000 1px dotted;\
+				background-color: #d2d2d2;\
+				font-style: italic;\
+			}');
+			editor.addCss('.lj-like {\
+				width: 100%;\
+				height: 44px !important;\
+				overflow: hidden;\
+				padding: 0;\
+				margin: 0;\
+				background: #D2D2D2;\
+				border: 1px dotted #000;\
+			}');
+			editor.addCss('.lj-map, .lj-iframe {\
+				width: 100%;\
+				overflow: hidden;\
+				min-height: 13px;\
+				margin-top: 20px;\
+				background: #D2D2D2;\
+				border: 1px dotted #000;\
+				text-align: center;\
+			}');
+			editor.addCss('.lj-selected {\
+				background-color: #C4E0F7;\
+				border: 1px solid #6EA9DF;\
+			}');
+
 			//////////  LJ User Button //////////////
 			var url = top.Site.siteroot + '/tools/endpoints/ljuser.bml';
 
@@ -596,8 +649,6 @@
 				command: 'LJEmbedLink'
 			});
 
-			editor.addCss('.lj-embed {' + 'background: #CCCCCC url(' + CKEDITOR.getUrl(this.path + 'images/placeholder_flash.png') + ') no-repeat center center;' + 'border: 1px dotted #000000;' + 'height: 80px;' + 'width: 100%;' + '}');
-
 			function doEmbed(content) {
 				if (content && content.length) {
 					if (window.switchedRteOn) {
@@ -613,29 +664,6 @@
 			}
 
 			//////////  LJ Cut Button //////////////
-			editor.addCss('.lj-cut {\
-				margin: 5px 0;\
-				width: 100%;\
-				cursor: pointer;\
-				height: 9px!important;\
-				background-color: #FFF;\
-				border: 0 dashed #BCBCBC;\
-				background: url(/js/ck/images/ljcut.png) no-repeat 0 0;\
-			}');
-			editor.addCss('.lj-cut-open {\
-				background-position: 0 2px;\
-				border-width: 0 0 1px;\
-			}');
-			editor.addCss('.lj-cut-close {\
-				border-width: 1px 0 0;\
-				background-position: 0 -8px;\
-			}');
-			editor.addCss('.lj-selected {\
-				background-color: #C4E0F7;\
-				border: 1px solid #6EA9DF;\
-			}');
-
-
 			editor.addCommand('LJCut', {
 				exec: function() {
 					var text,
@@ -907,8 +935,6 @@
 			if (top.canmakepoll) {
 				var currentPoll;
 
-				editor.addCss('.lj-poll {' + 'width:100%;' + 'border: #000 1px dotted;' + 'background-color: #d2d2d2;' + 'font-style: italic;' + '}');
-
 				CKEDITOR.dialog.add('LJPollDialog', function() {
 					var isAllFrameLoad = 0, okButtonNode, questionsWindow, setupWindow;
 
@@ -1044,8 +1070,6 @@
 			var dialogContent = '<div class="cke-dialog-likes"><ul class="cke-dialog-likes-list">';
 			likeButtons.defaultButtons = [];
 
-			editor.addCss('.lj-like {' + 'width: 100%;' + 'height: 44px !important;' + 'overflow: hidden;' + 'padding: 0;' + 'margin: 0;' + 'background: #D2D2D2;' + 'border: 1px dotted #000;' + '}');
-
 			for (var i = 0; i < buttonsLength; i++) {
 				var button = likeButtons[i];
 				likeButtons[button.id] = likeButtons[button.abbr] = button;
@@ -1173,9 +1197,6 @@
 				label: top.CKLang.LJLike_name,
 				command: 'LJLike'
 			});
-
-			//////////  LJ Map Button & LJ Iframe //////////////
-			editor.addCss('.lj-map, .lj-iframe {' + 'width: 100%;' + 'overflow: hidden;' + 'min-height: 13px;' + 'margin-top: 20px;' + 'background: #D2D2D2;' + 'border: 1px dotted #000;' + 'text-align: center;' + '}');
 		},
 		afterInit: function(editor) {
 			var dataProcessor = editor.dataProcessor;

Tags: fiskus_boulder, js, livejournal, mchervonniy
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments