Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[livejournal] r22265: LJSUP-12561: Make "Donate" checkbox butt...

Committer: anazarov
LJSUP-12561: Make "Donate" checkbox button not active in lj-like panel
U   trunk/htdocs/js/ck/ckeditor.js
U   trunk/htdocs/js/ck/plugins/livejournal/plugin.js
Modified: trunk/htdocs/js/ck/ckeditor.js
===================================================================
--- trunk/htdocs/js/ck/ckeditor.js	2012-06-18 07:12:21 UTC (rev 22264)
+++ trunk/htdocs/js/ck/ckeditor.js	2012-06-18 07:14:35 UTC (rev 22265)
@@ -127,7 +127,7 @@
 });m.textarea.on('drop',o);m.textarea.on('input',o);});m.on('afterCommandExec',function(p){if(p.data.name=='source')return;if(p.data.command.canUndo!==false)o();});}});(function(){j.add('ajax',{requires:['xml']});a.ajax=(function(){var m=function(){if(!c||location.protocol!='file:')try{return new XMLHttpRequest();}catch(r){}try{return new ActiveXObject('Msxml2.XMLHTTP');}catch(s){}try{return new ActiveXObject('Microsoft.XMLHTTP');}catch(t){}return null;},n=function(r){return r.readyState==4&&(r.status>=200&&r.status<300||r.status==304||r.status===0||r.status==1223);},o=function(r){if(n(r))return r.responseText;return null;},p=function(r){if(n(r)){var s=r.responseXML;return new a.xml(s&&s.firstChild?s:r.responseText);}return null;},q=function(r,s,t){var u=!!s,v=m();if(!v)return null;v.open('GET',r,u);if(u)v.onreadystatechange=function(){if(v.readyState==4){s(t(v));v=null;}};v.send(null);return u?'':t(v);};return{load:function(r,s){return q(r,s,o);},loadXml:function(r,s){return q(r,s,p);}};})();})();a.themes.add('default',(function(){var m={};function n(o,p){var q,r;r=o.config.sharedSpaces;r=r&&r[p];r=r&&a.document.getById(r);if(r){var s='<span class="cke_shared " dir="'+o.lang.dir+'"'+'>'+'<span class="'+o.skinClass+' '+o.id+' cke_editor_'+o.name+'">'+'<span class="'+b.cssClass+'">'+'<span class="cke_wrapper cke_'+o.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+p+'">'+'</div></span></span></span></span></span>',t=r.append(h.createFromHtml(s,r.getDocument()));if(r.getCustomData('cke_hasshared'))t.hide();else r.setCustomData('cke_hasshared',1);q=t.getChild([0,0,0,0]);!o.sharedSpaces&&(o.sharedSpaces={});o.sharedSpaces[p]=q;o.on('focus',function(){for(var u=0,v,w=r.getChildren();v=w.getItem(u);u++){if(v.type==1&&!v.equals(t)&&v.hasClass('cke_shared'))v.hide();}t.show();});o.on('destroy',function(){t.remove();});}return q;};return{build:function(o,p){var q=o.name,r=o.element,s=o.elementMode;if(!r||s==0)return;if(s==1)r.hide();var t=o.fire('themeSpace',{space:'top',html:''}).html,u=o.fire('themeSpace',{space:'contents',html:''}).html,v=o.fireOnce('themeSpace',{space:'bottom',html:''}).html,w=u&&o.config.height,x=o.config.tabIndex||o.element.getAttribute('tabindex')||0;if(!u)w='auto';else if(!isNaN(w))w+='px';var y='',z=o.config.width;if(z){if(!isNaN(z))z+='px';y+='width: '+z+';';}var A=t&&n(o,'top'),B=n(o,'bottom');A&&(A.setHtml(t),t='');B&&(B.setHtml(v),v='');var C='<style>.'+o.skinClass+'{visibility:hidden;}</style>';if(m[o.skinClass])C='';else m[o.skinClass]=1;
 var D=h.createFromHtml(['<span id="cke_',q,'" class="',o.skinClass,' ',o.id,' cke_editor_',q,'" dir="',o.lang.dir,'" title="',b.gecko?' ':'','" lang="',o.langCode,'"'+(b.webkit?' tabindex="'+x+'"':'')+' role="application"'+' aria-labelledby="cke_',q,'_arialbl"'+(y?' style="'+y+'"':'')+'>'+'<span id="cke_',q,'_arialbl" class="cke_voice_label">'+o.lang.editor+'</span>'+'<span class="',b.cssClass,'" role="presentation"><span class="cke_wrapper cke_',o.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',t?'':' style="display:none"',' role="presentation"><td id="cke_top_',q,'" class="cke_top" role="presentation">',t,'</td></tr><tr',u?'':' style="display:none"',' role="presentation"><td id="cke_contents_',q,'" class="cke_contents" style="height:',w,'" role="presentation">',u,'</td></tr><tr',v?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',q,'" class="cke_bottom" role="presentation">',v,'</td></tr></tbody></table>'+C+'</span>'+'</span>'+'</span>'].join(''));D.getChild([1,0,0,0,0]).unselectable();D.getChild([1,0,0,0,2]).unselectable();if(s==1)D.insertAfter(r);else r.append(D);o.container=D;D.disableContextMenu();o.on('contentDirChanged',function(E){var F=(o.lang.dir!=E.data?'add':'remove')+'Class';D.getChild(1)[F]('cke_mixed_dir_content');var G=this.sharedSpaces&&this.sharedSpaces[this.config.toolbarLocation];G&&G.getParent().getParent()[F]('cke_mixed_dir_content');});o.fireOnce('themeLoaded');o.fireOnce('uiReady');},buildDialog:function(o){var p=e.getNextNumber(),q=h.createFromHtml(['<div class="',o.id,'_dialog cke_editor_',o.name.replace('.','\\.'),'_dialog cke_skin_',o.skinName,'" dir="',o.lang.dir,'" lang="',o.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+b.cssClass,' cke_',o.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+o.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',c?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+p).replace(/%/g,'cke_dialog_')),r=q.getChild([0,0,0,0,0]),s=r.getChild(0),t=r.getChild(1);
 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;}};})();(function(){var m=a.lang[a.lang.detect()]||{};
-jQuery.extend(m,LJ.pageVar('rtedata'));var n=[{label:m.LJLike_button_repost,id:'repost',abbr:'rp',html:'<span class="lj-like-item rp">'+m.LJLike_button_repost+'</span>',htmlOpt:'<li class="like-rp"><input type="checkbox" id="like-rp" /><label for="like-rp">'+m.LJLike_button_repost+'</label></li>'},{label:m.LJLike_button_facebook,id:'facebook',abbr:'fb',html:'<span class="lj-like-item fb">'+m.LJLike_button_facebook+'</span>',htmlOpt:'<li class="like-fb"><input type="checkbox" id="like-fb" /><label for="like-fb">'+m.LJLike_button_facebook+'</label></li>'},{label:m.LJLike_button_twitter,id:'twitter',abbr:'tw',html:'<span class="lj-like-item tw">'+m.LJLike_button_twitter+'</span>',htmlOpt:'<li class="like-tw"><input type="checkbox" id="like-tw" /><label for="like-tw">'+m.LJLike_button_twitter+'</label></li>'},{label:m.LJLike_button_google,id:'google',abbr:'go',html:'<span class="lj-like-item go">'+m.LJLike_button_google+'</span>',htmlOpt:'<li class="like-go"><input type="checkbox" id="like-go" /><label for="like-go">'+m.LJLike_button_google+'</label></li>'},{label:m.LJLike_button_vkontakte,id:'vkontakte',abbr:'vk',html:'<span class="lj-like-item vk">'+m.LJLike_button_vkontakte+'</span>',htmlOpt:Site.remote_is_sup?'<li class="like-vk"><input type="checkbox" id="like-vk" /><label for="like-vk">'+m.LJLike_button_vkontakte+'</label></li>':''},{label:m.LJLike_button_give,id:'livejournal',abbr:'lj',html:'<span class="lj-like-item lj">'+m.LJLike_button_give+'</span>',htmlOpt:'<li class="like-lj"><input type="checkbox" id="like-lj" /><label for="like-lj">'+m.LJLike_button_give+'</label></li>'}],o={LJPollLink:{html:encodeURIComponent(m.Poll_PollWizardNotice+'<br /><a href="#" lj-cmd="LJPollLink">'+m.Poll_PollWizardNoticeLink+'</a>')},LJLike:{html:encodeURIComponent(m.LJLike_WizardNotice+'<br /><a href="#" lj-cmd="LJLike">'+m.LJLike_WizardNoticeLink+'</a>')},LJUserLink:{html:encodeURIComponent(m.LJUser_WizardNotice+'<br /><a href="#" lj-cmd="LJUserLink">'+m.LJUser_WizardNoticeLink+'</a>')},LJLink:{html:encodeURIComponent(m.LJLink_WizardNotice+'<br /><a href="#" lj-cmd="LJLink">'+m.LJLink_WizardNoticeLink+'</a>')},image:{html:encodeURIComponent(m.LJImage_WizardNotice+'<br /><a href="#" lj-cmd="image">'+m.LJImage_WizardNoticeLink+'</a>')},LJCut:{html:encodeURIComponent(m.LJCut_WizardNotice+'<br /><a href="#" lj-cmd="LJCut">'+m.LJCut_WizardNoticeLink+'</a>')},LJSpoiler:{html:encodeURIComponent(m.LJSpoiler_WizardNotice+'<br /><a href="#" lj-cmd="LJSpoiler">'+m.LJSpoiler_WizardNoticeLink+'</a>')}},p={},q;
+jQuery.extend(m,LJ.pageVar('rtedata'));var n=[{label:m.LJLike_button_repost,id:'repost',abbr:'rp',checked:true,html:'<span class="lj-like-item rp">'+m.LJLike_button_repost+'</span>',htmlOpt:'<li class="like-rp"><input type="checkbox" id="like-rp" /><label for="like-rp">'+m.LJLike_button_repost+'</label></li>'},{label:m.LJLike_button_facebook,id:'facebook',abbr:'fb',checked:true,html:'<span class="lj-like-item fb">'+m.LJLike_button_facebook+'</span>',htmlOpt:'<li class="like-fb"><input type="checkbox" id="like-fb" /><label for="like-fb">'+m.LJLike_button_facebook+'</label></li>'},{label:m.LJLike_button_twitter,id:'twitter',abbr:'tw',checked:true,html:'<span class="lj-like-item tw">'+m.LJLike_button_twitter+'</span>',htmlOpt:'<li class="like-tw"><input type="checkbox" id="like-tw" /><label for="like-tw">'+m.LJLike_button_twitter+'</label></li>'},{label:m.LJLike_button_google,id:'google',abbr:'go',checked:true,html:'<span class="lj-like-item go">'+m.LJLike_button_google+'</span>',htmlOpt:'<li class="like-go"><input type="checkbox" id="like-go" /><label for="like-go">'+m.LJLike_button_google+'</label></li>'},{label:m.LJLike_button_vkontakte,id:'vkontakte',abbr:'vk',checked:true,html:'<span class="lj-like-item vk">'+m.LJLike_button_vkontakte+'</span>',htmlOpt:Site.remote_is_sup?'<li class="like-vk"><input type="checkbox" id="like-vk" /><label for="like-vk">'+m.LJLike_button_vkontakte+'</label></li>':''},{label:m.LJLike_button_give,id:'livejournal',abbr:'lj',checked:false,html:'<span class="lj-like-item lj">'+m.LJLike_button_give+'</span>',htmlOpt:'<li class="like-lj"><input type="checkbox" id="like-lj" /><label for="like-lj">'+m.LJLike_button_give+'</label></li>'}],o={LJPollLink:{html:encodeURIComponent(m.Poll_PollWizardNotice+'<br /><a href="#" lj-cmd="LJPollLink">'+m.Poll_PollWizardNoticeLink+'</a>')},LJLike:{html:encodeURIComponent(m.LJLike_WizardNotice+'<br /><a href="#" lj-cmd="LJLike">'+m.LJLike_WizardNoticeLink+'</a>')},LJUserLink:{html:encodeURIComponent(m.LJUser_WizardNotice+'<br /><a href="#" lj-cmd="LJUserLink">'+m.LJUser_WizardNoticeLink+'</a>')},LJLink:{html:encodeURIComponent(m.LJLink_WizardNotice+'<br /><a href="#" lj-cmd="LJLink">'+m.LJLink_WizardNoticeLink+'</a>')},image:{html:encodeURIComponent(m.LJImage_WizardNotice+'<br /><a href="#" lj-cmd="image">'+m.LJImage_WizardNoticeLink+'</a>')},LJCut:{html:encodeURIComponent(m.LJCut_WizardNotice+'<br /><a href="#" lj-cmd="LJCut">'+m.LJCut_WizardNoticeLink+'</a>')},LJSpoiler:{html:encodeURIComponent(m.LJSpoiler_WizardNotice+'<br /><a href="#" lj-cmd="LJSpoiler">'+m.LJSpoiler_WizardNoticeLink+'</a>')}},p={},q;
 function r(t){var u,v,w,x,y=document.createElement('lj-note'),z=typeof document.body.style.opacity!='string',A=(function(){var D=60,E=100,F=E*D/1000,G=[],H,I=document.getElementById('draft-container')||document.body;function J(){var K=G.shift(),L=(H?K.time/E:-(K.time/E-1)).toFixed(1);if(!G.length)L=H?1:0;if(z)y.style.filter=L>=1?null:'progid:DXImageTransform.Microsoft.Alpha(opacity='+L*100+')';else y.style.opacity=L;if(L==0&&y&&y.parentNode)y.parentNode.removeChild(y);};return function(K){H=K;if(H&&y.parentNode){if(z)y.style.filter=null;else y.style.opacity=1;}else for(var L=1;L<=F;L++){var M=Math.floor(1000/D)*L;G.push({time:M,timer:setTimeout(J,M)});}I.appendChild(y);y.style.marginTop=-y.offsetHeight/2+'px';y.style.marginLeft=-y.offsetWidth/2+'px';};})();y.className='note-popup';y.onmouseout=function(){if(!w||!w.cmd)a.note.hide();};y.onmouseover=function(){if(u&&!v){v=1;u=clearTimeout(u);}};if(z)y.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=0)';else y.style.opacity=0;function B(){var D=this.getAttribute('lj-cmd');if(w.hasOwnProperty(D)){o[D].node=w[D].node;var E=new d.selection(t.document);E.selectElement(o[D].node);q=true;t.execCommand(D);a.note.hide(true);}return false;};function C(){if(!window.switchedRteOn)a.note.hide(true);if(v){w=x;x=null;var D='';for(var E in w){if(w.hasOwnProperty(E))D+='<div class="noteItem">'+w[E].content+'</div>';}y.innerHTML=decodeURIComponent(D);var F=y.getElementsByTagName('a');for(var G=0,H=F.length;G<H;G++){var I=F[G];if(o.hasOwnProperty(I.getAttribute('lj-cmd')))I.onclick=B;}}else w=null;A(v);u=null;};a.note={show:function(D,E){if(!E&&D==x||!window.switchedRteOn)return;if(u)u=clearTimeout(u);v=1;x=D;E===true?C():u=setTimeout(C,1000);},hide:function(D){if(v){v=0;if(u)u=clearTimeout(u);if(y.parentNode)D===true?C():u=setTimeout(C,500);}}};};var s=f;s.$block['lj-template']=1;s.$block['lj-raw']=1;s.$block['lj-cut']=1;s.$block['lj-spoiler']=1;s.$block['lj-poll']=1;s.$block['lj-repost']=1;s.$block['lj-pq']=1;s.$block['lj-pi']=1;s.$nonEditable['lj-template']=1;s['lj-template']={};s['lj-map']={};s['lj-repost']={};s['lj-raw']=s.div;s['lj-poll']={'lj-pq':1};s['lj-pq']={'#':1,'lj-pi':1};s['lj-pi']={'#':1};s.$block.iframe=s.$inline.iframe;delete s.$inline.iframe;e.extend(s['lj-cut']={},s.$block);e.extend(s['lj-spoiler']={},s.$block);e.extend(s['lj-cut'],s.$inline);e.extend(s['lj-spoiler'],s.$inline);e.extend(s.div,s.$block);e.extend(s.$body,s.$block);delete s['lj-cut']['lj-cut'];j.add('livejournal',{init:function(t){function u(C){var D=C.data.element||C.data.getTarget();
 if(D.type!=1)D=D.getParent();while(D){var E=D.getAttribute('lj-cmd');if(o.hasOwnProperty(E)){var F=t.getCommand(E);if(F.state==1){var G=new d.selection(t.document);o[E].node=D.is('body')?new h.get(D.getWindow().$.frameElement):D;G.selectElement(o[E].node);C.data.dialog='';q=true;F.exec();break;}}D=D.getParent();}};function v(C){var D=this;if(D.$!=t.document.$){D.$.className=(D.frame.getAttribute('lj-class')||'')+' lj-selected';if(D.getAttribute('lj-cmd')=='LJPollLink')D.frame.setStyle('height',D.getDocument().$.body.scrollHeight+'px');new d.selection(t.document).selectElement(D.frame);}C.data.getKey()==1&&C.data.preventDefault();};function w(C){if(C.data.getKey()==46){var D=new d.selection(t.document).getRanges(),E=D.length;while(E--)D[E].deleteContents();}};function x(){var F=this;var C=F.$.contentWindow,D=C.document,E=new h.get(D.body);if(E.on){E.on('dblclick',u);E.on('click',v);E.on('keyup',w);if(F.getAttribute('lj-cmd')=='LJPollLink'&&F.hasAttribute('style'))D.body.className='lj-poll lj-poll-open';}D=new h.get(D);D.frame=E.frame=F;};function y(){var C=t.document.getElementsByTag('iframe'),D=C.count(),E,F,G,H,I;q=false;while(D--){E=C.getItem(D),F=E.getAttribute('lj-cmd'),G=E.$.contentWindow,H=G.document,I=E.getAttribute('lj-style')||'';E.removeListener('load',x);E.on('load',x);H.open();H.write('<!DOCTYPE html><html style="'+I+'">'+'<head><link rel="stylesheet" href="'+a.styleText+'" /></head>'+'<body scroll="no" class="'+(E.getAttribute('lj-class')||'')+'" style="'+I+'" '+(F?'lj-cmd="'+F+'"':'')+'>'+decodeURIComponent(E.getAttribute('lj-content')||'')+'</body>'+'</html>');H.close();}};function z(C){if(t.onSwitch===true){delete t.onSwitch;return;}var D,E=C.name=='click',F=C.name=='selectionChange'||E,G=C.data.element||C.data.getTarget(),H,I;if(E&&(C.data.getKey()==1||C.data.$.button==0))C.data.preventDefault();if(G.type!=1)G=G.getParent();H=G;if(F){var J=t.document.getElementsByTag('iframe'),K,L;if(E&&H.is('iframe')){L=H.$.contentWindow.document.body;L.className=(H.getAttribute('lj-class')||'')+' lj-selected';if(H.getAttribute('lj-cmd')=='LJPollLink')H.setStyle('height',L.scrollHeight+'px');}for(var M=0,N=J.count();M<N;M++){K=J.getItem(M);if(K.$!=H.$){L=K.$.contentWindow.document.body;L.className=K.getAttribute('lj-class')||'';if(K.getAttribute('lj-cmd')=='LJPollLink'&&L.className=='lj-poll')K.removeAttribute('style');}}}do{var O=H.getAttribute('lj-cmd');if(!O&&H.type==1){var P=H.getParent();if(H.is('img')&&P.getParent()&&!P.getParent().hasAttribute('lj:user')){O='image';
 H.setAttribute('lj-cmd',O);}else if(H.is('a')&&!P.hasAttribute('lj:user')){O='LJLink';H.setAttribute('lj-cmd',O);}}if(O&&o.hasOwnProperty(O)){if(F){o[O].node=H;t.getCommand(O).setState(1);}(D||(D={}))[O]={content:o[O].html,node:H};}}while(H=H.getParent());if(F)for(I in o){if(o.hasOwnProperty(I)&&(!D||!D.hasOwnProperty(I))){delete o[I].node;t.getCommand(I).setState(2);}}D?a.note.show(D):a.note.hide();};(function(){function C(H){return H.slice(-2)=='/>'?H:H.slice(0,-1)+'/>';};function D(H){var I=new Poll(H);return '<iframe class="lj-poll-wrap" lj-class="lj-poll" frameborder="0" lj-cmd="LJPollLink" allowTransparency="true" lj-data="'+I.outputLJtags()+'" lj-content="'+I.outputHTML()+'"></iframe>';};function E(H,I,J){return '<iframe class="lj-embed-wrap" lj-class="lj-embed" frameborder="0" allowTransparency="true" lj-data="'+encodeURIComponent(J)+'"'+I+'></iframe>';};function F(H,I,J,K){return I+J.replace(/\n/g,'')+K;};function G(H,I,J,K){var L=I||J||m.LJRepost_Value,M=K.replace(/"/g,'&quot;');K=M+('<br /><input type="button" value="'+L+'" />').replace(/"/g,'&quot;');return '<iframe class="lj-repost-wrap" lj-class="lj-repost" frameborder="0" allowTransparency="true" lj-text="'+M+'" lj-button="'+L+'" lj-content="'+K+'"></iframe>';};t.dataProcessor.toHtml=function(H,I){H=H.replace(/<lj [^>]*?>/gi,C).replace(/<lj-map [^>]*?>/gi,C).replace(/<lj-template[^>]*?>/gi,C).replace(/(<lj-cut[^>]*?)\/>/gi,'$1>').replace(/<((?!br)[^\s>]+)([^>]*?)\/>/gi,'<$1$2></$1>').replace(/<lj-poll.*?>[\s\S]*?<\/lj-poll>/gi,D).replace(/<lj-repost\s*(?:button\s*=\s*(?:"([^"]*?)")|(?:"([^']*?)"))?.*?>([\s\S]*?)<\/lj-repost>/gi,G).replace(/<lj-embed(.*?)>([\s\S]*?)<\/lj-embed>/gi,E);if(!$('event_format').checked){H=H.replace(/(<lj-raw.*?>)([\s\S]*?)(<\/lj-raw>)/gi,F);if(!window.switchedRteOn)H=H.replace(/\n/g,'<br />');}H=a.htmlDataProcessor.prototype.toHtml.call(this,H,I);if(c)H='<xml:namespace ns="livejournal" prefix="lj" />'+H;return H;};})();t.dataProcessor.toDataFormat=function(C,D){C=a.htmlDataProcessor.prototype.toDataFormat.call(this,C,D);if(!$('event_format').checked)C=C.replace(/<br\s*\/>/gi,'\n');return C.replace(/\t/g,' ');};t.dataProcessor.writer.indentationChars='';t.dataProcessor.writer.lineBreakChars='';t.on('selectionChange',z);t.on('doubleclick',u);t.on('afterCommandExec',y);t.on('dialogHide',y);t.on('dataReady',function(){if(!a.note)r(t);if(c){t.document.getBody().on('dragend',y);t.document.getBody().on('paste',function(){setTimeout(y,0);});}t.document.on('click',z);t.document.on('mouseout',a.note.hide);
@@ -135,7 +135,7 @@
 J.setAttribute('class',C+'-wrap');J.setAttribute('frameBorder',0);J.setAttribute('allowTransparency','true');if(F!=E.text)J.setAttribute('text',F);K.setAttribute('lj-class',C+' '+C+'-close');K.setAttribute('class',C+'-wrap');K.setAttribute('frameBorder',0);K.setAttribute('allowTransparency','true');var L=I[0];H.lock();var M=new h('br',t.document),N=M.clone(),O=M.clone(),P=new d.documentFragment(t.document);P.append(M.clone());P.append(J);P.append(N);if(L.collapsed===false)for(var Q=0,R=I.length;Q<R;Q++)P.append(I[Q].extractContents());P.append(O);t.insertElement(K);M.clone().insertAfter(K);K.insertBeforeMe(P);L.setStart(N,0);L.setEnd(O,0);H.unlock();H.selectRanges(I);}a.note&&a.note.hide(true);}};t.addCommand('LJCut',{exec:function(){A('lj-cut','LJCut',{title:m.LJCut_PromptTitle,text:m.LJCut_PromptText});},editorFocus:false});t.ui.addButton('LJCut',{label:m.LJCut_Title,command:'LJCut'});t.addCommand('LJSpoiler',{exec:function(){A('lj-spoiler','LJSpoiler',{title:m.LJSpoiler_PromptTitle,text:m.LJSpoiler_PromptText});},editorFocus:false});t.ui.addButton('LJSpoiler',{label:m.LJSpoiler_Title,command:'LJSpoiler'});(function(){function C(J,K){K=K===undefined||K;var L,M=o.LJLike.node;if(M){var N=J.getAttribute('lj-style');L=N?N.replace(/text-align:\s*(left|right|center)/i,'$1'):'left';}else if(K)L=J.getComputedStyle('text-align');else{while(!J.hasAttribute||!(J.hasAttribute('align')||J.getStyle('text-align'))){var O=J.getParent();if(!O)break;J=O;}L=J.getStyle('text-align')||J.getAttribute('align')||'';}L&&(L=L.replace(/-moz-|-webkit-|start|auto/i,''));!L&&K&&(L=J.getComputedStyle('direction')=='rtl'?'right':'left');return L;};function D(J){if(J.editor.readOnly)return;var K=J.editor.getCommand(this.name),L=J.data.element;if((L.type==1&&L.hasAttribute('lj-cmd')&&L.getAttribute('lj-cmd'))=='LJLike')K.state=C(L,t.config.useComputedState)==this.value?1:2;else if(!L||L.type!=1||L.getName()=='body'||L.getName()=='iframe')K.state=2;else K.state=C(L,t.config.useComputedState)==this.value?1:2;K.fire('state');};function E(J,K,L){var N=this;N.name=K;N.value=L;var M=J.config.justifyClasses;if(M){switch(L){case 'left':N.cssClassName=M[0];break;case 'center':N.cssClassName=M[1];break;case 'right':N.cssClassName=M[2];break;}N.cssClassRegex=new RegExp('(?:^|\\s+)(?:'+M.join('|')+')(?=$|\\s)');}};function F(J){var K=J.editor,L=new d.range(K.document);L.setStartBefore(J.data.node);L.setEndAfter(J.data.node);var M=new d.walker(L),N;while(N=M.next()){if(N.type==1){var O='text-align',P=K.config.justifyClasses;
 if(!N.equals(J.data.node)&&N.getDirection()){L.setStartAfter(N);M=new d.walker(L);continue;}if(P)if(N.hasClass(P[0])){N.removeClass(P[0]);N.addClass(P[2]);}else if(N.hasClass(P[2])){N.removeClass(P[2]);N.addClass(P[0]);}switch(N.getStyle(O)){case 'left':N.setStyle(O,'right');break;case 'right':N.setStyle(O,'left');break;}}}};E.prototype={exec:function(J){var X=this;var K=J.getSelection(),L=J.config.enterMode;if(!K)return;var M=K.createBookmarks();if(o.LJLike.node)o.LJLike.node.setAttribute('lj-style','text-align: '+X.value);else{var N=K.getRanges(true),O=X.cssClassName,P,Q,R=J.config.useComputedState;R=R===undefined||R;for(var S=N.length-1;S>=0;S--){var T=N[S],U=T.getEnclosedNode();if(U&&U.is('iframe'))return;P=T.createIterator();P.enlargeBr=L!=2;while(Q=P.getNextParagraph(L==1?'p':'div')){Q.removeAttribute('align');Q.removeStyle('text-align');var V=O&&(Q.$.className=e.ltrim(Q.$.className.replace(X.cssClassRegex,''))),W=X.state==2&&(!R||C(Q,true)!=X.value);if(O){if(W)Q.addClass(O);else if(!V)Q.removeAttribute('class');}else if(W)Q.setStyle('text-align',X.value);}}}J.focus();J.forceNextSelectionCheck();K.selectBookmarks(M);}};var G=new E(t,'LJJustifyLeft','left'),H=new E(t,'LJJustifyCenter','center'),I=new E(t,'LJJustifyRight','right');t.addCommand('LJJustifyLeft',G);t.addCommand('LJJustifyCenter',H);t.addCommand('LJJustifyRight',I);t.ui.addButton('LJJustifyLeft',{label:t.lang.justify.left,command:'LJJustifyLeft'});t.ui.addButton('LJJustifyCenter',{label:t.lang.justify.center,command:'LJJustifyCenter'});t.ui.addButton('LJJustifyRight',{label:t.lang.justify.right,command:'LJJustifyRight'});t.on('selectionChange',e.bind(D,G));t.on('selectionChange',e.bind(D,I));t.on('selectionChange',e.bind(D,H));t.on('dirChanged',F);})();if(top.canmakepoll){var B;a.dialog.add('LJPollDialog',function(){var C=0,D,E,F,G=function(){if(this.removeListener)this.removeListener('load',G);if(C&&D){B=new Poll(o.LJPollLink.node&&decodeURIComponent(o.LJPollLink.node.getAttribute('lj-data')),E.document,F.document,E.Questions);E.ready(B);F.ready(B);D.style.display='block';a.note&&a.note.hide(true);}else C++;},H=[new k.button({type:'button',id:'LJPoll_Ok',label:t.lang.common.ok,onClick:function(I){I.data.dialog.hide();var J=new Poll(B,E.document,F.document,E.Questions),K=J.outputHTML(),L=J.outputLJtags();if(K.length>0){var M=o.LJPollLink.node;if(M){M.setAttribute('lj-content',K);M.setAttribute('lj-data',L);M.removeAttribute('style');M.$.contentWindow.document.body.className='lj-poll';}else{M=new h('iframe',t.document);
 M.setAttribute('lj-content',K);M.setAttribute('lj-cmd','LJPollLink');M.setAttribute('lj-data',L);M.setAttribute('lj-class','lj-poll');M.setAttribute('class','lj-poll-wrap');M.setAttribute('frameBorder',0);M.setAttribute('allowTransparency','true');t.insertElement(M);}o.LJPollLink.node=null;y();}}}),a.dialog.cancelButton];b.mac&&H.reverse();return{title:m.Poll_PollWizardTitle,width:420,height:270,resizable:false,onShow:function(){if(C){B=new Poll(o.LJPollLink.node&&unescape(o.LJPollLink.node.getAttribute('data')),E.document,F.document,E.Questions);E.ready(B);F.ready(B);}},contents:[{id:'LJPoll_Setup',label:'Setup',padding:0,elements:[{type:'html',html:'<iframe src="/tools/ck_poll_setup.bml" allowTransparency="true" frameborder="0" style="width:100%; height:320px;"></iframe>',onShow:function(I){if(!D)(D=document.getElementById(I.sender.getButton('LJPoll_Ok').domId).parentNode).style.display='none';var J=this.getElement('iframe');F=J.$.contentWindow;if(F.ready)G();else J.on('load',G);}}]},{id:'LJPoll_Questions',label:'Questions',padding:0,elements:[{type:'html',html:'<iframe src="/tools/ck_poll_questions.bml" allowTransparency="true" frameborder="0" style="width:100%; height:320px;"></iframe>',onShow:function(){var I=this.getElement('iframe');E=I.$.contentWindow;if(E.ready)G();else I.on('load',G);}}]}],buttons:H};});t.addCommand('LJPollLink',new a.dialogCommand('LJPollDialog'));}else{t.addCommand('LJPollLink',{exec:function(){a.note&&a.note.show(m.Poll_AccountLevelNotice,null,null,true);}});t.getCommand('LJPollLink').setState(0);}t.ui.addButton('LJPollLink',{label:m.Poll_Title,command:'LJPollLink'});(function(){function C(){if(t.getCommand('LJLike')==2){this.$.checked?F++:F--;G.getButton('LJLike_Ok').getElement()[F==0?'addClass':'removeClass']('btn-disabled');}};var D=n.length,E='<div class="cke-dialog-likes"><ul class="cke-dialog-likes-list">',F=0,G,H;n.defaultButtons=[];for(var I=0;I<D;I++){var J=n[I];n[J.id]=n[J.abbr]=J;n.defaultButtons.push(J.id);E+=J.htmlOpt;}E+='</ul><p class="cke-dialog-likes-faq">'+window.faqLink+'</p></div>';a.dialog.add('LJLikeDialog',function(){var K=[new k.button({type:'button',id:'LJLike_Ok',label:t.lang.common.ok,onClick:function(){var L=[],M='<span class="lj-like-wrapper">',N=o.LJLike.node;if(G.getButton('LJLike_Ok').getElement().hasClass('btn-disabled'))return false;for(var O=0;O<D;O++){var P=n[O],Q=document.getElementById('like-'+P.abbr),R=N&&N.getAttribute('buttons');if(Q&&Q.checked||R&&!P.htmlOpt&&(R.indexOf(P.abbr)+1||R.indexOf(P.id)+1)){L.push(P.id);
-M+=P.html;}}M+='</span>';if(L.length){if(N){o.LJLike.node.setAttribute('buttons',L.join(','));o.LJLike.node.setAttribute('lj-content',encodeURIComponent(M));}else{N=new h('iframe',t.document);N.setAttribute('lj-class','lj-like');N.setAttribute('class','lj-like-wrap');N.setAttribute('buttons',L.join(','));N.setAttribute('lj-content',encodeURIComponent(M));N.setAttribute('lj-cmd','LJLike');N.setAttribute('frameBorder',0);N.setAttribute('allowTransparency','true');t.insertElement(N);}}else if(N)o.LJLike.node.remove();G.hide();}}),a.dialog.cancelButton];b.mac&&K.reverse();return{title:m.LJLike_name,width:145,height:Site.remote_is_sup?180:145,resizable:false,contents:[{id:'LJLike_Options',elements:[{type:'html',html:E}]}],onShow:function(){var L=t.getCommand('LJLike'),M=F=0,N=L.state==1,O=o.LJLike.node&&o.LJLike.node.getAttribute('buttons');a.note&&a.note.hide(true);for(;M<D;M++){var P=O?!!(O.indexOf(n[M].abbr)+1||O.indexOf(n[M].id)+1):true,Q=document.getElementById('like-'+n[M].abbr);if(Q){if(P&&!N)F++;Q.checked=P;}}if(F>0)G.getButton('LJLike_Ok').getElement().removeClass('btn-disabled');},onLoad:function(){G=this;H=G.parts.contents.getElementsByTag('input');for(var L=0;L<D;L++){var M=H.getItem(L);M&&M.on('click',C);}},buttons:K};});t.addCommand('LJLike',new a.dialogCommand('LJLikeDialog'));t.ui.addButton('LJLike',{label:m.LJLike_name,command:'LJLike'});})();},afterInit:function(t){var u=t.dataProcessor;function v(w,x,y,z){z=z||'text';var A=new a.htmlParser.element('iframe');A.attributes['lj-class']=x+' '+x+'-open';A.attributes['class']=x+'-wrap';A.attributes['lj-cmd']=y;A.attributes.frameBorder=0;A.attributes.allowTransparency='true';if(w.attributes.hasOwnProperty(z))A.attributes.text=w.attributes[z];w.children.unshift(A);var B=new a.htmlParser.element('iframe');B.attributes['lj-class']=x+' '+x+'-close';B.attributes['class']=x+'-wrap';B.attributes.frameBorder=0;B.attributes.allowTransparency='true';w.children.push(B);delete w.name;};u.dataFilter.addRules({elements:{'lj-like':function(w){var x=[],y=new a.htmlParser.element('iframe');y.attributes['lj-class']='lj-like';y.attributes['class']='lj-like-wrap';if(w.attributes.hasOwnProperty('style'))y.attributes['lj-style']=w.attributes.style;y.attributes['lj-cmd']='LJLike';y.attributes['lj-content']='<span class="lj-like-wrapper">';y.attributes.frameBorder=0;y.attributes.allowTransparency='true';var z=w.attributes.buttons&&w.attributes.buttons.split(',')||n.defaultButtons,A=z.length;for(var B=0;B<A;B++){var C=z[B].replace(/^\s*([a-z]{2,})\s*$/i,'$1'),D=n[C];
+M+=P.html;}}M+='</span>';if(L.length){if(N){o.LJLike.node.setAttribute('buttons',L.join(','));o.LJLike.node.setAttribute('lj-content',encodeURIComponent(M));}else{N=new h('iframe',t.document);N.setAttribute('lj-class','lj-like');N.setAttribute('class','lj-like-wrap');N.setAttribute('buttons',L.join(','));N.setAttribute('lj-content',encodeURIComponent(M));N.setAttribute('lj-cmd','LJLike');N.setAttribute('frameBorder',0);N.setAttribute('allowTransparency','true');t.insertElement(N);}}else if(N)o.LJLike.node.remove();G.hide();}}),a.dialog.cancelButton];b.mac&&K.reverse();return{title:m.LJLike_name,width:145,height:Site.remote_is_sup?180:145,resizable:false,contents:[{id:'LJLike_Options',elements:[{type:'html',html:E}]}],onShow:function(){var L=t.getCommand('LJLike'),M=F=0,N=L.state==1,O=o.LJLike.node&&o.LJLike.node.getAttribute('buttons');a.note&&a.note.hide(true);for(;M<D;M++){var P=O?!!(O.indexOf(n[M].abbr)+1||O.indexOf(n[M].id)+1):n[M].checked,Q=document.getElementById('like-'+n[M].abbr);if(Q){if(P&&!N)F++;Q.checked=P;}}if(F>0)G.getButton('LJLike_Ok').getElement().removeClass('btn-disabled');},onLoad:function(){G=this;H=G.parts.contents.getElementsByTag('input');for(var L=0;L<D;L++){var M=H.getItem(L);M&&M.on('click',C);}},buttons:K};});t.addCommand('LJLike',new a.dialogCommand('LJLikeDialog'));t.ui.addButton('LJLike',{label:m.LJLike_name,command:'LJLike'});})();},afterInit:function(t){var u=t.dataProcessor;function v(w,x,y,z){z=z||'text';var A=new a.htmlParser.element('iframe');A.attributes['lj-class']=x+' '+x+'-open';A.attributes['class']=x+'-wrap';A.attributes['lj-cmd']=y;A.attributes.frameBorder=0;A.attributes.allowTransparency='true';if(w.attributes.hasOwnProperty(z))A.attributes.text=w.attributes[z];w.children.unshift(A);var B=new a.htmlParser.element('iframe');B.attributes['lj-class']=x+' '+x+'-close';B.attributes['class']=x+'-wrap';B.attributes.frameBorder=0;B.attributes.allowTransparency='true';w.children.push(B);delete w.name;};u.dataFilter.addRules({elements:{'lj-like':function(w){var x=[],y=new a.htmlParser.element('iframe');y.attributes['lj-class']='lj-like';y.attributes['class']='lj-like-wrap';if(w.attributes.hasOwnProperty('style'))y.attributes['lj-style']=w.attributes.style;y.attributes['lj-cmd']='LJLike';y.attributes['lj-content']='<span class="lj-like-wrapper">';y.attributes.frameBorder=0;y.attributes.allowTransparency='true';var z=w.attributes.buttons&&w.attributes.buttons.split(',')||n.defaultButtons,A=z.length;for(var B=0;B<A;B++){var C=z[B].replace(/^\s*([a-z]{2,})\s*$/i,'$1'),D=n[C];
 if(D){y.attributes['lj-content']+=encodeURIComponent(D.html);x.push(C);}}y.attributes['lj-content']+='</span>';y.attributes.buttons=x.join(',');return y;},lj:(function(){function w(x){var y=t.document.getElementsByTag('lj');for(var z=0,A=y.count();z<A;z++){var B=y.getItem(z);if(B){var C=B.getAttribute('user'),D=B.getAttribute('title');if(x==(D?C+':'+D:C)){var E=new h.createFromHtml(p[x],t.document);E.setAttribute('lj-cmd','LJUserLink');B.insertBeforeMe(E);B.remove();}}}t.removeListener('dataReady',w);};return function(x){var y=x.attributes.user;if(!y||!y.length)return;var z=x.attributes.title,A=z?y+':'+z:y;if(p.hasOwnProperty(A)){var B=new a.htmlParser.fragment.fromHtml(p[A]).children[0];B.attributes['lj-cmd']='LJUserLink';return B;}else{var C={username:y};if(z)C.usertitle=z;HTTPReq.getJSON({data:HTTPReq.formEncoded(C),method:'POST',url:Site.siteroot+'/tools/endpoints/ljuser.bml',onError:function(D){alert(D+' "'+y+'"');},onData:function(D){if(D.error)return alert(D.error+' "'+y+'"');if(!D.success)return;p[A]=D.ljuser;D.ljuser=D.ljuser.replace('<span class="useralias-value">*</span>','');if(t.document)w(A);else t.on('dataReady',function(){w(A);});}});}};})(),'lj-map':function(w){var x=new a.htmlParser.element('iframe'),y='',z='',A=Number(w.attributes.width),B=Number(w.attributes.height);if(!isNaN(A)){y+='width:'+A+'px;';z+='width:'+(A-2)+'px;';}if(!isNaN(B)){y+='height:'+B+'px;';z+='height:'+(B-2)+'px;';}if(y.length){x.attributes.style=y;x.attributes['lj-style']=z;}x.attributes['lj-url']=w.attributes.url?encodeURIComponent(w.attributes.url):'';x.attributes['lj-class']='lj-map';x.attributes['class']='lj-map-wrap';x.attributes['lj-content']='<p class="lj-map">map</p>';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';return x;},'lj-raw':function(w){w.name='lj:raw';},'lj-wishlist':function(w){w.name='lj:wishlist';},'lj-template':function(w){var x=new a.htmlParser.element('iframe');x.attributes['lj-class']='lj-template';x.attributes['class']='lj-template-wrap';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';x.attributes['lj-attributes']=encodeURIComponent(LiveJournal.JSON.stringify(w.attributes));return x;},'lj-cut':function(w){v(w,'lj-cut','LJCut');},'lj-spoiler':function(w){v(w,'lj-spoiler','LJSpoiler','title');},iframe:function(w){if(w.attributes['lj-class']&&w.attributes['lj-class'].indexOf('lj-')+1==1)return w;var x=new a.htmlParser.element('iframe'),y='',z='',A=Number(w.attributes.width),B=Number(w.attributes.height);if(!isNaN(A)){y+='width:'+A+'px;';
 z+='width:'+(A-2)+'px;';}if(!isNaN(B)){y+='height:'+B+'px;';z+='height:'+(B-2)+'px;';}if(y.length){x.attributes.style=y;x.attributes['lj-style']=z;}x.attributes['lj-url']=w.attributes.src?encodeURIComponent(w.attributes.src):'';x.attributes['lj-class']='lj-iframe';x.attributes['class']='lj-iframe-wrap';x.attributes['lj-content']='<p class="lj-iframe">iframe</p>';x.attributes.frameBorder=0;x.attributes.allowTransparency='true';return x;},a:function(w){if(w.parent.attributes&&!w.parent.attributes['lj:user'])w.attributes['lj-cmd']='LJLink';},img:function(w){var x=w.parent&&w.parent.parent;if(!x||!x.attributes||!x.attributes['lj:user'])w.attributes['lj-cmd']='image';},div:function(w){if(w.attributes['class']=='lj-cut')v(w,'lj-cut','LJCut');}}},5);u.htmlFilter.addRules({elements:{iframe:function(w){var x=w,y=false,z='text',A=/lj-[a-z]+/i.exec(w.attributes['lj-class']);if(A)A=A[0];else return w;switch(A){case 'lj-like':x=new a.htmlParser.element('lj-like');x.attributes.buttons=w.attributes.buttons;if(w.attributes.hasOwnProperty('lj-style'))x.attributes.style=w.attributes['lj-style'];x.isEmpty=true;x.isOptionalClose=true;break;case 'lj-embed':x=new a.htmlParser.element('lj-embed');x.attributes.id=w.attributes.id;if(w.attributes.hasOwnProperty('source_user'))x.attributes.source_user=w.attributes.source_user;x.children=new a.htmlParser.fragment.fromHtml(decodeURIComponent(w.attributes['lj-data'])).children;x.isOptionalClose=true;break;case 'lj-map':x=new a.htmlParser.element('lj-map');x.attributes.url=decodeURIComponent(w.attributes['lj-url']);w.attributes.style&&(w.attributes.style+';').replace(/([a-z-]+):(.*?);/gi,function(F,G,H){x.attributes[G.toLowerCase()]=parseInt(H);});x.isOptionalClose=x.isEmpty=true;break;case 'lj-iframe':x=new a.htmlParser.element('iframe');x.attributes.src=decodeURIComponent(w.attributes['lj-url']);w.attributes.style&&(w.attributes.style+';').replace(/([a-z-]+):(.*?);/gi,function(F,G,H){x.attributes[G.toLowerCase()]=parseInt(H);});x.attributes.frameBorder=0;break;case 'lj-poll':x=new a.htmlParser.fragment.fromHtml(decodeURIComponent(w.attributes['lj-data'])).children[0];break;case 'lj-repost':x=new a.htmlParser.element('lj-repost');x.attributes.button=w.attributes['lj-button'];x.children=new a.htmlParser.fragment.fromHtml(w.attributes['lj-text']).children;break;case 'lj-template':x=new a.htmlParser.element('lj-template');x.attributes=LiveJournal.JSON.parse(encodeURIComponent(w.attributes['lj-attributes']));x.isOptionalClose=x.isEmpty=true;
 break;case 'lj-spoiler':y=true;z='title';case 'lj-cut':if(w.attributes['lj-class'].indexOf(A+'-open')+1){var B=w.next,C=0;x=new a.htmlParser.element(A);if(w.attributes.hasOwnProperty('text'))x.attributes[z]=w.attributes.text;while(B){if(B.name=='iframe'){var D=B.attributes['lj-class'];if(D.indexOf(A+'-close')+1){if(y&&C)C--;else{x.next=B;break;}}else if(D.indexOf(A+'-open')+1)if(y)C++;else{x.next=B;break;}}B.parent.children.remove(B);x.add(B);var E=B.next;B.next=null;B=E;}}else x=false;break;default:if(!w.children.length)x=false;}return x;},span:function(w){var x=w.attributes['lj:user'];if(x){var y=new a.htmlParser.element('lj');y.attributes.user=x;try{var z=w.children[1].children[0].children[0].value;}catch(A){return false;}if(z&&z!=x)y.attributes.title=z;y.isOptionalClose=y.isEmpty=true;return y;}else if(w.attributes.style=='display: none;'||!w.children.length)return false;},div:function(w){if(!w.children.length)return false;},'lj:raw':function(w){w.name='lj-raw';},'lj:wishlist':function(w){w.name='lj-wishlist';}},attributes:{'lj-cmd':function(){return false;},contenteditable:function(){return false;}}});},requires:['fakeobjects','domiterator']});})();(function(m,n){var o;function p(B){return B.type==3&&B.getLength()>0&&(!o||!B.isReadOnly());};function q(B){return!(B.type==1&&B.isBlockBoundary(e.extend({},f.$empty,f.$nonEditable)));};var r=function(){var B=this;return{textNode:B.textNode,offset:B.offset,character:B.textNode?B.textNode.getText().charAt(B.offset):null,hitMatchBoundary:B._.matchBoundary};},s,t=function(B,C){s=new a.style(e.extend({attributes:{'data-cke-highlight':1,'data-incorrect':1,'data-id':0},fullMatch:1,ignoreReadonly:1,childRule:function(){return 1;}},{element:'span',styles:{'border-bottom':'1px solid red',cursor:'pointer'}},true));var D=function(P,Q){var R=this,S=new d.walker(P);S.guard=Q?q:function(T){!q(T)&&(R._.matchBoundary=true);};S.evaluator=p;S.breakOnFalse=1;if(P.startContainer.type==3){this.textNode=P.startContainer;this.offset=P.startOffset-1;}this._={matchWord:Q,walker:S,matchBoundary:false};};D.prototype={next:function(){return this.move();},back:function(){return this.move(true);},move:function(P){var R=this;var Q=R.textNode;if(Q===null)return r.call(R);R._.matchBoundary=false;if(Q&&P&&R.offset>0){R.offset--;return r.call(R);}else if(Q&&R.offset<Q.getLength()-1){R.offset++;return r.call(R);}else{Q=null;while(!Q){Q=R._.walker[P?'previous':'next'].call(R._.walker);if(R._.matchWord&&!Q||R._.walker._.end)break;}R.textNode=Q;if(Q)R.offset=P?Q.getLength()-1:0;

Modified: trunk/htdocs/js/ck/plugins/livejournal/plugin.js
===================================================================
--- trunk/htdocs/js/ck/plugins/livejournal/plugin.js	2012-06-18 07:12:21 UTC (rev 22264)
+++ trunk/htdocs/js/ck/plugins/livejournal/plugin.js	2012-06-18 07:14:35 UTC (rev 22265)
@@ -7,6 +7,7 @@
 			label: CKLang.LJLike_button_repost,
 			id:'repost',
 			abbr: 'rp',
+			checked: true,
 			html: '<span class="lj-like-item rp">' + CKLang.LJLike_button_repost + '</span>',
 			htmlOpt: '<li class="like-rp"><input type="checkbox" id="like-rp" /><label for="like-rp">' + CKLang.LJLike_button_repost + '</label></li>'
 		},
@@ -14,6 +15,7 @@
 			label: CKLang.LJLike_button_facebook,
 			id: 'facebook',
 			abbr: 'fb',
+			checked: true,
 			html: '<span class="lj-like-item fb">' + CKLang.LJLike_button_facebook + '</span>',
 			htmlOpt: '<li class="like-fb"><input type="checkbox" id="like-fb" /><label for="like-fb">' + CKLang.LJLike_button_facebook + '</label></li>'
 		},
@@ -21,6 +23,7 @@
 			label: CKLang.LJLike_button_twitter,
 			id: 'twitter',
 			abbr: 'tw',
+			checked: true,
 			html: '<span class="lj-like-item tw">' + CKLang.LJLike_button_twitter + '</span>',
 			htmlOpt: '<li class="like-tw"><input type="checkbox" id="like-tw" /><label for="like-tw">' + CKLang.LJLike_button_twitter + '</label></li>'
 		},
@@ -28,6 +31,7 @@
 			label: CKLang.LJLike_button_google,
 			id: 'google',
 			abbr: 'go',
+			checked: true,
 			html: '<span class="lj-like-item go">' + CKLang.LJLike_button_google + '</span>',
 			htmlOpt: '<li class="like-go"><input type="checkbox" id="like-go" /><label for="like-go">' + CKLang.LJLike_button_google + '</label></li>'
 		},
@@ -35,6 +39,7 @@
 			label: CKLang.LJLike_button_vkontakte,
 			id: 'vkontakte',
 			abbr: 'vk',
+			checked: true,
 			html: '<span class="lj-like-item vk">' + CKLang.LJLike_button_vkontakte + '</span>',
 			htmlOpt: Site.remote_is_sup? '<li class="like-vk"><input type="checkbox" id="like-vk" /><label for="like-vk">' + CKLang.LJLike_button_vkontakte + '</label></li>' : ''
 		},
@@ -42,6 +47,7 @@
 			label: CKLang.LJLike_button_give,
 			id: 'livejournal',
 			abbr: 'lj',
+			checked: false,
 			html: '<span class="lj-like-item lj">' + CKLang.LJLike_button_give + '</span>',
 			htmlOpt: '<li class="like-lj"><input type="checkbox" id="like-lj" /><label for="like-lj">' + CKLang.LJLike_button_give + '</label></li>'
 		}
@@ -1196,7 +1202,9 @@
 							CKEDITOR.note && CKEDITOR.note.hide(true);
 
 							for (; i < buttonsLength; i++) {
-								var isChecked = buttons ? !!(buttons.indexOf(likeButtons[i].abbr) + 1 || buttons.indexOf(likeButtons[i].id) + 1) : true,
+								var isChecked = buttons?
+										!!(buttons.indexOf(likeButtons[i].abbr) + 1 || buttons.indexOf(likeButtons[i].id) + 1):
+										likeButtons[i].checked,
 									input = document.getElementById('like-' + likeButtons[i].abbr);
 
 								if (input) {

Tags: anazarov, js, livejournal, nfokz
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