Merged changes to skin folders

pull/16/head
Thomas Bruederli 12 years ago
commit 6843acc9fc

@ -1,6 +1,9 @@
CHANGELOG Roundcube Webmail
===========================
- Support connections to memcached socket file (#1488577)
- Enable TinyMCE inlinepopups plugin
- Update to TinyMCE 3.5.6
- Correctly escape localized labels in javascript variable (#1488567)
- Update Net_SMTP/Auth_SASL packages to fix Digest-MD5/Cram-MD5 authentication (#1488571)
- Don't add attachments content into reply/forward/draft message body (#1488557)

@ -68,10 +68,11 @@ $rcmail_config['smtp_debug'] = false;
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - http hostname ($_SERVER['SERVER_NAME'])
// %d - domain (http hostname without the first part)
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %d = domain.tld
// For example %n = mail.domain.tld, %t = domain.tld
$rcmail_config['default_host'] = '';
// TCP port used for IMAP connections
@ -135,10 +136,11 @@ $rcmail_config['messages_cache'] = false;
// If left blank, the PHP mail() function is used
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - http hostname ($_SERVER['SERVER_NAME'])
// %d - domain (http hostname without the first part)
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %d = domain.tld
// For example %n = mail.domain.tld, %t = domain.tld
$rcmail_config['smtp_server'] = '';
// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
@ -244,8 +246,8 @@ $rcmail_config['session_name'] = null;
$rcmail_config['session_storage'] = 'db';
// Use these hosts for accessing memcached
// Define any number of hosts in the form hostname:port
$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211' );
// Define any number of hosts in the form of hostname:port or unix:///path/to/socket.file
$rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
// check client IP in session athorization
$rcmail_config['ip_check'] = false;
@ -267,10 +269,11 @@ $rcmail_config['des_key'] = 'rcmail-!24ByteDESkey*Str';
// Specify an array with 'host' => 'domain' values to support multiple hosts
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - http hostname ($_SERVER['SERVER_NAME'])
// %d - domain (http hostname without the first part)
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %d = domain.tld
// For example %n = mail.domain.tld, %t = domain.tld
$rcmail_config['username_domain'] = '';
// This domain will be used to form e-mail addresses of new users
@ -280,7 +283,7 @@ $rcmail_config['username_domain'] = '';
// %n - http hostname ($_SERVER['SERVER_NAME'])
// %d - domain (http hostname without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %d = domain.tld
// For example %n = mail.domain.tld, %t = domain.tld
$rcmail_config['mail_domain'] = '';
// Password charset.
@ -532,10 +535,11 @@ $rcmail_config['ldap_public']['Verisign'] = array(
'name' => 'Verisign.com',
// Replacement variables supported in host names:
// %h - user's IMAP hostname
// %n - http hostname ($_SERVER['SERVER_NAME'])
// %d - domain (http hostname without the first part)
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %d = domain.tld
// For example %n = mail.domain.tld, %t = domain.tld
'hosts' => array('directory.verisign.com'),
'port' => 389,
'use_tls' => false,

@ -129,7 +129,7 @@ class enigma_ui
$this->rc->output->set_env('contentframe', $attrib['name']);
$this->rc->output->set_env('blankpage', $attrib['src'] ?
$this->rc->output->abs_url($attrib['src']) : 'program/blank.gif');
$this->rc->output->abs_url($attrib['src']) : 'program/resources/blank.gif');
return html::tag('iframe', $attrib);
}

@ -1026,7 +1026,7 @@ class managesieve extends rcube_plugin
$this->rc->output->set_env('contentframe', $attrib['name']);
$this->rc->output->set_env('blankpage', $attrib['src'] ?
$this->rc->output->abs_url($attrib['src']) : 'program/blank.gif');
$this->rc->output->abs_url($attrib['src']) : 'program/resources/blank.gif');
return html::tag('iframe', $attrib);
}

@ -1,4 +1,4 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule !^js|.*\.[gt]if$ - [F]
RewriteRule !^js|resources$ - [F]
</IfModule>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 B

@ -193,11 +193,17 @@ class rcube
$this->memcache = new Memcache;
$this->mc_available = 0;
// add alll configured hosts to pool
// add all configured hosts to pool
$pconnect = $this->config->get('memcache_pconnect', true);
foreach ($this->config->get('memcache_hosts', array()) as $host) {
if (substr($host, 0, 7) != 'unix://') {
list($host, $port) = explode(':', $host);
if (!$port) $port = 11211;
}
else {
$port = 0;
}
$this->mc_available += intval($this->memcache->addServer($host, $port, $pconnect, 1, 1, 15, false, array($this, 'memcache_failure')));
}

@ -616,8 +616,10 @@ class rcube_utils
{
// %n - host
$n = preg_replace('/:\d+$/', '', $_SERVER['SERVER_NAME']);
// %d - domain name without first part, e.g. %n=mail.domain.tld, %d=domain.tld
$d = preg_replace('/^[^\.]+\./', '', $n);
// %t - host name without first part, e.g. %n=mail.domain.tld, %t=domain.tld
$t = preg_replace('/^[^\.]+\./', '', $n);
// %d - domain name without first part
$d = preg_replace('/^[^\.]+\./', '', $_SERVER['HTTP_HOST']);
// %h - IMAP host
$h = $_SESSION['storage_host'] ? $_SESSION['storage_host'] : $host;
// %z - IMAP domain without first part, e.g. %h=imap.domain.tld, %z=domain.tld
@ -632,7 +634,7 @@ class rcube_utils
}
}
$name = str_replace(array('%n', '%d', '%h', '%z', '%s'), array($n, $d, $h, $z, $s[2]), $name);
$name = str_replace(array('%n', '%t', '%d', '%h', '%z', '%s'), array($n, $t, $d, $h, $z, $s[2]), $name);
return $name;
}

@ -48,7 +48,7 @@ function rcube_webmail()
this.env.request_timeout = 180; // seconds
this.env.draft_autosave = 0; // seconds
this.env.comm_path = './';
this.env.blankpage = 'program/blank.gif';
this.env.blankpage = 'program/resources/blank.gif';
// set jQuery ajax options
$.ajaxSetup({
@ -6210,7 +6210,7 @@ function rcube_webmail()
// have to do it this way for IE
// otherwise the form will be posted to a new window
if (document.all) {
var html = '<iframe name="'+frame_name+'" src="program/blank.gif" style="width:0;height:0;visibility:hidden;"></iframe>';
var html = '<iframe name="'+frame_name+'" src="program/resources/blank.gif" style="width:0;height:0;visibility:hidden;"></iframe>';
document.body.insertAdjacentHTML('BeforeEnd', html);
}
else { // for standards-compilant browsers
@ -6548,7 +6548,7 @@ function rcube_webmail()
img.onload = function() { rcmail.env.browser_capabilities.tif = 1; };
img.onerror = function() { rcmail.env.browser_capabilities.tif = 0; };
img.src = 'program/blank.tif';
img.src = 'program/resources/blank.tif';
};
this.pdf_support_check = function()

@ -45,7 +45,7 @@ function rcmail_editor_init(config)
});
else { // mail compose
$.extend(conf, {
plugins: 'paste,emotions,media,nonbreaking,table,searchreplace,visualchars,directionality,tabfocus' + (config.spellcheck ? ',spellchecker' : ''),
plugins: 'paste,emotions,media,nonbreaking,table,searchreplace,visualchars,directionality,inlinepopups,tabfocus' + (config.spellcheck ? ',spellchecker' : ''),
theme_advanced_buttons1: 'bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,outdent,indent,ltr,rtl,blockquote,|,forecolor,backcolor,fontselect,fontsizeselect',
theme_advanced_buttons2: 'link,unlink,table,|,emotions,charmap,image,media,|,code,search,undo,redo',
spellchecker_languages: (rcmail.env.spellcheck_langs ? rcmail.env.spellcheck_langs : 'Dansk=da,Deutsch=de,+English=en,Espanol=es,Francais=fr,Italiano=it,Nederlands=nl,Polski=pl,Portugues=pt,Suomi=fi,Svenska=sv'),

File diff suppressed because one or more lines are too long

@ -395,12 +395,14 @@ var ImageDialog = {
if (v == '0')
img.style.border = isIE ? '0' : '0 none none';
else {
if (b.length == 3 && b[isIE ? 2 : 1])
bStyle = b[isIE ? 2 : 1];
var isOldIE = tinymce.isIE && (!document.documentMode || document.documentMode < 9);
if (b.length == 3 && b[isOldIE ? 2 : 1])
bStyle = b[isOldIE ? 2 : 1];
else if (!bStyle || bStyle == 'none')
bStyle = 'solid';
if (b.length == 3 && b[isIE ? 0 : 2])
bColor = b[isIE ? 0 : 2];
bColor = b[isOldIE ? 0 : 2];
else if (!bColor || bColor == 'none')
bColor = 'black';
img.style.border = v + 'px ' + bStyle + ' ' + bColor;

@ -1 +1 @@
(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;a.onKeyDown.addToTop(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});if(tinyMCE.isIE){return}a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng(true).cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}var m=a.toString();if(m.charAt(m.length-1)=="."){a.setEnd(n,c-1)}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])&&!/^mailto:/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);i.nodeChanged();if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})();
(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;a.onKeyDown.addToTop(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});if(tinyMCE.isIE){return}a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng(true).cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}if(n.nodeType==3){a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}var m=a.toString();if(m.charAt(m.length-1)=="."){a.setEnd(n,c-1)}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])&&!/^mailto:/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);i.nodeChanged();if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})();

@ -89,9 +89,12 @@
while (endContainer.nodeType != 3 && endContainer.firstChild)
endContainer = endContainer.firstChild;
// Move range to text node
if (endContainer.nodeType == 3) {
r.setStart(endContainer, 0);
r.setEnd(endContainer, endContainer.nodeValue.length);
}
}
if (r.endOffset == 1)
end = 2;

