spacevillain (spacevillain) wrote in changelog,
spacevillain
spacevillain
changelog

[livejournal] r23251: LJSUP-13130: RTE: lists causing problems...

Committer: atyurin
LJSUP-13130: RTE: lists causing problems with lj-cut
U   trunk/htdocs/js/ck/ckeditor-dev.js
U   trunk/htdocs/js/ck/ckeditor.js
U   trunk/htdocs/js/ck/config.js
Modified: trunk/htdocs/js/ck/ckeditor-dev.js
===================================================================
--- trunk/htdocs/js/ck/ckeditor-dev.js	2012-11-02 13:29:36 UTC (rev 23250)
+++ trunk/htdocs/js/ck/ckeditor-dev.js	2012-11-02 13:59:50 UTC (rev 23251)
@@ -124,4 +124,4 @@
 if(c&&!b.ie6Compat){var u=b.isCustomDomain(),v='javascript:void(function(){'+encodeURIComponent('document.open();'+(u?'document.domain="'+document.domain+'";':'')+'document.close();')+'}())',w=h.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+v+'"'+' tabIndex="-1"'+'></iframe>');w.appendTo(r.getParent());}s.unselectable();t.unselectable();return{element:q,parts:{dialog:q.getChild(0),title:s,close:t,tabs:r.getChild(2),contents:r.getChild([3,0,0,0]),footer:r.getChild([3,0,1,0])}};},destroy:function(o){var p=o.container,q=o.element;if(p){p.clearCustomData();p.remove();}if(q){q.clearCustomData();o.elementMode==1&&q.show();delete o.element;}}};})());a.editor.prototype.getThemeSpace=function(m){var n='cke_'+m,o=this._[n]||(this._[n]=a.document.getById(n+'_'+this.name));return o;};a.editor.prototype.resize=function(m,n,o,p){var v=this;var q=v.container,r=a.document.getById('cke_contents_'+v.name),s=b.webkit&&v.document&&v.document.getWindow().$.frameElement,t=p?q.getChild(1):q;t.setSize('width',m,true);s&&(s.style.width='1%');var u=o?0:(t.$.offsetHeight||0)-(r.$.clientHeight||0);r.setStyle('height',Math.max(n-u,0)+'px');s&&(s.style.width='100%');v.fire('resize');};a.editor.prototype.getResizable=function(m){return m?a.document.getById('cke_contents_'+this.name):this.container;};(function(){j.add('xml',{});a.xml=function(m){var n=null;if(typeof m=='object')n=m;else{var o=(m||'').replace(/&nbsp;/g,'\xa0');if(window.DOMParser)n=new DOMParser().parseFromString(o,'text/xml');else if(window.ActiveXObject){try{n=new ActiveXObject('MSXML2.DOMDocument');}catch(p){try{n=new ActiveXObject('Microsoft.XmlDom');}catch(p){}}if(n){n.async=false;n.resolveExternals=false;n.validateOnParse=false;n.loadXML(o);}}}this.baseXml=n;};a.xml.prototype={selectSingleNode:function(m,n){var o=this.baseXml;if(n||(n=o))if(c||n.selectSingleNode)return n.selectSingleNode(m);else if(o.evaluate){var p=o.evaluate(m,n,null,9,null);return p&&p.singleNodeValue||null;}return null;},selectNodes:function(m,n){var o=this.baseXml,p=[];if(n||(n=o))if(c||n.selectNodes)return n.selectNodes(m);else if(o.evaluate){var q=o.evaluate(m,n,null,5,null);if(q){var r;while(r=q.iterateNext())p.push(r);}}return p;},getInnerXml:function(m,n){var o=this.selectSingleNode(m,n),p=[];if(o){o=o.firstChild;while(o){if(o.xml)p.push(o.xml);else if(window.XMLSerializer)p.push(new XMLSerializer().serializeToString(o));o=o.nextSibling;}}return p.length?p.join(''):null;}};})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(m){var n=m.config,o=m.lang.colorButton,p;
 if(!b.hc){q('TextColor','fore',o.textColorTitle);q('BGColor','back',o.bgColorTitle);}function q(t,u,v){var w=e.getNextId()+'_colorBox';m.ui.add(t,'panelbutton',{label:v,title:v,className:'cke_button_'+t.toLowerCase(),modes:{wysiwyg:1},panel:{css:m.skin.editor.css,attributes:{role:'listbox','aria-label':o.panelTitle}},onBlock:function(x,y){y.autoSize=true;y.element.addClass('cke_colorblock');y.element.setHtml(r(x,u,w));y.element.getDocument().getBody().setStyle('overflow','hidden');k.fire('ready',this);var z=y.keys,A=m.lang.dir=='rtl';z[A?37:39]='next';z[40]='next';z[9]='next';z[A?39:37]='prev';z[38]='prev';z[2228224+9]='prev';z[32]='click';},onOpen:function(){var x=m.getSelection(),y=x&&x.getStartElement(),z=new d.elementPath(y),A;y=z.block||z.blockLimit||m.document.getBody();do A=y&&y.getComputedStyle(u=='back'?'background-color':'color')||'transparent';while(u=='back'&&A=='transparent'&&y&&(y=y.getParent()));if(!A||A=='transparent')A='#ffffff';this._.panel._.iframe.getFrameDocument().getById(w).setStyle('background-color',A);}});};function r(t,u,v){var w=[],x=n.colorButton_colors.split(','),y=x.length+(n.colorButton_enableMore?2:1),z=e.addFunction(function(F,G){if(F=='?'){var H=arguments.callee;function I(K){this.removeListener('ok',I);this.removeListener('cancel',I);K.name=='ok'&&H(this.getContentElement('picker','selectedColor').getValue(),G);};m.openDialog('colordialog',function(){this.on('ok',I);this.on('cancel',I);});return;}m.focus();t.hide(false);m.fire('saveSnapshot');new a.style(n['colorButton_'+G+'Style'],{color:'inherit'}).remove(m.document);if(F){var J=n['colorButton_'+G+'Style'];J.childRule=G=='back'?function(K){return s(K);}:function(K){return!(K.is('a')||K.getElementsByTag('a').count())||s(K);};new a.style(J,{color:F}).apply(m.document);}m.fire('saveSnapshot');});w.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',o.auto,'" onclick="CKEDITOR.tools.callFunction(',z,",null,'",u,"');return false;\" href=\"javascript:void('",o.auto,'\')" role="option" aria-posinset="1" aria-setsize="',y,'"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',v,'"></span></td><td colspan=7 align=center>',o.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');for(var A=0;A<x.length;A++){if(A%8===0)w.push('</tr><tr>');var B=x[A].split('/'),C=B[0],D=B[1]||C;if(!B[1])C='#'+C.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var E=m.lang.colors[D]||D;w.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',E,'" onclick="CKEDITOR.tools.callFunction(',z,",'",C,"','",u,"'); return false;\" href=\"javascript:void('",E,'\')" role="option" aria-posinset="',A+2,'" aria-setsize="',y,'"><span class="cke_colorbox" style="background-color:#',D,'"></span></a></td>');
 }if(n.colorButton_enableMore===undefined||n.colorButton_enableMore)w.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',o.more,'" onclick="CKEDITOR.tools.callFunction(',z,",'?','",u,"');return false;\" href=\"javascript:void('",o.more,"')\"",' role="option" aria-posinset="',y,'" aria-setsize="',y,'">',o.more,'</a></td>');w.push('</tr></table>');return w.join('');};function s(t){return t.getAttribute('contentEditable')=='false'||t.getAttribute('data-nostyle');};}});i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};j.colordialog={init:function(m){m.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);a.editorConfig=function(m){j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');j.addExternal('ljcut2','plugins/lj/ljcut/plugin.js');j.addExternal('ljuser2','plugins/lj/ljuser/plugin.js');var n=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],o=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','enterkey','entities','format','htmldataprocessor','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange'];if(Site.page.ljpost){o.push('autogrow');m.autoGrow_minHeight=400;n.push('ljspell','ljfont','ljcut2','ljuser2');}else o.push('dialog','image','link','font');m.language='ru';m.autoParagraph=false;m.autoUpdateElement=false;m.docType='<!DOCTYPE html>';if(Site.page.ljpost){m.contentsCss='/js/ck/contents_new.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;}else{m.contentsCss='/js/ck/contents.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;}m.fillEmptyBlocks=false;if(Site.is_dev_server)m.extraPlugins=n.join(',');else Array.prototype.push.apply(o,n);m.plugins=o.join(',');m.contentsLangDirection='ltr';
-m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=Site.page.ljpost?true:false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','LJFont','LJColor','-','LJLink2','LJUser2','-','LJImage',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut','LJSpoiler','LJMap','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','LJSpell','Undo','Redo'];else p=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[p.filter(function(r){return r;})];m.enterMode=2;m.shiftEnterMode=1;m.keystrokes=[[2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'LJLink2'],[1114112+66,'bold'],[1114112+73,'italic'],[1114112+85,'underline']];m.colorButton_colors='000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF';m.fontSize_sizes='smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large';m.disableObjectResizing=true;m.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address';m.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';m.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';m.coreStyles_bold={element:'b',overrides:'strong'};m.coreStyles_italic={element:'i',overrides:'em'};m.indentClasses=[];m.indentOffset=0;m.pasteFromWordRemoveFontStyles=false;m.pasteFromWordRemoveStyles=false;if(!Site.page.ljpost)m.protectedSource.push(/<lj-poll-\d+\s*\/?>/gi);m.LJFontDefault='normal';m.LJFontStyle={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};m.LJFontSize={tiny:'0.7em',small:'0.9em',normal:'1.0em',large:'1.4em',huge:'1.8em'};m.protectedSource.push(/<lj-replace name="first_post"\s*\/?>/gi);};a.editorConfig(i);})();
+m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=Site.page.ljpost?true:false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','LJFont','LJColor','-','LJLink2','LJUser2','-','LJImage',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut2','LJSpoiler','LJMap','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','LJSpell','Undo','Redo'];else p=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[p.filter(function(r){return r;})];m.enterMode=2;m.shiftEnterMode=1;m.keystrokes=[[2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'LJLink2'],[1114112+66,'bold'],[1114112+73,'italic'],[1114112+85,'underline']];m.colorButton_colors='000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF';m.fontSize_sizes='smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large';m.disableObjectResizing=true;m.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address';m.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';m.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';m.coreStyles_bold={element:'b',overrides:'strong'};m.coreStyles_italic={element:'i',overrides:'em'};m.indentClasses=[];m.indentOffset=0;m.pasteFromWordRemoveFontStyles=false;m.pasteFromWordRemoveStyles=false;if(!Site.page.ljpost)m.protectedSource.push(/<lj-poll-\d+\s*\/?>/gi);m.LJFontDefault='normal';m.LJFontStyle={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};m.LJFontSize={tiny:'0.7em',small:'0.9em',normal:'1.0em',large:'1.4em',huge:'1.8em'};m.protectedSource.push(/<lj-replace name="first_post"\s*\/?>/gi);};a.editorConfig(i);})();

