Vlad Kurkin (b_vladi) wrote in changelog,
Vlad Kurkin
b_vladi
changelog

[livejournal] r20042: LJSUP-9800: In RTE dont see old ljcut

Committer: vkurkin
LJSUP-9800: In RTE dont see old ljcut
LJSUP-9799: Incorrect working repost button
U   trunk/htdocs/js/ck/contents.css
U   trunk/htdocs/js/ck/plugins/livejournal/plugin.js
Modified: trunk/htdocs/js/ck/contents.css
===================================================================
--- trunk/htdocs/js/ck/contents.css	2011-09-14 08:03:14 UTC (rev 20041)
+++ trunk/htdocs/js/ck/contents.css	2011-09-15 02:43:43 UTC (rev 20042)
@@ -27,13 +27,13 @@
 pre {
 	display:block;
 	margin: 0;
-	min-height:14px;
 }
 
 /* LJ CSS */
 .lj-template {
 	background-color: #000;
 	color: #fff;
+	display: none;
 }
 
 lj\:wishlist,

Modified: trunk/htdocs/js/ck/plugins/livejournal/plugin.js
===================================================================
--- trunk/htdocs/js/ck/plugins/livejournal/plugin.js	2011-09-14 08:03:14 UTC (rev 20041)
+++ trunk/htdocs/js/ck/plugins/livejournal/plugin.js	2011-09-15 02:43:43 UTC (rev 20042)
@@ -1169,7 +1169,7 @@
 						element.children.length = 0;
 					},
 					a: function(element) {
-						if(element.parent.attributes.contentEditable != 'false'){
+						if(element.parent.attributes && element.parent.attributes.contentEditable != 'false'){
 							element.attributes['lj-cmd'] = 'LJLink';
 						}
 					},
@@ -1178,6 +1178,15 @@
 						if (!parent || !parent.attributes || parent.attributes.contentEditable != 'false') {
 							element.attributes['lj-cmd'] = 'LJImage';
 						}
+					},
+					div: function(element){
+						if(element.attributes && element.attributes['class'] == 'ljcut'){
+							var newElement = new CKEDITOR.htmlParser.element('lj-cut');
+							console.log(newElement);
+							newElement.attributes['lj-cmd'] = 'LJCut';
+							newElement.children = element.children;
+							return newElement;
+						}
 					}
 				}
 			}, 5);
@@ -1208,7 +1217,7 @@
 							case 'lj-map':
 								newElement = new CKEDITOR.htmlParser.element('lj-map');
 								newElement.attributes.url = decodeURIComponent(element.attributes['lj-url']);
-								element.attributes.style.replace(/([a-z-]+):(.*?);/gi, function(relust, name, value) {
+								element.attributes.style && element.attributes.style.replace(/([a-z-]+):(.*?);/gi, function(relust, name, value) {
 									newElement.attributes[name] = parseInt(value);
 								});
 

Tags: b_vladi, css, js, livejournal
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