@ -1 +1 @@
(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})();
(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(b,c){var d=this;d.editor=b;function a(e){var h=b.dom,g,f=b.selection.getSelectedBlocks();if(f.length){g=h.getAttrib(f[0],"dir");tinymce.each(f,function(i){if(!h.getParent(i.parentNode,"*[dir='"+e+"']",h.getRoot())){if(g!=e){h.setAttrib(i,"dir",e)}else{h.setAttrib(i,"dir",null)}}});b.nodeChanged()}}b.addCommand("mceDirectionLTR",function(){a("ltr")});b.addCommand("mceDirectionRTL",function(){a("rtl")});b.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});b.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});b.onNodeChange.add(d._nodeChange,d)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})();

@ -15,30 +15,33 @@
t.editor = ed;
ed.addCommand('mceDirectionLTR', function() {
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
if (e) {
if (ed.dom.getAttrib(e, "dir") != "ltr")
ed.dom.setAttrib(e, "dir", "ltr");
else
ed.dom.setAttrib(e, "dir", "");
function setDir(dir) {
var dom = ed.dom, curDir, blocks = ed.selection.getSelectedBlocks();
if (blocks.length) {
curDir = dom.getAttrib(blocks[0], "dir");
tinymce.each(blocks, function(block) {
// Add dir to block if the parent block doesn't already have that dir
if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) {
if (curDir != dir) {
dom.setAttrib(block, "dir", dir);
} else {
dom.setAttrib(block, "dir", null);
}
}
});
ed.nodeChanged();
}
}
ed.addCommand('mceDirectionLTR', function() {
setDir("ltr");
});
ed.addCommand('mceDirectionRTL', function() {
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
if (e) {
if (ed.dom.getAttrib(e, "dir") != "rtl")
ed.dom.setAttrib(e, "dir", "rtl");
else
ed.dom.setAttrib(e, "dir", "");
}
ed.nodeChanged();
setDir("rtl");
});
ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});

@ -1 +1 @@
tinyMCE.addI18n('he.fullpage_dlg',{title:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05de\u05e1\u05de\u05da","meta_tab":"\u05db\u05dc\u05dc\u05d9","appearance_tab":"\u05de\u05e8\u05d0\u05d4","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","meta_props":"\u05ea\u05d2\u05d9 \u05de\u05d8\u05d4",langprops:"\u05e9\u05e4\u05d4 \u05d5\u05e7\u05d9\u05d3\u05d5\u05d3","meta_title":"\u05db\u05d5\u05ea\u05e8\u05ea","meta_keywords":"\u05de\u05d9\u05dc\u05d5\u05ea \u05de\u05e4\u05ea\u05d7","meta_description":"\u05ea\u05d9\u05d0\u05d5\u05e8","meta_robots":"\u05e8\u05d5\u05d1\u05d5\u05d8\u05d9\u05dd",doctypes:"Doctype",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc","xml_pi":"XML declaration",encoding:"\u05e7\u05d9\u05d3\u05d5\u05d3 \u05ea\u05d5\u05d5\u05d9\u05dd","appearance_bgprops":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05e8\u05e7\u05e2","appearance_marginprops":"Body margins","appearance_linkprops":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","appearance_textprops":"Text properties",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",bgimage:"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2","left_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e9\u05de\u05d0\u05dc\u05d9\u05d9\u05dd","right_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05d9\u05de\u05e0\u05d9\u05d9\u05dd","top_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e2\u05dc\u05d9\u05d5\u05e0\u05d9\u05dd","bottom_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05ea\u05d7\u05ea\u05d9\u05d9\u05dd","text_color":"\u05e6\u05d1\u05e2 \u05d8\u05e7\u05e1\u05d8","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","font_face":"\u05e1\u05d5\u05d2 \u05d2\u05d5\u05e4\u05df","link_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8","hover_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05de\u05e2\u05d1\u05e8 \u05e2\u05db\u05d1\u05e8","visited_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e9\u05e0\u05e6\u05e4\u05d4","active_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e4\u05e2\u05d9\u05dc",textcolor:"\u05e6\u05d1\u05e2",fontsize:"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df",fontface:"\u05d2\u05d5\u05e4\u05df","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don\\\'t follow the links","appearance_style":"Stylesheet and style properties",stylesheet:"\u05e1\u05d2\u05e0\u05d5\u05df \u05e2\u05d9\u05e6\u05d5\u05d1",style:"\u05e2\u05d9\u05e6\u05d5\u05d1",author:"\u05db\u05d5\u05ea\u05d1",copyright:"\u05d6\u05db\u05d5\u05d9\u05d5\u05ea \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd",add:"Add new element",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"\u05de\u05d9\u05d3\u05e2","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"Style element","base_element":"Base element","link_element":"Link element","meta_element":"Meta element","comment_element":"\u05ea\u05d2\u05d5\u05d1\u05d4",src:"\u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05e7\u05d5\u05e8",language:"\u05e9\u05e4\u05d4",href:"Href",target:"\u05d9\u05e2\u05d3",type:"\u05e1\u05d5\u05d2",charset:"\u05e7\u05d9\u05d3\u05d5\u05d3",defer:"Defer",media:"\u05de\u05d3\u05d9\u05d4",properties:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9\u05dd",name:"\u05e9\u05dd",value:"\u05e2\u05e8\u05da",content:"\u05ea\u05d5\u05db\u05df",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u05db\u05dc\u05dc\u05d9","advanced_props":"\u05de\u05ea\u05e7\u05d3\u05dd"});
tinyMCE.addI18n('he.fullpage_dlg',{title:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05de\u05e1\u05de\u05da","meta_tab":"\u05db\u05dc\u05dc\u05d9","appearance_tab":"\u05de\u05e8\u05d0\u05d4","advanced_tab":"\u05de\u05ea\u05e7\u05d3\u05dd","meta_props":"\u05ea\u05d2\u05d9 \u05de\u05d8\u05d4",langprops:"\u05e9\u05e4\u05d4 \u05d5\u05e7\u05d9\u05d3\u05d5\u05d3","meta_title":"\u05db\u05d5\u05ea\u05e8\u05ea","meta_keywords":"\u05de\u05d9\u05dc\u05d5\u05ea \u05de\u05e4\u05ea\u05d7","meta_description":"\u05ea\u05d9\u05d0\u05d5\u05e8","meta_robots":"\u05e8\u05d5\u05d1\u05d5\u05d8\u05d9\u05dd",doctypes:"Doctype",langcode:"\u05e7\u05d5\u05d3 \u05d4\u05e9\u05e4\u05d4",langdir:"\u05db\u05d9\u05d5\u05d5\u05df \u05d4\u05e9\u05e4\u05d4",ltr:"\u05de\u05e9\u05de\u05d0\u05dc \u05dc\u05d9\u05de\u05d9\u05df",rtl:"\u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc","xml_pi":"XML declaration",encoding:"\u05e7\u05d9\u05d3\u05d5\u05d3 \u05ea\u05d5\u05d5\u05d9\u05dd","appearance_bgprops":"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9 \u05e8\u05e7\u05e2","appearance_marginprops":"Body margins","appearance_linkprops":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","appearance_textprops":"Text properties",bgcolor:"\u05e6\u05d1\u05e2 \u05e8\u05e7\u05e2",bgimage:"\u05ea\u05de\u05d5\u05e0\u05ea \u05e8\u05e7\u05e2","left_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e9\u05de\u05d0\u05dc\u05d9\u05d9\u05dd","right_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05d9\u05de\u05e0\u05d9\u05d9\u05dd","top_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05e2\u05dc\u05d9\u05d5\u05e0\u05d9\u05dd","bottom_margin":"\u05e9\u05d5\u05dc\u05d9\u05d9\u05dd \u05ea\u05d7\u05ea\u05d9\u05d9\u05dd","text_color":"\u05e6\u05d1\u05e2 \u05d8\u05e7\u05e1\u05d8","font_size":"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df","font_face":"\u05e1\u05d5\u05d2 \u05d2\u05d5\u05e4\u05df","link_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8","hover_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05de\u05e2\u05d1\u05e8 \u05e2\u05db\u05d1\u05e8","visited_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e9\u05e0\u05e6\u05e4\u05d4","active_color":"\u05e6\u05d1\u05e2 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05e4\u05e2\u05d9\u05dc",textcolor:"\u05e6\u05d1\u05e2",fontsize:"\u05d2\u05d5\u05d3\u05dc \u05d2\u05d5\u05e4\u05df",fontface:"\u05d2\u05d5\u05e4\u05df","meta_index_follow":"Index and follow the links","meta_index_nofollow":"Index and don\'t follow the links","meta_noindex_follow":"Do not index but follow the links","meta_noindex_nofollow":"Do not index and don\\\'t follow the links","appearance_style":"Stylesheet and style properties",stylesheet:"\u05e1\u05d2\u05e0\u05d5\u05df \u05e2\u05d9\u05e6\u05d5\u05d1",style:"\u05e2\u05d9\u05e6\u05d5\u05d1",author:"\u05db\u05d5\u05ea\u05d1",copyright:"\u05d6\u05db\u05d5\u05d9\u05d5\u05ea \u05d9\u05d5\u05e6\u05e8\u05d9\u05dd",add:"\u05d4\u05d5\u05e1\u05e3 \u05d0\u05dc\u05de\u05e0\u05d8 \u05d7\u05d3\u05e9",remove:"Remove selected element",moveup:"Move selected element up",movedown:"Move selected element down","head_elements":"Head elements",info:"\u05de\u05d9\u05d3\u05e2","add_title":"Title element","add_meta":"Meta element","add_script":"Script element","add_style":"Style element","add_link":"Link element","add_base":"Base element","add_comment":"Comment node","title_element":"Title element","script_element":"Script element","style_element":"\u05d0\u05dc\u05de\u05e0\u05d8 \u05e2\u05d9\u05e6\u05d5\u05d1","base_element":"\u05d0\u05dc\u05de\u05e0\u05d8 \u05d1\u05e1\u05d9\u05e1","link_element":"\u05d0\u05dc\u05de\u05e0\u05d8 \u05e7\u05d9\u05e9\u05d5\u05e8","meta_element":"Meta element","comment_element":"\u05ea\u05d2\u05d5\u05d1\u05d4",src:"\u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05e7\u05d5\u05e8",language:"\u05e9\u05e4\u05d4",href:"HREF",target:"\u05d9\u05e2\u05d3",type:"\u05e1\u05d5\u05d2",charset:"\u05e7\u05d9\u05d3\u05d5\u05d3",defer:"Defer",media:"\u05de\u05d3\u05d9\u05d4",properties:"\u05de\u05d0\u05e4\u05d9\u05d9\u05e0\u05d9\u05dd",name:"\u05e9\u05dd",value:"\u05e2\u05e8\u05da",content:"\u05ea\u05d5\u05db\u05df",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"\u05db\u05dc\u05dc\u05d9","advanced_props":"\u05de\u05ea\u05e7\u05d3\u05dd"});

@ -1 +1 @@
(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().firstChild);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().getElementsByTagName("table")[0]);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();

@ -127,7 +127,7 @@
var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
// Get outer/inner size to get a delta size that can be used to calc the new iframe size
outerSize = fed.dom.getSize(fed.getContainer().firstChild);
outerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('table')[0]);
innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);