Modified: trunk/htdocs/js/ck/ckeditor.js
===================================================================
--- trunk/htdocs/js/ck/ckeditor.js	2012-11-02 13:29:36 UTC (rev 23250)
+++ trunk/htdocs/js/ck/ckeditor.js	2012-11-02 13:59:50 UTC (rev 23251)
@@ -157,5 +157,5 @@
 if(E=D.match(n))if(emailProtection=='encode')D=D.replace(u,function(aa,ab,ac){return 'mailto:'+String.fromCharCode.apply(String,ab.split(','))+(ac&&unescapeSingleQuote(ac));});else if(emailProtection)D.replace(v,function(aa,ab,ac){if(ab==compiledProtectionFunction.name){I.type='email';var ad=I.email={},ae=/[^,\s]+/g,af=/(^')|('$)/g,ag=ac.match(ae),ah=ag.length,ai,aj;for(var ak=0;ak<ah;ak++){aj=decodeURIComponent(unescapeSingleQuote(ag[ak].replace(af,'')));ai=compiledProtectionFunction.params[ak].toLowerCase();ad[ai]=aj;}ad.address=[ad.name,ad.domain].join('@');}});if(!I.type)if(G=D.match(r)){I.type='anchor';I.anchor={};I.anchor.name=I.anchor.id=G[1];}else if(F=D.match(o)){var J=D.match(p),K=D.match(q);I.type='email';var L=I.email={};L.address=F[1];J&&(L.subject=decodeURIComponent(J[1]));K&&(L.body=decodeURIComponent(K[1]));}else if(D&&(H=D.match(s))){I.type='url';I.url={};I.url.protocol=H[1];I.url.url=H[2];}else I.type='url';if(C){var M=C.getAttribute('target');I.target={};I.adv={};if(!M){var N=C.data('cke-pa-onclick')||C.getAttribute('onclick'),O=N&&N.match(w);if(O){I.target.type='popup';I.target.name=O[1];var P;while(P=x.exec(O[2])){if((P[2]=='yes'||P[2]=='1')&&!(P[1] in {height:1,width:1,top:1,left:1}))I.target[P[1]]=true;else if(isFinite(P[2]))I.target[P[1]]=P[2];}}}else{var Q=M.match(t);if(Q)I.target.type=I.target.name=M;else{I.target.type='frame';I.target.name=M;}}var R=this,S=function(aa,ab){var ac=C.getAttribute(ab);if(ac!==null)I.adv[aa]=ac||'';};S('advId','id');S('advLangDir','dir');S('advAccessKey','accessKey');I.adv.advName=C.data('cke-saved-name')||C.getAttribute('name')||'';S('advLangCode','lang');S('advTabIndex','tabindex');S('advTitle','title');S('advContentType','type');j.link.synAnchorSelector?I.adv.advCSSClasses=getLinkClass(C):S('advCSSClasses','class');S('advCharset','charset');S('advStyles','style');S('advRel','rel');}var T=I.anchors=[],U;if(j.link.emptyAnchorFix){var V=B.document.getElementsByTag('a');for(i=0,count=V.count();i<count;i++){U=V.getItem(i);if(U.data('cke-saved-name')||U.hasAttribute('name'))T.push({name:U.data('cke-saved-name')||U.getAttribute('name'),id:U.getAttribute('id')});}}else{var W=new d.nodeList(B.document.$.anchors);for(var X=0,Y=W.count();X<Y;X++){U=W.getItem(X);T[X]={name:U.getAttribute('name'),id:U.getAttribute('id')};}}if(j.link.fakeAnchor){var Z=B.document.getElementsByTag('img');for(X=0,Y=Z.count();X<Y;X++){if(U=j.link.tryRestoreFakeAnchor(B,Z.getItem(X)))T.push({name:U.getAttribute('name'),id:U.getAttribute('id')});
 }}this.selectedElement=C;return I;};LiveJournal.register_hook('link_response',function(B){var K=this;var C=B.url,D=B.target||'';if(C.length===0){m.execCommand('unlink');delete K.selectedElement;return;}if(!C.match(/^[a-z+]+:(\/\/)?/))C='http://'+C;var E={};E['data-cke-saved-href']=C;E.href=C;if(D)E.target=D;if(!K.selectedElement){var F=new h('a'),G=m.getSelection();F.setAttributes({'data-cke-saved-href':C,href:C});if(D)F.setAttribute('target',D);F.setText(z||C);m.insertElement(F);}else{var H=K.selectedElement,I=H.data('cke-saved-href'),J=H.getHtml();if(!E[D])H.removeAttribute('target');H.setAttributes(E);delete K.selectedElement;}});var z;LiveJournal.register_hook('link_hide',function(B){if(this.selectedElement)delete this.selectedElement;z='';});var A='LJLink2';m.addCommand(A,{exec:function(B){var C=B.getSelection(),D={},E=null;z=C.getSelectedText();if((E=j.link.getSelectedLink(B))&&E.hasAttribute('href'))C.selectElement(E);else E=null;var F='';if(E){var G=y(B,E).url;F=(G.protocol||'http://')+G.url;}D.defaultText=F;D.hasSelectedText=!!E;D.editMode=!!E;if(E)D.hasTarget=E.hasAttribute('target')?true:false;B.rteButton(A,'link',D);},editorFocus:false});m.ui.addButton(A,{label:m.lang.link.toolbar,command:A});},afterInit:function(m){var n=m.dataProcessor,o=n&&n.dataFilter,p=n&&n.htmlFilter,q=m._.elementsPath&&m._.elementsPath.filters;if(o)o.addRules({elements:{a:function(r){var s=r.attributes;if(!s.name)return null;var t=!r.children.length;if(j.link.synAnchorSelector){var u=t?'cke_anchor_empty':'cke_anchor',v=s['class'];if(s.name&&(!v||v.indexOf(u)<0))s['class']=(v||'')+' '+u;if(t&&j.link.emptyAnchorFix){s.contenteditable='false';s['data-cke-editable']=1;}}else if(j.link.fakeAnchor&&t)return m.createFakeParserElement(r,'cke_anchor','anchor');return null;}}});if(j.link.emptyAnchorFix&&p)p.addRules({elements:{a:function(r){delete r.attributes.contenteditable;}}});if(q)q.push(function(r,s){if(s=='a')if(j.link.tryRestoreFakeAnchor(m,r)||r.getAttribute('name')&&(!r.getAttribute('href')||!r.getChildCount()))return 'anchor';});},requires:['fakeobjects']});j.link={getSelectedLink:function(m){try{var n=m.getSelection();if(n.getType()==3){var o=n.getSelectedElement();if(o.is('a'))return o;}var p=n.getRanges(true)[0];p.shrink(2);var q=p.getCommonAncestor();return q.getAscendant('a',true);}catch(r){return null;}},fakeAnchor:b.opera||b.webkit,synAnchorSelector:c,emptyAnchorFix:c&&b.version<8,tryRestoreFakeAnchor:function(m,n){if(n&&n.data('cke-real-element-type')&&n.data('cke-real-element-type')=='anchor'){var o=m.restoreRealElement(n);
 if(o.data('cke-saved-name'))return o;}}};a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(m){var n=m.getSelection(),o=n.createBookmarks(),p=n.getRanges(),q,r;for(var s=0;s<p.length;s++){q=p[s].getCommonAncestor(true);r=q.getAscendant('a',true);if(!r)continue;p[s].selectNodeContents(r);}n.selectRanges(p);m.document.$.execCommand('unlink',false,null);n.selectBookmarks(o);},startDisabled:true};a.removeAnchorCommand=function(){};a.removeAnchorCommand.prototype={exec:function(m){var n=m.getSelection(),o=n.createBookmarks(),p;if(n&&(p=n.getSelectedElement())&&(j.link.fakeAnchor&&!p.getChildCount()?j.link.tryRestoreFakeAnchor(m,p):p.is('a')))p.remove(1);else if(p=j.link.getSelectedLink(m))if(p.hasAttribute('href')){p.removeAttributes({name:1,'data-cke-saved-name':1});p.removeClass('cke_anchor');}else p.remove(1);n.selectBookmarks(o);}};(function(){function m(p,q,r,s,t,u,v){var w=p.config,x=t.split(';'),y=[],z={};for(var A=0;A<x.length;A++){var B=x[A];if(B){B=B.split('/');var C={},D=x[A]=B[0];C[r]=y[A]=B[1]||D;z[D]=new a.style(v,C);z[D]._.definition.name=D;}else x.splice(A--,1);}p.ui.addRichCombo(q,{label:s.label,title:s.panelTitle,className:'cke_'+(r=='size'?'fontSize':'font'),panel:{css:p.skin.editor.css.concat(w.contentsCss),multiSelect:false,attributes:{'aria-label':s.panelTitle}},init:function(){this.startGroup(s.panelTitle);for(var E=0;E<x.length;E++){var F=x[E];this.add(F,z[F].buildPreview(),F);}},onClick:function(E){p.focus();p.fire('saveSnapshot');var F=z[E];if(this.getValue()==E)F.remove(p.document);else{var G=p.getSelection(),H=parseFloat(z[E]._.definition.styles['font-size']);for(var I in z)z[I].remove(p.document);F.apply(p.document);}p.fire('saveSnapshot');},onRender:function(){p.on('selectionChange',function(E){var F=this.getValue(),G=E.data.path,H=G.elements;for(var I=0,J;I<H.length;I++){J=H[I];for(var K in z){if(z[K].checkElementRemovable(J,true)){if(K!=F)this.setValue(K);return;}}}this.setValue('',u);},this);}});};j.add('ljfont',{requires:['richcombo','styles'],init:function(p){var q=p.config;m(p,'ljFontSize','size',p.lang.fontSize,q.fontSize_sizes,q.fontSize_defaultLabel,q.fontSize_style);}});i.font_style={element:'span',styles:{'font-family':'#(family)'},overrides:[{element:'font',attributes:{face:null}}]};var n={tiny:'0.7em',small:'0.9em',normal:'1.0em',large:'1.4em',huge:'1.8em'};i.fontSize_sizes='';for(var o in n)i.fontSize_sizes+=Site.ml_text['talk.font.'+o]+'/'+n[o]+';';i.fontSize_defaultLabel=Site.ml_text['talk.font.normal'];
-i.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};})();a.editorConfig=function(m){j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');j.addExternal('ljcut2','plugins/lj/ljcut/plugin.js');j.addExternal('ljuser2','plugins/lj/ljuser/plugin.js');var n=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],o=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','enterkey','entities','format','htmldataprocessor','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange'];if(Site.page.ljpost){o.push('autogrow');m.autoGrow_minHeight=400;n.push('ljspell','ljfont','ljcut2','ljuser2');}else o.push('dialog','image','link','font');m.language='ru';m.autoParagraph=false;m.autoUpdateElement=false;m.docType='<!DOCTYPE html>';if(Site.page.ljpost){m.contentsCss='/js/ck/contents_new.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;}else{m.contentsCss='/js/ck/contents.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;}m.fillEmptyBlocks=false;if(Site.is_dev_server)m.extraPlugins=n.join(',');else Array.prototype.push.apply(o,n);m.plugins=o.join(',');m.contentsLangDirection='ltr';m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=Site.page.ljpost?true:false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','LJFont','LJColor','-','LJLink2','LJUser2','-','LJImage',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut','LJSpoiler','LJMap','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','LJSpell','Undo','Redo'];else p=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[p.filter(function(r){return r;})];m.enterMode=2;m.shiftEnterMode=1;m.keystrokes=[[2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'LJLink2'],[1114112+66,'bold'],[1114112+73,'italic'],[1114112+85,'underline']];
+i.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};})();a.editorConfig=function(m){j.addExternal('ljcolor','plugins/lj/ljcolor/plugin.js');j.addExternal('ljlink','plugins/lj/ljlink/plugin.js');j.addExternal('ljfont','plugins/lj/ljfont/plugin.js');j.addExternal('ljcut2','plugins/lj/ljcut/plugin.js');j.addExternal('ljuser2','plugins/lj/ljuser/plugin.js');var n=[Site.page.ljpost?'livejournal':'livejournal_old','ljcolor','ljlink'],o=['ajax','basicstyles','bidi','blockquote','button','colorbutton','colordialog','enterkey','entities','format','htmldataprocessor','keystrokes','list','liststyle','pastefromword','specialchar','tab','table','toolbar','undo','wysiwygarea','onchange'];if(Site.page.ljpost){o.push('autogrow');m.autoGrow_minHeight=400;n.push('ljspell','ljfont','ljcut2','ljuser2');}else o.push('dialog','image','link','font');m.language='ru';m.autoParagraph=false;m.autoUpdateElement=false;m.docType='<!DOCTYPE html>';if(Site.page.ljpost){m.contentsCss='/js/ck/contents_new.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents_new.css?t='+Site.version;}else{m.contentsCss='/js/ck/contents.css?t='+Site.version;m.styleText=Site.statprefix+'/js/ck/contents.css?t='+Site.version;}m.fillEmptyBlocks=false;if(Site.is_dev_server)m.extraPlugins=n.join(',');else Array.prototype.push.apply(o,n);m.plugins=o.join(',');m.contentsLangDirection='ltr';m.fillEmptyBlocks=false;m.tabIndex=41;m.tabSpaces=2;m.startupShowBorders=false;m.toolbarCanCollapse=false;m.disableNativeSpellChecker=Site.page.ljpost?true:false;var p=[];function q(r,s){return r?s:undefined;};if(Site.page.ljpost)p=['Bold','Italic','Underline','Strike','LJFont','LJColor','-','LJLink2','LJUser2','-','LJImage',q(Site.media_embed_enabled,'LJEmbedLink'),'LJCut2','LJSpoiler','LJMap','LJLike','LJPollLink','NumberedList','BulletedList','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','LJSpell','Undo','Redo'];else p=['Bold','Italic','Underline','Strike','TextColor','FontSize','-','LJLink','LJUserLink','image',q(Site.media_embed_enabled,'LJEmbedLink'),'LJPollLink','LJCutLink','LJCut','LJLike','LJSpoiler','-','UnorderedList','OrderedList','NumberedList','BulletedList','-','LJJustifyLeft','LJJustifyCenter','LJJustifyRight','-','Undo','Redo'];m.toolbar_Full=[p.filter(function(r){return r;})];m.enterMode=2;m.shiftEnterMode=1;m.keystrokes=[[2228224+121,'contextMenu'],[1114112+90,'undo'],[1114112+89,'redo'],[1114112+2228224+90,'redo'],[1114112+76,'LJLink2'],[1114112+66,'bold'],[1114112+73,'italic'],[1114112+85,'underline']];
 m.colorButton_colors='000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF';m.fontSize_sizes='smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large';m.disableObjectResizing=true;m.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address';m.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';m.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';m.coreStyles_bold={element:'b',overrides:'strong'};m.coreStyles_italic={element:'i',overrides:'em'};m.indentClasses=[];m.indentOffset=0;m.pasteFromWordRemoveFontStyles=false;m.pasteFromWordRemoveStyles=false;if(!Site.page.ljpost)m.protectedSource.push(/<lj-poll-\d+\s*\/?>/gi);m.LJFontDefault='normal';m.LJFontStyle={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};m.LJFontSize={tiny:'0.7em',small:'0.9em',normal:'1.0em',large:'1.4em',huge:'1.8em'};m.protectedSource.push(/<lj-replace name="first_post"\s*\/?>/gi);};a.editorConfig(i);})();

Modified: trunk/htdocs/js/ck/config.js
===================================================================
--- trunk/htdocs/js/ck/config.js	2012-11-02 13:29:36 UTC (rev 23250)
+++ trunk/htdocs/js/ck/config.js	2012-11-02 13:59:50 UTC (rev 23251)
@@ -103,8 +103,8 @@
 			'LJImage',
 			ifEnabled(Site.media_embed_enabled, 'LJEmbedLink'),
 
-			'LJCut',
-			// 'LJCut2',
+			// 'LJCut',
+			'LJCut2',
 			'LJSpoiler',
 			
 			'LJMap',

Tags: atyurin, js, livejournal, spacevillain
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