mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 11:38:53 +00:00
merge of '238ddfbd3f00e0fbad3b9312ebe0bd88fde3f646'
and 'a5d600790eb0a570287e3f58d9d92d701c3f4f3a' Monotone-Parent: 238ddfbd3f00e0fbad3b9312ebe0bd88fde3f646 Monotone-Parent: a5d600790eb0a570287e3f58d9d92d701c3f4f3a Monotone-Revision: 73574164255d79da1cea7be5a59a86a13386f75f Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-07-02T21:07:38 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2009-07-02 Cyril Robert <crobert@inverse.ca>
|
||||
|
||||
* UI/MailerUI/UIxMailFolderActions.m: Added auto-subscribe on imap folder
|
||||
creation.
|
||||
|
||||
2009-07-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||
|
||||
3
NEWS
3
NEWS
@@ -6,8 +6,9 @@
|
||||
- greatly reduced the number of SQL requests performed in many situations
|
||||
- added HTML composition in the web mail module
|
||||
- added drag and drop in the addressbook and mail modules
|
||||
- improved the attendees modification dialog by implementing slots management
|
||||
- improved the attendees modification dialog by implementing slots management and zooming
|
||||
- added the capability to display the size of messages in the mail module
|
||||
- added the capability of limiting the number of returned events from DAV requests
|
||||
|
||||
1.0-20090605 (1.0.2)
|
||||
--------------------
|
||||
|
||||
@@ -4043,7 +4043,18 @@ Index: sope-appserver/NGObjWeb/ChangeLog
|
||||
===================================================================
|
||||
--- sope-appserver/NGObjWeb/ChangeLog (revision 1660)
|
||||
+++ sope-appserver/NGObjWeb/ChangeLog (working copy)
|
||||
@@ -1,3 +1,11 @@
|
||||
@@ -1,3 +1,22 @@
|
||||
+2009-07-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
+
|
||||
+ * WOMessage.m (-setHeaders:, -setHeader:forKey:, headerForKey:,
|
||||
+ -appendHeader:forKey:, -appendHeaders:forKey:, setHeaders:forKey:,
|
||||
+ -headersForKey:): convert the specified header key to lowercase,
|
||||
+ to ensure they are managed case-insensitively.
|
||||
+ * WOHttpAdaptor/WOHttpTransaction.m
|
||||
+ (-deliverResponse:toRequest:onStream:): if the content-type is
|
||||
+ specified and already has "text/plain" as prefix, we don't
|
||||
+ override it.
|
||||
+
|
||||
+2009-07-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
+
|
||||
+ * WOHttpAdaptor/WOHttpTransaction.m
|
||||
@@ -4154,6 +4165,88 @@ Index: sope-appserver/NGObjWeb/DynamicElements/WOHyperlinkInfo.h
|
||||
BOOL sidInUrl;
|
||||
|
||||
/* 'ivar' associations */
|
||||
Index: sope-appserver/NGObjWeb/WOMessage.m
|
||||
===================================================================
|
||||
--- sope-appserver/NGObjWeb/WOMessage.m (revision 1660)
|
||||
+++ sope-appserver/NGObjWeb/WOMessage.m (working copy)
|
||||
@@ -182,7 +182,7 @@
|
||||
NSString *key;
|
||||
|
||||
keys = [_headers keyEnumerator];
|
||||
- while ((key = [keys nextObject])) {
|
||||
+ while ((key = [[keys nextObject] lowercaseString])) {
|
||||
id value;
|
||||
|
||||
value = [_headers objectForKey:key];
|
||||
@@ -198,34 +198,39 @@
|
||||
}
|
||||
|
||||
- (void)setHeader:(NSString *)_header forKey:(NSString *)_key {
|
||||
- [self->header setObject:[_header stringValue] forKey:_key];
|
||||
+ [self->header setObject:[_header stringValue]
|
||||
+ forKey:[_key lowercaseString]];
|
||||
}
|
||||
- (NSString *)headerForKey:(NSString *)_key {
|
||||
- return [[self->header objectEnumeratorForKey:_key] nextObject];
|
||||
+ return [[self->header objectEnumeratorForKey:[_key lowercaseString]]
|
||||
+ nextObject];
|
||||
}
|
||||
|
||||
- (void)appendHeader:(NSString *)_header forKey:(NSString *)_key {
|
||||
- [self->header addObject:_header forKey:_key];
|
||||
+ [self->header addObject:_header forKey:[_key lowercaseString]];
|
||||
}
|
||||
- (void)appendHeaders:(NSArray *)_headers forKey:(NSString *)_key {
|
||||
- [self->header addObjects:_headers forKey:_key];
|
||||
+ [self->header addObjects:_headers forKey:[_key lowercaseString]];
|
||||
}
|
||||
|
||||
- (void)setHeaders:(NSArray *)_headers forKey:(NSString *)_key {
|
||||
NSEnumerator *e;
|
||||
id value;
|
||||
+ NSString *lowerKey;
|
||||
|
||||
+ lowerKey = [_key lowercaseString];
|
||||
e = [_headers objectEnumerator];
|
||||
|
||||
- [self->header removeAllObjectsForKey:_key];
|
||||
+ [self->header removeAllObjectsForKey:lowerKey];
|
||||
|
||||
while ((value = [e nextObject]))
|
||||
- [self->header addObject:value forKey:_key];
|
||||
+ [self->header addObject:value forKey:lowerKey];
|
||||
}
|
||||
- (NSArray *)headersForKey:(NSString *)_key {
|
||||
NSEnumerator *values;
|
||||
|
||||
- if ((values = [self->header objectEnumeratorForKey:_key])) {
|
||||
+ if ((values
|
||||
+ = [self->header objectEnumeratorForKey:[_key lowercaseString]])) {
|
||||
NSMutableArray *array = nil;
|
||||
id value = nil;
|
||||
|
||||
@@ -243,17 +248,14 @@
|
||||
NSEnumerator *values;
|
||||
|
||||
if ((values = [self->header keyEnumerator])) {
|
||||
- NSMutableArray *array = nil;
|
||||
+ NSMutableArray *array;
|
||||
id name = nil;
|
||||
- array = [[NSMutableArray alloc] init];
|
||||
-
|
||||
+ array = [NSMutableArray array];
|
||||
+
|
||||
while ((name = [values nextObject]))
|
||||
[array addObject:name];
|
||||
|
||||
- name = [array copy];
|
||||
- [array release];
|
||||
-
|
||||
- return [name autorelease];
|
||||
+ return array;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
Index: sope-appserver/NGObjWeb/SoObjects/SoObject.m
|
||||
===================================================================
|
||||
--- sope-appserver/NGObjWeb/SoObjects/SoObject.m (revision 1660)
|
||||
@@ -4326,15 +4419,25 @@ Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m
|
||||
|
||||
doZip = [_response shouldZipResponseToRequest:_request];
|
||||
|
||||
@@ -738,7 +739,10 @@
|
||||
@@ -738,7 +739,11 @@
|
||||
|
||||
/* add content length header */
|
||||
|
||||
- snprintf((char *)buf, sizeof(buf), "%d", [body length]);
|
||||
+ if ((length = [body length]) == 0) {
|
||||
+ if ((length = [body length]) == 0
|
||||
+ && ![[_response headerForKey: @"content-type"] hasPrefix:@"text/plain"]) {
|
||||
+ [_response setHeader:@"text/plain" forKey:@"content-type"];
|
||||
+ }
|
||||
+ snprintf((char *)buf, sizeof(buf), "%d", length);
|
||||
t1 = [[NSString alloc] initWithCString:(char *)buf];
|
||||
[_response setHeader:t1 forKey:@"content-length"];
|
||||
[t1 release]; t1 = nil;
|
||||
@@ -766,7 +771,7 @@
|
||||
NSString *value;
|
||||
|
||||
if (!hasConnectionHeader) {
|
||||
- if ([fieldName caseInsensitiveCompare:@"connection"]==NSOrderedSame)
|
||||
+ if ([fieldName isEqualToString:@"connection"])
|
||||
hasConnectionHeader = YES;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
WOResponse *response;
|
||||
NGImap4Connection *connection;
|
||||
NSException *error;
|
||||
NSString *folderName;
|
||||
NSString *folderName, *path;
|
||||
|
||||
co = [self clientObject];
|
||||
|
||||
@@ -62,12 +62,17 @@
|
||||
connection = [co imap4Connection];
|
||||
error = [connection createMailbox: folderName atURL: [co imap4URL]];
|
||||
if (error)
|
||||
{
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Unable to create folder."];
|
||||
}
|
||||
{
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Unable to create folder."];
|
||||
}
|
||||
else
|
||||
response = [self responseWith204];
|
||||
{
|
||||
path = [NSString stringWithFormat: @"%@%@",
|
||||
[[co imap4URL] path], folderName];
|
||||
[[connection client] subscribe: path];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ function savePreferences(sender) {
|
||||
var sigList = $("signaturePlacementList");
|
||||
if (sigList)
|
||||
sigList.disabled=false;
|
||||
|
||||
$("mainForm").submit();
|
||||
|
||||
return false;
|
||||
@@ -22,6 +23,9 @@ function _setupEvents(enable) {
|
||||
widget.stopObserving("change", onChoiceChanged);
|
||||
}
|
||||
}
|
||||
|
||||
$("replyPlacementList").observe ("change", onReplyPlacementListChange);
|
||||
$("composeMessagesType").observe ("change", onComposeMessagesTypeChange);
|
||||
}
|
||||
|
||||
function onChoiceChanged(event) {
|
||||
@@ -37,26 +41,6 @@ function initPreferences() {
|
||||
initAdditionalPreferences();
|
||||
|
||||
if ($("signature")) {
|
||||
CKEDITOR.replace('signature',
|
||||
{
|
||||
skin: "v2",
|
||||
height: "90px",
|
||||
toolbar :
|
||||
[['Bold', 'Italic', '-', 'Link',
|
||||
'Font','FontSize','-','TextColor',
|
||||
'BGColor']
|
||||
]
|
||||
}
|
||||
);
|
||||
|
||||
$("replyPlacementList").observe ("change", onReplyPlacementListChange);
|
||||
onReplyPlacementListChange();
|
||||
|
||||
$("composeMessagesType").observe ("change", onComposeMessagesTypeChange);
|
||||
|
||||
if (!UserDefaults["ComposeMessagesType"])
|
||||
UserDefaults["ComposeMessagesType"] = "text";
|
||||
|
||||
onComposeMessagesTypeChange ();
|
||||
}
|
||||
}
|
||||
@@ -76,19 +60,27 @@ function onComposeMessagesTypeChange () {
|
||||
var textArea = $('signature');
|
||||
var editor = $('cke_signature');
|
||||
|
||||
if (!editor) {
|
||||
setTimeout ("onComposeMessagesTypeChange ()", 10);
|
||||
return;
|
||||
}
|
||||
|
||||
// Textmode
|
||||
if ($("composeMessagesType").value == 0) {
|
||||
textArea.style.display = 'block';
|
||||
textArea.style.visibility = '';
|
||||
editor.style.display = 'none';
|
||||
if (editor) {
|
||||
CKEDITOR.instances.signature.removeListener ()
|
||||
CKEDITOR.instances.signature.destroy (false);
|
||||
CKEDITOR.instances.signature = null;
|
||||
delete (CKEDITOR.instances.signature);
|
||||
}
|
||||
}
|
||||
else {
|
||||
textArea.style.display = 'none';
|
||||
editor.style.display = 'block';
|
||||
CKEDITOR.replace('signature',
|
||||
{
|
||||
skin: "v2",
|
||||
height: "90px",
|
||||
toolbar :
|
||||
[['Bold', 'Italic', '-', 'Link',
|
||||
'Font','FontSize','-','TextColor',
|
||||
'BGColor']
|
||||
]
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
UI/WebServerResources/ckeditor/ckeditor.js
vendored
2
UI/WebServerResources/ckeditor/ckeditor.js
vendored
@@ -15,7 +15,7 @@ if(i&&i!=l.type)return l.getNextSourceNode(false,i,j);return l;},getPreviousSour
|
||||
if(!i||!i.is||!i.is('br'))j.append(b.opera?j.getDocument().createText(''):j.getDocument().createElement('br'));},breakParent:function(i){var l=this;var j=new d.range(l.getDocument());j.setStartAfter(l);j.setEndAfter(i);var k=j.extractContents();j.insertNode(l.remove());k.insertAfterNode(l);},contains:c||b.webkit?function(i){var j=this.$;return i.type!=1?j.contains(i.getParent().$):j!=i.$&&j.contains(i.$);}:function(i){return!!(this.$.compareDocumentPosition(i.$)&16);},focus:function(){try{this.$.focus();}catch(i){}},getHtml:function(){return this.$.innerHTML;},getOuterHtml:function(){var j=this;if(j.$.outerHTML)return j.$.outerHTML.replace(/<\?[^>]*>/,'');var i=j.$.ownerDocument.createElement('div');i.appendChild(j.$.cloneNode(true));return i.innerHTML;},setHtml:function(i){return this.$.innerHTML=i;},setText:function(i){h.prototype.setText=this.$.innerText!=undefined?function(j){return this.$.innerText=j;}:function(j){return this.$.textContent=j;};return this.setText(i);},getAttribute:(function(){var i=function(j){return this.$.getAttribute(j,2);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){var m=this;switch(j){case 'class':j='className';break;case 'tabindex':var k=i.call(m,j);if(k!==0&&m.$.tabIndex===0)k=null;return k;break;case 'checked':return m.$.checked;break;case 'style':var l=m.$.style.cssText;return l.toLowerCase().replace(/\s*(?:;\s*|$)/,';').replace(/([^;])$/,'$1;');}return i.call(m,j);};else return i;})(),getChildren:function(){return new d.nodeList(this.$.childNodes);},getComputedStyle:c?function(i){return this.$.currentStyle[e.cssStyleToDomStyle(i)];}:function(i){return this.getWindow().$.getComputedStyle(this.$,'').getPropertyValue(i);},getDtd:function(){var i=f[this.getName()];this.getDtd=function(){return i;};return i;},getElementsByTag:g.prototype.getElementsByTag,getTabIndex:c?function(){var i=this.$.tabIndex;if(i===0&&!f.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)i=-1;return i;}:b.webkit?function(){var i=this.$.tabIndex;if(i==undefined){i=parseInt(this.getAttribute('tabindex'),10);if(isNaN(i))i=-1;}return i;}:function(){return this.$.tabIndex;},getText:function(){return this.$.textContent||this.$.innerText||'';},getWindow:function(){return this.getDocument().getWindow();},getId:function(){return this.$.id||null;},getNameAtt:function(){return this.$.name||null;},getName:function(){var i=this.$.nodeName.toLowerCase();if(c){var j=this.$.scopeName;if(j!='HTML')i=j.toLowerCase()+':'+i;}return(this.getName=function(){return i;
|
||||
})();},getValue:function(){return this.$.value;},getFirst:function(){var i=this.$.firstChild;return i?new d.node(i):null;},getLast:function(i){var j=this.$.lastChild;if(i&&j&&j.nodeType==3&&!e.trim(j.nodeValue))return new d.node(j).getPrevious(true);else return j?new d.node(j):null;},getStyle:function(i){return this.$.style[e.cssStyleToDomStyle(i)];},is:function(){var i=this.getName();for(var j=0;j<arguments.length;j++)if(arguments[j]==i)return true;return false;},isEditable:function(){var i=this.getName(),j=!f.$nonEditable[i]&&(f[i]||f.span);return j&&j['#'];},isIdentical:function(i){if(this.getName()!=i.getName())return false;var j=this.$.attributes,k=i.$.attributes,l=j.length,m=k.length;if(!c&&l!=m)return false;for(var n=0;n<l;n++){var o=j[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&(o.nodeValue!=i.getAttribute(o.nodeName)))return false;}if(c)for(n=0;n<m;n++){o=k[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&(o.nodeValue!=j.getAttribute(o.nodeName)))return false;}return true;},isVisible:function(){return this.$.offsetWidth&&this.$.style.visibility!='hidden';},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class')>0)return true;case '_cke_expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes;return i.length>1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';
|
||||
else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);},removeStyle:function(i){var j=this;if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));else j.setStyle(i,'');if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();
|
||||
l+=m.y;var n=j.getScrollPosition().y;j.$.scrollTo(0,l>0?l:0);},setState:function(i){var j=this;switch(i){case 1:j.addClass('cke_on');j.removeClass('cke_off');j.removeClass('cke_disabled');break;case 0:j.addClass('cke_disabled');j.removeClass('cke_off');j.removeClass('cke_on');break;default:j.addClass('cke_off');j.removeClass('cke_on');j.removeClass('cke_disabled');break;}},getFrameDocument:function(){var i=this.$;try{i.contentWindow.document;}catch(j){i.src=i.src;if(c&&b.version<7)window.showModalDialog('javascript:document.write("<script>window.setTimeout(function(){window.close();},50);</script>")');}return i&&new g(i.contentWindow.document);},copyAttributes:function(i,j){var p=this;var k=p.$.attributes;j=j||{};for(var l=0;l<k.length;l++){var m=k[l];if(m.specified||c&&m.nodeValue&&m.nodeName.toLowerCase()=='value'){var n=m.nodeName;if(n in j)continue;var o=p.getAttribute(n);if(o===null)o=m.nodeValue;i.setAttribute(n,o);}}if(p.$.style.cssText!=='')i.$.style.cssText=p.$.style.cssText;},renameNode:function(i){var l=this;if(l.getName()==i)return;var j=l.getDocument(),k=new h(i,j);l.copyAttributes(k);l.moveChildren(k);l.$.parentNode.replaceChild(k.$,l.$);k.$._cke_expando=l.$._cke_expando;l.$=k.$;},getChild:function(i){var j=this.$;if(!i.slice)j=j.childNodes[i];else while(i.length>0&&j)j=j.childNodes[i.shift()];return j?new d.node(j):null;},getChildCount:function(){return this.$.childNodes.length;}});a.command=function(i,j){this.exec=function(k){if(this.state==0)return false;i.focus();return j.exec.call(this,i,k)!==false;};e.extend(this,j,{modes:{wysiwyg:1},state:2});a.event.call(this);};a.command.prototype={enable:function(){var i=this;if(i.state==0)i.setState(!i.preserveState||typeof i.previousState=='undefined'?2:i.previousState);},disable:function(){this.setState(0);},setState:function(i){var j=this;if(j.state==i)return false;j.previousState=j.state;j.state=i;j.fire('state');return true;},toggleState:function(){var i=this;if(i.state==2)i.setState(1);else if(i.state==1)i.setState(2);}};a.event.implementOn(a.command.prototype,true);a.ENTER_P=1;a.ENTER_BR=2;a.ENTER_DIV=3;a.config={customConfig:a.getUrl('config.js'),autoUpdateElement:true,baseHref:'',contentsCss:a.basePath+'contents.css',contentsLangDirection:'ltr',language:'',defaultLanguage:'en',enterMode:1,shiftEnterMode:2,corePlugins:'',docType:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',fullPage:false,height:200,plugins:'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'100%',baseFloatZIndex:10000};
|
||||
l+=m.y;var n=j.getScrollPosition().y;j.$.scrollTo(0,l>0?l:0);},setState:function(i){var j=this;switch(i){case 1:j.addClass('cke_on');j.removeClass('cke_off');j.removeClass('cke_disabled');break;case 0:j.addClass('cke_disabled');j.removeClass('cke_off');j.removeClass('cke_on');break;default:j.addClass('cke_off');j.removeClass('cke_on');j.removeClass('cke_disabled');break;}},getFrameDocument:function(){var i=this.$;try{i.contentWindow.document;}catch(j){i.src=i.src;if(c&&b.version<7)window.showModalDialog('javascript:document.write("<script>window.setTimeout(function(){window.close();},50);</script>")');}return i&&i.contentWindow&&new g(i.contentWindow.document);},copyAttributes:function(i,j){var p=this;var k=p.$.attributes;j=j||{};for(var l=0;l<k.length;l++){var m=k[l];if(m.specified||c&&m.nodeValue&&m.nodeName.toLowerCase()=='value'){var n=m.nodeName;if(n in j)continue;var o=p.getAttribute(n);if(o===null)o=m.nodeValue;i.setAttribute(n,o);}}if(p.$.style.cssText!=='')i.$.style.cssText=p.$.style.cssText;},renameNode:function(i){var l=this;if(l.getName()==i)return;var j=l.getDocument(),k=new h(i,j);l.copyAttributes(k);l.moveChildren(k);l.$.parentNode.replaceChild(k.$,l.$);k.$._cke_expando=l.$._cke_expando;l.$=k.$;},getChild:function(i){var j=this.$;if(!i.slice)j=j.childNodes[i];else while(i.length>0&&j)j=j.childNodes[i.shift()];return j?new d.node(j):null;},getChildCount:function(){return this.$.childNodes.length;}});a.command=function(i,j){this.exec=function(k){if(this.state==0)return false;i.focus();return j.exec.call(this,i,k)!==false;};e.extend(this,j,{modes:{wysiwyg:1},state:2});a.event.call(this);};a.command.prototype={enable:function(){var i=this;if(i.state==0)i.setState(!i.preserveState||typeof i.previousState=='undefined'?2:i.previousState);},disable:function(){this.setState(0);},setState:function(i){var j=this;if(j.state==i)return false;j.previousState=j.state;j.state=i;j.fire('state');return true;},toggleState:function(){var i=this;if(i.state==2)i.setState(1);else if(i.state==1)i.setState(2);}};a.event.implementOn(a.command.prototype,true);a.ENTER_P=1;a.ENTER_BR=2;a.ENTER_DIV=3;a.config={customConfig:a.getUrl('config.js'),autoUpdateElement:true,baseHref:'',contentsCss:a.basePath+'contents.css',contentsLangDirection:'ltr',language:'',defaultLanguage:'en',enterMode:1,shiftEnterMode:2,corePlugins:'',docType:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',fullPage:false,height:200,plugins:'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'100%',baseFloatZIndex:10000};
|
||||
var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j};return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getFirst().addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getFirst().removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-uk':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k)k=this.detect(l);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k){var l=this.languages,m=(navigator.userLanguage||navigator.language).toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),n=m[1],o=m[2];if(l[n+'-'+o])n=n+'-'+o;else if(!l[n])n=null;a.lang.detect=n?function(){return n;}:function(p){return p;};return n||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o){var p=typeof l=='string';if(p)l=[l];if(!n)n=a;var q=l.length,r=[],s=[],t=function(y){if(m)if(p)m.call(n,y);else m.call(n,r,s);};if(q===0){t(true);return;}var u=function(y,z){(z?r:s).push(y);if(--q<=0)t(z);},v=function(y,z){j[y]=1;var A=k[y];delete k[y];for(var B=0;B<A.length;B++)A[B](y,z);},w=function(y){if(o!==true&&j[y]){u(y,true);return;}var z=k[y]||(k[y]=[]);z.push(u);if(z.length>1)return;var A=new h('script');A.setAttributes({type:'text/javascript',src:y});if(m)if(c)A.$.onreadystatechange=function(){if(A.$.readyState=='loaded'||A.$.readyState=='complete'){A.$.onreadystatechange=null;v(y,true);}};else{A.$.onload=function(){setTimeout(function(){v(y,true);},0);};A.$.onerror=function(){v(y,false);};}A.appendTo(a.document.getHead());};for(var x=0;x<q;x++)w(l[x]);},loadCode:function(l){var m=new h('script');m.setAttribute('type','text/javascript');m.appendText(l);m.appendTo(a.document.getHead());}};})();a.resourceManager=function(j,k){var l=this;
|
||||
l.basePath=j;l.fileName=k;l.registered={};l.loaded={};l.externals={};l._={waitingList:{}};};a.resourceManager.prototype={add:function(j,k){if(this.registered[j])throw '[CKEDITOR.resourceManager.add] The resource name "'+j+'" is already registered.';this.registered[j]=k||{};},get:function(j){return this.registered[j]||null;},getPath:function(j){var k=this.externals[j];return a.getUrl(k&&k.dir||this.basePath+j+'/');},getFilePath:function(j){var k=this.externals[j];return a.getUrl(this.getPath(j)+(k&&k.file||this.fileName+'.js'));},addExternal:function(j,k,l){j=j.split(',');for(var m=0;m<j.length;m++){var n=j[m];this.externals[n]={dir:k,file:l};}},load:function(j,k,l){if(!e.isArray(j))j=j?[j]:[];var m=this.loaded,n=this.registered,o=[],p={},q={};for(var r=0;r<j.length;r++){var s=j[r];if(!s)continue;if(!m[s]&&!n[s]){var t=this.getFilePath(s);o.push(t);if(!(t in p))p[t]=[];p[t].push(s);}else q[s]=this.get(s);}a.scriptLoader.load(o,function(u,v){if(v.length)throw '[CKEDITOR.resourceManager.load] Resource name "'+p[v[0]].join(',')+'" was not found at "'+v[0]+'".';for(var w=0;w<u.length;w++){var x=p[u[w]];for(var y=0;y<x.length;y++){var z=x[y];q[z]=this.get(z);m[z]=1;}}k.call(l,q);},this);}};a.plugins=new a.resourceManager('plugins/','plugin');var j=a.plugins;j.load=e.override(j.load,function(k){return function(l,m,n){var o={},p=function(q){k.call(this,q,function(r){e.extend(o,r);var s=[];for(var t in r){var u=r[t],v=u&&u.requires;if(v)for(var w=0;w<v.length;w++)if(!o[v[w]])s.push(v[w]);}if(s.length)p.call(this,s);else{for(t in o){u=o[t];if(u.onLoad&&!u.onLoad._called){u.onLoad();u.onLoad._called=1;}}if(m)m.call(n||window,o);}},this);};p.call(this,l);};});j.setLang=function(k,l,m){var n=this.get(k);n.lang[l]=m;};(function(){var k={},l=function(m,n){var o=function(){k[m]=1;n();},p=new h('img');p.on('load',o);p.on('error',o);p.setAttribute('src',m);};a.imageCacher={load:function(m,n){var o=m.length,p=function(){if(--o===0)n();};for(var q=0;q<m.length;q++){var r=m[q];if(k[r])p();else l(r,p);}}};})();a.skins=(function(){var k={},l={},m={},n=function(o,p,q){var r=k[o],s=function(A){for(var B=0;B<A.length;B++)A[B]=a.getUrl(m[o]+A[B]);};if(!l[o]){var t=r.preload;if(t&&t.length>0){s(t);a.imageCacher.load(t,function(){l[o]=1;n(o,p,q);});return;}l[o]=1;}p=r[p];var u=!p||!!p._isLoaded;if(u)q&&q();else{var v=p._pending||(p._pending=[]);v.push(q);if(v.length>1)return;var w=!p.css||!p.css.length,x=!p.js||!p.js.length,y=function(){if(w&&x){p._isLoaded=1;for(var A=0;A<v.length;A++)if(v[A])v[A]();
|
||||
}};if(!w){s(p.css);for(var z=0;z<p.css.length;z++)a.document.appendStyleSheet(p.css[z]);w=1;}if(!x){s(p.js);a.scriptLoader.load(p.js,function(){x=1;y();});}y();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r]){n(r,p,q);var t=k[r];if(t.init)t.init(o);}else{m[r]=s;a.scriptLoader.load(s+'skin.js',function(){n(r,p,q);var u=k[r];if(u.init)u.init(o);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{}};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var m=this._.items[l],n=m&&this._.handlers[m.type];return n&&n.create.apply(this,m.args);},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(x.config.customConfig==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.fireOnce('configLoaded');r(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';s(x);});},s=function(x){var y=x.config,z=y.plugins,A=y.extraPlugins,B=y.removePlugins;if(A){var C=new RegExp('(?:^|,)(?:'+A.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');z+=','+A;}if(B){C=new RegExp('(?:^|,)(?:'+B.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');}j.load(z.split(','),function(D){var E=[],F=[],G=[];x.plugins=D;for(var H in D){var I=D[H],J=I.lang,K=j.getPath(H),L=null;I.path=K;if(J){L=e.indexOf(J,x.langCode)>=0?x.langCode:J[0];if(!I.lang[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.lang[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];
|
||||
|
||||
Reference in New Issue
Block a user