File diff suppressed because one or more lines are too long

@ -440,9 +440,9 @@
}
function fixDeletingFirstCharOfList(ed, e) {
function listElements(list, li) {
function listElements(li) {
var elements = [];
var walker = new tinymce.dom.TreeWalker(li, list);
var walker = new tinymce.dom.TreeWalker(li.firstChild, li);
for (var node = walker.current(); node; node = walker.next()) {
if (ed.dom.is(node, 'ol,ul,li')) {
elements.push(node);
@ -454,9 +454,11 @@
if (e.keyCode == tinymce.VK.BACKSPACE) {
var li = getLi();
if (li) {
var list = ed.dom.getParent(li, 'ol,ul');
if (list && list.firstChild === li) {
var elements = listElements(list, li);
var list = ed.dom.getParent(li, 'ol,ul'),
rng = ed.selection.getRng();
if (list && list.firstChild === li && rng.startOffset == 0) {
var elements = listElements(li);
elements.unshift(li);
ed.execCommand("Outdent", false, elements);
ed.undoManager.add();
return Event.cancel(e);
@ -474,7 +476,7 @@
ed.dom.remove(li, true);
var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 });
if (textNodes.length === 1) {
var textNode = textNodes[0]
var textNode = textNodes[0];
ed.selection.setCursorLocation(textNode, textNode.length);
}
ed.undoManager.add();
@ -839,7 +841,7 @@
}
function recurse(element) {
t.splitSafeEach(element.childNodes, processElement);
t.splitSafeEach(element.childNodes, processElement, true);
}
function brAtEdgeOfSelection(container, offset) {
@ -890,9 +892,11 @@
}
},
splitSafeEach: function(elements, f) {
if (tinymce.isGecko && (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) ||
/Firefox\/3\.[0-4]/.test(navigator.userAgent))) {
splitSafeEach: function(elements, f, forceClassBase) {
if (forceClassBase ||
(tinymce.isGecko &&
(/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) ||
/Firefox\/3\.[0-4]/.test(navigator.userAgent)))) {
this.classBasedEach(elements, f);
} else {
each(elements, f);
@ -933,8 +937,7 @@
},
selectedBlocks: function() {
var ed = this.ed
var selectedBlocks = ed.selection.getSelectedBlocks();
var ed = this.ed, selectedBlocks = ed.selection.getSelectedBlocks();
return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks;
},

@ -382,7 +382,7 @@
data = JSON.parse(data);
typeItem = this.getType(node.attr('class'));
style = node.attr('data-mce-style')
style = node.attr('data-mce-style');
if (!style) {
style = node.attr('style');

@ -78,7 +78,7 @@
get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media');
get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media');
get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media');
get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image');
get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','image','media');
html = self.getMediaListHTML('medialist', 'src', 'media', 'media');
if (html == "")
@ -327,6 +327,39 @@
setVal('media_type', data.type);
}
// Vimeo
if (src.match(/vimeo.com\/([0-9]+)/)) {
data.width = 425;
data.height = 350;
data.params.frameborder = '0';
data.type = 'iframe';
src = 'http://player.vimeo.com/video/' + src.match(/vimeo.com\/([0-9]+)/)[1];
setVal('src', src);
setVal('media_type', data.type);
}
// stream.cz
if (src.match(/stream.cz\/((?!object).)*\/([0-9]+)/)) {
data.width = 425;
data.height = 350;
data.params.frameborder = '0';
data.type = 'iframe';
src = 'http://www.stream.cz/object/' + src.match(/stream.cz\/[^/]+\/([0-9]+)/)[1];
setVal('src', src);
setVal('media_type', data.type);
}
// Google maps
if (src.match(/maps.google.([a-z]{2,3})\/maps\/(.+)msid=(.+)/)) {
data.width = 425;
data.height = 350;
data.params.frameborder = '0';
data.type = 'iframe';
src = 'http://maps.google.com/maps/ms?msid=' + src.match(/msid=(.+)/)[1] + "&output=embed";
setVal('src', src);
setVal('media_type', data.type);
}
if (data.type == 'video') {
if (!data.video.sources)
data.video.sources = [];

File diff suppressed because one or more lines are too long

@ -14,10 +14,7 @@
var VK = tinymce.VK;
function handleContentEditableSelection(ed) {
var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret';
// Setup invisible character use zero width space on Gecko since it doesn't change the height of the container
invisibleChar = tinymce.isGecko ? '\u200B' : '\uFEFF';
var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret', invisibleChar = '\uFEFF';
// Returns the content editable state of a node "true/false" or null
function getContentEditable(node) {

@ -1 +1 @@
tinyMCE.addI18n('es.style_dlg',{"text_lineheight":"Ancho de la fila","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tama\u00f1o","text_font":"Fuente","text_props":"Texto","positioning_tab":"Posici\u00f3n","list_tab":"Lista","border_tab":"Borde","box_tab":"Caja","block_tab":"Bloque","background_tab":"Fondo","text_tab":"Texto",apply:"Aplicar",title:"Editar Estilo CSS",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilidad","positioning_type":"Tipo",position:"Posici\u00f3n","bullet_image":"Imagen de la vi\u00f1eta","list_type":"Tipo",color:"Color",height:"Alto",width:"Ancho",style:"Estilo",margin:"Margen",left:"Izquierda",bottom:"Debajo",right:"Derecha",top:"Arriba",same:"Lo mismo en todos",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Alto","box_width":"Ancho","block_display":"Display","block_whitespace":"Espacio en blanco","block_text_indent":"Sangr\u00eda","block_text_align":"Alineaci\u00f3n del texto","block_vertical_alignment":"Alineaci\u00f3n vertical","block_letterspacing":"Espacio entre letra","block_wordspacing":"Espacio entre palabra","background_vpos":"Posici\u00f3n vertical","background_hpos":"Posici\u00f3n horizontal","background_attachment":"Adjunto","background_repeat":"Repetici\u00f3n","background_image":"Imagen de fondo","background_color":"Color de fondo","text_none":"Ninguno","text_blink":"Parpadeo","text_case":"Min\u00fas./May\u00fas.","text_striketrough":"Tachado","text_underline":"Subrayado","text_overline":"Subrayado superior","text_decoration":"Decorativos","text_color":"Color",text:"Texto",background:"Fondo",block:"Bloque",box:"Caja",border:"Borde",list:"Lista"});
tinyMCE.addI18n('es.style_dlg',{"text_lineheight":"Ancho de la fila","text_variant":"Variante","text_style":"Estilo","text_weight":"Peso","text_size":"Tama\u00f1o","text_font":"Fuente","text_props":"Texto","positioning_tab":"Posicionamiento","list_tab":"Lista","border_tab":"Borde","box_tab":"Caja","block_tab":"Bloque","background_tab":"Fondo","text_tab":"Texto",apply:"Aplicar",title:"Editar Estilo CSS",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibilidad","positioning_type":"Tipo",position:"Posici\u00f3n","bullet_image":"Imagen de la vi\u00f1eta","list_type":"Tipo",color:"Color",height:"Alto",width:"Ancho",style:"Estilo",margin:"Margen",left:"Izquierda",bottom:"Inferior",right:"Derecha",top:"Superior",same:"Lo mismo en todos",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Alto","box_width":"Ancho","block_display":"Display","block_whitespace":"Espacio en blanco","block_text_indent":"Sangr\u00eda","block_text_align":"Alineaci\u00f3n del texto","block_vertical_alignment":"Alineaci\u00f3n vertical","block_letterspacing":"Espacio entre letra","block_wordspacing":"Espacio entre palabra","background_vpos":"Posici\u00f3n vertical","background_hpos":"Posici\u00f3n horizontal","background_attachment":"Adjunto","background_repeat":"Repetici\u00f3n","background_image":"Imagen de fondo","background_color":"Color de fondo","text_none":"Ninguno","text_blink":"Parpadeo","text_case":"Min\u00fas./May\u00fas.","text_striketrough":"Tachado","text_underline":"Subrayado","text_overline":"Subrayado superior","text_decoration":"Decorativos","text_color":"Color",text:"Texto",background:"Fondo",block:"Bloque",box:"Caja",border:"Borde",list:"Lista"});

File diff suppressed because one or more lines are too long

@ -13,7 +13,7 @@
// Generates a preview for a format
function getPreviewCss(ed, fmt) {
var previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
previewStyles = ed.settings.preview_styles;
@ -831,6 +831,7 @@
var f = Event.add(ed.id + '_external_close', 'click', function() {
DOM.hide(ed.id + '_external');
Event.remove(ed.id + '_external_close', 'click', f);
return false;
});
DOM.show(e);
@ -1038,6 +1039,8 @@
width = startWidth + (e.screenX - startX);
height = startHeight + (e.screenY - startY);
t.resizeTo(width, height, true);
ed.nodeChanged();
};
e.preventDefault();
@ -1286,7 +1289,7 @@
ti += 'id: ' + v + ' ';
if (v = n.className) {
v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '')
v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '');
if (v) {
ti += 'class: ' + v + ' ';

@ -1 +1 @@
tinyMCE.addI18n('he.advanced_dlg',{"link_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","link_is_external":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d7\u05d9\u05e6\u05d5\u05e0\u05d9 \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea http:// \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_is_email":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05d9\u05d9\u05dc \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea MAILTO \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_titlefield":"\u05db\u05d5\u05ea\u05e8\u05ea","link_target_blank":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9","link_target_same":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d0\u05d5\u05ea\u05d5 \u05d7\u05dc\u05d5\u05df","link_target":"\u05d9\u05e2\u05d3","link_url":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8","link_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","image_align_right":"\u05d9\u05de\u05d9\u05df","image_align_left":"\u05e9\u05de\u05d0\u05dc","image_align_textbottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_texttop":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_bottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df","image_align_middle":"\u05d0\u05de\u05e6\u05e2","image_align_top":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df","image_align_baseline":"\u05e7\u05d5 \u05d4\u05d4\u05ea\u05d7\u05dc\u05d4","image_align":"\u05d9\u05d9\u05e9\u05d5\u05e8","image_hspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05d5\u05e4\u05e7\u05d9","image_vspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05e0\u05db\u05d9","image_dimensions":"\u05d2\u05d5\u05d3\u05dc","image_alt":"\u05ea\u05d9\u05d0\u05d5\u05e8","image_list":"\u05e8\u05e9\u05d9\u05de\u05d4","image_border":"\u05d2\u05d1\u05d5\u05dc","image_src":"\u05db\u05ea\u05d5\u05d1\u05ea:","image_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05ea\u05de\u05d5\u05e0\u05d4","charmap_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e1\u05d9\u05de\u05df","colorpicker_name":"\u05e9\u05dd:","colorpicker_color":"\u05e6\u05d1\u05e2:","colorpicker_named_title":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_named_tab":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_palette_title":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_palette_tab":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_title":"\u05d1\u05d5\u05e8\u05e8 \u05d4\u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_tab":"\u05d1\u05d5\u05e8\u05e8","colorpicker_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2","code_wordwrap":"\u05d2\u05dc\u05d9\u05e9\u05ea \u05d8\u05e7\u05e1\u05d8","code_title":"\u05e2\u05d5\u05e8\u05da \u05d4-HTML","anchor_name":"\u05e9\u05dd \u05d4\u05e1\u05d9\u05de\u05e0\u05d9\u05d4","anchor_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","about_loaded":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e4\u05e2\u05d9\u05dc\u05d5\u05ea","about_version":"\u05d2\u05d9\u05e8\u05e1\u05d4","about_author":"\u05d9\u05d5\u05e6\u05e8","about_plugin":"\u05ea\u05d5\u05e1\u05e4\u05ea","about_plugins":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea","about_license":"\u05e8\u05e9\u05d9\u05d5\u05df","about_help":"\u05e2\u05d6\u05e8\u05d4","about_general":"\u05d0\u05d5\u05d3\u05d5\u05ea","about_title":"\u05d0\u05d5\u05d3\u05d5\u05ea TinyMCE","charmap_usage":"\u05d4\u05e9\u05ea\u05de\u05e9/\u05d9 \u05d1\u05d7\u05d9\u05e6\u05d9\u05dd \u05dc\u05e0\u05d9\u05d5\u05d5\u05d8 \u05d9\u05de\u05d9\u05e0\u05d4 \u05d5\u05e9\u05de\u05d0\u05dc\u05d4","anchor_invalid":"\u05e0\u05d0 \u05dc\u05e6\u05d9\u05d9\u05df \u05e9\u05dd \u05d7\u05d5\u05e7\u05d9","accessibility_help":"\u05e2\u05d6\u05e8\u05d4 \u05d1\u05e0\u05d2\u05d9\u05e9\u05d5\u05ea","accessibility_usage_title":"\u05e9\u05d9\u05de\u05d5\u05e9 \u05db\u05dc\u05dc\u05d9"});
tinyMCE.addI18n('he.advanced_dlg',{"link_list":"\u05e8\u05e9\u05d9\u05de\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8\u05d9\u05dd","link_is_external":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d7\u05d9\u05e6\u05d5\u05e0\u05d9 \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea http:// \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_is_email":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4-URL \u05e9\u05d4\u05d5\u05db\u05e0\u05e1\u05d4 \u05d4\u05d9\u05d0 \u05db\u05db\u05dc \u05d4\u05e0\u05e8\u05d0\u05d4 \u05db\u05ea\u05d5\u05d1\u05ea \u05de\u05d9\u05d9\u05dc \u05d4\u05d0\u05dd \u05d1\u05e8\u05e6\u05d5\u05e0\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05d0\u05ea \u05d4\u05e7\u05d9\u05d3\u05d5\u05de\u05ea MAILTO \u05d4\u05e0\u05d3\u05e8\u05e9\u05ea?","link_titlefield":"\u05db\u05d5\u05ea\u05e8\u05ea","link_target_blank":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d7\u05dc\u05d5\u05df \u05d7\u05d3\u05e9","link_target_same":"\u05e4\u05ea\u05d7 \u05e7\u05d9\u05e9\u05d5\u05e8 \u05d1\u05d0\u05d5\u05ea\u05d5 \u05d7\u05dc\u05d5\u05df","link_target":"\u05d9\u05e2\u05d3","link_url":"\u05db\u05ea\u05d5\u05d1\u05ea \u05d4\u05e7\u05d9\u05e9\u05d5\u05e8","link_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e7\u05d9\u05e9\u05d5\u05e8","image_align_right":"\u05d9\u05de\u05d9\u05df","image_align_left":"\u05e9\u05de\u05d0\u05dc","image_align_textbottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_texttop":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df \u05e9\u05dc \u05d4\u05d8\u05e7\u05e1\u05d8","image_align_bottom":"\u05e7\u05e6\u05d4 \u05d4\u05ea\u05d7\u05ea\u05d5\u05df","image_align_middle":"\u05d0\u05de\u05e6\u05e2","image_align_top":"\u05e7\u05e6\u05d4 \u05d4\u05e2\u05dc\u05d9\u05d5\u05df","image_align_baseline":"\u05e7\u05d5 \u05d4\u05d4\u05ea\u05d7\u05dc\u05d4","image_align":"\u05d9\u05d9\u05e9\u05d5\u05e8","image_hspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05d5\u05e4\u05e7\u05d9","image_vspace":"\u05e8\u05d5\u05d5\u05d7 \u05d0\u05e0\u05db\u05d9","image_dimensions":"\u05d2\u05d5\u05d3\u05dc","image_alt":"\u05ea\u05d9\u05d0\u05d5\u05e8","image_list":"\u05e8\u05e9\u05d9\u05de\u05d4","image_border":"\u05d2\u05d1\u05d5\u05dc","image_src":"\u05db\u05ea\u05d5\u05d1\u05ea:","image_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05ea\u05de\u05d5\u05e0\u05d4","charmap_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e1\u05d9\u05de\u05df","colorpicker_name":"\u05e9\u05dd:","colorpicker_color":"\u05e6\u05d1\u05e2:","colorpicker_named_title":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_named_tab":"\u05e6\u05d1\u05e2\u05d9\u05dd \u05d1\u05e2\u05dc\u05d9 \u05e9\u05de\u05d5\u05ea","colorpicker_palette_title":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_palette_tab":"\u05dc\u05d5\u05d7 \u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_title":"\u05d1\u05d5\u05e8\u05e8 \u05d4\u05e6\u05d1\u05e2\u05d9\u05dd","colorpicker_picker_tab":"\u05d1\u05d5\u05e8\u05e8","colorpicker_title":"\u05d1\u05d7\u05d9\u05e8\u05ea \u05e6\u05d1\u05e2","code_wordwrap":"\u05d2\u05dc\u05d9\u05e9\u05ea \u05d8\u05e7\u05e1\u05d8","code_title":"\u05e2\u05d5\u05e8\u05da \u05d4-HTML","anchor_name":"\u05e9\u05dd \u05d4\u05e1\u05d9\u05de\u05e0\u05d9\u05d4","anchor_title":"\u05d4\u05d5\u05e1\u05e4\u05d4/\u05e2\u05e8\u05d9\u05db\u05ea \u05e1\u05d9\u05de\u05e0\u05d9\u05d4","about_loaded":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea \u05e4\u05e2\u05d9\u05dc\u05d5\u05ea","about_version":"\u05d2\u05d9\u05e8\u05e1\u05d4","about_author":"\u05d9\u05d5\u05e6\u05e8","about_plugin":"\u05ea\u05d5\u05e1\u05e4\u05ea","about_plugins":"\u05ea\u05d5\u05e1\u05e4\u05d5\u05ea","about_license":"\u05e8\u05e9\u05d9\u05d5\u05df","about_help":"\u05e2\u05d6\u05e8\u05d4","about_general":"\u05d0\u05d5\u05d3\u05d5\u05ea","about_title":"\u05d0\u05d5\u05d3\u05d5\u05ea TinyMCE","charmap_usage":"\u05d4\u05e9\u05ea\u05de\u05e9/\u05d9 \u05d1\u05d7\u05d9\u05e6\u05d9\u05dd \u05dc\u05e0\u05d9\u05d5\u05d5\u05d8 \u05d9\u05de\u05d9\u05e0\u05d4 \u05d5\u05e9\u05de\u05d0\u05dc\u05d4","anchor_invalid":"\u05e0\u05d0 \u05dc\u05e6\u05d9\u05d9\u05df \u05e9\u05dd \u05d7\u05d5\u05e7\u05d9","accessibility_help":"\u05e2\u05d6\u05e8\u05d4 \u05d1\u05e0\u05d2\u05d9\u05e9\u05d5\u05ea","accessibility_usage_title":"\u05e9\u05d9\u05de\u05d5\u05e9 \u05db\u05dc\u05dc\u05d9","invalid_color_value":"\u05e2\u05e8\u05da \u05d4\u05e6\u05d1\u05e2 \u05dc\u05d0 \u05ea\u05e7\u05d9\u05df"});

@ -1 +1 @@
tinyMCE.addI18n('nb.advanced_dlg',{"link_list":"Lenkeliste","link_is_external":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en ekstern nettadresse. \u00d8nsker du \u00e5 legge til det p\u00e5krevde http://-prefikset?","link_is_email":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en e-postadresse. \u00d8nsker du \u00e5 legge til det p\u00e5krevde mailto:-prefikset?","link_titlefield":"Tittel","link_target_blank":"\u00c5pne i nytt vindu","link_target_same":"\u00c5pne i dette vinduet","link_target":"M\u00e5lside","link_url":"Lenkens URL","link_title":"Sett inn /endre lenke","image_align_right":"H\u00f8yre","image_align_left":"Venstre","image_align_textbottom":"Tekstbunn","image_align_texttop":"Teksttopp","image_align_bottom":"Bunn","image_align_middle":"Midtstilt","image_align_top":"Topp","image_align_baseline":"Bunnlinje","image_align":"Justering","image_hspace":"Horisontal avstand","image_vspace":"Vertikal avstand","image_dimensions":"Dimensjoner","image_alt":"Bildebeskrivelse","image_list":"Bildeliste","image_border":"Ramme","image_src":"Bildets URL","image_title":"Sett inn / endre bilde","charmap_title":"Velg spesialtegn","colorpicker_name":"Navn:","colorpicker_color":"Farge:","colorpicker_named_title":"Fargenavn","colorpicker_named_tab":"Navnevalg","colorpicker_palette_title":"Palettfarger","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"Fargevalg","colorpicker_picker_tab":"Velg farge","colorpicker_title":"Velg en farge","code_wordwrap":"Tekstbryting","code_title":"HTML-editor","anchor_name":"Ankernavn","anchor_title":"Sett inn / endre anker","about_loaded":"Lastede programtillegg","about_version":"Versjon","about_author":"Utvikler","about_plugin":"Programtillegg","about_plugins":"Programtillegg","about_license":"Lisens","about_help":"Hjelp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Bruk venstre og h\u00f8yre piltast for \u00e5 navigere.","anchor_invalid":"Du m\u00e5 angi et gyldig ankernavn.","accessibility_help":"Tilhjengelighetshjelp","accessibility_usage_title":"Generell bruk"});
tinyMCE.addI18n('nb.advanced_dlg',{"link_list":"Lenkeliste","link_is_external":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en ekstern nettadresse. \u00d8nsker du \u00e5 legge til det p\u00e5krevde http://-prefikset?","link_is_email":"Nettadressen du skrev inn ser ut til \u00e5 v\u00e6re en e-postadresse. \u00d8nsker du \u00e5 legge til det p\u00e5krevde mailto:-prefikset?","link_titlefield":"Tittel","link_target_blank":"\u00c5pne i nytt vindu","link_target_same":"\u00c5pne i dette vinduet","link_target":"M\u00e5lside","link_url":"Lenkens URL","link_title":"Sett inn /endre lenke","image_align_right":"H\u00f8yre","image_align_left":"Venstre","image_align_textbottom":"Tekstbunn","image_align_texttop":"Teksttopp","image_align_bottom":"Bunn","image_align_middle":"Midtstilt","image_align_top":"Topp","image_align_baseline":"Bunnlinje","image_align":"Justering","image_hspace":"Horisontal avstand","image_vspace":"Vertikal avstand","image_dimensions":"Dimensjoner","image_alt":"Bildebeskrivelse","image_list":"Bildeliste","image_border":"Ramme","image_src":"Bildets URL","image_title":"Sett inn / endre bilde","charmap_title":"Velg spesialtegn","colorpicker_name":"Navn:","colorpicker_color":"Farge:","colorpicker_named_title":"Fargenavn","colorpicker_named_tab":"Navnevalg","colorpicker_palette_title":"Palettfarger","colorpicker_palette_tab":"Palett","colorpicker_picker_title":"Fargevalg","colorpicker_picker_tab":"Velg farge","colorpicker_title":"Velg en farge","code_wordwrap":"Tekstbryting","code_title":"HTML-editor","anchor_name":"Ankernavn","anchor_title":"Sett inn / endre anker","about_loaded":"Lastede programtillegg","about_version":"Versjon","about_author":"Utvikler","about_plugin":"Programtillegg","about_plugins":"Programtillegg","about_license":"Lisens","about_help":"Hjelp","about_general":"Om","about_title":"Om TinyMCE","charmap_usage":"Bruk venstre og h\u00f8yre piltast for \u00e5 navigere.","anchor_invalid":"Du m\u00e5 angi et gyldig ankernavn.","accessibility_help":"Tilhjengelighetshjelp","accessibility_usage_title":"Generell bruk","invalid_color_value":"Ugyldig fargeverdi"});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -6,9 +6,9 @@
var tinymce = {
majorVersion : '3',
minorVersion : '5.4.1',
minorVersion : '5.6',
releaseDate : '2012-06-24',
releaseDate : '2012-07-26',
_init : function() {
var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v;
@ -1086,7 +1086,8 @@ tinymce.create('static tinymce.util.XHR', {
},
metaKeyPressed: function(e) {
return tinymce.isMac ? e.metaKey : e.ctrlKey;
// Check if ctrl or meta key is pressed also check if alt is false for Polish users
return tinymce.isMac ? e.metaKey : e.ctrlKey && !e.altKey;
}
};
})(tinymce);
@ -1180,7 +1181,7 @@ tinymce.util.Quirks = function(editor) {
var allRng = dom.createRng();
allRng.selectNode(editor.getBody());
var allSelection = serializeRng(allRng);//console.log(selection, "----", allSelection);
var allSelection = serializeRng(allRng);
return selection === allSelection;
}
@ -1313,7 +1314,7 @@ tinymce.util.Quirks = function(editor) {
}
function isSelectionAcrossElements() {
return !selection.isCollapsed() && selection.getStart() != selection.getEnd();
return !selection.isCollapsed() && dom.getParent(selection.getStart(), dom.isBlock) != dom.getParent(selection.getEnd(), dom.isBlock);
}
function blockEvent(editor, e) {
@ -1632,77 +1633,237 @@ tinymce.util.Quirks = function(editor) {
};
function fakeImageResize() {
var mouseDownImg, startX, startY, startW, startH;
var selectedElmX, selectedElmY, selectedElm, selectedElmGhost, selectedHandle, startX, startY, startW, startH, ratio,
resizeHandles, width, height, rootDocument = document, editableDoc = editor.getDoc();
if (!settings.object_resizing || settings.webkit_fake_resize === false) {
return;
}
editor.contentStyles.push('.mceResizeImages img {cursor: se-resize !important}');
// Try disabling object resizing if WebKit implements resizing in the future
setEditorCommandState("enableObjectResizing", false);
// Details about each resize handle how to scale etc
resizeHandles = {
// Name: x multiplier, y multiplier, delta size x, delta size y
n: [.5, 0, 0, -1],
e: [1, .5, 1, 0],
s: [.5, 1, 0, 1],
w: [0, .5, -1, 0],
nw: [0, 0, -1, -1],
ne: [1, 0, 1, -1],
se: [1, 1, 1, 1],
sw : [0, 1, -1, 1]
};
function resizeImage(e) {
var deltaX, deltaY, ratio, width, height;
function resizeElement(e) {
var deltaX, deltaY;
if (mouseDownImg) {
// Calc new width/height
deltaX = e.screenX - startX;
deltaY = e.screenY - startY;
ratio = Math.max((startW + deltaX) / startW, (startH + deltaY) / startH);
// Only update styles if the user draged one pixel or more
if (Math.abs(deltaX) > 1 || Math.abs(deltaY) > 1) {
// Constrain proportions
width = Math.round(startW * ratio);
height = Math.round(startH * ratio);
// Calc new size
width = deltaX * selectedHandle[2] + startW;
height = deltaY * selectedHandle[3] + startH;
// Resize by using style or attribute
if (mouseDownImg.style.width) {
dom.setStyle(mouseDownImg, 'width', width);
} else {
dom.setAttrib(mouseDownImg, 'width', width);
// Never scale down lower than 5 pixels
width = width < 5 ? 5 : width;
height = height < 5 ? 5 : height;
// Constrain proportions when modifier key is pressed or if the nw, ne, sw, se corners are moved on an image
if (VK.modifierPressed(e) || (selectedElm.nodeName == "IMG" && selectedHandle[2] * selectedHandle[3] !== 0)) {
width = Math.round(height / ratio);
height = Math.round(width * ratio);
}
// Update ghost size
dom.setStyles(selectedElmGhost, {
width: width,
height: height
});
// Update ghost X position if needed
if (selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width) {
dom.setStyle(selectedElmGhost, 'left', selectedElmX + (startW - width));
}
// Update ghost Y position if needed
if (selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height) {
dom.setStyle(selectedElmGhost, 'top', selectedElmY + (startH - height));
}
}
function endResize() {
function setSizeProp(name, value) {
if (value) {
// Resize by using style or attribute
if (mouseDownImg.style.height) {
dom.setStyle(mouseDownImg, 'height', height);
if (selectedElm.style[name] || !editor.schema.isValid(selectedElm.nodeName.toLowerCase(), name)) {
dom.setStyle(selectedElm, name, value);
} else {
dom.setAttrib(mouseDownImg, 'height', height);
dom.setAttrib(selectedElm, name, value);
}
}
}
// Set width/height properties
setSizeProp('width', width);
setSizeProp('height', height);
dom.unbind(editableDoc, 'mousemove', resizeElement);
dom.unbind(editableDoc, 'mouseup', endResize);
if (!dom.hasClass(editor.getBody(), 'mceResizeImages')) {
dom.addClass(editor.getBody(), 'mceResizeImages');
if (rootDocument != editableDoc) {
dom.unbind(rootDocument, 'mousemove', resizeElement);
dom.unbind(rootDocument, 'mouseup', endResize);
}
// Remove ghost and update resize handle positions
dom.remove(selectedElmGhost);
showResizeRect(selectedElm);
}
function showResizeRect(targetElm) {
var position, targetWidth, targetHeight;
hideResizeRect();
// Get position and size of target
position = dom.getPos(targetElm);
selectedElmX = position.x;
selectedElmY = position.y;
targetWidth = targetElm.offsetWidth;
targetHeight = targetElm.offsetHeight;
// Reset width/height if user selects a new image/table
if (selectedElm != targetElm) {
selectedElm = targetElm;
width = height = 0;
}
};
editor.onMouseDown.add(function(editor, e) {
var target = e.target;
tinymce.each(resizeHandles, function(handle, name) {
var handleElm;
// Get existing or render resize handle
handleElm = dom.get('mceResizeHandle' + name);
if (!handleElm) {
handleElm = dom.add(editableDoc.documentElement, 'div', {
id: 'mceResizeHandle' + name,
'class': 'mceResizeHandle',
style: 'cursor:' + name + '-resize; margin:0; padding:0'
});
dom.bind(handleElm, 'mousedown', function(e) {
e.preventDefault();
endResize();
if (target.nodeName == "IMG") {
mouseDownImg = target;
startX = e.screenX;
startY = e.screenY;
startW = mouseDownImg.clientWidth;
startH = mouseDownImg.clientHeight;
dom.bind(editor.getDoc(), 'mousemove', resizeImage);
e.preventDefault();
startW = selectedElm.clientWidth;
startH = selectedElm.clientHeight;
ratio = startH / startW;
selectedHandle = handle;
selectedElmGhost = selectedElm.cloneNode(true);
dom.addClass(selectedElmGhost, 'mceClonedResizable');
dom.setStyles(selectedElmGhost, {
left: selectedElmX,
top: selectedElmY,
margin: 0
});
editableDoc.documentElement.appendChild(selectedElmGhost);
dom.bind(editableDoc, 'mousemove', resizeElement);
dom.bind(editableDoc, 'mouseup', endResize);
if (rootDocument != editableDoc) {
dom.bind(rootDocument, 'mousemove', resizeElement);
dom.bind(rootDocument, 'mouseup', endResize);
}
});
} else {
dom.show(handleElm);
}
// Position element
dom.setStyles(handleElm, {
left: (targetWidth * handle[0] + selectedElmX) - (handleElm.offsetWidth / 2),
top: (targetHeight * handle[1] + selectedElmY) - (handleElm.offsetHeight / 2)
});
});
// Unbind events on node change and restore resize cursor
editor.onNodeChange.add(function() {
if (mouseDownImg) {
mouseDownImg = null;
dom.unbind(editor.getDoc(), 'mousemove', resizeImage);
// Only add resize rectangle on WebKit and only on images
if (!tinymce.isOpera && selectedElm.nodeName == "IMG") {
selectedElm.setAttribute('data-mce-selected', '1');
}
}
function hideResizeRect() {
if (selectedElm) {
selectedElm.removeAttribute('data-mce-selected');
}
for (var name in resizeHandles) {
dom.hide('mceResizeHandle' + name);
}
}
if (selection.getNode().nodeName == "IMG") {
dom.addClass(editor.getBody(), 'mceResizeImages');
// Add CSS for resize handles, cloned element and selected
editor.contentStyles.push(
'.mceResizeHandle {' +
'position: absolute;' +
'border: 1px solid black;' +
'background: #FFF;' +
'width: 5px;' +
'height: 5px;' +
'z-index: 10000' +
'}' +
'.mceResizeHandle:hover {' +
'background: #000' +
'}' +
'img[data-mce-selected] {' +
'outline: 1px solid black' +
'}' +
'img.mceClonedResizable, table.mceClonedResizable {' +
'position: absolute;' +
'outline: 1px dashed black;' +
'opacity: .5;' +
'z-index: 10000' +
'}'
);
function updateResizeRect() {
var controlElm = dom.getParent(selection.getNode(), 'table,img');
// Remove data-mce-selected from all elements since they might have been copied using Ctrl+c/v
tinymce.each(dom.select('img[data-mce-selected]'), function(img) {
img.removeAttribute('data-mce-selected');
});
if (controlElm) {
showResizeRect(controlElm);
} else {
dom.removeClass(editor.getBody(), 'mceResizeImages');
hideResizeRect();
}
}
// Show/hide resize rect when image is selected
editor.onNodeChange.add(updateResizeRect);
// Fixes WebKit quirk where it returns IMG on getNode if caret is after last image in container
dom.bind(editableDoc, 'selectionchange', updateResizeRect);
// Remove the internal attribute when serializing the DOM
editor.serializer.addAttributeFilter('data-mce-selected', function(nodes, name) {
var i = nodes.length;
while (i--) {
nodes[i].attr(name, null);
}
});
};
}
// All browsers
disableBackspaceIntoATable();
@ -1745,6 +1906,11 @@ tinymce.util.Quirks = function(editor) {
addBrAfterLastLinks();
removeGhostSelection();
}
// Opera
if (tinymce.isOpera) {
fakeImageResize();
}
};
(function(tinymce) {
var namedEntities, baseEntities, reverseEntities,
@ -5599,7 +5765,7 @@ tinymce.dom.TreeWalker = function(start_node, root_node) {
styleElm.id = 'mceDefaultStyles';
styleElm.type = 'text/css';
head = doc.getElementsByTagName('head')[0]
head = doc.getElementsByTagName('head')[0];
if (head.firstChild) {
head.insertBefore(styleElm, head.firstChild);
} else {
@ -7349,7 +7515,8 @@ tinymce.dom.TreeWalker = function(start_node, root_node) {
};
this.addRange = function(rng) {
var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, sibling, doc = selection.dom.doc, body = doc.body;
var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, sibling,
doc = selection.dom.doc, body = doc.body, nativeRng, ctrlElm;
function setEndPoint(start) {
var container, offset, marker, tmpRng, nodes;
@ -7435,10 +7602,17 @@ tinymce.dom.TreeWalker = function(start_node, root_node) {
if (startOffset == endOffset - 1) {
try {
ctrlElm = startContainer.childNodes[startOffset];
ctrlRng = body.createControlRange();
ctrlRng.addElement(startContainer.childNodes[startOffset]);
ctrlRng.addElement(ctrlElm);
ctrlRng.select();
// Check if the range produced is on the correct element and is a control range
// On IE 8 it will select the parent contentEditable container if you select an inner element see: #5398
nativeRng = selection.getRng();
if (nativeRng.item && ctrlElm === nativeRng.item(0)) {
return;
}
} catch (ex) {
// Ignore
}
@ -10379,7 +10553,7 @@ window.tinymce.dom.Sizzle = Sizzle;
// Replace all BOM characters for now until we can find a better solution
if (!args.cleanup)
args.content = args.content.replace(/\uFEFF|\u200B/g, '');
args.content = args.content.replace(/\uFEFF/g, '');
// Post process
if (!args.no_events)
@ -13361,6 +13535,11 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
});
}
// Load specified content CSS last
if (s.content_style) {
t.contentStyles.push(s.content_style);
}
// Content editable mode ends here
if (s.content_editable) {
e = n = o = null; // Fix IE leak
@ -14135,7 +14314,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
},
getContent : function(args) {
var self = this, content;
var self = this, content, body = self.getBody();
// Setup args object
args = args || {};
@ -14149,11 +14328,18 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
// Get raw contents or by default the cleaned contents
if (args.format == 'raw')
content = self.getBody().innerHTML;
content = body.innerHTML;
else if (args.format == 'text')
content = body.innerText || body.textContent;
else
content = self.serializer.serialize(self.getBody(), args);
content = self.serializer.serialize(body, args);
// Trim whitespace in beginning/end of HTML
if (args.format != 'text') {
args.content = tinymce.trim(content);
} else {
args.content = content;
}
// Do post processing
if (!args.no_events)
@ -14969,7 +15155,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
// Insert bookmark node and get the parent
selection.setContent(bookmarkHtml);
parentNode = editor.selection.getNode();
parentNode = selection.getNode();
rootNode = editor.getBody();
// Opera will return the document node when selection is in root
@ -15136,10 +15322,15 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
selectAll : function() {
var root = dom.getRoot(), rng = dom.createRng();
// Old IE does a better job with selectall than new versions
if (selection.getRng().setStart) {
rng.setStart(root, 0);
rng.setEnd(root, root.childNodes.length);
editor.selection.setRng(rng);
selection.setRng(rng);
} else {
execNativeCommand('SelectAll');
}
}
});
@ -15178,7 +15369,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
},
'InsertUnorderedList,InsertOrderedList' : function(command) {
return dom.getParent(selection.getNode(), command == 'insertunorderedlist' ? 'UL' : 'OL');
var list = dom.getParent(selection.getNode(), 'ul,ol');
return list &&
(command === 'insertunorderedlist' && list.tagName === 'UL'
|| command === 'insertorderedlist' && list.tagName === 'OL');
}
}, 'state');
@ -15479,6 +15673,14 @@ tinymce.ForceBlocks = function(editor) {
node = rootNode.firstChild;
while (node) {
if (node.nodeType === 3 || (node.nodeType == 1 && !blockElements[node.nodeName])) {
// Remove empty text nodes
if (node.nodeType === 3 && node.nodeValue.length == 0) {
tempNode = node;
node = node.nextSibling;
dom.remove(tempNode);
continue;
}
if (!rootBlockNode) {
rootBlockNode = dom.create(settings.forced_root_block);
node.parentNode.insertBefore(rootBlockNode, node);
@ -16049,7 +16251,7 @@ tinymce.ForceBlocks = function(editor) {
isBlock = dom.isBlock,
forcedRootBlock = ed.settings.forced_root_block,
nodeIndex = dom.nodeIndex,
INVISIBLE_CHAR = tinymce.isGecko ? '\u200B' : '\uFEFF',
INVISIBLE_CHAR = '\uFEFF',
MCE_ATTR_RE = /^(src|href|style)$/,
FALSE = false,
TRUE = true,
@ -16964,7 +17166,7 @@ tinymce.ForceBlocks = function(editor) {
return FALSE;
};
function formatChanged(formats, callback) {
function formatChanged(formats, callback, similar) {
var currentFormats;
// Setup format node change logic
@ -16978,7 +17180,7 @@ tinymce.ForceBlocks = function(editor) {
// Check for new formats
each(formatChangeData, function(callbacks, format) {
each(parents, function(node) {
if (matchNode(node, format, {}, true)) {
if (matchNode(node, format, {}, callbacks.similar)) {
if (!currentFormats[format]) {
// Execute callbacks
each(callbacks, function(callback) {
@ -17011,6 +17213,7 @@ tinymce.ForceBlocks = function(editor) {
each(formats.split(','), function(format) {
if (!formatChangeData[format]) {
formatChangeData[format] = [];
formatChangeData[format].similar = similar;
}
formatChangeData[format].push(callback);
@ -18106,7 +18309,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager, nonEmptyElementsMap = editor.schema.getNonEmptyElements();
function handleEnterKey(evt) {
var rng = selection.getRng(true), tmpRng, editableRoot, container, offset, parentBlock, documentMode,
var rng = selection.getRng(true), tmpRng, editableRoot, container, offset, parentBlock, documentMode, shiftKey,
newBlock, fragment, containerBlock, parentBlockName, containerBlockName, newBlockName, isAfterLastNodeInContainer;
// Returns true if the block can be split into two blocks or not
@ -18151,6 +18354,11 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
node = firstChilds[i];
if (!node.hasChildNodes() || (node.firstChild == node.lastChild && node.firstChild.nodeValue === '')) {
dom.remove(node);
} else {
// Remove <a> </a> see #5381
if (node.nodeName == "A" && (node.innerText || node.textContent) === ' ') {
dom.remove(node);
}
}
}
};
@ -18429,7 +18637,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
if (container && container.nodeType == 3 && offset >= container.nodeValue.length) {
// Insert extra BR element at the end block elements
if (!tinymce.isIE && !hasRightSideBr()) {
brElm = dom.create('br')
brElm = dom.create('br');
rng.insertNode(brElm);
rng.setStartAfter(brElm);
rng.setEndAfter(brElm);
@ -18514,9 +18722,10 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
// Setup range items and newBlockName
container = rng.startContainer;
offset = rng.startOffset;
newBlockName = settings.forced_root_block;
newBlockName = (settings.force_p_newlines ? 'p' : '') || settings.forced_root_block;
newBlockName = newBlockName ? newBlockName.toUpperCase() : '';
documentMode = dom.doc.documentMode;
shiftKey = evt.shiftKey;
// Resolve node index
if (container.nodeType == 1 && container.hasChildNodes()) {
@ -18541,7 +18750,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
// If editable root isn't block nor the root of the editor
if (!dom.isBlock(editableRoot) && editableRoot != dom.getRoot()) {
if (!newBlockName || evt.shiftKey) {
if (!newBlockName || shiftKey) {
insertBr();
}
@ -18551,7 +18760,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
// Wrap the current node and it's sibling in a default block if it's needed.
// for example this <td>text|<b>text2</b></td> will become this <td><p>text|<b>text2</p></b></td>
// This won't happen if root blocks are disabled or the shiftKey is pressed
if ((newBlockName && !evt.shiftKey) || (!newBlockName && evt.shiftKey)) {
if ((newBlockName && !shiftKey) || (!newBlockName && shiftKey)) {
container = wrapSelfAndSiblingsInDefaultBlock(container, offset);
}
@ -18563,8 +18772,15 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5
containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5
// Handle enter in LI
if (parentBlockName == 'LI') {
if (!newBlockName && shiftKey) {
insertBr();
return;
}
// Handle enter inside an empty list item
if (parentBlockName == 'LI' && dom.isEmpty(parentBlock)) {
if (dom.isEmpty(parentBlock)) {
// Let the list plugin or browser handle nested lists for now
if (/^(UL|OL|LI)$/.test(containerBlock.parentNode.nodeName)) {
return false;
@ -18573,16 +18789,17 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
handleEmptyListItem();
return;
}
}
// Don't split PRE tags but insert a BR instead easier when writing code samples etc
if (parentBlockName == 'PRE' && settings.br_in_pre !== false) {
if (!evt.shiftKey) {
if (!shiftKey) {
insertBr();
return;
}
} else {
// If no root block is configured then insert a BR by default or if the shiftKey is pressed
if ((!newBlockName && !evt.shiftKey && parentBlockName != 'LI') || (newBlockName && evt.shiftKey)) {
if ((!newBlockName && !shiftKey && parentBlockName != 'LI') || (newBlockName && shiftKey)) {
insertBr();
return;
}

@ -0,0 +1,306 @@
<?php
// +-----------------------------------------------------------------------+
// | Copyright (c) 2011 Jehan |
// | All rights reserved. |
// | |
// | Redistribution and use in source and binary forms, with or without |
// | modification, are permitted provided that the following conditions |
// | are met: |
// | |
// | o Redistributions of source code must retain the above copyright |
// | notice, this list of conditions and the following disclaimer. |
// | o Redistributions in binary form must reproduce the above copyright |
// | notice, this list of conditions and the following disclaimer in the |
// | documentation and/or other materials provided with the distribution.|
// | o The names of the authors may not be used to endorse or promote |
// | products derived from this software without specific prior written |
// | permission. |
// | |
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
// | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
// | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
// | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
// | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// | |
// +-----------------------------------------------------------------------+
// | Author: Jehan <jehan.marmottard@gmail.com |
// +-----------------------------------------------------------------------+
//
// $Id$
/**
* Implementation of SCRAM-* SASL mechanisms.
* SCRAM mechanisms have 3 main steps (initial response, response to the server challenge, then server signature
* verification) which keep state-awareness. Therefore a single class instanciation must be done and reused for the whole
* authentication process.
*
* @author Jehan <jehan.marmottard@gmail.com>
* @access public
* @version 1.0
* @package Auth_SASL
*/
require_once('Auth/SASL/Common.php');
class Auth_SASL_SCRAM extends Auth_SASL_Common
{
/**
* Construct a SCRAM-H client where 'H' is a cryptographic hash function.
*
* @param string $hash The name cryptographic hash function 'H' as registered by IANA in the "Hash Function Textual
* Names" registry.
* @link http://www.iana.org/assignments/hash-function-text-names/hash-function-text-names.xml "Hash Function Textual
* Names"
* format of core PHP hash function.
* @access public
*/
function __construct($hash)
{
// Though I could be strict, I will actually also accept the naming used in the PHP core hash framework.
// For instance "sha1" is accepted, while the registered hash name should be "SHA-1".
$hash = strtolower($hash);
$hashes = array('md2' => 'md2',
'md5' => 'md5',
'sha-1' => 'sha1',
'sha1' => 'sha1',
'sha-224' > 'sha224',
'sha224' > 'sha224',
'sha-256' => 'sha256',
'sha256' => 'sha256',
'sha-384' => 'sha384',
'sha384' => 'sha384',
'sha-512' => 'sha512',
'sha512' => 'sha512');
if (function_exists('hash_hmac') && isset($hashes[$hash]))
{
$this->hash = create_function('$data', 'return hash("' . $hashes[$hash] . '", $data, TRUE);');
$this->hmac = create_function('$key,$str,$raw', 'return hash_hmac("' . $hashes[$hash] . '", $str, $key, $raw);');
}
elseif ($hash == 'md5')
{
$this->hash = create_function('$data', 'return md5($data, true);');
$this->hmac = array($this, '_HMAC_MD5');
}
elseif (in_array($hash, array('sha1', 'sha-1')))
{
$this->hash = create_function('$data', 'return sha1($data, true);');
$this->hmac = array($this, '_HMAC_SHA1');
}
else
return PEAR::raiseError('Invalid SASL mechanism type');
}
/**
* Provides the (main) client response for SCRAM-H.
*
* @param string $authcid Authentication id (username)
* @param string $pass Password
* @param string $challenge The challenge sent by the server.
* If the challenge is NULL or an empty string, the result will be the "initial response".
* @param string $authzid Authorization id (username to proxy as)
* @return string|false The response (binary, NOT base64 encoded)
* @access public
*/
public function getResponse($authcid, $pass, $challenge = NULL, $authzid = NULL)
{
$authcid = $this->_formatName($authcid);
if (empty($authcid))
{
return false;
}
if (!empty($authzid))
{
$authzid = $this->_formatName($authzid);
if (empty($authzid))
{
return false;
}
}
if (empty($challenge))
{
return $this->_generateInitialResponse($authcid, $authzid);
}
else
{
return $this->_generateResponse($challenge, $pass);
}
}
/**
* Prepare a name for inclusion in a SCRAM response.
*
* @param string $username a name to be prepared.
* @return string the reformated name.
* @access private
*/
private function _formatName($username)
{
// TODO: prepare through the SASLprep profile of the stringprep algorithm.
// See RFC-4013.
$username = str_replace('=', '=3D', $username);
$username = str_replace(',', '=2C', $username);
return $username;
}
/**
* Generate the initial response which can be either sent directly in the first message or as a response to an empty
* server challenge.
*
* @param string $authcid Prepared authentication identity.
* @param string $authzid Prepared authorization identity.
* @return string The SCRAM response to send.
* @access private
*/
private function _generateInitialResponse($authcid, $authzid)
{
$init_rep = '';
$gs2_cbind_flag = 'n,'; // TODO: support channel binding.
$this->gs2_header = $gs2_cbind_flag . (!empty($authzid)? 'a=' . $authzid : '') . ',';
// I must generate a client nonce and "save" it for later comparison on second response.
$this->cnonce = $this->_getCnonce();
// XXX: in the future, when mandatory and/or optional extensions are defined in any updated RFC,
// this message can be updated.
$this->first_message_bare = 'n=' . $authcid . ',r=' . $this->cnonce;
return $this->gs2_header . $this->first_message_bare;
}
/**
* Parses and verifies a non-empty SCRAM challenge.
*
* @param string $challenge The SCRAM challenge
* @return string|false The response to send; false in case of wrong challenge or if an initial response has not
* been generated first.
* @access private
*/
private function _generateResponse($challenge, $password)
{
// XXX: as I don't support mandatory extension, I would fail on them.
// And I simply ignore any optional extension.
$server_message_regexp = "#^r=([\x21-\x2B\x2D-\x7E]+),s=((?:[A-Za-z0-9/+]{4})*(?:[A-Za-z0-9]{3}=|[A-Xa-z0-9]{2}==)?),i=([0-9]*)(,[A-Za-z]=[^,])*$#";
if (!isset($this->cnonce, $this->gs2_header)
|| !preg_match($server_message_regexp, $challenge, $matches))
{
return false;
}
$nonce = $matches[1];
$salt = base64_decode($matches[2]);
if (!$salt)
{
// Invalid Base64.
return false;
}
$i = intval($matches[3]);
$cnonce = substr($nonce, 0, strlen($this->cnonce));
if ($cnonce <> $this->cnonce)
{
// Invalid challenge! Are we under attack?
return false;
}
$channel_binding = 'c=' . base64_encode($this->gs2_header); // TODO: support channel binding.
$final_message = $channel_binding . ',r=' . $nonce; // XXX: no extension.
// TODO: $password = $this->normalize($password); // SASLprep profile of stringprep.
$saltedPassword = $this->hi($password, $salt, $i);
$this->saltedPassword = $saltedPassword;
$clientKey = call_user_func($this->hmac, $saltedPassword, "Client Key", TRUE);
$storedKey = call_user_func($this->hash, $clientKey, TRUE);
$authMessage = $this->first_message_bare . ',' . $challenge . ',' . $final_message;
$this->authMessage = $authMessage;
$clientSignature = call_user_func($this->hmac, $storedKey, $authMessage, TRUE);
$clientProof = $clientKey ^ $clientSignature;
$proof = ',p=' . base64_encode($clientProof);
return $final_message . $proof;
}
/**
* SCRAM has also a server verification step. On a successful outcome, it will send additional data which must
* absolutely be checked against this function. If this fails, the entity which we are communicating with is probably
* not the server as it has not access to your ServerKey.
*
* @param string $data The additional data sent along a successful outcome.
* @return bool Whether the server has been authenticated.
* If false, the client must close the connection and consider to be under a MITM attack.
* @access public
*/
public function processOutcome($data)
{
$verifier_regexp = '#^v=((?:[A-Za-z0-9/+]{4})*(?:[A-Za-z0-9]{3}=|[A-Xa-z0-9]{2}==)?)$#';
if (!isset($this->saltedPassword, $this->authMessage)
|| !preg_match($verifier_regexp, $data, $matches))
{
// This cannot be an outcome, you never sent the challenge's response.
return false;
}
$verifier = $matches[1];
$proposed_serverSignature = base64_decode($verifier);
$serverKey = call_user_func($this->hmac, $this->saltedPassword, "Server Key", true);
$serverSignature = call_user_func($this->hmac, $serverKey, $this->authMessage, TRUE);
return ($proposed_serverSignature === $serverSignature);
}
/**
* Hi() call, which is essentially PBKDF2 (RFC-2898) with HMAC-H() as the pseudorandom function.
*
* @param string $str The string to hash.
* @param string $hash The hash value.
* @param int $i The iteration count.
* @access private
*/
private function hi($str, $salt, $i)
{
$int1 = "\0\0\0\1";
$ui = call_user_func($this->hmac, $str, $salt . $int1, true);
$result = $ui;
for ($k = 1; $k < $i; $k++)
{
$ui = call_user_func($this->hmac, $str, $ui, true);
$result = $result ^ $ui;
}
return $result;
}
/**
* Creates the client nonce for the response
*
* @return string The cnonce value
* @access private
* @author Richard Heyes <richard@php.net>
*/
private function _getCnonce()
{
// TODO: I reused the nonce function from the DigestMD5 class.
// I should probably make this a protected function in Common.
if (@file_exists('/dev/urandom') && $fd = @fopen('/dev/urandom', 'r')) {
return base64_encode(fread($fd, 32));
} elseif (@file_exists('/dev/random') && $fd = @fopen('/dev/random', 'r')) {
return base64_encode(fread($fd, 32));
} else {
$str = '';
for ($i=0; $i<32; $i++) {
$str .= chr(mt_rand(0, 255));
}
return base64_encode($str);
}
}
}
?>

Before

Width:  |  Height:  |  Size: 54 B

After

Width:  |  Height:  |  Size: 54 B

Before

Width:  |  Height:  |  Size: 118 B

After

Width:  |  Height:  |  Size: 118 B

@ -368,7 +368,7 @@ function rcmail_contact_frame($attrib)
$attrib['name'] = $attrib['id'];
$OUTPUT->set_env('contentframe', $attrib['name']);
$OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif');
$OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif');
return html::iframe($attrib);
}
@ -705,7 +705,7 @@ function rcmail_contact_photo($attrib)
if ($result = $CONTACTS->get_result())
$record = $result->first();
$photo_img = $attrib['placeholder'] ? $CONFIG['skin_path'] . $attrib['placeholder'] : 'program/blank.gif';
$photo_img = $attrib['placeholder'] ? $CONFIG['skin_path'] . $attrib['placeholder'] : 'program/resources/blank.gif';
$RCMAIL->output->set_env('photo_placeholder', $photo_img);
unset($attrib['placeholder']);

@ -85,7 +85,7 @@ if ($RCMAIL->action == 'photo') {
$RCMAIL->output->future_expire_header(86400);
header('Content-Type: ' . rc_image_content_type($data));
echo $data ? $data : file_get_contents('program/blank.gif');
echo $data ? $data : file_get_contents('program/resources/blank.gif');
exit;
}

@ -663,10 +663,10 @@ function rcmail_prepare_message_body()
unset($plugin);
// add blocked.gif attachment (#1486516)
if ($isHtml && preg_match('#<img src="\./program/blocked\.gif"#', $body)) {
if ($attachment = rcmail_save_image('program/blocked.gif', 'image/gif')) {
if ($isHtml && preg_match('#<img src="\./program/resources/blocked\.gif"#', $body)) {
if ($attachment = rcmail_save_image('program/resources/blocked.gif', 'image/gif')) {
$COMPOSE['attachments'][$attachment['id']] = $attachment;
$body = preg_replace('#\./program/blocked\.gif#',
$body = preg_replace('#\./program/resources/blocked\.gif#',
$RCMAIL->comm_path.'&_action=display-attachment&_file=rcmfile'.$attachment['id'].'&_id='.$COMPOSE['id'],
$body);
}
@ -860,7 +860,7 @@ function rcmail_compose_body($attrib)
$OUTPUT->set_env('spellcheck_langs', join(',', $editor_lang_set));
}
$out .= "\n".'<iframe name="savetarget" src="program/blank.gif" style="width:0;height:0;border:none;visibility:hidden;"></iframe>';
$out .= "\n".'<iframe name="savetarget" src="program/resources/blank.gif" style="width:0;height:0;border:none;visibility:hidden;"></iframe>';
return $out;
}

@ -398,7 +398,7 @@ function rcmail_messagecontent_frame($attrib)
if ($RCMAIL->config->get('preview_pane'))
$OUTPUT->set_env('contentframe', $attrib['id']);
$OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif');
$OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif');
return html::iframe($attrib);
}
@ -610,7 +610,7 @@ function rcmail_wash_html($html, $p, $cid_replaces)
$wash_opts = array(
'show_washed' => false,
'allow_remote' => $p['safe'],
'blocked_src' => "./program/blocked.gif",
'blocked_src' => "./program/resources/blocked.gif",
'charset' => RCMAIL_CHARSET,
'cid_map' => $cid_replaces,
'html_elements' => array('body'),

@ -274,7 +274,7 @@ function rcmail_message_contactphoto($attrib)
if ($MESSAGE->sender)
$photo_img = $RCMAIL->url(array('_task' => 'addressbook', '_action' => 'photo', '_email' => $MESSAGE->sender['mailto'], '_alt' => $placeholder));
else
$photo_img = $placeholder ? $placeholder : 'program/blank.gif';
$photo_img = $placeholder ? $placeholder : 'program/resources/blank.gif';
return html::img(array('src' => $photo_img) + $attrib);
}

@ -363,7 +363,7 @@ function rcmail_folder_frame($attrib)
$attrib['name'] = $attrib['id'];
$OUTPUT->set_env('contentframe', $attrib['name']);
$OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif');
$OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif');
return html::iframe($attrib);
}

@ -34,7 +34,7 @@ function rcmail_preferences_frame($attrib)
$attrib['name'] = $attrib['id'];
$OUTPUT->set_env('contentframe', $attrib['name']);
$OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif');
$OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif');
return html::iframe($attrib);
}

@ -24,7 +24,7 @@
var supported = /MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32",
realSrc,
blankSrc = "skins/default/images/blank.gif",
blankSrc = "program/resources/blank.gif",
isPrinting = false;
if (supported) fixImage();

@ -48,7 +48,7 @@ class rcube_test_mailfunc extends UnitTestCase
$html = rcmail_html4inline(rcmail_print_body($part, array('safe' => false)), 'foo');
$this->assertPattern('/src="'.$part->replaces['ex1.jpg'].'"/', $html, "Replace reference to inline image");
$this->assertPattern('#background="./program/blocked.gif"#', $html, "Replace external background image");
$this->assertPattern('#background="./program/resources/blocked.gif"#', $html, "Replace external background image");
$this->assertNoPattern('/ex3.jpg/', $html, "No references to external images");
$this->assertNoPattern('/<meta [^>]+>/', $html, "No meta tags allowed");
//$this->assertNoPattern('/<style [^>]+>/', $html, "No style tags allowed");

Loading…
Cancel
Save