From 35128ef2c95d8f76afd3edea594623cc265da673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Mon, 27 Feb 2012 22:01:17 +0000 Subject: [PATCH 001/133] Avoid a Notice --- include/event.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/event.php b/include/event.php index 4a9a9a0041..29202baddf 100755 --- a/include/event.php +++ b/include/event.php @@ -163,7 +163,7 @@ function bbtoevent($s) { if(preg_match("/\[event\-adjust\](.*?)\[\/event\-adjust\]/is",$s,$match)) $ev['adjust'] = $match[1]; $match = ''; - $ev['nofinish'] = (($ev['start'] && (!x($ev, 'finish') || !$ev['finish'])) ? 1 : 0); + $ev['nofinish'] = (((x($ev, 'start') && $ev['start']) && (!x($ev, 'finish') || !$ev['finish'])) ? 1 : 0); return $ev; } From e33c2b8f89d0174b6b2bcbd31d8d89c2ee664340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Mon, 27 Feb 2012 22:08:00 +0000 Subject: [PATCH 002/133] Avoid a Notice --- include/items.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/items.php b/include/items.php index 7d52571c25..5452dfbdab 100755 --- a/include/items.php +++ b/include/items.php @@ -682,7 +682,7 @@ function item_store($arr,$force_parent = false) { unset($arr['dsprsig']); } - if($arr['gravity']) + if(x($arr, 'gravity')) $arr['gravity'] = intval($arr['gravity']); elseif($arr['parent-uri'] === $arr['uri']) $arr['gravity'] = 0; @@ -800,6 +800,8 @@ function item_store($arr,$force_parent = false) { logger('item_store: item parent was not found - ignoring item'); return 0; } + + $parent_deleted = 0; } } From 7c30fca98186538eff731519bdd0c76527237192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Mon, 27 Feb 2012 22:17:57 +0000 Subject: [PATCH 003/133] Avoid a Notice --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 54f318e5e9..c89dae27cc 100755 --- a/boot.php +++ b/boot.php @@ -1335,7 +1335,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){ array( 'label' => t('Profile'), 'url' => $url.'/?tab=profile', - 'sel' => (($tab=='profile')?'active':''), + 'sel' => ((isset($tab) && $tab=='profile')?'active':''), ), array( 'label' => t('Photos'), From e55d13c2b4425183dde64da8ca27c794f4c04900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Tue, 28 Feb 2012 12:56:16 +0000 Subject: [PATCH 004/133] Avoid a notice --- include/items.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/items.php b/include/items.php index 5452dfbdab..5268dfc1d8 100755 --- a/include/items.php +++ b/include/items.php @@ -742,6 +742,7 @@ function item_store($arr,$force_parent = false) { if($arr['parent-uri'] === $arr['uri']) { $parent_id = 0; + $parent_deleted = 0; $allow_cid = $arr['allow_cid']; $allow_gid = $arr['allow_gid']; $deny_cid = $arr['deny_cid']; From 1204210c69eade767bb19af5a5a18cee4a9db215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Tue, 28 Feb 2012 13:01:58 +0000 Subject: [PATCH 005/133] wasn't actually changed before --- include/conversation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 53369cf20f..6f0dc3687e 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -976,8 +976,8 @@ function conv_sort($arr,$order) { usort($parents,'sort_thr_commented'); if(count($parents)) - foreach($parents as $x) - $x['children'] = array(); + foreach($parents as $i=>$_x) + $parents[$i]['children'] = array(); foreach($arr as $x) { if($x['id'] != $x['parent']) { From f48556cbc08c0600e256f5964a553c666ee66372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Tue, 28 Feb 2012 13:40:41 +0000 Subject: [PATCH 006/133] contact.network is used later to check if a direct link or a redirect by /redir/contactid should be used --- mod/message.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/message.php b/mod/message.php index 4b494e906f..e293d62d9d 100755 --- a/mod/message.php +++ b/mod/message.php @@ -176,7 +176,7 @@ function message_content(&$a) { $a->set_pager_total($r[0]['total']); $r = q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`, - `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` + `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network` FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id` WHERE `mail`.`uid` = %d AND `from-url` $eq '%s' GROUP BY `parent-uri` ORDER BY `created` DESC LIMIT %d , %d ", intval(local_user()), From 36a1a43f06dc2a0d55463c83154cce55fa3948ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Tue, 28 Feb 2012 13:42:12 +0000 Subject: [PATCH 007/133] Avoid notices --- boot.php | 2 +- mod/dfrn_request.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index c89dae27cc..e39504e11c 100755 --- a/boot.php +++ b/boot.php @@ -1209,7 +1209,7 @@ function current_theme(){ $a = get_app(); $system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : ''); - $theme_name = ((is_array($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme); + $theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme); if($theme_name && file_exists('view/theme/' . $theme_name . '/style.css')) return($theme_name); diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index bc159137df..452fec1669 100755 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -43,7 +43,7 @@ function dfrn_request_post(&$a) { return; - if($_POST['cancel']) { + if(x($_POST, 'cancel')) { goaway(z_root()); } From 5bb8ed4b8b5310acc8556ef2fba7b3958284b2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Tue, 28 Feb 2012 21:56:42 +0000 Subject: [PATCH 008/133] Mostly some checks in order to avoid Notices; 1 real bugfix in /mod/network.php --- include/conversation.php | 5 +++-- include/oembed.php | 2 +- include/template_processor.php | 9 +++++++-- mod/network.php | 14 ++++++++------ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 9f564843e9..bd9b11bee6 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -373,7 +373,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { $comments[$item['parent']] = 1; else $comments[$item['parent']] += 1; - } + } elseif(! x($comments,$item['parent'])) + $comments[$item['parent']] = 0; // avoid notices later on } // map all the like/dislike activities for each parent item @@ -921,7 +922,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { $o .= replace_macros($tpl,array( '$return_path' => $a->cmd, '$action' => $a->get_baseurl().'/item', - '$share' => (($x['button']) ? $x['button'] : t('Share')), + '$share' => (x($x,'button') ? $x['button'] : t('Share')), '$upload' => t('Upload photo'), '$shortupload' => t('upload photo'), '$attach' => t('Attach file'), diff --git a/include/oembed.php b/include/oembed.php index 5c3c595f57..52068efc76 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -62,7 +62,7 @@ function oembed_fetch_url($embedurl){ function oembed_format_object($j){ $embedurl = $j->embedurl; - $jhtml = oembed_iframe($j->embedurl,$j->width,$j->height ); + $jhtml = oembed_iframe($j->embedurl,(isset($j->width) ? $j->width : null), (isset($j->height) ? $j->height : null) ); $ret=""; switch ($j->type) { case "video": { diff --git a/include/template_processor.php b/include/template_processor.php index 28c3f07ddd..7a4cba64e9 100755 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -92,8 +92,13 @@ */ private function _replcb_for($args){ $m = array_map('trim', explode(" as ", $args[2])); - list($keyname, $varname) = explode("=>",$m[1]); - if (is_null($varname)) { $varname=$keyname; $keyname=""; } + $x = explode("=>",$m[1]); + if (count($x) == 1) { + $varname = $x[0]; + $keyname = ""; + } else { + list($keyname, $varname) = $x; + } if ($m[0]=="" || $varname=="" || is_null($varname)) die("template error: 'for ".$m[0]." as ".$varname."'") ; //$vals = $this->r[$m[0]]; $vals = $this->_get_var($m[0]); diff --git a/mod/network.php b/mod/network.php index 03a671b615..26265f5a0f 100755 --- a/mod/network.php +++ b/mod/network.php @@ -44,7 +44,7 @@ function network_init(&$a) { } $a->page['aside'] .= group_side('network','network',true,$group_id); - $a->page['aside'] .= networks_widget($a->get_baseurl() . '/network',(($_GET['nets']) ? $_GET['nets'] : '')); + $a->page['aside'] .= networks_widget($a->get_baseurl() . '/network',(x($_GET, 'nets') ? $_GET['nets'] : '')); $a->page['aside'] .= saved_searches($search); } @@ -130,15 +130,15 @@ function network_content(&$a, $update = 0) { $starred_active = 'active'; } - if($_GET['bmark']) { + if(x($_GET,'bmark')) { $bookmarked_active = 'active'; } - if($_GET['conv']) { + if(x($_GET,'conv')) { $conv_active = 'active'; } - if($_GET['spam']) { + if(x($_GET,'spam')) { $spam_active = 'active'; } @@ -245,7 +245,7 @@ function network_content(&$a, $update = 0) { $def_acl = array('allow_cid' => '<' . intval($cid) . '>'); if(! $update) { - if(group) { + if($group) { if(($t = group_public_members($group)) && (! get_pconfig(local_user(),'system','nowarn_insecure'))) { notice( sprintf( tt('Warning: This group contains %s member from an insecure network.', 'Warning: This group contains %s members from an insecure network.', @@ -492,7 +492,9 @@ function network_content(&$a, $update = 0) { $items = conv_sort($items,$ordering); - } + } else { + $items = array(); + } } From 52ea842e872cc004fd012496c828e9fb6186bec9 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 2 Mar 2012 10:33:39 +0100 Subject: [PATCH 009/133] html2bbcode: don't convert sizes and fonts. --- include/html2bbcode.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 65920380b5..442e386911 100755 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -10,7 +10,7 @@ Originally made for the syncom project: http://wiki.piratenpartei.de/Syncom function node2bbcode(&$doc, $oldnode, $attributes, $startbb, $endbb) { do { - $done = node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb); + $done = node2bbcodesub($doc, $oldnode, $attributes, $startbb, $endbb); } while ($done); } @@ -150,10 +150,14 @@ function html2bbcode($message) node2bbcode($doc, 'font', array('size'=>'/(\d+)/'), '[size=$1]', '[/size]'); node2bbcode($doc, 'font', array('color'=>'/(.+)/'), '[color=$1]', '[/color]'); - node2bbcode($doc, 'span', array('style'=>'/.*color:\s*(.+?)[,;].*/'), '[color="$1"]', '[/color]'); - node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)/'), '[size=$1]', '[/size]'); + // Untested + //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*font-family:\s*(.+?)[,;].*color:\s*(.+?)[,;].*/'), '[size=$1][font=$2][color=$3]', '[/color][/font][/size]'); + //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)[,;].*/'), '[size=$1]', '[/size]'); + //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*/'), '[size=$1]', '[/size]'); + node2bbcode($doc, 'span', array('style'=>'/.*color:\s*(.+?)[,;].*/'), '[color="$1"]', '[/color]'); //node2bbcode($doc, 'span', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]'); + //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)pt.*/'), '[font=$1][size=$2]', '[/size][/font]'); //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)px.*/'), '[font=$1][size=$2]', '[/size][/font]'); //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]'); From 02a9fd5dc1d1d9e848e2f406f2e13c4cf0ce228b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Sat, 3 Mar 2012 10:44:34 +0000 Subject: [PATCH 010/133] A 'PHP Fatal error: Call to a member function getElementsByTagName() on a non-object in mod/parse_url.php on line 191' occurred when the linked HTML-File doesn't have a HEAD. The HTML-file couln't be link to in the editor therefore. --- mod/parse_url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/parse_url.php b/mod/parse_url.php index e0b378f685..27dac4d5d3 100755 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -188,7 +188,7 @@ function parse_url_content(&$a) { if(! $text) { logger('parsing meta'); - $items = $domhead->getElementsByTagName('meta'); + $items = (isset($domhead) && is_object($domhead) ? $domhead->getElementsByTagName('meta') : null); if($items) { foreach($items as $item) { $property = $item->getAttribute('property'); From cb1ecf2c5ad649eb372db9eb3bd1da756f207fb6 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 10 Mar 2012 00:15:27 +0100 Subject: [PATCH 011/133] diabook: Moving the location between the icons --- view/theme/diabook/style.css | 3 +++ view/theme/diabook/wall_item.tpl | 3 +-- view/theme/diabook/wallwall_item.tpl | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index bccfea149e..2d4670dca4 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -1113,6 +1113,7 @@ section { } .wall-item-container .wall-item-location { padding-right: 40px; + display: table-cell; } .wall-item-container .wall-item-ago { word-wrap: break-word; @@ -1168,6 +1169,7 @@ section { .wall-item-container .wall-item-actions-social { float: left; margin-bottom: 1px; + display: table-cell; } .wall-item-container .wall-item-actions-social a { margin-right: 1em; @@ -1178,6 +1180,7 @@ section { .wall-item-container .wall-item-actions-tools { float: right; width: 80px; + display: table-cell; } .wall-item-container .wall-item-actions-tools a { float: right; diff --git a/view/theme/diabook/wall_item.tpl b/view/theme/diabook/wall_item.tpl index b1a0149490..8c892fd2a9 100644 --- a/view/theme/diabook/wall_item.tpl +++ b/view/theme/diabook/wall_item.tpl @@ -46,7 +46,6 @@
-
$item.location 
@@ -82,7 +81,7 @@ {{ endif }}
- +
$item.location 
diff --git a/view/theme/diabook/wallwall_item.tpl b/view/theme/diabook/wallwall_item.tpl index 603a908c5a..3b103745bb 100644 --- a/view/theme/diabook/wallwall_item.tpl +++ b/view/theme/diabook/wallwall_item.tpl @@ -52,7 +52,6 @@
-
$item.location 
@@ -88,7 +87,8 @@ {{ endif }}
- +
$item.location 
+
@@ -100,4 +100,4 @@
$item.comment -
\ No newline at end of file +
From 15916a2cb717828367fc7e0bb74137942836a772 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 10 Mar 2012 09:52:20 +0100 Subject: [PATCH 012/133] Mail: Removing signatures, gpg, unnecessary line breaks --- include/email.php | 14 +++ include/msgclean.php | 225 +++++++++++++++++++++++++++++++++++++++++++ include/poller.php | 3 +- 3 files changed, 240 insertions(+), 2 deletions(-) create mode 100644 include/msgclean.php diff --git a/include/email.php b/include/email.php index 659978b6ee..a3449a4249 100755 --- a/include/email.php +++ b/include/email.php @@ -1,5 +1,7 @@ parts) { $ret['body'] = email_get_part($mbox,$uid,$struc,0, 'html'); + $html = $ret['body']; if (trim($ret['body']) == '') $ret['body'] = email_get_part($mbox,$uid,$struc,0, 'plain'); @@ -107,6 +110,17 @@ function email_get_msg($mbox,$uid) { else $ret['body'] = $text; } + + $ret['body'] = removegpg($ret['body']); + $msg = removesig($ret['body']); + $ret['body'] = $msg['body']; + $ret['body'] = convertquote($ret['body'], false); + + if (trim($html) != '') + $ret['body'] = removelinebreak($ret['body']); + + $ret['body'] = unifyattributionline($ret['body']); + return $ret; } diff --git a/include/msgclean.php b/include/msgclean.php new file mode 100644 index 0000000000..284ad1ce4b --- /dev/null +++ b/include/msgclean.php @@ -0,0 +1,225 @@ +\s.*?To: (.*?)\s*?Cc: (.*?)\s*?Sent: (.*?)\s.*?Subject: ([^\n].*)\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/----- Original Message -----\s.*?From: "([^<"].*?)" <(.*?)>\s.*?To: (.*?)\s*?Sent: (.*?)\s.*?Subject: ([^\n].*)\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/-------- Original-Nachricht --------\s*\['.$quote.'\]\nDatum: (.*?)\nVon: (.*?) <(.*?)>\nAn: (.*?)\nBetreff: (.*?)\n/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/-------- Original-Nachricht --------\s*\['.$quote.'\]\sDatum: (.*?)\s.*Von: "([^<"].*?)" <(.*?)>\s.*An: (.*?)\n.*/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/-------- Original-Nachricht --------\s*\['.$quote.'\]\nDatum: (.*?)\nVon: (.*?)\nAn: (.*?)\nBetreff: (.*?)\n/i', "[".$quote."='$2']\n", $message); + + $message = savereplace('/-----Urspr.*?ngliche Nachricht-----\sVon: "([^<"].*?)" <(.*?)>\s.*Gesendet: (.*?)\s.*An: (.*?)\s.*Betreff: ([^\n].*?).*:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/-----Urspr.*?ngliche Nachricht-----\sVon: "([^<"].*?)" <(.*?)>\s.*Gesendet: (.*?)\s.*An: (.*?)\s.*Betreff: ([^\n].*?)\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/Am (.*?), schrieb (.*?):\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + + $message = savereplace('/Am .*?, \d+ .*? \d+ \d+:\d+:\d+ \+\d+\sschrieb\s(.*?)\s<(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/Am (.*?) schrieb (.*?) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/Am (.*?) schrieb <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/Am (.*?) schrieb (.*?):\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/Am (.*?) schrieb (.*?)\n(.*?):\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + + $message = savereplace('/(\d+)\/(\d+)\/(\d+) ([^<"].*?) <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + + $message = savereplace('/On .*?, \d+ .*? \d+ \d+:\d+:\d+ \+\d+\s(.*?)\s<(.*?)>\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/On (.*?) at (.*?), (.*?)\s<(.*?)>\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$3']\n", $message); + $message = savereplace('/On (.*?)\n([^<].*?)\s<(.*?)>\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/On (.*?), (.*?), (.*?)\s<(.*?)>\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$3']\n", $message); + $message = savereplace('/On ([^,].*?), (.*?)\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/On (.*?), (.*?)\swrote\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + + // Der loescht manchmal den Body - was eigentlich unmoeglich ist + $message = savereplace('/On (.*?),(.*?),(.*?),(.*?), (.*?) wrote:\s*\['.$quote.'\]/i', "[".$quote."='$5']\n", $message); + + $message = savereplace('/Zitat von ([^<].*?) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/Quoting ([^<].*?) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/From: "([^<"].*?)" <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/From: <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/Du \(([^)].*?)\) schreibst:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/--- (.*?) <.*?> schrieb am (.*?):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/--- (.*?) schrieb am (.*?):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/\* (.*?) <(.*?)> hat geschrieben:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/(.*?) <(.*?)> schrieb (.*?)\):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) <(.*?)> schrieb am (.*?) um (.*):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) schrieb am (.*?) um (.*):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) \((.*?)\) schrieb:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/(.*?) schrieb:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/(.*?) <(.*?)> writes:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) \((.*?)\) writes:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/(.*?) writes:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/\* (.*?) wrote:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) wrote \(.*?\):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) wrote:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/([^<].*?) <.*?> hat am (.*?)\sum\s(.*)\sgeschrieben:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/(\d+)\/(\d+)\/(\d+) ([^<"].*?) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + $message = savereplace('/(\d+)\/(\d+)\/(\d+) (.*?) <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + $message = savereplace('/(\d+)\/(\d+)\/(\d+) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + $message = savereplace('/(\d+)\/(\d+)\/(\d+) <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + + $message = savereplace('/(.*?) <(.*?)> schrubselte:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) \((.*?)\) schrubselte:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + + } + return($message); +} + +function removegpg($message) +{ + + $pattern = '/(.*)\s*-----BEGIN PGP SIGNED MESSAGE-----\s*[\r\n].*Hash:.*?[\r\n](.*)'. + '[\r\n]\s*-----BEGIN PGP SIGNATURE-----\s*[\r\n].*'. + '[\r\n]\s*-----END PGP SIGNATURE-----(.*)/is'; + + preg_match($pattern, $message, $result); + + $cleaned = trim($result[1].$result[2].$result[3]); + + $cleaned = str_replace(array("\n- --\n", "\n- -"), array("\n-- \n", "\n-"), $cleaned); + + + if ($cleaned == '') + $cleaned = $message; + + return($cleaned); +} + +function removesig($message) +{ + $sigpos = strrpos($message, "\n-- \n"); + $quotepos = strrpos($message, "[/quote]"); + + if ($sigpos == 0) { + // Speziell fuer web.de, die das als Trenner verwenden + $message = str_replace("\n___________________________________________________________\n", "\n-- \n", $message); + $sigpos = strrpos($message, "\n-- \n"); + $quotepos = strrpos($message, "[/quote]"); + } + + // Sollte sich der Signaturtrenner innerhalb eines Quotes befinden + // wird keine Signaturtrennung ausgefuehrt + if (($sigpos < $quotepos) and ($sigpos != 0)) + return(array('body' => $message, 'sig' => '')); + + // To-Do: Regexp umstellen, so dass auf 1 oder kein Leerzeichen + // geprueft wird + //$message = str_replace("\n--\n", "\n-- \n", $message); + + $pattern = '/(.*)[\r\n]-- [\r\n](.*)/is'; + + preg_match($pattern, $message, $result); + + if (($result[1] != '') and ($result[2] != '')) { + $cleaned = trim($result[1])."\n"; + $sig = trim($result[2]); + // '[hr][size=x-small][color=darkblue]'.trim($result[2]).'[/color][/size]'; + } else { + $cleaned = $message; + $sig = ''; + } + + return(array('body' => $cleaned, 'sig' => $sig)); +} + +function removelinebreak($message) +{ + $arrbody = explode("\n", trim($message)); + + $lines = array(); + $lineno = 0; + + foreach($arrbody as $i => $line) { + $currquotelevel = 0; + $currline = $line; + while ((strlen($currline)>0) and ((substr($currline, 0, 1) == '>') + or (substr($currline, 0, 1) == ' '))) { + if (substr($currline, 0, 1) == '>') + $currquotelevel++; + + $currline = ltrim(substr($currline, 1)); + } + + $quotelevel = 0; + $nextline = trim($arrbody[$i+1]); + while ((strlen($nextline)>0) and ((substr($nextline, 0, 1) == '>') + or (substr($nextline, 0, 1) == ' '))) { + if (substr($nextline, 0, 1) == '>') + $quotelevel++; + + $nextline = ltrim(substr($nextline, 1)); + } + + $len = strlen($line); + $firstword = strpos($nextline.' ', ' '); + + $specialchars = ((substr(trim($nextline), 0, 1) == '-') or + (substr(trim($nextline), 0, 1) == '=') or + (substr(trim($nextline), 0, 1) == '*') or + (substr(trim($nextline), 0, 1) == '·') or + (substr(trim($nextline), 0, 4) == '[url') or + (substr(trim($nextline), 0, 5) == '[size') or + (substr(trim($nextline), 0, 7) == 'http://') or + (substr(trim($nextline), 0, 8) == 'https://')); + + if (!$specialchars) + $specialchars = ((substr(rtrim($line), -1) == '-') or + (substr(rtrim($line), -1) == '=') or + (substr(rtrim($line), -1) == '*') or + (substr(rtrim($line), -1) == '·') or + (substr(rtrim($line), -6) == '[/url]') or + (substr(rtrim($line), -7) == '[/size]')); + + //if ($specialchars) + // echo ("Special\n"); + + if ($lines[$lineno] != '') { + if (substr($lines[$lineno], -1) != ' ') + $lines[$lineno] .= ' '; + + while ((strlen($line)>0) and ((substr($line, 0, 1) == '>') + or (substr($line, 0, 1) == ' '))) { + + $line = ltrim(substr($line, 1)); + } + + } + //else + // $lines[$lineno] = $quotelevel.'-'.$len.'-'.$firstword.'-'; + + $lines[$lineno] .= $line; + //if ((($len + $firstword < 68) and (substr($line, -1, 1) != ' ')) + // or ($quotelevel != $currquotelevel) or $specialchars) + if (((substr($line, -1, 1) != ' ')) + or ($quotelevel != $currquotelevel)) + $lineno++; + } + return(implode("\n", $lines)); + +} +?> diff --git a/include/poller.php b/include/poller.php index cfbc46b87e..3be6caebd7 100755 --- a/include/poller.php +++ b/include/poller.php @@ -1,7 +1,6 @@ Date: Sat, 10 Mar 2012 11:29:40 +0100 Subject: [PATCH 013/133] New config options if ostatus polling should use the priority in the contacts --- include/poller.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/poller.php b/include/poller.php index 3be6caebd7..f165ad5905 100755 --- a/include/poller.php +++ b/include/poller.php @@ -140,7 +140,10 @@ function poller_run($argv, $argc){ if($manual_id) $contact['last-update'] = '0000-00-00 00:00:00'; - if($contact['network'] === NETWORK_DFRN || $contact['network'] === NETWORK_OSTATUS) + if($contact['network'] === NETWORK_DFRN) + $contact['priority'] = 2; + + if(!get_config('system','ostatus_use_priority') and ($contact['network'] === NETWORK_OSTATUS)) $contact['priority'] = 2; if($contact['priority'] || $contact['subhub']) { From 74b3e9f273b019729d213f3ccaeba1bb11d61d24 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 10 Mar 2012 15:50:35 +0100 Subject: [PATCH 014/133] Enabled Caching for items. Changed color of tags in diabook. --- include/text.php | 17 ++++++++++++++++- view/theme/diabook/style.css | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/include/text.php b/include/text.php index 5ad0154d7a..38736d8364 100644 --- a/include/text.php +++ b/include/text.php @@ -874,6 +874,14 @@ function link_compare($a,$b) { if(! function_exists('prepare_body')) { function prepare_body($item,$attach = false) { + $cache = get_config('system','itemcache'); + + if (($cache != '')) { + $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".$attach; + if (file_exists($cachefile)) + return(file_get_contents($cachefile)); + } + call_hooks('prepare_body_init', $item); $s = prepare_text($item['body']); @@ -882,8 +890,11 @@ function prepare_body($item,$attach = false) { call_hooks('prepare_body', $prep_arr); $s = $prep_arr['html']; - if(! $attach) + if(! $attach) { + if ($cache != '') + file_put_contents($cachefile, $s); return $s; + } $arr = explode(',',$item['attach']); if(count($arr)) { @@ -917,6 +928,10 @@ function prepare_body($item,$attach = false) { $prep_arr = array('item' => $item, 'html' => $s); call_hooks('prepare_body_final', $prep_arr); + + if ($cache != '') + file_put_contents($cachefile, $prep_arr['html']); + return $prep_arr['html']; }} diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 2d4670dca4..0504ce96a9 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -1277,14 +1277,14 @@ section { } .tag { /*background: url("../../../images/tag_b.png") repeat-x center left;*/ - color: #3465A4; + color: #999; padding-left: 3px; font-size: 12px; } .tag a { padding-right: 5px; /*background: url("../../../images/tag.png") no-repeat center right;*/ - color: #3465A4; + color: #999; } .wwto { position: absolute !important; From 670b571c8ac0532cc80fff6351f91b1b0fa58e0c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 10 Mar 2012 18:19:00 +0100 Subject: [PATCH 015/133] Caching improved. --- include/text.php | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/include/text.php b/include/text.php index 38736d8364..5bf815105b 100644 --- a/include/text.php +++ b/include/text.php @@ -874,25 +874,27 @@ function link_compare($a,$b) { if(! function_exists('prepare_body')) { function prepare_body($item,$attach = false) { + call_hooks('prepare_body_init', $item); + $cache = get_config('system','itemcache'); if (($cache != '')) { - $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".$attach; + $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".$attach."-".hash("crc32", $item['body']); + if (file_exists($cachefile)) - return(file_get_contents($cachefile)); - } - - call_hooks('prepare_body_init', $item); - - $s = prepare_text($item['body']); + $s = file_get_contents($cachefile); + else { + $s = prepare_text($item['body']); + file_put_contents($cachefile, $s); + } + } else + $s = prepare_text($item['body']); $prep_arr = array('item' => $item, 'html' => $s); call_hooks('prepare_body', $prep_arr); $s = $prep_arr['html']; if(! $attach) { - if ($cache != '') - file_put_contents($cachefile, $s); return $s; } @@ -925,13 +927,9 @@ function prepare_body($item,$attach = false) { $s .= '
'; } - $prep_arr = array('item' => $item, 'html' => $s); call_hooks('prepare_body_final', $prep_arr); - if ($cache != '') - file_put_contents($cachefile, $prep_arr['html']); - return $prep_arr['html']; }} From eb3b211461906c405c7d016401cb3cd6d7d03b83 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 14:22:19 +0100 Subject: [PATCH 016/133] New plugin that shows community pages in the sidebar --- addon/pages/README | 3 +++ addon/pages/pages.php | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100755 addon/pages/README create mode 100755 addon/pages/pages.php diff --git a/addon/pages/README b/addon/pages/README new file mode 100755 index 0000000000..6ec314b702 --- /dev/null +++ b/addon/pages/README @@ -0,0 +1,3 @@ +Pages + +Shows lists of community pages diff --git a/addon/pages/pages.php b/addon/pages/pages.php new file mode 100755 index 0000000000..13e6c4b593 --- /dev/null +++ b/addon/pages/pages.php @@ -0,0 +1,39 @@ + + * + */ + +function pages_install() { + register_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); +} + +function pages_uninstall() { + unregister_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); +} + +function pages_page_end($a,&$b) { + if (($a->module != "network") OR ($a->user['uid'] == 0)) + return; + + $pages = '

'.t("Community").'

    '; + $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`Name` FROM `contact`, `user` + WHERE `network`= 'dfrn' AND `duplex` + AND `contact`.`nick`=`user`.`nickname` + AND `user`.`page-flags`= %d + AND `contact`.`uid` = %d", + intval(PAGE_COMMUNITY), + intval($a->user['uid'])); + foreach($contacts as $contact) { + $pages .= '
  • '.$contact["Name"]."
  • "; + } + $pages .= "
"; + if (sizeof($contacts) > 0) + $a->page['aside'] = $pages.$a->page['aside']; + +} + +?> From b879a1ddf1575a3bd355edcee634be4a8d179c25 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 17:45:12 +0100 Subject: [PATCH 017/133] Pages: Show every community page - even from foreign servers (with caching) --- addon/pages/pages.php | 70 +++++++++++++++++++++++++++++------- view/theme/diabook/style.css | 3 ++ 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/addon/pages/pages.php b/addon/pages/pages.php index 13e6c4b593..6b242be316 100755 --- a/addon/pages/pages.php +++ b/addon/pages/pages.php @@ -15,25 +15,71 @@ function pages_uninstall() { unregister_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); } +function pages_iscommunity($url, &$pagelist) { + // check every week for the status - should be enough + if ($pagelist[$url]["checked"]') != 0); + + $pagelist[$url] = array("community" => $iscommunity, "checked" => time()); + } else // Fetch from cache + $iscommunity = $pagelist[$url]["community"]; + return($iscommunity); +} + +function pages_getpages($uid) { + + // Fetch cached pagelist from configuration + $pagelist = get_pconfig($uid,'pages','pagelist'); + + if (sizeof($pagelist) == 0) + $pagelist = array(); + + $contacts = q("SELECT `id`, `url`, `Name` FROM `contact` + WHERE `network`= 'dfrn' AND `uid` = %d", + intval($uid)); + + $pages = array(); + + // Look if the profile is a community page + foreach($contacts as $contact) { + if (pages_iscommunity($contact["url"], $pagelist)) + $pages[] = array("url"=>$contact["url"], "Name"=>$contact["Name"]); + } + + // Write back cached pagelist + set_pconfig($uid,'pages','pagelist', $pagelist); + return($pages); +} + function pages_page_end($a,&$b) { + // Only move on if if it's the "network" module and there is a logged on user if (($a->module != "network") OR ($a->user['uid'] == 0)) return; - $pages = '

'.t("Community").'

    '; - $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`Name` FROM `contact`, `user` - WHERE `network`= 'dfrn' AND `duplex` - AND `contact`.`nick`=`user`.`nickname` - AND `user`.`page-flags`= %d - AND `contact`.`uid` = %d", - intval(PAGE_COMMUNITY), - intval($a->user['uid'])); + $pages = '
    +
    +

    '.t("Community").'

    +
"; if (sizeof($contacts) > 0) $a->page['aside'] = $pages.$a->page['aside']; - } - ?> diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 0504ce96a9..ce33076451 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -484,6 +484,9 @@ code { #sidebar-group-list .tool:hover { background: #EEE; } +#sidebar-pages-list .tool:hover { + background: #EEE; +} .tool .label { float: left; } From 9f76d96d46356b18325ca49c383f94a1958fefd3 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 19:11:25 +0100 Subject: [PATCH 018/133] Cache: item cache now has an autodelete of old files. The pages plugin now sets a link via redirection. So posting works. --- addon/pages/pages.php | 5 +++-- include/poller.php | 13 +++++++++++++ include/text.php | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/addon/pages/pages.php b/addon/pages/pages.php index 6b242be316..9e90cc24dd 100755 --- a/addon/pages/pages.php +++ b/addon/pages/pages.php @@ -55,7 +55,7 @@ function pages_getpages($uid) { // Look if the profile is a community page foreach($contacts as $contact) { if (pages_iscommunity($contact["url"], $pagelist)) - $pages[] = array("url"=>$contact["url"], "Name"=>$contact["Name"]); + $pages[] = array("url"=>$contact["url"], "Name"=>$contact["Name"], "id"=>$contact["id"]); } // Write back cached pagelist @@ -76,7 +76,8 @@ function pages_page_end($a,&$b) { $contacts = pages_getpages($a->user['uid']); foreach($contacts as $contact) { - $pages .= '
  • '.$contact["Name"]."
  • "; + $pages .= '
  • '. + $contact["Name"]."
  • "; } $pages .= ""; if (sizeof($contacts) > 0) diff --git a/include/poller.php b/include/poller.php index f165ad5905..65fafda4c8 100755 --- a/include/poller.php +++ b/include/poller.php @@ -69,6 +69,19 @@ function poller_run($argv, $argc){ // clear old cache Cache::clear(); + // clear item cache files if they are older than one day + $cache = get_config('system','itemcache'); + if (($cache != '') and is_dir($cache)) { + if ($dh = opendir($cache)) { + while (($file = readdir($dh)) !== false) { + $fullpath = $cache."/".$file; + if ((filetype($fullpath) == "file") and filectime($fullpath) < (time() - 1800)) + unlink($fullpath); + } + closedir($dh); + } + } + $manual_id = 0; $generation = 0; $hub_update = false; diff --git a/include/text.php b/include/text.php index 5bf815105b..08c5a54246 100644 --- a/include/text.php +++ b/include/text.php @@ -879,7 +879,7 @@ function prepare_body($item,$attach = false) { $cache = get_config('system','itemcache'); if (($cache != '')) { - $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".$attach."-".hash("crc32", $item['body']); + $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".hash("crc32", $item['body']); if (file_exists($cachefile)) $s = file_get_contents($cachefile); From 739309abd0cb103fe5a4d5081a7252b5698ab787 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 19:41:29 +0100 Subject: [PATCH 019/133] Corrected some git problems --- addon/pages/README | 3 -- addon/pages/pages.php | 86 ------------------------------------------- 2 files changed, 89 deletions(-) delete mode 100755 addon/pages/README delete mode 100755 addon/pages/pages.php diff --git a/addon/pages/README b/addon/pages/README deleted file mode 100755 index 6ec314b702..0000000000 --- a/addon/pages/README +++ /dev/null @@ -1,3 +0,0 @@ -Pages - -Shows lists of community pages diff --git a/addon/pages/pages.php b/addon/pages/pages.php deleted file mode 100755 index 9e90cc24dd..0000000000 --- a/addon/pages/pages.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - */ - -function pages_install() { - register_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); -} - -function pages_uninstall() { - unregister_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); -} - -function pages_iscommunity($url, &$pagelist) { - // check every week for the status - should be enough - if ($pagelist[$url]["checked"]') != 0); - - $pagelist[$url] = array("community" => $iscommunity, "checked" => time()); - } else // Fetch from cache - $iscommunity = $pagelist[$url]["community"]; - return($iscommunity); -} - -function pages_getpages($uid) { - - // Fetch cached pagelist from configuration - $pagelist = get_pconfig($uid,'pages','pagelist'); - - if (sizeof($pagelist) == 0) - $pagelist = array(); - - $contacts = q("SELECT `id`, `url`, `Name` FROM `contact` - WHERE `network`= 'dfrn' AND `uid` = %d", - intval($uid)); - - $pages = array(); - - // Look if the profile is a community page - foreach($contacts as $contact) { - if (pages_iscommunity($contact["url"], $pagelist)) - $pages[] = array("url"=>$contact["url"], "Name"=>$contact["Name"], "id"=>$contact["id"]); - } - - // Write back cached pagelist - set_pconfig($uid,'pages','pagelist', $pagelist); - return($pages); -} - -function pages_page_end($a,&$b) { - // Only move on if if it's the "network" module and there is a logged on user - if (($a->module != "network") OR ($a->user['uid'] == 0)) - return; - - $pages = '
    -
    -

    '.t("Community").'

    -
    "; - if (sizeof($contacts) > 0) - $a->page['aside'] = $pages.$a->page['aside']; -} -?> From 9ca5de8c281fa0a7b2323f33765bca25b64bc29d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 19:45:28 +0100 Subject: [PATCH 020/133] Item cache now is one day. --- include/poller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/poller.php b/include/poller.php index 65fafda4c8..3bc98e36ff 100755 --- a/include/poller.php +++ b/include/poller.php @@ -75,7 +75,7 @@ function poller_run($argv, $argc){ if ($dh = opendir($cache)) { while (($file = readdir($dh)) !== false) { $fullpath = $cache."/".$file; - if ((filetype($fullpath) == "file") and filectime($fullpath) < (time() - 1800)) + if ((filetype($fullpath) == "file") and filectime($fullpath) < (time() - 86400)) unlink($fullpath); } closedir($dh); From ebdf4842184cc8d0576abe99b29650c6b6512167 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 19:50:51 +0100 Subject: [PATCH 021/133] Added config options for the item cache and the ostatus priority --- htconfig.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htconfig.php b/htconfig.php index f52aed2b10..9d9c8a2c79 100755 --- a/htconfig.php +++ b/htconfig.php @@ -79,3 +79,9 @@ $a->config['system']['theme'] = 'duepuntozero'; // By default allow pseudonyms $a->config['system']['no_regfullname'] = true; + +// If set to true the priority settings of ostatus contacts are used +$a->config['system']['ostatus_use_priority'] = false; + +// If enabled all items are cached in the given directory +$a->config['system']['itemcache'] = ""; From 7235d5466a4f54cd80d1b661b142ec99230afbf2 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 20:24:55 +0100 Subject: [PATCH 022/133] Removed changes --- view/theme/diabook/wall_item.tpl | 14 +++++--------- view/theme/diabook/wallwall_item.tpl | 16 ++++++---------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/view/theme/diabook/wall_item.tpl b/view/theme/diabook/wall_item.tpl index 6cbab0a715..321bbbe9ea 100644 --- a/view/theme/diabook/wall_item.tpl +++ b/view/theme/diabook/wall_item.tpl @@ -13,7 +13,8 @@ $item.name - menu + menu @@ -21,7 +22,8 @@
    - $item.name + $item.name - {{ if $item.plink }}$item.ago{{ else }} $item.ago {{ endif }} {{ if $item.lock }} - $item.lock {{ endif }} @@ -46,10 +48,7 @@
    -<<<<<<< HEAD:view/theme/diabook/wall_item.tpl -======= ->>>>>>> upstream/master:view/theme/diabook/wall_item.tpl
    @@ -85,11 +84,7 @@ {{ endif }}
    -<<<<<<< HEAD:view/theme/diabook/wall_item.tpl -
    $item.location 
    -=======
    $item.location 
    ->>>>>>> upstream/master:view/theme/diabook/wall_item.tpl
    @@ -102,3 +97,4 @@
    $item.comment
    + diff --git a/view/theme/diabook/wallwall_item.tpl b/view/theme/diabook/wallwall_item.tpl index 4f0a2e25fd..05ed4cc82c 100644 --- a/view/theme/diabook/wallwall_item.tpl +++ b/view/theme/diabook/wallwall_item.tpl @@ -18,7 +18,8 @@ $item.name - menu + menu @@ -26,8 +27,10 @@
    - $item.name - $item.to $item.owner_name + $item.name + $item.to $item.owner_name $item.vwall -   {{ if $item.plink }}$item.ago{{ else }} $item.ago {{ endif }} {{ if $item.lock }} - $item.lock {{ endif }} @@ -52,10 +55,7 @@
    -<<<<<<< HEAD:view/theme/diabook/wallwall_item.tpl -======= ->>>>>>> upstream/master:view/theme/diabook/wallwall_item.tpl
    @@ -92,10 +92,6 @@ {{ endif }}
    $item.location 
    -<<<<<<< HEAD:view/theme/diabook/wallwall_item.tpl - -======= ->>>>>>> upstream/master:view/theme/diabook/wallwall_item.tpl
    From 905ba5ba1d5d8e2d0caa5c0208357672ee527b7d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 22:39:40 +0100 Subject: [PATCH 023/133] Missing field in database.sql --- database.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/database.sql b/database.sql index 35c257f021..2add8bd856 100755 --- a/database.sql +++ b/database.sql @@ -636,6 +636,7 @@ CREATE TABLE IF NOT EXISTS `mailacct` ( `mailbox` CHAR( 255 ) NOT NULL, `user` CHAR( 255 ) NOT NULL , `pass` TEXT NOT NULL , +`reply_to` CHAR( 255 ) NOT NULL , `action` INT NOT NULL , `movetofolder` CHAR(255) NOT NULL , `pubmail` TINYINT(1) NOT NULL DEFAULT '0', From 2ed6b3531eb1a9b778dfd87614fd824480a135e2 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 23:29:59 +0100 Subject: [PATCH 024/133] Removing test exports --- include/delivery.php | 4 ++-- include/notifier.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index c1ff07bd54..41869988dc 100755 --- a/include/delivery.php +++ b/include/delivery.php @@ -435,8 +435,8 @@ function delivery_run($argv, $argc){ $headers .= 'Reply-to: ' . $reply_to . "\n"; // for testing purposes: Collect exported mails - $file = tempnam("/tmp/friendica/", "mail-out-"); - file_put_contents($file, json_encode($it)); + // $file = tempnam("/tmp/friendica/", "mail-out-"); + // file_put_contents($file, json_encode($it)); $headers .= 'Message-Id: <' . iri2msgid($it['uri']). '>' . "\n"; diff --git a/include/notifier.php b/include/notifier.php index 5b23406fce..c0a98c8eb3 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -648,8 +648,8 @@ function notifier_run($argv, $argc){ $headers .= 'Reply-to: ' . $reply_to . "\n"; // for testing purposes: Collect exported mails - $file = tempnam("/tmp/friendica/", "mail-out2-"); - file_put_contents($file, json_encode($it)); + //$file = tempnam("/tmp/friendica/", "mail-out2-"); + //file_put_contents($file, json_encode($it)); $headers .= 'Message-Id: <' . iri2msgid($it['uri']) . '>' . "\n"; From 6e7a190e9197bcf4d00accc5d85ccca4a080bec8 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 12 Mar 2012 00:22:12 +0100 Subject: [PATCH 025/133] Mail: Subject are now with working "Re:" --- include/delivery.php | 28 +++++++--------------------- include/notifier.php | 31 ++++++++----------------------- 2 files changed, 15 insertions(+), 44 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index 41869988dc..44a482ca28 100755 --- a/include/delivery.php +++ b/include/delivery.php @@ -446,30 +446,16 @@ function delivery_run($argv, $argc){ if($it['uri'] !== $it['parent-uri']) { $headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n"; - if(! strlen($it['title'])) { + if(!strlen($it['title'])) { $r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' LIMIT 1", - dbesc($it['parent-uri']) - ); - if(count($r)) { - $subtitle = $r[0]['title']; - if($subtitle) { - if(strncasecmp($subtitle,'RE:',3)) - $subject = $subtitle; - else - $subject = 'Re: ' . $subtitle; - } - } + dbesc($it['parent-uri'])); + + if(count($r) AND ($r[0]['title'] != '')) + $subject = $r[0]['title']; } + if(strncasecmp($subject,'RE:',3)) + $subject = 'Re: '.$subject; } - /*$headers .= 'MIME-Version: 1.0' . "\n"; - //$headers .= 'Content-Type: text/html; charset=UTF-8' . "\n"; - $headers .= 'Content-Type: text/plain; charset=UTF-8' . "\n"; - $headers .= 'Content-Transfer-Encoding: 8bit' . "\n\n"; - $html = prepare_body($it); - //$message = '' . $html . ''; - $message = html2plain($html); - logger('notifier: email delivery to ' . $addr); - mail($addr, $subject, $message, $headers);*/ email_send($addr, $subject, $headers, $it); } break; diff --git a/include/notifier.php b/include/notifier.php index c0a98c8eb3..07edc70465 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -655,31 +655,16 @@ function notifier_run($argv, $argc){ if($it['uri'] !== $it['parent-uri']) { $headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n"; - if(! strlen($it['title'])) { + if(!strlen($it['title'])) { $r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' LIMIT 1", - dbesc($it['parent-uri']) - ); - if(count($r)) { - $subtitle = $r[0]['title']; - if($subtitle) { - if(strncasecmp($subtitle,'RE:',3)) - $subject = $subtitle; - else - $subject = 'Re: ' . $subtitle; - } - } - } - } + dbesc($it['parent-uri'])); - /*$headers .= 'MIME-Version: 1.0' . "\n"; - //$headers .= 'Content-Type: text/html; charset=UTF-8' . "\n"; - $headers .= 'Content-Type: text/plain; charset=UTF-8' . "\n"; - $headers .= 'Content-Transfer-Encoding: 8bit' . "\n\n"; - $html = prepare_body($it); - //$message = '' . $html . ''; - $message = html2plain($html); - logger('notifier: email delivery to ' . $addr); - mail($addr, $subject, $message, $headers);*/ + if(count($r) AND ($r[0]['title'] != '')) + $subject = $r[0]['title']; + } + if(strncasecmp($subject,'RE:',3)) + $subject = 'Re: '.$subject; + } email_send($addr, $subject, $headers, $it); } break; From c30342e2f7bde6fda899193f97ce3051cd8b2fdd Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 12 Mar 2012 15:58:59 +0100 Subject: [PATCH 026/133] add 'loggin_out' hook --- include/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/auth.php b/include/auth.php index fc52684e64..f2975c4c6c 100755 --- a/include/auth.php +++ b/include/auth.php @@ -24,7 +24,7 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p if(((x($_POST,'auth-params')) && ($_POST['auth-params'] === 'logout')) || ($a->module === 'logout')) { // process logout request - + call_hooks("logging_out"); nuke_session(); info( t('Logged out.') . EOL); goaway(z_root()); From 59766b944c9ea3a45b1d7e8593f7bb5d4a0b8445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Mon, 12 Mar 2012 20:17:37 +0000 Subject: [PATCH 027/133] Some security against XSRF-attacks --- include/security.php | 46 +++++++++++++++++++++++++ mod/profile_photo.php | 18 ++++++---- mod/profiles.php | 26 ++++++++++++--- mod/settings.php | 59 +++++++++++++++++++++------------ view/cropbody.tpl | 1 + view/profile_edit.tpl | 5 +-- view/profile_listing_header.tpl | 2 +- view/profile_photo.tpl | 1 + view/settings.tpl | 2 +- view/settings_addons.tpl | 1 + view/settings_connectors.tpl | 1 + view/settings_oauth.tpl | 5 +-- view/settings_oauth_edit.tpl | 2 ++ 13 files changed, 131 insertions(+), 38 deletions(-) diff --git a/include/security.php b/include/security.php index 8c536b656a..6ea515bffe 100755 --- a/include/security.php +++ b/include/security.php @@ -288,3 +288,49 @@ function item_permissions_sql($owner_id,$remote_verified = false,$groups = null) } +/* + * Functions used to protect against Cross-Site Request Forgery + * The security token has to base on at least one value that an attacker can't know - here it's the session ID and the private key. + * In this implementation, a security token is reusable (if the user submits a form, goes back and resubmits the form, maybe with small changes; + * or if the security token is used for ajax-calls that happen several times), but only valid for a certain amout of time (3hours). + * The "typename" seperates the security tokens of different types of forms. This could be relevant in the following case: + * A security token is used to protekt a link from CSRF (e.g. the "delete this profile"-link). + * If the new page contains by any chance external elements, then the used security token is exposed by the referrer. + * Actually, important actions should not be triggered by Links / GET-Requests at all, but somethimes they still are, + * so this mechanism brings in some damage control (the attacker would be able to forge a request to a form of this type, but not to forms of other types). + */ +function get_form_security_token($typename = "") { + $a = get_app(); + + $timestamp = time(); + $sec_hash = hash('whirlpool', $a->user["guid"] . $a->user["prvkey"] . session_id() . $timestamp . $typename); + + return $timestamp . "." . $sec_hash; +} + +function check_form_security_token($typename = "", $formname = 'form_security_token') { + if (!x($_REQUEST, $formname)) return false; + $hash = $_REQUEST[$formname]; + + $max_livetime = 10800; // 3 hours + + $a = get_app(); + + $x = explode(".", $hash); + if (time() > (IntVal($x[0]) + $max_livetime)) return false; + + $sec_hash = hash('whirlpool', $a->user["guid"] . $a->user["prvkey"] . session_id() . $x[0] . $typename); + + return ($sec_hash == $x[1]); +} + +function check_form_security_std_err_msg() { + return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before subitting it.') . EOL; +} +function check_form_security_token_redirectOnErr($err_redirect, $typename = "", $formname = 'form_security_token') { + if (!check_form_security_token($typename, $formname)) { + $a = get_app(); + notice( check_form_security_std_err_msg() ); + goaway($a->get_baseurl() . $err_redirect ); + } +} diff --git a/mod/profile_photo.php b/mod/profile_photo.php index e3dbdaf39c..d1fd08eba6 100755 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -15,11 +15,13 @@ function profile_photo_init(&$a) { function profile_photo_post(&$a) { - if(! local_user()) { - notice ( t('Permission denied.') . EOL ); - return; - } - + if(! local_user()) { + notice ( t('Permission denied.') . EOL ); + return; + } + + check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo'); + if((x($_POST,'cropfinal')) && ($_POST['cropfinal'] == 1)) { // phase 2 - we have finished cropping @@ -148,7 +150,9 @@ function profile_photo_content(&$a) { notice( t('Permission denied.') . EOL ); return; }; - + + check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo'); + $resource_id = $a->argv[2]; //die(":".local_user()); $r=q("SELECT * FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s' ORDER BY `scale` ASC", @@ -203,6 +207,7 @@ function profile_photo_content(&$a) { '$lbl_upfile' => t('Upload File:'), '$title' => t('Upload Profile Photo'), '$submit' => t('Upload'), + '$form_security_token' => get_form_security_token("profile_photo"), '$select' => sprintf('%s %s', t('or'), ($newuser) ? '' . t('skip this step') . '' : '' . t('select a photo from your photo albums') . '') )); @@ -218,6 +223,7 @@ function profile_photo_content(&$a) { '$image_url' => $a->get_baseurl() . '/photo/' . $filename, '$title' => t('Crop Image'), '$desc' => t('Please adjust the image cropping for optimum viewing.'), + '$form_security_token' => get_form_security_token("profile_photo"), '$done' => t('Done Editing') )); return $o; diff --git a/mod/profiles.php b/mod/profiles.php index ccd7d54741..b307a2d43b 100755 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -21,6 +21,9 @@ function profiles_post(&$a) { notice( t('Profile not found.') . EOL); return; } + + check_form_security_token_redirectOnErr('/profiles', 'profile_edit'); + $is_default = (($orig[0]['is-default']) ? 1 : 0); $profile_name = notags(trim($_POST['profile_name'])); @@ -240,6 +243,8 @@ function profiles_content(&$a) { goaway($a->get_baseurl() . '/profiles'); return; // NOTREACHED } + + check_form_security_token_redirectOnErr('/profiles', 'profile_drop', 't'); // move every contact using this profile as their default to the user default @@ -264,6 +269,8 @@ function profiles_content(&$a) { if(($a->argc > 1) && ($a->argv[1] === 'new')) { + + check_form_security_token_redirectOnErr('/profiles', 'profile_new', 't'); $r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d", intval(local_user())); @@ -291,10 +298,13 @@ function profiles_content(&$a) { info( t('New profile created.') . EOL); if(count($r3) == 1) goaway($a->get_baseurl() . '/profiles/' . $r3[0]['id']); + goaway($a->get_baseurl() . '/profiles'); - } + } if(($a->argc > 2) && ($a->argv[1] === 'clone')) { + + check_form_security_token_redirectOnErr('/profiles', 'profile_clone', 't'); $r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d", intval(local_user())); @@ -330,9 +340,11 @@ function profiles_content(&$a) { info( t('New profile created.') . EOL); if(count($r3) == 1) goaway($a->get_baseurl() . '/profiles/' . $r3[0]['id']); - goaway($a->get_baseurl() . '/profiles'); - return; // NOTREACHED - } + + goaway($a->get_baseurl() . '/profiles'); + + return; // NOTREACHED + } if(($a->argc > 1) && (intval($a->argv[1]))) { @@ -371,6 +383,9 @@ function profiles_content(&$a) { $is_default = (($r[0]['is-default']) ? 1 : 0); $tpl = get_markup_template("profile_edit.tpl"); $o .= replace_macros($tpl,array( + '$form_security_token' => get_form_security_token("profile_edit"), + '$profile_clone_link' => 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone"), + '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"), '$banner' => t('Edit Profile Details'), '$submit' => t('Submit'), '$viewprof' => t('View this profile'), @@ -460,7 +475,8 @@ function profiles_content(&$a) { $o .= replace_macros($tpl_header,array( '$header' => t('Edit/Manage Profiles'), '$chg_photo' => t('Change profile photo'), - '$cr_new' => t('Create New Profile') + '$cr_new' => t('Create New Profile'), + '$cr_new_link' => 'profiles/new?t=' . get_form_security_token("profile_new") )); diff --git a/mod/settings.php b/mod/settings.php index 2ef582fdfe..f42fdb3973 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -53,6 +53,8 @@ function settings_post(&$a) { $old_page_flags = $a->user['page-flags']; if(($a->argc > 1) && ($a->argv[1] === 'oauth') && x($_POST,'remove')){ + check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth'); + $key = $_POST['remove']; q("DELETE FROM tokens WHERE id='%s' AND uid=%d", dbesc($key), @@ -63,6 +65,8 @@ function settings_post(&$a) { if(($a->argc > 2) && ($a->argv[1] === 'oauth') && ($a->argv[2] === 'edit'||($a->argv[2] === 'add')) && x($_POST,'submit')) { + check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth'); + $name = ((x($_POST,'name')) ? $_POST['name'] : ''); $key = ((x($_POST,'key')) ? $_POST['key'] : ''); $secret = ((x($_POST,'secret')) ? $_POST['secret'] : ''); @@ -105,13 +109,18 @@ function settings_post(&$a) { } if(($a->argc > 1) && ($a->argv[1] == 'addon')) { + check_form_security_token_redirectOnErr('/settings/addon', 'settings_addon'); + call_hooks('plugin_settings_post', $_POST); return; } if(($a->argc > 1) && ($a->argv[1] == 'connectors')) { - - if(x($_POST['imap-submit'])) { + + check_form_security_token_redirectOnErr('/settings/connectors', 'settings_connectors'); + + if(x($_POST, 'imap-submit')) { + $mail_server = ((x($_POST,'mail_server')) ? $_POST['mail_server'] : ''); $mail_port = ((x($_POST,'mail_port')) ? $_POST['mail_port'] : ''); $mail_ssl = ((x($_POST,'mail_ssl')) ? strtolower(trim($_POST['mail_ssl'])) : ''); @@ -185,7 +194,8 @@ function settings_post(&$a) { return; } - + check_form_security_token_redirectOnErr('/settings', 'settings'); + call_hooks('settings_post', $_POST); if((x($_POST,'npassword')) || (x($_POST,'confirm'))) { @@ -460,6 +470,7 @@ function settings_content(&$a) { if(($a->argc > 2) && ($a->argv[2] === 'add')) { $tpl = get_markup_template("settings_oauth_edit.tpl"); $o .= replace_macros($tpl, array( + '$form_security_token' => get_form_security_token("settings_oauth"), '$tabs' => $tabs, '$title' => t('Add application'), '$submit' => t('Submit'), @@ -486,6 +497,7 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_oauth_edit.tpl"); $o .= replace_macros($tpl, array( + '$form_security_token' => get_form_security_token("settings_oauth"), '$tabs' => $tabs, '$title' => t('Add application'), '$submit' => t('Update'), @@ -500,6 +512,8 @@ function settings_content(&$a) { } if(($a->argc > 3) && ($a->argv[2] === 'delete')) { + check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth', 't'); + $r = q("DELETE FROM clients WHERE client_id='%s' AND uid=%d", dbesc($a->argv[3]), local_user()); @@ -518,6 +532,7 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_oauth.tpl"); $o .= replace_macros($tpl, array( + '$form_security_token' => get_form_security_token("settings_oauth"), '$baseurl' => $a->get_baseurl(), '$title' => t('Connected Apps'), '$add' => t('Add application'), @@ -544,6 +559,7 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_addons.tpl"); $o .= replace_macros($tpl, array( + '$form_security_token' => get_form_security_token("settings_addons"), '$title' => t('Plugin Settings'), '$tabs' => $tabs, '$settings_addons' => $settings_addons @@ -586,28 +602,28 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_connectors.tpl"); $o .= replace_macros($tpl, array( + '$form_security_token' => get_form_security_token("settings_connectors"), + '$title' => t('Connector Settings'), '$tabs' => $tabs, - '$diasp_enabled' => $diasp_enabled, - '$ostat_enabled' => $ostat_enabled, - - '$h_imap' => t('Email/Mailbox Setup'), - '$imap_desc' => t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."), - '$imap_lastcheck' => array('imap_lastcheck', t('Last successful email check:'), $mail_chk,''), - '$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''), - '$mail_server' => array('mail_server', t('IMAP server name:'), $mail_server, ''), - '$mail_port' => array('mail_port', t('IMAP port:'), $mail_port, ''), - '$mail_ssl' => array('mail_ssl', t('Security:'), strtoupper($mail_ssl), '', array( ''=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')), - '$mail_user' => array('mail_user', t('Email login name:'), $mail_user, ''), - '$mail_pass' => array('mail_pass', t('Email password:'), '', ''), - '$mail_replyto' => array('mail_replyto', t('Reply-to address:'), '', 'Optional'), - '$mail_pubmail' => array('mail_pubmail', t('Send public posts to all email contacts:'), $mail_pubmail, ''), - '$mail_action' => array('mail_action', t('Action after import:'), $mail_action, '', array(0=>t('None'), 1=>t('Delete'), 2=>t('Mark as seen'), 3=>t('Move to folder'))), - '$mail_movetofolder' => array('mail_movetofolder', t('Move to folder:'), $mail_movetofolder, ''), - '$submit' => t('Submit'), - + '$diasp_enabled' => $diasp_enabled, + '$ostat_enabled' => $ostat_enabled, + '$h_imap' => t('Email/Mailbox Setup'), + '$imap_desc' => t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."), + '$imap_lastcheck' => array('imap_lastcheck', t('Last successful email check:'), $mail_chk,''), + '$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''), + '$mail_server' => array('mail_server', t('IMAP server name:'), $mail_server, ''), + '$mail_port' => array('mail_port', t('IMAP port:'), $mail_port, ''), + '$mail_ssl' => array('mail_ssl', t('Security:'), strtoupper($mail_ssl), '', array( ''=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')), + '$mail_user' => array('mail_user', t('Email login name:'), $mail_user, ''), + '$mail_pass' => array('mail_pass', t('Email password:'), '', ''), + '$mail_replyto' => array('mail_replyto', t('Reply-to address:'), '', 'Optional'), + '$mail_pubmail' => array('mail_pubmail', t('Send public posts to all email contacts:'), $mail_pubmail, ''), + '$mail_action' => array('mail_action', t('Action after import:'), $mail_action, '', array(0=>t('None'), 1=>t('Delete'), 2=>t('Mark as seen'), 3=>t('Move to folder'))), + '$mail_movetofolder' => array('mail_movetofolder', t('Move to folder:'), $mail_movetofolder, ''), + '$submit' => t('Submit'), '$settings_connectors' => $settings_connectors )); @@ -805,6 +821,7 @@ function settings_content(&$a) { '$submit' => t('Submit'), '$baseurl' => $a->get_baseurl(), '$uid' => local_user(), + '$form_security_token' => get_form_security_token("settings"), '$nickname_block' => $prof_addr, diff --git a/view/cropbody.tpl b/view/cropbody.tpl index c9c0f84de1..b484d15bf7 100755 --- a/view/cropbody.tpl +++ b/view/cropbody.tpl @@ -40,6 +40,7 @@ $desc
    + diff --git a/view/profile_edit.tpl b/view/profile_edit.tpl index 8dab726492..e5c7162d03 100755 --- a/view/profile_edit.tpl +++ b/view/profile_edit.tpl @@ -5,9 +5,9 @@ $default @@ -17,6 +17,7 @@ $default
    +
    diff --git a/view/profile_listing_header.tpl b/view/profile_listing_header.tpl index 09e4fc9b24..61a2737929 100755 --- a/view/profile_listing_header.tpl +++ b/view/profile_listing_header.tpl @@ -3,6 +3,6 @@ $chg_photo

    diff --git a/view/profile_photo.tpl b/view/profile_photo.tpl index f258b5b86d..0b3a1cac17 100755 --- a/view/profile_photo.tpl +++ b/view/profile_photo.tpl @@ -1,6 +1,7 @@

    $title

    +
    diff --git a/view/settings.tpl b/view/settings.tpl index 46c737b23a..25479b5bff 100755 --- a/view/settings.tpl +++ b/view/settings.tpl @@ -5,7 +5,7 @@ $tabs $nickname_block - +

    $h_pass

    diff --git a/view/settings_addons.tpl b/view/settings_addons.tpl index 2cbfd17e92..28fca53620 100755 --- a/view/settings_addons.tpl +++ b/view/settings_addons.tpl @@ -4,6 +4,7 @@ $tabs + $settings_addons diff --git a/view/settings_connectors.tpl b/view/settings_connectors.tpl index 9493c8bf77..43c0346bba 100755 --- a/view/settings_connectors.tpl +++ b/view/settings_connectors.tpl @@ -6,6 +6,7 @@ $tabs
    $ostat_enabled
    + $settings_connectors diff --git a/view/settings_oauth.tpl b/view/settings_oauth.tpl index 0de0dbe98a..da1398ab96 100755 --- a/view/settings_oauth.tpl +++ b/view/settings_oauth.tpl @@ -4,7 +4,8 @@ $tabs - + + {{ endfor }} diff --git a/view/settings_oauth_edit.tpl b/view/settings_oauth_edit.tpl index 98b7457aa4..d293413867 100755 --- a/view/settings_oauth_edit.tpl +++ b/view/settings_oauth_edit.tpl @@ -3,6 +3,8 @@ $tabs

    $title

    + + {{ inc field_input.tpl with $field=$name }}{{ endinc }} {{ inc field_input.tpl with $field=$key }}{{ endinc }} {{ inc field_input.tpl with $field=$secret }}{{ endinc }} From acf75e85c86a2e47549ee74d60c7d82dcc5c8cc4 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 12 Mar 2012 19:12:00 -0700 Subject: [PATCH 029/133] revup --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index b30f02c9f6..ace358faa7 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1278' ); +define ( 'FRIENDICA_VERSION', '2.3.1279' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1131 ); From bf7425c591de360a97c37544f777d7d69791420c Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 12 Mar 2012 20:21:32 -0700 Subject: [PATCH 030/133] click anywhere to close notifications -> zeros and bubbles --- view/theme/darkbubble/theme.php | 18 ++++++++++++++++++ view/theme/darkzero-NS/theme.php | 2 ++ view/theme/darkzero/theme.php | 2 ++ view/theme/duepuntozero/theme.php | 2 ++ view/theme/greenzero/theme.php | 2 ++ view/theme/purplezero/theme.php | 2 ++ view/theme/slackr/theme.php | 2 ++ view/theme/testbubble/theme.php | 9 +++++++++ 8 files changed, 39 insertions(+) diff --git a/view/theme/darkbubble/theme.php b/view/theme/darkbubble/theme.php index 326c98bbda..053730c21a 100755 --- a/view/theme/darkbubble/theme.php +++ b/view/theme/darkbubble/theme.php @@ -1,4 +1,22 @@ + */ + + $a->theme_info = array( 'extends' => 'testbubble', ); + + +$a->page['htmlhead'] .= <<< EOT + +EOT; diff --git a/view/theme/darkzero-NS/theme.php b/view/theme/darkzero-NS/theme.php index 521b1859e9..2d3e4fd56e 100755 --- a/view/theme/darkzero-NS/theme.php +++ b/view/theme/darkzero-NS/theme.php @@ -15,6 +15,8 @@ $a->page['htmlhead'] .= <<< EOT +EOT; From 5a4167646553e589cf9647c0e0d0446e3f5fd672 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Mar 2012 04:04:26 -0700 Subject: [PATCH 031/133] initial tag display for categories and save-to-file - suitable for testing but needs cleanup, links to delete term, and theming. --- include/text.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/text.php b/include/text.php index 011006b764..2663bdebaa 100644 --- a/include/text.php +++ b/include/text.php @@ -913,6 +913,33 @@ function prepare_body($item,$attach = false) { } $s .= '
    '; } + $matches = false; + $cnt = preg_match_all('/<(.*?)>/',$item['file'],$matches,PREG_SET_ORDER); + if($cnt) { + logger('prepare_text: categories: ' . print_r($matches,true), LOGGER_DEBUG); + foreach($matches as $mtch) { + if(strlen($x)) + $x .= ','; + $x .= file_tag_decode($mtch[1]); + } + if(strlen($x)) + $s .= '
    ' . t('Categories:') . ' ' . $x . '
    '; + + + } + $matches = false; + $x = ''; + $cnt = preg_match_all('/\[(.*?)\]/',$item['file'],$matches,PREG_SET_ORDER); + if($cnt) { + logger('prepare_text: filed_under: ' . print_r($matches,true), LOGGER_DEBUG); + foreach($matches as $mtch) { + if(strlen($x)) + $x .= ','; + $x .= file_tag_decode($mtch[1]); + } + if(strlen($x) && (local_user() == $item['uid'])) + $s .= '
    ' . t('Filed under:') . ' ' . $x . '
    '; + } $prep_arr = array('item' => $item, 'html' => $s); From 7868e3897b0f282611f1ccb1715a30a93404ddc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Tue, 13 Mar 2012 21:46:57 +0000 Subject: [PATCH 032/133] In HTML2BBCode: fetch the URL of [EMBED] using JavaScript instead of an ajax-call to a php-script. Once there actually is embedded Code in the HTML, this function is called after every single keypress. Not only is making an ajax-call every keypress bandith intensive - it also made typing hard / slow. Making a lot of JavaScript-RegExp-Computation every keypress isn't exactly great either, but still performs better. --- .../plugins/bbcode/editor_plugin_src.js | 262 ++++++++++-------- 1 file changed, 140 insertions(+), 122 deletions(-) diff --git a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js index 44d1473a99..183f2bc68d 100755 --- a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -44,61 +44,79 @@ _dfrn_html2bbcode : function(s) { s = tinymce.trim(s); - function rep(re, str) { - - //modify code to keep stuff intact within [code][/code] blocks - //Waitman Gobble NO WARRANTY - - - var o = new Array(); - var x = s.split("[code]"); - var i = 0; - - var si = ""; - si = x.shift(); - si = si.replace(re,str); - o.push(si); - - for (i = 0; i < x.length; i++) { - var no = new Array(); - var j = x.shift(); - var g = j.split("[/code]"); - no.push(g.shift()); - si = g.shift(); - si = si.replace(re,str); - no.push(si); - o.push(no.join("[/code]")); - } - - s = o.join("[code]"); - - }; - - - - - /* oembed */ - function _h2b_cb(match) { - function s_h2b(data) { - match = data; + function rep(re, str) { + + //modify code to keep stuff intact within [code][/code] blocks + //Waitman Gobble NO WARRANTY + + + var o = new Array(); + var x = s.split("[code]"); + var i = 0; + + var si = ""; + si = x.shift(); + si = si.replace(re,str); + o.push(si); + + for (i = 0; i < x.length; i++) { + var no = new Array(); + var j = x.shift(); + var g = j.split("[/code]"); + no.push(g.shift()); + si = g.shift(); + si = si.replace(re,str); + no.push(si); + o.push(no.join("[/code]")); + } + + s = o.join("[code]"); + + }; + + + + + /* oembed */ + function _h2b_cb(match) { + /* + function s_h2b(data) { + match = data; } $.ajax({ - type:"POST", + type:"POST", url: 'oembed/h2b', - data: {text: match}, - async: false, - success: s_h2b, - dataType: 'html' - }); - return match; - } + data: {text: match}, + async: false, + success: s_h2b, + dataType: 'html' + }); + */ + + var f, g, tof = [], tor = []; + var find_spanc = /]*class *= *[\"'](?:[^\"']* )*oembed(?: [^\"']*)*[\"'][^>]*>(.*?(?:]*>(.*?)<\/span *>)*.*?)<\/span *>/ig; + while (f = find_spanc.exec(match)) { + var find_a = /]* rel=[\"']oembed[\"'][^>]*)>.*?<\/a *>/ig; + if (g = find_a.exec(f[1])) { + var find_href = /href=[\"']([^\"']*)[\"']/ig; + var m2 = find_href.exec(g[1]); + if (m2[1]) { + tof.push(f[0]); + tor.push("[EMBED]" + m2[1] + "[/EMBED]"); + } + } + } + for (var i = 0; i < tof.length; i++) match = match.replace(tof[i], tor[i]); + + return match; + } if (s.indexOf('class="oembed')>=0){ //alert("request oembed html2bbcode"); s = _h2b_cb(s); } - - /* /oembed */ - + + /* /oembed */ + // example: to [b] rep(/(.*?)<\/a>/gi,"[bookmark=$1]$2[/bookmark]"); @@ -111,16 +129,16 @@ rep(//gi,"[img=$3x$2]$1[/img]"); rep(//gi,"[img=$2x$3]$1[/img]"); rep(//gi,"[img]$1[/img]"); - - rep(/
      (.*?)<\/ul>/gi,"[list]$1[/list]"); - rep(/
        (.*?)<\/ul>/gi,"[list=]$1[/list]"); - rep(/
          (.*?)<\/ul>/gi,"[list=1]$1[/list]"); - rep(/
            (.*?)<\/ul>/gi,"[list=i]$1[/list]"); - rep(/
              (.*?)<\/ul>/gi,"[list=I]$1[/list]"); - rep(/
                (.*?)<\/ul>/gi,"[list=a]$1[/list]"); - rep(/
                  (.*?)<\/ul>/gi,"[list=A]$1[/list]"); - rep(/
                • (.*?)<\/li>/gi,'[li]$1[/li]'); - + + rep(/
                    (.*?)<\/ul>/gi,"[list]$1[/list]"); + rep(/
                      (.*?)<\/ul>/gi,"[list=]$1[/list]"); + rep(/
                        (.*?)<\/ul>/gi,"[list=1]$1[/list]"); + rep(/
                          (.*?)<\/ul>/gi,"[list=i]$1[/list]"); + rep(/
                            (.*?)<\/ul>/gi,"[list=I]$1[/list]"); + rep(/ +$invite_desc +

                            +

                            $desc

                            From db80ffa0ff0cf796eddede0ab439ffbd0c4e66a3 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Mar 2012 16:02:20 -0700 Subject: [PATCH 034/133] don't count self in number of contatcs --- mod/contacts.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index 001bf12af4..38ca570ddf 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -445,7 +445,7 @@ function contacts_content(&$a) { $r = q("SELECT COUNT(*) AS `total` FROM `contact` - WHERE `uid` = %d AND `pending` = 0 $sql_extra $sql_extra2 ", + WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ", intval($_SESSION['uid'])); if(count($r)) { $a->set_pager_total($r[0]['total']); @@ -454,7 +454,7 @@ function contacts_content(&$a) { - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `pending` = 0 $sql_extra $sql_extra2 ORDER BY `name` ASC LIMIT %d , %d ", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ORDER BY `name` ASC LIMIT %d , %d ", intval($_SESSION['uid']), intval($a->pager['start']), intval($a->pager['itemspage']) @@ -465,8 +465,6 @@ function contacts_content(&$a) { if(count($r)) { foreach($r as $rr) { - if($rr['self']) - continue; switch($rr['rel']) { case CONTACT_IS_FRIEND: From be48fff1570aa1d04e049a6fd1665f4fc9634a62 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Mar 2012 18:13:03 -0700 Subject: [PATCH 035/133] file as widget and basic filing implementation for duepuntozero,slackr much more work needed - this is just for test/evaluation currently --- include/contact_widgets.php | 29 ++++++++++++++++++++++++++ include/conversation.php | 2 ++ include/text.php | 2 +- mod/filer.php | 23 ++++++++++++++++++++ mod/network.php | 1 + view/fileas_widget.tpl | 12 +++++++++++ view/jot-header.tpl | 12 +++++++++++ view/theme/duepuntozero/file.gif | Bin 0 -> 615 bytes view/theme/duepuntozero/style.css | 23 +++++++++++++++++--- view/theme/duepuntozero/wall_item.tpl | 1 + view/theme/greenzero/file.gif | Bin 0 -> 614 bytes 11 files changed, 101 insertions(+), 4 deletions(-) create mode 100755 mod/filer.php create mode 100755 view/fileas_widget.tpl create mode 100644 view/theme/duepuntozero/file.gif create mode 100644 view/theme/greenzero/file.gif diff --git a/include/contact_widgets.php b/include/contact_widgets.php index caa0572d20..605a3eb78e 100755 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -75,4 +75,33 @@ function networks_widget($baseurl,$selected = '') { )); } +function fileas_widget($baseurl,$selected = '') { + $a = get_app(); + if(! local_user()) + return ''; + + $saved = get_pconfig(local_user(),'system','filetags'); + if(! strlen($saved)) + return; + + $matches = false; + $terms = array(); + $cnt = preg_match_all('/\[(.*?)\]/',$saved,$matches,PREG_SET_ORDER); + if($cnt) { + foreach($matches as $mtch) { + $unescaped = file_tag_decode($mtch[1]); + $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : '')); + } + } + + return replace_macros(get_markup_template('fileas_widget.tpl'),array( + '$title' => t('File Selections'), + '$desc' => '', + '$sel_all' => (($selected == '') ? 'selected' : ''), + '$all' => t('Everything'), + '$terms' => $terms, + '$base' => $baseurl, + + )); +} diff --git a/include/conversation.php b/include/conversation.php index 4b2ca316ba..a420e9923a 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -572,6 +572,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { 'classundo' => (($item['starred']) ? "" : "hidden"), 'starred' => t('starred'), 'tagger' => t("add tag"), + 'filer' => t("file as"), 'classtagger' => "", ); } @@ -874,6 +875,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { '$vidurl' => t("Please enter a video link/URL:"), '$audurl' => t("Please enter an audio link/URL:"), '$term' => t('Tag term:'), + '$fileas' => t('File as:'), '$whereareu' => t('Where are you right now?'), '$title' => t('Enter a title for this item') )); diff --git a/include/text.php b/include/text.php index 2663bdebaa..c44b4d1789 100644 --- a/include/text.php +++ b/include/text.php @@ -1294,7 +1294,7 @@ function file_tag_save_file($uid,$item,$file) { if(count($r)) { if(! stristr($r[0]['file'],'[' . file_tag_encode($file) . ']')) q("update item set file = '%s' where id = %d and uid = %d limit 1", - dbesc($r[0]['file'] . '[' . $file_tag_encode($file) . ']'), + dbesc($r[0]['file'] . '[' . file_tag_encode($file) . ']'), intval($item), intval($uid) ); diff --git a/mod/filer.php b/mod/filer.php new file mode 100755 index 0000000000..a9e2135361 --- /dev/null +++ b/mod/filer.php @@ -0,0 +1,23 @@ +argc > 1) ? notags(trim($a->argv[1])) : 0); + + logger('filer: tag ' . $term . ' item ' . $item_id); + + if($item_id && strlen($term)) + file_tag_save_file(local_user(),$item_id,$term); + + killme(); +} diff --git a/mod/network.php b/mod/network.php index 7e7a958419..4f58fc4fbc 100755 --- a/mod/network.php +++ b/mod/network.php @@ -46,6 +46,7 @@ function network_init(&$a) { $a->page['aside'] .= group_side('network','network',true,$group_id); $a->page['aside'] .= networks_widget($a->get_baseurl() . '/network',(x($_GET, 'nets') ? $_GET['nets'] : '')); $a->page['aside'] .= saved_searches($search); + $a->page['aside'] .= fileas_widget($a->get_baseurl() . '/network',(x($_GET, 'file') ? $_GET['file'] : '')); } diff --git a/view/fileas_widget.tpl b/view/fileas_widget.tpl new file mode 100755 index 0000000000..54fba7435f --- /dev/null +++ b/view/fileas_widget.tpl @@ -0,0 +1,12 @@ +
                            +

                            $title

                            +
                            $desc
                            + + + +
                            diff --git a/view/jot-header.tpl b/view/jot-header.tpl index d6b172b6af..88df73494f 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -262,6 +262,18 @@ function enableOnUser(){ } } + function itemFiler(id) { + reply = prompt("$fileas"); + if(reply && reply.length) { + commentBusy = true; + $('body').css('cursor', 'wait'); + $.get('filer/' + id + '?term=' + reply); + if(timer) clearTimeout(timer); + timer = setTimeout(NavUpdate,3000); + liking = 1; + } + } + function jotClearLocation() { $('#jot-coord').val(''); $('#profile-nolocation-wrapper').hide(); diff --git a/view/theme/duepuntozero/file.gif b/view/theme/duepuntozero/file.gif new file mode 100644 index 0000000000000000000000000000000000000000..7885b998d578d4523103e1f5dfbcd8133a7f0fe7 GIT binary patch literal 615 zcmZ?wbhEHb6krfwIF`)7#xKb(Aj2uD!Xs-asNo`J94_scC*xeG;M1rUF;y*cx?0ps z_2^mZF>^Fx=V~P{*G^rfleShbd#hf~c7uYwhQ)`B%8nbAoir{#Wm{SZR^k3H=J{9Jm=JO-lh4xYs&@q)(f6(7rfdp`gC0M@46J&eJQBta!B9h@CjEU zCtit~bTwx3)z~T5;-_9qoOUf~`t_6<*HdTSNS}2hbM}p#xi@p?-O8VTt6<^nlEt^n zm)@yZcDHury{0wy+t)wn*zmAxdicePqc2w-f4Szw%e5z8tv~f@)0x*>&c5Dp;q9)AZ+BmMxA*e9{a4-{xcdI^ z^$$mHd^mpV!>KzTPv8A?_TH!S_doro4N&~a!pOx?&!EEq1fV!!U_a7O-_+dF+SU>! zFQMYz-Xh@HBp)OYX*7MhPg@W#w~=pBQbN3eZz~TMmqFs9_?SQ)4OK-ssb;;n#j&A* zd-rW?(vFUgwX!ldG1S#kSCW^J(hQGrGYyNp5g8E{5^SNR78+&d5VFtD$HU2(Cq_BY z%_KY^(BH??#leP8tzN;;s4bxJl1t}A1>2$$i-f1=+Y}7fSVT6ZoamP|_An?=&^XL3 nuk6%xBcZXWg@e6|V^=`pp=K5i9uWlt2ZjcQz9KFz76xkoO@B#U literal 0 HcmV?d00001 diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index acd97eb941..10ddb00909 100755 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -309,7 +309,7 @@ div.wall-item-content-wrapper.shiny { margin-bottom: 10px; } -.group-selected, .nets-selected { +.group-selected, .nets-selected, .fileas-selected { padding: 3px; -moz-border-radius: 3px; border-radius: 3px; @@ -1024,6 +1024,10 @@ input#dfrn-url { float: left; } +.filer-item { + margin-left: 10px; + float: left; +} .wall-item-links-wrapper { float: left; @@ -1864,11 +1868,11 @@ a.mail-list-link { margin-top: 10px; } -.nets-ul { +.nets-ul, .fileas-ul { list-style-type: none; } -.nets-ul li { +.nets-ul li, .fileas-ul li { margin-top: 10px; } @@ -1879,6 +1883,14 @@ a.mail-list-link { margin-left: 42px; } +.fileas-link { + margin-left: 24px; +} + +.fileas-all { + margin-left: 0px; +} + #search-save { margin-left: 5px; } @@ -2902,6 +2914,11 @@ aside input[type='text'] { .tagged { background-position: -48px -48px; } +.filer-icon { + display: block; width: 16px; height: 16px; + background-image: url('file.gif'); +} + .icon.dim { opacity: 0.3;filter:alpha(opacity=30); } .attachtype { diff --git a/view/theme/duepuntozero/wall_item.tpl b/view/theme/duepuntozero/wall_item.tpl index 51e36b6f4f..2c88fc598e 100755 --- a/view/theme/duepuntozero/wall_item.tpl +++ b/view/theme/duepuntozero/wall_item.tpl @@ -56,6 +56,7 @@ {{ if $item.star }} + {{ endif }}
                            diff --git a/view/theme/greenzero/file.gif b/view/theme/greenzero/file.gif new file mode 100644 index 0000000000000000000000000000000000000000..e388a13c0b99d0afa18c2fb51a90610923cb6917 GIT binary patch literal 614 zcmZ?wbhEHb6krfwI2OvlF38Fu!p0@V!LQ0AY9c7@BBmTJqY^2rnXY6|u5MVVVN|1O zRHtcNuVvP*YtgM|J=xG^ilN;sV~6>sjtfnl7MnRQGk0EY?z-C2b&aLlI!pHr)*hRz zJvLi=Zng2+Ve7ry&S$T^-+l-G{fKja;G*eCjkf9#QfgkvFz$3jz% zN2DH)Og|BwaUv%BR6^eApq}v;FC&ozJ%HdbV}X^X+?| z@7VWz=fM|y4!_)Y^wq%=uaBI5bNt-fQ~w7VDE?$&@$@$$FP^Yppll?vo%ZL41t4=Oe}0%0ul-g4h-%VtgK87)&N@+JAVKG literal 0 HcmV?d00001 From de017d1ed76500c01fd11c8e1d36cf4ebd70172d Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Mar 2012 19:27:52 -0700 Subject: [PATCH 036/133] sort inbox by recently replied conversations first --- mod/message.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/message.php b/mod/message.php index 37f92e8d9d..65f692f3d5 100755 --- a/mod/message.php +++ b/mod/message.php @@ -194,7 +194,7 @@ function message_content(&$a) { $r = q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`, `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network` FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id` - WHERE `mail`.`uid` = %d AND `from-url` $eq '%s' GROUP BY `parent-uri` ORDER BY `created` DESC LIMIT %d , %d ", + WHERE `mail`.`uid` = %d AND `from-url` $eq '%s' GROUP BY `parent-uri` ORDER BY `mailcreated` DESC LIMIT %d , %d ", intval(local_user()), dbesc($myprofile), intval($a->pager['start']), From 1ae740535d8a5b455395d51c01adef74e9dbb1ae Mon Sep 17 00:00:00 2001 From: Tony Baldwin Date: Tue, 13 Mar 2012 23:05:04 -0400 Subject: [PATCH 037/133] added slack-NS, non-scrolly, slackr-based theme. --- view/theme/slack-NS/style.css | 51 +++++++++++++++++++++++++++++++++++ view/theme/slack-NS/theme.php | 51 +++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100755 view/theme/slack-NS/style.css create mode 100755 view/theme/slack-NS/theme.php diff --git a/view/theme/slack-NS/style.css b/view/theme/slack-NS/style.css new file mode 100755 index 0000000000..82bceeac8f --- /dev/null +++ b/view/theme/slack-NS/style.css @@ -0,0 +1,51 @@ +@import url('../duepuntozero/style.css'); + +.wall-item-content-wrapper { + border: none; +} + +.wall-item-content-wrapper.comment { + background: #ffffff !important; + border-left: 1px solid #EEE; +} + +.wall-item-tools { + background: none; +} + +.wall-item-content { + max-height: 20000px; + overflow: none; +} + +.comment-edit-text-empty, .comment-edit-text-full { + border: none; + border-left: 1px solid #EEE; + background: #EEEEEE; +} + +.comment-edit-wrapper, .comment-wwedit-wrapper { + background: #ffffff !important; +} + +section { + margin: 0px 32px; +} + +aside { + margin-left: 32px; +} +nav { + margin-left: 32px; + margin-right: 32px; +} + +nav #site-location { + top: 80px; + right: 36px; +} + +.wall-item-photo, .photo, .contact-block-img, .my-comment-photo { + border-radius: 3px; + -moz-border-radius: 3px; +} diff --git a/view/theme/slack-NS/theme.php b/view/theme/slack-NS/theme.php new file mode 100755 index 0000000000..ceec4dd976 --- /dev/null +++ b/view/theme/slack-NS/theme.php @@ -0,0 +1,51 @@ +theme_info = array( + 'extends' => 'duepuntozero', +); + +$a->page['htmlhead'] .= <<< EOT + +EOT; From 4972d7ef6ee740f6eb09d8c7efa9a76ee40973c1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Mar 2012 20:46:37 -0700 Subject: [PATCH 038/133] more work on filer, comment level and file tag removal --- include/conversation.php | 32 +++++++++++++---------- include/oembed.php | 5 +++- include/text.php | 9 ++++--- mod/filerm.php | 21 +++++++++++++++ view/theme/duepuntozero/style.css | 4 +-- view/theme/duepuntozero/wall_item.tpl | 6 +++-- view/theme/duepuntozero/wallwall_item.tpl | 3 +++ 7 files changed, 57 insertions(+), 23 deletions(-) create mode 100644 mod/filerm.php diff --git a/include/conversation.php b/include/conversation.php index a420e9923a..117127a287 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -560,25 +560,28 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { ); $star = false; + $filer = false; + $isstarred = "unstarred"; - if ($profile_owner == local_user() && $toplevelpost) { - $isstarred = (($item['starred']) ? "starred" : "unstarred"); + if ($profile_owner == local_user()) { + if($toplevelpost) { + $isstarred = (($item['starred']) ? "starred" : "unstarred"); - $star = array( - 'do' => t("add star"), - 'undo' => t("remove star"), - 'toggle' => t("toggle star status"), - 'classdo' => (($item['starred']) ? "hidden" : ""), - 'classundo' => (($item['starred']) ? "" : "hidden"), - 'starred' => t('starred'), - 'tagger' => t("add tag"), - 'filer' => t("file as"), - 'classtagger' => "", - ); + $star = array( + 'do' => t("add star"), + 'undo' => t("remove star"), + 'toggle' => t("toggle star status"), + 'classdo' => (($item['starred']) ? "hidden" : ""), + 'classundo' => (($item['starred']) ? "" : "hidden"), + 'starred' => t('starred'), + 'tagger' => t("add tag"), + 'classtagger' => "", + ); + } + $filer = t("file as"); } - $photo = $item['photo']; $thumb = $item['thumb']; @@ -672,6 +675,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { 'edpost' => $edpost, 'isstarred' => $isstarred, 'star' => $star, + 'filer' => $filer, 'drop' => $drop, 'vote' => $likebuttons, 'like' => $like, diff --git a/include/oembed.php b/include/oembed.php index 52068efc76..cc71f9757c 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -1,6 +1,6 @@ /',$item['file'],$matches,PREG_SET_ORDER); if($cnt) { - logger('prepare_text: categories: ' . print_r($matches,true), LOGGER_DEBUG); +// logger('prepare_text: categories: ' . print_r($matches,true), LOGGER_DEBUG); foreach($matches as $mtch) { if(strlen($x)) $x .= ','; @@ -931,11 +932,11 @@ function prepare_body($item,$attach = false) { $x = ''; $cnt = preg_match_all('/\[(.*?)\]/',$item['file'],$matches,PREG_SET_ORDER); if($cnt) { - logger('prepare_text: filed_under: ' . print_r($matches,true), LOGGER_DEBUG); +// logger('prepare_text: filed_under: ' . print_r($matches,true), LOGGER_DEBUG); foreach($matches as $mtch) { if(strlen($x)) - $x .= ','; - $x .= file_tag_decode($mtch[1]); + $x .= '   '; + $x .= file_tag_decode($mtch[1]). ' ' . t('[remove]') . ''; } if(strlen($x) && (local_user() == $item['uid'])) $s .= '
                            ' . t('Filed under:') . ' ' . $x . '
                            '; diff --git a/mod/filerm.php b/mod/filerm.php new file mode 100644 index 0000000000..66b684dc96 --- /dev/null +++ b/mod/filerm.php @@ -0,0 +1,21 @@ +argc > 1) ? notags(trim($a->argv[1])) : 0); + + logger('filerm: tag ' . $term . ' item ' . $item_id); + + if($item_id && strlen($term)) + file_tag_unsave_file(local_user(),$item_id,$term); + + if(x($_SESSION,'return_url')) + goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); + + killme(); +} diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 10ddb00909..b79b00ef41 100755 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2615,12 +2615,12 @@ aside input[type='text'] { margin-top: 10px; } -.body-tag { +.body-tag, .filesavetags { opacity: 0.5; filter:alpha(opacity=50); } -.body-tag:hover { +.body-tag:hover, .filesavetags:hover { opacity: 1.0 !important; filter:alpha(opacity=100) !important; } diff --git a/view/theme/duepuntozero/wall_item.tpl b/view/theme/duepuntozero/wall_item.tpl index 2c88fc598e..6cb018b7bc 100755 --- a/view/theme/duepuntozero/wall_item.tpl +++ b/view/theme/duepuntozero/wall_item.tpl @@ -56,9 +56,11 @@ {{ if $item.star }} - {{ endif }} - + {{ if $item.filer }} + + {{ endif }} +
                            {{ if $item.drop.dropping }}{{ endif }}
                            diff --git a/view/theme/duepuntozero/wallwall_item.tpl b/view/theme/duepuntozero/wallwall_item.tpl index 211906c934..c37bcb4a28 100755 --- a/view/theme/duepuntozero/wallwall_item.tpl +++ b/view/theme/duepuntozero/wallwall_item.tpl @@ -61,6 +61,9 @@ {{ endif }} + {{ if $item.filer }} + + {{ endif }}
                            {{ if $item.drop.dropping }}{{ endif }} From 975781d3e23e6beb2ac86b191c7c12b7347c1705 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Wed, 14 Mar 2012 01:05:08 -0400 Subject: [PATCH 039/133] massive work done to both dispys, mostly -dark Signed-off-by: Simon L'nu --- view/theme/dispy-dark/icons.png | Bin 19513 -> 29024 bytes view/theme/dispy-dark/icons.svg | 50 +++--- view/theme/dispy-dark/nav.tpl | 16 +- view/theme/dispy-dark/photo_view.tpl | 2 +- view/theme/dispy-dark/profile_vcard.tpl | 10 +- view/theme/dispy-dark/style.css | 207 ++++++++++++++---------- view/theme/dispy-dark/theme.php | 46 +++++- view/theme/dispy/style.css | 3 +- view/theme/dispy/theme.php | 41 ++++- 9 files changed, 247 insertions(+), 128 deletions(-) diff --git a/view/theme/dispy-dark/icons.png b/view/theme/dispy-dark/icons.png index eb84b8d8e7ad56e28ae5360cb13d4e98e352dbcc..648811373a41b2328cd76eb596adf0a02a15187a 100644 GIT binary patch literal 29024 zcmYg&1yEGq`}d_$T9ED%X<1s@ML^0`mXeb0?k=U}3n(R_3nC)jog%e}I(_B*5hbpOXHP()g>Ve59QXpv)`wZyD+Zjt$^`@ zLZ=+R7b5b0E^8ZKG#klVBdC(n)1zer{?2y~3Mq|N`~RNWWe`l;G&jb~5&TD6&?^Pi z^;TYNm-)VEliKnQut88I_Ej>r9-p#o;B5q|*)Ypm;|5E6GhRh> zq|s_1_1pEusyy3(k;kAIt%#*69qf9_z9yI^MjP?gSCPE5QlCG7{hft1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Lh;ydC*u*0bMoAJrQo%pG6%ynW~yvep1(&xmGHY8#-X z_MbBFMQnnazGFEiohFA|cymR)v_p|BF>MMfi}*oTmI|vQ?BPFG7~6&rEBbq-)zw^( zSE+|*zOntRnB{6@ky*MeU&mP4!@_&@Vqv4+=nvOakH*01R7FJdYYlWy(Fx^2!+Gkb zqtVfIu`W0Oi*_*5H^nDthx3^C=xpca>`>FJY4|nxOs_Frap=4izYw=u2R`twtLfn; zXX72|w39*?>|jveX-~DhJOpZ@x~^kVMf3aan);F5%)eGvoJE3+;m60FDndnMfC@$7 zPMP&<;0&f-bKD$#TLj(@)=-)5E5s=*FTH3?&=uz74*Hs-{r&MH`;d~Gl!O%GnDwO| zfbBT^{6xcPPP~xLk#9$4yR@Z+4cW@RcQ?spr7fT_l;!>iazq&H;Bz%U>~^y!?XK`$ zK_%wpcNNLA4Dufz;_Q*EC_?%z%C0(}V!~*@LkG%1YneAxZZ{@b(Rt>BvaZ*+N&P#y zq{Cbmr@UQED}>x6a?0Z>t;00VDUgR*nXDepx&DWT<0a4rXK$20TzWF}F+ndl>Cpt@ z$b|ypaC6^mo{{8kjqo?KVW8)}#=w8|oRL$>eh>wC17DO7Qy*)J<*TN^F<)}WTs)mw IN5iiC4{1nb9RL6T diff --git a/view/theme/dispy-dark/icons.svg b/view/theme/dispy-dark/icons.svg index 05a00d93c4..10f8cc667d 100644 --- a/view/theme/dispy-dark/icons.svg +++ b/view/theme/dispy-dark/icons.svg @@ -51,9 +51,9 @@ borderopacity="1.0" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:zoom="1.9403009" - inkscape:cx="100.08061" - inkscape:cy="113.21269" + inkscape:zoom="1.3859292" + inkscape:cx="105.02551" + inkscape:cy="107.90767" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -107,7 +107,7 @@ image/svg+xml - + @@ -572,7 +572,7 @@ inkscape:connector-curvature="0" id="rect4428-4" d="m 118.03127,895.15627 0,0.3125 c 0,1.2601 -0.0643,3.4345 -0.35937,5.75 l -1.5625,1e-4 c -0.80183,0.011 -1.64766,4.0737 -1.60938,8.0625 l 8.25,0 c -0.057,-5.5479 1.56902,-11.5211 1.75,-5.6563 0.21453,6.9525 1.74237,-5.1823 1.75,-8.4687 z" - style="fill:none;stroke:#1a1a1a;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> + style="fill:none;stroke:#e6e6e6;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" /> {{ endif }} -{{ if $userinfo }} -

                            -{{ endif }} - {{ if $nav.contacts }}
                          • $nav.contacts.1
                          • {{ endif }} @@ -94,6 +86,14 @@ works -->
    +{{ if $userinfo }} + +{{ endif }} +
    {{ if $nav.home }} diff --git a/view/theme/dispy-dark/photo_view.tpl b/view/theme/dispy-dark/photo_view.tpl index 4582751c60..f1209ec58f 100644 --- a/view/theme/dispy-dark/photo_view.tpl +++ b/view/theme/dispy-dark/photo_view.tpl @@ -17,7 +17,7 @@
    -
    $desc
    +
    $desc
    {{ if $tags }}
    $tags.0
    $tags.1
    diff --git a/view/theme/dispy-dark/profile_vcard.tpl b/view/theme/dispy-dark/profile_vcard.tpl index 0c289d982b..5cb567f5af 100644 --- a/view/theme/dispy-dark/profile_vcard.tpl +++ b/view/theme/dispy-dark/profile_vcard.tpl @@ -6,13 +6,17 @@
    $profile.pdesc
    {{ endif }}
    - $profile.name + $profile.name +
    + +
    +
    {{ if $location }}
    $location -
    +
    {{ if $profile.address }}
    $profile.address
    {{ endif }} $profile.zip @@ -20,7 +24,7 @@ $profile.region $profile.postal-code {{ if $profile.country-name }}$profile.country-name{{ endif }} -
    +
    {{ endif }} diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index 7a57628b94..c590042f11 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -520,11 +520,13 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-link position: fixed; left: 28px; bottom: 6px; + z-index: 10; } #language-selector { position: fixed; bottom: 2px; left: 52px; + z-index: 10; } .menu-popup { position: absolute; @@ -810,6 +812,9 @@ aside #viewcontacts { border-bottom: 0; padding: 5px; } +#profile-jot-net { + margin: 5px 0; +} #jot-preview-link { margin: 0 0 0 10px; border: 0; @@ -831,12 +836,12 @@ aside #viewcontacts { background-color: #555753; height: 22px; width: 20px; - -webkit-border-radius: 5px 0px 0px 5px; - -moz-border-radius: 5px 0px 0px 5px; - border-radius: 5px 0px 0px 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; overflow: hidden; border: 0px; - margin: 0 -4px 0 10px; + margin: 0 10px 0 10px; } #profile-jot-plugin-wrapper { width: 1px; @@ -854,23 +859,21 @@ aside #viewcontacts { height: 22px; background-color: #555753; color: #eeeeec; - -webkit-border-radius: 0 5px 5px 0; - -moz-border-radius: 0 5px 5px 0; - border-radius: 0 5px 5px 0; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; border: 0; margin: 0; float: right; } -#jot-perms-icons { - background-color: #555753; +#jot-perms-icon { height: 22px; width: 20px; - -webkit-border-radius: 0 5px 5px 0; - -moz-border-radius: 0 5px 5px 0; - border-radius: 0 5px 5px 0; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; overflow: hidden; border: 0; - margin: 0 0 0 94.4%; } #profile-jot-acl-wrapper { margin: 0 10px; @@ -916,7 +919,8 @@ aside #viewcontacts { color: #cccccc; } #profile-jot-desc { - color: #a00; + color: #ff2000; + margin: 5px 0; } #jot-title-wrapper { margin-bottom: 5px; @@ -1503,20 +1507,26 @@ div[id$="wrapper"] br { } .mail-list-sender-name { display: inline; + font-size: 1.1em; } .mail-list-date { display: inline; - font-size: 0.8em; + font-size: 0.9em; padding-left: 10px; } +.mail-list-sender-name, .mail-list-date { + font-style: italic; +} .mail-list-subject { - font-size: 1.5em; + font-size: 1.2em; + font-weight: bold; } .mail-list-delete-wrapper { float: right; } .mail-list-outside-wrapper-end { clear: both; + border-bottom: 1px #eec dotted; } .mail-conv-sender { float: left; @@ -1734,11 +1744,21 @@ div[id$="wrapper"] br { margin: 30px 0px; } .profile-edit-side-div { - margin: 5px 2px 0 0; + background: #2e2f2e; + border-radius: 5px 5px 0 0; + width: 175px; + height: 20px; + position: relative; + margin: -25px -30px 0px 0px; + display: none; +} +.profile-edit-side-div:hover { + /*margin: 0px 0px 0px 0px;*/ + display: inline; } .profile-edit-side-link { - margin: 0 20px -18px 0; - float: right; + margin: 0 0px 0px 155px; + /*float: right;*/ } .profile-listing { float: left; @@ -1749,6 +1769,9 @@ div[id$="wrapper"] br { padding: 0; list-style: none; } +.marital { + margin-top: 5px; +} #register-sitename { display: inline; font-weight: bold; @@ -1970,6 +1993,9 @@ div[id$="wrapper"] br { background: #88a9d2; font-weight: bold; } +.group-selected:hover, .nets-selected:hover { + color: #2e2f2e; +} .groupsideedit { margin-right: 10px; } @@ -2115,11 +2141,16 @@ div[id$="wrapper"] br { width: 16px; height: 16px; } #adminpage table tr:hover { - background-color:#bbc7d7; + color: #2e2f2e; + background-color: #eec; } #adminpage .selectall { text-align: right; } +#adminpage #users a { + color: #2e2f2e; + text-decoration: underline; +} /** * Form fields @@ -2397,7 +2428,7 @@ div[id$="wrapper"] br { background-position: -70px -40px; } .unlock { - background-position: -90px -40px; + background-position: -88px -40px; } .video { background-position: -110px -40px; @@ -2481,8 +2512,8 @@ footer { } #profile-jot-text { height: 20px; - color: #666; - border: 1px solid #ccc; + color: #eec; + border: 1px solid #eec; border-radius: 5px; width: 99.5%; } @@ -2493,113 +2524,117 @@ footer { #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper { display: block !important; + background: #2e2f2e; + color: #eec; } #acl-wrapper { - width: 690px; - float: left; + width: 660px; + margin: 0 auto; } #acl-search { float: right; background: #fff url("../../../images/search_18.png") no-repeat right center; padding-right: 20px; + margin: 6px; } #acl-showall { - float:left; - display:block; - width:auto; - height:18px; - background-color:#CCC; - background-image:url("../../../images/show_all_off.png"); - background-position:7px 7px; - background-repeat:no-repeat; - padding:7px 10px 7px 30px; - -webkit-border-radius:5px; - -moz-border-radius:5px; - border-radius:5px; - color:#999; + float: left; + display: block; + width: auto; + height: 18px; + background: #eec url("../../../images/show_all_off.png") 8px 8px no-repeat; + padding: 7px 10px 7px 30px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + color: #999; + margin: 5px 0; } #acl-showall.selected { - color:#000; - background-color:#F90; - background-image:url(../../../images/show_all_on.png); + color: #000; + background: #f90 url(../../../images/show_all_on.png) 8px 8px no-repeat; } #acl-list { - height:210px; - border:1px solid #ccc; - clear:both; - margin-top:30px; - overflow:auto; -} -#acl-list-content { + height: 210px; + border: 1px solid #ccc; + clear: both; + margin-top: 30px; + overflow: auto; } +/*#acl-list-content {*/ +/*}*/ .acl-list-item { - display:block; - width:150px; - height:30px; - border:1px solid #ccc; - margin:5px; - float:left; + border: 1px solid #eec; + display: block; + float: left; + height: 110px; + margin: 3px 0 5px 5px; + width: 120px; } .acl-list-item img { - width:22px; - height:22px; - float:left; - margin:4px; + width: 22px; + height: 22px; + float: left; + margin: 5px 5px 20px; } .acl-list-item p { height: 12px; font-size: 10px; - margin: 0; + margin: 0 0 22px; padding: 2px 0 1px; } .acl-list-item a { - font-size:8px; - display:block; - width:40px; - height:10px; - float:left; - color:#999; - background-color:#CCC; - background-position:3px 3px; - background-repeat:no-repeat; - margin-right:5px; - -webkit-border-radius:2px; - -moz-border-radius:2px; - border-radius:2px; - padding-left:15px; + background: #eec 3px 3px no-repeat; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + clear: both; + font-size: 10px; + display: block; + width: 55px; + height: 20px; + color: #2e2f2e; + margin: 5px auto 0; + padding: 0 3px; + text-align: center; + vertical-align: middle; } #acl-wrapper a:hover { - text-decoration:none; - color:#000; + text-decoration: none; + color: #2e2f2e; + border: 0; } .acl-button-show { - background-image:url('../../../images/show_off.png'); + background-image: url('../../../images/show_off.png'); + margin: 0 auto; } .acl-button-hide { - background-image:url('../../../images/hide_off.png'); + background-image: url('../../../images/hide_off.png'); + margin: 0 auto; } .acl-button-show.selected { - color:#000; - background-color:#9ade00; - background-image:url(../../../images/show_on.png); + color: #2e2f2e; + background-color: #9ade00; + background-image: url(../../../images/show_on.png); } .acl-button-hide.selected { - color:#000; - background-color:#ff4141; - background-image:url(../../../images/hide_on.png); + color: #2e2f2e; + background-color: #ff4141; + background-image: url(../../../images/hide_on.png); } .acl-list-item.groupshow { - border-color:#9ade00; + border-color: #9ade00; } .acl-list-item.grouphide { - border-color:#ff4141; + border-color: #ff4141; } /** /acl **/ /* autocomplete popup */ .acpopup { - max-height: 150px; + max-height: 175px; + max-width: 42%; background-color: #555753; color: #fff; overflow: auto; diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index a7aec1c1a4..6f82430587 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -1,5 +1,17 @@ theme_info = array(); + +/* + * Name: Dispy Dark + * Description: Dispy Dark, Friendica theme + * Version: 0.9 + * Author: Simon + * Maintainer: Simon + */ + + +$a->theme_info = array( + 'extends' => 'dispy-dark' +); $a->page['htmlhead'] .= <<< EOT EOT; -$a->page['footer'] .= <<theme_info = array(); + +/* + * Name: Dispy + * Description: Dispy, Friendica theme + * Version: 0.9 + * Author: unknown + * Maintainer: Simon + */ + + +$a->theme_info = array( + 'extends' => 'dispy' +); $a->page['htmlhead'] .= <<< EOT + EOT; $a->page['footer'] .= << Date: Tue, 13 Mar 2012 23:52:13 -0700 Subject: [PATCH 040/133] addon settings form error --- mod/network.php | 2 +- mod/settings.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/network.php b/mod/network.php index 4f58fc4fbc..e9f3913ff4 100755 --- a/mod/network.php +++ b/mod/network.php @@ -192,7 +192,7 @@ function network_content(&$a, $update = 0) { 'sel'=>$starred_active, ), array( - 'label' => t('Bookmarks'), + 'label' => t('Shared Links'), 'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1', 'sel'=>$bookmarked_active, ), diff --git a/mod/settings.php b/mod/settings.php index f42fdb3973..15fd0c352e 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -559,7 +559,7 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_addons.tpl"); $o .= replace_macros($tpl, array( - '$form_security_token' => get_form_security_token("settings_addons"), + '$form_security_token' => get_form_security_token("settings_addon"), '$title' => t('Plugin Settings'), '$tabs' => $tabs, '$settings_addons' => $settings_addons From f03c57007a2a9ec73902acfb2d951528e68e3117 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Wed, 14 Mar 2012 12:56:59 +0100 Subject: [PATCH 041/133] fix in nav --- view/theme/diabook/nav.tpl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl index 8b32ebe6ca..5776b6cf75 100644 --- a/view/theme/diabook/nav.tpl +++ b/view/theme/diabook/nav.tpl @@ -152,10 +152,6 @@ - - {# From 0bf9595ab19f3af772d20a88eac86dc8cf962c3e Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Wed, 14 Mar 2012 11:00:20 -0400 Subject: [PATCH 042/133] PHP Fatal error: Call-time pass-by-reference has been removed in mod/item.php on line 630 Signed-off-by: Simon L'nu --- mod/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/item.php b/mod/item.php index 81d7c753b4..6f31f917f2 100755 --- a/mod/item.php +++ b/mod/item.php @@ -627,7 +627,7 @@ function item_post(&$a) { if($preview) { require_once('include/conversation.php'); - $o = conversation(&$a,array(array_merge($contact_record,$datarray)),'search',false,true); + $o = conversation($a,array(array_merge($contact_record,$datarray)),'search',false,true); logger('preview: ' . $o); echo json_encode(array('preview' => $o)); killme(); From 64e3e3590b8ef04a1fdb1cccabc3970295ef92f2 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 14 Mar 2012 16:09:13 -0700 Subject: [PATCH 044/133] revup --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 749ef6e3f3..ba731ddee2 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1280' ); +define ( 'FRIENDICA_VERSION', '2.3.1281' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1131 ); From f0a62d8908cef31982c1c2b24fc9dbc8b59b8bdb Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 14 Mar 2012 20:36:23 -0700 Subject: [PATCH 045/133] ssl_policy stuff --- boot.php | 19 +++++++++++--- include/items.php | 17 +++++++++++++ mod/admin.php | 17 +++++++------ mod/dfrn_notify.php | 60 +++++++++++++++++++++++++++++++++++++++++++++ view/admin_site.tpl | 1 + 5 files changed, 103 insertions(+), 11 deletions(-) diff --git a/boot.php b/boot.php index ba731ddee2..22a4e39be5 100755 --- a/boot.php +++ b/boot.php @@ -379,11 +379,22 @@ class App { $scheme = $this->scheme; - if(x($this->config,'ssl_policy')) { - if(($ssl) || ($this->config['ssl_policy'] == SSL_POLICY_FULL)) - $scheme = 'https'; - if(($this->config['ssl_policy'] == SSL_POLICY_SELFSIGN) && (local_user() || x($_POST,'auth-params'))) + if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) { + if($this->config['system']['ssl_policy'] == SSL_POLICY_FULL) $scheme = 'https'; + +// We need to populate the $ssl flag across the entire program before turning this on. +// Basically, we'll have $ssl = true on any links which can only be seen by a logged in user +// (and also the login link). Anything seen by an outsider will have it turned off. +// At present, setting SSL_POLICY_SELFSIGN will only force remote contacts to update their +// contact links to this site with "http:" if they are currently using "https:" + +// if($this->config['system']['ssl_policy'] == SSL_POLICY_SELFSIGN) { +// if($ssl) +// $scheme = 'https'; +// else +// $scheme = 'http'; +// } } $this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); diff --git a/include/items.php b/include/items.php index 70c72ae165..4b1523ff65 100755 --- a/include/items.php +++ b/include/items.php @@ -1046,6 +1046,21 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { if(! $rino_enable) $rino = 0; + $ssl_val = intval(get_config('system','ssl_policy')); + $ssl_policy = ''; + switch($ssl_val){ + case SSL_POLICY_FULL: + $ssl_policy = 'full'; + break; + case SSL_POLICY_SELFSIGN: + $ssl_policy = 'self'; + break; + case SSL_POLICY_NONE: + default: + $ssl_policy = 'none'; + break; + } + $url = $contact['notify'] . '&dfrn_id=' . $idtosend . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . (($rino) ? '&rino=1' : ''); logger('dfrn_deliver: ' . $url); @@ -1118,6 +1133,8 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $postvars['perm'] = 'r'; } + $postvars['ssl_policy'] = $ssl_policy; + if($rino && $rino_allowed && (! $dissolve)) { $key = substr(random_string(),0,16); $data = bin2hex(aes_encrypt($postvars['data'],$key)); diff --git a/mod/admin.php b/mod/admin.php index 93714bb5f9..2b8d9bcd23 100755 --- a/mod/admin.php +++ b/mod/admin.php @@ -151,11 +151,7 @@ function admin_page_summary(&$a) { $r = q("SELECT COUNT(id) as `count` FROM `register`"); $pending = $r[0]['count']; - - - - - + $t = get_markup_template("admin_summary.tpl"); return replace_macros($t, array( '$title' => t('Administration'), @@ -210,7 +206,7 @@ function admin_page_site_post(&$a){ $dfrn_only = ((x($_POST,'dfrn_only')) ? True : False); $ostatus_disabled = !((x($_POST,'ostatus_disabled')) ? True : False); $diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? True : False); - + $ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0); set_config('config','sitename',$sitename); if ($banner==""){ @@ -222,6 +218,7 @@ function admin_page_site_post(&$a){ } else { set_config('system','banner', $banner); } + set_config('system','ssl_policy',$ssl_policy); set_config('system','language', $language); set_config('system','theme', $theme); set_config('system','maximagesize', $maximagesize); @@ -305,6 +302,12 @@ function admin_page_site(&$a) { REGISTER_APPROVE => t("Requires approval"), REGISTER_OPEN => t("Open") ); + + $ssl_choices = array( + SSL_POLICY_NONE => t("No SSL policy, links will track page SSL state"), + SSL_POLICY_FULL => t("Force all links to use SSL"), + SSL_POLICY_SELFSIGN => t("Self-signed certificate, use SSL for local links only (discouraged)") + ); $t = get_markup_template("admin_site.tpl"); return replace_macros($t, array( @@ -322,7 +325,7 @@ function admin_page_site(&$a) { '$banner' => array('banner', t("Banner/Logo"), $banner, ""), '$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles"), $theme_choices), - + '$ssl_policy' => array('ssl_policy', t("SSL link policy"), get_config('system','ssl_policy'), t("Determines whether generated links should be forced to use SSL"), $ssl_choices), '$maximagesize' => array('maximagesize', t("Maximum image size"), get_config('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")), '$register_policy' => array('register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices), diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 0c0c27e3d6..3dbdc5b328 100755 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -14,6 +14,7 @@ function dfrn_notify_post(&$a) { $key = ((x($_POST,'key')) ? $_POST['key'] : ''); $dissolve = ((x($_POST,'dissolve')) ? intval($_POST['dissolve']) : 0); $perm = ((x($_POST,'perm')) ? notags(trim($_POST['perm'])) : 'r'); + $ssl_policy = ((x($_POST,'ssl_policy')) ? notags(trim($_POST['ssl_policy'])): 'none'); $writable = (-1); if($dfrn_version >= 2.21) { @@ -94,6 +95,65 @@ function dfrn_notify_post(&$a) { $importer['writable'] = $writable; } + // if contact's ssl policy changed, update our links + + $ssl_changed = false; + + if($ssl_policy == 'self' && strstr($importer['url'],'https:')) { + $ssl_changed = true; + $importer['url'] = str_replace('https:','http:',$importer['url']); + $importer['nurl'] = normalise_link($importer['url']); + $importer['photo'] = str_replace('https:','http:',$importer['photo']); + $importer['thumb'] = str_replace('https:','http:',$importer['thumb']); + $importer['micro'] = str_replace('https:','http:',$importer['micro']); + $importer['request'] = str_replace('https:','http:',$importer['request']); + $importer['notify'] = str_replace('https:','http:',$importer['notify']); + $importer['poll'] = str_replace('https:','http:',$importer['poll']); + $importer['confirm'] = str_replace('https:','http:',$importer['confirm']); + $importer['poco'] = str_replace('https:','http:',$importer['poco']); + } + + if($ssl_policy == 'full' && strstr($importer['url'],'http:')) { + $ssl_changed = true; + $importer['url'] = str_replace('http:','https:',$importer['url']); + $importer['nurl'] = normalise_link($importer['url']); + $importer['photo'] = str_replace('http:','https:',$importer['photo']); + $importer['thumb'] = str_replace('http:','https:',$importer['thumb']); + $importer['micro'] = str_replace('http:','https:',$importer['micro']); + $importer['request'] = str_replace('http:','https:',$importer['request']); + $importer['notify'] = str_replace('http:','https:',$importer['notify']); + $importer['poll'] = str_replace('http:','https:',$importer['poll']); + $importer['confirm'] = str_replace('http:','https:',$importer['confirm']); + $importer['poco'] = str_replace('http:','https:',$importer['poco']); + } + + if($ssl_changed) { + q("update contact set + url = '%s', + nurl = '%s', + photo = '%s', + thumb = '%s', + micro = '%s', + request = '%s', + notify = '%s', + poll = '%s', + confirm = '%s', + poco = '%s' + where id = %d limit 1", + dbesc($importer['url']), + dbesc($importer['nurl']), + dbesc($importer['photo']), + dbesc($importer['thumb']), + dbesc($importer['micro']), + dbesc($importer['request']), + dbesc($importer['notify']), + dbesc($importer['poll']), + dbesc($importer['confirm']), + dbesc($importer['poco']), + intval($importer['id']) + ); + } + logger('dfrn_notify: received notify from ' . $importer['name'] . ' for ' . $importer['username']); logger('dfrn_notify: data: ' . $data, LOGGER_DATA); diff --git a/view/admin_site.tpl b/view/admin_site.tpl index 9a12298454..01fe893c65 100755 --- a/view/admin_site.tpl +++ b/view/admin_site.tpl @@ -7,6 +7,7 @@ {{ inc field_textarea.tpl with $field=$banner }}{{ endinc }} {{ inc field_select.tpl with $field=$language }}{{ endinc }} {{ inc field_select.tpl with $field=$theme }}{{ endinc }} + {{ inc field_select.tpl with $field=$ssl_policy }}{{ endinc }}
    From 110e8f29197e0824d555b82c05c31f36b87ab7ae Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 14 Mar 2012 21:20:20 -0700 Subject: [PATCH 046/133] basic ssl_policy for important modules --- include/conversation.php | 40 ++++++++++++++++++-------------- include/nav.php | 8 ++++--- mod/admin.php | 50 ++++++++++++++++++++-------------------- mod/contacts.php | 34 +++++++++++++-------------- mod/manage.php | 2 +- mod/message.php | 20 ++++++++-------- mod/network.php | 26 +++++++++++---------- mod/notifications.php | 44 +++++++++++++++++------------------ mod/notify.php | 4 ++-- mod/profiles.php | 18 +++++++-------- mod/settings.php | 24 +++++++++---------- 11 files changed, 140 insertions(+), 130 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 117127a287..88ecf502b2 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -186,6 +186,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { require_once('bbcode.php'); + $ssl_state = ((local_user()) ? true : false); + $profile_owner = 0; $page_writeable = false; @@ -345,7 +347,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { 'like' => '', 'dislike' => '', 'comment' => '', - 'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl() . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))), + 'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))), 'previewing' => $previewing, 'wait' => t('Please wait'), ); @@ -461,7 +463,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { $comment_lastcollapsed = true; } - $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; + $redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $item['cid'] ; $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])))) @@ -543,7 +545,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { } $edpost = (((($profile_owner == local_user()) && ($toplevelpost) && (intval($item['wall']) == 1)) || ($mode === 'notes')) - ? array($a->get_baseurl()."/editpost/".$item['id'], t("Edit")) + ? array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit")) : False); @@ -697,7 +699,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { $page_template = get_markup_template("conversation.tpl"); $o .= replace_macros($page_template, array( - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl($ssl_state), '$mode' => $mode, '$user' => $a->user, '$threads' => $threads, @@ -707,7 +709,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { return $o; }} -function best_link_url($item,&$sparkle) { +function best_link_url($item,&$sparkle,$ssl_state = false) { $a = get_app(); @@ -719,7 +721,7 @@ function best_link_url($item,&$sparkle) { if((local_user()) && (local_user() == $item['uid'])) { if(isset($a->contacts) && x($a->contacts,$clean_url)) { if($a->contacts[$clean_url]['network'] === NETWORK_DFRN) { - $best_url = $a->get_baseurl() . '/redir/' . $a->contacts[$clean_url]['id']; + $best_url = $a->get_baseurl($ssl_state) . '/redir/' . $a->contacts[$clean_url]['id']; $sparkle = true; } else @@ -740,10 +742,14 @@ function best_link_url($item,&$sparkle) { if(! function_exists('item_photo_menu')){ function item_photo_menu($item){ $a = get_app(); - - if (local_user() && (! count($a->contacts))) - load_contact_links(local_user()); + $ssl_state = false; + + if(local_user()) { + $ssl_state = true; + if(! count($a->contacts)) + load_contact_links(local_user()); + } $contact_url=""; $pm_url=""; $status_link=""; @@ -751,7 +757,7 @@ function item_photo_menu($item){ $posts_link=""; $sparkle = false; - $profile_link = best_link_url($item,$sparkle); + $profile_link = best_link_url($item,$sparkle,$ssl_state); if($profile_link === 'mailbox') $profile_link = ''; @@ -760,7 +766,7 @@ function item_photo_menu($item){ $status_link = $profile_link . "?url=status"; $photos_link = $profile_link . "?url=photos"; $profile_link = $profile_link . "?url=profile"; - $pm_url = $a->get_baseurl() . '/message/new/' . $cid; + $pm_url = $a->get_baseurl($ssl_state) . '/message/new/' . $cid; } else { if(local_user() && local_user() == $item['uid'] && link_compare($item['url'],$item['author-link'])) { @@ -771,8 +777,8 @@ function item_photo_menu($item){ } } if(($cid) && (! $item['self'])) { - $contact_url = $a->get_baseurl() . '/contacts/' . $cid; - $posts_link = $a->get_baseurl() . '/network/?cid=' . $cid; + $contact_url = $a->get_baseurl($ssl_state) . '/contacts/' . $cid; + $posts_link = $a->get_baseurl($ssl_state) . '/network/?cid=' . $cid; } $menu = Array( @@ -808,7 +814,7 @@ function like_puller($a,$item,&$arr,$mode) { if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) { $url = $item['author-link']; if((local_user()) && (local_user() == $item['uid']) && ($item['network'] === 'dfrn') && (! $item['self']) && (link_compare($item['author-link'],$item['url']))) { - $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; + $url = $a->get_baseurl(true) . '/redir/' . $item['contact-id']; $sparkle = ' class="sparkle" '; } if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l'])))) @@ -870,7 +876,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { $a->page['htmlhead'] .= replace_macros($tpl, array( '$newpost' => 'true', - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$geotag' => $geotag, '$nickname' => $x['nickname'], @@ -921,7 +927,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { $o .= replace_macros($tpl,array( '$return_path' => $a->cmd, - '$action' => $a->get_baseurl().'/item', + '$action' => $a->get_baseurl(true) . '/item', '$share' => (x($x,'button') ? $x['button'] : t('Share')), '$upload' => t('Upload photo'), '$shortupload' => t('upload photo'), @@ -945,7 +951,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { '$ptyp' => (($notes_cid) ? 'note' : 'wall'), '$content' => '', '$post_id' => '', - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$defloc' => $x['default_location'], '$visitor' => $x['visitor'], '$pvisit' => (($notes_cid) ? 'none' : $x['visitor']), diff --git a/include/nav.php b/include/nav.php index aadfa82fd8..e280818399 100755 --- a/include/nav.php +++ b/include/nav.php @@ -8,6 +8,8 @@ function nav(&$a) { * */ + $ssl_state = ((local_user()) ? true : false); + if(!(x($a->page,'nav'))) $a->page['nav'] = ''; @@ -27,7 +29,7 @@ function nav(&$a) { $myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : ''); - $sitelocation = $myident . substr($a->get_baseurl(),strpos($a->get_baseurl(),'//') + 2 ); + $sitelocation = $myident . substr($a->get_baseurl($ssl_state),strpos($a->get_baseurl($ssl_state),'//') + 2 ); // nav links: array of array('href', 'text', 'extra css classes', 'title') @@ -53,7 +55,7 @@ function nav(&$a) { // user info $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid'])); $userinfo = array( - 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"), + 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl($ssl_state)."/images/default-profile-mm.jpg"), 'name' => $a->user['username'], ); @@ -76,7 +78,7 @@ function nav(&$a) { if(($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user())) $nav['register'] = array('register',t('Register'), "", t('Create an account')); - $help_url = $a->get_baseurl() . '/help'; + $help_url = $a->get_baseurl($ssl_state) . '/help'; if(! get_config('system','hide_help')) $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation')); diff --git a/mod/admin.php b/mod/admin.php index 2b8d9bcd23..88ccad6d3e 100755 --- a/mod/admin.php +++ b/mod/admin.php @@ -37,7 +37,7 @@ function admin_post(&$a){ $func($a); } } - goaway($a->get_baseurl() . '/admin/plugins/' . $a->argv[2] ); + goaway($a->get_baseurl(true) . '/admin/plugins/' . $a->argv[2] ); return; // NOTREACHED break; case 'logs': @@ -49,7 +49,7 @@ function admin_post(&$a){ } } - goaway($a->get_baseurl() . '/admin' ); + goaway($a->get_baseurl(true) . '/admin' ); return; // NOTREACHED } @@ -68,11 +68,11 @@ function admin_content(&$a) { // array( url, name, extra css classes ) $aside = Array( - 'site' => Array($a->get_baseurl()."/admin/site/", t("Site") , "site"), - 'users' => Array($a->get_baseurl()."/admin/users/", t("Users") , "users"), - 'plugins'=> Array($a->get_baseurl()."/admin/plugins/", t("Plugins") , "plugins"), - 'themes' => Array($a->get_baseurl()."/admin/themes/", t("Themes") , "themes"), - 'update' => Array($a->get_baseurl()."/admin/update/", t("Update") , "update") + 'site' => Array($a->get_baseurl(true)."/admin/site/", t("Site") , "site"), + 'users' => Array($a->get_baseurl(true)."/admin/users/", t("Users") , "users"), + 'plugins'=> Array($a->get_baseurl(true)."/admin/plugins/", t("Plugins") , "plugins"), + 'themes' => Array($a->get_baseurl(true)."/admin/themes/", t("Themes") , "themes"), + 'update' => Array($a->get_baseurl(true)."/admin/update/", t("Update") , "update") ); /* get plugins admin page */ @@ -81,18 +81,18 @@ function admin_content(&$a) { $aside['plugins_admin']=Array(); foreach ($r as $h){ $plugin =$h['name']; - $aside['plugins_admin'][] = Array($a->get_baseurl()."/admin/plugins/".$plugin, $plugin, "plugin"); + $aside['plugins_admin'][] = Array($a->get_baseurl(true)."/admin/plugins/".$plugin, $plugin, "plugin"); // temp plugins with admin $a->plugins_admin[] = $plugin; } - $aside['logs'] = Array($a->get_baseurl()."/admin/logs/", t("Logs"), "logs"); + $aside['logs'] = Array($a->get_baseurl(true)."/admin/logs/", t("Logs"), "logs"); $t = get_markup_template("admin_aside.tpl"); $a->page['aside'] = replace_macros( $t, array( '$admin' => $aside, '$h_pending' => t('User registrations waiting for confirmation'), - '$admurl'=> $a->get_baseurl()."/admin/" + '$admurl'=> $a->get_baseurl(true)."/admin/" )); @@ -255,7 +255,7 @@ function admin_page_site_post(&$a){ set_config('system','diaspora_enabled', $diaspora_enabled); info( t('Site settings updated.') . EOL); - goaway($a->get_baseurl() . '/admin/site' ); + goaway($a->get_baseurl(true) . '/admin/site' ); return; // NOTREACHED } @@ -319,7 +319,7 @@ function admin_page_site(&$a) { '$corporate' => t('Policies'), '$advanced' => t('Advanced'), - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), // name, label, value, help string, extra data... '$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), ""), '$banner' => array('banner', t("Banner/Logo"), $banner, ""), @@ -392,7 +392,7 @@ function admin_page_users_post(&$a){ user_deny($hash); } } - goaway($a->get_baseurl() . '/admin/users' ); + goaway($a->get_baseurl(true) . '/admin/users' ); return; // NOTREACHED } @@ -402,7 +402,7 @@ function admin_page_users(&$a){ $user = q("SELECT * FROM `user` WHERE `uid`=%d", intval($uid)); if (count($user)==0){ notice( 'User not found' . EOL); - goaway($a->get_baseurl() . '/admin/users' ); + goaway($a->get_baseurl(true) . '/admin/users' ); return; // NOTREACHED } switch($a->argv[2]){ @@ -421,7 +421,7 @@ function admin_page_users(&$a){ notice( sprintf( ($user[0]['blocked']?t("User '%s' unblocked"):t("User '%s' blocked")) , $user[0]['username']) . EOL); }; break; } - goaway($a->get_baseurl() . '/admin/users' ); + goaway($a->get_baseurl(true) . '/admin/users' ); return; // NOTREACHED } @@ -500,7 +500,7 @@ function admin_page_users(&$a){ // values // - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$pending' => $pending, '$users' => $users, @@ -539,7 +539,7 @@ function admin_page_plugins(&$a){ info( sprintf( t("Plugin %s enabled."), $plugin ) ); } set_config("system","addon", implode(", ",$a->plugins)); - goaway($a->get_baseurl() . '/admin/plugins' ); + goaway($a->get_baseurl(true) . '/admin/plugins' ); return; // NOTREACHED } // display plugin details @@ -572,7 +572,7 @@ function admin_page_plugins(&$a){ '$page' => t('Plugins'), '$toggle' => t('Toggle'), '$settings' => t('Settings'), - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$plugin' => $plugin, '$status' => $status, @@ -610,7 +610,7 @@ function admin_page_plugins(&$a){ '$title' => t('Administration'), '$page' => t('Plugins'), '$submit' => t('Submit'), - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$function' => 'plugins', '$plugins' => $plugins )); @@ -716,7 +716,7 @@ function admin_page_themes(&$a){ info( sprintf('Theme %s disabled.',$theme)); set_config('system','allowed_themes',$s); - goaway($a->get_baseurl() . '/admin/themes' ); + goaway($a->get_baseurl(true) . '/admin/themes' ); return; // NOTREACHED } @@ -745,7 +745,7 @@ function admin_page_themes(&$a){ '$page' => t('Themes'), '$toggle' => t('Toggle'), '$settings' => t('Settings'), - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$plugin' => $theme, '$status' => $status, @@ -777,7 +777,7 @@ function admin_page_themes(&$a){ '$title' => t('Administration'), '$page' => t('Themes'), '$submit' => t('Submit'), - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$function' => 'themes', '$plugins' => $xthemes, '$experimental' => t('[Experimental]'), @@ -805,7 +805,7 @@ function admin_page_logs_post(&$a) { } info( t("Log settings updated.") ); - goaway($a->get_baseurl() . '/admin/logs' ); + goaway($a->get_baseurl(true) . '/admin/logs' ); return; // NOTREACHED } @@ -859,7 +859,7 @@ readable."); '$submit' => t('Submit'), '$clear' => t('Clear'), '$data' => $data, - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$logname' => get_config('system','logfile'), // name, label, value, help string, extra data... @@ -904,7 +904,7 @@ function admin_page_remoteupdate(&$a) { $tpl = get_markup_template("admin_remoteupdate.tpl"); return replace_macros($tpl, array( - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$submit' => t("Update now"), '$close' => t("Close"), '$localversion' => FRIENDICA_VERSION, diff --git a/mod/contacts.php b/mod/contacts.php index 38ca570ddf..78c8d40928 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -61,7 +61,7 @@ function contacts_post(&$a) { if(! count($orig_record)) { notice( t('Could not access contact record.') . EOL); - goaway($a->get_baseurl() . '/contacts'); + goaway($a->get_baseurl(true) . '/contacts'); return; // NOTREACHED } @@ -141,7 +141,7 @@ function contacts_content(&$a) { if(! count($orig_record)) { notice( t('Could not access contact record.') . EOL); - goaway($a->get_baseurl() . '/contacts'); + goaway($a->get_baseurl(true) . '/contacts'); return; // NOTREACHED } @@ -149,7 +149,7 @@ function contacts_content(&$a) { // pull feed and consume it, which should subscribe to the hub. proc_run('php',"include/poller.php","$contact_id"); - goaway($a->get_baseurl() . '/contacts/' . $contact_id); + goaway($a->get_baseurl(true) . '/contacts/' . $contact_id); // NOTREACHED } @@ -164,7 +164,7 @@ function contacts_content(&$a) { //notice( t('Contact has been ') . (($blocked) ? t('blocked') : t('unblocked')) . EOL ); info( (($blocked) ? t('Contact has been blocked') : t('Contact has been unblocked')) . EOL ); } - goaway($a->get_baseurl() . '/contacts/' . $contact_id); + goaway($a->get_baseurl(true) . '/contacts/' . $contact_id); return; // NOTREACHED } @@ -178,7 +178,7 @@ function contacts_content(&$a) { if($r) { info( (($readonly) ? t('Contact has been ignored') : t('Contact has been unignored')) . EOL ); } - goaway($a->get_baseurl() . '/contacts/' . $contact_id); + goaway($a->get_baseurl(true) . '/contacts/' . $contact_id); return; // NOTREACHED } @@ -220,9 +220,9 @@ function contacts_content(&$a) { contact_remove($orig_record[0]['id']); info( t('Contact has been removed.') . EOL ); if(x($_SESSION,'return_url')) - goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); + goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']); else - goaway($a->get_baseurl() . '/contacts'); + goaway($a->get_baseurl(true) . '/contacts'); return; // NOTREACHED } } @@ -233,7 +233,7 @@ function contacts_content(&$a) { $contact = $a->data['contact']; $tpl = get_markup_template('contact_head.tpl'); - $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl())); + $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true))); require_once('include/contact_selectors.php'); @@ -295,17 +295,17 @@ function contacts_content(&$a) { $tabs = array( array( 'label' => (($contact['blocked']) ? t('Unblock') : t('Block') ), - 'url' => $a->get_baseurl() . '/contacts/' . $contact_id . '/block', + 'url' => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/block', 'sel' => '', ), array( 'label' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ), - 'url' => $a->get_baseurl() . '/contacts/' . $contact_id . '/ignore', + 'url' => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/ignore', 'sel' => '', ), array( 'label' => t('Repair'), - 'url' => $a->get_baseurl() . '/crepair/' . $contact_id, + 'url' => $a->get_baseurl(true) . '/crepair/' . $contact_id, 'sel' => '', ) ); @@ -322,7 +322,7 @@ function contacts_content(&$a) { '$lbl_info1' => t('Contact Information / Notes'), '$infedit' => t('Edit contact notes'), '$common_text' => $common_text, - '$common_link' => $a->get_baseurl() . '/common/' . $contact['id'], + '$common_link' => $a->get_baseurl(true) . '/common/' . $contact['id'], '$all_friends' => $all_friends, '$relation_text' => $relation_text, '$visit' => sprintf( t('Visit %s\'s profile [%s]'),$contact['name'],$contact['url']), @@ -397,30 +397,30 @@ function contacts_content(&$a) { $tabs = array( array( 'label' => t('All Contacts'), - 'url' => $a->get_baseurl() . '/contacts/all', + 'url' => $a->get_baseurl(true) . '/contacts/all', 'sel' => ($all) ? 'active' : '', ), array( 'label' => t('Unblocked Contacts'), - 'url' => $a->get_baseurl() . '/contacts', + 'url' => $a->get_baseurl(true) . '/contacts', 'sel' => ((! $all) && (! $blocked) && (! $hidden) && (! $search) && (! $nets) && (! $ignored)) ? 'active' : '', ), array( 'label' => t('Blocked Contacts'), - 'url' => $a->get_baseurl() . '/contacts/blocked', + 'url' => $a->get_baseurl(true) . '/contacts/blocked', 'sel' => ($blocked) ? 'active' : '', ), array( 'label' => t('Ignored Contacts'), - 'url' => $a->get_baseurl() . '/contacts/ignored', + 'url' => $a->get_baseurl(true) . '/contacts/ignored', 'sel' => ($ignored) ? 'active' : '', ), array( 'label' => t('Hidden Contacts'), - 'url' => $a->get_baseurl() . '/contacts/hidden', + 'url' => $a->get_baseurl(true) . '/contacts/hidden', 'sel' => ($hidden) ? 'active' : '', ), diff --git a/mod/manage.php b/mod/manage.php index ec4dcd8a00..84dfa6917c 100755 --- a/mod/manage.php +++ b/mod/manage.php @@ -74,7 +74,7 @@ function manage_post(&$a) { if($limited_id) $_SESSION['submanage'] = $original_id; - goaway($a->get_baseurl() . '/profile/' . $a->user['nickname']); + goaway($a->get_baseurl(true) . '/profile/' . $a->user['nickname']); // NOTREACHED } diff --git a/mod/message.php b/mod/message.php index 65f692f3d5..55e313776d 100755 --- a/mod/message.php +++ b/mod/message.php @@ -56,23 +56,23 @@ function message_content(&$a) { return; } - $myprofile = $a->get_baseurl() . '/profile/' . $a->user['nickname']; + $myprofile = $a->get_baseurl(true) . '/profile/' . $a->user['nickname']; $tabs = array( array( 'label' => t('Inbox'), - 'url'=> $a->get_baseurl() . '/message', + 'url'=> $a->get_baseurl(true) . '/message', 'sel'=> (($a->argc == 1) ? 'active' : ''), ), array( 'label' => t('Outbox'), - 'url' => $a->get_baseurl() . '/message/sent', + 'url' => $a->get_baseurl(true) . '/message/sent', 'sel'=> (($a->argv[1] == 'sent') ? 'active' : ''), ), array( 'label' => t('New Message'), - 'url' => $a->get_baseurl() . '/message/new', + 'url' => $a->get_baseurl(true) . '/message/new', 'sel'=> (($a->argv[1] == 'new') ? 'active' : ''), ), ); @@ -99,7 +99,7 @@ function message_content(&$a) { if($r) { info( t('Message deleted.') . EOL ); } - goaway($a->get_baseurl() . '/message' ); + goaway($a->get_baseurl(true) . '/message' ); } else { $r = q("SELECT `parent-uri`,`convid` FROM `mail` WHERE `id` = %d AND `uid` = %d LIMIT 1", @@ -129,7 +129,7 @@ function message_content(&$a) { if($r) info( t('Conversation removed.') . EOL ); } - goaway($a->get_baseurl() . '/message' ); + goaway($a->get_baseurl(true) . '/message' ); } } @@ -146,7 +146,7 @@ function message_content(&$a) { $tpl = get_markup_template('msg-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array( - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$nickname' => $a->user['nickname'], '$linkurl' => t('Please enter a link URL:') @@ -210,7 +210,7 @@ function message_content(&$a) { $o .= replace_macros($tpl, array( '$id' => $rr['id'], '$from_name' =>$rr['from-name'], - '$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl() . '/redir/' . $rr['contact-id'] : $rr['url']), + '$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl(true) . '/redir/' . $rr['contact-id'] : $rr['url']), '$sparkle' => ' sparkle', '$from_photo' => $rr['thumb'], '$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '' . $rr['title'] . '')), @@ -267,7 +267,7 @@ function message_content(&$a) { $a->page['htmlhead'] .= replace_macros($tpl, array( '$nickname' => $a->user['nickname'], - '$baseurl' => $a->get_baseurl() + '$baseurl' => $a->get_baseurl(true) )); @@ -278,7 +278,7 @@ function message_content(&$a) { $sparkle = ''; } else { - $from_url = $a->get_baseurl() . '/redir/' . $message['contact-id']; + $from_url = $a->get_baseurl(true) . '/redir/' . $message['contact-id']; $sparkle = ' sparkle'; } $o .= replace_macros($tpl, array( diff --git a/mod/network.php b/mod/network.php index e9f3913ff4..d0f1733f46 100755 --- a/mod/network.php +++ b/mod/network.php @@ -44,14 +44,16 @@ function network_init(&$a) { } $a->page['aside'] .= group_side('network','network',true,$group_id); - $a->page['aside'] .= networks_widget($a->get_baseurl() . '/network',(x($_GET, 'nets') ? $_GET['nets'] : '')); + $a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : '')); $a->page['aside'] .= saved_searches($search); - $a->page['aside'] .= fileas_widget($a->get_baseurl() . '/network',(x($_GET, 'file') ? $_GET['file'] : '')); + $a->page['aside'] .= fileas_widget($a->get_baseurl(true) . '/network',(x($_GET, 'file') ? $_GET['file'] : '')); } function saved_searches($search) { + $a = get_app(); + $srchurl = '/network?f=' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'star')) ? '&star=' . $_GET['star'] : '') @@ -88,7 +90,7 @@ function saved_searches($search) { $o = replace_macros($tpl, array( '$title' => t('Saved Searches'), '$add' => t('add'), - '$searchbox' => search($search,'netsearch-box',$srchurl,true), + '$searchbox' => search($search,'netsearch-box',$a->get_baseurl(true) . $srchurl,true), '$saved' => $saved, )); @@ -167,38 +169,38 @@ function network_content(&$a, $update = 0) { $tabs = array( array( 'label' => t('Commented Order'), - 'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '?f=&cid=' . $_GET['cid'] : ''), + 'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '?f=&cid=' . $_GET['cid'] : ''), 'sel'=>$all_active, ), array( 'label' => t('Posted Order'), - 'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''), + 'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''), 'sel'=>$postord_active, ), array( 'label' => t('Personal'), - 'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&conv=1', + 'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&conv=1', 'sel' => $conv_active, ), array( 'label' => t('New'), - 'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '/new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''), + 'url' => $a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . '/new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''), 'sel' => $new_active, ), array( 'label' => t('Starred'), - 'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1', + 'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1', 'sel'=>$starred_active, ), array( 'label' => t('Shared Links'), - 'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1', + 'url'=>$a->get_baseurl(true) . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1', 'sel'=>$bookmarked_active, ), // array( // 'label' => t('Spam'), -// 'url'=>$a->get_baseurl() . '/network?f=&spam=1' +// 'url'=>$a->get_baseurl(true) . '/network?f=&spam=1' // 'sel'=> $spam_active, // ), @@ -300,7 +302,7 @@ function network_content(&$a, $update = 0) { if($update) killme(); notice( t('No such group') . EOL ); - goaway($a->get_baseurl() . '/network'); + goaway($a->get_baseurl(true) . '/network'); // NOTREACHED } @@ -332,7 +334,7 @@ function network_content(&$a, $update = 0) { } else { notice( t('Invalid contact.') . EOL); - goaway($a->get_baseurl() . '/network'); + goaway($a->get_baseurl(true) . '/network'); // NOTREACHED } } diff --git a/mod/notifications.php b/mod/notifications.php index 99031a1d59..d478b51634 100755 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -42,12 +42,12 @@ function notifications_post(&$a) { intval(local_user()) ); } - goaway($a->get_baseurl() . '/notifications/intros'); + goaway($a->get_baseurl(true) . '/notifications/intros'); } if($_POST['submit'] == t('Ignore')) { $r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d LIMIT 1", intval($intro_id)); - goaway($a->get_baseurl() . '/notifications/intros'); + goaway($a->get_baseurl(true) . '/notifications/intros'); } } } @@ -69,32 +69,32 @@ function notifications_content(&$a) { $tabs = array( array( 'label' => t('System'), - 'url'=>$a->get_baseurl() . '/notifications/system', + 'url'=>$a->get_baseurl(true) . '/notifications/system', 'sel'=> (($a->argv[1] == 'system') ? 'active' : ''), ), array( 'label' => t('Network'), - 'url'=>$a->get_baseurl() . '/notifications/network', + 'url'=>$a->get_baseurl(true) . '/notifications/network', 'sel'=> (($a->argv[1] == 'network') ? 'active' : ''), ), array( 'label' => t('Personal'), - 'url'=>$a->get_baseurl() . '/notifications/personal', + 'url'=>$a->get_baseurl(true) . '/notifications/personal', 'sel'=> (($a->argv[1] == 'personal') ? 'active' : ''), ), array( 'label' => t('Home'), - 'url' => $a->get_baseurl() . '/notifications/home', + 'url' => $a->get_baseurl(true) . '/notifications/home', 'sel'=> (($a->argv[1] == 'home') ? 'active' : ''), ), array( 'label' => t('Introductions'), - 'url' => $a->get_baseurl() . '/notifications/intros', + 'url' => $a->get_baseurl(true) . '/notifications/intros', 'sel'=> (($a->argv[1] == 'intros') ? 'active' : ''), ), array( 'label' => t('Messages'), - 'url' => $a->get_baseurl() . '/message', + 'url' => $a->get_baseurl(true) . '/message', 'sel'=> '', ), ); @@ -244,7 +244,7 @@ function notifications_content(&$a) { switch($it['verb']){ case ACTIVITY_LIKE: $notif_content .= replace_macros($tpl_item_likes,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) @@ -253,7 +253,7 @@ function notifications_content(&$a) { case ACTIVITY_DISLIKE: $notif_content .= replace_macros($tpl_item_dislikes,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) @@ -267,7 +267,7 @@ function notifications_content(&$a) { $it['fname'] = $obj->title; $notif_content .= replace_macros($tpl_item_friends,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']), '$item_when' => relative_date($it['created']) @@ -281,7 +281,7 @@ function notifications_content(&$a) { $tpl = (($it['id'] == $it['parent']) ? $tpl_item_posts : $tpl_item_comments); $notif_content .= replace_macros($tpl,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => $item_text, '$item_when' => relative_date($it['created']) @@ -314,7 +314,7 @@ function notifications_content(&$a) { if (count($r) > 0) { foreach ($r as $it) { $notif_content .= replace_macros($not_tpl,array( - '$item_link' => $a->get_baseurl().'/notify/view/'. $it['id'], + '$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'], '$item_image' => $it['photo'], '$item_text' => strip_tags(bbcode($it['msg'])), '$item_when' => relative_date($it['date']) @@ -334,7 +334,7 @@ function notifications_content(&$a) { $notif_tpl = get_markup_template('notifications.tpl'); - $myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname']; + $myurl = $a->get_baseurl(true) . '/profile/'. $a->user['nickname']; $myurl = substr($myurl,strpos($myurl,'://')+3); $myurl = str_replace(array('www.','.'),array('','\\.'),$myurl); $diasp_url = str_replace('/profile/','/u/',$myurl); @@ -369,7 +369,7 @@ function notifications_content(&$a) { switch($it['verb']){ case ACTIVITY_LIKE: $notif_content .= replace_macros($tpl_item_likes,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) @@ -378,7 +378,7 @@ function notifications_content(&$a) { case ACTIVITY_DISLIKE: $notif_content .= replace_macros($tpl_item_dislikes,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) @@ -392,7 +392,7 @@ function notifications_content(&$a) { $it['fname'] = $obj->title; $notif_content .= replace_macros($tpl_item_friends,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']), '$item_when' => relative_date($it['created']) @@ -406,7 +406,7 @@ function notifications_content(&$a) { $tpl = (($it['id'] == $it['parent']) ? $tpl_item_posts : $tpl_item_comments); $notif_content .= replace_macros($tpl,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => $item_text, '$item_when' => relative_date($it['created']) @@ -456,7 +456,7 @@ function notifications_content(&$a) { switch($it['verb']){ case ACTIVITY_LIKE: $notif_content .= replace_macros($tpl_item_likes,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) @@ -465,7 +465,7 @@ function notifications_content(&$a) { break; case ACTIVITY_DISLIKE: $notif_content .= replace_macros($tpl_item_dislikes,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) @@ -479,7 +479,7 @@ function notifications_content(&$a) { $it['fname'] = $obj->title; $notif_content .= replace_macros($tpl_item_friends,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']), '$item_when' => relative_date($it['created']) @@ -488,7 +488,7 @@ function notifications_content(&$a) { break; default: $notif_content .= replace_macros($tpl_item_comments,array( - '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'], + '$item_link' => $a->get_baseurl(true).'/display/'.$a->user['nickname']."/".$it['parent'], '$item_image' => $it['author-avatar'], '$item_text' => sprintf( t("%s commented on %s's post"), $it['author-name'], $it['pname']), '$item_when' => relative_date($it['created']) diff --git a/mod/notify.php b/mod/notify.php index a572b15344..ae8273a1d3 100644 --- a/mod/notify.php +++ b/mod/notify.php @@ -20,7 +20,7 @@ function notify_init(&$a) { goaway($r[0]['link']); } - goaway($a->get_baseurl()); + goaway($a->get_baseurl(true)); } if($a->argc > 2 && $a->argv[1] === 'mark' && $a->argv[2] === 'all' ) { @@ -51,7 +51,7 @@ function notify_content(&$a) { if (count($r) > 0) { foreach ($r as $it) { $notif_content .= replace_macros($not_tpl,array( - '$item_link' => $a->get_baseurl().'/notify/view/'. $it['id'], + '$item_link' => $a->get_baseurl(true).'/notify/view/'. $it['id'], '$item_image' => $it['photo'], '$item_text' => strip_tags(bbcode($it['msg'])), '$item_when' => relative_date($it['date']) diff --git a/mod/profiles.php b/mod/profiles.php index b307a2d43b..7b3b6ccc1e 100755 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -240,7 +240,7 @@ function profiles_content(&$a) { ); if(! count($r)) { notice( t('Profile not found.') . EOL); - goaway($a->get_baseurl() . '/profiles'); + goaway($a->get_baseurl(true) . '/profiles'); return; // NOTREACHED } @@ -260,7 +260,7 @@ function profiles_content(&$a) { if($r) info( t('Profile deleted.') . EOL); - goaway($a->get_baseurl() . '/profiles'); + goaway($a->get_baseurl(true) . '/profiles'); return; // NOTREACHED } @@ -297,9 +297,9 @@ function profiles_content(&$a) { info( t('New profile created.') . EOL); if(count($r3) == 1) - goaway($a->get_baseurl() . '/profiles/' . $r3[0]['id']); + goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']); - goaway($a->get_baseurl() . '/profiles'); + goaway($a->get_baseurl(true) . '/profiles'); } if(($a->argc > 2) && ($a->argv[1] === 'clone')) { @@ -339,9 +339,9 @@ function profiles_content(&$a) { ); info( t('New profile created.') . EOL); if(count($r3) == 1) - goaway($a->get_baseurl() . '/profiles/' . $r3[0]['id']); + goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']); - goaway($a->get_baseurl() . '/profiles'); + goaway($a->get_baseurl(true) . '/profiles'); return; // NOTREACHED } @@ -373,7 +373,7 @@ function profiles_content(&$a) { )); - $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl())); + $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true))); $a->page['htmlhead'] .= ""; $f = get_config('system','birthday_input_format'); @@ -425,7 +425,7 @@ function profiles_content(&$a) { '$lbl_work' => t('Work/employment'), '$lbl_school' => t('School/education'), '$disabled' => (($is_default) ? 'onclick="return false;" style="color: #BBBBFF;"' : ''), - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$profile_id' => $r[0]['id'], '$profile_name' => $r[0]['profile-name'], '$default' => (($is_default) ? '

    ' . t('This is your public profile.
    It may be visible to anybody using the internet.') . '

    ' : ""), @@ -489,7 +489,7 @@ function profiles_content(&$a) { '$alt' => t('Profile Image'), '$profile_name' => $rr['profile-name'], '$visible' => (($rr['is-default']) ? '' . t('visible to everybody') . '' - : '' . t('Edit visibility') . '') + : '' . t('Edit visibility') . '') )); } } diff --git a/mod/settings.php b/mod/settings.php index 15fd0c352e..f694b5840f 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -59,7 +59,7 @@ function settings_post(&$a) { q("DELETE FROM tokens WHERE id='%s' AND uid=%d", dbesc($key), local_user()); - goaway($a->get_baseurl()."/settings/oauth/"); + goaway($a->get_baseurl(true)."/settings/oauth/"); return; } @@ -104,7 +104,7 @@ function settings_post(&$a) { local_user()); } } - goaway($a->get_baseurl()."/settings/oauth/"); + goaway($a->get_baseurl(true)."/settings/oauth/"); return; } @@ -411,7 +411,7 @@ function settings_post(&$a) { } - goaway($a->get_baseurl() . '/settings' ); + goaway($a->get_baseurl(true) . '/settings' ); return; // NOTREACHED } @@ -435,27 +435,27 @@ function settings_content(&$a) { $tabs = array( array( 'label' => t('Account settings'), - 'url' => $a->get_baseurl().'/settings', + 'url' => $a->get_baseurl(true).'/settings', 'sel' => (($a->argc == 1)?'active':''), ), array( 'label' => t('Connector settings'), - 'url' => $a->get_baseurl().'/settings/connectors', + 'url' => $a->get_baseurl(true).'/settings/connectors', 'sel' => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''), ), array( 'label' => t('Plugin settings'), - 'url' => $a->get_baseurl().'/settings/addon', + 'url' => $a->get_baseurl(true).'/settings/addon', 'sel' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''), ), array( 'label' => t('Connections'), - 'url' => $a->get_baseurl() . '/settings/oauth', + 'url' => $a->get_baseurl(true) . '/settings/oauth', 'sel' => (($a->argc > 1) && ($a->argv[1] === 'oauth')?'active':''), ), array( 'label' => t('Export personal data'), - 'url' => $a->get_baseurl() . '/uexport', + 'url' => $a->get_baseurl(true) . '/uexport', 'sel' => '' ) ); @@ -517,7 +517,7 @@ function settings_content(&$a) { $r = q("DELETE FROM clients WHERE client_id='%s' AND uid=%d", dbesc($a->argv[3]), local_user()); - goaway($a->get_baseurl()."/settings/oauth/"); + goaway($a->get_baseurl(true)."/settings/oauth/"); return; } @@ -533,7 +533,7 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_oauth.tpl"); $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_oauth"), - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$title' => t('Connected Apps'), '$add' => t('Add application'), '$edit' => t('Edit'), @@ -789,7 +789,7 @@ function settings_content(&$a) { $theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']); - $subdir = ((strlen($a->get_path())) ? '
    ' . t('or') . ' ' . $a->get_baseurl() . '/profile/' . $nickname : ''); + $subdir = ((strlen($a->get_path())) ? '
    ' . t('or') . ' ' . $a->get_baseurl(true) . '/profile/' . $nickname : ''); $tpl_addr = get_markup_template("settings_nick_set.tpl"); @@ -819,7 +819,7 @@ function settings_content(&$a) { '$ptitle' => t('Account Settings'), '$submit' => t('Submit'), - '$baseurl' => $a->get_baseurl(), + '$baseurl' => $a->get_baseurl(true), '$uid' => local_user(), '$form_security_token' => get_form_security_token("settings"), From 93a8907f435e1b6ca55fa816ffb81b47a018db03 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 14 Mar 2012 21:29:44 -0700 Subject: [PATCH 047/133] force login to ssl on SSL_POLICY_SELFSIGN --- boot.php | 18 +++++++++++------- view/login.tpl | 2 +- view/logout.tpl | 2 +- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/boot.php b/boot.php index 22a4e39be5..c4cfbe5bf8 100755 --- a/boot.php +++ b/boot.php @@ -696,6 +696,7 @@ function get_guid($size=16) { if(! function_exists('login')) { function login($register = false, $hiddens=false) { + $a = get_app(); $o = ""; $reg = false; if ($register) { @@ -715,23 +716,26 @@ function login($register = false, $hiddens=false) { } + $dest_url = $a->get_baseurl(true) . '/' . $a->query_string; $o .= replace_macros($tpl,array( - '$logout' => t('Logout'), - '$login' => t('Login'), + + '$dest_url' => $dest_url, + '$logout' => t('Logout'), + '$login' => t('Login'), '$lname' => array('username', t('Nickname or Email address: ') , '', ''), '$lpassword' => array('password', t('Password: '), '', ''), '$openid' => !$noid, - '$lopenid' => array('openid_url', t('Or login using OpenID: '),'',''), + '$lopenid' => array('openid_url', t('Or login using OpenID: '),'',''), - '$hiddens' => $hiddens, + '$hiddens' => $hiddens, - '$register' => $reg, + '$register' => $reg, - '$lostpass' => t('Forgot your password?'), - '$lostlink' => t('Password Reset'), + '$lostpass' => t('Forgot your password?'), + '$lostlink' => t('Password Reset'), )); call_hooks('login_hook',$o); diff --git a/view/login.tpl b/view/login.tpl index 5349fa3d83..4cbbb16240 100755 --- a/view/login.tpl +++ b/view/login.tpl @@ -1,5 +1,5 @@ - +
    diff --git a/view/logout.tpl b/view/logout.tpl index 6a84a5bbcf..efc971df84 100755 --- a/view/logout.tpl +++ b/view/logout.tpl @@ -1,4 +1,4 @@ - +
    From b44533e9fb685bb4b38073a90003d61911e1e24e Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 14 Mar 2012 21:40:36 -0700 Subject: [PATCH 048/133] roll protocol version due to ssl_policy settings --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index c4cfbe5bf8..04f36093bf 100755 --- a/boot.php +++ b/boot.php @@ -10,7 +10,7 @@ require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '2.3.1281' ); -define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); +define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1131 ); define ( 'EOL', "
    \r\n" ); From b06c5983a4dae26dd24aecd7473bad98558cd6fc Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 14 Mar 2012 21:58:54 -0700 Subject: [PATCH 049/133] don't allow multiple friends with http/https same person, don't show mail2 coming soon unless person is allowed to have email contacts --- mod/dfrn_request.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 4acb5c9bb5..c2d37dac7e 100755 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -77,9 +77,10 @@ function dfrn_request_post(&$a) { * Lookup the contact based on their URL (which is the only unique thing we have at the moment) */ - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `self` = 0 LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND (`url` = '%s' OR `nurl` = '%s') AND `self` = 0 LIMIT 1", intval(local_user()), - dbesc($dfrn_url) + dbesc($dfrn_url), + dbesc(normalise_link($dfrn_url)) ); if(count($r)) { @@ -668,7 +669,21 @@ function dfrn_request_content(&$a) { $page_desc .= t("Please enter your 'Identity Address' from one of the following supported communications networks:"); - $emailnet = t("Connect as an email follower \x28Coming soon\x29"); + // see if we are allowed to have NETWORK_MAIL2 contacts + + $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); + if(get_config('system','dfrn_only')) + $mail_disabled = 1; + + if(! $mail_disabled) { + $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1", + intval($a->profile['uid']) + ); + if(! count($r)) + $mail_disabled = 1; + } + + $emailnet = (($mail_disabled) ? '' : t("Connect as an email follower \x28Coming soon\x29")); $invite_desc = t('If you are not yet a member of the free social web, follow this link to find a public Friendica site and join us today.'); From 6dbee45d92450131bad7a8381a0339a880dacfd9 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Thu, 15 Mar 2012 08:29:39 +0100 Subject: [PATCH 050/133] add links to wall, photos, events, etc to aside on networkpage, fixes in css --- view/theme/diabook-blue/icons/toogle_off.png | Bin 391 -> 834 bytes view/theme/diabook-blue/icons/toogle_on.png | Bin 429 -> 715 bytes view/theme/diabook-blue/profile_side.tpl | 3 +- view/theme/diabook-blue/style.css | 40 +++++++++++++++---- view/theme/diabook-blue/theme.php | 2 +- view/theme/diabook/icons/toogle_off.png | Bin 391 -> 834 bytes view/theme/diabook/icons/toogle_on.png | Bin 429 -> 715 bytes view/theme/diabook/profile_side.tpl | 3 +- view/theme/diabook/style.css | 38 +++++++++++++++--- view/theme/diabook/theme.php | 9 ++--- 10 files changed, 74 insertions(+), 21 deletions(-) mode change 100755 => 100644 view/theme/diabook-blue/icons/toogle_off.png mode change 100755 => 100644 view/theme/diabook-blue/icons/toogle_on.png mode change 100755 => 100644 view/theme/diabook/icons/toogle_off.png mode change 100755 => 100644 view/theme/diabook/icons/toogle_on.png diff --git a/view/theme/diabook-blue/icons/toogle_off.png b/view/theme/diabook-blue/icons/toogle_off.png old mode 100755 new mode 100644 index 99490bcd956d9ab7359265a6ecd0aa4a6e5d77b8..0fcce4d5abe02fd91f47054311ee2cc6c567eaa3 GIT binary patch delta 750 zcmVVi|K~y-))s#UjgqunmtsnRllyr(QYC_X&pQVSnFY|gZKVIR)neJ2PV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UD&hX`Wj8N7(R!W#r^qA8+9FwbUQSRQ$a8siVc+c!J^zdN(D%O7KH z&fFGSIKWQ$-jJb>kDn~m3E~)e$;L6)`Hs*gdI@=g5r$!-@P8Haz2HRFZm(pBEiU4Nnz2v*=K&+NOqwBApq%SlKq^#vUx& o*ekhuD|sB2e!l+gf&DeU01zaMNb{IjV*mgE07*qoM6N<$g36Me00000 diff --git a/view/theme/diabook-blue/profile_side.tpl b/view/theme/diabook-blue/profile_side.tpl index 595684bf51..01da55ce1c 100644 --- a/view/theme/diabook-blue/profile_side.tpl +++ b/view/theme/diabook-blue/profile_side.tpl @@ -8,10 +8,11 @@
    diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index 5143140497..bdc79a350d 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -461,7 +461,7 @@ code { } #panel { position: absolute; - width: 10em; + width: 12em; background: #ffffff; color: #2d2d2d; margin: 0px; @@ -780,8 +780,6 @@ ul.menu-popup { margin: 0px; padding: 0px; list-style: none; - border: 1px solid #364e59; - border-top-color: transparent; z-index: 100000; -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); @@ -1922,7 +1920,7 @@ max-width: 85%; } .lframe { float: left; - margin: 0px 10px 10px 0px; + /*margin: 0px 10px 10px 0px;*/ } /* profile match wrapper */ .profile-match-wrapper { @@ -2362,8 +2360,36 @@ float: left; .contact-details { color: #999999; } - -.photo-top-image-wrapper { +#side-bar-photos-albums{ + margin-top: 15px; + } +.photo-top-photo, .photo-album-photo { + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.photo-album-image-wrapper, .photo-top-image-wrapper { + float: left; + -moz-box-shadow: 0 0 5px #888; + -webkit-box-shadow: 0 0 5px #888; + box-shadow: 0 0 5px #888; + background-color: #EEE; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + padding-bottom: 20px; + position: relative; + margin: 0 10px 10px 0; +} +.photo-top-album-name { + position: absolute; + bottom: 0; + padding: 0 5px; +} +.photo-top-album-link{ + color: #1872A2; + } +/*.photo-top-image-wrapper { position: relative; float: left; margin-top: 15px; @@ -2379,7 +2405,7 @@ float: left; padding: 0px 3px; padding-top: 0.5em; background-color: rgb(255, 255, 255); -} +}*/ #photo-top-end { clear: both; } diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 75abb2fdf1..9093ac2ca2 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -34,7 +34,7 @@ $ps['usermenu'][profile] = Array('profile/' . $a->user['nickname']. '?tab=profil $ps['usermenu'][photos] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos')); $ps['usermenu'][events] = Array('events/', t('Events'), "", t('Your events')); $ps['usermenu'][notes] = Array('notes/', t('Personal notes'), "", t('Your personal photos')); - +$ps['usermenu'][community] = Array('community/', t('Community'), "", ""); if($is_url = preg_match ("/\bnetwork\b/i", $_SERVER['REQUEST_URI'])) { $tpl = get_markup_template('profile_side.tpl'); diff --git a/view/theme/diabook/icons/toogle_off.png b/view/theme/diabook/icons/toogle_off.png old mode 100755 new mode 100644 index 99490bcd956d9ab7359265a6ecd0aa4a6e5d77b8..0fcce4d5abe02fd91f47054311ee2cc6c567eaa3 GIT binary patch delta 750 zcmVVi|K~y-))s#UjgqunmtsnRllyr(QYC_X&pQVSnFY|gZKVIR)neJ2PVVTTDdiF z=ZBy74c2Sljy8v0-afpIt4T~sNe~gFlq?A3LU@f4YOf!8cjoq$3!9+odFS%&?-M2E zJGCUa=++6v^G;wMa^7z6~Meba3xY8L0p;=-7JST=9_2F=I`_c0>B4v z9h~WA`hUz?H_fxckn@3+QWRLA(3aY1j*U!TT3A{;{mH2*{f|%Yv*{b>8jZm-FO7}T z&h1Tf*1Pz1aTzP^_QT1BIQr(>$2xykCwc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b/view/theme/diabook/profile_side.tpl index 595684bf51..01da55ce1c 100644 --- a/view/theme/diabook/profile_side.tpl +++ b/view/theme/diabook/profile_side.tpl @@ -8,10 +8,11 @@
    diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index df692cbc65..437f323faa 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -462,7 +462,7 @@ code { } #panel { position: absolute; - width: 10em; + width: 12em; background: #ffffff; color: #2d2d2d; margin: 0px; @@ -769,8 +769,6 @@ ul.menu-popup { margin: 0px; padding: 0px; list-style: none; - border: 1px solid #364e59; - border-top-color: transparent; z-index: 100000; -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); @@ -1904,7 +1902,6 @@ ul.tabs li .active { /* photo */ .lframe { float: left; - margin: 0px 10px 10px 0px; } /* profile match wrapper */ .profile-match-wrapper { @@ -2352,7 +2349,36 @@ float: left; color: #999999; } -.photo-top-image-wrapper { +#side-bar-photos-albums{ + margin-top: 15px; + } +.photo-top-photo, .photo-album-photo { + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.photo-album-image-wrapper, .photo-top-image-wrapper { + float: left; + -moz-box-shadow: 0 0 5px #888; + -webkit-box-shadow: 0 0 5px #888; + box-shadow: 0 0 5px #888; + background-color: #EEE; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + padding-bottom: 20px; + position: relative; + margin: 0 10px 10px 0; +} +.photo-top-album-name { + position: absolute; + bottom: 0; + padding: 0 5px; +} +.photo-top-album-link{ + color: #1872A2; + } +/*.photo-top-image-wrapper { position: relative; float: left; margin-top: 15px; @@ -2368,7 +2394,7 @@ float: left; padding: 0px 3px; padding-top: 0.5em; background-color: rgb(255, 255, 255); -} +}*/ #photo-top-end { clear: both; } diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 9b3ed30b06..9093ac2ca2 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -1,8 +1,8 @@ user['nickname']. '?tab=profil $ps['usermenu'][photos] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos')); $ps['usermenu'][events] = Array('events/', t('Events'), "", t('Your events')); $ps['usermenu'][notes] = Array('notes/', t('Personal notes'), "", t('Your personal photos')); - +$ps['usermenu'][community] = Array('community/', t('Community'), "", ""); if($is_url = preg_match ("/\bnetwork\b/i", $_SERVER['REQUEST_URI'])) { $tpl = get_markup_template('profile_side.tpl'); @@ -46,8 +46,7 @@ $a->page['aside'] .= replace_macros($tpl, array( } } -//js script - +//js scripts $a->page['htmlhead'] .= <<< EOT diff --git a/view/theme/dispy-dark/jot-header.tpl b/view/theme/dispy-dark/jot-header.tpl index 43dcdbb841..4c8f59d796 100644 --- a/view/theme/dispy-dark/jot-header.tpl +++ b/view/theme/dispy-dark/jot-header.tpl @@ -114,6 +114,7 @@ function enableOnUser(){ $(this).val(""); initEditor(); } + EOT; diff --git a/view/theme/dispy-dark/wall_item.tpl b/view/theme/dispy-dark/wall_item.tpl index b013cfeef4..c67a88635c 100644 --- a/view/theme/dispy-dark/wall_item.tpl +++ b/view/theme/dispy-dark/wall_item.tpl @@ -26,11 +26,14 @@ {{ endif }} + {{ if $item.vote }} {{ endif }} diff --git a/view/theme/dispy-dark/wallwall_item.tpl b/view/theme/dispy-dark/wallwall_item.tpl index 86453fad21..f251d7352b 100644 --- a/view/theme/dispy-dark/wallwall_item.tpl +++ b/view/theme/dispy-dark/wallwall_item.tpl @@ -31,11 +31,15 @@ {{ endif }} + {{ if $item.vote }} {{ endif }} @@ -63,6 +67,7 @@ {{ endfor }}
    +
    $item.name diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php index 75297290cd..cbfcb09e67 100644 --- a/view/theme/dispy/theme.php +++ b/view/theme/dispy/theme.php @@ -111,6 +111,3 @@ $(document).ready(function() { }); EOT; - -$a->page['footer'] .= << + {{ endif }} - {{ if $item.filer }} - - {{ endif }} - +
    {{ if $item.drop.dropping }}{{ endif }}
    diff --git a/view/theme/duepuntozero/wallwall_item.tpl b/view/theme/duepuntozero/wallwall_item.tpl index c37bcb4a28..211906c934 100755 --- a/view/theme/duepuntozero/wallwall_item.tpl +++ b/view/theme/duepuntozero/wallwall_item.tpl @@ -61,9 +61,6 @@ {{ endif }} - {{ if $item.filer }} - - {{ endif }}
    {{ if $item.drop.dropping }}{{ endif }} From b5120888cf6e3aac29aa2a8d80bddcab73822e1e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 15 Mar 2012 21:17:51 +0100 Subject: [PATCH 054/133] html2bbcode: Disabled size conversion --- include/html2bbcode.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 0dafecc71f..69ccf41b71 100755 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -142,14 +142,14 @@ function html2bbcode($message) node2bbcode($doc, 'span', array('style'=>'font-style: italic;'), '[i]', '[/i]'); node2bbcode($doc, 'span', array('style'=>'font-weight: bold;'), '[b]', '[/b]'); - node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[font=$1][size=$2][color=$3]', '[/color][/size][/font]'); + /*node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[font=$1][size=$2][color=$3]', '[/color][/size][/font]'); node2bbcode($doc, 'font', array('size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[size=$1][color=$2]', '[/color][/size]'); node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(.+)/'), '[font=$1][size=$2]', '[/size][/font]'); node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'color'=>'/(.+)/'), '[font=$1][color=$3]', '[/color][/font]'); node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/'), '[font=$1]', '[/font]'); node2bbcode($doc, 'font', array('size'=>'/(\d+)/'), '[size=$1]', '[/size]'); node2bbcode($doc, 'font', array('color'=>'/(.+)/'), '[color=$1]', '[/color]'); - +*/ // Untested //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*font-family:\s*(.+?)[,;].*color:\s*(.+?)[,;].*/'), '[size=$1][font=$2][color=$3]', '[/color][/font][/size]'); //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)[,;].*/'), '[size=$1]', '[/size]'); @@ -191,13 +191,13 @@ function html2bbcode($message) node2bbcode($doc, 'hr', array(), "[hr]", ""); - //node2bbcode($doc, 'table', array(), "", ""); - //node2bbcode($doc, 'tr', array(), "\n", ""); - //node2bbcode($doc, 'td', array(), "\t", ""); - node2bbcode($doc, 'table', array(), "[table]", "[/table]"); - node2bbcode($doc, 'th', array(), "[th]", "[/th]"); - node2bbcode($doc, 'tr', array(), "[tr]", "[/tr]"); - node2bbcode($doc, 'td', array(), "[td]", "[/td]"); + node2bbcode($doc, 'table', array(), "", ""); + node2bbcode($doc, 'tr', array(), "\n", ""); + node2bbcode($doc, 'td', array(), "\t", ""); + //node2bbcode($doc, 'table', array(), "[table]", "[/table]"); + //node2bbcode($doc, 'th', array(), "[th]", "[/th]"); + //node2bbcode($doc, 'tr', array(), "[tr]", "[/tr]"); + //node2bbcode($doc, 'td', array(), "[td]", "[/td]"); node2bbcode($doc, 'h1', array(), "\n\n[size=xx-large][b]", "[/b][/size]\n"); node2bbcode($doc, 'h2', array(), "\n\n[size=x-large][b]", "[/b][/size]\n"); From 5c75d40c0b6bee04d8c58a6f88ecbbe34684874a Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Thu, 15 Mar 2012 17:27:06 -0400 Subject: [PATCH 056/133] fixed the sidebar edit thingy. haven't synced dispy yet. Signed-off-by: Simon L'nu --- view/theme/dispy-dark/profile_vcard.tpl | 35 ++++++++++++------------- view/theme/dispy-dark/style.css | 16 ++++++----- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/view/theme/dispy-dark/profile_vcard.tpl b/view/theme/dispy-dark/profile_vcard.tpl index 6228e4f282..350a6ce4a9 100644 --- a/view/theme/dispy-dark/profile_vcard.tpl +++ b/view/theme/dispy-dark/profile_vcard.tpl @@ -1,24 +1,23 @@
    -
    $profile.name
    - - {{ if $profile.edit }} -
    - - $profile.edit.1 - -
    - {{ endif }} + {{ if $profile.edit }} +
    + + $profile.edit.1 +
    + {{ endif }} + +
    $profile.name
    {{ if $pdesc }}
    $profile.pdesc
    diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index 2dc21817a2..6ab0c7921a 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -694,7 +694,7 @@ aside #viewcontacts { margin: 30px 0px; } .ttright { - margin: 0px 0px 0px 5px; + margin: 0px 0px 0px 0px; } /** @@ -835,6 +835,7 @@ aside #viewcontacts { border: 0; text-decoration: none; float: right; + cursor: pointer; } #profile-jot-perms { float: right; @@ -1702,7 +1703,6 @@ div[id$="wrapper"] br { } - /** * register, settings & profile forms */ @@ -1767,21 +1767,25 @@ div[id$="wrapper"] br { /*margin: 3px 0px 0px 70px;*/ /*}*/ #profiles-menu-trigger { - width: 100px; + margin: 0px 0px 0px 25px; } .profile-listing { float: left; margin: 20px 20px 0px 0px; } .icon-profile-edit { - background: url("icons.png") no-repeat scroll -150px 0px transparent; - border: 0 none; + background: url("icons.png") -150px 0px no-repeat; + border: 0; + cursor: pointer; display: block; float: right; + width: 20px; height: 20px; margin: 0 0 -18px; + position: absolute; text-decoration: none; - cursor: pointer; + top: 18px; + right: 226px; } #profile-edit-links ul { margin: 20px 0; From 7684f63ecdfce560f24475630144f6058df15ca9 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Mar 2012 16:38:26 -0700 Subject: [PATCH 057/133] track whether contact is a community page or not --- boot.php | 4 ++-- database.sql | 2 ++ include/items.php | 5 +++++ mod/dfrn_confirm.php | 6 ++++++ mod/dfrn_notify.php | 12 ++++++++---- update.php | 7 ++++++- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/boot.php b/boot.php index 04f36093bf..86da3cd2eb 100755 --- a/boot.php +++ b/boot.php @@ -9,9 +9,9 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1281' ); +define ( 'FRIENDICA_VERSION', '2.3.1282' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1131 ); +define ( 'DB_UPDATE_VERSION', 1132 ); define ( 'EOL', "
    \r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 35c257f021..5f69a1d008 100755 --- a/database.sql +++ b/database.sql @@ -92,6 +92,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( `blocked` tinyint(1) NOT NULL DEFAULT '1', `readonly` tinyint(1) NOT NULL DEFAULT '0', `writable` tinyint(1) NOT NULL DEFAULT '0', + `forum` tinyint(1) NOT NULL DEFAULT '0', `hidden` tinyint(1) NOT NULL DEFAULT '0', `pending` tinyint(1) NOT NULL DEFAULT '1', `rating` tinyint(1) NOT NULL DEFAULT '0', @@ -116,6 +117,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( KEY `dfrn-id` (`dfrn-id`), KEY `blocked` (`blocked`), KEY `readonly` (`readonly`), + KEY `forum` (`forum`), KEY `hidden` (`hidden`), KEY `pending` (`pending`), KEY `closeness` (`closeness`) diff --git a/include/items.php b/include/items.php index 4b1523ff65..68acb45f9b 100755 --- a/include/items.php +++ b/include/items.php @@ -1048,6 +1048,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $ssl_val = intval(get_config('system','ssl_policy')); $ssl_policy = ''; + switch($ssl_val){ case SSL_POLICY_FULL: $ssl_policy = 'full'; @@ -1092,6 +1093,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $challenge = hex2bin((string) $res->challenge); $dfrn_version = (float) (($res->dfrn_version) ? $res->dfrn_version : 2.0); $rino_allowed = ((intval($res->rino) === 1) ? 1 : 0); + $page = (($owner['page-flags'] == PAGE_COMMUNITY) ? 1 : 0); $final_dfrn_id = ''; @@ -1135,6 +1137,9 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $postvars['ssl_policy'] = $ssl_policy; + if($page) + $postvars['page'] = '1'; + if($rino && $rino_allowed && (! $dissolve)) { $key = substr(random_string(),0,16); $data = bin2hex(aes_encrypt($postvars['data'],$key)); diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 0bc3ea7df5..2f4fb70452 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -207,6 +207,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) { if($duplex == 1) $params['duplex'] = 1; + if($user['page-flags'] == PAGE_COMMUNITY) + $params['page'] = 1; + logger('dfrn_confirm: Confirm: posting data to ' . $dfrn_confirm . ': ' . print_r($params,true), LOGGER_DATA); /** @@ -522,6 +525,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $source_url = ((x($_POST,'source_url')) ? hex2bin($_POST['source_url']) : ''); $aes_key = ((x($_POST,'aes_key')) ? $_POST['aes_key'] : ''); $duplex = ((x($_POST,'duplex')) ? intval($_POST['duplex']) : 0 ); + $page = ((x($_POST,'page')) ? intval($_POST['page']) : 0 ); $version_id = ((x($_POST,'dfrn_version')) ? (float) $_POST['dfrn_version'] : 2.0); logger('dfrn_confirm: requestee contacted: ' . $node); @@ -677,6 +681,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { `blocked` = 0, `pending` = 0, `duplex` = %d, + `forum` = %d, `network` = '%s' WHERE `id` = %d LIMIT 1 ", dbesc($photos[0]), @@ -687,6 +692,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { dbesc(datetime_convert()), dbesc(datetime_convert()), intval($duplex), + intval($page), dbesc(NETWORK_DFRN), intval($dfrn_record) ); diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 3dbdc5b328..71860ac3b1 100755 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -15,6 +15,7 @@ function dfrn_notify_post(&$a) { $dissolve = ((x($_POST,'dissolve')) ? intval($_POST['dissolve']) : 0); $perm = ((x($_POST,'perm')) ? notags(trim($_POST['perm'])) : 'r'); $ssl_policy = ((x($_POST,'ssl_policy')) ? notags(trim($_POST['ssl_policy'])): 'none'); + $page = ((x($_POST,'page')) ? intval($_POST['page']) : 0); $writable = (-1); if($dfrn_version >= 2.21) { @@ -87,12 +88,15 @@ function dfrn_notify_post(&$a) { $importer = $r[0]; - if(($writable != (-1)) && ($writable != $importer['writable'])) { - q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1", - intval($writable), + if((($writable != (-1)) && ($writable != $importer['writable'])) || ($importer['forum'] != $page)) { + q("UPDATE `contact` SET `writable` = %d, forum = %d WHERE `id` = %d LIMIT 1", + intval(($writable == (-1)) ? $importer['writable'] : $writable), + intval($page), intval($importer['id']) ); - $importer['writable'] = $writable; + if($writable != (-1)) + $importer['writable'] = $writable; + $importer['forum'] = $page; } // if contact's ssl policy changed, update our links diff --git a/update.php b/update.php index c29394b480..6a685a6ff0 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Fri, 16 Mar 2012 03:49:43 +0100 Subject: [PATCH 058/133] added icons to profile_side, fixes in css --- view/theme/diabook-blue/icons/com_side.png | Bin 0 -> 680 bytes view/theme/diabook-blue/icons/events.png | Bin 0 -> 663 bytes view/theme/diabook-blue/icons/home.png | Bin 0 -> 722 bytes view/theme/diabook-blue/icons/mess_side.png | Bin 0 -> 664 bytes view/theme/diabook-blue/icons/notes.png | Bin 0 -> 739 bytes view/theme/diabook-blue/icons/pubgroups.png | Bin 0 -> 710 bytes view/theme/diabook-blue/photo_album.tpl | 7 +++ view/theme/diabook-blue/photo_top.tpl | 7 +++ view/theme/diabook-blue/photo_view.tpl | 2 +- view/theme/diabook-blue/profile_side.tpl | 12 ++--- view/theme/diabook-blue/style.css | 52 ++++++++++++++++++-- view/theme/diabook-blue/theme.php | 13 +++-- view/theme/diabook/style.css | 7 +-- view/theme/diabook/wall_item.tpl | 7 +-- view/theme/diabook/wallwall_item.tpl | 11 ++--- 15 files changed, 86 insertions(+), 32 deletions(-) create mode 100644 view/theme/diabook-blue/icons/com_side.png create mode 100644 view/theme/diabook-blue/icons/events.png create mode 100644 view/theme/diabook-blue/icons/home.png create mode 100644 view/theme/diabook-blue/icons/mess_side.png create mode 100644 view/theme/diabook-blue/icons/notes.png create mode 100644 view/theme/diabook-blue/icons/pubgroups.png create mode 100755 view/theme/diabook-blue/photo_album.tpl create mode 100755 view/theme/diabook-blue/photo_top.tpl diff --git a/view/theme/diabook-blue/icons/com_side.png b/view/theme/diabook-blue/icons/com_side.png new file mode 100644 index 0000000000000000000000000000000000000000..bc5969ef1afd41f0cfba08f51a0ac17356e60c3f GIT binary patch literal 680 zcmV;Z0$2TsP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z0Rkbx3`0-=00JmUL_t(I%k9#=Z&Fbh2Jq)S_k-KZ1#T4r@^xEjWNEvYK;oo}sYAEM zq3K3oHHI`Dn;1778dLuQ{WDD6YBZ7>gG~UVKm(>GG`&!IODX5LD-CpTF@469_x$qa zJO{YWzYa}0SO#PPD2yS)3@ry>7N9BaIPA^G~#Tg@6?w7#SGGYWL(F?X~!*~Yxj6(t_byC0;WYDIx*FHs_d z>adTk)(4Dl9yubC_du#c$gS6%b&u*`|91x z$4@RRpN%-1CB*@C>%{$Ta1z)#K7_E7NQKj4zt*O4=q0~`rsPNrvfl%4g&-LkJU$cm zX&$EJrE;T%ap>ss9EUpF1!&7d49o=#&NLKCyO=v#L#!RW^i8kxALTa>E5j@Pn;_Hx O0000 literal 0 HcmV?d00001 diff --git a/view/theme/diabook-blue/icons/events.png b/view/theme/diabook-blue/icons/events.png new file mode 100644 index 0000000000000000000000000000000000000000..4a0b3f3f11316265ad45472244094c3fbc27147d GIT binary patch literal 663 zcmV;I0%-k-P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z067OPaYLd200I|DL_t(I%k7j+OB+!XhMzl`8BGSXGpW?p)x_=se$Z*9BgdJX%NV_=NVB&JC#O|bzxpT`0kaZKN~>1mC5 zGbeX}|FE$Sj~^LE^Q>HE-*tH!hP-MvQCgEk5kFj)Q_JFQqrtPwODx&R43Es#EIpBK`&^S4Pxw-o@HaZ<>w-FJ@GLEZN_O`YN&(En>tL$uUl7pLmyN$ZK zVyNTYmWWU+7U_1oc%DbE*JEa8hJL?K6h-JeBKT_*gJ8#T07#OAcDv2^_&Bv%4G|%V zB9v0Yft6Cfhebpbfa5s$zR%Ru6k2Oar4pS^hitP=_j5V0w84ZHw6Fy002ovPDHLkV1n4c9mD_t literal 0 HcmV?d00001 diff --git a/view/theme/diabook-blue/icons/home.png b/view/theme/diabook-blue/icons/home.png new file mode 100644 index 0000000000000000000000000000000000000000..be47a48fc3638b94385eec044d6373e056890b09 GIT binary patch literal 722 zcmV;@0xkWCP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z05l_~+}S<=00L4;L_t(I%k7liYm!kM$A9P1`8M4|%%*E|>72nvF4lRY zSLsNG5JJRX>$k*MI!~_Lo5`2+Nh?8}!){rlN@nk9){kq5(XLKYpk$idq*Ib?#+fqF`eavL(Ftk`~D97Z%?a$itMDybLT-deE;h^vC=^vH) zDGPoRzou&cl2IE~Qy`Hmp~wp`zhnxIPSZCad~xHi9*CxY)aX3W`ttncz9TECb&^SM zgAA#`ByU3Qv1!kGEIgE*y_&8DE-CN+8TqTuqrJyyWh;pnbincklw!2N@KQLw_nUPP zJ?VM-G4!|^xa7L^w`?6^={eX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#sBdCUyoS|Q$QV%tVTJD*yiA^nvy%ZffMluI6~|9%D-c)+Yl!Hn9gn!0 z%6XWl4;4AjNM7KgxlX$4_1NXZXWMrfu?v6y_CEPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z0RST%G(i3U00KryL_t(I%k7j&Pg7AChTqfP&b_VWQaW&ZduxHvMudQdMnPRTB$7y6 zkl=<5ae>Ai{ts3fCF;T+J`+vnV zHET+(3o5;Z=xnEu*%srkKbaEMI#nmW5^!|{n!L{;K`4=OZen32Em}3$Fq=T6A|_Us z$nBaf_OBdY?Q%O>J)S2jM&mOY^|ZKC($t!C=4FRKKj+JsDo_aLj~k#aoXPRZck97e zRMy1JmXgQi6&pQX0isY#LZJxO!Vx6vlSFSbU|ZV7YJQR0Yk2ptBmH;?vp!jl->e*3 z<*aO|;fN2MQ$Xv90JtU_iVOovmCz9_l?o*ijwW!9Q#Z?Y{3><>{FjjA=7QKVT7dEn zUQQM1&+I1Q>Jp$7B$dsU6hG`^dB1slF9xYN3B0g$G#Ks;UF*Ia&rKr{O#zez@9e_E z`@xShW9lBDeSN=8s(8GSKFx#HlbwAT-h(BHr&)C)NtE5#+$Hpwqu@F#-nuXzoV>Fi zxWe&8e!1U}{)UB64kQmSdBC6r-N= + + $imgalt +

    $desc

    +
    +
    +
    diff --git a/view/theme/diabook-blue/photo_top.tpl b/view/theme/diabook-blue/photo_top.tpl new file mode 100755 index 0000000000..98ac9c4576 --- /dev/null +++ b/view/theme/diabook-blue/photo_top.tpl @@ -0,0 +1,7 @@ + + diff --git a/view/theme/diabook-blue/photo_view.tpl b/view/theme/diabook-blue/photo_view.tpl index 511fc73acb..902c2a0ed3 100755 --- a/view/theme/diabook-blue/photo_view.tpl +++ b/view/theme/diabook-blue/photo_view.tpl @@ -12,7 +12,7 @@
    {{ if $prevlink }}{{ endif }} - + {{ if $nextlink }}{{ endif }}
    diff --git a/view/theme/diabook-blue/profile_side.tpl b/view/theme/diabook-blue/profile_side.tpl index 01da55ce1c..a65677696a 100644 --- a/view/theme/diabook-blue/profile_side.tpl +++ b/view/theme/diabook-blue/profile_side.tpl @@ -7,12 +7,12 @@
    diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index bdc79a350d..738dde0e5d 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -891,22 +891,47 @@ ul.menu-popup .empty { text-decoration: none; } .menu-profile-side{ - list-style: none; - padding-left: 16px; - min-height: 16px; + list-style: none; + padding-left: 0px; + min-height: 0px; } .menu-profile-list{ height: auto; overflow: auto; padding-top: 3px; padding-bottom: 3px; + padding-left: 16px; + min-height: 16px; + list-style: none; } .menu-profile-list:hover{ background: #EEE; } +.menu-profile-list-item{ + padding-left: 5px; + } .menu-profile-list-item:hover{ - text-decoration: none; + text-decoration: none; } +/*http://prothemedesign.com/circular-icons/*/ +.menu-profile-list.home{ + background: url("../../../view/theme/diabook-blue/icons/home.png") no-repeat; + } +.menu-profile-list.photos{ + background: url("../../../view/theme/diabook-blue/icons/mess_side.png") no-repeat; + } +.menu-profile-list.events{ + background: url("../../../view/theme/diabook-blue/icons/events.png") no-repeat; + } +.menu-profile-list.notes{ + background: url("../../../view/theme/diabook-blue/icons/notes.png") no-repeat; + } +.menu-profile-list.foren{ + background: url("../../../view/theme/diabook-blue/icons/pubgroups.png") no-repeat; + } +.menu-profile-list.com_side{ + background: url("../../../view/theme/diabook-blue/icons/com_side.png") no-repeat; + } /* aside */ aside { display: table-cell; @@ -1066,6 +1091,16 @@ aside #side-peoplefind-url { min-height: 16px; list-style: none; } +#side-bar-photos-albums li{ +list-style-type: disc; +} +#side-bar-photos-albums ul li{ + margin-left: 30px; + padding-left: 0px; + } +#side-bar-photos-albums ul li a{ + color: #1872A2; +} .widget .tool.selected { background: url("../../../view/theme/diabook-blue/icons/selected.png") no-repeat left center; } @@ -2207,6 +2242,9 @@ a.mail-list-link { .calendar { font-family: Courier, monospace; } +.calendar.eventcal a { + color: #1872A2; + } .today { font-weight: bold; color: #FF0000; @@ -2380,6 +2418,9 @@ float: left; padding-bottom: 20px; position: relative; margin: 0 10px 10px 0; + overflow: hidden; + float: left; + position: relative; } .photo-top-album-name { position: absolute; @@ -2388,6 +2429,9 @@ float: left; } .photo-top-album-link{ color: #1872A2; + } +.photo-top-album-img{ + } /*.photo-top-image-wrapper { position: relative; diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 9093ac2ca2..f9128ea1fd 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -11,10 +11,10 @@ $a->theme_info = array( 'extends' => 'diabook', ); +//fancybox: provide $photo.href to photo_top.tpl to img in org. scale + //profile_side - - $nav['usermenu']=array(); $userinfo = null; @@ -110,10 +110,15 @@ $('html').click(function() { event.stopPropagation(); }); - $(function() { - $('a.lightbox').fancybox(); // Select all links with lightbox class + + + $(document).ready(function() { + $("a.fancy-photo").fancybox(); // Select all links with lightbox class + $("a.fancy-album").fancybox(); }); + + EOT; diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index b7568631ff..437f323faa 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -485,9 +485,6 @@ code { #sidebar-group-list .tool:hover { background: #EEE; } -#sidebar-pages-list .tool:hover { - background: #EEE; -} .tool .label { float: left; } @@ -1337,14 +1334,14 @@ body .pageheader{ } .tag { /*background: url("../../../images/tag_b.png") repeat-x center left;*/ - color: #999; + color: #3465A4; padding-left: 3px; font-size: 12px; } .tag a { padding-right: 5px; /*background: url("../../../images/tag.png") no-repeat center right;*/ - color: #999; + color: #3465A4; } .wwto { position: absolute !important; diff --git a/view/theme/diabook/wall_item.tpl b/view/theme/diabook/wall_item.tpl index 321bbbe9ea..ebe40fd4ea 100644 --- a/view/theme/diabook/wall_item.tpl +++ b/view/theme/diabook/wall_item.tpl @@ -13,8 +13,7 @@ $item.name - menu + menu @@ -22,8 +21,7 @@ id="wall-item-photo-menu-button-$item.id">menu
    - $item.name + $item.name - {{ if $item.plink }}$item.ago{{ else }} $item.ago {{ endif }} {{ if $item.lock }} - $item.lock {{ endif }} @@ -97,4 +95,3 @@ class="wall-item-name$item.sparkle">$item.name
    $item.comment
    - diff --git a/view/theme/diabook/wallwall_item.tpl b/view/theme/diabook/wallwall_item.tpl index 05ed4cc82c..e02e5a8bec 100644 --- a/view/theme/diabook/wallwall_item.tpl +++ b/view/theme/diabook/wallwall_item.tpl @@ -18,8 +18,7 @@ $item.name - menu + menu @@ -27,10 +26,8 @@ id="wall-item-photo-menu-button-$item.id">menu
    - $item.name - $item.to $item.owner_name + $item.name + $item.to $item.owner_name $item.vwall -   {{ if $item.plink }}$item.ago{{ else }} $item.ago {{ endif }} {{ if $item.lock }} - $item.lock {{ endif }} @@ -103,4 +100,4 @@ id="wall-item-ownername-$item.id">$item.owner_name
    $item.comment -
    +
    \ No newline at end of file From 5a12383b78980d873f54ccbac2733d7267f7da36 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Mar 2012 19:55:58 -0700 Subject: [PATCH 059/133] undo git stuffup --- view/theme/duepuntozero/style.css | 4 ++-- view/theme/duepuntozero/wall_item.tpl | 5 +++-- view/theme/duepuntozero/wallwall_item.tpl | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 10ddb00909..b79b00ef41 100755 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2615,12 +2615,12 @@ aside input[type='text'] { margin-top: 10px; } -.body-tag { +.body-tag, .filesavetags { opacity: 0.5; filter:alpha(opacity=50); } -.body-tag:hover { +.body-tag:hover, .filesavetags:hover { opacity: 1.0 !important; filter:alpha(opacity=100) !important; } diff --git a/view/theme/duepuntozero/wall_item.tpl b/view/theme/duepuntozero/wall_item.tpl index 2c88fc598e..e2db70a14a 100755 --- a/view/theme/duepuntozero/wall_item.tpl +++ b/view/theme/duepuntozero/wall_item.tpl @@ -56,9 +56,10 @@ {{ if $item.star }} - {{ endif }} - + {{ if $item.filer }} + + {{ endif }}
    {{ if $item.drop.dropping }}{{ endif }}
    diff --git a/view/theme/duepuntozero/wallwall_item.tpl b/view/theme/duepuntozero/wallwall_item.tpl index 211906c934..420c0e08b9 100755 --- a/view/theme/duepuntozero/wallwall_item.tpl +++ b/view/theme/duepuntozero/wallwall_item.tpl @@ -61,6 +61,9 @@ {{ endif }} + {{ if $item.filer }} + + {{ endif }}
    {{ if $item.drop.dropping }}{{ endif }} From be4e4dfb0d552857c683ee7f7bf5cf0a4bdfb686 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Mar 2012 20:07:30 -0700 Subject: [PATCH 060/133] turn indexes back off (this is from an errant checkin a year or more ago) --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 5f9531a7eb..28ac3dd802 100755 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,4 @@ -#Options -Indexes +Options -Indexes AddType application/x-java-archive .jar AddType audio/ogg .oga From 6bdb71f01c93c691a43caaf9686ce5ac0b687701 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 16 Mar 2012 01:55:34 -0400 Subject: [PATCH 062/133] more changes in dispy-dark Signed-off-by: Simon L'nu --- view/theme/dispy-dark/style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index 6ab0c7921a..d1ec4efd73 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -1490,6 +1490,8 @@ div[id$="wrapper"] br { } #prvmail-subject { width: 100%; + color: #2e2f2e; + background: #eec; } #prvmail-submit-wrapper { margin-top: 10px; @@ -1803,6 +1805,10 @@ div[id$="wrapper"] br { background: #2e2f2e; color: #eec; } +#id_ssl_policy { + width: 374px; +} + /** * contacts selector From d965f73ef149e6baaf058987c146901e3cc16fa0 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 16 Mar 2012 01:57:27 -0400 Subject: [PATCH 063/133] missing close double quote in mail_list.tpl Signed-off-by: Simon L'nu --- view/mail_list.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 view/mail_list.tpl diff --git a/view/mail_list.tpl b/view/mail_list.tpl old mode 100755 new mode 100644 index b284ffb0e3..22e35dec81 --- a/view/mail_list.tpl +++ b/view/mail_list.tpl @@ -1,6 +1,6 @@
    - $from_name + $from_name
    $from_name
    From be1bd9ff4e725f7e60b05acd415aee892e97f956 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 05:19:29 -0700 Subject: [PATCH 064/133] notification for disapora comments --- include/diaspora.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/include/diaspora.php b/include/diaspora.php index dca857a198..19bba52168 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -1159,6 +1159,48 @@ function diaspora_comment($importer,$xml,$msg) { proc_run('php','include/notifier.php','comment',$message_id); } + + $myconv = q("SELECT `author-link`, `author-avatar`, `parent` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `parent` != 0 ", + dbesc($parent_item['uri']), + intval($importer['uid']) + ); + + if(count($myconv)) { + $importer_url = $a->get_baseurl() . '/profile/' . $importer['nickname']; + + foreach($myconv as $conv) { + + // now if we find a match, it means we're in this conversation + + if(! link_compare($conv['author-link'],$importer_url)) + continue; + + require_once('include/enotify.php'); + + $conv_parent = $conv['parent']; + + notification(array( + 'type' => NOTIFY_COMMENT, + 'notify_flags' => $importer['notify-flags'], + 'language' => $importer['language'], + 'to_name' => $importer['username'], + 'to_email' => $importer['email'], + 'uid' => $importer['uid'], + 'item' => $datarray, + 'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $posted_id, + 'source_name' => $datarray['author-name'], + 'source_link' => $datarray['author-link'], + 'source_photo' => $datarray['author-avatar'], + 'verb' => ACTIVITY_POST, + 'otype' => 'item', + 'parent' => $conv_parent, + + )); + + // only send one notification + break; + } + } return; } From 805087af678f922ad75535fa8dbe0fc86d9cd566 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 05:41:29 -0700 Subject: [PATCH 065/133] whitespace --- include/items.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/items.php b/include/items.php index 68acb45f9b..5e1fec5578 100755 --- a/include/items.php +++ b/include/items.php @@ -2026,6 +2026,7 @@ function local_delivery($importer,$data) { if(($item['verb'] === ACTIVITY_TAG) && ($item['object-type'] === ACTVITY_OBJ_TAGTERM)) { $xo = parse_xml_string($item['object'],false); $xt = parse_xml_string($item['target'],false); + if($xt->type === ACTIVITY_OBJ_NOTE) { $i = q("select * from `item` where uri = '%s' and uid = %d limit 1", dbesc($xt->id), From 224dfa848bf2659ba038b6e519692d3755eb7bed Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 05:51:04 -0700 Subject: [PATCH 066/133] bug #335 network search broken after new ssl policy settings --- include/text.php | 2 +- mod/network.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/text.php b/include/text.php index d34fd7fbee..cdf82ca87d 100644 --- a/include/text.php +++ b/include/text.php @@ -638,7 +638,7 @@ if(! function_exists('search')) { function search($s,$id='search-box',$url='/search',$save = false) { $a = get_app(); $o = '
    '; - $o .= ''; + $o .= ''; $o .= ''; $o .= ''; if($save) diff --git a/mod/network.php b/mod/network.php index d0f1733f46..9ec8c23b59 100755 --- a/mod/network.php +++ b/mod/network.php @@ -90,7 +90,7 @@ function saved_searches($search) { $o = replace_macros($tpl, array( '$title' => t('Saved Searches'), '$add' => t('add'), - '$searchbox' => search($search,'netsearch-box',$a->get_baseurl(true) . $srchurl,true), + '$searchbox' => search($search,'netsearch-box',$srchurl,true), '$saved' => $saved, )); From 28f941193d75ca12f4cb2a38a1c60e60ad10f2a6 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 06:02:26 -0700 Subject: [PATCH 067/133] syntax error from pasted text, remove ^M's --- mod/item.php | 192 +++++++++++++++++++++++++-------------------------- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/mod/item.php b/mod/item.php index 98cfb43385..07b4bfef76 100755 --- a/mod/item.php +++ b/mod/item.php @@ -832,129 +832,129 @@ function item_content(&$a) { */ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) { //is it a hash tag? - if(strpos($tag,'#') === 0) { + if(strpos($tag,'#') === 0) { //if the tag is replaced... if(strpos($tag,'[url=')) - //...do nothing - continue; - //base tag has the tags name only - $basetag = str_replace('_',' ',substr($tag,1)); + //...do nothing + return; + //base tag has the tags name only + $basetag = str_replace('_',' ',substr($tag,1)); //create text for link $newtag = '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]'; - //replace tag by the link - $body = str_replace($tag, $newtag, $body); + //replace tag by the link + $body = str_replace($tag, $newtag, $body); - //is the link already in str_tags? - if(! stristr($str_tags,$newtag)) { + //is the link already in str_tags? + if(! stristr($str_tags,$newtag)) { //append or set str_tags - if(strlen($str_tags)) - $str_tags .= ','; - $str_tags .= $newtag; - } - return; + if(strlen($str_tags)) + $str_tags .= ','; + $str_tags .= $newtag; + } + return; } - //is it a person tag? - if(strpos($tag,'@') === 0) { + //is it a person tag? + if(strpos($tag,'@') === 0) { //is it already replaced? - if(strpos($tag,'[url=')) - continue; - $stat = false; + if(strpos($tag,'[url=')) + continue; + $stat = false; //get the person's name $name = substr($tag,1); - //is it a link or a full dfrn address? - if((strpos($name,'@')) || (strpos($name,'http://'))) { - $newname = $name; + //is it a link or a full dfrn address? + if((strpos($name,'@')) || (strpos($name,'http://'))) { + $newname = $name; //get the profile links - $links = @lrdd($name); - if(count($links)) { + $links = @lrdd($name); + if(count($links)) { //for all links, collect how is to inform and how's profile is to link - foreach($links as $link) { - if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page') - $profile = $link['@attributes']['href']; - if($link['@attributes']['rel'] === 'salmon') { - if(strlen($inform)) - $inform .= ','; - $inform .= 'url:' . str_replace(',','%2c',$link['@attributes']['href']); - } - } - } - } else { //if it is a name rather than an address - $newname = $name; - $alias = ''; + foreach($links as $link) { + if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page') + $profile = $link['@attributes']['href']; + if($link['@attributes']['rel'] === 'salmon') { + if(strlen($inform)) + $inform .= ','; + $inform .= 'url:' . str_replace(',','%2c',$link['@attributes']['href']); + } + } + } + } else { //if it is a name rather than an address + $newname = $name; + $alias = ''; $tagcid = 0; - //is it some generated name? - if(strrpos($newname,'+')) { + //is it some generated name? + if(strrpos($newname,'+')) { //get the id - $tagcid = intval(substr($newname,strrpos($newname,'+') + 1)); + $tagcid = intval(substr($newname,strrpos($newname,'+') + 1)); //remove the next word from tag's name - if(strpos($name,' ')) { + if(strpos($name,' ')) { $name = substr($name,0,strpos($name,' ')); - } + } } if($tagcid) { //if there was an id - //select contact with that id from the logged in user's contact list - $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($tagcid), + //select contact with that id from the logged in user's contact list + $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", + intval($tagcid), intval($profile_uid) - ); + ); } elseif(strstr($name,'_') || strstr($name,' ')) { //no id - //get the real name - $newname = str_replace('_',' ',$name); + //get the real name + $newname = str_replace('_',' ',$name); //select someone from this user's contacts by name - $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1", - dbesc($newname), - intval($profile_uid) - ); + $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1", + dbesc($newname), + intval($profile_uid) + ); } else { - //select someone by attag or nick and the name passed in - $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1", - dbesc($name), - dbesc($name), - intval($profile_uid) - ); + //select someone by attag or nick and the name passed in + $r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1", + dbesc($name), + dbesc($name), + intval($profile_uid) + ); } - //$r is set, if someone could be selected - if(count($r)) { + //$r is set, if someone could be selected + if(count($r)) { $profile = $r[0]['url']; - //set newname to nick, find alias - if($r[0]['network'] === 'stat') { - $newname = $r[0]['nick']; - $stat = true; - if($r[0]['alias']) - $alias = $r[0]['alias']; - } - else - $newname = $r[0]['name']; + //set newname to nick, find alias + if($r[0]['network'] === 'stat') { + $newname = $r[0]['nick']; + $stat = true; + if($r[0]['alias']) + $alias = $r[0]['alias']; + } + else + $newname = $r[0]['name']; //add person's id to $inform - if(strlen($inform)) - $inform .= ','; - $inform .= 'cid:' . $r[0]['id']; - } + if(strlen($inform)) + $inform .= ','; + $inform .= 'cid:' . $r[0]['id']; + } } - //if there is an url for this persons profile - if(isset($profile)) { + //if there is an url for this persons profile + if(isset($profile)) { //create profile link - $profile = str_replace(',','%2c',$profile); - $newtag = '@[url=' . $profile . ']' . $newname . '[/url]'; - $body = str_replace('@' . $name, $newtag, $body); + $profile = str_replace(',','%2c',$profile); + $newtag = '@[url=' . $profile . ']' . $newname . '[/url]'; + $body = str_replace('@' . $name, $newtag, $body); //append tag to str_tags - if(! stristr($str_tags,$newtag)) { - if(strlen($str_tags)) - $str_tags .= ','; - $str_tags .= $newtag; - } - - // Status.Net seems to require the numeric ID URL in a mention if the person isn't - // subscribed to you. But the nickname URL is OK if they are. Grrr. We'll tag both. - - if(strlen($alias)) { - $newtag = '@[url=' . $alias . ']' . $newname . '[/url]'; - if(! stristr($str_tags,$newtag)) { - if(strlen($str_tags)) - $str_tags .= ','; - $str_tags .= $newtag; - } - } - } + if(! stristr($str_tags,$newtag)) { + if(strlen($str_tags)) + $str_tags .= ','; + $str_tags .= $newtag; + } + + // Status.Net seems to require the numeric ID URL in a mention if the person isn't + // subscribed to you. But the nickname URL is OK if they are. Grrr. We'll tag both. + + if(strlen($alias)) { + $newtag = '@[url=' . $alias . ']' . $newname . '[/url]'; + if(! stristr($str_tags,$newtag)) { + if(strlen($str_tags)) + $str_tags .= ','; + $str_tags .= $newtag; + } + } + } } } From 7b15f27ba48f5a1b0e24290379e2524796776803 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 16 Mar 2012 13:31:59 -0400 Subject: [PATCH 068/133] weee, dispys get another update Signed-off-by: Simon L'nu --- view/theme/dispy-dark/style.css | 51 ++-- view/theme/dispy-dark/theme.php | 8 +- view/theme/dispy/contact_template.tpl | 2 + view/theme/dispy/group_side.tpl | 6 +- view/theme/dispy/head.tpl | 19 -- view/theme/dispy/jot-header.tpl | 14 ++ view/theme/dispy/nav.tpl | 16 +- view/theme/dispy/nets.tpl | 2 +- view/theme/dispy/photo_view.tpl | 2 +- view/theme/dispy/profile_vcard.tpl | 30 ++- view/theme/dispy/saved_searches_aside.tpl | 2 +- view/theme/dispy/style.css | 282 +++++++++++++--------- view/theme/dispy/theme.php | 41 ++-- view/theme/dispy/wall_item.tpl | 5 +- view/theme/dispy/wallwall_item.tpl | 7 +- 15 files changed, 293 insertions(+), 194 deletions(-) mode change 100755 => 100644 view/theme/dispy/nets.tpl mode change 100755 => 100644 view/theme/dispy/photo_view.tpl mode change 100755 => 100644 view/theme/dispy/saved_searches_aside.tpl diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index d1ec4efd73..b4aefbbf23 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -123,9 +123,6 @@ a { text-decoration: none; margin-bottom: 1px; } -/*a:hover { */ -/* text-decoration: none;*/ -/*}*/ a:hover img { text-decoration: none; } @@ -778,6 +775,15 @@ aside #viewcontacts { #profile-jot-text_ifr { width:99.900002% !important; } +[id$="jot-text_ifr"] { + width: 99.900002% !important; + color: #2e2f2e; + background: #eec; +} +[id$="jot-text_ifr"] .mceContentBody { + color: #2e2f2e; + background: #eec; +} #profile-attach-wrapper, #profile-audio-wrapper, #profile-link-wrapper, @@ -1527,7 +1533,6 @@ div[id$="wrapper"] br { } .mail-list-subject { font-size: 1.2em; - font-weight: bold; } .mail-list-delete-wrapper { float: right; @@ -1751,23 +1756,23 @@ div[id$="wrapper"] br { margin: 30px 0px; } .profile-edit-side-div { - /*background: #111;*/ - /*border-radius: 5px 5px 0px 0px;*/ - /*margin: 0px 0px 0px 0px;*/ - /*width: 100px;*/ - /*height: 25px;*/ - /*position: absolute;*/ + /*background: #111; + border-radius: 5px 5px 0px 0px; + margin: 0px 0px 0px 0px; + width: 100px; + height: 25px; + position: absolute;*/ display: none; - /*left: 35%;*/ - /*top: 41%;*/ - /*cursor: pointer;*/ + /*left: 35%; + top: 41%; + cursor: pointer;*/ } -/*.profile-edit-side-div:hover {*/ - /*display: block;*/ -/*}*/ -/*.profile-edit-side-link {*/ - /*margin: 3px 0px 0px 70px;*/ -/*}*/ +/*.profile-edit-side-div:hover { + display: block; +} +.profile-edit-side-link { + margin: 3px 0px 0px 70px; +}*/ #profiles-menu-trigger { margin: 0px 0px 0px 25px; } @@ -2123,12 +2128,12 @@ div[id$="wrapper"] br { border-bottom: 1px solid #000; } #adminpage dt { - width: 200px; + width: 250px; float: left; font-weight: bold; } #adminpage dd { - margin-left: 200px; + margin-left: 250px; } #adminpage h3 { border-bottom:1px solid #ccc; @@ -2590,8 +2595,8 @@ footer { margin-top: 30px; overflow: auto; } -/*#acl-list-content {*/ -/*}*/ +/*#acl-list-content { +}*/ .acl-list-item { border: 1px solid #eec; display: block; diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index c0611ce83d..0134b1f91b 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -64,7 +64,7 @@ $(document).ready(function() { $('#drop-' + id).addClass('iconspacer'); } ); - // notifications + // click outside notifications menu closes it $('html').click(function() { $('#nav-notifications-linkmenu').removeClass('selected'); document.getElementById("nav-notifications-menu").style.display = "none"; @@ -74,6 +74,7 @@ $(document).ready(function() { event.stopPropagation(); }); + // main function in toolbar functioning function toggleToolbar() { if ( $('#nav-floater').is(':visible') ) { $('#nav-floater').slideUp('fast'); @@ -87,15 +88,20 @@ $(document).ready(function() { }); } }; + // our trigger for the toolbar button $('.floaterflip').click(function() { toggleToolbar(); return false; }); + // (attempt) to change the text colour in a top post $('#profile-jot-text').focusin(function() { $(this).css({color: '#eec'}); }); + // make auto-complete work in more places + $(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl"); + /* $('#profile-photo-wrapper').mouseover(function() { $('.profile-edit-side-div').css({display: 'block'}); }).mouseout(function() { diff --git a/view/theme/dispy/contact_template.tpl b/view/theme/dispy/contact_template.tpl index fbf354b475..04968bd07d 100644 --- a/view/theme/dispy/contact_template.tpl +++ b/view/theme/dispy/contact_template.tpl @@ -20,9 +20,11 @@
    $contact.name
    +{{ if $contact.alt_text }}
    $contact.alt_text
    {{ endif }}
    Profile URL
    $contact.network
    + diff --git a/view/theme/dispy/group_side.tpl b/view/theme/dispy/group_side.tpl index 516d70d5b4..10ecec2e85 100644 --- a/view/theme/dispy/group_side.tpl +++ b/view/theme/dispy/group_side.tpl @@ -1,5 +1,5 @@ -
    -

    $title

    +
    +

    $title

    +
    $item.name From 75823c23539fd009a6575dc125258afa7ce2bbc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Fri, 16 Mar 2012 17:45:07 +0000 Subject: [PATCH 069/133] Use tabindex to enable easy navigation in the dialog to write private mails; Recipient -> Subject -> Text field (tabindex has to be set to the IFRAME element after TinyMCE started) -> Send button --- include/acl_selectors.php | 14 ++++++++------ mod/message.php | 2 +- view/msg-header.tpl | 9 ++++++++- view/prv_message.tpl | 6 +++--- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 67d8cebdeb..a5f5aff532 100755 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -113,11 +113,13 @@ function contact_selector($selname, $selclass, $preselected = false, $options) { $str_nets = implode(',',$x['networks']); $sql_extra .= " AND `network` IN ( $str_nets ) "; } + + $tabindex = (x($options, 'tabindex') ? "tabindex=\"" . $options["tabindex"] . "\"" : ""); if($x['single']) - $o .= "\r\n"; else - $o .= "\r\n"; $r = q("SELECT `id`, `name`, `url`, `network` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `notify` != '' @@ -156,7 +158,7 @@ function contact_selector($selname, $selclass, $preselected = false, $options) { -function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false) { +function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false, $tabindex = null) { $a = get_app(); @@ -178,12 +180,12 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p $sql_extra .= " AND `network` IN ( 'dfrn', 'mail', 'face', 'dspr' ) "; } - + $tabindex = ($tabindex > 0 ? "tabindex=\"$tabindex\"" : ""); if($privmail) - $o .= "\r\n"; else - $o .= "\r\n"; $r = q("SELECT `id`, `name`, `url`, `network` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `notify` != '' diff --git a/mod/message.php b/mod/message.php index 55e313776d..0907abd77f 100755 --- a/mod/message.php +++ b/mod/message.php @@ -154,7 +154,7 @@ function message_content(&$a) { $preselect = (isset($a->argv[2])?array($a->argv[2]):false); - $select = contact_select('messageto','message-to-select', $preselect, 4, true); + $select = contact_select('messageto','message-to-select', $preselect, 4, true, false, false, 10); $tpl = get_markup_template('prv_message.tpl'); $o .= replace_macros($tpl,array( '$header' => t('Send Private Message'), diff --git a/view/msg-header.tpl b/view/msg-header.tpl index b5c78345a3..1f8650bfe3 100755 --- a/view/msg-header.tpl +++ b/view/msg-header.tpl @@ -30,8 +30,15 @@ if(plaintext != 'none') { setup : function(ed) { ed.onInit.add(function(ed) { ed.pasteAsPlainText = true; + var editorId = ed.editorId; + var textarea = $('#'+editorId); + console.log(textarea); + if (typeof(textarea.attr('tabindex')) != "undefined") { + $('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex')); + textarea.attr('tabindex', null); + } }); - } + }, }); } diff --git a/view/prv_message.tpl b/view/prv_message.tpl index 4b904cbcd6..2ce07ce6fd 100755 --- a/view/prv_message.tpl +++ b/view/prv_message.tpl @@ -10,14 +10,14 @@ $parent $select
    $subject
    - +
    $yourmessage
    - +
    - +
    From 27054964feba44e82589fb6b8c464c59b9420feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Fri, 16 Mar 2012 17:46:26 +0000 Subject: [PATCH 070/133] Forgot to remove a debug line --- view/msg-header.tpl | 1 - 1 file changed, 1 deletion(-) diff --git a/view/msg-header.tpl b/view/msg-header.tpl index 1f8650bfe3..b1fcefd247 100755 --- a/view/msg-header.tpl +++ b/view/msg-header.tpl @@ -32,7 +32,6 @@ if(plaintext != 'none') { ed.pasteAsPlainText = true; var editorId = ed.editorId; var textarea = $('#'+editorId); - console.log(textarea); if (typeof(textarea.attr('tabindex')) != "undefined") { $('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex')); textarea.attr('tabindex', null); From 90bb32ab7393687d46e198f94d181c830f881def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Fri, 16 Mar 2012 17:47:40 +0000 Subject: [PATCH 071/133] Bugfix of old IEs --- view/msg-header.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/msg-header.tpl b/view/msg-header.tpl index b1fcefd247..098333893f 100755 --- a/view/msg-header.tpl +++ b/view/msg-header.tpl @@ -37,7 +37,7 @@ if(plaintext != 'none') { textarea.attr('tabindex', null); } }); - }, + } }); } From 91fee866b7f870b66d770c7c4e6db0afd874de33 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 16 Mar 2012 16:43:34 -0400 Subject: [PATCH 073/133] make profiles-menu disappear when clicked outside it Signed-off-by: Simon L'nu --- view/theme/dispy-dark/theme.php | 9 +++++++++ view/theme/dispy/theme.php | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index 0134b1f91b..b57971db96 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -73,6 +73,15 @@ $(document).ready(function() { $('#nav-notifications-linkmenu').click(function(event) { event.stopPropagation(); }); + // click outside profiles menu closes it + $('html').click(function() { + $('#profiles-menu-trigger').removeClass('selected'); + document.getElementById("profiles-menu").style.display = "none"; + }); + + $('#profiles-menu').click(function(event) { + event.stopPropagation(); + }); // main function in toolbar functioning function toggleToolbar() { diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php index ac97948a38..9f0fcba828 100644 --- a/view/theme/dispy/theme.php +++ b/view/theme/dispy/theme.php @@ -73,6 +73,15 @@ $(document).ready(function() { $('#nav-notifications-linkmenu').click(function(event) { event.stopPropagation(); }); + // click outside profiles menu closes it + $('html').click(function() { + $('#profiles-menu-trigger').removeClass('selected'); + document.getElementById("profiles-menu").style.display = "none"; + }); + + $('#profiles-menu').click(function(event) { + event.stopPropagation(); + }); // main function in toolbar functioning function toggleToolbar() { From 58940175e173c04c9bfa3498af40c65f6514a9ce Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 15:07:45 -0700 Subject: [PATCH 074/133] wrong link in d* comment notifications --- boot.php | 2 +- include/diaspora.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index 86da3cd2eb..322340e5d7 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1282' ); +define ( 'FRIENDICA_VERSION', '2.3.1283' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1132 ); diff --git a/include/diaspora.php b/include/diaspora.php index 19bba52168..1b5af42cd9 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -1187,7 +1187,7 @@ function diaspora_comment($importer,$xml,$msg) { 'to_email' => $importer['email'], 'uid' => $importer['uid'], 'item' => $datarray, - 'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $posted_id, + 'link' => $a->get_baseurl() . '/display/' . $importer['nickname'] . '/' . $message_id, 'source_name' => $datarray['author-name'], 'source_link' => $datarray['author-link'], 'source_photo' => $datarray['author-avatar'], From 949c6d47b5b9a3e796cdf6dff79d6d532f4a3159 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 15:19:38 -0700 Subject: [PATCH 075/133] add "send pm" link to photo dropdown for Diaspora contacts --- include/conversation.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/conversation.php b/include/conversation.php index 88ecf502b2..8ca484c9e7 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -779,6 +779,17 @@ function item_photo_menu($item){ if(($cid) && (! $item['self'])) { $contact_url = $a->get_baseurl($ssl_state) . '/contacts/' . $cid; $posts_link = $a->get_baseurl($ssl_state) . '/network/?cid=' . $cid; + + $clean_url = normalise_link($item['author-link']); + + if((local_user()) && (local_user() == $item['uid'])) { + if(isset($a->contacts) && x($a->contacts,$clean_url)) { + if($a->contacts[$clean_url]['network'] === NETWORK_DIASPORA) { + $pm_url = $a->get_baseurl($ssl_state) . '/message/new/' . $cid; + } + } + } + } $menu = Array( From 82f2bfea5bbf7c35450eb8fe9ee119e0b00d3d61 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 16:05:16 -0700 Subject: [PATCH 077/133] convert boolean or int settings to strings to work around issues with template processing --- mod/settings.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mod/settings.php b/mod/settings.php index f694b5840f..3a8ad29d28 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -652,20 +652,20 @@ function settings_content(&$a) { $blocktags = $a->user['blocktags']; $expire_items = get_pconfig(local_user(), 'expire','items'); - $expire_items = (($expire_items===false)?1:$expire_items); // default if not set: 1 + $expire_items = (($expire_items===false)? '1' : $expire_items); // default if not set: 1 $expire_notes = get_pconfig(local_user(), 'expire','notes'); - $expire_notes = (($expire_notes===false)?1:$expire_notes); // default if not set: 1 + $expire_notes = (($expire_notes===false)? '1' : $expire_notes); // default if not set: 1 $expire_starred = get_pconfig(local_user(), 'expire','starred'); - $expire_starred = (($expire_starred===false)?1:$expire_starred); // default if not set: 1 + $expire_starred = (($expire_starred===false)? '1' : $expire_starred); // default if not set: 1 $expire_photos = get_pconfig(local_user(), 'expire','photos'); - $expire_photos = (($expire_photos===false)?0:$expire_photos); // default if not set: 0 + $expire_photos = (($expire_photos===false)? '0' : $expire_photos); // default if not set: 0 $suggestme = get_pconfig(local_user(), 'system','suggestme'); - $suggestme = (($suggestme===false)?0:$suggestme); // default if not set: 0 + $suggestme = (($suggestme===false)? '0': $suggestme); // default if not set: 0 $browser_update = intval(get_pconfig(local_user(), 'system','update_interval')); $browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds @@ -736,13 +736,13 @@ function settings_content(&$a) { )); $blockwall = replace_macros($opt_tpl,array( - '$field' => array('blockwall', t('Allow friends to post to your profile page?'), ! $a->user['blockwall'], '', array(t('No'),t('Yes'))), + '$field' => array('blockwall', t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), '', array(t('No'),t('Yes'))), )); $blocktags = replace_macros($opt_tpl,array( - '$field' => array('blocktags', t('Allow friends to tag your posts?'), ! $a->user['blocktags'], '', array(t('No'),t('Yes'))), + '$field' => array('blocktags', t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), '', array(t('No'),t('Yes'))), )); From 368d93625dc7ac206b3dbb85af15dc90f593fcd7 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 16 Mar 2012 20:29:02 -0400 Subject: [PATCH 078/133] make auto-complete in darkzero-NS. other themes can use this easily. might need to edit the id it hooks into Signed-off-by: Simon L'nu --- view/theme/darkzero-NS/theme.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/view/theme/darkzero-NS/theme.php b/view/theme/darkzero-NS/theme.php index 2d3e4fd56e..3598e34f27 100755 --- a/view/theme/darkzero-NS/theme.php +++ b/view/theme/darkzero-NS/theme.php @@ -52,6 +52,9 @@ $('.savedsearchterm').hover( $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');} ); + // make auto-complete work in more places + $(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl"); + }); From 49540fb958376d067f44a9274f8edeb80f10da3a Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 16 Mar 2012 21:20:23 -0400 Subject: [PATCH 080/133] make auto-complete work in more places Signed-off-by: Simon L'nu --- mod/display.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mod/display.php b/mod/display.php index f428149e83..81ed174acc 100755 --- a/mod/display.php +++ b/mod/display.php @@ -16,7 +16,15 @@ function display_content(&$a) { $o = '
    ' . "\r\n"; - $a->page['htmlhead'] .= ''; + $a->page['htmlhead'] .= << +$(document).ready(function() { + $(".comment-edit-wrapper textarea").contact_autocomplete(baseurl+"/acl"); + // make auto-complete work in more places + $(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl"); +}); + +EOT; $nick = (($a->argc > 1) ? $a->argv[1] : ''); From 75883b196ed222b9972c87ce00b8e7c2ab29c05e Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 16 Mar 2012 21:23:24 -0400 Subject: [PATCH 081/133] remove auto-complete from darkzero-NS, dispys, since the comment one is now global Signed-off-by: Simon L'nu --- view/theme/darkzero-NS/theme.php | 3 --- view/theme/dispy/theme.php | 3 --- 2 files changed, 6 deletions(-) diff --git a/view/theme/darkzero-NS/theme.php b/view/theme/darkzero-NS/theme.php index 3598e34f27..2d3e4fd56e 100755 --- a/view/theme/darkzero-NS/theme.php +++ b/view/theme/darkzero-NS/theme.php @@ -52,9 +52,6 @@ $('.savedsearchterm').hover( $('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');} ); - // make auto-complete work in more places - $(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl"); - }); diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php index 9f0fcba828..26e07b1f76 100644 --- a/view/theme/dispy/theme.php +++ b/view/theme/dispy/theme.php @@ -108,9 +108,6 @@ $(document).ready(function() { $(this).css({color: '#eec'}); }); - // make auto-complete work in more places - $(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl"); - /* $('#profile-photo-wrapper').mouseover(function() { $('.profile-edit-side-div').css({display: 'block'}); }).mouseout(function() { From 87fdae2dd8bdb9e01ce3d98f6ea94d83664cb4c2 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sat, 17 Mar 2012 01:55:40 -0400 Subject: [PATCH 083/133] [fix] whitespace in photo_view and like_noshare. dispy-dark clean up Signed-off-by: Simon L'nu --- view/like_noshare.tpl | 8 ++++---- view/photo_view.tpl | 2 +- view/theme/dispy-dark/photo_view.tpl | 13 +++++-------- view/theme/dispy-dark/theme.php | 3 --- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/view/like_noshare.tpl b/view/like_noshare.tpl index 2c467c3c26..2651ea1f89 100755 --- a/view/like_noshare.tpl +++ b/view/like_noshare.tpl @@ -1,5 +1,5 @@ + + + +
    diff --git a/view/photo_view.tpl b/view/photo_view.tpl index 5dbcabadf7..732caf6900 100755 --- a/view/photo_view.tpl +++ b/view/photo_view.tpl @@ -14,7 +14,7 @@
    {{ if $nextlink }}{{ endif }}
    -
    $desc
    +
    $desc
    {{ if $tags }}
    $tags.0
    $tags.1
    diff --git a/view/theme/dispy-dark/photo_view.tpl b/view/theme/dispy-dark/photo_view.tpl index f1209ec58f..732caf6900 100644 --- a/view/theme/dispy-dark/photo_view.tpl +++ b/view/theme/dispy-dark/photo_view.tpl @@ -4,18 +4,15 @@ - -
    - {{ if $prevlink }}{{ endif }} - - {{ if $nextlink }}{{ endif }} +{{ if $lock }} | $lock {{ endif }}
    +{{ if $prevlink }}{{ endif }} +
    +{{ if $nextlink }}{{ endif }}
    $desc
    {{ if $tags }} diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php index b57971db96..7001361739 100644 --- a/view/theme/dispy-dark/theme.php +++ b/view/theme/dispy-dark/theme.php @@ -108,9 +108,6 @@ $(document).ready(function() { $(this).css({color: '#eec'}); }); - // make auto-complete work in more places - $(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl"); - /* $('#profile-photo-wrapper').mouseover(function() { $('.profile-edit-side-div').css({display: 'block'}); }).mouseout(function() { From 511d8a30a05f76a08582f2d7a9ccd78dbd744c57 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 23:51:49 -0700 Subject: [PATCH 084/133] scheme checking for webservers without $_SERVER['HTTPS'] --- boot.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 322340e5d7..836900fc4a 100755 --- a/boot.php +++ b/boot.php @@ -286,7 +286,12 @@ class App { startup(); - $this->scheme = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'])) ? 'https' : 'http' ); + $this->scheme = 'http'; + if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS']) + $this->scheme = 'https'; + elseif(x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) + $this->scheme = 'https'; + if(x($_SERVER,'SERVER_NAME')) { $this->hostname = $_SERVER['SERVER_NAME']; From 057a142b8cd01cd8ab6212e9d958989c82dfccc3 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 00:08:52 -0700 Subject: [PATCH 085/133] cut/paste error --- mod/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/item.php b/mod/item.php index 07b4bfef76..fe570075f2 100755 --- a/mod/item.php +++ b/mod/item.php @@ -857,7 +857,7 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) { if(strpos($tag,'@') === 0) { //is it already replaced? if(strpos($tag,'[url=')) - continue; + return; $stat = false; //get the person's name $name = substr($tag,1); From e0e008fb8d894c7fe56fbb88fa96224c0796ea75 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 02:26:52 -0700 Subject: [PATCH 087/133] template processor broken with foreach k=>v and k is integer 0 --- include/template_processor.php | 2 +- mod/admin.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/template_processor.php b/include/template_processor.php index 7f7b0b55bd..93bf391c5f 100755 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -96,7 +96,7 @@ $this->_push_stack(); $r = $this->r; $r[$varname] = $v; - if ($keyname!='') $r[$keyname] = $k; + if ($keyname!='') $r[$keyname] = (($k === 0) ? '0' : $k); $ret .= $this->replace($args[3], $r); $this->_pop_stack(); } diff --git a/mod/admin.php b/mod/admin.php index 88ccad6d3e..a64b269035 100755 --- a/mod/admin.php +++ b/mod/admin.php @@ -308,7 +308,7 @@ function admin_page_site(&$a) { SSL_POLICY_FULL => t("Force all links to use SSL"), SSL_POLICY_SELFSIGN => t("Self-signed certificate, use SSL for local links only (discouraged)") ); - + $t = get_markup_template("admin_site.tpl"); return replace_macros($t, array( '$title' => t('Administration'), @@ -325,7 +325,7 @@ function admin_page_site(&$a) { '$banner' => array('banner', t("Banner/Logo"), $banner, ""), '$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles"), $theme_choices), - '$ssl_policy' => array('ssl_policy', t("SSL link policy"), get_config('system','ssl_policy'), t("Determines whether generated links should be forced to use SSL"), $ssl_choices), + '$ssl_policy' => array('ssl_policy', t("SSL link policy"), (string) intval(get_config('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices), '$maximagesize' => array('maximagesize', t("Maximum image size"), get_config('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")), '$register_policy' => array('register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices), From 26258bca77aa3385dacf36874f7f5603eaef9a6b Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 02:36:59 -0700 Subject: [PATCH 088/133] compare ssl_policy precisely in case somebody was bitten by template processor bug --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 836900fc4a..b0a6311703 100755 --- a/boot.php +++ b/boot.php @@ -385,7 +385,7 @@ class App { $scheme = $this->scheme; if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) { - if($this->config['system']['ssl_policy'] == SSL_POLICY_FULL) + if(intval($this->config['system']['ssl_policy']) === intval(SSL_POLICY_FULL)) $scheme = 'https'; // We need to populate the $ssl flag across the entire program before turning this on. From 94fac6d76725042fc176aaebd2af721ab1540ff7 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 03:43:02 -0700 Subject: [PATCH 089/133] queue optimisation - back off delivery attempts to once per hour after the first 12 hours. --- include/queue.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/queue.php b/include/queue.php index d312b50f5a..7e92705be2 100755 --- a/include/queue.php +++ b/include/queue.php @@ -61,13 +61,18 @@ function queue_run($argv, $argc){ q("DELETE FROM `queue` WHERE `created` < UTC_TIMESTAMP() - INTERVAL 3 DAY"); } - if($queue_id) + if($queue_id) { $r = q("SELECT `id` FROM `queue` WHERE `id` = %d LIMIT 1", intval($queue_id) ); - else - $r = q("SELECT `id` FROM `queue` WHERE `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE "); + } + else { + // For the first 12 hours we'll try to deliver every 15 minutes + // After that, we'll only attempt delivery once per hour. + + $r = q("SELECT `id` FROM `queue` WHERE (( `created` > UTC_TIMESTAMP() - INTERVAL 12 HOUR && `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ) OR ( `last` < UTC_TIMESTAMP() - INTERVAL 1 HOUR ))"); + } if(! count($r)){ return; } From 67fd539f53756723d844dd204639146587f5bb76 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 18:15:36 -0700 Subject: [PATCH 090/133] bug #337, call template_unescape() only at the end of template processing --- boot.php | 2 +- include/network.php | 4 ++-- include/template_processor.php | 2 +- include/text.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/boot.php b/boot.php index b0a6311703..b3c79079a6 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1283' ); +define ( 'FRIENDICA_VERSION', '2.3.1284' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1132 ); diff --git a/include/network.php b/include/network.php index c72919dd8b..22157ff188 100755 --- a/include/network.php +++ b/include/network.php @@ -303,7 +303,7 @@ function webfinger_dfrn($s,&$hcard) { if(! function_exists('webfinger')) { -function webfinger($s) { +function webfinger($s, $debug = false) { $host = ''; if(strstr($s,'@')) { $host = substr($s,strpos($s,'@') + 1); @@ -328,7 +328,7 @@ function webfinger($s) { }} if(! function_exists('lrdd')) { -function lrdd($uri) { +function lrdd($uri, $debug = false) { $a = get_app(); diff --git a/include/template_processor.php b/include/template_processor.php index 93bf391c5f..4c317efe1f 100755 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -203,7 +203,7 @@ $os=$s; $count++; $s = $this->var_replace($s); } - return template_unescape($s); + return $s; } } diff --git a/include/text.php b/include/text.php index cdf82ca87d..89acbf9fab 100644 --- a/include/text.php +++ b/include/text.php @@ -20,7 +20,7 @@ function replace_macros($s,$r) { //$a = get_app(); //$a->page['debug'] .= "$tt
    \n"; - return $r; + return template_unescape($r); }} From 9e731506c2ccc05cf1eab98868d5c1bdbd0967ba Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 22:14:17 -0700 Subject: [PATCH 091/133] remove admin view of local directory --- .../plugins/bbcode/editor_plugin_src.js | 197 ++++++------------ mod/directory.php | 17 +- 2 files changed, 63 insertions(+), 151 deletions(-) diff --git a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js index 183f2bc68d..e5f716b297 100755 --- a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -45,78 +45,34 @@ s = tinymce.trim(s); function rep(re, str) { - - //modify code to keep stuff intact within [code][/code] blocks - //Waitman Gobble NO WARRANTY - - - var o = new Array(); - var x = s.split("[code]"); - var i = 0; - - var si = ""; - si = x.shift(); - si = si.replace(re,str); - o.push(si); - - for (i = 0; i < x.length; i++) { - var no = new Array(); - var j = x.shift(); - var g = j.split("[/code]"); - no.push(g.shift()); - si = g.shift(); - si = si.replace(re,str); - no.push(si); - o.push(no.join("[/code]")); - } - - s = o.join("[code]"); - + s = s.replace(re, str); }; - - - - - /* oembed */ - function _h2b_cb(match) { - /* - function s_h2b(data) { - match = data; + + + + + /* oembed */ + function _h2b_cb(match) { + function s_h2b(data) { + match = data; } $.ajax({ - type:"POST", + type:"POST", url: 'oembed/h2b', - data: {text: match}, - async: false, - success: s_h2b, - dataType: 'html' - }); - */ - - var f, g, tof = [], tor = []; - var find_spanc = /]*class *= *[\"'](?:[^\"']* )*oembed(?: [^\"']*)*[\"'][^>]*>(.*?(?:]*>(.*?)<\/span *>)*.*?)<\/span *>/ig; - while (f = find_spanc.exec(match)) { - var find_a = /]* rel=[\"']oembed[\"'][^>]*)>.*?<\/a *>/ig; - if (g = find_a.exec(f[1])) { - var find_href = /href=[\"']([^\"']*)[\"']/ig; - var m2 = find_href.exec(g[1]); - if (m2[1]) { - tof.push(f[0]); - tor.push("[EMBED]" + m2[1] + "[/EMBED]"); - } - } - } - for (var i = 0; i < tof.length; i++) match = match.replace(tof[i], tor[i]); - - return match; - } + data: {text: match}, + async: false, + success: s_h2b, + dataType: 'html' + }); + return match; + } if (s.indexOf('class="oembed')>=0){ //alert("request oembed html2bbcode"); s = _h2b_cb(s); } - - /* /oembed */ - + + /* /oembed */ + // example: to [b] rep(/(.*?)<\/a>/gi,"[bookmark=$1]$2[/bookmark]"); @@ -129,16 +85,16 @@ rep(//gi,"[img=$3x$2]$1[/img]"); rep(//gi,"[img=$2x$3]$1[/img]"); rep(//gi,"[img]$1[/img]"); - - rep(/
      (.*?)<\/ul>/gi,"[list]$1[/list]"); - rep(/
        (.*?)<\/ul>/gi,"[list=]$1[/list]"); - rep(/
          (.*?)<\/ul>/gi,"[list=1]$1[/list]"); - rep(/
            (.*?)<\/ul>/gi,"[list=i]$1[/list]"); - rep(/
              (.*?)<\/ul>/gi,"[list=I]$1[/list]"); - rep(/
                (.*?)<\/ul>/gi,"[list=a]$1[/list]"); - rep(/
                  (.*?)<\/ul>/gi,"[list=A]$1[/list]"); - rep(/
                • (.*?)<\/li>/gi,'[li]$1[/li]'); - + + rep(/
                    (.*?)<\/ul>/gi,"[list]$1[/list]"); + rep(/
                      (.*?)<\/ul>/gi,"[list=]$1[/list]"); + rep(/
                        (.*?)<\/ul>/gi,"[list=1]$1[/list]"); + rep(/
                          (.*?)<\/ul>/gi,"[list=i]$1[/list]"); + rep(/
                            (.*?)<\/ul>/gi,"[list=I]$1[/list]"); + rep(/
                              (.*?)<\/ul>/gi,"[list=a]$1[/list]"); + rep(/
                                (.*?)<\/ul>/gi,"[list=A]$1[/list]"); + rep(/
                              • (.*?)<\/li>/gi,'[li]$1[/li]'); + rep(/(.*?)<\/code>/gi,"[code]$1[/code]"); rep(/<\/(strong|b)>/gi,"[/b]"); rep(/<(strong|b)>/gi,"[b]"); @@ -168,40 +124,9 @@ _dfrn_bbcode2html : function(s) { s = tinymce.trim(s); - - function rep(re, str) { - - //modify code to keep stuff intact within [code][/code] blocks - //Waitman Gobble NO WARRANTY - - - var o = new Array(); - var x = s.split("[code]"); - var i = 0; - - var si = ""; - si = x.shift(); - si = si.replace(re,str); - o.push(si); - - for (i = 0; i < x.length; i++) { - var no = new Array(); - var j = x.shift(); - var g = j.split("[/code]"); - no.push(g.shift()); - si = g.shift(); - si = si.replace(re,str); - no.push(si); - o.push(no.join("[/code]")); - } - - s = o.join("[code]"); - - }; - - - - + function rep(re, str) { + s = s.replace(re, str); + }; // example: [b] to rep(/\n/gi,"
                                "); @@ -211,43 +136,43 @@ rep(/\[\/i\]/gi,""); rep(/\[u\]/gi,""); rep(/\[\/u\]/gi,""); - rep(/\[hr\]/gi,"
                                "); + rep(/\[hr\]/gi,"
                                "); rep(/\[bookmark=([^\]]+)\](.*?)\[\/bookmark\]/gi,"$2"); rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2"); rep(/\[url\](.*?)\[\/url\]/gi,"
                                $1"); rep(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,""); rep(/\[img\](.*?)\[\/img\]/gi,""); - - rep(/\[list\](.*?)\[\/list\]/gi, '
                                  $1
                                '); - rep(/\[list=\](.*?)\[\/list\]/gi, '
                                  $1
                                '); - rep(/\[list=1\](.*?)\[\/list\]/gi, '
                                  $1
                                '); - rep(/\[list=i\](.*?)\[\/list\]/gi,'
                                  $1
                                '); - rep(/\[list=I\](.*?)\[\/list\]/gi, '
                                  $1
                                '); - rep(/\[list=a\](.*?)\[\/list\]/gi, '
                                  $1
                                '); - rep(/\[list=A\](.*?)\[\/list\]/gi, '
                                  $1
                                '); - rep(/\[li\](.*?)\[\/li\]/gi, '
                              • $1
                              • '); + + rep(/\[list\](.*?)\[\/list\]/gi, '
                                  $1
                                '); + rep(/\[list=\](.*?)\[\/list\]/gi, '
                                  $1
                                '); + rep(/\[list=1\](.*?)\[\/list\]/gi, '
                                  $1
                                '); + rep(/\[list=i\](.*?)\[\/list\]/gi,'
                                  $1
                                '); + rep(/\[list=I\](.*?)\[\/list\]/gi, '
                                  $1
                                '); + rep(/\[list=a\](.*?)\[\/list\]/gi, '
                                  $1
                                '); + rep(/\[list=A\](.*?)\[\/list\]/gi, '
                                  $1
                                '); + rep(/\[li\](.*?)\[\/li\]/gi, '
                              • $1
                              • '); rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); rep(/\[size=(.*?)\](.*?)\[\/size\]/gi,"$2"); rep(/\[code\](.*?)\[\/code\]/gi,"$1"); rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"
                                $1
                                "); - - /* oembed */ - function _b2h_cb(match, url) { - url = bin2hex(url); - function s_b2h(data) { - match = data; - } - $.ajax({ - url: 'oembed/b2h?url=' + url, - async: false, - success: s_b2h, - dataType: 'html' - }); - return match; - } - s = s.replace(/\[embed\](.*?)\[\/embed\]/gi, _b2h_cb); - - /* /oembed */ + + /* oembed */ + function _b2h_cb(match, url) { + url = bin2hex(url); + function s_b2h(data) { + match = data; + } + $.ajax({ + url: 'oembed/b2h?url=' + url, + async: false, + success: s_b2h, + dataType: 'html' + }); + return match; + } + s = s.replace(/\[embed\](.*?)\[\/embed\]/gi, _b2h_cb); + + /* /oembed */ return s; } diff --git a/mod/directory.php b/mod/directory.php index 962188945f..7f18bd0268 100755 --- a/mod/directory.php +++ b/mod/directory.php @@ -25,10 +25,6 @@ function directory_post(&$a) { function directory_content(&$a) { - $everything = (($a->argc > 1 && $a->argv[1] === 'all' && is_site_admin()) ? true : false); - if(x($_SESSION,'submanage') && intval($_SESSION['submanage'])) - $everything = false; - if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { notice( t('Public access denied.') . EOL); return; @@ -52,12 +48,6 @@ function directory_content(&$a) { } $admin = ''; - if(is_site_admin()) { - if($everything) - $admin = ''; - else - $admin = ''; - } $o .= replace_macros($tpl, array( '$search' => $search, @@ -73,17 +63,14 @@ function directory_content(&$a) { $search = dbesc($search); $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`pub_keywords`,`prv_keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : ""); - $publish = ((get_config('system','publish_all') || $everything) ? '' : " AND `publish` = 1 " ); + $publish = ((get_config('system','publish_all')) ? '' : " AND `publish` = 1 " ); $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra "); if(count($r)) $a->set_pager_total($r[0]['total']); - if($everything) - $order = " ORDER BY `register_date` DESC "; - else - $order = " ORDER BY `name` ASC "; + $order = " ORDER BY `name` ASC "; $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ", From 4bb280bc2f7068f0c1199e9f8119e25278aa3bcb Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 17 Mar 2012 22:18:21 -0700 Subject: [PATCH 092/133] lost changes to tinymce/bbcode --- .../plugins/bbcode/editor_plugin_src.js | 197 ++++++++++++------ 1 file changed, 136 insertions(+), 61 deletions(-) diff --git a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js index e5f716b297..183f2bc68d 100755 --- a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -45,34 +45,78 @@ s = tinymce.trim(s); function rep(re, str) { - s = s.replace(re, str); + + //modify code to keep stuff intact within [code][/code] blocks + //Waitman Gobble NO WARRANTY + + + var o = new Array(); + var x = s.split("[code]"); + var i = 0; + + var si = ""; + si = x.shift(); + si = si.replace(re,str); + o.push(si); + + for (i = 0; i < x.length; i++) { + var no = new Array(); + var j = x.shift(); + var g = j.split("[/code]"); + no.push(g.shift()); + si = g.shift(); + si = si.replace(re,str); + no.push(si); + o.push(no.join("[/code]")); + } + + s = o.join("[code]"); + }; - - - - - /* oembed */ - function _h2b_cb(match) { - function s_h2b(data) { - match = data; + + + + + /* oembed */ + function _h2b_cb(match) { + /* + function s_h2b(data) { + match = data; } $.ajax({ - type:"POST", + type:"POST", url: 'oembed/h2b', - data: {text: match}, - async: false, - success: s_h2b, - dataType: 'html' - }); - return match; - } + data: {text: match}, + async: false, + success: s_h2b, + dataType: 'html' + }); + */ + + var f, g, tof = [], tor = []; + var find_spanc = /]*class *= *[\"'](?:[^\"']* )*oembed(?: [^\"']*)*[\"'][^>]*>(.*?(?:]*>(.*?)<\/span *>)*.*?)<\/span *>/ig; + while (f = find_spanc.exec(match)) { + var find_a = /]* rel=[\"']oembed[\"'][^>]*)>.*?<\/a *>/ig; + if (g = find_a.exec(f[1])) { + var find_href = /href=[\"']([^\"']*)[\"']/ig; + var m2 = find_href.exec(g[1]); + if (m2[1]) { + tof.push(f[0]); + tor.push("[EMBED]" + m2[1] + "[/EMBED]"); + } + } + } + for (var i = 0; i < tof.length; i++) match = match.replace(tof[i], tor[i]); + + return match; + } if (s.indexOf('class="oembed')>=0){ //alert("request oembed html2bbcode"); s = _h2b_cb(s); } - - /* /oembed */ - + + /* /oembed */ + // example: to [b] rep(/(.*?)<\/a>/gi,"[bookmark=$1]$2[/bookmark]"); @@ -85,16 +129,16 @@ rep(//gi,"[img=$3x$2]$1[/img]"); rep(//gi,"[img=$2x$3]$1[/img]"); rep(//gi,"[img]$1[/img]"); - - rep(/
                                  (.*?)<\/ul>/gi,"[list]$1[/list]"); - rep(/
                                    (.*?)<\/ul>/gi,"[list=]$1[/list]"); - rep(/
                                      (.*?)<\/ul>/gi,"[list=1]$1[/list]"); - rep(/
                                        (.*?)<\/ul>/gi,"[list=i]$1[/list]"); - rep(/
                                          (.*?)<\/ul>/gi,"[list=I]$1[/list]"); - rep(/
                                            (.*?)<\/ul>/gi,"[list=a]$1[/list]"); - rep(/
                                              (.*?)<\/ul>/gi,"[list=A]$1[/list]"); - rep(/
                                            • (.*?)<\/li>/gi,'[li]$1[/li]'); - + + rep(/
                                                (.*?)<\/ul>/gi,"[list]$1[/list]"); + rep(/
                                                  (.*?)<\/ul>/gi,"[list=]$1[/list]"); + rep(/
                                                    (.*?)<\/ul>/gi,"[list=1]$1[/list]"); + rep(/
                                                      (.*?)<\/ul>/gi,"[list=i]$1[/list]"); + rep(/
                                                        (.*?)<\/ul>/gi,"[list=I]$1[/list]"); + rep(/
                                                          (.*?)<\/ul>/gi,"[list=a]$1[/list]"); + rep(/
                                                            (.*?)<\/ul>/gi,"[list=A]$1[/list]"); + rep(/
                                                          • (.*?)<\/li>/gi,'[li]$1[/li]'); + rep(/(.*?)<\/code>/gi,"[code]$1[/code]"); rep(/<\/(strong|b)>/gi,"[/b]"); rep(/<(strong|b)>/gi,"[b]"); @@ -124,9 +168,40 @@ _dfrn_bbcode2html : function(s) { s = tinymce.trim(s); - function rep(re, str) { - s = s.replace(re, str); - }; + + function rep(re, str) { + + //modify code to keep stuff intact within [code][/code] blocks + //Waitman Gobble NO WARRANTY + + + var o = new Array(); + var x = s.split("[code]"); + var i = 0; + + var si = ""; + si = x.shift(); + si = si.replace(re,str); + o.push(si); + + for (i = 0; i < x.length; i++) { + var no = new Array(); + var j = x.shift(); + var g = j.split("[/code]"); + no.push(g.shift()); + si = g.shift(); + si = si.replace(re,str); + no.push(si); + o.push(no.join("[/code]")); + } + + s = o.join("[code]"); + + }; + + + + // example: [b] to rep(/\n/gi,"
                                                            "); @@ -136,43 +211,43 @@ rep(/\[\/i\]/gi,""); rep(/\[u\]/gi,""); rep(/\[\/u\]/gi,""); - rep(/\[hr\]/gi,"
                                                            "); + rep(/\[hr\]/gi,"
                                                            "); rep(/\[bookmark=([^\]]+)\](.*?)\[\/bookmark\]/gi,"$2"); rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2"); rep(/\[url\](.*?)\[\/url\]/gi,"
                                                            $1"); rep(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,""); rep(/\[img\](.*?)\[\/img\]/gi,""); - - rep(/\[list\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); - rep(/\[list=\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); - rep(/\[list=1\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); - rep(/\[list=i\](.*?)\[\/list\]/gi,'
                                                              $1
                                                            '); - rep(/\[list=I\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); - rep(/\[list=a\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); - rep(/\[list=A\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); - rep(/\[li\](.*?)\[\/li\]/gi, '
                                                          • $1
                                                          • '); + + rep(/\[list\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); + rep(/\[list=\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); + rep(/\[list=1\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); + rep(/\[list=i\](.*?)\[\/list\]/gi,'
                                                              $1
                                                            '); + rep(/\[list=I\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); + rep(/\[list=a\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); + rep(/\[list=A\](.*?)\[\/list\]/gi, '
                                                              $1
                                                            '); + rep(/\[li\](.*?)\[\/li\]/gi, '
                                                          • $1
                                                          • '); rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); rep(/\[size=(.*?)\](.*?)\[\/size\]/gi,"$2"); rep(/\[code\](.*?)\[\/code\]/gi,"$1"); rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"
                                                            $1
                                                            "); - - /* oembed */ - function _b2h_cb(match, url) { - url = bin2hex(url); - function s_b2h(data) { - match = data; - } - $.ajax({ - url: 'oembed/b2h?url=' + url, - async: false, - success: s_b2h, - dataType: 'html' - }); - return match; - } - s = s.replace(/\[embed\](.*?)\[\/embed\]/gi, _b2h_cb); - - /* /oembed */ + + /* oembed */ + function _b2h_cb(match, url) { + url = bin2hex(url); + function s_b2h(data) { + match = data; + } + $.ajax({ + url: 'oembed/b2h?url=' + url, + async: false, + success: s_b2h, + dataType: 'html' + }); + return match; + } + s = s.replace(/\[embed\](.*?)\[\/embed\]/gi, _b2h_cb); + + /* /oembed */ return s; } From 72894b0e91515461717c584879e5a4331841104a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Sun, 18 Mar 2012 10:36:49 +0000 Subject: [PATCH 093/133] replace split() by explode(); split is deprecated --- include/conversation.php | 2 +- include/email.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 8ca484c9e7..e9f024c274 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -649,7 +649,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { // template to use to render item (wall, walltowall, search) 'template' => $template, - 'type' => implode("",array_slice(split("/",$item['verb']),-1)), + 'type' => implode("",array_slice(explode("/",$item['verb']),-1)), 'tags' => $tags, 'body' => template_escape($body), 'text' => strip_tags(template_escape($body)), diff --git a/include/email.php b/include/email.php index a3449a4249..8ea8145fb6 100755 --- a/include/email.php +++ b/include/email.php @@ -56,7 +56,7 @@ function email_msg_headers($mbox,$uid) { $raw_header = (($mbox && $uid) ? @imap_fetchheader($mbox,$uid,FT_UID) : ''); $raw_header = str_replace("\r",'',$raw_header); $ret = array(); - $h = split("\n",$raw_header); + $h = explode("\n",$raw_header); if(count($h)) foreach($h as $line ) { if (preg_match("/^[a-zA-Z]/", $line)) { From 453b5b46a370e3f01f2c948ac3eddf0bcd82c741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Sun, 18 Mar 2012 15:44:33 +0000 Subject: [PATCH 094/133] CSRF-Protection in the group-related form (creating, renaming and dropping a group, adding/removing members from it) --- include/security.php | 6 ++++++ js/main.js | 4 ++-- mod/group.php | 26 +++++++++++++++++++------- view/group_drop.tpl | 2 +- view/group_edit.tpl | 1 + 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/include/security.php b/include/security.php index 6ea515bffe..45473445a7 100755 --- a/include/security.php +++ b/include/security.php @@ -334,3 +334,9 @@ function check_form_security_token_redirectOnErr($err_redirect, $typename = "", goaway($a->get_baseurl() . $err_redirect ); } } +function check_form_security_token_ForbiddenOnErr($typename = "", $formname = 'form_security_token') { + if (!check_form_security_token($typename, $formname)) { + header('HTTP/1.1 403 Forbidden'); + killme(); + } +} \ No newline at end of file diff --git a/js/main.js b/js/main.js index c20455ad14..babd2a1c38 100755 --- a/js/main.js +++ b/js/main.js @@ -486,9 +486,9 @@ return a.join(''); } - function groupChangeMember(gid,cid) { + function groupChangeMember(gid, cid, sec_token) { $('body .fakelink').css('cursor', 'wait'); - $.get('group/' + gid + '/' + cid, function(data) { + $.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) { $('#group-update-wrapper').html(data); $('body .fakelink').css('cursor', 'auto'); }); diff --git a/mod/group.php b/mod/group.php index 13401ef0d9..a282dbccf5 100755 --- a/mod/group.php +++ b/mod/group.php @@ -21,6 +21,8 @@ function group_post(&$a) { } if(($a->argc == 2) && ($a->argv[1] === 'new')) { + check_form_security_token_redirectOnErr('/group/new', 'group_edit'); + $name = notags(trim($_POST['groupname'])); $r = group_add(local_user(),$name); if($r) { @@ -35,6 +37,8 @@ function group_post(&$a) { return; // NOTREACHED } if(($a->argc == 2) && (intval($a->argv[1]))) { + check_form_security_token_redirectOnErr('/group', 'group_edit'); + $r = q("SELECT * FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($a->argv[1]), intval(local_user()) @@ -62,7 +66,8 @@ function group_post(&$a) { } function group_content(&$a) { - + $change = false; + if(! local_user()) { notice( t('Permission denied') . EOL); return; @@ -83,14 +88,17 @@ function group_content(&$a) { return replace_macros($tpl, $context + array( '$title' => t('Create a group of contacts/friends.'), - '$gname' => array('groupname',t('Group Name: '),$group['name'], ''), + '$gname' => array('groupname',t('Group Name: '), '', ''), '$gid' => 'new', + '$form_security_token' => get_form_security_token("group_edit"), )); } if(($a->argc == 3) && ($a->argv[1] === 'drop')) { + check_form_security_token_redirectOnErr('/group', 'group_drop', 't'); + if(intval($a->argv[2])) { $r = q("SELECT `name` FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($a->argv[2]), @@ -108,6 +116,8 @@ function group_content(&$a) { } if(($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) { + check_form_security_token_ForbiddenOnErr('group_member_change', 't'); + $r = q("SELECT `id` FROM `contact` WHERE `id` = %d AND `uid` = %d and `self` = 0 and `blocked` = 0 AND `pending` = 0 LIMIT 1", intval($a->argv[2]), intval(local_user()) @@ -155,7 +165,8 @@ function group_content(&$a) { $drop_tpl = get_markup_template('group_drop.tpl'); $drop_txt = replace_macros($drop_tpl, array( '$id' => $group['id'], - '$delete' => t('Delete') + '$delete' => t('Delete'), + '$form_security_token' => get_form_security_token("group_drop"), )); $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); @@ -166,6 +177,7 @@ function group_content(&$a) { '$gname' => array('groupname',t('Group Name: '),$group['name'], ''), '$gid' => $group['id'], '$drop' => $drop_txt, + '$form_security_token' => get_form_security_token('group_edit'), ); } @@ -177,14 +189,14 @@ function group_content(&$a) { 'label_members' => t('Members'), 'members' => array(), 'label_contacts' => t('All Contacts'), - 'contacts' => arraY(), + 'contacts' => array(), ); - + $sec_token = addslashes(get_form_security_token('group_member_change')); $textmode = (($switchtotext && (count($members) > $switchtotext)) ? true : false); foreach($members as $member) { if($member['url']) { - $member['click'] = 'groupChangeMember(' . $group['id'] . ',' . $member['id'] . '); return true;'; + $member['click'] = 'groupChangeMember(' . $group['id'] . ',' . $member['id'] . ',\'' . $sec_token . '\'); return true;'; $groupeditor['members'][] = micropro($member,true,'mpgroup', $textmode); } else @@ -199,7 +211,7 @@ function group_content(&$a) { $textmode = (($switchtotext && (count($r) > $switchtotext)) ? true : false); foreach($r as $member) { if(! in_array($member['id'],$preselected)) { - $member['click'] = 'groupChangeMember(' . $group['id'] . ',' . $member['id'] . '); return true;'; + $member['click'] = 'groupChangeMember(' . $group['id'] . ',' . $member['id'] . ',\'' . $sec_token . '\'); return true;'; $groupeditor['contacts'][] = micropro($member,true,'mpall', $textmode); } } diff --git a/view/group_drop.tpl b/view/group_drop.tpl index cbae1610f4..2cbebbb8e5 100755 --- a/view/group_drop.tpl +++ b/view/group_drop.tpl @@ -1,5 +1,5 @@
                                                            - + {{ inc field_input.tpl with $field=$gname }}{{ endinc }} {{ if $drop }}$drop{{ endif }} From e84095182f938682d1fef49a74a36ebf31ceeeb0 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Sun, 18 Mar 2012 18:33:38 -0400 Subject: [PATCH 095/133] fix the comment box being too wide and looking off-kilter Signed-off-by: Simon L'nu --- view/theme/dispy-dark/style.css | 2 +- view/theme/dispy/style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index b4aefbbf23..eaaa0acbd0 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -1258,7 +1258,7 @@ section { } [class^="comment-edit-text"] { margin: 5px 0 10px 20px; - width: 86.5%; + width: 84.5%; } .comment-edit-text-empty { height: 20px; diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css index 26ac08c8c5..812c5ee2e6 100644 --- a/view/theme/dispy/style.css +++ b/view/theme/dispy/style.css @@ -1256,7 +1256,7 @@ section { } [class^="comment-edit-text"] { margin: 5px 0 10px 20px; - width: 86.5%; + width: 84.5%; } .comment-edit-text-empty { height: 20px; From 37f4cbd732de8af22038a06792087c30d4c67989 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 18 Mar 2012 17:57:29 -0700 Subject: [PATCH 096/133] revup --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index b3c79079a6..d5feaed2d1 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1284' ); +define ( 'FRIENDICA_VERSION', '2.3.1285' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1132 ); From cca524495cdc8c1167421393f4d8e8da4a94a855 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 18 Mar 2012 22:12:36 -0700 Subject: [PATCH 098/133] community discovery cont., cleanup of DB debugging --- include/dba.php | 24 ++++++++++++------------ include/delivery.php | 3 ++- include/items.php | 31 +++++++++++++++++++++++++++++-- include/notifier.php | 4 +++- include/poller.php | 2 +- mod/dfrn_poll.php | 6 +++--- view/atom_feed.tpl | 1 + view/atom_feed_dfrn.tpl | 3 ++- 8 files changed, 53 insertions(+), 21 deletions(-) diff --git a/include/dba.php b/include/dba.php index 7455b6b3ee..5beea7a3ac 100755 --- a/include/dba.php +++ b/include/dba.php @@ -1,5 +1,7 @@ debug) - logger('dba: ' . printable(print_r($r, true)), LOGGER_DATA); + logger('dba: ' . printable(print_r($r, true))); return($r); } diff --git a/include/delivery.php b/include/delivery.php index 44a482ca28..532dcd6991 100755 --- a/include/delivery.php +++ b/include/delivery.php @@ -256,7 +256,8 @@ function delivery_run($argv, $argc){ '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , - '$birthday' => $birthday + '$birthday' => $birthday, + '$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '1' : '') )); foreach($items as $item) { diff --git a/include/items.php b/include/items.php index 5e1fec5578..5a297c83ef 100755 --- a/include/items.php +++ b/include/items.php @@ -28,7 +28,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) $sql_extra = " AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' "; - $r = q("SELECT `contact`.*, `user`.`uid` AS `user_uid`, `user`.`nickname`, `user`.`timezone` + $r = q("SELECT `contact`.*, `user`.`uid` AS `user_uid`, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid` WHERE `contact`.`self` = 1 AND `user`.`nickname` = '%s' LIMIT 1", dbesc($owner_nick) @@ -156,7 +156,8 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , - '$birthday' => ((strlen($birthday)) ? '' . xmlify($birthday) . '' : '') + '$birthday' => ((strlen($birthday)) ? '' . xmlify($birthday) . '' : ''), + '$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '1' : '') )); call_hooks('atom_feed', $atom); @@ -1404,6 +1405,19 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) } + $community_page = 0; + $rawtags = $feed->get_feed_tags( NAMESPACE_DFRN, 'community'); + if($rawtags) { + $community_page = intval($rawtags[0]['data']); + } + if(is_array($contact) && intval($contact['forum']) != $community_page) { + q("update contact set forum = %d where id = %d limit 1", + intval($community_page), + intval($contact['id']) + ); + $contact['forum'] = (string) $community_page; + } + // process any deleted entries @@ -1987,6 +2001,19 @@ function local_delivery($importer,$data) { // NOTREACHED } + + $community_page = 0; + $rawtags = $feed->get_feed_tags( NAMESPACE_DFRN, 'community'); + if($rawtags) { + $community_page = intval($rawtags[0]['data']); + } + if(intval($importer['forum']) != $community_page) { + q("update contact set forum = %d where id = %d limit 1", + intval($community_page), + intval($importer['id']) + ); + $importer['forum'] = (string) $community_page; + } logger('local_delivery: feed item count = ' . $feed->get_item_quantity()); diff --git a/include/notifier.php b/include/notifier.php index 07edc70465..d63ad7ae7c 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -337,7 +337,9 @@ function notifier_run($argv, $argc){ '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , ATOM_TIME)) , '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , ATOM_TIME)) , '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , ATOM_TIME)) , - '$birthday' => $birthday + '$birthday' => $birthday, + '$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '1' : '') + )); if($mail) { diff --git a/include/poller.php b/include/poller.php index 3bc98e36ff..8262c1d605 100755 --- a/include/poller.php +++ b/include/poller.php @@ -232,7 +232,7 @@ function poller_run($argv, $argc){ $importer_uid = $contact['uid']; - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1", + $r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` LEFT JOIN `user` on `contact`.`uid` = `user`.`uid` WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1", intval($importer_uid) ); if(! count($r)) diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index b12e071328..fe5cd49063 100755 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -199,7 +199,7 @@ function dfrn_poll_post(&$a) { $ptype = ((x($_POST,'type')) ? $_POST['type'] : ''); $dfrn_version = ((x($_POST,'dfrn_version')) ? (float) $_POST['dfrn_version'] : 2.0); $perm = ((x($_POST,'perm')) ? $_POST['perm'] : 'r'); - + if($ptype === 'profile-check') { if((strlen($challenge)) && (strlen($sec))) { @@ -358,8 +358,8 @@ function dfrn_poll_post(&$a) { intval($contact_id) ); } - } - + } + header("Content-type: application/atom+xml"); $o = get_feed_for($a,$dfrn_id, $a->argv[1], $last_update, $direction); echo $o; diff --git a/view/atom_feed.tpl b/view/atom_feed.tpl index 72cf8e4fd8..2feb547ee2 100755 --- a/view/atom_feed.tpl +++ b/view/atom_feed.tpl @@ -16,6 +16,7 @@ $hub $salmon + $community $feed_updated diff --git a/view/atom_feed_dfrn.tpl b/view/atom_feed_dfrn.tpl index 3d6bcc5b5a..0bae62b526 100755 --- a/view/atom_feed_dfrn.tpl +++ b/view/atom_feed_dfrn.tpl @@ -12,10 +12,11 @@ $feed_id $feed_title - Friendika + Friendica $hub $salmon + $community $feed_updated From 0341078a73f03961292d2459f4e442e07b186b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Mon, 19 Mar 2012 07:37:09 +0000 Subject: [PATCH 099/133] Existing photos could not be used as profile photos anymore - should be fixed now. And some extra logging in the CSRF-Protection to make debugging easier --- include/security.php | 20 ++++++++++++-------- mod/photos.php | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/security.php b/include/security.php index 45473445a7..19e91eb63d 100755 --- a/include/security.php +++ b/include/security.php @@ -299,16 +299,16 @@ function item_permissions_sql($owner_id,$remote_verified = false,$groups = null) * Actually, important actions should not be triggered by Links / GET-Requests at all, but somethimes they still are, * so this mechanism brings in some damage control (the attacker would be able to forge a request to a form of this type, but not to forms of other types). */ -function get_form_security_token($typename = "") { +function get_form_security_token($typename = '') { $a = get_app(); $timestamp = time(); - $sec_hash = hash('whirlpool', $a->user["guid"] . $a->user["prvkey"] . session_id() . $timestamp . $typename); + $sec_hash = hash('whirlpool', $a->user['guid'] . $a->user['prvkey'] . session_id() . $timestamp . $typename); - return $timestamp . "." . $sec_hash; + return $timestamp . '.' . $sec_hash; } -function check_form_security_token($typename = "", $formname = 'form_security_token') { +function check_form_security_token($typename = '', $formname = 'form_security_token') { if (!x($_REQUEST, $formname)) return false; $hash = $_REQUEST[$formname]; @@ -316,10 +316,10 @@ function check_form_security_token($typename = "", $formname = 'form_security_to $a = get_app(); - $x = explode(".", $hash); + $x = explode('.', $hash); if (time() > (IntVal($x[0]) + $max_livetime)) return false; - $sec_hash = hash('whirlpool', $a->user["guid"] . $a->user["prvkey"] . session_id() . $x[0] . $typename); + $sec_hash = hash('whirlpool', $a->user['guid'] . $a->user['prvkey'] . session_id() . $x[0] . $typename); return ($sec_hash == $x[1]); } @@ -327,15 +327,19 @@ function check_form_security_token($typename = "", $formname = 'form_security_to function check_form_security_std_err_msg() { return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before subitting it.') . EOL; } -function check_form_security_token_redirectOnErr($err_redirect, $typename = "", $formname = 'form_security_token') { +function check_form_security_token_redirectOnErr($err_redirect, $typename = '', $formname = 'form_security_token') { if (!check_form_security_token($typename, $formname)) { $a = get_app(); + logger('check_form_security_token failed: user ' . $a->user['guid'] . ' - form element ' . $typename); + logger('check_form_security_token failed: _REQUEST data: ' . print_r($_REQUEST, true), LOGGER_DATA); notice( check_form_security_std_err_msg() ); goaway($a->get_baseurl() . $err_redirect ); } } -function check_form_security_token_ForbiddenOnErr($typename = "", $formname = 'form_security_token') { +function check_form_security_token_ForbiddenOnErr($typename = '', $formname = 'form_security_token') { if (!check_form_security_token($typename, $formname)) { + logger('check_form_security_token failed: user ' . $a->user['guid'] . ' - form element ' . $typename); + logger('check_form_security_token failed: _REQUEST data: ' . print_r($_REQUEST, true), LOGGER_DATA); header('HTTP/1.1 403 Forbidden'); killme(); } diff --git a/mod/photos.php b/mod/photos.php index e40ae0d74a..4406780d3d 100755 --- a/mod/photos.php +++ b/mod/photos.php @@ -1069,7 +1069,7 @@ function photos_content(&$a) { if($can_post && ($ph[0]['uid'] == $owner_uid)) { $tools = array( 'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))), - 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')), + 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'] . '?form_security_token=' . get_form_security_token('profile_photo'), t('Use as profile photo')), ); // lock From cf2edb5b9ad5f9bad1fa94ad577f1ab8a664e8e6 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 19 Mar 2012 01:20:53 -0700 Subject: [PATCH 100/133] ctrl + left|right cursor keys to prev/next photos --- mod/photos.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index 4406780d3d..b294f0a666 100755 --- a/mod/photos.php +++ b/mod/photos.php @@ -1069,7 +1069,7 @@ function photos_content(&$a) { if($can_post && ($ph[0]['uid'] == $owner_uid)) { $tools = array( 'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))), - 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'] . '?form_security_token=' . get_form_security_token('profile_photo'), t('Use as profile photo')), + 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')), ); // lock @@ -1081,6 +1081,17 @@ function photos_content(&$a) { } + if(! $cmd !== 'edit') { + $a->page['htmlhead'] .= ''; + } + if($prevlink) $prevlink = array($prevlink, '') ; From 2349852b4abd1638624b541f173f51d1fb1ea011 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 19 Mar 2012 03:18:39 -0700 Subject: [PATCH 101/133] support "no_smilies" --- include/text.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/text.php b/include/text.php index 89acbf9fab..a0ff1600ed 100644 --- a/include/text.php +++ b/include/text.php @@ -694,8 +694,13 @@ function linkify($s) { if(! function_exists('smilies')) { function smilies($s, $sample = false) { + $a = get_app(); + if(intval(get_config('system','no_smilies')) + || (local_user() && intval(get_pconfig(local_user(),'system','no_smilies')))) + return $s; + $s = preg_replace_callback('/
                                                            (.*?)<\/pre>/ism','smile_encode',$s);
                                                             	$s = preg_replace_callback('/(.*?)<\/code>/ism','smile_encode',$s);
                                                             
                                                            
                                                            From 139a86dbd395f4601b29b9af97ac8ea190cce9f9 Mon Sep 17 00:00:00 2001
                                                            From: friendica 
                                                            Date: Mon, 19 Mar 2012 06:48:11 -0700
                                                            Subject: [PATCH 102/133] some openid fixes, use identity url from openid
                                                             server and normalise it.
                                                            
                                                            ---
                                                             boot.php         | 5 +++--
                                                             include/text.php | 3 +++
                                                             mod/openid.php   | 9 ++++++++-
                                                             mod/settings.php | 1 +
                                                             4 files changed, 15 insertions(+), 3 deletions(-)
                                                            
                                                            diff --git a/boot.php b/boot.php
                                                            index d5feaed2d1..9779bb9a8f 100755
                                                            --- a/boot.php
                                                            +++ b/boot.php
                                                            @@ -713,15 +713,16 @@ function login($register = false, $hiddens=false) {
                                                             
                                                             	$noid = get_config('system','no_openid');
                                                             	
                                                            +	$dest_url = $a->get_baseurl(true) . '/' . $a->query_string;
                                                            +
                                                             	if(local_user()) {
                                                             		$tpl = get_markup_template("logout.tpl");
                                                             	}
                                                             	else {
                                                             		$tpl = get_markup_template("login.tpl");
                                                            -
                                                            +		$_SESSION['return_url'] = $a->query_string;
                                                             	}
                                                             
                                                            -	$dest_url = $a->get_baseurl(true) . '/' . $a->query_string;
                                                             
                                                             	$o .= replace_macros($tpl,array(
                                                             
                                                            diff --git a/include/text.php b/include/text.php
                                                            index a0ff1600ed..2956c94676 100644
                                                            --- a/include/text.php
                                                            +++ b/include/text.php
                                                            @@ -1355,3 +1355,6 @@ function file_tag_unsave_file($uid,$item,$file) {
                                                             	return true;
                                                             }
                                                             
                                                            +function normalise_openid($s) {
                                                            +	return trim(str_replace(array('http://','https://'),array('',''),$s),'/');
                                                            +}
                                                            diff --git a/mod/openid.php b/mod/openid.php
                                                            index df074b299f..0be48060e6 100755
                                                            --- a/mod/openid.php
                                                            +++ b/mod/openid.php
                                                            @@ -10,6 +10,8 @@ function openid_content(&$a) {
                                                             	if($noid)
                                                             		goaway(z_root());
                                                             
                                                            +	logger('mod_openid ' . print_r($_REQUEST,true), LOGGER_DATA);
                                                            +
                                                             	if((x($_GET,'openid_mode')) && (x($_SESSION,'openid'))) {
                                                             		$openid = new LightOpenID;
                                                             
                                                            @@ -54,11 +56,16 @@ function openid_content(&$a) {
                                                             				// NOTREACHED
                                                             			} 
                                                             
                                                            +			$authid = normalise_openid($_REQUEST['openid_identity']);
                                                            +			if(! strlen($authid))
                                                            +				goaway(z_root());
                                                            +
                                                             
                                                             			$r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` 
                                                             				FROM `user` WHERE `openid` = '%s' AND `blocked` = 0 AND `account_expired` = 0 AND `verified` = 1 LIMIT 1",
                                                            -				dbesc($_SESSION['openid'])
                                                            +				dbesc($authid)
                                                             			);
                                                            +
                                                             			if(! count($r)) {
                                                             				notice( t('Login failed.') . EOL );
                                                             				goaway(z_root());
                                                            diff --git a/mod/settings.php b/mod/settings.php
                                                            index 3a8ad29d28..59ede47297 100755
                                                            --- a/mod/settings.php
                                                            +++ b/mod/settings.php
                                                            @@ -322,6 +322,7 @@ function settings_post(&$a) {
                                                             	$str_contact_deny  = perms2str($_POST['contact_deny']);
                                                             
                                                             	$openidserver = $a->user['openidserver'];
                                                            +	$openid = normalise_openid($openid);
                                                             
                                                             	// If openid has changed or if there's an openid but no openidserver, try and discover it.
                                                             
                                                            
                                                            From e9b33a6f1f42899a4d46cb23421085cdc2bbbaa6 Mon Sep 17 00:00:00 2001
                                                            From: Thomas 
                                                            Date: Mon, 19 Mar 2012 21:59:06 +0000
                                                            Subject: [PATCH 103/133] 	modified:   include/text.php 	deleted:   
                                                             images/diaspora.png 	deleted:    images/smiley-bangheaddesk.gif 
                                                             deleted:    images/smiley-beard.png 	deleted:    images/smiley-shaka.gif 
                                                             deleted:    images/smiley-whitebeard.png
                                                            
                                                            Removed selected smiley per Mike's request.  Also removed deprecated smileys that were just commented out.
                                                            ---
                                                             include/text.php | 21 ---------------------
                                                             1 file changed, 21 deletions(-)
                                                            
                                                            diff --git a/include/text.php b/include/text.php
                                                            index 2956c94676..ed37326df3 100644
                                                            --- a/include/text.php
                                                            +++ b/include/text.php
                                                            @@ -709,27 +709,20 @@ function smilies($s, $sample = false) {
                                                             		'</3', 
                                                             		'<\\3', 
                                                             		':-)', 
                                                            -//		':)', 
                                                             		';-)', 
                                                            -//		';)', 
                                                             		':-(', 
                                                            -//		':(', 
                                                             		':-P', 
                                                            -//		':P', 
                                                             		':-"', 
                                                             		':-"', 
                                                             		':-x', 
                                                             		':-X', 
                                                             		':-D', 
                                                            -//		':D', 
                                                             		'8-|', 
                                                             		'8-O', 
                                                             		':-O', 
                                                             		'\\o/', 
                                                             		'o.O', 
                                                             		'O.o', 
                                                            -		'\\.../', 
                                                            -		'\\ooo/', 
                                                             		":'(", 
                                                             		":-!", 
                                                             		":-/", 
                                                            @@ -742,9 +735,6 @@ function smilies($s, $sample = false) {
                                                             		':headdesk',
                                                             		'~friendika', 
                                                             		'~friendica', 
                                                            -//		'Diaspora*' 
                                                            -		':beard',
                                                            -		':whitebeard'
                                                             
                                                             	);
                                                             
                                                            @@ -753,27 +743,20 @@ function smilies($s, $sample = false) {
                                                             		'</3',
                                                             		'<\\3',
                                                             		':-)',
                                                            -//		':)',
                                                             		';-)',
                                                            -//		';)',                
                                                             		':-(',
                                                            -//		':(',
                                                             		':-P',
                                                            -//		':P',
                                                             		':-\',
                                                             		':-\',
                                                             		':-x',
                                                             		':-X',
                                                             		':-D',
                                                            -//		':D',                
                                                             		'8-|',
                                                             		'8-O',
                                                             		':-O',                
                                                             		'\\o/',
                                                             		'o.O',
                                                             		'O.o',
                                                            -		'\\.../',
                                                            -		'\\ooo/',
                                                             		':\'(',
                                                             		':-!',
                                                             		':-/',
                                                            @@ -783,12 +766,8 @@ function smilies($s, $sample = false) {
                                                             		':homebrew',
                                                             		':coffee',
                                                             		':facepalm',
                                                            -		':headdesk',
                                                             		'~friendika ~friendika',
                                                             		'~friendica ~friendica',
                                                            -//		'DiasporaDiaspora*',
                                                            -		':beard',
                                                            -		':whitebeard'
                                                             	);
                                                             
                                                             	$params = array('texts' => $texts, 'icons' => $icons, 'string' => $s);
                                                            
                                                            From 9e133d6412945f84f858d4bfde26c69f9e1afbfd Mon Sep 17 00:00:00 2001
                                                            From: friendica 
                                                            Date: Mon, 19 Mar 2012 15:03:09 -0700
                                                            Subject: [PATCH 104/133] refactor openid logins/registrations
                                                            
                                                            ---
                                                             boot.php         |   2 +-
                                                             include/auth.php |  29 ++-----------
                                                             mod/openid.php   | 106 ++++++++++++++++++++++++-----------------------
                                                             3 files changed, 60 insertions(+), 77 deletions(-)
                                                            
                                                            diff --git a/boot.php b/boot.php
                                                            index 9779bb9a8f..be4b8ca0e0 100755
                                                            --- a/boot.php
                                                            +++ b/boot.php
                                                            @@ -9,7 +9,7 @@ require_once('include/nav.php');
                                                             require_once('include/cache.php');
                                                             
                                                             define ( 'FRIENDICA_PLATFORM',     'Friendica');
                                                            -define ( 'FRIENDICA_VERSION',      '2.3.1285' );
                                                            +define ( 'FRIENDICA_VERSION',      '2.3.1286' );
                                                             define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
                                                             define ( 'DB_UPDATE_VERSION',      1132      );
                                                             
                                                            diff --git a/include/auth.php b/include/auth.php
                                                            index fc52684e64..faf9221993 100755
                                                            --- a/include/auth.php
                                                            +++ b/include/auth.php
                                                            @@ -77,7 +77,7 @@ else {
                                                             
                                                             			$noid = get_config('system','no_openid');
                                                             
                                                            -			$openid_url = trim(  (strlen($_POST['openid_url'])?$_POST['openid_url']:$_POST['username']) );
                                                            +			$openid_url = trim((strlen($_POST['openid_url'])?$_POST['openid_url']:$_POST['username']) );
                                                             
                                                             			// validate_url alters the calling parameter
                                                             
                                                            @@ -99,30 +99,9 @@ else {
                                                             			$openid->identity = $openid_url;
                                                             			$_SESSION['openid'] = $openid_url;
                                                             			$a = get_app();
                                                            -			$openid->returnUrl = $a->get_baseurl() . '/openid'; 
                                                            -
                                                            -			$r = q("SELECT `uid` FROM `user` WHERE `openid` = '%s' LIMIT 1",
                                                            -				dbesc($openid_url)
                                                            -			);
                                                            -			if(count($r)) { 
                                                            -				// existing account
                                                            -				goaway($openid->authUrl());
                                                            -				// NOTREACHED	
                                                            -			}
                                                            -			else {
                                                            -				if($a->config['register_policy'] == REGISTER_CLOSED) {
                                                            -					$a = get_app();
                                                            -					notice( t('Login failed.') . EOL);
                                                            -					goaway(z_root());
                                                            -					// NOTREACHED
                                                            -				}
                                                            -				// new account
                                                            -				$_SESSION['register'] = 1;
                                                            -				$openid->required = array('namePerson/friendly', 'contact/email', 'namePerson');
                                                            -				$openid->optional = array('namePerson/first','media/image/aspect11','media/image/default');
                                                            -				goaway($openid->authUrl());
                                                            -				// NOTREACHED	
                                                            -			}
                                                            +			$openid->returnUrl = $a->get_baseurl(true) . '/openid'; 
                                                            +			goaway($openid->authUrl());
                                                            +			// NOTREACHED
                                                             		}
                                                             	}
                                                             	if((x($_POST,'auth-params')) && $_POST['auth-params'] === 'login') {
                                                            diff --git a/mod/openid.php b/mod/openid.php
                                                            index 0be48060e6..594a90937c 100755
                                                            --- a/mod/openid.php
                                                            +++ b/mod/openid.php
                                                            @@ -17,68 +17,72 @@ function openid_content(&$a) {
                                                             
                                                             		if($openid->validate()) {
                                                             
                                                            -			if(x($_SESSION,'register')) {
                                                            -				unset($_SESSION['register']);
                                                            -				$args = '';
                                                            -				$attr = $openid->getAttributes();
                                                            -				if(is_array($attr) && count($attr)) {
                                                            -					foreach($attr as $k => $v) {
                                                            -						if($k === 'namePerson/friendly')
                                                            -							$nick = notags(trim($v));
                                                            -						if($k === 'namePerson/first')
                                                            -							$first = notags(trim($v));
                                                            -						if($k === 'namePerson')
                                                            -							$args .= '&username=' . notags(trim($v));
                                                            -						if($k === 'contact/email')
                                                            -							$args .= '&email=' . notags(trim($v));
                                                            -						if($k === 'media/image/aspect11')
                                                            -							$photosq = bin2hex(trim($v));
                                                            -						if($k === 'media/image/default')
                                                            -							$photo = bin2hex(trim($v));
                                                            -					}
                                                            -				}
                                                            -				if($nick)
                                                            -					$args .= '&nickname=' . $nick;
                                                            -				elseif($first)
                                                            -					$args .= '&nickname=' . $first;
                                                            -
                                                            -				if($photosq)
                                                            -					$args .= '&photo=' . $photosq;
                                                            -				elseif($photo)
                                                            -					$args .= '&photo=' . $photo;
                                                            -
                                                            -				$args .= '&openid_url=' . notags(trim($_SESSION['openid']));
                                                            -				if($a->config['register_policy'] != REGISTER_CLOSED)
                                                            -					goaway($a->get_baseurl() . '/register' . $args);
                                                            -				else
                                                            -					goaway(z_root());
                                                            -
                                                            -				// NOTREACHED
                                                            -			} 
                                                            -
                                                             			$authid = normalise_openid($_REQUEST['openid_identity']);
                                                            -			if(! strlen($authid))
                                                            -				goaway(z_root());
                                                             
                                                            +			if(! strlen($authid)) {
                                                            +				logger( t('OpenID protocol error. No ID returned.') . EOL);
                                                            +				goaway(z_root());
                                                            +			}
                                                             
                                                             			$r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` 
                                                            -				FROM `user` WHERE `openid` = '%s' AND `blocked` = 0 AND `account_expired` = 0 AND `verified` = 1 LIMIT 1",
                                                            +				FROM `user` WHERE `openid` = '%s' AND `blocked` = 0 
                                                            +				AND `account_expired` = 0 AND `verified` = 1 LIMIT 1",
                                                             				dbesc($authid)
                                                             			);
                                                             
                                                            -			if(! count($r)) {
                                                            -				notice( t('Login failed.') . EOL );
                                                            +			if($r && count($r)) {
                                                            +				unset($_SESSION['openid']);
                                                            +
                                                            +				require_once('include/security.php');
                                                            +				authenticate_success($r[0],true,true);
                                                            +
                                                            +				// just in case there was no return url set 
                                                            +				// and we fell through
                                                            +
                                                             				goaway(z_root());
                                                            -  			}
                                                            -			unset($_SESSION['openid']);
                                                            +			}
                                                             
                                                            -			require_once('include/security.php');
                                                            -			authenticate_success($r[0],true,true);
                                                            +			// new registration?
                                                             
                                                            -			// just in case there was no return url set 
                                                            -			// and we fell through
                                                            +			if($a->config['register_policy'] == REGISTER_CLOSED) {
                                                            +				notice( t('Account not found and OpenID registration is not permitted on this site.') . EOL);
                                                            +				goaway(z_root());
                                                            +			}
                                                             
                                                            -			goaway(z_root());
                                                            +			unset($_SESSION['register']);
                                                            +			$args = '';
                                                            +			$attr = $openid->getAttributes();
                                                            +			if(is_array($attr) && count($attr)) {
                                                            +				foreach($attr as $k => $v) {
                                                            +					if($k === 'namePerson/friendly')
                                                            +						$nick = notags(trim($v));
                                                            +					if($k === 'namePerson/first')
                                                            +						$first = notags(trim($v));
                                                            +					if($k === 'namePerson')
                                                            +						$args .= '&username=' . notags(trim($v));
                                                            +					if($k === 'contact/email')
                                                            +						$args .= '&email=' . notags(trim($v));
                                                            +					if($k === 'media/image/aspect11')
                                                            +						$photosq = bin2hex(trim($v));
                                                            +					if($k === 'media/image/default')
                                                            +						$photo = bin2hex(trim($v));
                                                            +				}
                                                            +			}
                                                            +			if($nick)
                                                            +				$args .= '&nickname=' . $nick;
                                                            +			elseif($first)
                                                            +				$args .= '&nickname=' . $first;
                                                            +
                                                            +			if($photosq)
                                                            +				$args .= '&photo=' . $photosq;
                                                            +			elseif($photo)
                                                            +				$args .= '&photo=' . $photo;
                                                            +
                                                            +			$args .= '&openid_url=' . notags(trim($authid));
                                                            +
                                                            +			goaway($a->get_baseurl() . '/register' . $args);
                                                            +
                                                            +			// NOTREACHED
                                                             		}
                                                             	}
                                                             	notice( t('Login failed.') . EOL);
                                                            
                                                            From b8f63124086e57e6930a53b322daf86a9c431763 Mon Sep 17 00:00:00 2001
                                                            From: friendica 
                                                            Date: Mon, 19 Mar 2012 15:10:14 -0700
                                                            Subject: [PATCH 105/133] cleanup after openid refactoring
                                                            
                                                            ---
                                                             mod/openid.php | 7 ++++++-
                                                             1 file changed, 6 insertions(+), 1 deletion(-)
                                                            
                                                            diff --git a/mod/openid.php b/mod/openid.php
                                                            index 594a90937c..e2cea7d851 100755
                                                            --- a/mod/openid.php
                                                            +++ b/mod/openid.php
                                                            @@ -13,6 +13,7 @@ function openid_content(&$a) {
                                                             	logger('mod_openid ' . print_r($_REQUEST,true), LOGGER_DATA);
                                                             
                                                             	if((x($_GET,'openid_mode')) && (x($_SESSION,'openid'))) {
                                                            +
                                                             		$openid = new LightOpenID;
                                                             
                                                             		if($openid->validate()) {
                                                            @@ -31,6 +32,9 @@ function openid_content(&$a) {
                                                             			);
                                                             
                                                             			if($r && count($r)) {
                                                            +
                                                            +				// successful OpenID login
                                                            +
                                                             				unset($_SESSION['openid']);
                                                             
                                                             				require_once('include/security.php');
                                                            @@ -42,7 +46,8 @@ function openid_content(&$a) {
                                                             				goaway(z_root());
                                                             			}
                                                             
                                                            -			// new registration?
                                                            +			// Successful OpenID login - but we can't match it to an existing account.
                                                            +			// New registration?
                                                             
                                                             			if($a->config['register_policy'] == REGISTER_CLOSED) {
                                                             				notice( t('Account not found and OpenID registration is not permitted on this site.') . EOL);
                                                            
                                                            From 84f8e2eaa87c90473ce79ebcd4f76f3657258f27 Mon Sep 17 00:00:00 2001
                                                            From: Thomas 
                                                            Date: Mon, 19 Mar 2012 22:32:19 +0000
                                                            Subject: [PATCH 106/133] 	modified:   include/text.php Stupid bug fixed
                                                            
                                                            ---
                                                             include/text.php | 5 ++---
                                                             1 file changed, 2 insertions(+), 3 deletions(-)
                                                            
                                                            diff --git a/include/text.php b/include/text.php
                                                            index ed37326df3..527f3a3442 100644
                                                            --- a/include/text.php
                                                            +++ b/include/text.php
                                                            @@ -732,9 +732,8 @@ function smilies($s, $sample = false) {
                                                             		':homebrew', 
                                                             		':coffee', 
                                                             		':facepalm',
                                                            -		':headdesk',
                                                             		'~friendika', 
                                                            -		'~friendica', 
                                                            +		'~friendica'
                                                             
                                                             	);
                                                             
                                                            @@ -767,7 +766,7 @@ function smilies($s, $sample = false) {
                                                             		':coffee',
                                                             		':facepalm',
                                                             		'~friendika ~friendika',
                                                            -		'~friendica ~friendica',
                                                            +		'~friendica ~friendica'
                                                             	);
                                                             
                                                             	$params = array('texts' => $texts, 'icons' => $icons, 'string' => $s);
                                                            
                                                            From 5a5aadb743e055530aa071dd3e47705a3bf5d728 Mon Sep 17 00:00:00 2001
                                                            From: friendica 
                                                            Date: Mon, 19 Mar 2012 21:58:21 -0700
                                                            Subject: [PATCH 107/133] add IP address to failed login log message
                                                            
                                                            ---
                                                             include/auth.php | 3 ++-
                                                             1 file changed, 2 insertions(+), 1 deletion(-)
                                                            
                                                            diff --git a/include/auth.php b/include/auth.php
                                                            index 4e246e3541..835616a829 100755
                                                            --- a/include/auth.php
                                                            +++ b/include/auth.php
                                                            @@ -104,6 +104,7 @@ else {
                                                             			// NOTREACHED
                                                             		}
                                                             	}
                                                            +
                                                             	if((x($_POST,'auth-params')) && $_POST['auth-params'] === 'login') {
                                                             
                                                             		$record = null;
                                                            @@ -144,7 +145,7 @@ else {
                                                             		}
                                                             
                                                             		if((! $record) || (! count($record))) {
                                                            -			logger('authenticate: failed login attempt: ' . notags(trim($_POST['username']))); 
                                                            +			logger('authenticate: failed login attempt: ' . notags(trim($_POST['username'])) . ' from IP ' . $_SERVER['REMOTE_ADDR']); 
                                                             			notice( t('Login failed.') . EOL );
                                                             			goaway(z_root());
                                                               		}
                                                            
                                                            From 9df797299320cea01c541bb4997e498f915f98fa Mon Sep 17 00:00:00 2001
                                                            From: friendica 
                                                            Date: Tue, 20 Mar 2012 01:50:20 -0700
                                                            Subject: [PATCH 108/133] bug #339 - lostpass sending to username, not email
                                                            
                                                            ---
                                                             mod/lostpass.php | 9 +++++----
                                                             1 file changed, 5 insertions(+), 4 deletions(-)
                                                            
                                                            diff --git a/mod/lostpass.php b/mod/lostpass.php
                                                            index b71398fa4b..57e6d69653 100755
                                                            --- a/mod/lostpass.php
                                                            +++ b/mod/lostpass.php
                                                            @@ -3,13 +3,13 @@
                                                             
                                                             function lostpass_post(&$a) {
                                                             
                                                            -	$email = notags(trim($_POST['login-name']));
                                                            -	if(! $email)
                                                            +	$loginame = notags(trim($_POST['login-name']));
                                                            +	if(! $loginame)
                                                             		goaway(z_root());
                                                             
                                                             	$r = q("SELECT * FROM `user` WHERE ( `email` = '%s' OR `nickname` = '%s' ) AND `verified` = 1 AND `blocked` = 0 LIMIT 1",
                                                            -		dbesc($email),
                                                            -		dbesc($email)
                                                            +		dbesc($loginame),
                                                            +		dbesc($loginame)
                                                             	);
                                                             
                                                             	if(! count($r)) {
                                                            @@ -19,6 +19,7 @@ function lostpass_post(&$a) {
                                                             
                                                             	$uid = $r[0]['uid'];
                                                             	$username = $r[0]['username'];
                                                            +	$email = $r[0]['email'];
                                                             
                                                             	$new_password = autoname(12) . mt_rand(100,9999);
                                                             	$new_password_encoded = hash('whirlpool',$new_password);
                                                            
                                                            From de0298e67ece602eb95d6a86ed5eebcb713c4dbb Mon Sep 17 00:00:00 2001
                                                            From: Simon L'nu 
                                                            Date: Tue, 20 Mar 2012 11:37:51 -0400
                                                            Subject: [PATCH 109/133] some tweakings for intro boxes (finally got an intro
                                                             i could see :). dispy synced with dispy-dark
                                                            
                                                            Signed-off-by: Simon L'nu 
                                                            ---
                                                             view/theme/dispy-dark/style.css | 67 ++++++++++++++++++++++++++-
                                                             view/theme/dispy/photo_view.tpl | 13 ++----
                                                             view/theme/dispy/style.css      | 81 +++++++++++++++++++++++++++++++--
                                                             3 files changed, 148 insertions(+), 13 deletions(-)
                                                            
                                                            diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css
                                                            index eaaa0acbd0..9883b2fd72 100644
                                                            --- a/view/theme/dispy-dark/style.css
                                                            +++ b/view/theme/dispy-dark/style.css
                                                            @@ -153,9 +153,9 @@ a:hover {
                                                                 color: #729fcf;
                                                             }
                                                             input[type=submit] {
                                                            -	font-weight: bold;
                                                                 background-color: #eee;
                                                             	color: #2e302e;
                                                            +	font-weight: bold;
                                                                 margin-top: 10px;
                                                                 height: 22px;
                                                                 -webkit-border-radius: 5px;
                                                            @@ -1872,6 +1872,71 @@ div[id$="wrapper"] br {
                                                                 clear:both;
                                                             }
                                                             
                                                            +
                                                            +/**
                                                            + * intros
                                                            + */
                                                            +.intro-wrapper {
                                                            +    margin-top: 20px;
                                                            +}
                                                            +
                                                            +.intro-fullname {
                                                            +    font-size: 1.1em;
                                                            +    font-weight: bold;
                                                            +
                                                            +}
                                                            +.intro-desc {
                                                            +    margin-bottom: 20px;
                                                            +    font-weight: bold;
                                                            +}
                                                            +
                                                            +.intro-note {
                                                            +    padding: 10px;
                                                            +}
                                                            +
                                                            +.intro-end {
                                                            +    padding: 30px;
                                                            +}
                                                            +
                                                            +.intro-form {
                                                            +    float: left;
                                                            +}
                                                            +.intro-approve-form {
                                                            +    clear: both;
                                                            +}
                                                            +.intro-approve-as-friend-end {
                                                            +    clear: both;
                                                            +}
                                                            +.intro-submit-approve, .intro-submit-ignore {
                                                            +    margin-right: 20px;
                                                            +}
                                                            +.intro-submit-approve {
                                                            +    margin-top: 15px;
                                                            +}
                                                            +
                                                            +.intro-approve-as-friend-label, .intro-approve-as-fan-label {
                                                            +    float: left;
                                                            +}
                                                            +.intro-approve-as-friend, .intro-approve-as-fan {
                                                            +    float: left;
                                                            +}
                                                            +.intro-form-end {
                                                            +    clear: both;
                                                            +    margin-bottom: 10px;
                                                            +}
                                                            +.intro-approve-as-friend-desc {
                                                            +    margin-top: 10px;
                                                            +}
                                                            +.intro-approve-as-end {
                                                            +    clear: both;
                                                            +    margin-bottom: 10px;
                                                            +}
                                                            +
                                                            +.intro-end {
                                                            +    clear: both;
                                                            +}
                                                            +
                                                            +
                                                             /**
                                                              * events
                                                              **/
                                                            diff --git a/view/theme/dispy/photo_view.tpl b/view/theme/dispy/photo_view.tpl
                                                            index f1209ec58f..732caf6900 100644
                                                            --- a/view/theme/dispy/photo_view.tpl
                                                            +++ b/view/theme/dispy/photo_view.tpl
                                                            @@ -4,18 +4,15 @@
                                                             
                                                            -
                                                            -
                                                            - {{ if $prevlink }}{{ endif }} - - {{ if $nextlink }}{{ endif }} +{{ if $lock }} | $lock {{ endif }}
                                                            +{{ if $prevlink }}{{ endif }} +
                                                            +{{ if $nextlink }}{{ endif }}
                                                            $desc
                                                            {{ if $tags }} diff --git a/view/theme/dispy/style.css b/view/theme/dispy/style.css index 812c5ee2e6..6547cf986f 100644 --- a/view/theme/dispy/style.css +++ b/view/theme/dispy/style.css @@ -48,7 +48,7 @@ body { body, button, input, select, textarea { font-family: sans-serif; color: #222; - background-color: rgb(254,254,254); + background-color: #efefef; } select { border: 1px #555 dotted; @@ -152,10 +152,11 @@ a:hover { color: #729fcf; } input[type=submit] { + background-color: #555753; + color: #eeeeec; + font-weight: bold; margin-top: 10px; height: 22px; - background-color: #555753; - color: #eeeeec; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; @@ -1494,6 +1495,8 @@ div[id$="wrapper"] br { } #prvmail-subject { width: 100%; + color: #eec; + background: #444; } #prvmail-submit-wrapper { margin-top: 10px; @@ -1859,6 +1862,71 @@ div[id$="wrapper"] br { clear:both; } + +/** + * intros + */ +.intro-wrapper { + margin-top: 20px; +} + +.intro-fullname { + font-size: 1.1em; + font-weight: bold; + +} +.intro-desc { + margin-bottom: 20px; + font-weight: bold; +} + +.intro-note { + padding: 10px; +} + +.intro-end { + padding: 30px; +} + +.intro-form { + float: left; +} +.intro-approve-form { + clear: both; +} +.intro-approve-as-friend-end { + clear: both; +} +.intro-submit-approve, .intro-submit-ignore { + margin-right: 20px; +} +.intro-submit-approve { + margin-top: 15px; +} + +.intro-approve-as-friend-label, .intro-approve-as-fan-label { + float: left; +} +.intro-approve-as-friend, .intro-approve-as-fan { + float: left; +} +.intro-form-end { + clear: both; + margin-bottom: 10px; +} +.intro-approve-as-friend-desc { + margin-top: 10px; +} +.intro-approve-as-end { + clear: both; + margin-bottom: 10px; +} + +.intro-end { + clear: both; +} + + /** * events **/ @@ -2162,11 +2230,16 @@ div[id$="wrapper"] br { width: 16px; height: 16px; } #adminpage table tr:hover { - background-color:#bbc7d7; +/* color: ;*/ + background-color: #bbc7d7; } #adminpage .selectall { text-align: right; } +#adminpage #users a { +/* color: #;*/ + text-decoration: underline; +} /** * Form fields From 92ef36ad61bc96905b062a727d1f4558ed734bdb Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Mar 2012 14:55:18 -0700 Subject: [PATCH 110/133] slightly relax overly strict permissions in community and search to match those in display - tl;dr public conversations are publicly visible --- boot.php | 2 +- mod/community.php | 12 +++++++----- mod/search.php | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/boot.php b/boot.php index be4b8ca0e0..fa081df1b0 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1286' ); +define ( 'FRIENDICA_VERSION', '2.3.1287' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'DB_UPDATE_VERSION', 1132 ); diff --git a/mod/community.php b/mod/community.php index a989999420..cf459617ea 100755 --- a/mod/community.php +++ b/mod/community.php @@ -41,15 +41,16 @@ function community_content(&$a, $update = 0) { // Here is the way permissions work in this module... - // Only public wall posts can be shown + // Only public posts can be shown // OR your own posts if you are a logged in member $r = q("SELECT COUNT(*) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 - AND `wall` = 1 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' - AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `user`.`hidewall` = 0 + AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' + AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' + AND `item`.`private` = 0 AND `user`.`hidewall` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 " ); @@ -69,8 +70,9 @@ function community_content(&$a, $update = 0) { FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 - AND `wall` = 1 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' - AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `user`.`hidewall` = 0 + AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' + AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' + AND `item`.`private` = 0 AND `user`.`hidewall` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 ORDER BY `received` DESC LIMIT %d, %d ", intval($a->pager['start']), diff --git a/mod/search.php b/mod/search.php index 386592ea19..50e7a6abc7 100755 --- a/mod/search.php +++ b/mod/search.php @@ -93,8 +93,9 @@ function search_content(&$a) { return $o; // Here is the way permissions work in the search module... - // Only public wall posts can be shown + // Only public posts can be shown // OR your own posts if you are a logged in member + // No items will be shown if the member has a blocked profile wall. $s_regx = sprintf("AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' )", dbesc(preg_quote($search)), dbesc('\\]' . preg_quote($search) . '\\[')); @@ -104,7 +105,7 @@ function search_content(&$a) { $r = q("SELECT COUNT(*) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 - AND (( `wall` = 1 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `user`.`hidewall` = 0) + AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0) OR `item`.`uid` = %d ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 $search_alg ", @@ -127,7 +128,7 @@ function search_content(&$a) { FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 - AND (( `wall` = 1 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0 ) + AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0 ) OR `item`.`uid` = %d ) AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 $search_alg From 894278dbcc83857a9140a03eb6064c642b5ce293 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Mar 2012 15:41:06 -0700 Subject: [PATCH 111/133] change default profile photo to something more interesting than a reddish brown square --- images/person-175.jpg | Bin 0 -> 8510 bytes images/person-48.jpg | Bin 0 -> 1274 bytes images/person-80.jpg | Bin 0 -> 2303 bytes include/Photo.php | 6 +++--- include/Scrape.php | 2 +- include/nav.php | 2 +- mod/dfrn_confirm.php | 2 +- mod/notifications.php | 2 +- mod/photo.php | 6 +++--- 9 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 images/person-175.jpg create mode 100644 images/person-48.jpg create mode 100644 images/person-80.jpg diff --git a/images/person-175.jpg b/images/person-175.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fc0ec3d7717347e77b3b101ad91af04c23dcf1be GIT binary patch literal 8510 zcmb7pWl$VI)8>-JAt5+~MZzu?9D;iif&~pO!6CR?aDuypC3u3{;_klalHjno26t!S zc)zRq?ym0sTu;^f=aZ2nh%YiOE3Z#3Zjs2?;4)Q@o<4rlqANCZ~tc(?CEp zv^4(-g7&l&3lr-FHueh|5<(K1|8IHh1Q22aDgYHgGUlSlRNM~2;4+cs>V*on8bkzzpJ|blF;+4f=?dj0r~{Oz;B`oiFl|DxciTbuNEjmv*#34J76+^4z(e$L6}1oYAyXAXKHm zG#qTv`-P;c-mVABR=#!T+x`x{v;4s#6Qdy0tuQ@ktT!C!$gdqZL4ib+z9}u% zUuBd8Ro|^-88Xspd`>R|VZh*pd`t2}LzJ@SV7l*Bq?b+LS&v%eL%;R$zuUa=vAN;_ z$;@rqrYeaet<=@+-dv!wBmxdgPM+kc{GTiG1gS~wK46kVGs)+fbJ}zXrAbtRRi#N@ zlc-8#OOvR+`!9voD?br$7q6nra`@asnu6|50_lcRwfCBL4Z1gf#n^pEhLt6Fc{vQz0znUm$av)?rl zJo}!-i13w}Nw#4)7;HI$^j4DLV$;RXQQ4jL@kq_FloxuZT3CM2udemWbvi8;*k8(g zUU6EW{s^FQ{4FHfD*iFwgil4S{(wsV+F65l^0QP;tH^q68Z&Eau@atEq$aTU*P%1_ zt$J*#o0k($|0sl~VjI^v&ud-u3bSV3>TGdYW-&sSA`ZvVE1FiUW4ge;MXX3~3I1*W zbGU~$2LN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o@%(?>(D> zcpL9FKYLUU`xb~^+LG9e3}~Hs+s4mRnHMG;oicZ*RN-b&-x# zk7)e%><2t=aqC~kb?PprhNL^!-*_C>W?y3&GP&n1IJok zlqbt?e^_RRjW|xstSaQYP}~V`ephhbO6E*nVDBYNKAZtnW3jmw^AD1 z-x#D}X`J}pu|QNI*6U)FLsO2#o;`jcZru9#On=UO!67r?VyTebj){4P2FD0nRHyUC zt)F#4zy+3CrKX-y?6c41GJ~?=YJ!d_U%5hfpLYSD{vanDmg*AMqytA1Fjnm{2(yvU z{$dkbwU^hi`i}qwm<-t5!V;Q(d#1<#$|qFtka}ukj7WkVaeup3-qC|P==E)x;E2xL zP{YafU~>Pm6MnwHIbITF1xcI@?lN8x!}@jJRX{VkSMkdl+F-n)ie_6K&{v&jisf)( j`OPv^U}_x7(|-Ui(7gL=%z$4IsU5{$J8}5#aqfQrlW=fV literal 0 HcmV?d00001 diff --git a/images/person-48.jpg b/images/person-48.jpg new file mode 100644 index 0000000000000000000000000000000000000000..dc5eb6e6929835587e4e47a17b7d418c571502a6 GIT binary patch literal 1274 zcmex=582{JIV7_url1}3rzHwqPg5DS{P@ZkSj3_L))m;{*x8SEK$R$U8^c$_KQ zw5Ta!-T{8A+rGbN7~U>7nE52*=`q_MvWYr!2Ga!H{ziYDUG#qL^#IMRbtctioU)oL zl+;8^W#=VXZ8l(NwH4nW=T~cdw|ag?(D~rhJE0*{j_YZr7JQt3KIT}_en|$I%1cYO zA389p+xTh3v5gP(^JX4D{`X37Nz`}Kl&PD7EKiX61tfO1B?3b{1$O4wHsiHy*g^&L;7(aLAjbc4~$jI@G`_?wbDNT&*JFGlQ zcHPb`Tr*wjRh4UUtI-MZiQgpO)!pijxAoW%aM|xluWHG}h1v(b7AF3#lz$;xuyci* z%kf1jzB6Ps)fncjxs~y)@8?c;(ZmHyLi(aIHlGkJ@?-eMJMo{%^_RJ_X3y?S)^$=g zIsQ`7=i^^@sjRPIk8AJUZq@UbV5{JoI?>)qDdnU8_Tc8v*VV0FZ%tag!Pzy?TcP2S z$n+UGLPtL7K0asoC*zr}zq8-Oy9J?(iV{y}{rN2LYd+uV!y=uZ8@cwyXMg;0PcL*? z)3ob3%eDtPZMYolw(&@p6)+iiZ85nSw=VZ~?>>{g;i{}rJvNi{C6;_osLzlqZd|0x z8>?HYQ(6*gaOLu;J&UKQ^Yz&tl;vB0ImByT!^(8sZ6B9}PFeS4p$XIR!e8GT+*iLZ z-If1x6u4zlL7&5cbcy$G-+sTszfv${$>}#O z`~0Uio|to`NBYgCp{C2rZsk}T#e);8YU&hn};yRD#&p)ATyz=Qa?X962bEml5 zUGKPiydXw-=SgqVkYcxUcO1glSxV(@*#62m`@?(R^~mi@LNgNjmEv1G^E>}J;=?hrzBjE5; qQm&+_PSRH|JcZvanwKLzO~pM`*q@}-h~2aQe-i-G>hqBR literal 0 HcmV?d00001 diff --git a/images/person-80.jpg b/images/person-80.jpg new file mode 100644 index 0000000000000000000000000000000000000000..75b8faf9227a2acd62f9f9e76b92158dd36008fd GIT binary patch literal 2303 zcmb7p2(faDMUOa8<)4(=@tA{H90)YVk ztpa3|03Lurpin3Tw$)%Tm>gUQ0pCJZQBhtAsj8-iR7E1yx9`+a*U;5OBDHsG>+0$4 z+OMv*#X)z{`&vFz~lf36b||&G)Hb3U|@(G4ECS#mJoo#kh?7$)yNDvbyi~M zM-9s?VZA0A^I}Fe0Vr){10x|wz#e!NO?Gk5q_}Cfq=n6hbNAy;|E!GaX_iy-dr~fW z6#EZ0_Qu(2zg5o5rhDpvheb(HSf;0wL>|)I@^?&Ej+qT z7^+VCtb@w68`+^7#0<$4_I{74 z@~GmulM38Q=Ig!5!D-Ow;lsyWKXzwW=?4}2voA7^F%ZY%m^lyq$Kh%ok4U!G#*c}x-d=xhXm_!Sw*b^F`(SNXQCYZvbg?I2L$K$I4M>*e;hQggko(FfE zBxrVmh%48WdrA#;HZG{Xxj43MP1Kb)g4C8W)emHVi}RUCvGG|Qya!=Wsg^>$Q~
                                                            Z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C(snp@G+Y23Y1* zMiE)^cQkTB#kT^!sz=7Gzxndr^}&z~P|xWYwN>?@NkWah2_g7TFt+5@%A~MLdU(o| z#ufKY4D74OoYKLk+IQ+XZs@%qNI}KoA7?JERWK0V#GZd{ytJ2Z2y)p!} zh+9&}DM(oiY1~JrOqAp6DZmihW)>3CpYopM3AWGl@9cAIwns#d);Z_j4ky|rZy(9Y zmy!fe$KdTzWSbUc3q4OWAxNq)x$^?goMR^gSk!qL5O771ow~*!Ch(g1?>_50^XCSc zBUk5qhzWKfmvBb7P8NpM{B?!SrSx_2W0z0h0?w9tR_?(|GpCTTqxmupt#vstQ}mv zfiGkiT4Ji*&zL70;TlV{{aBmJf#?*^ZvtM~%R=#JdwiTwH|T*6gKn%9@yc*V*WKsd z9_$Pc)o&;JLG3~us&LWW`q_PMfFpsY8WaYOl5E;koOT}OvORrjL=H?-x4N(UiI75b8FKBASfJy57>%gEPUNHv>D6!=we9CwSX_`dXg8Kx-(|8^ zJu&fUa>#SuO4q3n^F??fQwGetR_5FD-Uyy{VsV)4&h#v=2}U1Al3!2($*s#TbBZCl jt-(wPHYqK+lrZJ>XB?Z5%sHF`kZjOb)bTHS*{gp8Fl^~n literal 0 HcmV?d00001 diff --git a/include/Photo.php b/include/Photo.php index 1450374ffc..4d02b5c651 100755 --- a/include/Photo.php +++ b/include/Photo.php @@ -268,9 +268,9 @@ function import_profile_photo($photo,$uid,$cid) { $photo_failure = true; if($photo_failure) { - $photo = $a->get_baseurl() . '/images/default-profile.jpg'; - $thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg'; - $micro = $a->get_baseurl() . '/images/default-profile-mm.jpg'; + $photo = $a->get_baseurl() . '/images/person-175.jpg'; + $thumb = $a->get_baseurl() . '/images/person-80.jpg'; + $micro = $a->get_baseurl() . '/images/person-48.jpg'; } return(array($photo,$thumb,$micro)); diff --git a/include/Scrape.php b/include/Scrape.php index 8344aa7373..9c237916bc 100755 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -684,7 +684,7 @@ function probe_url($url, $mode = PROBE_NORMAL) { if(! x($vcard,'photo')) { $a = get_app(); - $vcard['photo'] = $a->get_baseurl() . '/images/default-profile.jpg' ; + $vcard['photo'] = $a->get_baseurl() . '/images/person-175.jpg' ; } if(! $profile) diff --git a/include/nav.php b/include/nav.php index e280818399..f40e92dbce 100755 --- a/include/nav.php +++ b/include/nav.php @@ -55,7 +55,7 @@ function nav(&$a) { // user info $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid'])); $userinfo = array( - 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl($ssl_state)."/images/default-profile-mm.jpg"), + 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl($ssl_state)."/images/person-48.jpg"), 'name' => $a->user['username'], ); diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 2f4fb70452..efb5be3a41 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -655,7 +655,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { if(count($r)) $photo = $r[0]['photo']; else - $photo = $a->get_baseurl() . '/images/default-profile.jpg'; + $photo = $a->get_baseurl() . '/images/person-175.jpg'; require_once("Photo.php"); diff --git a/mod/notifications.php b/mod/notifications.php index d478b51634..633d7d4ecf 100755 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -143,7 +143,7 @@ function notifications_content(&$a) { '$intro_id' => $rr['intro_id'], '$madeby' => sprintf( t('suggested by %s'),$rr['name']), '$contact_id' => $rr['contact-id'], - '$photo' => ((x($rr,'fphoto')) ? $rr['fphoto'] : "images/default-profile.jpg"), + '$photo' => ((x($rr,'fphoto')) ? $rr['fphoto'] : "images/person-175.jpg"), '$fullname' => $rr['fname'], '$url' => $rr['furl'], '$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''), diff --git a/mod/photo.php b/mod/photo.php index c4a93769af..4afdd366a4 100755 --- a/mod/photo.php +++ b/mod/photo.php @@ -23,7 +23,7 @@ function photo_init(&$a) { // NOTREACHED } - $default = 'images/default-profile.jpg'; + $default = 'images/person-175.jpg'; if(isset($type)) { @@ -39,12 +39,12 @@ function photo_init(&$a) { break; case 'micro': $resolution = 6; - $default = 'images/default-profile-mm.jpg'; + $default = 'images/person-48.jpg'; break; case 'avatar': default: $resolution = 5; - $default = 'images/default-profile-sm.jpg'; + $default = 'images/person-80.jpg'; break; } From a72a23b6d6e2bf82bbeac04db52ac2fa6f9e231f Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Mar 2012 15:43:34 -0700 Subject: [PATCH 112/133] missed a default profile photo replacement in notifications --- mod/notifications.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/notifications.php b/mod/notifications.php index 633d7d4ecf..ff131010f0 100755 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -191,7 +191,7 @@ function notifications_content(&$a) { '$uid' => $_SESSION['uid'], '$intro_id' => $rr['intro_id'], '$contact_id' => $rr['contact-id'], - '$photo' => ((x($rr,'photo')) ? $rr['photo'] : "images/default-profile.jpg"), + '$photo' => ((x($rr,'photo')) ? $rr['photo'] : "images/person-175.jpg"), '$fullname' => $rr['name'], '$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''), '$activity' => array('activity', t('Post a new friend activity'), 1, t('if applicable')), From ef33cfcc9a30b7e457c94d772a520162cd6b7a35 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Mar 2012 16:05:32 -0700 Subject: [PATCH 113/133] move friend suggestions to top of contact page, add default contact profile photos if missing --- mod/contacts.php | 5 +++++ mod/photo.php | 20 ++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index 78c8d40928..8aa51d00ae 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -395,6 +395,11 @@ function contacts_content(&$a) { $nets = ((x($_GET,'nets')) ? notags(trim($_GET['nets'])) : ''); $tabs = array( + array( + 'label' => t('Suggestions'), + 'url' => $a->get_baseurl(true) . '/suggest', + 'sel' => '', + ), array( 'label' => t('All Contacts'), 'url' => $a->get_baseurl(true) . '/contacts/all', diff --git a/mod/photo.php b/mod/photo.php index 4afdd366a4..3a70251200 100755 --- a/mod/photo.php +++ b/mod/photo.php @@ -115,8 +115,24 @@ function photo_init(&$a) { } if(! isset($data)) { - killme(); - // NOTREACHED + if(isset($resolution)) { + switch($resolution) { + + case 4: + $data = file_get_contents('images/person-175.jpg'); + break; + case 5: + $data = file_get_contents('images/person-80.jpg'); + break; + case 6: + $data = file_get_contents('images/person-48.jpg'); + break; + default: + killme(); + // NOTREACHED + break; + } + } } if(isset($customres) && $customres > 0 && $customres < 500) { From 810e69ef0a88a959ce9f5358377cdc1c7d4bd53a Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Mar 2012 19:06:26 -0700 Subject: [PATCH 114/133] more friend suggestions --- include/socgraph.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/socgraph.php b/include/socgraph.php index 79d7340a4e..b2f5455094 100755 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -230,7 +230,7 @@ function all_friends($uid,$cid,$start = 0, $limit = 80) { -function suggestion_query($uid, $start = 0, $limit = 40) { +function suggestion_query($uid, $start = 0, $limit = 80) { if(! $uid) return array(); From f55779fd831029f764c885bf1fd026a7e94f08eb Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Mar 2012 20:47:31 -0700 Subject: [PATCH 115/133] update tinymce to 3.5b2 to fix issues with FF 11 and pasting into code blocks --- .../plugins.bbcode.editor_plugin_src.js | 258 + .../mcefixes/themes.advanced.img.icons.gif | Bin 0 -> 11776 bytes .../themes.advanced.skins.default.dialog.css | 117 + .../themes.advanced.skins.default.ui.css | 213 + library/tinymce/changelog.txt | 453 + library/tinymce/examples/accessibility.html | 101 + library/tinymce/examples/css/content.css | 0 library/tinymce/examples/css/word.css | 0 library/tinymce/examples/custom_formats.html | 8 +- library/tinymce/examples/full.html | 31 +- library/tinymce/examples/index.html | 0 library/tinymce/examples/lists/image_list.js | 0 library/tinymce/examples/lists/link_list.js | 0 library/tinymce/examples/lists/media_list.js | 6 +- .../tinymce/examples/lists/template_list.js | 0 library/tinymce/examples/media/logo.jpg | Bin library/tinymce/examples/media/logo_over.jpg | Bin library/tinymce/examples/media/sample.avi | Bin library/tinymce/examples/media/sample.dcr | Bin library/tinymce/examples/media/sample.flv | Bin 0 -> 88722 bytes library/tinymce/examples/media/sample.mov | Bin library/tinymce/examples/media/sample.ram | 0 library/tinymce/examples/media/sample.rm | Bin library/tinymce/examples/media/sample.swf | Bin library/tinymce/examples/menu.html | 3 +- library/tinymce/examples/simple.html | 6 +- library/tinymce/examples/skins.html | 14 +- .../tinymce/examples/templates/layout1.htm | 0 .../tinymce/examples/templates/snippet1.htm | 0 library/tinymce/examples/translate.html | 80 - library/tinymce/examples/word.html | 11 +- library/tinymce/jscripts/tiny_mce/langs/en.js | 171 +- library/tinymce/jscripts/tiny_mce/license.txt | 0 .../tiny_mce/plugins/advhr/css/advhr.css | 0 .../tiny_mce/plugins/advhr/editor_plugin.js | 0 .../plugins/advhr/editor_plugin_src.js | 0 .../tiny_mce/plugins/advhr/js/rule.js | 0 .../tiny_mce/plugins/advhr/langs/en_dlg.js | 6 +- .../jscripts/tiny_mce/plugins/advhr/rule.htm | 59 +- .../plugins/advimage/css/advimage.css | 0 .../plugins/advimage/editor_plugin.js | 2 +- .../plugins/advimage/editor_plugin_src.js | 2 +- .../tiny_mce/plugins/advimage/image.htm | 65 +- .../tiny_mce/plugins/advimage/img/sample.gif | Bin .../tiny_mce/plugins/advimage/js/image.js | 45 +- .../tiny_mce/plugins/advimage/langs/en_dlg.js | 44 +- .../tiny_mce/plugins/advlink/css/advlink.css | 0 .../tiny_mce/plugins/advlink/editor_plugin.js | 0 .../plugins/advlink/editor_plugin_src.js | 0 .../tiny_mce/plugins/advlink/js/advlink.js | 49 +- .../tiny_mce/plugins/advlink/langs/en_dlg.js | 53 +- .../tiny_mce/plugins/advlink/link.htm | 65 +- .../tiny_mce/plugins/advlist/editor_plugin.js | 2 +- .../plugins/advlist/editor_plugin_src.js | 40 +- .../plugins/autolink/editor_plugin.js | 1 + .../plugins/autolink/editor_plugin_src.js | 174 + .../plugins/autoresize/editor_plugin.js | 2 +- .../plugins/autoresize/editor_plugin_src.js | 72 +- .../plugins/autosave/editor_plugin.js | 2 +- .../plugins/autosave/editor_plugin_src.js | 23 +- .../tiny_mce/plugins/autosave/langs/en.js | 0 .../tiny_mce/plugins/bbcode/editor_plugin.js | 156 +- .../plugins/bbcode/editor_plugin_cmp.js | 1 - .../plugins/bbcode/editor_plugin_src.js | 0 .../plugins/contextmenu/editor_plugin.js | 2 +- .../plugins/contextmenu/editor_plugin_src.js | 56 +- .../plugins/directionality/editor_plugin.js | 0 .../directionality/editor_plugin_src.js | 0 .../plugins/emotions/editor_plugin.js | 0 .../plugins/emotions/editor_plugin_src.js | 0 .../tiny_mce/plugins/emotions/emotions.htm | 62 +- .../plugins/emotions/img/smiley-cool.gif | Bin .../plugins/emotions/img/smiley-cry.gif | Bin .../emotions/img/smiley-embarassed.gif | Bin .../emotions/img/smiley-foot-in-mouth.gif | Bin 344 -> 342 bytes .../plugins/emotions/img/smiley-frown.gif | Bin .../plugins/emotions/img/smiley-innocent.gif | Bin .../plugins/emotions/img/smiley-kiss.gif | Bin .../plugins/emotions/img/smiley-laughing.gif | Bin 344 -> 343 bytes .../emotions/img/smiley-money-mouth.gif | Bin .../plugins/emotions/img/smiley-sealed.gif | Bin 325 -> 323 bytes .../plugins/emotions/img/smiley-smile.gif | Bin 345 -> 344 bytes .../plugins/emotions/img/smiley-surprised.gif | Bin 342 -> 338 bytes .../emotions/img/smiley-tongue-out.gif | Bin .../plugins/emotions/img/smiley-undecided.gif | Bin .../plugins/emotions/img/smiley-wink.gif | Bin 351 -> 350 bytes .../plugins/emotions/img/smiley-yell.gif | Bin .../tiny_mce/plugins/emotions/js/emotions.js | 21 + .../tiny_mce/plugins/emotions/langs/en_dlg.js | 21 +- .../tiny_mce/plugins/example/dialog.htm | 0 .../tiny_mce/plugins/example/editor_plugin.js | 0 .../plugins/example/editor_plugin_src.js | 0 .../tiny_mce/plugins/example/img/example.gif | Bin .../tiny_mce/plugins/example/js/dialog.js | 0 .../tiny_mce/plugins/example/langs/en.js | 0 .../tiny_mce/plugins/example/langs/en_dlg.js | 0 .../example_dependency/editor_plugin.js | 1 + .../example_dependency/editor_plugin_src.js | 50 + .../plugins/fullpage/css/fullpage.css | 45 +- .../plugins/fullpage/editor_plugin.js | 2 +- .../plugins/fullpage/editor_plugin_src.js | 384 +- .../tiny_mce/plugins/fullpage/fullpage.htm | 348 +- .../tiny_mce/plugins/fullpage/js/fullpage.js | 613 +- .../tiny_mce/plugins/fullpage/langs/en_dlg.js | 86 +- .../plugins/fullscreen/editor_plugin.js | 2 +- .../plugins/fullscreen/editor_plugin_src.js | 16 +- .../plugins/fullscreen/fullscreen.htm | 3 +- .../tiny_mce/plugins/iespell/editor_plugin.js | 0 .../plugins/iespell/editor_plugin_src.js | 0 .../plugins/inlinepopups/editor_plugin.js | 2 +- .../plugins/inlinepopups/editor_plugin_src.js | 96 +- .../skins/clearlooks2/img/alert.gif | Bin 818 -> 810 bytes .../skins/clearlooks2/img/button.gif | Bin 280 -> 272 bytes .../skins/clearlooks2/img/buttons.gif | Bin .../skins/clearlooks2/img/confirm.gif | Bin 915 -> 907 bytes .../skins/clearlooks2/img/corners.gif | Bin 911 -> 909 bytes .../skins/clearlooks2/img/horizontal.gif | Bin .../skins/clearlooks2/img/vertical.gif | Bin 92 -> 84 bytes .../inlinepopups/skins/clearlooks2/window.css | 2 +- .../plugins/inlinepopups/template.htm | 0 .../plugins/insertdatetime/editor_plugin.js | 0 .../insertdatetime/editor_plugin_src.js | 0 .../tiny_mce/plugins/layer/editor_plugin.js | 2 +- .../plugins/layer/editor_plugin_src.js | 60 +- .../plugins/legacyoutput/editor_plugin.js | 2 +- .../plugins/legacyoutput/editor_plugin_src.js | 57 +- .../tiny_mce/plugins/lists/editor_plugin.js | 1 + .../plugins/lists/editor_plugin_src.js | 951 ++ .../tiny_mce/plugins/media/css/content.css | 6 - .../tiny_mce/plugins/media/css/media.css | 9 +- .../tiny_mce/plugins/media/editor_plugin.js | 2 +- .../plugins/media/editor_plugin_src.js | 1096 +- .../tiny_mce/plugins/media/img/flash.gif | Bin 241 -> 0 bytes .../tiny_mce/plugins/media/img/flv_player.swf | Bin 11668 -> 0 bytes .../tiny_mce/plugins/media/img/quicktime.gif | Bin 303 -> 0 bytes .../tiny_mce/plugins/media/img/shockwave.gif | Bin 387 -> 0 bytes .../tiny_mce/plugins/media/js/embed.js | 0 .../tiny_mce/plugins/media/js/media.js | 1046 +- .../tiny_mce/plugins/media/langs/en_dlg.js | 104 +- .../jscripts/tiny_mce/plugins/media/media.htm | 687 +- .../tiny_mce/plugins/media/moxieplayer.swf | Bin 0 -> 19980 bytes .../plugins/nonbreaking/editor_plugin.js | 2 +- .../plugins/nonbreaking/editor_plugin_src.js | 7 +- .../plugins/noneditable/editor_plugin.js | 2 +- .../plugins/noneditable/editor_plugin_src.js | 452 +- .../plugins/pagebreak/css/content.css | 1 - .../plugins/pagebreak/editor_plugin.js | 2 +- .../plugins/pagebreak/editor_plugin_src.js | 5 +- .../tiny_mce/plugins/pagebreak/img/trans.gif | Bin 43 -> 0 bytes .../tiny_mce/plugins/paste/editor_plugin.js | 2 +- .../plugins/paste/editor_plugin_src.js | 395 +- .../tiny_mce/plugins/paste/js/pastetext.js | 0 .../tiny_mce/plugins/paste/js/pasteword.js | 0 .../tiny_mce/plugins/paste/langs/en_dlg.js | 6 +- .../tiny_mce/plugins/paste/pastetext.htm | 0 .../tiny_mce/plugins/paste/pasteword.htm | 0 .../tiny_mce/plugins/preview/editor_plugin.js | 0 .../plugins/preview/editor_plugin_src.js | 0 .../tiny_mce/plugins/preview/example.html | 0 .../plugins/preview/jscripts/embed.js | 0 .../tiny_mce/plugins/preview/preview.html | 0 .../tiny_mce/plugins/print/editor_plugin.js | 0 .../plugins/print/editor_plugin_src.js | 0 .../tiny_mce/plugins/save/editor_plugin.js | 0 .../plugins/save/editor_plugin_src.js | 0 .../searchreplace/css/searchreplace.css | 0 .../plugins/searchreplace/editor_plugin.js | 2 +- .../searchreplace/editor_plugin_src.js | 4 + .../plugins/searchreplace/js/searchreplace.js | 24 +- .../plugins/searchreplace/langs/en_dlg.js | 17 +- .../plugins/searchreplace/searchreplace.htm | 33 +- .../plugins/spellchecker/css/content.css | 0 .../plugins/spellchecker/editor_plugin.js | 2 +- .../plugins/spellchecker/editor_plugin_src.js | 155 +- .../plugins/spellchecker/img/wline.gif | Bin .../tiny_mce/plugins/style/css/props.css | 1 + .../tiny_mce/plugins/style/editor_plugin.js | 2 +- .../plugins/style/editor_plugin_src.js | 22 +- .../tiny_mce/plugins/style/js/props.js | 90 +- .../tiny_mce/plugins/style/langs/en_dlg.js | 64 +- .../jscripts/tiny_mce/plugins/style/props.htm | 908 +- .../tiny_mce/plugins/style/readme.txt | 19 + .../plugins/tabfocus/editor_plugin.js | 2 +- .../plugins/tabfocus/editor_plugin_src.js | 234 +- .../jscripts/tiny_mce/plugins/table/cell.htm | 30 +- .../tiny_mce/plugins/table/css/cell.css | 0 .../tiny_mce/plugins/table/css/row.css | 0 .../tiny_mce/plugins/table/css/table.css | 0 .../tiny_mce/plugins/table/editor_plugin.js | 2 +- .../plugins/table/editor_plugin_src.js | 2553 ++-- .../tiny_mce/plugins/table/js/cell.js | 53 +- .../tiny_mce/plugins/table/js/merge_cells.js | 0 .../jscripts/tiny_mce/plugins/table/js/row.js | 36 +- .../tiny_mce/plugins/table/js/table.js | 88 +- .../tiny_mce/plugins/table/langs/en_dlg.js | 75 +- .../tiny_mce/plugins/table/merge_cells.htm | 22 +- .../jscripts/tiny_mce/plugins/table/row.htm | 21 +- .../jscripts/tiny_mce/plugins/table/table.htm | 107 +- .../tiny_mce/plugins/template/blank.htm | 0 .../plugins/template/css/template.css | 0 .../plugins/template/editor_plugin.js | 0 .../plugins/template/editor_plugin_src.js | 0 .../tiny_mce/plugins/template/js/template.js | 2 +- .../tiny_mce/plugins/template/langs/en_dlg.js | 16 +- .../tiny_mce/plugins/template/template.htm | 0 .../plugins/visualblocks/css/visualblocks.css | 19 + .../plugins/visualblocks/editor_plugin.js | 1 + .../plugins/visualblocks/editor_plugin_src.js | 63 + .../plugins/visualchars/editor_plugin.js | 2 +- .../plugins/visualchars/editor_plugin_src.js | 33 +- .../plugins/wordcount/editor_plugin.js | 2 +- .../plugins/wordcount/editor_plugin_src.js | 74 +- .../tiny_mce/plugins/xhtmlxtras/abbr.htm | 11 +- .../tiny_mce/plugins/xhtmlxtras/acronym.htm | 11 +- .../plugins/xhtmlxtras/attributes.htm | 11 +- .../tiny_mce/plugins/xhtmlxtras/cite.htm | 9 +- .../plugins/xhtmlxtras/css/attributes.css | 0 .../tiny_mce/plugins/xhtmlxtras/css/popup.css | 0 .../tiny_mce/plugins/xhtmlxtras/del.htm | 17 +- .../plugins/xhtmlxtras/editor_plugin.js | 2 +- .../plugins/xhtmlxtras/editor_plugin_src.js | 24 +- .../tiny_mce/plugins/xhtmlxtras/ins.htm | 21 +- .../tiny_mce/plugins/xhtmlxtras/js/abbr.js | 0 .../tiny_mce/plugins/xhtmlxtras/js/acronym.js | 0 .../plugins/xhtmlxtras/js/attributes.js | 17 +- .../tiny_mce/plugins/xhtmlxtras/js/cite.js | 0 .../tiny_mce/plugins/xhtmlxtras/js/del.js | 14 +- .../plugins/xhtmlxtras/js/element_common.js | 8 +- .../tiny_mce/plugins/xhtmlxtras/js/ins.js | 17 +- .../plugins/xhtmlxtras/langs/en_dlg.js | 33 +- .../tiny_mce/themes/advanced/about.htm | 8 +- .../tiny_mce/themes/advanced/anchor.htm | 10 +- .../tiny_mce/themes/advanced/charmap.htm | 85 +- .../tiny_mce/themes/advanced/color_picker.htm | 19 +- .../themes/advanced/editor_template.js | 2 +- .../themes/advanced/editor_template_src.js | 431 +- .../tiny_mce/themes/advanced/image.htm | 102 +- .../themes/advanced/img/colorpicker.jpg | Bin 3189 -> 2584 bytes .../tiny_mce/themes/advanced/img/flash.gif | Bin 0 -> 239 bytes .../tiny_mce/themes/advanced/img/icons.gif | Bin .../tiny_mce/themes/advanced/img/iframe.gif | Bin 0 -> 600 bytes .../advanced}/img/pagebreak.gif | Bin .../themes/advanced/img/quicktime.gif | Bin 0 -> 301 bytes .../advanced}/img/realmedia.gif | Bin .../themes/advanced/img/shockwave.gif | Bin 0 -> 384 bytes .../media => themes/advanced}/img/trans.gif | Bin .../tiny_mce/themes/advanced/img/video.gif | Bin 0 -> 597 bytes .../advanced}/img/windowsmedia.gif | Bin .../tiny_mce/themes/advanced/js/about.js | 1 + .../tiny_mce/themes/advanced/js/anchor.js | 13 +- .../tiny_mce/themes/advanced/js/charmap.js | 40 +- .../themes/advanced/js/color_picker.js | 598 +- .../tiny_mce/themes/advanced/js/image.js | 18 +- .../tiny_mce/themes/advanced/js/link.js | 11 +- .../themes/advanced/js/source_editor.js | 50 +- .../tiny_mce/themes/advanced/langs/en.js | 63 +- .../tiny_mce/themes/advanced/langs/en_dlg.js | 52 +- .../tiny_mce/themes/advanced/link.htm | 55 +- .../tiny_mce/themes/advanced/shortcuts.htm | 47 + .../themes/advanced/skins/default/content.css | 32 +- .../themes/advanced/skins/default/dialog.css | 0 .../advanced/skins/default/img/buttons.png | Bin 3274 -> 3133 bytes .../advanced/skins/default/img/items.gif | Bin 70 -> 64 bytes .../advanced/skins/default/img/menu_arrow.gif | Bin .../advanced/skins/default/img/menu_check.gif | Bin .../advanced/skins/default/img/progress.gif | Bin .../advanced/skins/default/img/tabs.gif | Bin 1326 -> 1322 bytes .../themes/advanced/skins/default/ui.css | 0 .../advanced/skins/highcontrast/content.css | 25 + .../advanced/skins/highcontrast/dialog.css | 105 + .../themes/advanced/skins/highcontrast/ui.css | 102 + .../themes/advanced/skins/o2k7/content.css | 16 +- .../themes/advanced/skins/o2k7/dialog.css | 1 + .../advanced/skins/o2k7/img/button_bg.png | Bin 5859 -> 2766 bytes .../skins/o2k7/img/button_bg_black.png | Bin 3736 -> 651 bytes .../skins/o2k7/img/button_bg_silver.png | Bin 5358 -> 2084 bytes .../themes/advanced/skins/o2k7/ui.css | 15 +- .../themes/advanced/skins/o2k7/ui_black.css | 2 +- .../themes/advanced/skins/o2k7/ui_silver.css | 2 +- .../themes/advanced/source_editor.htm | 6 +- .../tiny_mce/themes/simple/editor_template.js | 2 +- .../themes/simple/editor_template_src.js | 3 +- .../tiny_mce/themes/simple/img/icons.gif | Bin 1440 -> 806 bytes .../tiny_mce/themes/simple/langs/en.js | 12 +- .../themes/simple/skins/default/content.css | 0 .../themes/simple/skins/default/ui.css | 0 .../themes/simple/skins/o2k7/content.css | 0 .../simple/skins/o2k7/img/button_bg.png | Bin .../tiny_mce/themes/simple/skins/o2k7/ui.css | 0 library/tinymce/jscripts/tiny_mce/tiny_mce.js | 2 +- .../jscripts/tiny_mce/tiny_mce_popup.js | 2 +- .../tinymce/jscripts/tiny_mce/tiny_mce_src.js | 11522 ++++++++++------ .../tiny_mce/utils/editable_selects.js | 2 +- .../jscripts/tiny_mce/utils/form_utils.js | 18 +- .../tinymce/jscripts/tiny_mce/utils/mctabs.js | 105 +- .../jscripts/tiny_mce/utils/validate.js | 38 +- 296 files changed, 17157 insertions(+), 10477 deletions(-) create mode 100755 library/mcefixes/plugins.bbcode.editor_plugin_src.js create mode 100755 library/mcefixes/themes.advanced.img.icons.gif create mode 100755 library/mcefixes/themes.advanced.skins.default.dialog.css create mode 100755 library/mcefixes/themes.advanced.skins.default.ui.css mode change 100755 => 100644 library/tinymce/changelog.txt create mode 100644 library/tinymce/examples/accessibility.html mode change 100755 => 100644 library/tinymce/examples/css/content.css mode change 100755 => 100644 library/tinymce/examples/css/word.css mode change 100755 => 100644 library/tinymce/examples/custom_formats.html mode change 100755 => 100644 library/tinymce/examples/full.html mode change 100755 => 100644 library/tinymce/examples/index.html mode change 100755 => 100644 library/tinymce/examples/lists/image_list.js mode change 100755 => 100644 library/tinymce/examples/lists/link_list.js mode change 100755 => 100644 library/tinymce/examples/lists/media_list.js mode change 100755 => 100644 library/tinymce/examples/lists/template_list.js mode change 100755 => 100644 library/tinymce/examples/media/logo.jpg mode change 100755 => 100644 library/tinymce/examples/media/logo_over.jpg mode change 100755 => 100644 library/tinymce/examples/media/sample.avi mode change 100755 => 100644 library/tinymce/examples/media/sample.dcr create mode 100644 library/tinymce/examples/media/sample.flv mode change 100755 => 100644 library/tinymce/examples/media/sample.mov mode change 100755 => 100644 library/tinymce/examples/media/sample.ram mode change 100755 => 100644 library/tinymce/examples/media/sample.rm mode change 100755 => 100644 library/tinymce/examples/media/sample.swf mode change 100755 => 100644 library/tinymce/examples/menu.html mode change 100755 => 100644 library/tinymce/examples/simple.html mode change 100755 => 100644 library/tinymce/examples/skins.html mode change 100755 => 100644 library/tinymce/examples/templates/layout1.htm mode change 100755 => 100644 library/tinymce/examples/templates/snippet1.htm delete mode 100755 library/tinymce/examples/translate.html mode change 100755 => 100644 library/tinymce/examples/word.html mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/langs/en.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/license.txt mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin_src.js create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin.js create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/autosave/langs/en.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js delete mode 100755 library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_cmp.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/emotions.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-frown.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-wink.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-yell.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/js/emotions.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/example/dialog.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/example/img/example.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/example/langs/en.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/example/langs/en_dlg.js create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin.js create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/fullpage/css/fullpage.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/inlinepopups/template.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin.js create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin_src.js delete mode 100755 library/tinymce/jscripts/tiny_mce/plugins/media/css/content.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/media/css/media.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src.js delete mode 100755 library/tinymce/jscripts/tiny_mce/plugins/media/img/flash.gif delete mode 100755 library/tinymce/jscripts/tiny_mce/plugins/media/img/flv_player.swf delete mode 100755 library/tinymce/jscripts/tiny_mce/plugins/media/img/quicktime.gif delete mode 100755 library/tinymce/jscripts/tiny_mce/plugins/media/img/shockwave.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/media/js/media.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/media/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/media/media.htm create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js delete mode 100755 library/tinymce/jscripts/tiny_mce/plugins/pagebreak/css/content.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js delete mode 100755 library/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/trans.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/preview/example.html mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/preview/preview.html mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/spellchecker/css/content.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/spellchecker/img/wline.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/style/css/props.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/style/js/props.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/style/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/style/props.htm create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/style/readme.txt mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/cell.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/css/row.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/css/table.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/js/merge_cells.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/js/row.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/js/table.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/merge_cells.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/row.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/table/table.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/template/blank.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/template/css/template.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/template/js/template.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/template/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/template/template.htm create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/visualblocks/css/visualblocks.css create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin.js create mode 100644 library/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/abbr.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/popup.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/cite.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/about.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/anchor.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/image.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/img/colorpicker.jpg create mode 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/img/flash.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/img/icons.gif create mode 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/img/iframe.gif rename library/tinymce/jscripts/tiny_mce/{plugins/pagebreak => themes/advanced}/img/pagebreak.gif (100%) mode change 100755 => 100644 create mode 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/img/quicktime.gif rename library/tinymce/jscripts/tiny_mce/{plugins/media => themes/advanced}/img/realmedia.gif (100%) mode change 100755 => 100644 create mode 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/img/shockwave.gif rename library/tinymce/jscripts/tiny_mce/{plugins/media => themes/advanced}/img/trans.gif (100%) mode change 100755 => 100644 create mode 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/img/video.gif rename library/tinymce/jscripts/tiny_mce/{plugins/media => themes/advanced}/img/windowsmedia.gif (100%) mode change 100755 => 100644 mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/js/about.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/link.htm create mode 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/shortcuts.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/buttons.png mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/items.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/progress.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/ui.css create mode 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/highcontrast/content.css create mode 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/highcontrast/dialog.css create mode 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/highcontrast/ui.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/content.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/simple/editor_template.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/simple/img/icons.gif mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/simple/langs/en.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/simple/skins/default/content.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/simple/skins/default/ui.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/content.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/ui.css mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/tiny_mce.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/tiny_mce_popup.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/tiny_mce_src.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/utils/editable_selects.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/utils/form_utils.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/utils/mctabs.js mode change 100755 => 100644 library/tinymce/jscripts/tiny_mce/utils/validate.js diff --git a/library/mcefixes/plugins.bbcode.editor_plugin_src.js b/library/mcefixes/plugins.bbcode.editor_plugin_src.js new file mode 100755 index 0000000000..183f2bc68d --- /dev/null +++ b/library/mcefixes/plugins.bbcode.editor_plugin_src.js @@ -0,0 +1,258 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +/* Macgirvin Aug-2010 changed from punbb to dfrn dialect */ + +(function() { + tinymce.create('tinymce.plugins.BBCodePlugin', { + init : function(ed, url) { + var t = this, dialect = ed.getParam('bbcode_dialect', 'dfrn').toLowerCase(); + + ed.onBeforeSetContent.add(function(ed, o) { + o.content = t['_' + dialect + '_bbcode2html'](o.content); + }); + + ed.onPostProcess.add(function(ed, o) { + if (o.set) + o.content = t['_' + dialect + '_bbcode2html'](o.content); + + if (o.get) + o.content = t['_' + dialect + '_html2bbcode'](o.content); + }); + }, + + getInfo : function() { + return { + longname : 'BBCode Plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + }, + + // Private methods + + // HTML -> BBCode in DFRN dialect + _dfrn_html2bbcode : function(s) { + s = tinymce.trim(s); + + function rep(re, str) { + + //modify code to keep stuff intact within [code][/code] blocks + //Waitman Gobble NO WARRANTY + + + var o = new Array(); + var x = s.split("[code]"); + var i = 0; + + var si = ""; + si = x.shift(); + si = si.replace(re,str); + o.push(si); + + for (i = 0; i < x.length; i++) { + var no = new Array(); + var j = x.shift(); + var g = j.split("[/code]"); + no.push(g.shift()); + si = g.shift(); + si = si.replace(re,str); + no.push(si); + o.push(no.join("[/code]")); + } + + s = o.join("[code]"); + + }; + + + + + /* oembed */ + function _h2b_cb(match) { + /* + function s_h2b(data) { + match = data; + } + $.ajax({ + type:"POST", + url: 'oembed/h2b', + data: {text: match}, + async: false, + success: s_h2b, + dataType: 'html' + }); + */ + + var f, g, tof = [], tor = []; + var find_spanc = /]*class *= *[\"'](?:[^\"']* )*oembed(?: [^\"']*)*[\"'][^>]*>(.*?(?:]*>(.*?)<\/span *>)*.*?)<\/span *>/ig; + while (f = find_spanc.exec(match)) { + var find_a = /]* rel=[\"']oembed[\"'][^>]*)>.*?<\/a *>/ig; + if (g = find_a.exec(f[1])) { + var find_href = /href=[\"']([^\"']*)[\"']/ig; + var m2 = find_href.exec(g[1]); + if (m2[1]) { + tof.push(f[0]); + tor.push("[EMBED]" + m2[1] + "[/EMBED]"); + } + } + } + for (var i = 0; i < tof.length; i++) match = match.replace(tof[i], tor[i]); + + return match; + } + if (s.indexOf('class="oembed')>=0){ + //alert("request oembed html2bbcode"); + s = _h2b_cb(s); + } + + /* /oembed */ + + + // example: to [b] + rep(/(.*?)<\/a>/gi,"[bookmark=$1]$2[/bookmark]"); + rep(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"); + rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"); + rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"); + rep(/(.*?)<\/font>/gi,"$1"); + rep(//gi,"[img=$1x$2]$3[/img]"); + rep(//gi,"[img=$2x$1]$3[/img]"); + rep(//gi,"[img=$3x$2]$1[/img]"); + rep(//gi,"[img=$2x$3]$1[/img]"); + rep(//gi,"[img]$1[/img]"); + + rep(/
                                                              (.*?)<\/ul>/gi,"[list]$1[/list]"); + rep(/
                                                                (.*?)<\/ul>/gi,"[list=]$1[/list]"); + rep(/
                                                                  (.*?)<\/ul>/gi,"[list=1]$1[/list]"); + rep(/
                                                                    (.*?)<\/ul>/gi,"[list=i]$1[/list]"); + rep(/
                                                                      (.*?)<\/ul>/gi,"[list=I]$1[/list]"); + rep(/
                                                                        (.*?)<\/ul>/gi,"[list=a]$1[/list]"); + rep(/
                                                                          (.*?)<\/ul>/gi,"[list=A]$1[/list]"); + rep(/
                                                                        • (.*?)<\/li>/gi,'[li]$1[/li]'); + + rep(/(.*?)<\/code>/gi,"[code]$1[/code]"); + rep(/<\/(strong|b)>/gi,"[/b]"); + rep(/<(strong|b)>/gi,"[b]"); + rep(/<\/(em|i)>/gi,"[/i]"); + rep(/<(em|i)>/gi,"[i]"); + rep(/<\/u>/gi,"[/u]"); + rep(/(.*?)<\/span>/gi,"[u]$1[/u]"); + rep(//gi,"[u]"); + rep(/]*>/gi,"[quote]"); + rep(/<\/blockquote>/gi,"[/quote]"); + rep(/
                                                                          /gi,"[hr]"); + rep(/
                                                                          /gi,"\n\n"); + rep(//gi,"\n\n"); + rep(/
                                                                          /gi,"\n"); + rep(/

                                                                          /gi,""); + rep(/<\/p>/gi,"\n"); + rep(/ /gi," "); + rep(/"/gi,"\""); + rep(/</gi,"<"); + rep(/>/gi,">"); + rep(/&/gi,"&"); + + return s; + }, + + // BBCode -> HTML from DFRN dialect + _dfrn_bbcode2html : function(s) { + s = tinymce.trim(s); + + + function rep(re, str) { + + //modify code to keep stuff intact within [code][/code] blocks + //Waitman Gobble NO WARRANTY + + + var o = new Array(); + var x = s.split("[code]"); + var i = 0; + + var si = ""; + si = x.shift(); + si = si.replace(re,str); + o.push(si); + + for (i = 0; i < x.length; i++) { + var no = new Array(); + var j = x.shift(); + var g = j.split("[/code]"); + no.push(g.shift()); + si = g.shift(); + si = si.replace(re,str); + no.push(si); + o.push(no.join("[/code]")); + } + + s = o.join("[code]"); + + }; + + + + + + // example: [b] to + rep(/\n/gi,"
                                                                          "); + rep(/\[b\]/gi,""); + rep(/\[\/b\]/gi,""); + rep(/\[i\]/gi,""); + rep(/\[\/i\]/gi,""); + rep(/\[u\]/gi,""); + rep(/\[\/u\]/gi,""); + rep(/\[hr\]/gi,"


                                                                          "); + rep(/\[bookmark=([^\]]+)\](.*?)\[\/bookmark\]/gi,"$2"); + rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"
                                                                          $2"); + rep(/\[url\](.*?)\[\/url\]/gi,"$1"); + rep(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,""); + rep(/\[img\](.*?)\[\/img\]/gi,""); + + rep(/\[list\](.*?)\[\/list\]/gi, '
                                                                            $1
                                                                          '); + rep(/\[list=\](.*?)\[\/list\]/gi, '
                                                                            $1
                                                                          '); + rep(/\[list=1\](.*?)\[\/list\]/gi, '
                                                                            $1
                                                                          '); + rep(/\[list=i\](.*?)\[\/list\]/gi,'
                                                                            $1
                                                                          '); + rep(/\[list=I\](.*?)\[\/list\]/gi, '
                                                                            $1
                                                                          '); + rep(/\[list=a\](.*?)\[\/list\]/gi, '
                                                                            $1
                                                                          '); + rep(/\[list=A\](.*?)\[\/list\]/gi, '
                                                                            $1
                                                                          '); + rep(/\[li\](.*?)\[\/li\]/gi, '
                                                                        • $1
                                                                        • '); + rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2"); + rep(/\[size=(.*?)\](.*?)\[\/size\]/gi,"$2"); + rep(/\[code\](.*?)\[\/code\]/gi,"$1"); + rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"
                                                                          $1
                                                                          "); + + /* oembed */ + function _b2h_cb(match, url) { + url = bin2hex(url); + function s_b2h(data) { + match = data; + } + $.ajax({ + url: 'oembed/b2h?url=' + url, + async: false, + success: s_b2h, + dataType: 'html' + }); + return match; + } + s = s.replace(/\[embed\](.*?)\[\/embed\]/gi, _b2h_cb); + + /* /oembed */ + + return s; + } + }); + + // Register plugin + tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); +})(); diff --git a/library/mcefixes/themes.advanced.img.icons.gif b/library/mcefixes/themes.advanced.img.icons.gif new file mode 100755 index 0000000000000000000000000000000000000000..efb356c417872141ac1ddce5916b92bc852dbd00 GIT binary patch literal 11776 zcmWlfi$Bwk_s8G6UtIQ{``uhZgekWV(%hHpkVv&Ha+gTyn4G znxu?UD%F%q(YFyInqR;3FP!syo!8@aj>}$W%m0GrU^c*49PnRoUscNx004_WqqmuQ z6pgLWbNYE}Q%)|QEP&fvty-#;6!6mj_#vH_{1 zW$n)cm>*ufe%IOAvH4_VX`JTm?KAS^MbXWo-Im+GEN=2au=)lo`Fj8On}r`!8O2YQ z)>nMnPao@k^3yncwzWVOauc%e;$(LGffW=gzocb&czDCeaCJU+V}0nr;S-DNqUO=f zs;a8kgW%beg6;>s!o|P0_%g}KsrPEV3RqEg=RUo9zuZ!jkyNo5*(=N~>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JM@60e-&dnU zS+t}*oajjI|K^WOJdY}wE1i&`!T)`^M8tn}Mn6xSO43l$H1|7YZni&*lY%NwDJG{J z!S8zjgOm7Vqr$0j3d134&hd;`zgSTlKjZI%bT}PI@QHdR?lG?Nbfi3dem=5P{9FH7 z+F%aNXDPEh?8h|<_Rg1Yh>ijfPZ9KURSE#ebaOVKnVWv9Y zqYq@@rWUm1e~eeg=v(~S<#PI_hGD)N3rEQ|O*?(FCKadm({j%zho|Ul?yuai6x-jw z_Wb;{uON1pv!|-M_&uYicwCIrp2a?DoD6QU53sX!MvuM!<@RXV{nfI^SX@Gjg(qr- zBERCTyW(T9;_I@q&ws@)bY=g!75}uAfa@y!pqs*9tww!ajsCrQ3iX?2aT?BD zRbE7JmDA(&;BXfGKw-*Dncwl(f1ejs{l3utJHcy3X)Yz!_)4TdOFN8dz=f&_;8JVM zwZY#^|Fx9RwbXNKOc&s&;M@}FH$$q?c~@2yO^fxLkJgJ{t>5~(egZQ-0sC`jYrWthl*)zJ598HXhaS)Vk1qA6R>C zrO-IgzWLhdv{ z^;rLPSR#CN;Zjsb%GXAbP=0GsH!(o>clx8W*`uTIHKq(F)r$n5Gu~RS+WOPJwd>XI zPwkgd;zeT5Q+#2pL?}vXN0^Y%$HdC-jGPl{46vkhed@v%HHWg4EMgbt7PW@inl5=e z!k4s1uIl^mcNEM+MhkZaYf{61={zg8I=8g&?Uyc}W1l8v7_qE3QSN$uXVmxQ?Juf* cs(k7rR`g%i1-8fjK!0B`nBt1Vpn&!N0l$%*^Z)<= literal 0 HcmV?d00001 diff --git a/library/mcefixes/themes.advanced.skins.default.dialog.css b/library/mcefixes/themes.advanced.skins.default.dialog.css new file mode 100755 index 0000000000..f01222650e --- /dev/null +++ b/library/mcefixes/themes.advanced.skins.default.dialog.css @@ -0,0 +1,117 @@ +/* Generic */ +body { +font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; +scrollbar-3dlight-color:#F0F0EE; +scrollbar-arrow-color:#676662; +scrollbar-base-color:#F0F0EE; +scrollbar-darkshadow-color:#DDDDDD; +scrollbar-face-color:#E0E0DD; +scrollbar-highlight-color:#F0F0EE; +scrollbar-shadow-color:#F0F0EE; +scrollbar-track-color:#F5F5F5; +background:#F0F0EE; +padding:0; +margin:8px 8px 0 8px; +} + +html {background:#F0F0EE;} +td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +textarea {resize:none;outline:none;} +a:link, a:visited {color:black;} +a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} + +/* Forms */ +fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} +legend {color:#2B6FB6; font-weight:bold;} +label.msg {display:none;} +label.invalid {color:#EE0000; display:inline;} +input.invalid {border:1px solid #EE0000;} +input {background:#FFF; border:1px solid #CCC;} +input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} +input, select, textarea {border:1px solid #808080;} +input.radio {border:1px none #000000; background:transparent; vertical-align:middle;} +input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;} +.input_noborder {border:0;} + +/* Buttons */ +#insert, #cancel, input.button, .updateButton { +border:0; margin:0; padding:0; +font-weight:bold; +width:94px; height:26px; +background:url(img/buttons.png) 0 -26px; +cursor:pointer; +padding-bottom:2px; +float:left; +} + +#insert {background:url(img/buttons.png) 0 -52px} +#cancel {background:url(img/buttons.png) 0 0; float:right} + +/* Browse */ +a.pickcolor, a.browse {text-decoration:none} +a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} +.mceOldBoxModel a.browse span {width:22px; height:20px;} +a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} +a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +a.browse:hover span.disabled {border:1px solid white; background-color:transparent;} +a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;} +.mceOldBoxModel a.pickcolor span {width:21px; height:17px;} +a.pickcolor:hover span {background-color:#B2BBD0;} +a.pickcolor:hover span.disabled {} + +/* Charmap */ +table.charmap {border:1px solid #AAA; text-align:center} +td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;} +#charmap a {display:block; color:#000; text-decoration:none; border:0} +#charmap a:hover {background:#CCC;color:#2B6FB6} +#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center} +#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center} + +/* Source */ +.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;} +.mceActionPanel {margin-top:5px;} + +/* Tabs classes */ +.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;} +.tabs ul {margin:0; padding:0; list-style:none;} +.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;} +.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;} +.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;} +.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;} +.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;} +.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;} + +/* Panels */ +.panel_wrapper div.panel {display:none;} +.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;} +.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;} + +/* Columns */ +.column {float:left;} +.properties {width:100%;} +.properties .column1 {} +.properties .column2 {text-align:left;} + +/* Titles */ +h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;} +h3 {font-size:14px;} +.title {font-size:12px; font-weight:bold; color:#2B6FB6;} + +/* Dialog specific */ +#link .panel_wrapper, #link div.current {height:125px;} +#image .panel_wrapper, #image div.current {height:200px;} +#plugintable thead {font-weight:bold; background:#DDD;} +#plugintable, #about #plugintable td {border:1px solid #919B9C;} +#plugintable {width:96%; margin-top:10px;} +#pluginscontainer {height:290px; overflow:auto;} +#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;} +#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;} +#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;} +#colorpicker #light div {overflow:hidden;} +#colorpicker #previewblock {float:right; padding-left:10px; height:20px;} +#colorpicker .panel_wrapper div.current {height:175px;} +#colorpicker #namedcolors {width:150px;} +#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} +#colorpicker #colornamecontainer {margin-top:5px;} +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/library/mcefixes/themes.advanced.skins.default.ui.css b/library/mcefixes/themes.advanced.skins.default.ui.css new file mode 100755 index 0000000000..5f1f96448c --- /dev/null +++ b/library/mcefixes/themes.advanced.skins.default.ui.css @@ -0,0 +1,213 @@ +/* Reset */ +.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left} +.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000} +.defaultSkin table td {vertical-align:middle} + +/* Containers */ +.defaultSkin table {direction:ltr; background:#FFF} +.defaultSkin iframe {display:block; background:#FFF} +.defaultSkin .mceToolbar {height:26px} +.defaultSkin .mceLeft {text-align:left} +.defaultSkin .mceRight {text-align:right} + +/* External */ +.defaultSkin .mceExternalToolbar {position:absolute; border:2px solid #CCC; border-bottom:0; display:none;} +.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;} +.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0} + +/* Layout */ +.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC} +.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC} +.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;} +.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top} +.defaultSkin .mceIframeContainer { /*border-top:1px solid #CCC; border-bottom:1px solid #CCC */ border: none;} +.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} +.defaultSkin .mceStatusbar div {float:left; margin:2px} +.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} +.defaultSkin .mceStatusbar a:hover {text-decoration:underline} +.defaultSkin table.mceToolbar {margin-left:3px} +.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} +.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px} +.defaultSkin td.mceCenter {text-align:center;} +.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;} +.defaultSkin td.mceRight table {margin:0 0 0 auto;} + +/* Button */ +.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:10px} +.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} +.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceButtonLabeled {width:auto} +.defaultSkin .mceButtonLabeled span.mceIcon {float:left} +.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica} +.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888} + +/* Separator */ +.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} + +/* ListBox */ +.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} +.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} +.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} +.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} +.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} +.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} +.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px} +.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} +.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;} + +/* SplitButton */ +.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr} +.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} +.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} +.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);} +.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;} +.defaultSkin .mceSplitButton span.mceOpen {display:none} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} +.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;} +.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)} +.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0} +.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;} + +/* ColorSplitButton */ +.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray} +.defaultSkin .mceColorSplitMenu td {padding:2px} +.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080} +.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px} +.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF} +.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2} +.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A} +.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a} +.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px} + +/* Menu */ +.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} +.defaultSkin .mceNoIcons span.mceIcon {width:0;} +.defaultSkin .mceNoIcons a .mceText {padding-left:10px} +.defaultSkin .mceMenu table {background:#FFF} +.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block} +.defaultSkin .mceMenu td {height:20px} +.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0} +.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} +.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px} +.defaultSkin .mceMenu pre.mceText {font-family:Monospace} +.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} +.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} +.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px} +.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} +.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} +.defaultSkin .mceMenuItemDisabled .mceText {color:#888} +.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} +.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} +.defaultSkin .mceMenu span.mceMenuLine {display:none} +.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} + +/* Progress,Resize */ +.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} +.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} + +/* Formats */ +.defaultSkin .mce_formatPreview a {font-size:10px} +.defaultSkin .mce_p span.mceText {} +.defaultSkin .mce_address span.mceText {font-style:italic} +.defaultSkin .mce_pre span.mceText {font-family:monospace} +.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em} +.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em} +.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em} +.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em} +.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em} +.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em} + +/* Theme */ +.defaultSkin span.mce_bold {background-position:0 0} +.defaultSkin span.mce_italic {background-position:-60px 0} +.defaultSkin span.mce_underline {background-position:-140px 0} +.defaultSkin span.mce_strikethrough {background-position:-120px 0} +.defaultSkin span.mce_undo {background-position:-160px 0} +.defaultSkin span.mce_redo {background-position:-100px 0} +.defaultSkin span.mce_cleanup {background-position:-40px 0} +.defaultSkin span.mce_bullist {background-position:-20px 0} +.defaultSkin span.mce_numlist {background-position:-80px 0} +.defaultSkin span.mce_justifyleft {background-position:-460px 0} +.defaultSkin span.mce_justifyright {background-position:-480px 0} +.defaultSkin span.mce_justifycenter {background-position:-420px 0} +.defaultSkin span.mce_justifyfull {background-position:-440px 0} +.defaultSkin span.mce_anchor {background-position:-200px 0} +.defaultSkin span.mce_indent {background-position:-400px 0} +.defaultSkin span.mce_outdent {background-position:-540px 0} +.defaultSkin span.mce_link {background-position:-500px 0} +.defaultSkin span.mce_unlink {background-position:-640px 0} +.defaultSkin span.mce_sub {background-position:-600px 0} +.defaultSkin span.mce_sup {background-position:-620px 0} +.defaultSkin span.mce_removeformat {background-position:-580px 0} +.defaultSkin span.mce_newdocument {background-position:-520px 0} +.defaultSkin span.mce_image {background-position:-380px 0} +.defaultSkin span.mce_help {background-position:-340px 0} +.defaultSkin span.mce_code {background-position:-260px 0} +.defaultSkin span.mce_hr {background-position:-360px 0} +.defaultSkin span.mce_visualaid {background-position:-660px 0} +.defaultSkin span.mce_charmap {background-position:-240px 0} +.defaultSkin span.mce_paste {background-position:-560px 0} +.defaultSkin span.mce_copy {background-position:-700px 0} +.defaultSkin span.mce_cut {background-position:-680px 0} +.defaultSkin span.mce_blockquote {background-position:-220px 0} +.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0} +.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0} +.defaultSkin span.mce_forecolorpicker {background-position:-720px 0} +.defaultSkin span.mce_backcolorpicker {background-position:-760px 0} + +/* Plugins */ +.defaultSkin span.mce_advhr {background-position:-0px -20px} +.defaultSkin span.mce_ltr {background-position:-20px -20px} +.defaultSkin span.mce_rtl {background-position:-40px -20px} +.defaultSkin span.mce_emotions {background-position:-60px -20px} +.defaultSkin span.mce_fullpage {background-position:-80px -20px} +.defaultSkin span.mce_fullscreen {background-position:-100px -20px} +.defaultSkin span.mce_iespell {background-position:-120px -20px} +.defaultSkin span.mce_insertdate {background-position:-140px -20px} +.defaultSkin span.mce_inserttime {background-position:-160px -20px} +.defaultSkin span.mce_absolute {background-position:-180px -20px} +.defaultSkin span.mce_backward {background-position:-200px -20px} +.defaultSkin span.mce_forward {background-position:-220px -20px} +.defaultSkin span.mce_insert_layer {background-position:-240px -20px} +.defaultSkin span.mce_insertlayer {background-position:-260px -20px} +.defaultSkin span.mce_movebackward {background-position:-280px -20px} +.defaultSkin span.mce_moveforward {background-position:-300px -20px} +.defaultSkin span.mce_media {background-position:-320px -20px} +.defaultSkin span.mce_nonbreaking {background-position:-340px -20px} +.defaultSkin span.mce_pastetext {background-position:-360px -20px} +.defaultSkin span.mce_pasteword {background-position:-380px -20px} +.defaultSkin span.mce_selectall {background-position:-400px -20px} +.defaultSkin span.mce_preview {background-position:-420px -20px} +.defaultSkin span.mce_print {background-position:-440px -20px} +.defaultSkin span.mce_cancel {background-position:-460px -20px} +.defaultSkin span.mce_save {background-position:-480px -20px} +.defaultSkin span.mce_replace {background-position:-500px -20px} +.defaultSkin span.mce_search {background-position:-520px -20px} +.defaultSkin span.mce_styleprops {background-position:-560px -20px} +.defaultSkin span.mce_table {background-position:-580px -20px} +.defaultSkin span.mce_cell_props {background-position:-600px -20px} +.defaultSkin span.mce_delete_table {background-position:-620px -20px} +.defaultSkin span.mce_delete_col {background-position:-640px -20px} +.defaultSkin span.mce_delete_row {background-position:-660px -20px} +.defaultSkin span.mce_col_after {background-position:-680px -20px} +.defaultSkin span.mce_col_before {background-position:-700px -20px} +.defaultSkin span.mce_row_after {background-position:-720px -20px} +.defaultSkin span.mce_row_before {background-position:-740px -20px} +.defaultSkin span.mce_merge_cells {background-position:-760px -20px} +.defaultSkin span.mce_table_props {background-position:-980px -20px} +.defaultSkin span.mce_row_props {background-position:-780px -20px} +.defaultSkin span.mce_split_cells {background-position:-800px -20px} +.defaultSkin span.mce_template {background-position:-820px -20px} +.defaultSkin span.mce_visualchars {background-position:-840px -20px} +.defaultSkin span.mce_abbr {background-position:-860px -20px} +.defaultSkin span.mce_acronym {background-position:-880px -20px} +.defaultSkin span.mce_attribs {background-position:-900px -20px} +.defaultSkin span.mce_cite {background-position:-920px -20px} +.defaultSkin span.mce_del {background-position:-940px -20px} +.defaultSkin span.mce_ins {background-position:-960px -20px} +.defaultSkin span.mce_pagebreak {background-position:0 -40px} +.defaultSkin span.mce_restoredraft {background-position:-20px -40px} +.defaultSkin span.mce_spellchecker {background-position:-540px -20px} diff --git a/library/tinymce/changelog.txt b/library/tinymce/changelog.txt old mode 100755 new mode 100644 index bcd3f294c4..ec712077a1 --- a/library/tinymce/changelog.txt +++ b/library/tinymce/changelog.txt @@ -1,3 +1,456 @@ +Version 3.5b2 (2012-03-15) + Rewrote the enter key logic to normalize browser behavior. + Fixed so enter within PRE elements produces a BR and shift+enter breaks/end the PRE. Can be disabled using the br_in_pre option. + Fixed bug where the selection wouldn't be correct after applying formatting and having the caret at the end of the new format node. + Fixed bug where the noneditable plugin would process contents on raw input calls for example on undo/redo calls. + Fixed bug where WebKit could produce an exception when a bookmark was requested when there wasn't a proper selection. + Fixed bug where WebKit would fail to open the image dialog since it would be returning false for a class name instead of a string. + Fixed so alignment and indentation works properly when forced_root_blocks is set to false. It will produce a DIV by default. +Version 3.5b1 (2012-03-08) + Added new event class that is faster and enables support for faking events. + Added new self_closing_elements, short_ended_elements, boolean_attributes, non_empty_elements and block_elements options to control the HTML Schema. + Added new schema option and support for the HTML5 schema. + Added new visualblocks plugin that shows html5 blocks with visual borders. + Added new types and selector options to make it easier to create editor instances with different configs. + Added new preview of formatting options in various listboxes. + Added new preview_styles option that enables control over what gets previewed. + Fixed bug where content css would be loaded twice into iframe. + Fixed bug where start elements with only whitespace in the attribute part wouldn't be correctly parsed. + Fixed bug where the advlink dialog would produce an error about the addSelectAccessibility function not being defined. + Fixed bug where the caret would be placed at an incorrect position if span was removed by the invalid_elements setting. + Fixed bug where elements inside a white space preserve element like pre didn't inherit the behavior while parsing. +Version 3.4.9.x (2012-02-xx) + Improved behaviour of backspacing into a table to be consistant across browsers and disable backspace when cursor immediately follows a table. + Improved edit CSS style plugin for single and multiple block selection and provide option to apply style to only selected text. + Fixed bug in Chrome where moving caret down in table and pasting throws errors. + Corrected reference to TinyMCE trim function. + Fixed bug where Ignore All in IE did not remove the underline from the selected word. + Fixed bug in html source editor word wrap option not wrapping text in Webkit browsers. + Fixed bug where it was possible to insert an invalid colour in the color pop-up dialog. + Fixed bug in Webkit where if anchor is on last line by itself caret can not be placed after it. +Version 3.4.9 (2012-02-23) + Added settings to wordcount plugin to configure update rate and checking wordcount on backspace and delete using wordcount_update_rate and wordcount_update_on_delete. + Fixed bug in Webkit and IE where deleting empty paragraphs would remove entire editor contents. + Fixed bug where pressing enter on end of list item with a heading would create a new item with heading. + Fixed edit css style dialog text-decoration none checkbox so it disables other text-decoration options when enabled. + Fixed bug in Gecko where undo wasn't added when focus was lost. + Fixed bug in Gecko where shift-enter in table cell ending with BR doesn't move caret to new line. + Fixed bug where right-click on formatted text in IE selected the entire line. + Fixed bug where text ending with space could not be unformatted in IE. + Fixed bug where caret formatting would be removed when moving the caret when a selector expression was used. + Fixed bug where formatting would be applied to the body element when all contents where selected and format had both inline and selector parts. + Fixed bug where the media plugin would throw errors if you had iframe set as an invalid element in config. + Fixed bug where the caret would be placed at the top of the document if you inserted a table and undo:ed that operation. Patch contributed by Wesley Walser. + Fixed bug where content css files where loaded twice into the iframe. + Fixed so elements with comments would be trated as non empty elements. Patch contributed by Arjan Scherpenisse. +Version 3.4.8 (2012-02-02) + Fixed bug in IE where selected text ending with space cannot be formatted then formatted again to get original text. + Fixed bug in IE where images larger than editor area were being deselected when toolbar buttons are clicked. + Fixed bug where wrong text align buttons are active when multiple block elements are selected. + Fixed bug where selected link not showing in target field of link dialog in some selection cases. + Use settings for remove_trailing_br so this can be turned off instead of hard coding the value. + Fixed bug in IE where the media plugin displayed null text when some values aren't filled in. + Added API method 'onSetAttrib' that fires when the attribute value on a node changes. + Fix font size dropdown value not being updated when text already has a font size in the advanced template. + Fixed bug in IE where IE doesn't use ARIA attributes properly on options - causing labels to be read out 2 times. + Fixed bug where caret cannot be placed after table if table is at end of document in IE. + Fixed bug where adding range isn't always successful so we need to check range count otherwise an exception can occur. + Added spacebar onclick handler to toolbar buttons to ensure that the accessibility behaviour works correctly. + Fixed bug where a stranded bullet point would get created in WebKit. + Fixed bug where selecting text in a blockquote and pressing backspace toggles the style. + Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property. + Fix white space in between spans from being deleted. + Fixed bug where scrollbars where visible in the character map dialog on Gecko. + Fixed issue with missing translation for one of the emoticons. + Fixed bug where dots in id:s where causing problems. Patch provided by Abhishek Dev. + Fixed bug where urls with an at sign in the path wouldn't be parsed correctly. Patch contributed by Jason Grout. + Fixed bug where Opera would remove the first character of a inline formatted word if you pressed backspace. + Fixed bugs with the autoresize plugin on various browsers and removed the need for the throbber. + Fixed performance issue where the contextmenu plugin would try to remove the menu even if it was removed. Patch contributed by mhu. +Version 3.4.7 (2011-11-03) + Modified the caret formatting behavior to word similar to common desktop wordprocessors like Word or Libre Office. + Fixed bug in Webkit - Cursor positioning does not work vertically within a table cell with multiple lines of text. + Fixed bug in IE where Inserting a table in IE8 places cursor in the second cell of the first row. + Fixed bug in IE where editor in a frame doesn't give focus to the toolbar using ALT-F10. + Fix for webkit and gecko so that deleting bullet from start of list outdents inner list items and moves first item into paragraph. + Fix new list items in IE8 not displayed on a new line when list contains nested list items. + Clear formatting in table cell breaks the cell. + Made media type list localisable. + Fix out of memory error when using prototype in media dialog. + Fixed bug where could not add a space in the middle of a th cell. + Fixed bug where adding a bullet between two existing bullets adds an extra one + Fixed bug where trying to insert a new entry midway through a bulleted list fails dismally when the next entry is tabbed in. + Fixed bug where pressing enter on an empty list item does not outdent properly in FF + Fixed bug where adding a heading after a list item in a table cell changes all styles in that cell + Fixed bug where hitting enter to exit from a bullet list moves cursor to the top of the page in Firefox. + Fixed bug where pressing backspace would not delete HRs in Firefox and IE when next to an empty paragraph. + Fixed bug where deleting part of the link text can cause a link with no destination to be saved. + Fixed bug where css style border widths wasn't handled correctly in table dialog. + Fixed bug where parsing invalid html contents on IE or WebKit could produce an infinite loop. + Fixed bug where scripts with custom script types wasn't properly passed though the editor. + Fixed issue where some Japanese kanji characters wasn't properly entity encoded when numeric entity mode was enabled. + Made emoticons dialog use the keyboard naviation. + Added navigation instructions to the symbols dialog. + Added ability to set default values for the media plugin. + Added new font_size_legacy_values option for converting old font element sizes to span with font-size properties. + Fixed bug where the symbols dialog was not accessible. + Added quirk for IE ensuring that the body of the document containing tinyMCE has a role="application" for accessibility. + Fixed bug where the advanced color picker wasn't working properly on FF 7. + Fixed issue where the advanced color picker was producing uppercase hex codes. + Fixed bug where IE 8 could throw exceptions if the contents contained resizable content elements. + Fixed bug where caret formatting wouldn't be correctly applied to previous sibling on WebKit. + Fixed bug where the select boxes for font size/family would loose it's value on WebKit due to recent iOS fixes. +Version 3.4.6 (2011-09-29) + Fixed bug where list items were being created for empty divs. + Added support in Media plugin for audio media using the embed tag + Fixed accessibility bugs in WebKit and IE8 where toolbar items were not being read. + Added new use_accessible_selects option to ensure accessible list boxes are used in all browsers (custom widget in firefox native on other browsers) + Fixed bug where classid attribute was not being checked from embed objects. + Fixed bug in jsrobot tests with intermittently failing. + Fixed bug where anchors wasn't updated properly if you edited them using IE 8. + Fixed bug where input method on WebKit on Mac OS X would fail to initialize when sometimes focusing the editor. + Fixed bug where it wasn't possible to select HR elements on WebKit by simply clicking on them. + Fixed bug where the media plugin wouldn't work on IE9 when not using the inlinepopups plugin. + Fixed bug where hspace,vspace,align and bgcolor would be removed from object elements in the media plugin. + Fixed bug where the new youtube format wouldn't be properly parsed by the media plugin. + Fixed bug where the style attribute of layers wasn't properly updated on IE and Gecko. + Fixed bug where editing contents in a layer would fail on Gecko since contentEditable doesn't inherit properly. + Fixed bug where IE 6/7 would produce JS errors when serializing contents containing layers. +Version 3.4.5 (2011-09-06) + Fixed accessibility bug in WebKit where the right and left arrow keys would update native list boxes. + Added new whitespace_elements option to enable users to specify specific elements where the whitespace is preserved. + Added new merge_siblings option to formats. This option makes it possible to disable the auto merging of siblings when applying formats. + Fixed bug in IE where trailing comma in paste plugin would cause plugin to not run correctly. + Fixed bug in WebKit where console messages would be logged when deleting an empty document. + Fixed bug in IE8 where caret positioned is on list item instead of paragraph when outdent splits the list + Fixed bug with image dialogs not inserting an image if id was omitted from valid_elements. + Fixed bug where the selection normalization logic wouldn't properly handle image elements in specific config cases. + Fixed bug where the map elements coords attribute would be messed up by IE when serializing the DOM. + Fixed bug where IE wouldn't properly handle custom elements when the contents was serialized. + Fixed bug where you couldn't move the caret in Gecko if you focused the editor using the API or a UI control. + Fixed bug where adjacent links would get merged on IE due to bugs in their link command. + Fixed bug where the color split buttons would loose the selection on IE if the editor was placed in a frame/iframe. + Fixed bug where floated images in WebKit wouldn't get properly linked. + Fixed bug where the fullscreen mode in a separate window wasn't forced into IE9+ standards mode. + Fixed bug where pressing enter in an empty editor on WebKit could produce DIV elements instead of P. + Fixed bug where spans would get removed incorrectly when merging two blocks on backspace/delete on WebKit. + Fixed bug where the editor contents wouldn't be completely removed on backspace/delete on WebKit. + Fixed bug where the fullpage plugin wouldn't properly render style elements in the head on IE 6/7. + Fixed bug where the nonbreaking_force_tab option in the nonbreaking plugin wouldn't work on Gecko/WebKit. + Fixed bug where the isDirty state would become true on non IE browsers if there was an table at the end of the contents. + Fixed bug where entities wasn't properly encoded on WebKit when pasting text as plain text. + Fixed bug where empty editors would produce an exception of valid_elements didn't include body and forced_root_blocks where disabled. + Fixed bug where the fullscreen mode wouldn't retain the header/footer in the fullpage plugin. + Fixed issue where the plaintext_mode and plaintext_mode_sticky language keys where swapped. +Version 3.4.4 (2011-08-04) + Added new html5 audio support. Patch contributed by Ronald M. Clifford. + Added mute option for video elements and preload options for video/audio patch contributed by Dmitry Kalinkin. + Fixed selection to match visual selection before applying formatting changes. + Fixed browser specific bugs in lists for WebKit and IE. + Fixed bug where IE would scroll the window if you closed an inline dialog that was larger than the viewport. Patch by Laurence Keijmel. + Fixed bug where pasting contents near a span element could remove parts of that span. Patch contributed by Wesley Walser. + Fixed bug where formatting change would be lost after pressing enter. + Fixed bug in WebKit where deleting across blocks would add extra styles. + Fixed bug where moving cursor vertically in tables in WebKit wasn't working. + Fixed bug in IE where deleting would cause error in console. + Fixed bug where the formatter was not applying formats across list elements. + Fixed bug where the wordcount plugin would try and update the wordcount if tinymce had been destroyed. + Fixed bug where tabfocus plugin would attempt to focus elements not displayed when their parent element was hidden. + Fixed bug where the contentEditable state would sometimes be removed if you deleted contents in Gecko. + Fixed bug where inserting contents using mceInsertContent would fail if "span" was disabled in valid_elements. + Fixed bug where initialization might fail if some resource on gecko wouldn't load properly and fire the onload event. + Fixed bug where ctrl+7/8/9 keys wouldn't properly add the specific formats associated with them. + Fixed bug where the HTML tags wasn't properly closed in the style plugins properties dialog. + Fixed bug where the list plugin would produce an exception if the user tried to delete an element at the very first location. +Version 3.4.3.2 (2011-06-30) + Fixed bug where deleting all of a paragraph inside a table cell would behave badly in webkit. + Fixed bugs in tests in firefox5 and WebKit. + Fixed bug where selection of table cells would produce an exception on Gecko. + Fixed bug where the caret wasn't properly rendered on Gecko when the editor was hidden. + Fixed bug where pasting plain text into WebKit would produce a pre element it will now produce more semantic markup. + Fixed bug where selecting list type formats using the advlist plugin on IE8 would loose editor selection. + Fixed bug where forced root blocks logic wouldn't properly pad elements created if they contained data attributes. + Fixed bug where it would remove all contents of the editor if you inserted an image when not having a caret in the document. + Fixed bug where the YUI compressor wouldn't properly encode strings with only a quote in them. + Fixed bug where WebKit on iOS5 wouldn't call nodeChanged when the selection was changed. + Fixed bug where mceFocus command wouldn't work properly on Gecko since it didn't focus the body element. + Fixed performance issue with the noneditable plugin where it would enable/disable controls to often. +Version 3.4.3.1 (2011-06-16) + Fixed bug where listboxes were not being handled correctly by JAWS in firefox with the o2k7 skin. + Fixed bug where custom buttons were not being rendered correctly when in high contrast mode. + Added support for iOS 5 that now supporting contentEditable in it's latest beta. + Fixed bug where urls in style attributes with a _ character followed by a number would cause incorrect output. + Fixed bug where custom_elements option wasn't working properly on IE browsers. + Fixed bug where custom_elements marked as block elements wouldn't get correctly treated as block elements. + Fixed bug where attributes with wasn't properly encoded as XML entities. +Version 3.4.3 (2011-06-09) + Fixed bug where deleting backwards before an image into a list would put the cursor in the wrong location. + Fixed bug where styles plugin would not apply styles across multiple selected block elements correctly. + Fixed bug where cursor would jump to start of document when selection contained empty table cells in IE8. + Fixed bug where applied styles wouldn't be kept if you pressed enter twice to produce two paragraphs. + Fixed bug where a ghost like caret would appear on Gecko when pressing enter while having a text color applied. + Fixed bug where IE would produce absolute urls if you inserted a image/link and reloaded the page. + Fixed bug where applying a heading style to a list item would cascade style to children list items. + Fixed bug where Editor loses focus when backspacing and changing styles in WebKit. + Fixed bug where exception was thrown in tinymce.util.URI when parsing a relative URI and no base_uri setting was provided. + Fixed bug where alt-f10 was not always giving focus to the toolbar on Safari. + Added new 'allow_html_in_named_anchor' option to allow html to occur within a named anchor tag. Use at own risk. + Added plugin dependency support. Will autoload plugins specified as a dependency if they haven't been loaded. + Fixed bug where the autolink plugin didn't work with non-English keyboards when pressing ). + Added possibility to change properties of all table cells in a column. + Added external_image_list option to get images list from user-defined variable or function. + Fixed bug where the autoresize plugin wouldn't reduce the editors height on Chrome. + Fixed bug where table size inputs were to small for values with size units. + Fixed bug where table cell/row size input values were not validated. + Fixed bug where menu item line-height would be set to wrong value by external styles. + Fixed bug where hasUndo() would return wrong answer. + Fixed bug where page title would be set to undefined by fullpage plugin. + Fixed bug where HTML5 video properties were not updated in embedded media settings. + Fixed bug where HTML comment on the first line would cause an error. + Fixed bug where spellchecker menu was positioned incorrectly on IE. + Fixed bug where breaking out of list elements on WebKit would produce a DIV instead of P after the list. + Fixed bug where pasting from Word in IE9 would add extra BR elements when text was word wrapped. + Fixed bug where numeric entities with leading zeros would produce incorrect decoding. + Fixed bug where hexadecimal entities wasn't properly decoded. + Fixed bug where bookmarks wasn't properly stored/restored on undo/redo. + Fixed bug where the mceInsertCommand didn't retain the values of links if they contained non url contents. + Fixed bug where the valid_styles option wouldn't be properly used on styles for specific elements. + Fixed so contentEditable is used for the body of the editor if it's supported. + Fixed so trailing BR elements gets removed even when forced_root_blocks option was set to false/null. + Fixed performance issue with mceInsertCommand and inserting very simple contents. + Fixed performance issue with older IE version and huge documents by optimizing the forced root blocks logic. + Fixed performance issue with table plugin where it checked for selected cells to often. + Fixed bug where creating a link on centered/floated image would produce an error on WebKit browsers. + Fixed bug where Gecko would remove single paragraphs if there where contents before/after it. + Fixed bug where the scrollbar would move up/down when pasting contents using the paste plugin. +Version 3.4.2 (2011-04-07) + Added new 'paste_text_sticky_default' option to paste plugin, enables you to set the default state for paste as plain text. + Added new autoresize_bottom_margin option to autoresize plugin that enables you to add an extra margin at the bottom. Patch contributed by Andrew Ozz. + Rewritten the fullpage plugin to handle style contents better and have a more normalized behavior across browsers. + Fixed bug where contents inserted with mceInsertContent wasn't parsed using the default dom parser. + Fixed bug where blocks containing a single anchor element would be treated as empty. + Fixed bug where merging of table cells on IE 6, 7 wouldn't look correctly until the contents was refreshed. + Fixed bug where context menu wouldn't work properly on Safari since it was passing out the ctrl key as pressed. + Fixed bug where image border color/style values were overwritten by advimage plugin. + Fixed bug where setting border in advimage plugin would throw error in IE. + Fixed bug where empty anchors list in link settings wasn't hidden. + Fixed bug where xhtmlextras popups were missing localized popup-size parameters. + Fixed bug where the context menu wouldn't select images on WebKit browsers. + Fixed bug where paste plugin wouldn't properly extract the contents on WebKit due to recent changes in browser behavior. + Fixed bug where focus of the editor would get on control contents on IE lost due to a bug in the ColorSplitButton control. + Fixed bug where contextmenu wasn't disabled on noneditable elements. + Fixed bug where getStyle function would trigger error when called on element without style property. + Fixed bug where editor fail to load if Javascript Compressor was used. + Fixed bug where list-style-type=lower-greek would produce errors in IE<8. + Fixed bug where spellchecker plugin would produce errors on IE6-7. + Fixed bug where theme_advanced_containers configuration option causes error. + Fixed bug where the mceReplaceContent command would produce an error since it didn't correctly handle a return value. + Fixed bug where you couldn't enter float point values for em in dialog input fields since it wouldn't be considered a valid size. + Fixed bug in xhtmlxtras plugin where it wasn't possible to remove some attributes in the attributes dialog. +Version 3.4.1 (2011-03-24) + Added significantly improved list handling via the new 'lists' plugin. + Added 'autolink' plugin to enable automatically linking URLs. Similar to the behavior IE has by default. + Added 'theme_advanced_show_current_color' setting to enable the forecolor and backcolor buttons to continuously show the current text color. + Added 'contextmenu_never_use_native' setting to disable the ctrl-right-click showing the native browser context menu behaviour. + Added 'paste_enable_default_filters' setting to enable the default paste filters to be disabled. + Fixed bug where selection locations on undo/redo didn't work correctly on specific contents. + Fixed bug where an exception would be trown on IE when loading TinyMCE inside an iframe. + Fixed bug where some ascii numeric entities wasn't properly decoded. + Fixed bug where some non western language codes wasn't properly decoded/encoded. + Fixed bug where undo levels wasn't created when deleting contents on IE. + Fixed bug where the initial undo levels bookmark wasn't updated correctly. + Fixed bug where search/replace wouldn't be scoped to editor instances on IE8. + Fixed bug where IE9 would produce two br elements after block elements when pasting. + Fixed bug where IE would place the caret at an incorrect position after a paste operation. + Fixed bug where a paste operation using the keyboard would add an extra undo level. + Fixed bug where some attributes/elements wasn't correctly filtered when invalid contents was inserted. + Fixed bug where the table plugin couldn't correctly handle invalid table structures. + Fixed bug where charset and title of the page were handled incorrectly by the fullpage plugin. + Fixed bug where toggle states on some of the list boxes didn't update correctly. + Fixed bug where sub/sub wouldn't work correctly when done as a caret action in Chrome 10. + Fixed bug where the constrain proportions checkbox wouldn't work in the media plugin. + Fixed bug where block elements containing trailing br elements wouldn't treated properly if they where invalid. + Fixed bug where the color picker dialog wouldn't be rendered correctly when using the o2k7 theme. + Fixed bug where setting border=0 using advimage plugin invalid style attribute content was created in Chrome. + Fixed bug with references to non-existing images in css of fullpage plugin. + Fixed bug where item could be unselected in spellchecker's language selector. + Fixed bug where some mispelled words could be not highlighted using spellchecker plugin. + Fixed bug where spellchecking would merge some words on IE. + Fixed bug where spellchecker context menu was not always positioned correctly. + Fixed bug with empty anchors list in advlink popup when Invisible Elements feature was disabled. + Fixed bug where older IE versions wouldn't properly handle some elements if they where placed at the top of editor contents. + Fixed bug where selecting the whole table would enable table tools for cells and rows. + Fixed bug where it wasn't possible to replace selected contents on IE when pasting using the paste plugin. + Fixed bug where setting text color in fullpage plugin doesn't work. + Fixed bug where the state of checkboxes in media plugin wouldn't be set correctly. + Fixed bug where black spade suit character was not included in special character selector. + Fixed bug where setting invalid values for table cell size would throw an error in IE. + Fixed bug where spellchecking would remove whitespace characters from PRE block in IE. + Fixed bug where HR was inserted inside P elements instead of splitting them. + Fixed bug where extra, empty span tags were added when using a format with both selector and inline modes. + Fixed bug where bullet lists weren't always detected correctly. + Fixed bug where deleting some paragraphs on IE would cause an exception. + Fixed bug where the json encoder logic wouldn't properly encode \ characters. + Fixed bug where the onChange event would be fired when the editor was first initialized. + Fixed bug where mceSelected wouldn't be removed properly from output even if it's an internal class. + Fixed issue with table background colors not being transparent. This improves compliance with users browser color preferences. + Fixed issue where styles were not included when using the full page plugin. + Fixed issue where drag/drop operations wasn't properly added to the undo levels. + Fixed issue where colors wasn't correctly applied to elements with underline decoration. + Fixed issue where deleting some paragraphs on IE would cause an exception. +Version 3.4 (2011-03-10) + Added accessibility example with various accessibility options contributed by Ephox. + Fixed bug where attributes wasn't properly handled in the xhtmlxtras plugin. + Fixed bug where the image.htm had some strange td artifacts probably due to auto merging. + Fixed bug where the ToolbarGroup had an missing reference to this in it's destroy method. + Fixed bug with the resizeBy function in the advanced theme where it was scaled by the wrong parent. + Fixed bug where an exception would be thrown by the element if the page was served in xhtml mode. + Fixed bug where mceInsertContent would throw an exception when page was served in xhtml mode. + Fixed bug where you couldn't select a forground/background color when page was served in xhtml mode. + Fixed bug where the editor would scroll to the toolbar when clicked due to a call to focus in ListBox. + Fixed bug where pages with rtl dir wouldn't render split buttons correctly when using the o2k7 theme. + Fixed bug where anchor elements with names wasn't properly collapsed as they where in 3.3.x. + Fixed bug where WebKit wouldn't properly handle image selection if it was done left to right. + Fixed bug where the formatter would align images when the selection range was collapsed. + Fixed bug where the image button would be active when the selection range was collapsed. + Fixed bug where the element_format option wasn't used by the new (X)HTML serializer logic. + Fixed bug where the table cell/row dialogs would produce empty attributes. + Fixed bug where the tfoot wouldn't be added to the top of the table. + Fixed bug where the formatter would merge siblings with white space between them. + Fixed bug where pasting headers and paragraphs would produce an extra paragraph. + Fixed bug where the ColorSplitButton would throw an exception if you clicked out side a color. + Fixed bug where IE9 wouldn't properly produce new paragraphs on enter if the current paragraph had formatting. + Fixed bug where multiple BR elements at end of block elements where removed. + Fixed bug where fullscreen plugin wouldn't correctly display the edit area on IE6 for long pages. + Fixed bug where paste plugin wouldn't properly encode raw entities when pasting in plain text mode. + Fixed bug where the search/replace plugin wouldn't work correctly on IE 9. + Fixed so the drop menus doesn't get an outline border visible when focused, patch contributed by Ephox. + Fixed so the values entered in the color picker are forced to hex values. + Removed dialog workaround for IE 9 beta since the RC is now out and people should upgrade. + Removed obsolete calls in various plugins to the mceBeginUndoLevel command. +Version 3.4b3 (2011-02-10) + Added WAI-ARIA support for the main UI and dialogs this feature was contributed by Ephox. + Added iframe support to media plugin in order to handle the new YouTube HTML5 video formats. + Fixed bug where anchors would wrap the text contents after it due to a bug in the DomParser logic. + Fixed bug where the selected state wouldn't be removed on ListBox controls when a menu item was selected. + Fixed bug where IE could throw an unspecified error exception when the getBookmark logic was executed. + Fixed bug where IE would throw an invalid argument error when focus was applied to an empty editor instance. + Fixed bug where applying inline format wouldn't work if the start cell in the selection was empty. + Fixed bug where auto detection logic for YouTube and Google Video wouldn't work in the new media plugin. + Fixed bug where td elements would get a colspan/rowspan of 1 when created by the table plugin. + Fixed bug where removal/padding of empty elements wasn't handled correctly. + Fixed bug where internal elements would show up in element path. + Fixed bug where internal elements would get serialized as valid output. + Fixed bug where color wasn't correctly applied to anchor elements. + Fixed bug where float option in the style plugin dialog wouldn't be handled correctly on WebKit. + Fixed bug where the tinymce.dom.TreeWalker prev function wouldn't walk the DOM correctly. + Fixed bug where mceInsertContent command could produce empty block elements after the inserted content. + Fixed bug where mceInsertContent command wouldn't apply visual aids on tables and similar elements. + Fixed bug where empty block elements would get double br bogus elements in them. + Fixed bug where the color menu wouldn't apply the color correctly on IE when the viewport was to small. + Fixed bug where right clicking out side the body element of the editor iframe would prevent paste from working on IE. + Fixed bug where the onContextMenu event wouldn't fire correctly on IE if you clicked out side the body element. + Fixed bug where the onContextMenu event wouldn't fire correctly on modern Opera versions that now support it by default. + Fixed bug where legacy content wasn't converted correctly when inserted using mceInsertContent or through the source dialog. + Fixed bug where resizing images or tables wouldn't update the style attribute correctly or leave data-mce prefixed attributes. + Fixed bug where adding links wouldn't work correctly when using TinyMCE jQuery version with jQuery 1.5. + Fixed bug where single quotes inside param elements wasn't treated correctly by the media plugin. + Fixed bug where pasting plain text in WebKit wouldn't work correctly. It will now auto detect the WebKit bug and use plain text mode. + Fixed bug where the DomParser would fail to move out invalid elements within invalid elements on complex contents. + Fixed bug where paste as plain text would not decode html entities properly. + Fixed bug where large paragraphs would cause incorrect scrolling behavior if you would split them using enter. + Fixed bug where the SaxParser wouldn't properly parse some specific short ended elements. + Fixed so mceReplaceContent supports caret position and makes sure that the contents inserted gets validated. + Fixed so unnecessary traling br elements in blocks gets removed on Gecko/WebKit when using mceInsertContent command. + Moved some plugin css contents into the skin content css files to reduce the number of http requests. + Moved some plugin specific images into the theme img directory since they can then be shared. +Version 3.4b2 (2011-01-13) + Added new custom flash player, this player supports mp4 and flv and has skin support. + Fixed so mceInsertContent handles context correctly to enforce valid nesting of elements. + Fixed bug where scrolling would become jerky on IE on some contents. + Fixed bug where paste as plain text would throw exception of missing entities setting. + Fixed bug where anchor nodes where removed by the new serializer engine. + Fixed bug where IE would crash if when backspace where used on some specific contents. + Fixed bug where pasting of plain text in WebKit would result in merging of text lines. + Fixed bug where it wasn't possible to delete images or tables using backspace on IE9. + Fixed bug where urls in styles would generate a JS error due to incorrect scope. + Fixed bug where copy paste from Java applications would produce extra contents in FF on Mac. + Fixed bug where the verify_html option wouldn't allow all elements and attributes. +Version 3.4b1 (2010-12-20) + Added new serialization engine that increases performance and enforces valid output according to the specified schema settings. + Added new HTML parser logic used by the serialization engine and can handle malformed html contents. + Added new valid_children config option, enables more fine grain control of elements can be inside other elements. + Added new entities encoding logic boost performance and will only encode entities based on context i.e. attributes/text nodes. + Added new protect setting that enables users to protect template items from being removed by the serializer logic. + Added new {$caret} marker for the mceInsertContent command. Makes it possible to move the caret to a specific position when inserting contents. + Added new validation of anchor names. Only valid W3C names will be accepted. + Replaced the internal _mce_ prefixed attributes to the more standard HTML5 data-mce- prefix. This will also resolve future browser santiaztion issues. + Fixed bug where the paste plugin wouldn't convert Word lists with more than 9 items to real ol lists. Patch contributed by Mike (yogaboy). + Fixed bug where clicking on a format title would produce errors if the current selection didn't have any formats. + Fixed bug where paste of simple texts wouldn't work correctly in Gecko using the paste plugin since it keeps block formatting. + Fixed bug where confirm dialogs didn't display correctly due to resent IE9 fixes. + Fixed bug where spaces in URLs wouldn't be properly encoded to %20 if the user entered them in the link dialogs. Patch contributed by Ephox. + Fixed bug where the image alignment buttons wouldn't reposition the resize handles on FF due to a browser issue. Patch contributed by Ephox. + Fixed bug where the compareBoundaryPoints method of the IE Range class didn't work correctly. Patch contributed by Ephox. + Fixed bug where selection of elements using double click wouldn't select the clicked element but rather the parent node on FF. Patch contributed by Ephox. + Fixed bug where IE would scroll the user to the current selection causing parent document to scroll as well. Patch contributed by Ephox. + Fixed bug where style compression would incorrectly compress items with different values. It now only compresses if the values are the same. Patch contributed by Ephox. + Fixed bug where FF would add non breaking spaces outside TD elements if formatting was applied to table cells. Patch contributed by Ephox. + Fixed bug where the caret position would be lost on WebKit browsers if you pasted images multiple times. Patch contributed by Ephox. + Fixed bug where non word contents like * would be counted as words in the wordcount pluging. Patch contributed by David Balatero. + Fixed bug where the toggle absolute button in the layer plugin wouldn't remove the existing internal style attribute first. + Fixed bug where the autosave plugin would generate an exception on IE if the user had disabled userdata persistence. + Fixed bug where the paste plugin would remove dashed classes on IE since the regexps didn't include that character. + Fixed bug where applying text color would not add spans inside link elements. This is needed due to CSS style inheritance. + Fixed bug where applying block formats to empty elements wouldn't render correctly on IE. + Fixed bug where the searchreplace plugin would add a f or r character when shortcuts where used on IE while using default dialogs. + Fixed bug where Opera wouldn't load scripts correctly since the onreadystate would fire even though the script wasn't loaded. + Fixed issue where   wouldn't be handled correctly in the bbcode plugin if entity_encoding was set to raw. + Fixed issue where contents would flicker since the content css files where asynchronously loaded. + Fixed bug where WebKit wouldn't create links on images with a float style. +Version 3.3.9.3 (2010-12-20) + Fixed issue where WebKit wouldn't correctly apply ins/del in xhtmlxtras plugin. + Fixed bug where paste as plaintext on WebKit wouldn't produce br and p elements correctly. + Fixed bug where the confirm dialog texts would be incorrectly placed due to recent IE 9 workarounds in the window.css. + Fixed bug where applying text color would not add spans inside link elements. This is needed due to CSS style inheritance. +Version 3.3.9.2 (2010-09-29) + Fixed bug where placing the caret in IE 9 beta 1 would not work correctly if you clicked out side the document body element. + Fixed bug where IE 9 beta 1 wouldn't resize the editor correctly since the events didn't fire as previous versions did. + Fixed bug where FF would produce an error message when being rendered inside a hidden div element. + Fixed bug where resize logic could produce a cookie with a width/height less than the size of the container. + Fixed bug where content_css wouldn't populate the styles dropdown correctly. +Version 3.3.9.1 (2010-09-23) + Fixed bug where WebKit browsers wouldn't activate the image button when images where selected. + Fixed bug where Opera Presto 10.60 deletes elements when restoring bookmarks. + Fixed bug where IE9 beta1 doesn't handle regexp replacement values correctly. + Fixed bug where IE9 beta1 didn't render the inline dialogs correctly due to a bug with CSS clip. + Fixed bug where IE9 beta1 would produce error messages on load since they removed the document.recalc method. + Fixed bug where IE9 beta1 would produce since they haven't implemented document.implementation.createDocument correctly. + Fixed bug where IE9 beta1 would searchreplace doesn't work since their native DOM Range doesn't have a find method. + Fixed bug where IE9 beta1 would render the source view incorrectly due to incorrect viewport size measurements. + Fixed bug where IE9 beta1 would crash when running the basic functionality unit tests. + Fixed bug where IE9 beta1 would wrap elements in blocks correctly due to changes to the selection object. + Fixed bug where IE9 beta1 would fail to insert contents since they havn't implemented the createContextualFragment method in their DOM Range. + Fixed bug where IE9 beta1 would fail to handle image selection since they currently doesn't support control selections in their DOM Range. + Fixed bug where IE9 beta1 would fail to load scripts since they fire the onload event before the scripts are parsed and executed. +Version 3.3.9 (2010-09-08) + Fixed bug where inserting table rows into a table with subtable would produce an incorrect column count. + Fixed bug where the selection of cells in a table with subtables could produce invalid selections. + Fixed bug where the table plugin would produce a script error if you tried to move the caret before a first child table. + Fixed bug where the keep_styles feature on IE would move the caret to an incorrect location at the end of list blocks. + Fixed so attributes from legacy elements such as font gets retained when they get converted to spans. + Fixed minor issue where the select boxes wouldn't be set the not set by default in the table dialog. +Version 3.3.8 (2010-06-30) + On IE8+ and FireFox 3.5+, dragging an image now correctly adds an undo + event. + Fixed bug where WebKit would not move the caret to a correct position after a paste operation. + Fixed bug where WebKit would produce a div wrapper element when pasting some contents. + Fixed bug where the visual chars and nonbreaking plugin wouldn't show nbsp elements correctly. + Fixed bug where the format states would be enabled even after the format was removed. + Fixed bug where the delete key would move the caret to an incorrect position. + Fixed bug where it wasn't possible to toggle of the current font size/family/style by clicking the title item. + Fixed bug where the abbr element wouldn't get serialized correctly on IE6. + Fixed so that the examples checks if they are executed from the local file system since that might not work properly. Version 3.3.7 (2010-06-10) Fixed bug where context menu would produce an error on IE if you right clicked twice and left clicked once. Fixed bug where resizing of the window on WebKit browsers in fullscreen mode wouldn't position the statusbar correctly. diff --git a/library/tinymce/examples/accessibility.html b/library/tinymce/examples/accessibility.html new file mode 100644 index 0000000000..69059403cc --- /dev/null +++ b/library/tinymce/examples/accessibility.html @@ -0,0 +1,101 @@ + + + +Full featured example + + + + + + + + + + +
                                                                          +

                                                                          Full featured example, with Accessibility settings enabled

                                                                          + +

                                                                          + This page has got the TinyMCE set up to work with configurations related to accessiblity enabled. + In particular +

                                                                            +
                                                                          • the content_css is set to false, to ensure that all default browser styles are used,
                                                                          • +
                                                                          • the browser_preferred_colors dialog option is used to ensure that default css is used for dialogs,
                                                                          • +
                                                                          • and the detect_highcontrast option has been set to ensure that highcontrast mode in Windows browsers + is detected and the toolbars are displayed in a high contrast mode.
                                                                          • +
                                                                          +

                                                                          + + +
                                                                          + +
                                                                          + +
                                                                          + + +
                                                                          + + + + + diff --git a/library/tinymce/examples/css/content.css b/library/tinymce/examples/css/content.css old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/css/word.css b/library/tinymce/examples/css/word.css old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/custom_formats.html b/library/tinymce/examples/custom_formats.html old mode 100755 new mode 100644 index 7c475b19b1..ba9d1eb0c7 --- a/library/tinymce/examples/custom_formats.html +++ b/library/tinymce/examples/custom_formats.html @@ -10,7 +10,7 @@ // General options mode : "textareas", theme : "advanced", - plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave", + plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", @@ -102,6 +102,10 @@
                                                            - + diff --git a/library/tinymce/examples/full.html b/library/tinymce/examples/full.html old mode 100755 new mode 100644 index 0b24b6e48e..84b76ca7a1 --- a/library/tinymce/examples/full.html +++ b/library/tinymce/examples/full.html @@ -2,7 +2,7 @@ Full featured example - + diff --git a/library/tinymce/examples/index.html b/library/tinymce/examples/index.html old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/lists/image_list.js b/library/tinymce/examples/lists/image_list.js old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/lists/link_list.js b/library/tinymce/examples/lists/link_list.js old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/lists/media_list.js b/library/tinymce/examples/lists/media_list.js old mode 100755 new mode 100644 index 3a3836cc50..2e049587cb --- a/library/tinymce/examples/lists/media_list.js +++ b/library/tinymce/examples/lists/media_list.js @@ -6,5 +6,9 @@ var tinyMCEMediaList = [ // Name, URL ["Some Flash", "media/sample.swf"], ["Some Quicktime", "media/sample.mov"], - ["Some AVI", "media/sample.avi"] + ["Some AVI", "media/sample.avi"], + ["Some RealMedia", "media/sample.rm"], + ["Some Shockwave", "media/sample.dcr"], + ["Some Video", "media/sample.mp4"], + ["Some FLV", "media/sample.flv"] ]; \ No newline at end of file diff --git a/library/tinymce/examples/lists/template_list.js b/library/tinymce/examples/lists/template_list.js old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/media/logo.jpg b/library/tinymce/examples/media/logo.jpg old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/media/logo_over.jpg b/library/tinymce/examples/media/logo_over.jpg old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/media/sample.avi b/library/tinymce/examples/media/sample.avi old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/media/sample.dcr b/library/tinymce/examples/media/sample.dcr old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/media/sample.flv b/library/tinymce/examples/media/sample.flv new file mode 100644 index 0000000000000000000000000000000000000000..799d137e67b109d5919ef0dae8a9d13e3134eb38 GIT binary patch literal 88722 zcmeEP2|QKX_doZVuKAh?nWs!wnJRV7k;+(xl&doJWN45^mog+X8A_QNC>5om$u$=l zk|YUHQW_8$!ujuWbHn?+q103F{q6U8y2Dxbobx?vuf6u#`@5F@iZv)22!iOr{}4L_ zwIct5hK3m2-Bvnmx7W4bZjS*UFhH11JGR{Nb117(WzZ+Gy`)?%?p7g}a{H zCKT%P?RH@x)Z+0Y6yZ->O~|i}5H#po>9-_oU%%w@W^eqSEmy^H0eI{436x_+a>cd(NduXdAn22-L!?A%Li2( z&_UkJy+WPz@h@S%jS=^K2K(j)`1g?nz*RurPJxo~i#o1FX*LY-!eC!L+@!BWkmGLg% zRUq;bup%~{ULw~MiXlrF9uD>Q88fHICPP4&8e$!hy=!?=^^H-B_QQAvl&3#K>9PC( zHa`Owu`xxHwrs(85F%JoMBUv!B{GuI5fO4YnY(pi-}B zkaUt>6QYjj%5FMbwG$o#GB4S{A7&UvkfevW!y!l#oFC#Odh4_Eu=C(IKY59AJzT}E z>|5@qcE|4JC(qYigRDOA2;KuW^jci;Y3a*q7#uM9EDnA+TKyh&g_FiU_`HALHurRc{jnm_)}uVITL1fX zqweovhfy@@a+TQ77K<@bzyGU?1F#d1GK*KD9jeP6$c(tZzU|nPy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5tQA+!luNKLBO(df5N~ literal 0 HcmV?d00001 diff --git a/library/tinymce/examples/media/sample.mov b/library/tinymce/examples/media/sample.mov old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/media/sample.ram b/library/tinymce/examples/media/sample.ram old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/media/sample.rm b/library/tinymce/examples/media/sample.rm old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/media/sample.swf b/library/tinymce/examples/media/sample.swf old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/menu.html b/library/tinymce/examples/menu.html old mode 100755 new mode 100644 index a65c3104f7..e48650abd6 --- a/library/tinymce/examples/menu.html +++ b/library/tinymce/examples/menu.html @@ -13,5 +13,6 @@ a {display:block;} Skin support Word processor Custom formats +Accessibility Options - \ No newline at end of file + diff --git a/library/tinymce/examples/simple.html b/library/tinymce/examples/simple.html old mode 100755 new mode 100644 index c378398900..70720caa1c --- a/library/tinymce/examples/simple.html +++ b/library/tinymce/examples/simple.html @@ -38,6 +38,10 @@ - + diff --git a/library/tinymce/examples/skins.html b/library/tinymce/examples/skins.html old mode 100755 new mode 100644 index a39817221e..c150858858 --- a/library/tinymce/examples/skins.html +++ b/library/tinymce/examples/skins.html @@ -12,7 +12,7 @@ mode : "exact", elements : "elm1", theme : "advanced", - plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave", + plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", @@ -47,7 +47,7 @@ elements : "elm2", theme : "advanced", skin : "o2k7", - plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave", + plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", @@ -83,7 +83,7 @@ theme : "advanced", skin : "o2k7", skin_variant : "silver", - plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave", + plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", @@ -119,7 +119,7 @@ theme : "advanced", skin : "o2k7", skin_variant : "black", - plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave", + plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave", // Theme options theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect", @@ -207,6 +207,10 @@ - + diff --git a/library/tinymce/examples/templates/layout1.htm b/library/tinymce/examples/templates/layout1.htm old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/templates/snippet1.htm b/library/tinymce/examples/templates/snippet1.htm old mode 100755 new mode 100644 diff --git a/library/tinymce/examples/translate.html b/library/tinymce/examples/translate.html deleted file mode 100755 index bdd8ac54a4..0000000000 --- a/library/tinymce/examples/translate.html +++ /dev/null @@ -1,80 +0,0 @@ - - - -Full featured example - - - - - - - - - - -
                                                            -

                                                            Translation

                                                            - -

                                                            This page enables you to translate TinyMCE by using XML files.

                                                            -

                                                            Steps to translate:

                                                            -
                                                              -
                                                            1. Download one of the language XML files from the TinyMCE site.
                                                            2. -
                                                            3. Place it in /jscripts/tiny_mce/langs directory, for example /jscripts/tiny_mce/langs/sv.xml.
                                                            4. -
                                                            5. Change the language init option in this file to match the XML file code. For example: sv
                                                            6. -
                                                            7. TinyMCE will now use the XML file instead of the .js versions.
                                                            8. -
                                                            9. Modify the XML file until everything is translated
                                                            10. -
                                                            11. Modify the author information, this is optional.
                                                            12. -
                                                            13. Upload the XML file to the TinyMCE site to share it with others.
                                                            14. -
                                                            15. You can now download the .js versions of the language pack from the TinyMCE site.
                                                            16. -
                                                            - - -
                                                            - - - diff --git a/library/tinymce/examples/word.html b/library/tinymce/examples/word.html old mode 100755 new mode 100644 index f778f983c8..d827b6fedb --- a/library/tinymce/examples/word.html +++ b/library/tinymce/examples/word.html @@ -2,7 +2,7 @@ Word processor example - + diff --git a/library/tinymce/jscripts/tiny_mce/langs/en.js b/library/tinymce/jscripts/tiny_mce/langs/en.js old mode 100755 new mode 100644 index ea4a1b0e14..19324f74cd --- a/library/tinymce/jscripts/tiny_mce/langs/en.js +++ b/library/tinymce/jscripts/tiny_mce/langs/en.js @@ -1,170 +1 @@ -tinyMCE.addI18n({en:{ -common:{ -edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?", -apply:"Apply", -insert:"Insert", -update:"Update", -cancel:"Cancel", -close:"Close", -browse:"Browse", -class_name:"Class", -not_set:"-- Not set --", -clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?", -clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.", -popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.", -invalid_data:"Error: Invalid values entered, these are marked in red.", -more_colors:"More colors" -}, -contextmenu:{ -align:"Alignment", -left:"Left", -center:"Center", -right:"Right", -full:"Full" -}, -insertdatetime:{ -date_fmt:"%Y-%m-%d", -time_fmt:"%H:%M:%S", -insertdate_desc:"Insert date", -inserttime_desc:"Insert time", -months_long:"January,February,March,April,May,June,July,August,September,October,November,December", -months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", -day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", -day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun" -}, -print:{ -print_desc:"Print" -}, -preview:{ -preview_desc:"Preview" -}, -directionality:{ -ltr_desc:"Direction left to right", -rtl_desc:"Direction right to left" -}, -layer:{ -insertlayer_desc:"Insert new layer", -forward_desc:"Move forward", -backward_desc:"Move backward", -absolute_desc:"Toggle absolute positioning", -content:"New layer..." -}, -save:{ -save_desc:"Save", -cancel_desc:"Cancel all changes" -}, -nonbreaking:{ -nonbreaking_desc:"Insert non-breaking space character" -}, -iespell:{ -iespell_desc:"Run spell checking", -download:"ieSpell not detected. Do you want to install it now?" -}, -advhr:{ -advhr_desc:"Horizontal rule" -}, -emotions:{ -emotions_desc:"Emotions" -}, -searchreplace:{ -search_desc:"Find", -replace_desc:"Find/Replace" -}, -advimage:{ -image_desc:"Insert/edit image" -}, -advlink:{ -link_desc:"Insert/edit link" -}, -xhtmlxtras:{ -cite_desc:"Citation", -abbr_desc:"Abbreviation", -acronym_desc:"Acronym", -del_desc:"Deletion", -ins_desc:"Insertion", -attribs_desc:"Insert/Edit Attributes" -}, -style:{ -desc:"Edit CSS Style" -}, -paste:{ -paste_text_desc:"Paste as Plain Text", -paste_word_desc:"Paste from Word", -selectall_desc:"Select All", -plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.", -plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." -}, -paste_dlg:{ -text_title:"Use CTRL+V on your keyboard to paste the text into the window.", -text_linebreaks:"Keep linebreaks", -word_title:"Use CTRL+V on your keyboard to paste the text into the window." -}, -table:{ -desc:"Inserts a new table", -row_before_desc:"Insert row before", -row_after_desc:"Insert row after", -delete_row_desc:"Delete row", -col_before_desc:"Insert column before", -col_after_desc:"Insert column after", -delete_col_desc:"Remove column", -split_cells_desc:"Split merged table cells", -merge_cells_desc:"Merge table cells", -row_desc:"Table row properties", -cell_desc:"Table cell properties", -props_desc:"Table properties", -paste_row_before_desc:"Paste table row before", -paste_row_after_desc:"Paste table row after", -cut_row_desc:"Cut table row", -copy_row_desc:"Copy table row", -del:"Delete table", -row:"Row", -col:"Column", -cell:"Cell" -}, -autosave:{ -unload_msg:"The changes you made will be lost if you navigate away from this page.", -restore_content:"Restore auto-saved content.", -warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?." -}, -fullscreen:{ -desc:"Toggle fullscreen mode" -}, -media:{ -desc:"Insert / edit embedded media", -edit:"Edit embedded media" -}, -fullpage:{ -desc:"Document properties" -}, -template:{ -desc:"Insert predefined template content" -}, -visualchars:{ -desc:"Visual control characters on/off." -}, -spellchecker:{ -desc:"Toggle spellchecker", -menu:"Spellchecker settings", -ignore_word:"Ignore word", -ignore_words:"Ignore all", -langs:"Languages", -wait:"Please wait...", -sug:"Suggestions", -no_sug:"No suggestions", -no_mpell:"No misspellings found." -}, -pagebreak:{ -desc:"Insert page break." -}, -advlist:{ -types:"Types", -def:"Default", -lower_alpha:"Lower alpha", -lower_greek:"Lower greek", -lower_roman:"Lower roman", -upper_alpha:"Upper alpha", -upper_roman:"Upper roman", -circle:"Circle", -disc:"Disc", -square:"Square" -}}}); \ No newline at end of file +tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode_stick":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"},visualblocks:{desc:'Show/hide block elements'}}}); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/license.txt b/library/tinymce/jscripts/tiny_mce/license.txt old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css b/library/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js b/library/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en_dlg.js b/library/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en_dlg.js old mode 100755 new mode 100644 index 873bfd8d38..0c3bf15e6f --- a/library/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en_dlg.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en_dlg.js @@ -1,5 +1 @@ -tinyMCE.addI18n('en.advhr_dlg',{ -width:"Width", -size:"Height", -noshade:"No shadow" -}); \ No newline at end of file +tinyMCE.addI18n('en.advhr_dlg',{size:"Height",noshade:"No Shadow",width:"Width",normal:"Normal",widthunits:"Units"}); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm b/library/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm old mode 100755 new mode 100644 index fc37b2aecd..843e1f8f0b --- a/library/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm @@ -8,43 +8,44 @@ - +
                                                            - - - - - - - - - - - - - -
                                                            - - -
                                                            + + + + + + + + + + + + + +
                                                            + + + +
                                                            diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css b/library/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js old mode 100755 new mode 100644 index 4c7a9c3a88..d613a61393 --- a/library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js old mode 100755 new mode 100644 index 2625dd2131..d2678cbcf2 --- a/library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js @@ -14,7 +14,7 @@ // Register commands ed.addCommand('mceAdvImage', function() { // Internal image object like a flash placeholder - if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1) return; ed.windowManager.open({ diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm b/library/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm old mode 100755 new mode 100644 index 79cff3f19f..ed16b3d4a9 --- a/library/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm @@ -10,13 +10,14 @@ - - + + + @@ -25,15 +26,15 @@
                                                            {#advimage_dlg.general} - +
                                                            - @@ -60,7 +61,7 @@
                                                            {#advimage_dlg.tab_appearance} -
                                                            +
                                                            - + - - +
                                                            - x - px + + x + + px
                                                              + - + @@ -109,7 +108,7 @@ @@ -118,7 +117,7 @@ @@ -129,7 +128,7 @@ - -
                                                            @@ -142,18 +145,18 @@
                                                            {#advimage_dlg.swap_image} - + -
                                                            +
                                                            - @@ -161,12 +164,12 @@ - @@ -178,7 +181,7 @@
                                                            {#advimage_dlg.misc} -
                                                            + +
                                                            - - + + -
                                                              
                                                            + +
                                                            - - + + -
                                                              
                                                            +
                                                            @@ -211,12 +214,12 @@ -
                                                            + +
                                                            - - + + -
                                                              
                                                            @@ -227,6 +230,6 @@ - + diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif b/library/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js b/library/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js old mode 100755 new mode 100644 index 3bda86a2d3..546b69c0de --- a/library/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js @@ -9,13 +9,13 @@ var ImageDialog = { }, init : function(ed) { - var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(); + var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'); tinyMCEPopup.resizeToInnerSize(); this.fillClassList('class_list'); - this.fillFileList('src_list', 'tinyMCEImageList'); - this.fillFileList('over_list', 'tinyMCEImageList'); - this.fillFileList('out_list', 'tinyMCEImageList'); + this.fillFileList('src_list', fl); + this.fillFileList('over_list', fl); + this.fillFileList('out_list', fl); TinyMCE_EditableSelects.init(); if (n.nodeName == 'IMG') { @@ -142,7 +142,7 @@ var ImageDialog = { } tinymce.extend(args, { - src : nl.src.value, + src : nl.src.value.replace(/ /g, '%20'), width : nl.width.value, height : nl.height.value, alt : nl.alt.value, @@ -171,12 +171,18 @@ var ImageDialog = { if (el && el.nodeName == 'IMG') { ed.dom.setAttribs(el, args); } else { - ed.execCommand('mceInsertContent', false, '', {skip_undo : 1}); - ed.dom.setAttribs('__mce_tmp', args); - ed.dom.setAttrib('__mce_tmp', 'id', ''); + tinymce.each(args, function(value, name) { + if (value === "") { + delete args[name]; + } + }); + + ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); ed.undoManager.add(); } + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); tinyMCEPopup.close(); }, @@ -285,7 +291,7 @@ var ImageDialog = { fillFileList : function(id, l) { var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; - l = window[l]; + l = typeof(l) === 'function' ? l() : window[l]; lst.options.length = 0; if (l && l.length > 0) { @@ -359,7 +365,7 @@ var ImageDialog = { }, updateStyle : function(ty) { - var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); + var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); if (tinyMCEPopup.editor.settings.inline_styles) { // Handle align @@ -378,14 +384,27 @@ var ImageDialog = { // Handle border if (ty == 'border') { + b = img.style.border ? img.style.border.split(' ') : []; + bStyle = dom.getStyle(img, 'border-style'); + bColor = dom.getStyle(img, 'border-color'); + dom.setStyle(img, 'border', ''); v = f.border.value; if (v || v == '0') { if (v == '0') - img.style.border = '0'; - else - img.style.border = v + 'px solid black'; + img.style.border = isIE ? '0' : '0 none none'; + else { + if (b.length == 3 && b[isIE ? 2 : 1]) + bStyle = b[isIE ? 2 : 1]; + else if (!bStyle || bStyle == 'none') + bStyle = 'solid'; + if (b.length == 3 && b[isIE ? 0 : 2]) + bColor = b[isIE ? 0 : 2]; + else if (!bColor || bColor == 'none') + bColor = 'black'; + img.style.border = v + 'px ' + bStyle + ' ' + bColor; + } } } diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js b/library/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js old mode 100755 new mode 100644 index f493d196fa..5f122e2cd3 --- a/library/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js @@ -1,43 +1 @@ -tinyMCE.addI18n('en.advimage_dlg',{ -tab_general:"General", -tab_appearance:"Appearance", -tab_advanced:"Advanced", -general:"General", -title:"Title", -preview:"Preview", -constrain_proportions:"Constrain proportions", -langdir:"Language direction", -langcode:"Language code", -long_desc:"Long description link", -style:"Style", -classes:"Classes", -ltr:"Left to right", -rtl:"Right to left", -id:"Id", -map:"Image map", -swap_image:"Swap image", -alt_image:"Alternative image", -mouseover:"for mouse over", -mouseout:"for mouse out", -misc:"Miscellaneous", -example_img:"Appearance preview image", -missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.", -dialog_title:"Insert/edit image", -src:"Image URL", -alt:"Image description", -list:"Image list", -border:"Border", -dimensions:"Dimensions", -vspace:"Vertical space", -hspace:"Horizontal space", -align:"Alignment", -align_baseline:"Baseline", -align_top:"Top", -align_middle:"Middle", -align_bottom:"Bottom", -align_texttop:"Text top", -align_textbottom:"Text bottom", -align_left:"Left", -align_right:"Right", -image_list:"Image list" -}); \ No newline at end of file +tinyMCE.addI18n('en.advimage_dlg',{"image_list":"Image List","align_right":"Right","align_left":"Left","align_textbottom":"Text Bottom","align_texttop":"Text Top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal Space",vspace:"Vertical Space",dimensions:"Dimensions",border:"Border",list:"Image List",alt:"Image Description",src:"Image URL","dialog_title":"Insert/Edit Image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance Preview Image",misc:"Miscellaneous",mouseout:"For Mouse Out",mouseover:"For Mouse Over","alt_image":"Alternative Image","swap_image":"Swap Image",map:"Image Map",id:"ID",rtl:"Right to Left",ltr:"Left to Right",classes:"Classes",style:"Style","long_desc":"Long Description Link",langcode:"Language Code",langdir:"Language Direction","constrain_proportions":"Constrain Proportions",preview:"Preview",title:"Title",general:"General","tab_advanced":"Advanced","tab_appearance":"Appearance","tab_general":"General",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css b/library/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js b/library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js old mode 100755 new mode 100644 index b78e82f76b..9ca955c928 --- a/library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js @@ -30,8 +30,6 @@ function init() { document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); - document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href'); - document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href'); document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); // Link list @@ -41,6 +39,13 @@ function init() { else document.getElementById("linklisthrefcontainer").innerHTML = html; + // Anchor list + html = getAnchorListHTML('anchorlist','href'); + if (html == "") + document.getElementById("anchorlistrow").style.display = 'none'; + else + document.getElementById("anchorlistcontainer").innerHTML = html; + // Resize some elements if (isVisible('hrefbrowser')) document.getElementById('href').style.width = '260px'; @@ -49,6 +54,13 @@ function init() { document.getElementById('popupurl').style.width = '180px'; elm = inst.dom.getParent(elm, "A"); + if (elm == null) { + var prospect = inst.dom.create("p", null, inst.selection.getContent()); + if (prospect.childNodes.length === 1) { + elm = prospect.firstChild; + } + } + if (elm != null && elm.nodeName == "A") action = "update"; @@ -360,20 +372,22 @@ function setAttrib(elm, attrib, value) { } function getAnchorListHTML(id, target) { - var inst = tinyMCEPopup.editor; - var nodes = inst.dom.select('a.mceItemAnchor,img.mceItemAnchor'), name, i; - var html = ""; + var ed = tinyMCEPopup.editor, nodes = ed.dom.select('a'), name, i, len, html = ""; - html += ''; + if (html == "") + return ""; + + html = ''; return html; } @@ -389,7 +403,6 @@ function insertAction() { // Remove element if there is no href if (!document.forms[0].href.value) { - tinyMCEPopup.execCommand("mceBeginUndoLevel"); i = inst.selection.getBookmark(); inst.dom.remove(elm, 1); inst.selection.moveToBookmark(i); @@ -398,12 +411,10 @@ function insertAction() { return; } - tinyMCEPopup.execCommand("mceBeginUndoLevel"); - // Create new anchor elements if (elm == null) { inst.getDoc().execCommand("unlink", false, null); - tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); for (i=0; i'; html += ''; html += ''; diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js b/library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js old mode 100755 new mode 100644 index c71ffbd0f1..3169a56580 --- a/library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js @@ -1,52 +1 @@ -tinyMCE.addI18n('en.advlink_dlg',{ -title:"Insert/edit link", -url:"Link URL", -target:"Target", -titlefield:"Title", -is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", -is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", -list:"Link list", -general_tab:"General", -popup_tab:"Popup", -events_tab:"Events", -advanced_tab:"Advanced", -general_props:"General properties", -popup_props:"Popup properties", -event_props:"Events", -advanced_props:"Advanced properties", -popup_opts:"Options", -anchor_names:"Anchors", -target_same:"Open in this window / frame", -target_parent:"Open in parent window / frame", -target_top:"Open in top frame (replaces all frames)", -target_blank:"Open in new window", -popup:"Javascript popup", -popup_url:"Popup URL", -popup_name:"Window name", -popup_return:"Insert 'return false'", -popup_scrollbars:"Show scrollbars", -popup_statusbar:"Show status bar", -popup_toolbar:"Show toolbars", -popup_menubar:"Show menu bar", -popup_location:"Show location bar", -popup_resizable:"Make window resizable", -popup_dependent:"Dependent (Mozilla/Firefox only)", -popup_size:"Size", -popup_position:"Position (X/Y)", -id:"Id", -style:"Style", -classes:"Classes", -target_name:"Target name", -langdir:"Language direction", -target_langcode:"Target language", -langcode:"Language code", -encoding:"Target character encoding", -mime:"Target MIME type", -rel:"Relationship page to target", -rev:"Relationship target to page", -tabindex:"Tabindex", -accesskey:"Accesskey", -ltr:"Left to right", -rtl:"Right to left", -link_list:"Link list" -}); \ No newline at end of file +tinyMCE.addI18n('en.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"}); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm b/library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm old mode 100755 new mode 100644 index 876669c6b3..8ab7c2a95c --- a/library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm @@ -9,37 +9,38 @@ - -
                                                            -
                                                            + + + + -
                                                            + diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif old mode 100755 new mode 100644 index 16f68cc1e91a9b8ec6cfa0ba4e0c86f94b177f1a..c7cf1011dad0e7500e29a278b0d395b253871109 GIT binary patch delta 268 zcmV+n0rURY0@eZ$M@dFFIbjk25&-lc0J)nSkq}gWCJF-k?l%Ac03rDV1poja04x9i z000sI5&%F2)8HqHP-&K zLM9f)qQm8C1c`;hGBJ_}h73g_p=1mM^9RXLyb^bpf>AvH6dpB#1`P%p2?GxRIXezw z7zGP+3jz%k3l2poa}fvt8yf%!5pp93KMDvH92^x0V-7i+EDszR8Bewx4-y8WehLpR z33wR8E)NQeD=m2M7#-8v+{*T!alCd#3 z1p^Ir4Fi-428xUrkd&O950`xk9-RXQ4F(zs0}qJ@2n?ee0ving0HzHddj}8`MGLmU z8UhImO%o-q#)2Cf00I^Q4_>?<5El-{nhOg84HOFw7eOBf7YG&%hkqFs2p3Q(*Aoat UP6!j@HP+?<{sHjFeFy;nJK@hu1^@s6 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-frown.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-frown.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif old mode 100755 new mode 100644 index 1606c119e75678c4031f384e0d50849906e8f533..82c5b182e61d32bd394acae551eff180f1eebd26 GIT binary patch delta 269 zcmV+o0rLLX0@nf%M@dFFIbjk25&-lc0K%p+kq}gWQaug+`&s}103rDV1poja04x9i z000sI5&%F2)ZizIQ)!l?Xh>A$7VskoPwh#@I9<*GEDONFahaqh2L%Pf;kcR*isE3L zI2Im3A3bNpK_?^9QN%xH_GCzT(kPR|yLU7KDX_2pAAJa~A*# z2^9-;8v_d!2?_v3DRU7A5(5Jg2N7~31{ezo9uTY$9)TD+oGcI(4STm0Q4*wpwG|r; zF2ODk2{(g0w~m91nJ)p)P~b0v=TXuJkV0)pK%`hRH&5(aq`SQQ0|4*~)Y zj~;||h6NmskCzV%0uYjV3kVjWqM-;FoP`G(WCRQW7Z(8x1b=r16AlX=0u2`oB@7o0 z3LXm%B?eNu8w9Vj0v=tq9}^cH3JDbp8v_d!2?`w-K_3Pe2MZcXM;Z$U7f&hF4hJ0z U3mpdz;x*Id4FABSjR*k%I|lSgp8x;= diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif old mode 100755 new mode 100644 index b33d3cca1e7b8e62dc689880074d5c61f619520d..fe66220c24b4da4526818a5d68f75a06d9985a29 GIT binary patch delta 249 zcmVc6jM@dFFIbjk25&-lc0Klpjkq}gWQauaR#xDQ>03rDV1poja04x9i z000sI5&%F2z~Co}Q)!l?s2E!2QdA zP6EM+V$0o5egPxNVelL@nuEvS5Py&l$*VJWNgmaeBy#Fc3>i3Y6%ZGOhlmgrZX^W= z8v_Gi8wdrADnAk!5DyO!7!pA_ZyYQc4;~&as7@LN99jl)E**3kv`;r%EDsR|k-xtS zxe5rp69ipb1YdXxI|zjY71PuN7Z3uIlM@dFFIbjk25&+Z_08%{*kq}gWz^WJ3#xDQ>03rDV0RR9W04x9i z000sI5&!@N!r&*0Q)!lCN*2gA3>#8RD(M*Bp=pO_IJA@^(ve^wj|T)J=|mKx31Xqy zL>`%J1fp3WXcLY>lX-YN*)vvS;FJ&#NtObb*E5pGS7DH60e65|cm@i5WOEb=0u&Si zj}nDqhYt}3FPE1Kk%oN{C!Z4r8Io|G1cs;z1QS;X3KIcN6RD}J9RVd52oM(p6~Dj) z7Z3;+U=_R<%FD|T6+s^g3=I$w7#0>7TMZ0QDH9g~2t-Z@0md~SvlqY>7q2NH06S3N BNLv5^ diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif old mode 100755 new mode 100644 index e6a9e60d5ddd1243fbbf2197b4dc6cd9c1b58b93..fd27edfaaa29a70a8c4563c0eab9f18c74d374fd GIT binary patch delta 270 zcmV+p0rCFX0@wl&M@dFFIbjk25&-lc0C`{zkq}gWCJF+oiUI%t03rDV1poja04x9i z000sI5&%F2)!-+JP-&K7%&eE7zha(Mk#X<1{oe683qw@BL@`@2pbbn6B`H)6*`?PtqlrLxC~PZrGN+% zE&vU~#TXL^jVmoMhlVv1IR^#>3>*Rg2{s7;0vrr}2N2W=TMrHb0uEwT<0=*g4h65Q U1r7!lv`7aQ0sjH?nF;{_JD=x5hyVZp delta 271 zcmV+q0r39V0@(r(M@dFFIbjk25&+Z?0453okq}gWd0-BziUI%t03rDV0RR9W04x9i z000sI5&!@N*5D_KP-&K9N=8QJd6^MGDoHFCB1y=#5VX{x;y`RB48~-Ga8wQ>h#?`F zTrSD$M3OMjAdy9t(NHAIO37j-Eo?9tg#s>zZwlT+1~Gwm8h(Hn69^dx2V!s-3=a<+ z0|Oj(k{b($iHwq&l93aYdI$^y9-5LK0}m612L=TU90DB)k_jCG91M5|5EKp@jU52N z03D4R4iqJ;3BC^w0s;=jUAi9-78(f%i;WBz2niY%K_3Se1`Y*FM+FWB7EmeH6b2d& V4jKj&;x*Of0sjHsjr$M+06RN6NSOct diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif old mode 100755 new mode 100644 index cb99cdd9136fa30462a9f57aa6a0adeb7e4124e7..0cc9bb71cca4cdeafbb248ce7e07c3708c1cbd64 GIT binary patch delta 264 zcmV+j0r&pa0@4ByM@dFFIbjk25&-lc0Q=+`kq}gWC=3F`xI_Q|03rDV1poja04x9i z000sI5&%F2&)_GDP-&KpRzaw7*n2_6C!6#^a!K{=W%7!?bX615c=6B?o`2^cO2 zcoM=c7zsElEfNF+&d-7v$p#C7H3(h^g0}_-5C=(GGudGrRNg8V1`i7u92^)64+a;o OM+X-H`T_N$Apkpuj7YZt delta 268 zcmV+n0rURS0@eZ$M@dFFIbjk25&+Z?04NLskq}gW`{WwLxI_Q|03rDV0RR9W04x9i z000sI5&!@N)8HqHP-&K9N=AmpFq#oTDp_dDHci{26|~f$@kn?Cm5RWVcr*?ph(R$C zG%6BFr6HIo3^YhYGr?3AiY&T{^|8V7w7SrQHo z1RaiZ6q6i?idh5$nwygp7?wp6oeuy28l4>&4~Yf~qLT=v2%Qpp2M`ty9FQFur2rir z1RM_*B?nWxk+Q-ZU$-9+7Yzyt5(*g^X$cAq7eOBf7X}Xt7#tiJ3l9btP$|+D21HH< S7T-0|;sN{t?%*Fn0028#VNAdP diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-wink.gif b/library/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-wink.gif old mode 100755 new mode 100644 index 9faf1aff8f4b28e02f4f414975fe1859c43b6b54..0631c7616ec8624ddeee02b633326f697ee72f80 GIT binary patch delta 276 zcmV+v0qg$X0^R};M@dFFIbjk25&-lc0MWuJkq}gWC=CMr@j3ti03rDV1poja04x9i z000sI5&%F2+u$dPQfZc>h%k}mS_`xd!)9v?GD=uwG!#n1P{Bx25L@HjmHz$20{ z93>Ts1_E((z8wcwL#Z4|1qR^|i5v)w!ugXVXaI_D!lF>PGz3-%90v;n3^s`y30029B7)0Cv delta 277 zcmV+w0qXwV0^b4/i);if(f&&f[1]){l=f[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(l){for(c=0,e=l.length;c",a);h.head=f.substring(0,a+1);j=f.indexOf("\n'}h.head+=d.getParam("fullpage_default_doctype",'');h.head+="\n\n\n"+d.getParam("fullpage_default_title","Untitled document")+"\n";if(g=d.getParam("fullpage_default_encoding")){h.head+='\n'}if(g=d.getParam("fullpage_default_font_family")){i+="font-family: "+g+";"}if(g=d.getParam("fullpage_default_font_size")){i+="font-size: "+g+";"}if(g=d.getParam("fullpage_default_text_color")){i+="color: "+g+";"}h.head+="\n\n";h.foot="\n\n"}},_getContent:function(a,c){var b=this;if(!c.source_view||!a.getParam("fullpage_hide_in_source_view")){c.content=tinymce.trim(b.head)+"\n"+tinymce.trim(c.content)+"\n"+tinymce.trim(b.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file +(function(){var b=tinymce.each,a=tinymce.html.Node;tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(c,d){var e=this;e.editor=c;c.addCommand("mceFullPageProperties",function(){c.windowManager.open({file:d+"/fullpage.htm",width:430+parseInt(c.getLang("fullpage.delta_width",0)),height:495+parseInt(c.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:d,data:e._htmlToData()})});c.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});c.onBeforeSetContent.add(e._setContent,e);c.onGetContent.add(e._getContent,e)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_htmlToData:function(){var f=this._parseHeader(),h={},c,i,g,e=this.editor;function d(l,j){var k=l.attr(j);return k||""}h.fontface=e.getParam("fullpage_default_fontface","");h.fontsize=e.getParam("fullpage_default_fontsize","");i=f.firstChild;if(i.type==7){h.xml_pi=true;g=/encoding="([^"]+)"/.exec(i.value);if(g){h.docencoding=g[1]}}i=f.getAll("#doctype")[0];if(i){h.doctype=""}i=f.getAll("title")[0];if(i&&i.firstChild){h.metatitle=i.firstChild.value}b(f.getAll("meta"),function(m){var k=m.attr("name"),j=m.attr("http-equiv"),l;if(k){h["meta"+k.toLowerCase()]=m.attr("content")}else{if(j=="Content-Type"){l=/charset\s*=\s*(.*)\s*/gi.exec(m.attr("content"));if(l){h.docencoding=l[1]}}}});i=f.getAll("html")[0];if(i){h.langcode=d(i,"lang")||d(i,"xml:lang")}i=f.getAll("link")[0];if(i&&i.attr("rel")=="stylesheet"){h.stylesheet=i.attr("href")}i=f.getAll("body")[0];if(i){h.langdir=d(i,"dir");h.style=d(i,"style");h.visited_color=d(i,"vlink");h.link_color=d(i,"link");h.active_color=d(i,"alink")}return h},_dataToHtml:function(g){var f,d,h,j,k,e=this.editor.dom;function c(n,l,m){n.attr(l,m?m:undefined)}function i(l){if(d.firstChild){d.insert(l,d.firstChild)}else{d.append(l)}}f=this._parseHeader();d=f.getAll("head")[0];if(!d){j=f.getAll("html")[0];d=new a("head",1);if(j.firstChild){j.insert(d,j.firstChild,true)}else{j.append(d)}}j=f.firstChild;if(g.xml_pi){k='version="1.0"';if(g.docencoding){k+=' encoding="'+g.docencoding+'"'}if(j.type!=7){j=new a("xml",7);f.insert(j,f.firstChild,true)}j.value=k}else{if(j&&j.type==7){j.remove()}}j=f.getAll("#doctype")[0];if(g.doctype){if(!j){j=new a("#doctype",10);if(g.xml_pi){f.insert(j,f.firstChild)}else{i(j)}}j.value=g.doctype.substring(9,g.doctype.length-1)}else{if(j){j.remove()}}j=f.getAll("title")[0];if(g.metatitle){if(!j){j=new a("title",1);j.append(new a("#text",3)).value=g.metatitle;i(j)}}if(g.docencoding){j=null;b(f.getAll("meta"),function(l){if(l.attr("http-equiv")=="Content-Type"){j=l}});if(!j){j=new a("meta",1);j.attr("http-equiv","Content-Type");j.shortEnded=true;i(j)}j.attr("content","text/html; charset="+g.docencoding)}b("keywords,description,author,copyright,robots".split(","),function(m){var l=f.getAll("meta"),n,p,o=g["meta"+m];for(n=0;n"))},_parseHeader:function(){return new tinymce.html.DomParser({validate:false,root_name:"#document"}).parse(this.head)},_setContent:function(g,d){var m=this,i,c,h=d.content,f,l="",e=m.editor.dom,j;function k(n){return n.replace(/<\/?[A-Z]+/g,function(o){return o.toLowerCase()})}if(d.format=="raw"&&m.head){return}if(d.source_view&&g.getParam("fullpage_hide_in_source_view")){return}h=h.replace(/<(\/?)BODY/gi,"<$1body");i=h.indexOf("",i);m.head=k(h.substring(0,i+1));c=h.indexOf("\n"}f=m._parseHeader();b(f.getAll("style"),function(n){if(n.firstChild){l+=n.firstChild.value}});j=f.getAll("body")[0];if(j){e.setAttribs(m.editor.getBody(),{style:j.attr("style")||"",dir:j.attr("dir")||"",vLink:j.attr("vlink")||"",link:j.attr("link")||"",aLink:j.attr("alink")||""})}e.remove("fullpage_styles");if(l){e.add(m.editor.getDoc().getElementsByTagName("head")[0],"style",{id:"fullpage_styles"},l);j=e.get("fullpage_styles");if(j.styleSheet){j.styleSheet.cssText=l}}},_getDefaultHeader:function(){var f="",c=this.editor,e,d="";if(c.getParam("fullpage_default_xml_pi")){f+='\n'}f+=c.getParam("fullpage_default_doctype",'');f+="\n\n\n";if(e=c.getParam("fullpage_default_title")){f+=""+e+"\n"}if(e=c.getParam("fullpage_default_encoding")){f+='\n'}if(e=c.getParam("fullpage_default_font_family")){d+="font-family: "+e+";"}if(e=c.getParam("fullpage_default_font_size")){d+="font-size: "+e+";"}if(e=c.getParam("fullpage_default_text_color")){d+="color: "+e+";"}f+="\n\n";return f},_getContent:function(d,e){var c=this;if(!e.source_view||!d.getParam("fullpage_hide_in_source_view")){e.content=tinymce.trim(c.head)+"\n"+tinymce.trim(e.content)+"\n"+tinymce.trim(c.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js old mode 100755 new mode 100644 index a2c9df8987..23de7c5a1a --- a/library/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js @@ -9,6 +9,8 @@ */ (function() { + var each = tinymce.each, Node = tinymce.html.Node; + tinymce.create('tinymce.plugins.FullPagePlugin', { init : function(ed, url) { var t = this; @@ -24,7 +26,7 @@ inline : 1 }, { plugin_url : url, - head_html : t.head + data : t._htmlToData() }); }); @@ -32,7 +34,6 @@ ed.addButton('fullpage', {title : 'fullpage.desc', cmd : 'mceFullPageProperties'}); ed.onBeforeSetContent.add(t._setContent, t); - ed.onSetContent.add(t._setBodyAttribs, t); ed.onGetContent.add(t._getContent, t); }, @@ -48,106 +49,357 @@ // Private plugin internal methods - _setBodyAttribs : function(ed, o) { - var bdattr, i, len, kv, k, v, t, attr = this.head.match(/body(.*?)>/i); + _htmlToData : function() { + var headerFragment = this._parseHeader(), data = {}, nodes, elm, matches, editor = this.editor; - if (attr && attr[1]) { - bdattr = attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g); + function getAttr(elm, name) { + var value = elm.attr(name); - if (bdattr) { - for(i = 0, len = bdattr.length; i < len; i++) { - kv = bdattr[i].split('='); - k = kv[0].replace(/\s/,''); - v = kv[1]; + return value || ''; + }; - if (v) { - v = v.replace(/^\s+/,'').replace(/\s+$/,''); - t = v.match(/^["'](.*)["']$/); + // Default some values + data.fontface = editor.getParam("fullpage_default_fontface", ""); + data.fontsize = editor.getParam("fullpage_default_fontsize", ""); - if (t) - v = t[1]; - } else - v = k; - - ed.dom.setAttrib(ed.getBody(), 'style', v); - } - } + // Parse XML PI + elm = headerFragment.firstChild; + if (elm.type == 7) { + data.xml_pi = true; + matches = /encoding="([^"]+)"/.exec(elm.value); + if (matches) + data.docencoding = matches[1]; } + + // Parse doctype + elm = headerFragment.getAll('#doctype')[0]; + if (elm) + data.doctype = '"; + + // Parse title element + elm = headerFragment.getAll('title')[0]; + if (elm && elm.firstChild) { + data.metatitle = elm.firstChild.value; + } + + // Parse meta elements + each(headerFragment.getAll('meta'), function(meta) { + var name = meta.attr('name'), httpEquiv = meta.attr('http-equiv'), matches; + + if (name) + data['meta' + name.toLowerCase()] = meta.attr('content'); + else if (httpEquiv == "Content-Type") { + matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content')); + + if (matches) + data.docencoding = matches[1]; + } + }); + + // Parse html attribs + elm = headerFragment.getAll('html')[0]; + if (elm) + data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang'); + + // Parse stylesheet + elm = headerFragment.getAll('link')[0]; + if (elm && elm.attr('rel') == 'stylesheet') + data.stylesheet = elm.attr('href'); + + // Parse body parts + elm = headerFragment.getAll('body')[0]; + if (elm) { + data.langdir = getAttr(elm, 'dir'); + data.style = getAttr(elm, 'style'); + data.visited_color = getAttr(elm, 'vlink'); + data.link_color = getAttr(elm, 'link'); + data.active_color = getAttr(elm, 'alink'); + } + + return data; }, - _createSerializer : function() { - return new tinymce.dom.Serializer({ - dom : this.editor.dom, - apply_source_formatting : true + _dataToHtml : function(data) { + var headerFragment, headElement, html, elm, value, dom = this.editor.dom; + + function setAttr(elm, name, value) { + elm.attr(name, value ? value : undefined); + }; + + function addHeadNode(node) { + if (headElement.firstChild) + headElement.insert(node, headElement.firstChild); + else + headElement.append(node); + }; + + headerFragment = this._parseHeader(); + headElement = headerFragment.getAll('head')[0]; + if (!headElement) { + elm = headerFragment.getAll('html')[0]; + headElement = new Node('head', 1); + + if (elm.firstChild) + elm.insert(headElement, elm.firstChild, true); + else + elm.append(headElement); + } + + // Add/update/remove XML-PI + elm = headerFragment.firstChild; + if (data.xml_pi) { + value = 'version="1.0"'; + + if (data.docencoding) + value += ' encoding="' + data.docencoding + '"'; + + if (elm.type != 7) { + elm = new Node('xml', 7); + headerFragment.insert(elm, headerFragment.firstChild, true); + } + + elm.value = value; + } else if (elm && elm.type == 7) + elm.remove(); + + // Add/update/remove doctype + elm = headerFragment.getAll('#doctype')[0]; + if (data.doctype) { + if (!elm) { + elm = new Node('#doctype', 10); + + if (data.xml_pi) + headerFragment.insert(elm, headerFragment.firstChild); + else + addHeadNode(elm); + } + + elm.value = data.doctype.substring(9, data.doctype.length - 1); + } else if (elm) + elm.remove(); + + // Add/update/remove title + elm = headerFragment.getAll('title')[0]; + if (data.metatitle) { + if (!elm) { + elm = new Node('title', 1); + elm.append(new Node('#text', 3)).value = data.metatitle; + addHeadNode(elm); + } + } + + // Add meta encoding + if (data.docencoding) { + elm = null; + each(headerFragment.getAll('meta'), function(meta) { + if (meta.attr('http-equiv') == 'Content-Type') + elm = meta; + }); + + if (!elm) { + elm = new Node('meta', 1); + elm.attr('http-equiv', 'Content-Type'); + elm.shortEnded = true; + addHeadNode(elm); + } + + elm.attr('content', 'text/html; charset=' + data.docencoding); + } + + // Add/update/remove meta + each('keywords,description,author,copyright,robots'.split(','), function(name) { + var nodes = headerFragment.getAll('meta'), i, meta, value = data['meta' + name]; + + for (i = 0; i < nodes.length; i++) { + meta = nodes[i]; + + if (meta.attr('name') == name) { + if (value) + meta.attr('content', value); + else + meta.remove(); + + return; + } + } + + if (value) { + elm = new Node('meta', 1); + elm.attr('name', name); + elm.attr('content', value); + elm.shortEnded = true; + + addHeadNode(elm); + } }); + + // Add/update/delete link + elm = headerFragment.getAll('link')[0]; + if (elm && elm.attr('rel') == 'stylesheet') { + if (data.stylesheet) + elm.attr('href', data.stylesheet); + else + elm.remove(); + } else if (data.stylesheet) { + elm = new Node('link', 1); + elm.attr({ + rel : 'stylesheet', + text : 'text/css', + href : data.stylesheet + }); + elm.shortEnded = true; + + addHeadNode(elm); + } + + // Update body attributes + elm = headerFragment.getAll('body')[0]; + if (elm) { + setAttr(elm, 'dir', data.langdir); + setAttr(elm, 'style', data.style); + setAttr(elm, 'vlink', data.visited_color); + setAttr(elm, 'link', data.link_color); + setAttr(elm, 'alink', data.active_color); + + // Update iframe body as well + dom.setAttribs(this.editor.getBody(), { + style : data.style, + dir : data.dir, + vLink : data.visited_color, + link : data.link_color, + aLink : data.active_color + }); + } + + // Set html attributes + elm = headerFragment.getAll('html')[0]; + if (elm) { + setAttr(elm, 'lang', data.langcode); + setAttr(elm, 'xml:lang', data.langcode); + } + + // Serialize header fragment and crop away body part + html = new tinymce.html.Serializer({ + validate: false, + indent: true, + apply_source_formatting : true, + indent_before: 'head,html,body,meta,title,script,link,style', + indent_after: 'head,html,body,meta,title,script,link,style' + }).serialize(headerFragment); + + this.head = html.substring(0, html.indexOf('')); + }, + + _parseHeader : function() { + // Parse the contents with a DOM parser + return new tinymce.html.DomParser({ + validate: false, + root_name: '#document' + }).parse(this.head); }, _setContent : function(ed, o) { - var t = this, sp, ep, c = o.content, v, st = ''; + var self = this, startPos, endPos, content = o.content, headerFragment, styles = '', dom = self.editor.dom, elm; + + function low(s) { + return s.replace(/<\/?[A-Z]+/g, function(a) { + return a.toLowerCase(); + }) + }; // Ignore raw updated if we already have a head, this will fix issues with undo/redo keeping the head/foot separate - if (o.format == 'raw' && t.head) + if (o.format == 'raw' && self.head) return; if (o.source_view && ed.getParam('fullpage_hide_in_source_view')) return; // Parse out head, body and footer - c = c.replace(/<(\/?)BODY/gi, '<$1body'); - sp = c.indexOf('', sp); - t.head = c.substring(0, sp + 1); + if (startPos != -1) { + startPos = content.indexOf('>', startPos); + self.head = low(content.substring(0, startPos + 1)); - ep = c.indexOf('\n'; + self.head = this._getDefaultHeader(); + self.foot = '\n\n'; + } - t.head += ed.getParam('fullpage_default_doctype', ''); - t.head += '\n\n\n' + ed.getParam('fullpage_default_title', 'Untitled document') + '\n'; + // Parse header and update iframe + headerFragment = self._parseHeader(); + each(headerFragment.getAll('style'), function(node) { + if (node.firstChild) + styles += node.firstChild.value; + }); - if (v = ed.getParam('fullpage_default_encoding')) - t.head += '\n'; + elm = headerFragment.getAll('body')[0]; + if (elm) { + dom.setAttribs(self.editor.getBody(), { + style : elm.attr('style') || '', + dir : elm.attr('dir') || '', + vLink : elm.attr('vlink') || '', + link : elm.attr('link') || '', + aLink : elm.attr('alink') || '' + }); + } - if (v = ed.getParam('fullpage_default_font_family')) - st += 'font-family: ' + v + ';'; + dom.remove('fullpage_styles'); - if (v = ed.getParam('fullpage_default_font_size')) - st += 'font-size: ' + v + ';'; + if (styles) { + dom.add(self.editor.getDoc().getElementsByTagName('head')[0], 'style', {id : 'fullpage_styles'}, styles); - if (v = ed.getParam('fullpage_default_text_color')) - st += 'color: ' + v + ';'; - - t.head += '\n\n'; - t.foot = '\n\n'; + // Needed for IE 6/7 + elm = dom.get('fullpage_styles'); + if (elm.styleSheet) + elm.styleSheet.cssText = styles; } }, + _getDefaultHeader : function() { + var header = '', editor = this.editor, value, styles = ''; + + if (editor.getParam('fullpage_default_xml_pi')) + header += '\n'; + + header += editor.getParam('fullpage_default_doctype', ''); + header += '\n\n\n'; + + if (value = editor.getParam('fullpage_default_title')) + header += '' + value + '\n'; + + if (value = editor.getParam('fullpage_default_encoding')) + header += '\n'; + + if (value = editor.getParam('fullpage_default_font_family')) + styles += 'font-family: ' + value + ';'; + + if (value = editor.getParam('fullpage_default_font_size')) + styles += 'font-size: ' + value + ';'; + + if (value = editor.getParam('fullpage_default_text_color')) + styles += 'color: ' + value + ';'; + + header += '\n\n'; + + return header; + }, + _getContent : function(ed, o) { - var t = this; + var self = this; if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view')) - o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot); + o.content = tinymce.trim(self.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(self.foot); } }); // Register plugin tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin); -})(); \ No newline at end of file +})(); diff --git a/library/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm b/library/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm old mode 100755 new mode 100644 index c32afaf2d9..14ab8652ea --- a/library/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm @@ -8,13 +8,12 @@ - -
                                                            + + @@ -72,9 +71,9 @@
                                                               -
                                                            -
                                                            - - +
                                                             
                                                            @@ -147,7 +146,7 @@
                                                            - +
                                                             
                                                            @@ -158,7 +157,7 @@
                                                            - +
                                                             
                                                            @@ -173,15 +172,15 @@ - + - + - + - +
                                                            @@ -195,7 +194,7 @@
                                                            - +
                                                            @@ -205,7 +204,7 @@
                                                            - +
                                                             
                                                            @@ -217,7 +216,7 @@
                                                            - +
                                                             
                                                            @@ -225,16 +224,6 @@
                                                               
                                                            @@ -254,318 +243,17 @@
    - -
    - - -
    - {#fullpage_dlg.head_elements} - -
    -
    -
    - - -
    -
    - - -
    -
    -
    - -
    -
    - -
    - {#fullpage_dlg.meta_element} - - - - - - - - - - - - - - -
    - - -
    - -
    - {#fullpage_dlg.title_element} - - - - - - -
    - - -
    - -
    - {#fullpage_dlg.script_element} - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - -
    - - - - -
     
    -
    - -
    - -
    -
    - - -
    - -
    - {#fullpage_dlg.style_element} - - - -
    - -
    -
    - - - - - - - - - -
    -
    - -
    - -
    -
    - - -
    - -
    - {#fullpage_dlg.base_element} - - - - - - - - - - -
    - - -
    - - - -
    - {#fullpage_dlg.comment_element} - - - - -
    -
    - + diff --git a/library/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js b/library/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js old mode 100755 new mode 100644 index a1bb719a38..3f672ad3ba --- a/library/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js @@ -8,464 +8,225 @@ * Contributing: http://tinymce.moxiecode.com/contributing */ -tinyMCEPopup.requireLangPack(); +(function() { + tinyMCEPopup.requireLangPack(); -var doc; + var defaultDocTypes = + 'XHTML 1.0 Transitional=,' + + 'XHTML 1.0 Frameset=,' + + 'XHTML 1.0 Strict=,' + + 'XHTML 1.1=,' + + 'HTML 4.01 Transitional=,' + + 'HTML 4.01 Strict=,' + + 'HTML 4.01 Frameset='; -var defaultDocTypes = - 'XHTML 1.0 Transitional=,' + - 'XHTML 1.0 Frameset=,' + - 'XHTML 1.0 Strict=,' + - 'XHTML 1.1=,' + - 'HTML 4.01 Transitional=,' + - 'HTML 4.01 Strict=,' + - 'HTML 4.01 Frameset='; + var defaultEncodings = + 'Western european (iso-8859-1)=iso-8859-1,' + + 'Central European (iso-8859-2)=iso-8859-2,' + + 'Unicode (UTF-8)=utf-8,' + + 'Chinese traditional (Big5)=big5,' + + 'Cyrillic (iso-8859-5)=iso-8859-5,' + + 'Japanese (iso-2022-jp)=iso-2022-jp,' + + 'Greek (iso-8859-7)=iso-8859-7,' + + 'Korean (iso-2022-kr)=iso-2022-kr,' + + 'ASCII (us-ascii)=us-ascii'; -var defaultEncodings = - 'Western european (iso-8859-1)=iso-8859-1,' + - 'Central European (iso-8859-2)=iso-8859-2,' + - 'Unicode (UTF-8)=utf-8,' + - 'Chinese traditional (Big5)=big5,' + - 'Cyrillic (iso-8859-5)=iso-8859-5,' + - 'Japanese (iso-2022-jp)=iso-2022-jp,' + - 'Greek (iso-8859-7)=iso-8859-7,' + - 'Korean (iso-2022-kr)=iso-2022-kr,' + - 'ASCII (us-ascii)=us-ascii'; + var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; + var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; -var defaultMediaTypes = - 'all=all,' + - 'screen=screen,' + - 'print=print,' + - 'tty=tty,' + - 'tv=tv,' + - 'projection=projection,' + - 'handheld=handheld,' + - 'braille=braille,' + - 'aural=aural'; + function setVal(id, value) { + var elm = document.getElementById(id); -var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings'; -var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; + if (elm) { + value = value || ''; -function init() { - var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style; - - // Setup doctype select box - doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(','); - for (i=0; i 1) - addSelectValue(f, 'doctypes', p[0], p[1]); - } - - // Setup fonts select box - fonts = ed.getParam("fullpage_fonts", defaultFontNames).split(';'); - for (i=0; i 1) - addSelectValue(f, 'fontface', p[0], p[1]); - } - - // Setup fontsize select box - fonts = ed.getParam("fullpage_fontsizes", defaultFontSizes).split(','); - for (i=0; i 1) { - addSelectValue(f, 'element_style_media', p[0], p[1]); - addSelectValue(f, 'element_link_media', p[0], p[1]); - } - } - - // Setup encodings select box - encodings = ed.getParam("fullpage_encodings", defaultEncodings).split(','); - for (i=0; i 1) { - addSelectValue(f, 'docencoding', p[0], p[1]); - addSelectValue(f, 'element_script_charset', p[0], p[1]); - addSelectValue(f, 'element_link_charset', p[0], p[1]); - } - } - - document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); - document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); - //document.getElementById('hover_color_pickcontainer').innerHTML = getColorPickerHTML('hover_color_pick','hover_color'); - document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); - document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); - document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); - document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); - document.getElementById('link_href_pickcontainer').innerHTML = getBrowserHTML('link_href_browser','element_link_href','file','fullpage'); - document.getElementById('script_src_pickcontainer').innerHTML = getBrowserHTML('script_src_browser','element_script_src','file','fullpage'); - document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); - - // Resize some elements - if (isVisible('stylesheetbrowser')) - document.getElementById('stylesheet').style.width = '220px'; - - if (isVisible('link_href_browser')) - document.getElementById('element_link_href').style.width = '230px'; - - if (isVisible('bgimage_browser')) - document.getElementById('bgimage').style.width = '210px'; - - // Add iframe - dom.add(document.body, 'iframe', {id : 'documentIframe', src : 'javascript:""', style : {display : 'none'}}); - doc = dom.get('documentIframe').contentWindow.document; - h = tinyMCEPopup.getWindowArg('head_html'); - - // Preprocess the HTML disable scripts and urls - h = h.replace(/ '; - } - - return im; - }); - } - }); + return urlConverter.call(urlConverterScope, url, 'src', 'object'); }, getInfo : function() { @@ -202,213 +226,665 @@ }; }, - // Private methods - _objectsToSpans : function(ed, o) { - var t = this, h = o.content; + /** + * Converts the JSON data object to an img node. + */ + dataToImg : function(data, force_absolute) { + var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i; - h = h.replace(/]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) { - var o = t._parse(c); + data.params.src = self.convertUrl(data.params.src, force_absolute); - return '' + attrs = data.video.attrs; + if (attrs) + attrs.src = self.convertUrl(attrs.src, force_absolute); + + if (attrs) + attrs.poster = self.convertUrl(attrs.poster, force_absolute); + + sources = toArray(data.video.sources); + if (sources) { + for (i = 0; i < sources.length; i++) + sources[i].src = self.convertUrl(sources[i].src, force_absolute); + } + + img = self.editor.dom.create('img', { + id : data.id, + style : data.style, + align : data.align, + hspace : data.hspace, + vspace : data.vspace, + src : self.editor.theme.url + '/img/trans.gif', + 'class' : 'mceItemMedia mceItem' + self.getType(data.type).name, + 'data-mce-json' : JSON.serialize(data, "'") }); - h = h.replace(/]*)>/gi, ''); - h = h.replace(/]*)\/?>/gi, ''); - h = h.replace(/]*)>/gi, ''); - h = h.replace(/<\/(object)([^>]*)>/gi, ''); - h = h.replace(/<\/embed>/gi, ''); - h = h.replace(/]*)>/gi, function(a, b) {return ''}); - h = h.replace(/\/ class=\"mceItemParam\"><\/span>/gi, 'class="mceItemParam">'); + img.width = data.width || (data.type == 'audio' ? "300" : "320"); + img.height = data.height || (data.type == 'audio' ? "32" : "240"); - o.content = h; + return img; }, - _buildObj : function(o, n) { - var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title), stc; - - stc = ed.getParam('media_strict', true) && o.type == 'application/x-shockwave-flash'; + /** + * Converts the JSON data object to a HTML string. + */ + dataToHtml : function(data, force_absolute) { + return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {forced_root_block : '', force_absolute : force_absolute}); + }, - p.width = o.width = dom.getAttrib(n, 'width') || 100; - p.height = o.height = dom.getAttrib(n, 'height') || 100; + /** + * Converts the JSON data object to a HTML string. + */ + htmlToData : function(html) { + var fragment, img, data; - if (p.src) - p.src = ed.convertURL(p.src, 'src', n); + data = { + type : 'flash', + video: {sources:[]}, + params: {} + }; - if (stc) { - ob = dom.create('span', { - id : p.id, - _mce_name : 'object', - type : 'application/x-shockwave-flash', - data : p.src, - style : dom.getAttrib(n, 'style'), - width : o.width, - height : o.height - }); - } else { - ob = dom.create('span', { - id : p.id, - _mce_name : 'object', - classid : "clsid:" + o.classid, - style : dom.getAttrib(n, 'style'), - codebase : o.codebase, - width : o.width, - height : o.height + fragment = this.editor.parser.parse(html); + img = fragment.getAll('img')[0]; + + if (img) { + data = JSON.parse(img.attr('data-mce-json')); + data.type = this.getType(img.attr('class')).name.toLowerCase(); + + // Add some extra properties to the data object + tinymce.each(rootAttributes, function(name) { + var value = img.attr(name); + + if (value) + data[name] = value; }); } - each (p, function(v, k) { - if (!/^(width|height|codebase|classid|id|_cx|_cy)$/.test(k)) { - // Use url instead of src in IE for Windows media - if (o.type == 'application/x-mplayer2' && k == 'src' && !p.url) - k = 'url'; - - if (v) - dom.add(ob, 'span', {_mce_name : 'param', name : k, '_mce_value' : v}); - } - }); - - if (!stc) - dom.add(ob, 'span', tinymce.extend({_mce_name : 'embed', type : o.type, style : dom.getAttrib(n, 'style')}, p)); - - return ob; + return data; }, - _spansToImgs : function(p) { - var t = this, dom = t.editor.dom, im, ci; + /** + * Get type item by extension, class, clsid or mime type. + * + * @method getType + * @param {String} value Value to get type item by. + * @return {Object} Type item object or undefined. + */ + getType : function(value) { + var i, values, typeItem; - each(dom.select('span', p), function(n) { - // Convert object into image - if (dom.getAttrib(n, 'class') == 'mceItemObject') { - ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, ''); + // Find type by checking the classes + values = tinymce.explode(value, ' '); + for (i = 0; i < values.length; i++) { + typeItem = this.lookup[values[i]]; - switch (ci) { - case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000': - dom.replace(t._createImg('mceItemFlash', n), n); - break; + if (typeItem) + return typeItem; + } + }, - case 'clsid:166b1bca-3f9c-11cf-8075-444553540000': - dom.replace(t._createImg('mceItemShockWave', n), n); - break; + /** + * Converts a tinymce.html.Node image element to video/object/embed. + */ + imgToObject : function(node, args) { + var self = this, editor = self.editor, video, object, embed, iframe, name, value, data, + source, sources, params, param, typeItem, i, item, mp4Source, replacement, + posterSrc, style, audio; - case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6': - case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95': - case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a': - dom.replace(t._createImg('mceItemWindowsMedia', n), n); - break; + // Adds the flash player + function addPlayer(video_src, poster_src) { + var baseUri, flashVars, flashVarsOutput, params, flashPlayer; - case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b': - dom.replace(t._createImg('mceItemQuickTime', n), n); - break; + flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf')); + if (flashPlayer) { + baseUri = editor.documentBaseURI; + data.params.src = flashPlayer; - case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa': - dom.replace(t._createImg('mceItemRealMedia', n), n); - break; - - default: - dom.replace(t._createImg('mceItemFlash', n), n); + // Convert the movie url to absolute urls + if (editor.getParam('flash_video_player_absvideourl', true)) { + video_src = baseUri.toAbsolute(video_src || '', true); + poster_src = baseUri.toAbsolute(poster_src || '', true); } - + + // Generate flash vars + flashVarsOutput = ''; + flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}); + tinymce.each(flashVars, function(value, name) { + // Replace $url and $poster variables in flashvars value + value = value.replace(/\$url/, video_src || ''); + value = value.replace(/\$poster/, poster_src || ''); + + if (value.length > 0) + flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value); + }); + + if (flashVarsOutput.length) + data.params.flashvars = flashVarsOutput; + + params = editor.getParam('flash_video_player_params', { + allowfullscreen: true, + allowscriptaccess: true + }); + + tinymce.each(params, function(value, name) { + data.params[name] = "" + value; + }); + } + }; + + data = node.attr('data-mce-json'); + if (!data) + return; + + data = JSON.parse(data); + typeItem = this.getType(node.attr('class')); + + style = node.attr('data-mce-style') + if (!style) { + style = node.attr('style'); + + if (style) + style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img')); + } + + // Handle iframe + if (typeItem.name === 'Iframe') { + replacement = new Node('iframe', 1); + + tinymce.each(rootAttributes, function(name) { + var value = node.attr(name); + + if (name == 'class' && value) + value = value.replace(/mceItem.+ ?/g, ''); + + if (value && value.length > 0) + replacement.attr(name, value); + }); + + for (name in data.params) + replacement.attr(name, data.params[name]); + + replacement.attr({ + style: style, + src: data.params.src + }); + + node.replace(replacement); + + return; + } + + // Handle scripts + if (this.editor.settings.media_use_script) { + replacement = new Node('script', 1).attr('type', 'text/javascript'); + + value = new Node('#text', 3); + value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, { + width: node.attr('width'), + height: node.attr('height') + })) + ');'; + + replacement.append(value); + node.replace(replacement); + + return; + } + + // Add HTML5 video element + if (typeItem.name === 'Video' && data.video.sources[0]) { + // Create new object element + video = new Node('video', 1).attr(tinymce.extend({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }, data.video.attrs)); + + // Get poster source and use that for flash fallback + if (data.video.attrs) + posterSrc = data.video.attrs.poster; + + sources = data.video.sources = toArray(data.video.sources); + for (i = 0; i < sources.length; i++) { + if (/\.mp4$/.test(sources[i].src)) + mp4Source = sources[i].src; + } + + if (!sources[0].type) { + video.attr('src', sources[0].src); + sources.splice(0, 1); + } + + for (i = 0; i < sources.length; i++) { + source = new Node('source', 1).attr(sources[i]); + source.shortEnded = true; + video.append(source); + } + + // Create flash fallback for video if we have a mp4 source + if (mp4Source) { + addPlayer(mp4Source, posterSrc); + typeItem = self.getType('flash'); + } else + data.params.src = ''; + } + + // Add HTML5 audio element + if (typeItem.name === 'Audio' && data.video.sources[0]) { + // Create new object element + audio = new Node('audio', 1).attr(tinymce.extend({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }, data.video.attrs)); + + // Get poster source and use that for flash fallback + if (data.video.attrs) + posterSrc = data.video.attrs.poster; + + sources = data.video.sources = toArray(data.video.sources); + if (!sources[0].type) { + audio.attr('src', sources[0].src); + sources.splice(0, 1); + } + + for (i = 0; i < sources.length; i++) { + source = new Node('source', 1).attr(sources[i]); + source.shortEnded = true; + audio.append(source); + } + + data.params.src = ''; + } + + if (typeItem.name === 'EmbeddedAudio') { + embed = new Node('embed', 1); + embed.shortEnded = true; + embed.attr({ + id: node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style, + type: node.attr('type') + }); + + for (name in data.params) + embed.attr(name, data.params[name]); + + tinymce.each(rootAttributes, function(name) { + if (data[name] && name != 'type') + embed.attr(name, data[name]); + }); + + data.params.src = ''; + } + + // Do we have a params src then we can generate object + if (data.params.src) { + // Is flv movie add player for it + if (/\.flv$/i.test(data.params.src)) + addPlayer(data.params.src, ''); + + if (args && args.force_absolute) + data.params.src = editor.documentBaseURI.toAbsolute(data.params.src); + + // Create new object element + object = new Node('object', 1).attr({ + id : node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style + }); + + tinymce.each(rootAttributes, function(name) { + var value = data[name]; + + if (name == 'class' && value) + value = value.replace(/mceItem.+ ?/g, ''); + + if (value && name != 'type') + object.attr(name, value); + }); + + // Add params + for (name in data.params) { + param = new Node('param', 1); + param.shortEnded = true; + value = data.params[name]; + + // Windows media needs to use url instead of src for the media URL + if (name === 'src' && typeItem.name === 'WindowsMedia') + name = 'url'; + + param.attr({name: name, value: value}); + object.append(param); + } + + // Setup add type and classid if strict is disabled + if (this.editor.getParam('media_strict', true)) { + object.attr({ + data: data.params.src, + type: typeItem.mimes[0] + }); + } else { + object.attr({ + classid: "clsid:" + typeItem.clsids[0], + codebase: typeItem.codebase + }); + + embed = new Node('embed', 1); + embed.shortEnded = true; + embed.attr({ + id: node.attr('id'), + width: node.attr('width'), + height: node.attr('height'), + style : style, + type: typeItem.mimes[0] + }); + + for (name in data.params) + embed.attr(name, data.params[name]); + + tinymce.each(rootAttributes, function(name) { + if (data[name] && name != 'type') + embed.attr(name, data[name]); + }); + + object.append(embed); + } + + // Insert raw HTML + if (data.object_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.object_html; + object.append(value); + } + + // Append object to video element if it exists + if (video) + video.append(object); + } + + if (video) { + // Insert raw HTML + if (data.video_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.video_html; + video.append(value); + } + } + + if (audio) { + // Insert raw HTML + if (data.video_html) { + value = new Node('#text', 3); + value.raw = true; + value.value = data.video_html; + audio.append(value); + } + } + + var n = video || audio || object || embed; + if (n) + node.replace(n); + else + node.remove(); + }, + + /** + * Converts a tinymce.html.Node video/object/embed to an img element. + * + * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this: + * + * + * The JSON structure will be like this: + * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}} + */ + objectToImg : function(node) { + var object, embed, video, iframe, img, name, id, width, height, style, i, html, + param, params, source, sources, data, type, lookup = this.lookup, + matches, attrs, urlConverter = this.editor.settings.url_converter, + urlConverterScope = this.editor.settings.url_converter_scope, + hspace, vspace, align, bgcolor; + + function getInnerHTML(node) { + return new tinymce.html.Serializer({ + inner: true, + validate: false + }).serialize(node); + }; + + function lookupAttribute(o, attr) { + return lookup[(o.attr(attr) || '').toLowerCase()]; + } + + function lookupExtension(src) { + var ext = src.replace(/^.*\.([^.]+)$/, '$1'); + return lookup[ext.toLowerCase() || '']; + } + + // If node isn't in document + if (!node.parent) + return; + + // Handle media scripts + if (node.name === 'script') { + if (node.firstChild) + matches = scriptRegExp.exec(node.firstChild.value); + + if (!matches) return; + + type = matches[1]; + data = {video : {}, params : JSON.parse(matches[2])}; + width = data.params.width; + height = data.params.height; + } + + // Setup data objects + data = data || { + video : {}, + params : {} + }; + + // Setup new image object + img = new Node('img', 1); + img.attr({ + src : this.editor.theme.url + '/img/trans.gif' + }); + + // Video element + name = node.name; + if (name === 'video' || name == 'audio') { + video = node; + object = node.getAll('object')[0]; + embed = node.getAll('embed')[0]; + width = video.attr('width'); + height = video.attr('height'); + id = video.attr('id'); + data.video = {attrs : {}, sources : []}; + + // Get all video attributes + attrs = data.video.attrs; + for (name in video.attributes.map) + attrs[name] = video.attributes.map[name]; + + source = node.attr('src'); + if (source) + data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)}); + + // Get all sources + sources = video.getAll("source"); + for (i = 0; i < sources.length; i++) { + source = sources[i].remove(); + + data.video.sources.push({ + src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'), + type: source.attr('type'), + media: source.attr('media') + }); } - // Convert embed into image - if (dom.getAttrib(n, 'class') == 'mceItemEmbed') { - switch (dom.getAttrib(n, 'type')) { - case 'application/x-shockwave-flash': - dom.replace(t._createImg('mceItemFlash', n), n); - break; + // Convert the poster URL + if (attrs.poster) + attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name); + } - case 'application/x-director': - dom.replace(t._createImg('mceItemShockWave', n), n); - break; + // Object element + if (node.name === 'object') { + object = node; + embed = node.getAll('embed')[0]; + } - case 'application/x-mplayer2': - dom.replace(t._createImg('mceItemWindowsMedia', n), n); - break; + // Embed element + if (node.name === 'embed') + embed = node; - case 'video/quicktime': - dom.replace(t._createImg('mceItemQuickTime', n), n); - break; + // Iframe element + if (node.name === 'iframe') { + iframe = node; + type = 'Iframe'; + } - case 'audio/x-pn-realaudio-plugin': - dom.replace(t._createImg('mceItemRealMedia', n), n); - break; + if (object) { + // Get width/height + width = width || object.attr('width'); + height = height || object.attr('height'); + style = style || object.attr('style'); + id = id || object.attr('id'); + hspace = hspace || object.attr('hspace'); + vspace = vspace || object.attr('vspace'); + align = align || object.attr('align'); + bgcolor = bgcolor || object.attr('bgcolor'); + data.name = object.attr('name'); - default: - dom.replace(t._createImg('mceItemFlash', n), n); - } - } - }); - }, + // Get all object params + params = object.getAll("param"); + for (i = 0; i < params.length; i++) { + param = params[i]; + name = param.remove().attr('name'); - _createImg : function(cl, n) { - var im, dom = this.editor.dom, pa = {}, ti = '', args; + if (!excludedAttrs[name]) + data.params[name] = param.attr('value'); + } - args = ['id', 'name', 'width', 'height', 'bgcolor', 'align', 'flashvars', 'src', 'wmode', 'allowfullscreen', 'quality', 'data']; + data.params.src = data.params.src || object.attr('data'); + } - // Create image - im = dom.create('img', { - src : this.url + '/img/trans.gif', - width : dom.getAttrib(n, 'width') || 100, - height : dom.getAttrib(n, 'height') || 100, - style : dom.getAttrib(n, 'style'), - 'class' : cl - }); + if (embed) { + // Get width/height + width = width || embed.attr('width'); + height = height || embed.attr('height'); + style = style || embed.attr('style'); + id = id || embed.attr('id'); + hspace = hspace || embed.attr('hspace'); + vspace = vspace || embed.attr('vspace'); + align = align || embed.attr('align'); + bgcolor = bgcolor || embed.attr('bgcolor'); - // Setup base parameters - each(args, function(na) { - var v = dom.getAttrib(n, na); + // Get all embed attributes + for (name in embed.attributes.map) { + if (!excludedAttrs[name] && !data.params[name]) + data.params[name] = embed.attributes.map[name]; + } + } - if (v) - pa[na] = v; - }); + if (iframe) { + // Get width/height + width = iframe.attr('width'); + height = iframe.attr('height'); + style = style || iframe.attr('style'); + id = iframe.attr('id'); + hspace = iframe.attr('hspace'); + vspace = iframe.attr('vspace'); + align = iframe.attr('align'); + bgcolor = iframe.attr('bgcolor'); - // Add optional parameters - each(dom.select('span', n), function(n) { - if (dom.hasClass(n, 'mceItemParam')) - pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_mce_value'); - }); + tinymce.each(rootAttributes, function(name) { + img.attr(name, iframe.attr(name)); + }); + + // Get all iframe attributes + for (name in iframe.attributes.map) { + if (!excludedAttrs[name] && !data.params[name]) + data.params[name] = iframe.attributes.map[name]; + } + } // Use src not movie - if (pa.movie) { - pa.src = pa.movie; - delete pa.movie; + if (data.params.movie) { + data.params.src = data.params.src || data.params.movie; + delete data.params.movie; } - // No src try data - if (!pa.src) { - pa.src = pa.data; - delete pa.data; + // Convert the URL to relative/absolute depending on configuration + if (data.params.src) + data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object'); + + if (video) { + if (node.name === 'video') + type = lookup.video.name; + else if (node.name === 'audio') + type = lookup.audio.name; } - // Merge with embed args - n = dom.select('.mceItemEmbed', n)[0]; - if (n) { - each(args, function(na) { - var v = dom.getAttrib(n, na); + if (object && !type) + type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name; - if (v && !pa[na]) - pa[na] = v; - }); + if (embed && !type) + type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name; + + // for embedded audio we preserve the original specified type + if (embed && type == 'EmbeddedAudio') { + data.params.type = embed.attr('type'); } - delete pa.width; - delete pa.height; + // Replace the video/object/embed element with a placeholder image containing the data + node.replace(img); - im.title = this._serialize(pa); + // Remove embed + if (embed) + embed.remove(); - return im; - }, + // Serialize the inner HTML of the object element + if (object) { + html = getInnerHTML(object.remove()); - _parse : function(s) { - return tinymce.util.JSON.parse('{' + s + '}'); - }, + if (html) + data.object_html = html; + } - _serialize : function(o) { - return tinymce.util.JSON.serialize(o).replace(/[{}]/g, ''); + // Serialize the inner HTML of the video element + if (video) { + html = getInnerHTML(video.remove()); + + if (html) + data.video_html = html; + } + + data.hspace = hspace; + data.vspace = vspace; + data.align = align; + data.bgcolor = bgcolor; + + // Set width/height of placeholder + img.attr({ + id : id, + 'class' : 'mceItemMedia mceItem' + (type || 'Flash'), + style : style, + width : width || (node.name == 'audio' ? "300" : "320"), + height : height || (node.name == 'audio' ? "32" : "240"), + hspace : hspace, + vspace : vspace, + align : align, + bgcolor : bgcolor, + "data-mce-json" : JSON.serialize(data, "'") + }); } }); // Register plugin tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin); -})(); \ No newline at end of file +})(); diff --git a/library/tinymce/jscripts/tiny_mce/plugins/media/img/flash.gif b/library/tinymce/jscripts/tiny_mce/plugins/media/img/flash.gif deleted file mode 100755 index cb192e6ceda8d19ad8e7d08dd1cfde0aa72ead2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 241 zcmVOzlLa+Za}7>m0&NpCfJ0FQc3~F7DE)S%o1)Qi1n@vxX46qnD4hRS-NE*Pw!4UvE=#^N( diff --git a/library/tinymce/jscripts/tiny_mce/plugins/media/img/flv_player.swf b/library/tinymce/jscripts/tiny_mce/plugins/media/img/flv_player.swf deleted file mode 100755 index 042c2ab969e98a6fdbe08848c4a73bd2c41de906..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11668 zcmV;FEo;(4S5pYUVE_PloV|PrTvNvr@V+F3a36As0Rb-#MGjBSfQpD35b>z>Admpj zkkAkitwp@*Rqv`rs-o69lDZ&@y{HKo3{JcK8Rt^ z72Hab0Fi(9n@~bYkV2y_)Fy`HtF#7{J|rojb4e1a7ekY%Jpqu!GtXQ6#>m0qvY zqk05XkPr<=DTomvJ9PBuQB+V+fX0s>j}|Rjgg*T6Llosb@Z|f-K0(8m{He?6zo^!s zgW%o|yBiCa{N=g3_eV+xKc?-B?2)mXBGanczVGz$;(Jq8W!}yB$#d7jwz;Cki@c`f zWnSDHobzK#aT@9u=8^8x_Ib_e#Xl4Y`Zer+8u>-bA6`uVXi-Ep^6uWh%d8KaJS&g= z)KA}qY1=qz((;kczfDdZmcI1pls2gC!tgBV;pBqfKiK7u7MDbR)&C>$gyc05A7uO} zTU6zl(L392O7^D-J^u?tL2G}Nl|dGb6UZS!lq5p+9>gp}0$|zy zkSG#qbPAfg3zp?lIyJ5j#n!UMW{%nE-W&j!ZI})Q-KC5ph&MP(<)Js zTB%fN`{MEmC|{-4pi+ZEZQoGP^zA& zLSxF+rRqEl+hmTqSfx>GRVc3zjiF2!xFY<5N}=@HB8fb_IYAXlu?mZ7o| zrNW>xk}{1xtqwkmRR+Z{LK(lMQ+^9H0Gff% zJX2#B5lWP0dWAs^!o=T2Duogl*TKM!LUG8TsxY9=AQJ=bIZ~7vbc1o5C@Ly0DylPi zB6X=;AxGtErAn8jC@Te$;}vQ{nof_KL}N>PDKwfqMgBNcpw_5zCX}d9MX?4f1q5BH zQjIf;K8tpwpGg@hdc9%-(x|kBAc=g9I)9w8e;9k(1AMm0;^LIo2w|sWvCp)nqQ>Q7OIBoG-c3dwN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c;CAT!w6v!!;h98w>O^~*NS!XbLWOrSlF@Laq(1%H zwQI=TMN<`1aa?+*WrOkuCFk2^oD7pW8IFQy3V04~Lb8bZ?L&=BI^DTJ=v^#E8S4m$fXGF-bTg^FJ?Eia`h^T diff --git a/library/tinymce/jscripts/tiny_mce/plugins/media/img/quicktime.gif b/library/tinymce/jscripts/tiny_mce/plugins/media/img/quicktime.gif deleted file mode 100755 index 3b0499145b16138249f653a1a3f2c80230fb292c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 303 zcmV+~0nq+ONk%w1VGsZi0K^{vH>m7Qv+~s9^fsC5ZpZP=*zu3F=Jxpf8k_5u%JNv6 z=md-84VLU4w)kSE=yI&-yw>b=v+SqE?+kq47pC+YrR?bJ^yu>Zyvpn;hTp*6^mM!O zu+8$^=JX7bb<~J01ZTA{q@86#&8&6~H`Ss{{?p%K!-p%L6P2TpFYz90?pD06UU# BbnE~C diff --git a/library/tinymce/jscripts/tiny_mce/plugins/media/img/shockwave.gif b/library/tinymce/jscripts/tiny_mce/plugins/media/img/shockwave.gif deleted file mode 100755 index 5f235dfc7363bd4957b5fe352e16a7eee9a38574..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 387 zcmZ?wbhEHb6lD-#xXJ(m|AF9|(f@B(e|&xQ_v6XWFR%Td$?$)n^p7RFzqSScKhyN< z>ipLaF8n=^^LJP4|1^gGRdo_Rl+a*grZQ1hw@Zo1ikN$oB{QbRq&z?QIckdq1aE3;Fq_(WV>Kc7gjQtQh+9OrtFhn-)LUqD<|MOIl_!(Ed#pPRE;S)g;ew3>pd zn`Wa(lc2DGa)peFw3f88dp-|`@*)AXj;@(8hwDr|7Sxsp;&YxjN*Y{PBB!TIU|!b7Zgv0OaG5)&Kwi diff --git a/library/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js b/library/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/media/js/media.js b/library/tinymce/jscripts/tiny_mce/plugins/media/js/media.js old mode 100755 new mode 100644 index 86cfa98563..733c5f6c28 --- a/library/tinymce/jscripts/tiny_mce/plugins/media/js/media.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/media/js/media.js @@ -1,630 +1,470 @@ -tinyMCEPopup.requireLangPack(); +(function() { + var url; -var oldWidth, oldHeight, ed, url; + if (url = tinyMCEPopup.getParam("media_external_list_url")) + document.write(''); -if (url = tinyMCEPopup.getParam("media_external_list_url")) - document.write(''); - -function init() { - var pl = "", f, val; - var type = "flash", fe, i; - - ed = tinyMCEPopup.editor; - - tinyMCEPopup.resizeToInnerSize(); - f = document.forms[0] - - fe = ed.selection.getNode(); - if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { - pl = fe.title; - - switch (ed.dom.getAttrib(fe, 'class')) { - case 'mceItemFlash': - type = 'flash'; - break; - - case 'mceItemFlashVideo': - type = 'flv'; - break; - - case 'mceItemShockWave': - type = 'shockwave'; - break; - - case 'mceItemWindowsMedia': - type = 'wmp'; - break; - - case 'mceItemQuickTime': - type = 'qt'; - break; - - case 'mceItemRealMedia': - type = 'rmp'; - break; - } - - document.forms[0].insert.value = ed.getLang('update', 'Insert', true); + function get(id) { + return document.getElementById(id); } - document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); - document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media'); - document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + function clone(obj) { + var i, len, copy, attr; - var html = getMediaListHTML('medialist','src','media','media'); - if (html == "") - document.getElementById("linklistrow").style.display = 'none'; - else - document.getElementById("linklistcontainer").innerHTML = html; + if (null == obj || "object" != typeof obj) + return obj; - // Resize some elements - if (isVisible('filebrowser')) - document.getElementById('src').style.width = '230px'; + // Handle Array + if ('length' in obj) { + copy = []; - // Setup form - if (pl != "") { - pl = tinyMCEPopup.editor.plugins.media._parse(pl); - - switch (type) { - case "flash": - setBool(pl, 'flash', 'play'); - setBool(pl, 'flash', 'loop'); - setBool(pl, 'flash', 'menu'); - setBool(pl, 'flash', 'swliveconnect'); - setStr(pl, 'flash', 'quality'); - setStr(pl, 'flash', 'scale'); - setStr(pl, 'flash', 'salign'); - setStr(pl, 'flash', 'wmode'); - setStr(pl, 'flash', 'base'); - setStr(pl, 'flash', 'flashvars'); - break; - - case "qt": - setBool(pl, 'qt', 'loop'); - setBool(pl, 'qt', 'autoplay'); - setBool(pl, 'qt', 'cache'); - setBool(pl, 'qt', 'controller'); - setBool(pl, 'qt', 'correction'); - setBool(pl, 'qt', 'enablejavascript'); - setBool(pl, 'qt', 'kioskmode'); - setBool(pl, 'qt', 'autohref'); - setBool(pl, 'qt', 'playeveryframe'); - setBool(pl, 'qt', 'tarsetcache'); - setStr(pl, 'qt', 'scale'); - setStr(pl, 'qt', 'starttime'); - setStr(pl, 'qt', 'endtime'); - setStr(pl, 'qt', 'tarset'); - setStr(pl, 'qt', 'qtsrcchokespeed'); - setStr(pl, 'qt', 'volume'); - setStr(pl, 'qt', 'qtsrc'); - break; - - case "shockwave": - setBool(pl, 'shockwave', 'sound'); - setBool(pl, 'shockwave', 'progress'); - setBool(pl, 'shockwave', 'autostart'); - setBool(pl, 'shockwave', 'swliveconnect'); - setStr(pl, 'shockwave', 'swvolume'); - setStr(pl, 'shockwave', 'swstretchstyle'); - setStr(pl, 'shockwave', 'swstretchhalign'); - setStr(pl, 'shockwave', 'swstretchvalign'); - break; - - case "wmp": - setBool(pl, 'wmp', 'autostart'); - setBool(pl, 'wmp', 'enabled'); - setBool(pl, 'wmp', 'enablecontextmenu'); - setBool(pl, 'wmp', 'fullscreen'); - setBool(pl, 'wmp', 'invokeurls'); - setBool(pl, 'wmp', 'mute'); - setBool(pl, 'wmp', 'stretchtofit'); - setBool(pl, 'wmp', 'windowlessvideo'); - setStr(pl, 'wmp', 'balance'); - setStr(pl, 'wmp', 'baseurl'); - setStr(pl, 'wmp', 'captioningid'); - setStr(pl, 'wmp', 'currentmarker'); - setStr(pl, 'wmp', 'currentposition'); - setStr(pl, 'wmp', 'defaultframe'); - setStr(pl, 'wmp', 'playcount'); - setStr(pl, 'wmp', 'rate'); - setStr(pl, 'wmp', 'uimode'); - setStr(pl, 'wmp', 'volume'); - break; - - case "rmp": - setBool(pl, 'rmp', 'autostart'); - setBool(pl, 'rmp', 'loop'); - setBool(pl, 'rmp', 'autogotourl'); - setBool(pl, 'rmp', 'center'); - setBool(pl, 'rmp', 'imagestatus'); - setBool(pl, 'rmp', 'maintainaspect'); - setBool(pl, 'rmp', 'nojava'); - setBool(pl, 'rmp', 'prefetch'); - setBool(pl, 'rmp', 'shuffle'); - setStr(pl, 'rmp', 'console'); - setStr(pl, 'rmp', 'controls'); - setStr(pl, 'rmp', 'numloop'); - setStr(pl, 'rmp', 'scriptcallbacks'); - break; - } - - setStr(pl, null, 'src'); - setStr(pl, null, 'id'); - setStr(pl, null, 'name'); - setStr(pl, null, 'vspace'); - setStr(pl, null, 'hspace'); - setStr(pl, null, 'bgcolor'); - setStr(pl, null, 'align'); - setStr(pl, null, 'width'); - setStr(pl, null, 'height'); - - if ((val = ed.dom.getAttrib(fe, "width")) != "") - pl.width = f.width.value = val; - - if ((val = ed.dom.getAttrib(fe, "height")) != "") - pl.height = f.height.value = val; - - oldWidth = pl.width ? parseInt(pl.width) : 0; - oldHeight = pl.height ? parseInt(pl.height) : 0; - } else - oldWidth = oldHeight = 0; - - selectByValue(f, 'media_type', type); - changedType(type); - updateColor('bgcolor_pick', 'bgcolor'); - - TinyMCE_EditableSelects.init(); - generatePreview(); -} - -function insertMedia() { - var fe, f = document.forms[0], h; - - tinyMCEPopup.restoreSelection(); - - if (!AutoValidator.validate(f)) { - tinyMCEPopup.alert(ed.getLang('invalid_data')); - return false; - } - - f.width.value = f.width.value == "" ? 100 : f.width.value; - f.height.value = f.height.value == "" ? 100 : f.height.value; - - fe = ed.selection.getNode(); - if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { - switch (f.media_type.options[f.media_type.selectedIndex].value) { - case "flash": - fe.className = "mceItemFlash"; - break; - - case "flv": - fe.className = "mceItemFlashVideo"; - break; - - case "shockwave": - fe.className = "mceItemShockWave"; - break; - - case "qt": - fe.className = "mceItemQuickTime"; - break; - - case "wmp": - fe.className = "mceItemWindowsMedia"; - break; - - case "rmp": - fe.className = "mceItemRealMedia"; - break; - } - - if (fe.width != f.width.value || fe.height != f.height.value) - ed.execCommand('mceRepaint'); - - fe.title = serializeParameters(); - fe.width = f.width.value; - fe.height = f.height.value; - fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : ''); - fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : ''); - fe.align = f.align.options[f.align.selectedIndex].value; - } else { - h = ' 0) { - var html = ""; - - html += ''; - - return html; - } - - return ""; -} - -function getType(v) { - var fo, i, c, el, x, f = document.forms[0]; - - fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';'); - - // YouTube - if (v.match(/watch\?v=(.+)(.*)/)) { - f.width.value = '425'; - f.height.value = '350'; - f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1]; - return 'flash'; - } - - // Google video - if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) { - f.width.value = '425'; - f.height.value = '326'; - f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en'; - return 'flash'; - } - - for (i=0; i 0 ? s.substring(0, s.length - 1) : s; - - return s; -} - -function setBool(pl, p, n) { - if (typeof(pl[n]) == "undefined") - return; - - document.forms[0].elements[p + "_" + n].checked = pl[n] != 'false'; -} - -function setStr(pl, p, n) { - var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n]; - - if (typeof(pl[n]) == "undefined") - return; - - if (e.type == "text") - e.value = pl[n]; - else - selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]); -} - -function getBool(p, n, d, tv, fv) { - var v = document.forms[0].elements[p + "_" + n].checked; - - tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; - fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; - - return (v == d) ? '' : n + (v ? ':' + tv + ',' : ":\'" + fv + "\',"); -} - -function getStr(p, n, d) { - var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; - var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; - - if (n == 'src') - v = tinyMCEPopup.editor.convertURL(v, 'src', null); - - return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',"); -} - -function getInt(p, n, d) { - var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; - var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; - - return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ","); -} - -function jsEncode(s) { - s = s.replace(new RegExp('\\\\', 'g'), '\\\\'); - s = s.replace(new RegExp('"', 'g'), '\\"'); - s = s.replace(new RegExp("'", 'g'), "\\'"); - - return s; -} - -function generatePreview(c) { - var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh; - - p.innerHTML = ''; - - nw = parseInt(f.width.value); - nh = parseInt(f.height.value); - - if (f.width.value != "" && f.height.value != "") { - if (f.constrain.checked) { - if (c == 'width' && oldWidth != 0) { - wp = nw / oldWidth; - nh = Math.round(wp * nh); - f.height.value = nh; - } else if (c == 'height' && oldHeight != 0) { - hp = nh / oldHeight; - nw = Math.round(hp * nw); - f.width.value = nw; + for (i = 0, len = obj.length; i < len; ++i) { + copy[i] = clone(obj[i]); } + + return copy; + } + + // Handle Object + copy = {}; + for (attr in obj) { + if (obj.hasOwnProperty(attr)) + copy[attr] = clone(obj[attr]); + } + + return copy; + } + + function getVal(id) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + return elm.options[elm.selectedIndex].value; + + if (elm.type == "checkbox") + return elm.checked; + + return elm.value; + } + + function setVal(id, value, name) { + if (typeof(value) != 'undefined' && value != null) { + var elm = get(id); + + if (elm.nodeName == "SELECT") + selectByValue(document.forms[0], id, value); + else if (elm.type == "checkbox") { + if (typeof(value) == 'string') { + value = value.toLowerCase(); + value = (!name && value === 'true') || (name && value === name.toLowerCase()); + } + elm.checked = !!value; + } else + elm.value = value; } } - if (f.width.value != "") - oldWidth = nw; + window.Media = { + init : function() { + var html, editor, self = this; - if (f.height.value != "") - oldHeight = nh; + self.editor = editor = tinyMCEPopup.editor; - // After constrain - pl = serializeParameters(); + // Setup file browsers and color pickers + get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); + get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media'); + get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); + get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media'); + 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'); - switch (f.media_type.options[f.media_type.selectedIndex].value) { - case "flash": - cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; - codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'; - type = 'application/x-shockwave-flash'; - break; + html = self.getMediaListHTML('medialist', 'src', 'media', 'media'); + if (html == "") + get("linklistrow").style.display = 'none'; + else + get("linklistcontainer").innerHTML = html; - case "shockwave": - cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000'; - codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0'; - type = 'application/x-director'; - break; + if (isVisible('filebrowser')) + get('src').style.width = '230px'; - case "qt": - cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B'; - codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'; - type = 'video/quicktime'; - break; + if (isVisible('video_filebrowser_altsource1')) + get('video_altsource1').style.width = '220px'; - case "wmp": - cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'; - codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; - type = 'application/x-mplayer2'; - break; + if (isVisible('video_filebrowser_altsource2')) + get('video_altsource2').style.width = '220px'; - case "rmp": - cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'; - codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; - type = 'audio/x-pn-realaudio-plugin'; - break; - } + if (isVisible('audio_filebrowser_altsource1')) + get('audio_altsource1').style.width = '220px'; - if (pl == '') { - p.innerHTML = ''; - return; - } + if (isVisible('audio_filebrowser_altsource2')) + get('audio_altsource2').style.width = '220px'; - pl = tinyMCEPopup.editor.plugins.media._parse(pl); + if (isVisible('filebrowser_poster')) + get('video_poster').style.width = '220px'; - if (!pl.src) { - p.innerHTML = ''; - return; - } + editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor)); - pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src); - pl.width = !pl.width ? 100 : pl.width; - pl.height = !pl.height ? 100 : pl.height; - pl.id = !pl.id ? 'obj' : pl.id; - pl.name = !pl.name ? 'eobj' : pl.name; - pl.align = !pl.align ? '' : pl.align; + self.setDefaultDialogSettings(editor); + self.data = clone(tinyMCEPopup.getWindowArg('data')); + self.dataToForm(); + self.preview(); - // Avoid annoying warning about insecure items - if (!tinymce.isIE || document.location.protocol != 'https:') { - h += ''; + updateColor('bgcolor_pick', 'bgcolor'); + }, - for (n in pl) { - h += ''; + insert : function() { + var editor = tinyMCEPopup.editor; - // Add extra url parameter if it's an absolute URL - if (n == 'src' && pl[n].indexOf('://') != -1) - h += ''; + this.formToData(); + editor.execCommand('mceRepaint'); + tinyMCEPopup.restoreSelection(); + editor.selection.setNode(editor.plugins.media.dataToImg(this.data)); + tinyMCEPopup.close(); + }, + + preview : function() { + get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true); + }, + + moveStates : function(to_form, field) { + var data = this.data, editor = this.editor, + mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src; + + defaultStates = { + // QuickTime + quicktime_autoplay : true, + quicktime_controller : true, + + // Flash + flash_play : true, + flash_loop : true, + flash_menu : true, + + // WindowsMedia + windowsmedia_autostart : true, + windowsmedia_enablecontextmenu : true, + windowsmedia_invokeurls : true, + + // RealMedia + realmedia_autogotourl : true, + realmedia_imagestatus : true + }; + + function parseQueryParams(str) { + var out = {}; + + if (str) { + tinymce.each(str.split('&'), function(item) { + var parts = item.split('='); + + out[unescape(parts[0])] = unescape(parts[1]); + }); + } + + return out; + }; + + function setOptions(type, names) { + var i, name, formItemName, value, list; + + if (type == data.type || type == 'global') { + names = tinymce.explode(names); + for (i = 0; i < names.length; i++) { + name = names[i]; + formItemName = type == 'global' ? name : type + '_' + name; + + if (type == 'global') + list = data; + else if (type == 'video' || type == 'audio') { + list = data.video.attrs; + + if (!list && !to_form) + data.video.attrs = list = {}; + } else + list = data.params; + + if (list) { + if (to_form) { + setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : ''); + } else { + delete list[name]; + + value = getVal(formItemName); + if ((type == 'video' || type == 'audio') && value === true) + value = name; + + if (defaultStates[formItemName]) { + if (value !== defaultStates[formItemName]) { + value = "" + value; + list[name] = value; + } + } else if (value) { + value = "" + value; + list[name] = value; + } + } + } + } + } + } + + if (!to_form) { + data.type = get('media_type').options[get('media_type').selectedIndex].value; + data.width = getVal('width'); + data.height = getVal('height'); + + // Switch type based on extension + src = getVal('src'); + if (field == 'src') { + ext = src.replace(/^.*\.([^.]+)$/, '$1'); + if (typeInfo = mediaPlugin.getType(ext)) + data.type = typeInfo.name.toLowerCase(); + + setVal('media_type', data.type); + } + + if (data.type == "video" || data.type == "audio") { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src: getVal('src')}; + } + } + + // Hide all fieldsets and show the one active + get('video_options').style.display = 'none'; + get('audio_options').style.display = 'none'; + get('flash_options').style.display = 'none'; + get('quicktime_options').style.display = 'none'; + get('shockwave_options').style.display = 'none'; + get('windowsmedia_options').style.display = 'none'; + get('realmedia_options').style.display = 'none'; + get('embeddedaudio_options').style.display = 'none'; + + if (get(data.type + '_options')) + get(data.type + '_options').style.display = 'block'; + + setVal('media_type', data.type); + + setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars'); + setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc'); + setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign'); + setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume'); + setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks'); + setOptions('video', 'poster,autoplay,loop,muted,preload,controls'); + setOptions('audio', 'autoplay,loop,preload,controls'); + setOptions('embeddedaudio', 'autoplay,loop,controls'); + setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height'); + + if (to_form) { + if (data.type == 'video') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('video_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('video_altsource2', src.src); + } else if (data.type == 'audio') { + if (data.video.sources[0]) + setVal('src', data.video.sources[0].src); + + src = data.video.sources[1]; + if (src) + setVal('audio_altsource1', src.src); + + src = data.video.sources[2]; + if (src) + setVal('audio_altsource2', src.src); + } else { + // Check flash vars + if (data.type == 'flash') { + tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) { + if (value == '$url') + data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || ''; + }); + } + + setVal('src', data.params.src); + } + } else { + src = getVal("src"); + + // YouTube *NEW* + if (src.match(/youtu.be\/[a-z1-9.-_]+/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // YouTube + if (src.match(/youtube.com(.+)v=([^&]+)/)) { + data.width = 425; + data.height = 350; + data.params.frameborder = '0'; + data.type = 'iframe'; + src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1]; + setVal('src', src); + setVal('media_type', data.type); + } + + // Google video + if (src.match(/video.google.com(.+)docid=([^&]+)/)) { + data.width = 425; + data.height = 326; + data.type = 'flash'; + src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en'; + setVal('src', src); + setVal('media_type', data.type); + } + + if (data.type == 'video') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("video_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("video_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else if (data.type == 'audio') { + if (!data.video.sources) + data.video.sources = []; + + data.video.sources[0] = {src : src}; + + src = getVal("audio_altsource1"); + if (src) + data.video.sources[1] = {src : src}; + + src = getVal("audio_altsource2"); + if (src) + data.video.sources[2] = {src : src}; + } else + data.params.src = src; + + // Set default size + setVal('width', data.width || (data.type == 'audio' ? 300 : 320)); + setVal('height', data.height || (data.type == 'audio' ? 32 : 240)); + } + }, + + dataToForm : function() { + this.moveStates(true); + }, + + formToData : function(field) { + if (field == "width" || field == "height") + this.changeSize(field); + + if (field == 'source') { + this.moveStates(false, field); + setVal('source', this.editor.plugins.media.dataToHtml(this.data)); + this.panel = 'source'; + } else { + if (this.panel == 'source') { + this.data = clone(this.editor.plugins.media.htmlToData(getVal('source'))); + this.dataToForm(); + this.panel = ''; + } + + this.moveStates(false, field); + this.preview(); + } + }, + + beforeResize : function() { + this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + }, + + changeSize : function(type) { + var width, height, scale, size; + + if (get('constrain').checked) { + width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10); + height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10); + + if (type == 'width') { + this.height = Math.round((width / this.width) * height); + setVal('height', this.height); + } else { + this.width = Math.round((height / this.height) * width); + setVal('width', this.width); + } + } + }, + + getMediaListHTML : function() { + if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { + var html = ""; + + html += ''; + + return html; + } + + return ""; + }, + + getMediaTypeHTML : function(editor) { + function option(media_type, element) { + if (!editor.schema.getElementRule(element || media_type)) { + return ''; + } + + return '' + } + + var html = ""; + + html += ''; + return html; + }, + + setDefaultDialogSettings : function(editor) { + var defaultDialogSettings = editor.getParam("media_dialog_defaults", {}); + tinymce.each(defaultDialogSettings, function(v, k) { + setVal(k, v); + }); } - } + }; - h += ' - -
    -
    + + + @@ -24,28 +25,21 @@
    {#media_dlg.general} - +
    -
    - +
    - - - + @@ -56,10 +50,10 @@
    + + + - +
     
    - +
    - - + +
    x    x   
    @@ -78,18 +72,18 @@
    {#media_dlg.advanced} - +
    - + - + - + - + + +
    - @@ -100,9 +94,9 @@ - +
    - +
     
    @@ -111,9 +105,209 @@
    +
    + +
    + {#media_dlg.html5_video_options} + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + +
    + + + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.embedded_audio_options} + + + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + +
    + {#media_dlg.html5_audio_options} + + + + + + + + + + + + + + + + +
    + + + + + +
     
    +
    + + + + + +
     
    +
    + +
    + + + + + + + +
    + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    @@ -121,11 +315,11 @@
    {#media_dlg.flash_options} - +
    - @@ -137,7 +331,7 @@ - @@ -150,7 +344,7 @@
    - @@ -160,7 +354,7 @@ - @@ -176,18 +370,18 @@
    - +
    - +
    - +
    - +
    @@ -196,18 +390,18 @@
    - +
    - +
    - +
    - +
    @@ -215,134 +409,38 @@
    - +
    - + - +
    -
    - {#media_dlg.flv_options} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    - - - - - -
    -
    -
    - -
    +
    {#media_dlg.qt_options} - +
    @@ -350,19 +448,19 @@ @@ -370,19 +468,19 @@ @@ -390,19 +488,19 @@ @@ -410,27 +508,27 @@ - - + - - + + - - + + - - + + - - + + - - + + - - + + - +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - - - - - -
     
    + + + + + +
     
    -
    +
    {#media_dlg.wmp_options} - +
    @@ -504,19 +602,19 @@ @@ -524,19 +622,19 @@ @@ -544,86 +642,86 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    -
    +
    {#media_dlg.rmp_options} - +
    @@ -631,19 +729,19 @@ @@ -651,19 +749,19 @@ @@ -671,19 +769,19 @@ @@ -691,10 +789,10 @@ @@ -705,19 +803,19 @@ - - + + - - + + - - + + - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    - +
    - - + +
    @@ -725,11 +823,11 @@
    {#media_dlg.shockwave_options} - +
    - +
    - @@ -738,13 +836,13 @@
    - @@ -754,7 +852,7 @@ - @@ -765,18 +863,18 @@
    - +
    - +
    - +
    - +
    @@ -786,18 +884,18 @@
    - +
    - +
    - +
    - +
    @@ -806,6 +904,13 @@
    + +
    +
    + {#media_dlg.source} + +
    +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf b/library/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf new file mode 100644 index 0000000000000000000000000000000000000000..585d772d6d3c23626fddfa58c4220b056783e148 GIT binary patch literal 19980 zcmV)FK)=63S5pccivR$4+TFbgSX0N>I6O1=CN~KI0x05+ilP_+ai@wRfyT`lc5tI?Yn|XIMxcY?Oy z*i4q}Kw8#jSn_Obf`c7YGj%SaIeEEeMlw?urZ?-e^w~CRSmV&fKqyleX|UvGX>C#3 zoE)=Br={e=1~;-AExG}NwE6l*2D8>`Y#mmLNc-4KHnTn|I@6M&4~#S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cHxMOVs=LxRpGfuRg%fpI_k68zhivGm2I~-@P#WgFO90h|Di2aD0M9ITzQ!%mr5P zD=AT_-V2Xik#XJmWHDLA?;(=aJi@+c4Nn!uT2L6iXdNgF9<2w3;g4R^*BX3Vb`wyT z&TnMjTBY;f7M!KuTK$I`4m}CC1c3JO3-^cLcZGFY+#=ofWy~ECLP<|xzI};^+ z@xll8@;5G_mCH%#r@ku)$BAEx#UsZz&Gtg$Fk(-+frBCvZeVO2PQ`R3pf8m9BIc!{6w4|{QLwP5nv3WpNINQWdDu_My3A-dg%NAz&|4B-~J;6 b==_iWodI83J<=N literal 0 HcmV?d00001 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js old mode 100755 new mode 100644 index f2dbbff2bb..687f548669 --- a/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'·':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(tinymce.isIE&&f.keyCode==9){d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");tinymce.dom.Event.cancel(f)}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?' ':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js old mode 100755 new mode 100644 index e3b078bfae..d492fbefe4 --- a/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js @@ -17,7 +17,7 @@ // Register commands ed.addCommand('mceNonBreaking', function() { - ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '·' : ' '); + ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); }); // Register buttons @@ -25,11 +25,12 @@ if (ed.getParam('nonbreaking_force_tab')) { ed.onKeyDown.add(function(ed, e) { - if (tinymce.isIE && e.keyCode == 9) { + if (e.keyCode == 9) { + e.preventDefault(); + ed.execCommand('mceNonBreaking'); ed.execCommand('mceNonBreaking'); ed.execCommand('mceNonBreaking'); - tinymce.dom.Event.cancel(e); } }); } diff --git a/library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js old mode 100755 new mode 100644 index 9945cd8580..e7f301dbc7 --- a/library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js @@ -1 +1 @@ -(function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(h,g,k){var j,i;j=h.dom.getParent(h.selection.getStart(),function(l){return h.dom.hasClass(l,b)});i=h.dom.getParent(h.selection.getEnd(),function(l){return h.dom.hasClass(l,b)});if(j||i){f._setDisabled(1);return false}else{f._setDisabled(0)}})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file +(function(){var c=tinymce.dom.TreeWalker;var a="contenteditable",d="data-mce-"+a;var e=tinymce.VK;function b(n){var j=n.dom,p=n.selection,r,o="mce_noneditablecaret";r=tinymce.isGecko?"\u200B":"\uFEFF";function m(t){var s;if(t.nodeType===1){s=t.getAttribute(d);if(s&&s!=="inherit"){return s}s=t.contentEditable;if(s!=="inherit"){return s}}return null}function g(s){var t;while(s){t=m(s);if(t){return t==="false"?s:null}s=s.parentNode}}function l(s){while(s){if(s.id===o){return s}s=s.parentNode}}function k(s){var t;if(s){t=new c(s,s);for(s=t.current();s;s=t.next()){if(s.nodeType===3){return s}}}}function f(v,u){var s,t;if(m(v)==="false"){if(j.isBlock(v)){p.select(v);return}}t=j.createRng();if(m(v)==="true"){if(!v.firstChild){v.appendChild(n.getDoc().createTextNode("\u00a0"))}v=v.firstChild;u=true}s=j.create("span",{id:o,"data-mce-bogus":true},r);if(u){v.parentNode.insertBefore(s,v)}else{j.insertAfter(s,v)}t.setStart(s.firstChild,1);t.collapse(true);p.setRng(t);return s}function i(s){var v,t,u;if(s){rng=p.getRng(true);rng.setStartBefore(s);rng.setEndBefore(s);v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true);p.setRng(rng)}else{t=l(p.getStart());while((s=j.get(o))&&s!==u){if(t!==s){v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true)}u=s}}}function q(){var s,w,u,t,v;function x(B,D){var A,F,E,C,z;A=t.startContainer;F=t.startOffset;if(A.nodeType==3){z=A.nodeValue.length;if((F>0&&F0?F-1:F;A=A.childNodes[G];if(A.hasChildNodes()){A=A.firstChild}}else{return !D?B:null}}E=new c(A,B);while(C=E[D?"prev":"next"]()){if(C.nodeType===3&&C.nodeValue.length>0){return}else{if(m(C)==="true"){return C}}}return B}i();u=p.isCollapsed();s=g(p.getStart());w=g(p.getEnd());if(s||w){t=p.getRng(true);if(u){s=s||w;var y=p.getStart();if(v=x(s,true)){f(v,true)}else{if(v=x(s,false)){f(v,false)}else{p.select(s)}}}else{t=p.getRng(true);if(s){t.setStartBefore(s)}if(w){t.setEndAfter(w)}p.setRng(t)}}}function h(y,A){var E=A.keyCode,w,B,C,u;function t(G,F){while(G=G[F?"previousSibling":"nextSibling"]){if(G.nodeType!==3||G.nodeValue.length>0){return G}}}function x(F,G){p.select(F);p.collapse(G)}C=p.getStart();u=p.getEnd();w=g(C)||g(u);if(w&&(E<112||E>124)&&E!=e.DELETE&&E!=e.BACKSPACE){A.preventDefault();if(E==e.LEFT||E==e.RIGHT){var v=E==e.LEFT;if(y.dom.isBlock(w)){var z=v?w.previousSibling:w.nextSibling;var s=new c(z,z);var D=v?s.prev():s.next();x(D,!v)}else{x(w,v)}}}else{if(E==e.LEFT||E==e.RIGHT||E==e.BACKSPACE||E==e.DELETE){B=l(C);if(B){if(E==e.LEFT||E==e.BACKSPACE){w=t(B,true);if(w&&m(w)==="false"){A.preventDefault();if(E==e.LEFT){x(w,true)}else{j.remove(w)}}else{i(B)}}if(E==e.RIGHT||E==e.DELETE){w=t(B);if(w&&m(w)==="false"){A.preventDefault();if(E==e.RIGHT){x(w,false)}else{j.remove(w)}}else{i(B)}}}}}}n.onMouseDown.addToTop(function(s,u){var t=s.selection.getNode();if(m(t)==="false"&&t==u.target){u.preventDefault()}});n.onMouseUp.addToTop(q);n.onKeyDown.addToTop(h);n.onKeyUp.addToTop(q)}tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(h,j){var g,f,i;g=" "+tinymce.trim(h.getParam("noneditable_editable_class","mceEditable"))+" ";f=" "+tinymce.trim(h.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";i=h.getParam("noneditable_regexp");if(i&&!i.length){i=[i]}h.onPreInit.add(function(){b(h);if(i){h.onBeforeSetContent.add(function(l,m){var n=i.length,o=m.content,k=tinymce.trim(f);if(m.format=="raw"){return}while(n--){o=o.replace(i[n],function(){var p=arguments;return''+l.dom.encode(typeof(p[1])==="string"?p[1]:p[0])+""})}m.content=o})}h.parser.addAttributeFilter("class",function(k){var l=k.length,m,n;while(l--){n=k[l];m=" "+n.attr("class")+" ";if(m.indexOf(g)!==-1){n.attr(d,"true")}else{if(m.indexOf(f)!==-1){n.attr(d,"false")}}}});h.serializer.addAttributeFilter(d,function(k,l){var m=k.length,n;while(m--){n=k[m];if(i&&n.attr("data-mce-content")){n.name="#text";n.type=3;n.raw=true;n.value=n.attr("data-mce-content")}else{n.attr(a,null);n.attr(d,null)}}});h.parser.addAttributeFilter(a,function(k,l){var m=k.length,n;while(m--){n=k[m];n.attr(d,n.attr(a));n.attr(a,null)}})})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js old mode 100755 new mode 100644 index 656c971b8c..c87d241bd4 --- a/library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js @@ -9,34 +9,416 @@ */ (function() { - var Event = tinymce.dom.Event; + var TreeWalker = tinymce.dom.TreeWalker; + var externalName = 'contenteditable', internalName = 'data-mce-' + externalName; + 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'; + + // Returns the content editable state of a node "true/false" or null + function getContentEditable(node) { + var contentEditable; + + // Ignore non elements + if (node.nodeType === 1) { + // Check for fake content editable + contentEditable = node.getAttribute(internalName); + if (contentEditable && contentEditable !== "inherit") { + return contentEditable; + } + + // Check for real content editable + contentEditable = node.contentEditable; + if (contentEditable !== "inherit") { + return contentEditable; + } + } + + return null; + }; + + // Returns the noneditable parent or null if there is a editable before it or if it wasn't found + function getNonEditableParent(node) { + var state; + + while (node) { + state = getContentEditable(node); + if (state) { + return state === "false" ? node : null; + } + + node = node.parentNode; + } + }; + + // Get caret container parent for the specified node + function getParentCaretContainer(node) { + while (node) { + if (node.id === caretContainerId) { + return node; + } + + node = node.parentNode; + } + }; + + // Finds the first text node in the specified node + function findFirstTextNode(node) { + var walker; + + if (node) { + walker = new TreeWalker(node, node); + + for (node = walker.current(); node; node = walker.next()) { + if (node.nodeType === 3) { + return node; + } + } + } + }; + + // Insert caret container before/after target or expand selection to include block + function insertCaretContainerOrExpandToBlock(target, before) { + var caretContainer, rng; + + // Select block + if (getContentEditable(target) === "false") { + if (dom.isBlock(target)) { + selection.select(target); + return; + } + } + + rng = dom.createRng(); + + if (getContentEditable(target) === "true") { + if (!target.firstChild) { + target.appendChild(ed.getDoc().createTextNode('\u00a0')); + } + + target = target.firstChild; + before = true; + } + + //caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style:'border: 1px solid red'}, invisibleChar); + caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true}, invisibleChar); + + if (before) { + target.parentNode.insertBefore(caretContainer, target); + } else { + dom.insertAfter(caretContainer, target); + } + + rng.setStart(caretContainer.firstChild, 1); + rng.collapse(true); + selection.setRng(rng); + + return caretContainer; + }; + + // Removes any caret container except the one we might be in + function removeCaretContainer(caretContainer) { + var child, currentCaretContainer, lastContainer; + + if (caretContainer) { + rng = selection.getRng(true); + rng.setStartBefore(caretContainer); + rng.setEndBefore(caretContainer); + + child = findFirstTextNode(caretContainer); + if (child && child.nodeValue.charAt(0) == invisibleChar) { + child = child.deleteData(0, 1); + } + + dom.remove(caretContainer, true); + + selection.setRng(rng); + } else { + currentCaretContainer = getParentCaretContainer(selection.getStart()); + while ((caretContainer = dom.get(caretContainerId)) && caretContainer !== lastContainer) { + if (currentCaretContainer !== caretContainer) { + child = findFirstTextNode(caretContainer); + if (child && child.nodeValue.charAt(0) == invisibleChar) { + child = child.deleteData(0, 1); + } + + dom.remove(caretContainer, true); + } + + lastContainer = caretContainer; + } + } + }; + + // Modifies the selection to include contentEditable false elements or insert caret containers + function moveSelection() { + var nonEditableStart, nonEditableEnd, isCollapsed, rng, element; + + // Checks if there is any contents to the left/right side of caret returns the noneditable element or any editable element if it finds one inside + function hasSideContent(element, left) { + var container, offset, walker, node, len; + + container = rng.startContainer; + offset = rng.startOffset; + + // If endpoint is in middle of text node then expand to beginning/end of element + if (container.nodeType == 3) { + len = container.nodeValue.length; + if ((offset > 0 && offset < len) || (left ? offset == len : offset == 0)) { + return; + } + } else { + // Can we resolve the node by index + if (offset < container.childNodes.length) { + // Browser represents caret position as the offset at the start of an element. When moving right + // this is the element we are moving into so we consider our container to be child node at offset-1 + var pos = !left && offset > 0 ? offset-1 : offset; + container = container.childNodes[pos]; + if (container.hasChildNodes()) { + container = container.firstChild; + } + } else { + // If not then the caret is at the last position in it's container and the caret container should be inserted after the noneditable element + return !left ? element : null; + } + } + + // Walk left/right to look for contents + walker = new TreeWalker(container, element); + while (node = walker[left ? 'prev' : 'next']()) { + if (node.nodeType === 3 && node.nodeValue.length > 0) { + return; + } else if (getContentEditable(node) === "true") { + // Found contentEditable=true element return this one to we can move the caret inside it + return node; + } + } + + return element; + }; + + // Remove any existing caret containers + removeCaretContainer(); + + // Get noneditable start/end elements + isCollapsed = selection.isCollapsed(); + nonEditableStart = getNonEditableParent(selection.getStart()); + nonEditableEnd = getNonEditableParent(selection.getEnd()); + + // Is any fo the range endpoints noneditable + if (nonEditableStart || nonEditableEnd) { + rng = selection.getRng(true); + + // If it's a caret selection then look left/right to see if we need to move the caret out side or expand + if (isCollapsed) { + nonEditableStart = nonEditableStart || nonEditableEnd; + var start = selection.getStart(); + if (element = hasSideContent(nonEditableStart, true)) { + // We have no contents to the left of the caret then insert a caret container before the noneditable element + insertCaretContainerOrExpandToBlock(element, true); + } else if (element = hasSideContent(nonEditableStart, false)) { + // We have no contents to the right of the caret then insert a caret container after the noneditable element + insertCaretContainerOrExpandToBlock(element, false); + } else { + // We are in the middle of a noneditable so expand to select it + selection.select(nonEditableStart); + } + } else { + rng = selection.getRng(true); + + // Expand selection to include start non editable element + if (nonEditableStart) { + rng.setStartBefore(nonEditableStart); + } + + // Expand selection to include end non editable element + if (nonEditableEnd) { + rng.setEndAfter(nonEditableEnd); + } + + selection.setRng(rng); + } + } + }; + + function handleKey(ed, e) { + var keyCode = e.keyCode, nonEditableParent, caretContainer, startElement, endElement; + + function getNonEmptyTextNodeSibling(node, prev) { + while (node = node[prev ? 'previousSibling' : 'nextSibling']) { + if (node.nodeType !== 3 || node.nodeValue.length > 0) { + return node; + } + } + }; + + function positionCaretOnElement(element, start) { + selection.select(element); + selection.collapse(start); + } + + startElement = selection.getStart() + endElement = selection.getEnd(); + + // Disable all key presses in contentEditable=false except delete or backspace + nonEditableParent = getNonEditableParent(startElement) || getNonEditableParent(endElement); + if (nonEditableParent && (keyCode < 112 || keyCode > 124) && keyCode != VK.DELETE && keyCode != VK.BACKSPACE) { + e.preventDefault(); + + // Arrow left/right select the element and collapse left/right + if (keyCode == VK.LEFT || keyCode == VK.RIGHT) { + var left = keyCode == VK.LEFT; + // If a block element find previous or next element to position the caret + if (ed.dom.isBlock(nonEditableParent)) { + var targetElement = left ? nonEditableParent.previousSibling : nonEditableParent.nextSibling; + var walker = new TreeWalker(targetElement, targetElement); + var caretElement = left ? walker.prev() : walker.next(); + positionCaretOnElement(caretElement, !left); + } else { + positionCaretOnElement(nonEditableParent, left); + } + } + } else { + // Is arrow left/right, backspace or delete + if (keyCode == VK.LEFT || keyCode == VK.RIGHT || keyCode == VK.BACKSPACE || keyCode == VK.DELETE) { + caretContainer = getParentCaretContainer(startElement); + if (caretContainer) { + // Arrow left or backspace + if (keyCode == VK.LEFT || keyCode == VK.BACKSPACE) { + nonEditableParent = getNonEmptyTextNodeSibling(caretContainer, true); + + if (nonEditableParent && getContentEditable(nonEditableParent) === "false") { + e.preventDefault(); + + if (keyCode == VK.LEFT) { + positionCaretOnElement(nonEditableParent, true); + } else { + dom.remove(nonEditableParent); + } + } else { + removeCaretContainer(caretContainer); + } + } + + // Arrow right or delete + if (keyCode == VK.RIGHT || keyCode == VK.DELETE) { + nonEditableParent = getNonEmptyTextNodeSibling(caretContainer); + + if (nonEditableParent && getContentEditable(nonEditableParent) === "false") { + e.preventDefault(); + + if (keyCode == VK.RIGHT) { + positionCaretOnElement(nonEditableParent, false); + } else { + dom.remove(nonEditableParent); + } + } else { + removeCaretContainer(caretContainer); + } + } + } + } + } + }; + + ed.onMouseDown.addToTop(function(ed, e){ + // prevent collapsing selection to caret when clicking in a non-editable section + var node = ed.selection.getNode(); + if (getContentEditable(node) === "false" && node == e.target) { + e.preventDefault(); + } + }); + ed.onMouseUp.addToTop(moveSelection); + ed.onKeyDown.addToTop(handleKey); + ed.onKeyUp.addToTop(moveSelection); + }; tinymce.create('tinymce.plugins.NonEditablePlugin', { init : function(ed, url) { - var t = this, editClass, nonEditClass; + var editClass, nonEditClass, nonEditableRegExps; - t.editor = ed; - editClass = ed.getParam("noneditable_editable_class", "mceEditable"); - nonEditClass = ed.getParam("noneditable_noneditable_class", "mceNonEditable"); + editClass = " " + tinymce.trim(ed.getParam("noneditable_editable_class", "mceEditable")) + " "; + nonEditClass = " " + tinymce.trim(ed.getParam("noneditable_noneditable_class", "mceNonEditable")) + " "; - ed.onNodeChange.addToTop(function(ed, cm, n) { - var sc, ec; + // Setup noneditable regexps array + nonEditableRegExps = ed.getParam("noneditable_regexp"); + if (nonEditableRegExps && !nonEditableRegExps.length) { + nonEditableRegExps = [nonEditableRegExps]; + } - // Block if start or end is inside a non editable element - sc = ed.dom.getParent(ed.selection.getStart(), function(n) { - return ed.dom.hasClass(n, nonEditClass); + ed.onPreInit.add(function() { + handleContentEditableSelection(ed); + + if (nonEditableRegExps) { + ed.onBeforeSetContent.add(function(ed, args) { + var i = nonEditableRegExps.length, content = args.content, cls = tinymce.trim(nonEditClass); + + // Don't replace the variables when raw is used for example on undo/redo + if (args.format == "raw") { + return; + } + + while (i--) { + content = content.replace(nonEditableRegExps[i], function() { + var args = arguments; + + return '' + ed.dom.encode(typeof(args[1]) === "string" ? args[1] : args[0]) + ''; + }); + } + + args.content = content; + }); + } + + // Apply contentEditable true/false on elements with the noneditable/editable classes + ed.parser.addAttributeFilter('class', function(nodes) { + var i = nodes.length, className, node; + + while (i--) { + node = nodes[i]; + className = " " + node.attr("class") + " "; + + if (className.indexOf(editClass) !== -1) { + node.attr(internalName, "true"); + } else if (className.indexOf(nonEditClass) !== -1) { + node.attr(internalName, "false"); + } + } }); - ec = ed.dom.getParent(ed.selection.getEnd(), function(n) { - return ed.dom.hasClass(n, nonEditClass); + // Remove internal name + ed.serializer.addAttributeFilter(internalName, function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + + if (nonEditableRegExps && node.attr('data-mce-content')) { + node.name = "#text"; + node.type = 3; + node.raw = true; + node.value = node.attr('data-mce-content'); + } else { + node.attr(externalName, null); + node.attr(internalName, null); + } + } }); - // Block or unblock - if (sc || ec) { - t._setDisabled(1); - return false; - } else - t._setDisabled(0); + // Convert external name into internal name + ed.parser.addAttributeFilter(externalName, function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + node.attr(internalName, node.attr(externalName)); + node.attr(externalName, null); + } + }); }); }, @@ -48,40 +430,6 @@ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', version : tinymce.majorVersion + "." + tinymce.minorVersion }; - }, - - _block : function(ed, e) { - var k = e.keyCode; - - // Don't block arrow keys, pg up/down, and F1-F12 - if ((k > 32 && k < 41) || (k > 111 && k < 124)) - return; - - return Event.cancel(e); - }, - - _setDisabled : function(s) { - var t = this, ed = t.editor; - - tinymce.each(ed.controlManager.controls, function(c) { - c.setDisabled(s); - }); - - if (s !== t.disabled) { - if (s) { - ed.onKeyDown.addToTop(t._block); - ed.onKeyPress.addToTop(t._block); - ed.onKeyUp.addToTop(t._block); - ed.onPaste.addToTop(t._block); - } else { - ed.onKeyDown.remove(t._block); - ed.onKeyPress.remove(t._block); - ed.onKeyUp.remove(t._block); - ed.onPaste.remove(t._block); - } - - t.disabled = s; - } } }); diff --git a/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/css/content.css b/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/css/content.css deleted file mode 100755 index c949d58cc4..0000000000 --- a/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/css/content.css +++ /dev/null @@ -1 +0,0 @@ -.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../img/pagebreak.gif) no-repeat center top;} diff --git a/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js old mode 100755 new mode 100644 index a212f69633..35085e8adc --- a/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='',a="mcePageBreak",c=b.getParam("pagebreak_separator",""),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.settings.content_css!==false){b.dom.loadCSS(d+"/css/content.css")}if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='',a="mcePageBreak",c=b.getParam("pagebreak_separator",""),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js old mode 100755 new mode 100644 index 4e1eb0a7aa..a094c19162 --- a/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js @@ -11,7 +11,7 @@ (function() { tinymce.create('tinymce.plugins.PageBreakPlugin', { init : function(ed, url) { - var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; + var pb = '', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', ''), pbRE; pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); @@ -24,9 +24,6 @@ ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); ed.onInit.add(function() { - if (ed.settings.content_css !== false) - ed.dom.loadCSS(url + "/css/content.css"); - if (ed.theme.onResolveName) { ed.theme.onResolveName.add(function(th, o) { if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) diff --git a/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/trans.gif b/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/trans.gif deleted file mode 100755 index 388486517fa8da13ebd150e8f65d5096c3e10c3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 ncmZ?wbhEHbWMp7un7{x9ia%KxMSyG_5FaGNz{KRj$Y2csb)f_x diff --git a/library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js old mode 100755 new mode 100644 index 3e7b2504f1..e47a5c630a --- a/library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js @@ -1 +1 @@ -(function(){var c=tinymce.each,d=null,a={paste_auto_cleanup_on_paste:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_notifyalways:false,paste_text_linebreaktype:"p",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(e,f){return e.getParam(f,a[f])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(e,f){var g=this;g.editor=e;g.url=f;g.onPreProcess=new tinymce.util.Dispatcher(g);g.onPostProcess=new tinymce.util.Dispatcher(g);g.onPreProcess.add(g._preProcess);g.onPostProcess.add(g._postProcess);g.onPreProcess.add(function(j,k){e.execCallback("paste_preprocess",j,k)});g.onPostProcess.add(function(j,k){e.execCallback("paste_postprocess",j,k)});e.pasteAsPlainText=false;function i(l,j){var k=e.dom;g.onPreProcess.dispatch(g,l);l.node=k.create("div",0,l.content);g.onPostProcess.dispatch(g,l);l.content=e.serializer.serialize(l.node,{getInner:1});if((!j)&&(e.pasteAsPlainText)){g._insertPlainText(e,k,l.content);if(!b(e,"paste_text_sticky")){e.pasteAsPlainText=false;e.controlManager.setActive("pastetext",false)}}else{if(/<(p|h[1-6]|ul|ol)/.test(l.content)){g._insertBlockContent(e,k,l.content)}else{g._insert(l.content)}}}e.addCommand("mceInsertClipboardContent",function(j,k){i(k,true)});if(!b(e,"paste_text_use_dialog")){e.addCommand("mcePasteText",function(k,j){var l=tinymce.util.Cookie;e.pasteAsPlainText=!e.pasteAsPlainText;e.controlManager.setActive("pastetext",e.pasteAsPlainText);if((e.pasteAsPlainText)&&(!l.get("tinymcePasteText"))){if(b(e,"paste_text_sticky")){e.windowManager.alert(e.translate("paste.plaintext_mode_sticky"))}else{e.windowManager.alert(e.translate("paste.plaintext_mode_sticky"))}if(!b(e,"paste_text_notifyalways")){l.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}e.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});e.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function h(s){var m,q,k,l=e.selection,p=e.dom,r=e.getBody(),j;if(e.pasteAsPlainText&&(s.clipboardData||p.doc.dataTransfer)){s.preventDefault();i({content:(s.clipboardData||p.doc.dataTransfer).getData("Text")},true);return}if(p.get("_mcePaste")){return}m=p.add(r,"div",{id:"_mcePaste","class":"mcePaste"},"\uFEFF");if(r!=e.getDoc().body){j=p.getPos(e.selection.getStart(),r).y}else{j=r.scrollTop}p.setStyles(m,{position:"absolute",left:-10000,top:j,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){k=p.doc.body.createTextRange();k.moveToElementText(m);k.execCommand("Paste");p.remove(m);if(m.innerHTML==="\uFEFF"){e.execCommand("mcePasteWord");s.preventDefault();return}i({content:m.innerHTML});return tinymce.dom.Event.cancel(s)}else{function o(n){n.preventDefault()}p.bind(e.getDoc(),"mousedown",o);p.bind(e.getDoc(),"keydown",o);q=e.selection.getRng();m=m.firstChild;k=e.getDoc().createRange();k.setStart(m,0);k.setEnd(m,1);l.setRng(k);window.setTimeout(function(){var t="",n=p.select("div.mcePaste");c(n,function(u){c(p.select("div.mcePaste",u),function(v){p.remove(v,1)});c(p.select("span.Apple-style-span",u),function(v){p.remove(v,1)});t+=u.innerHTML});c(n,function(u){p.remove(u)});if(q){l.setRng(q)}i({content:t});p.unbind(e.getDoc(),"mousedown",o);p.unbind(e.getDoc(),"keydown",o)},0)}}if(b(e,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){e.onKeyDown.add(function(j,k){if(((tinymce.isMac?k.metaKey:k.ctrlKey)&&k.keyCode==86)||(k.shiftKey&&k.keyCode==45)){h(k)}})}else{e.onPaste.addToTop(function(j,k){return h(k)})}}if(b(e,"paste_block_drop")){e.onInit.add(function(){e.dom.bind(e.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(j){j.preventDefault();j.stopPropagation();return false})})}g._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(i,f){var l=this.editor,k=f.content,q=tinymce.grep,p=tinymce.explode,g=tinymce.trim,m,j;function e(h){c(h,function(o){if(o.constructor==RegExp){k=k.replace(o,"")}else{k=k.replace(o[0],o[1])}})}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(k)||f.wordContent){f.wordContent=true;e([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(l,"paste_convert_headers_to_strong")){k=k.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ")}if(b(l,"paste_convert_middot_lists")){e([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"]])}e([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{m=k.length;k=k.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(m!=k.length);if(b(l,"paste_retain_style_properties").replace(/^none$/i,"").length==0){k=k.replace(/<\/?span[^>]*>/gi,"")}else{e([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(u,h,t){var v=[],o=0,r=p(g(t).replace(/"/gi,"'"),";");c(r,function(s){var w,y,z=p(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":v[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":v[o++]="text-align:"+y;return;case"vert-align":v[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":v[o++]="color:"+y;return;case"mso-background":case"mso-highlight":v[o++]="background:"+y;return;case"mso-default-height":v[o++]="min-height:"+x(y);return;case"mso-default-width":v[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":v[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){v[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){v[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}v[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+v.join(";")+'"'}else{return h}}]])}}if(b(l,"paste_convert_headers_to_strong")){e([[/]*>/gi,"

    "],[/<\/h[1-6][^>]*>/gi,"

    "]])}j=b(l,"paste_strip_class_attributes");if(j!=="none"){function n(r,o){if(j==="all"){return""}var h=q(p(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(s){return(/^(?!mso)/i.test(s))});return h.length?' class="'+h.join(" ")+'"':""}k=k.replace(/ class="([^"]+)"/gi,n);k=k.replace(/ class=(\w+)/gi,n)}if(b(l,"paste_remove_spans")){k=k.replace(/<\/?span[^>]*>/gi,"")}f.content=k},_postProcess:function(h,j){var g=this,f=g.editor,i=f.dom,e;if(j.wordContent){c(i.select("a",j.node),function(k){if(!k.href||k.href.indexOf("#_Toc")!=-1){i.remove(k,1)}});if(b(f,"paste_convert_middot_lists")){g._convertLists(h,j)}e=b(f,"paste_retain_style_properties");if((tinymce.is(e,"string"))&&(e!=="all")&&(e!=="*")){e=tinymce.explode(e.replace(/^none$/i,""));c(i.select("*",j.node),function(n){var o={},l=0,m,p,k;if(e){for(m=0;m0){i.setStyles(n,o)}else{if(n.nodeName=="SPAN"&&!n.className){i.remove(n,true)}}})}}if(b(f,"paste_remove_styles")||(b(f,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(i.select("*[style]",j.node),function(k){k.removeAttribute("style");k.removeAttribute("_mce_style")})}else{if(tinymce.isWebKit){c(i.select("*",j.node),function(k){k.removeAttribute("_mce_style")})}}},_convertLists:function(h,f){var j=h.editor.dom,i,m,e=-1,g,n=[],l,k;c(j.select("p",f.node),function(u){var r,v="",t,s,o,q;for(r=u.firstChild;r&&r.nodeType==3;r=r.nextSibling){v+=r.nodeValue}v=u.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(v)){t="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(v)){t="ol"}if(t){g=parseFloat(u.style.marginLeft||0);if(g>e){n.push(g)}if(!i||t!=l){i=j.create(t);j.insertAfter(i,u)}else{if(g>e){i=m.appendChild(j.create(t))}else{if(g]*>/gi,"");if(t=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){j.remove(w)}else{if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){j.remove(w)}}});s=u.innerHTML;if(t=="ul"){s=u.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,"")}else{s=u.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}m=i.appendChild(j.create("li",0,s));j.remove(u);e=g;l=t}else{i=e=0}});k=f.node.innerHTML;if(k.indexOf("__MCE_ITEM__")!=-1){f.node.innerHTML=k.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(l,h,m){var f,j,g=l.selection,q,n,e,o,i,k="mce_marker";function p(t){var s;if(tinymce.isIE){s=l.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(false);s.select()}else{g.select(t,1);g.collapse(false)}}this._insert(' ',1);j=h.get(k);f=h.getParent(j,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(f&&!/TD|TH/.test(f.nodeName)){j=h.split(f,j);c(h.create("div",0,m).childNodes,function(r){q=j.parentNode.insertBefore(r.cloneNode(true),j)});p(q)}else{h.setOuterHTML(j,m);g.select(l.getBody(),1);g.collapse(0)}while(n=h.get(k)){h.remove(n)}n=g.getStart();e=h.getViewPort(l.getWin());o=l.dom.getPos(n).y;i=n.clientHeight;if(oe.y+e.h){l.getDoc().body.scrollTop=o0)){if(!d){d=("34,quot,38,amp,39,apos,60,lt,62,gt,"+j.serializer.settings.entities).split(",")}if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(v)){q([/[\n\r]+/g])}else{q([/\r+/g])}q([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/&(#\d+|[a-z0-9]{1,10});/gi,function(i,h){if(h.charAt(0)==="#"){return String.fromCharCode(h.slice(1))}else{return((i=y(d,h))>0)?String.fromCharCode(d[i-1]):" "}}],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"],/^\s+|\s+$/g]);v=x.encode(v);if(!s.isCollapsed()){z.execCommand("Delete",false,null)}if(m(o,"array")||(m(o,"array"))){q(o)}else{if(m(o,"string")){q(new RegExp(o,"gi"))}}if(g=="none"){q([[/\n+/g," "]])}else{if(g=="br"){q([[/\n/g,"
    "]])}else{q([/^\s+|\s+$/g,[/\n\n/g,"

    "],[/\n/g,"
    "]])}}if((l=v.indexOf("

    "))!=-1){k=v.lastIndexOf("

    ");r=s.getNode();e=[];do{if(r.nodeType==1){if(r.nodeName=="TD"||r.nodeName=="BODY"){break}e[e.length]=r}}while(r=r.parentNode);if(e.length>0){p=v.substring(0,l);f="";for(t=0,u=e.length;t";f+="<"+e[e.length-t-1].nodeName.toLowerCase()+">"}if(l==k){v=p+f+v.substring(l+7)}else{v=p+v.substring(l+4,k+4)+f+v.substring(k+7)}}}j.execCommand("mceInsertRawHTML",false,v+' ');window.setTimeout(function(){var h=x.get("_plain_text_marker"),B,i,A,w;s.select(h,false);z.execCommand("Delete",false,null);h=null;B=s.getStart();i=x.getViewPort(n);A=x.getPos(B).y;w=B.clientHeight;if((Ai.y+i.h)){z.body.scrollTop=A")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="

    "+o.encode(r).replace(/\r?\n\r?\n/g,"

    ").replace(/\r?\n/g,"
    ")+"

    "}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9){d([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g,"$1"]]);d([[/

    /g,"

    "],[/
    /g," "],[/

    /g,"
    "]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,"

    "],[/<\/h[1-6][^>]*>/gi,"

    "]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"
    "]])}else{if(e=="p"){h([[/\n+/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"]])}else{h([[/\n\n/g,"

    "],[/^(.*<\/p>)(

    )$/,"

    $1"],[/\n/g,"
    "]])}}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js old mode 100755 new mode 100644 index 4c3bf6542e..73fe7fe9a4 --- a/library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js @@ -10,9 +10,9 @@ (function() { var each = tinymce.each, - entities = null, defs = { paste_auto_cleanup_on_paste : true, + paste_enable_default_filters : true, paste_block_drop : false, paste_retain_style_properties : "none", paste_strip_class_attributes : "mso", @@ -25,8 +25,9 @@ paste_dialog_height : "400", paste_text_use_dialog : false, paste_text_sticky : false, + paste_text_sticky_default : false, paste_text_notifyalways : false, - paste_text_linebreaktype : "p", + paste_text_linebreaktype : "combined", paste_text_replacements : [ [/\u2026/g, "..."], [/[\x93\x94\u201c\u201d]/g, '"'], @@ -63,13 +64,19 @@ ed.execCallback('paste_postprocess', pl, o); }); + ed.onKeyDown.addToTop(function(ed, e) { + // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that + if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) + return false; // Stop other listeners + }); + // Initialize plain text flag - ed.pasteAsPlainText = false; + ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default'); // This function executes the process handlers and inserts the contents // force_rich overrides plain text mode set by user, important for pasting with execCommand function process(o, force_rich) { - var dom = ed.dom; + var dom = ed.dom, rng; // Execute pre process handlers t.onPreProcess.dispatch(t, o); @@ -77,23 +84,31 @@ // Create DOM structure o.node = dom.create('div', 0, o.content); + // If pasting inside the same element and the contents is only one block + // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element + if (tinymce.isGecko) { + rng = ed.selection.getRng(true); + if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) { + // Is only one block node and it doesn't contain word stuff + if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1) + dom.remove(o.node.firstChild, true); + } + } + // Execute post process handlers t.onPostProcess.dispatch(t, o); // Serialize content - o.content = ed.serializer.serialize(o.node, {getInner : 1}); + o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''}); // Plain text option active? if ((!force_rich) && (ed.pasteAsPlainText)) { - t._insertPlainText(ed, dom, o.content); + t._insertPlainText(o.content); if (!getParam(ed, "paste_text_sticky")) { ed.pasteAsPlainText = false; ed.controlManager.setActive("pastetext", false); } - } else if (/<(p|h[1-6]|ul|ol)/.test(o.content)) { - // Handle insertion of contents containing block elements separately - t._insertBlockContent(ed, dom, o.content); } else { t._insert(o.content); } @@ -115,7 +130,7 @@ if (getParam(ed, "paste_text_sticky")) { ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky')); } else { - ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky')); + ed.windowManager.alert(ed.translate('paste.plaintext_mode')); } if (!getParam(ed, "paste_text_notifyalways")) { @@ -132,38 +147,46 @@ // hidden div and placing the caret inside it and after the browser paste // is done it grabs that contents and processes that function grabContent(e) { - var n, or, rng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY; + var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent; // Check if browser supports direct plaintext access - if (ed.pasteAsPlainText && (e.clipboardData || dom.doc.dataTransfer)) { - e.preventDefault(); - process({content : (e.clipboardData || dom.doc.dataTransfer).getData('Text')}, true); - return; + if (e.clipboardData || dom.doc.dataTransfer) { + textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text'); + + if (ed.pasteAsPlainText) { + e.preventDefault(); + process({content : dom.encode(textContent).replace(/\r?\n/g, '
    ')}); + return; + } } if (dom.get('_mcePaste')) return; // Create container to paste into - n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste'}, '\uFEFF'); + n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF'); // If contentEditable mode we need to find out the position of the closest element if (body != ed.getDoc().body) posY = dom.getPos(ed.selection.getStart(), body).y; else - posY = body.scrollTop; + posY = body.scrollTop + dom.getViewPort(ed.getWin()).y; // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles + // If also needs to be in view on IE or the paste would fail dom.setStyles(n, { position : 'absolute', - left : -10000, - top : posY, + left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div + top : posY - 25, width : 1, height : 1, overflow : 'hidden' }); if (tinymce.isIE) { + // Store away the old range + oldRng = sel.getRng(); + // Select the container rng = dom.doc.body.createTextRange(); rng.moveToElementText(n); @@ -174,14 +197,23 @@ // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due // to IE security settings so we pass the junk though better than nothing right - if (n.innerHTML === '\uFEFF') { + if (n.innerHTML === '\uFEFF\uFEFF') { ed.execCommand('mcePasteWord'); e.preventDefault(); return; } - // Process contents - process({content : n.innerHTML}); + // Restore the old range and clear the contents before pasting + sel.setRng(oldRng); + sel.setContent(''); + + // For some odd reason we need to detach the the mceInsertContent call from the paste event + // It's like IE has a reference to the parent element that you paste in and the selection gets messed up + // when it tries to restore the selection + setTimeout(function() { + // Process contents + process({content : n.innerHTML}); + }, 0); // Block the real paste event return tinymce.dom.Event.cancel(e); @@ -196,34 +228,52 @@ or = ed.selection.getRng(); - // Move caret into hidden div + // Move select contents inside DIV n = n.firstChild; rng = ed.getDoc().createRange(); rng.setStart(n, 0); - rng.setEnd(n, 1); + rng.setEnd(n, 2); sel.setRng(rng); // Wait a while and grab the pasted contents window.setTimeout(function() { - var h = '', nl = dom.select('div.mcePaste'); + var h = '', nl; - // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string - each(nl, function(n) { - // WebKit duplicates the divs so we need to remove them - each(dom.select('div.mcePaste', n), function(n) { - dom.remove(n, 1); + // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit + if (!dom.select('div.mcePaste > div.mcePaste').length) { + nl = dom.select('div.mcePaste'); + + // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string + each(nl, function(n) { + var child = n.firstChild; + + // WebKit inserts a DIV container with lots of odd styles + if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) { + dom.remove(child, 1); + } + + // Remove apply style spans + each(dom.select('span.Apple-style-span', n), function(n) { + dom.remove(n, 1); + }); + + // Remove bogus br elements + each(dom.select('br[data-mce-bogus]', n), function(n) { + dom.remove(n); + }); + + // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV + if (n.parentNode.className != 'mcePaste') + h += n.innerHTML; }); - - // Remove apply style spans - each(dom.select('span.Apple-style-span', n), function(n) { - dom.remove(n, 1); - }); - - h += n.innerHTML; - }); + } else { + // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc + // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same + h = '

    ' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '

    ').replace(/\r?\n/g, '
    ') + '

    '; + } // Remove the nodes - each(nl, function(n) { + each(dom.select('div.mcePaste'), function(n) { dom.remove(n); }); @@ -244,7 +294,7 @@ if (getParam(ed, "paste_auto_cleanup_on_paste")) { // Is it's Opera or older FF use key handler if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) { - ed.onKeyDown.add(function(ed, e) { + ed.onKeyDown.addToTop(function(ed, e) { if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) grabContent(e); }); @@ -256,17 +306,19 @@ } } - // Block all drag/drop events - if (getParam(ed, "paste_block_drop")) { - ed.onInit.add(function() { + ed.onInit.add(function() { + ed.controlManager.setActive("pastetext", ed.pasteAsPlainText); + + // Block all drag/drop events + if (getParam(ed, "paste_block_drop")) { ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) { e.preventDefault(); e.stopPropagation(); return false; }); - }); - } + } + }); // Add legacy support t._legacySupport(); @@ -283,8 +335,6 @@ }, _preProcess : function(pl, o) { - //console.log('Before preprocess:' + o.content); - var ed = this.editor, h = o.content, grep = tinymce.grep, @@ -292,6 +342,8 @@ trim = tinymce.trim, len, stripClass; + //console.log('Before preprocess:' + o.content); + function process(items) { each(items, function(v) { // Remove or replace @@ -301,6 +353,23 @@ h = h.replace(v[0], v[1]); }); } + + if (ed.settings.paste_enable_default_filters == false) { + return; + } + + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser + if (tinymce.isIE && document.documentMode >= 9) { + // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser + process([[/(?:
     [\s\r\n]+|
    )*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\s\r\n]+|
    )*/g, '$1']]); + + // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break + process([ + [/

    /g, '

    '], // Replace multiple BR elements with uppercase BR to keep them intact + [/
    /g, ' '], // Replace single br elements with space since they are word wrap BR:s + [/

    /g, '
    '] // Replace back the double brs but into a single BR + ]); + } // Detect Word content and process it more aggressive if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) { @@ -320,7 +389,8 @@ if (getParam(ed, "paste_convert_middot_lists")) { process([ [//gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker - [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol spans to item markers + [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers + [/(]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF) ]); } @@ -472,6 +542,11 @@ ]); } + process([ + // Copy paste from Java like Open Office will produce this junk on FF + [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, ''] + ]); + // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso"). // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation. stripClass = getParam(ed, "paste_strip_class_attributes"); @@ -491,7 +566,7 @@ }; h = h.replace(/ class="([^"]+)"/gi, removeClasses); - h = h.replace(/ class=(\w+)/gi, removeClasses); + h = h.replace(/ class=([\-\w]+)/gi, removeClasses); } // Remove spans option @@ -510,6 +585,10 @@ _postProcess : function(pl, o) { var t = this, ed = t.editor, dom = ed.dom, styleProps; + if (ed.settings.paste_enable_default_filters == false) { + return; + } + if (o.wordContent) { // Remove named anchors or TOC links each(dom.select('a', o.node), function(a) { @@ -561,14 +640,14 @@ if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) { each(dom.select('*[style]', o.node), function(el) { el.removeAttribute('style'); - el.removeAttribute('_mce_style'); + el.removeAttribute('data-mce-style'); }); } else { if (tinymce.isWebKit) { // We need to compress the styles on WebKit since if you paste it will become // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles each(dom.select('*', o.node), function(el) { - el.removeAttribute('_mce_style'); + el.removeAttribute('data-mce-style'); }); } } @@ -591,11 +670,11 @@ val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); // Detect unordered lists look for bullets - if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(val)) + if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val)) type = 'ul'; // Detect ordered lists 1., a. or ixv. - if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(val)) + if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val)) type = 'ol'; // Check if node value matches the list pattern: o   @@ -625,9 +704,9 @@ var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); // Remove span with the middot or the number - if (type == 'ul' && /^[\u2022\u00b7\u00a7\u00d8o]/.test(html)) + if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html)) dom.remove(span); - else if (/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) + else if (/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) dom.remove(span); }); @@ -635,7 +714,7 @@ // Remove middot/list items if (type == 'ul') - html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/, ''); + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/, ''); else html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); @@ -655,65 +734,6 @@ o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); }, - /** - * This method will split the current block parent and insert the contents inside the split position. - * This logic can be improved so text nodes at the start/end remain in the start/end block elements - */ - _insertBlockContent : function(ed, dom, content) { - var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight, markerId = 'mce_marker'; - - function select(n) { - var r; - - if (tinymce.isIE) { - r = ed.getDoc().body.createTextRange(); - r.moveToElementText(n); - r.collapse(false); - r.select(); - } else { - sel.select(n, 1); - sel.collapse(false); - } - } - - // Insert a marker for the caret position - this._insert(' ', 1); - marker = dom.get(markerId); - parentBlock = dom.getParent(marker, 'p,h1,h2,h3,h4,h5,h6,ul,ol,th,td'); - - // If it's a parent block but not a table cell - if (parentBlock && !/TD|TH/.test(parentBlock.nodeName)) { - // Split parent block - marker = dom.split(parentBlock, marker); - - // Insert nodes before the marker - each(dom.create('div', 0, content).childNodes, function(n) { - last = marker.parentNode.insertBefore(n.cloneNode(true), marker); - }); - - // Move caret after marker - select(last); - } else { - dom.setOuterHTML(marker, content); - sel.select(ed.getBody(), 1); - sel.collapse(0); - } - - // Remove marker if it's left - while (elm = dom.get(markerId)) - dom.remove(elm); - - // Get element, position and height - elm = sel.getStart(); - vp = dom.getViewPort(ed.getWin()); - y = ed.dom.getPos(elm).y; - elmHeight = elm.clientHeight; - - // Is element within viewport if not then scroll it into view - if (y < vp.y || y + elmHeight > vp.y + vp.h) - ed.getDoc().body.scrollTop = y < vp.y ? y : y - vp.h + 25; - }, - /** * Inserts the specified contents at the caret position. */ @@ -724,8 +744,7 @@ if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer) ed.getDoc().execCommand('Delete', false, null); - // It's better to use the insertHTML method on Gecko since it will combine paragraphs correctly before inserting the contents - ed.execCommand(tinymce.isGecko ? 'insertHTML' : 'mceInsertContent', false, h, {skip_undo : skip_undo}); + ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo}); }, /** @@ -737,31 +756,24 @@ * plugin, and requires minimal changes to add the new functionality. * Speednet - June 2009 */ - _insertPlainText : function(ed, dom, h) { - var i, len, pos, rpos, node, breakElms, before, after, - w = ed.getWin(), - d = ed.getDoc(), - sel = ed.selection, - is = tinymce.is, - inArray = tinymce.inArray, + _insertPlainText : function(content) { + var ed = this.editor, linebr = getParam(ed, "paste_text_linebreaktype"), - rl = getParam(ed, "paste_text_replacements"); + rl = getParam(ed, "paste_text_replacements"), + is = tinymce.is; function process(items) { each(items, function(v) { if (v.constructor == RegExp) - h = h.replace(v, ""); + content = content.replace(v, ""); else - h = h.replace(v[0], v[1]); + content = content.replace(v[0], v[1]); }); }; - if ((typeof(h) === "string") && (h.length > 0)) { - if (!entities) - entities = ("34,quot,38,amp,39,apos,60,lt,62,gt," + ed.serializer.settings.entities).split(","); - + if ((typeof(content) === "string") && (content.length > 0)) { // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line - if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(h)) { + if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) { process([ /[\n\r]+/g ]); @@ -778,128 +790,47 @@ [/<\/t[dh]>\s*]*>/gi, "\t"], // Table cells get tabs betweem them /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags [/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*) - [ - // HTML entity - /&(#\d+|[a-z0-9]{1,10});/gi, - - // Replace with actual character - function(e, s) { - if (s.charAt(0) === "#") { - return String.fromCharCode(s.slice(1)); - } - else { - return ((e = inArray(entities, s)) > 0)? String.fromCharCode(entities[e-1]) : " "; - } - } - ], - [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"], // Cool little RegExp deletes whitespace around linebreak chars. - [/\n{3,}/g, "\n\n"], // Max. 2 consecutive linebreaks - /^\s+|\s+$/g // Trim the front & back + [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"],// Cool little RegExp deletes whitespace around linebreak chars. + [/\n{3,}/g, "\n\n"] // Max. 2 consecutive linebreaks ]); - h = dom.encode(h); - - // Delete any highlighted text before pasting - if (!sel.isCollapsed()) { - d.execCommand("Delete", false, null); - } + content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content)); // Perform default or custom replacements - if (is(rl, "array") || (is(rl, "array"))) { + if (is(rl, "array")) { process(rl); - } - else if (is(rl, "string")) { + } else if (is(rl, "string")) { process(new RegExp(rl, "gi")); } // Treat paragraphs as specified in the config if (linebr == "none") { + // Convert all line breaks to space process([ [/\n+/g, " "] ]); - } - else if (linebr == "br") { + } else if (linebr == "br") { + // Convert all line breaks to
    process([ [/\n/g, "
    "] ]); - } - else { + } else if (linebr == "p") { + // Convert all line breaks to

    ...

    + process([ + [/\n+/g, "

    "], + [/^(.*<\/p>)(

    )$/, '

    $1'] + ]); + } else { + // defaults to "combined" + // Convert single line breaks to
    and double line breaks to

    ...

    process([ - /^\s+|\s+$/g, [/\n\n/g, "

    "], + [/^(.*<\/p>)(

    )$/, '

    $1'], [/\n/g, "
    "] ]); } - // This next piece of code handles the situation where we're pasting more than one paragraph of plain - // text, and we are pasting the content into the middle of a block node in the editor. The block - // node gets split at the selection point into "Para A" and "Para B" (for the purposes of explaining). - // The first paragraph of the pasted text is appended to "Para A", and the last paragraph of the - // pasted text is prepended to "Para B". Any other paragraphs of pasted text are placed between - // "Para A" and "Para B". This code solves a host of problems with the original plain text plugin and - // now handles styles correctly. (Pasting plain text into a styled paragraph is supposed to make the - // plain text take the same style as the existing paragraph.) - if ((pos = h.indexOf("

    ")) != -1) { - rpos = h.lastIndexOf("

    "); - node = sel.getNode(); - breakElms = []; // Get list of elements to break - - do { - if (node.nodeType == 1) { - // Don't break tables and break at body - if (node.nodeName == "TD" || node.nodeName == "BODY") { - break; - } - - breakElms[breakElms.length] = node; - } - } while (node = node.parentNode); - - // Are we in the middle of a block node? - if (breakElms.length > 0) { - before = h.substring(0, pos); - after = ""; - - for (i=0, len=breakElms.length; i"; - after += "<" + breakElms[breakElms.length-i-1].nodeName.toLowerCase() + ">"; - } - - if (pos == rpos) { - h = before + after + h.substring(pos+7); - } - else { - h = before + h.substring(pos+4, rpos+4) + after + h.substring(rpos+7); - } - } - } - - // Insert content at the caret, plus add a marker for repositioning the caret - ed.execCommand("mceInsertRawHTML", false, h + ' '); - - // Reposition the caret to the marker, which was placed immediately after the inserted content. - // Needs to be done asynchronously (in window.setTimeout) or else it doesn't work in all browsers. - // The second part of the code scrolls the content up if the caret is positioned off-screen. - // This is only necessary for WebKit browsers, but it doesn't hurt to use for all. - window.setTimeout(function() { - var marker = dom.get('_plain_text_marker'), - elm, vp, y, elmHeight; - - sel.select(marker, false); - d.execCommand("Delete", false, null); - marker = null; - - // Get element, position and height - elm = sel.getStart(); - vp = dom.getViewPort(w); - y = dom.getPos(elm).y; - elmHeight = elm.clientHeight; - - // Is element within viewport if not then scroll it into view - if ((y < vp.y) || (y + elmHeight > vp.y + vp.h)) { - d.body.scrollTop = y < vp.y ? y : y - vp.h + 25; - } - }, 0); + ed.execCommand('mceInsertContent', false, content); } }, diff --git a/library/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js b/library/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js b/library/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js b/library/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js old mode 100755 new mode 100644 index eeac778960..bc74daf85c --- a/library/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js @@ -1,5 +1 @@ -tinyMCE.addI18n('en.paste_dlg',{ -text_title:"Use CTRL+V on your keyboard to paste the text into the window.", -text_linebreaks:"Keep linebreaks", -word_title:"Use CTRL+V on your keyboard to paste the text into the window." -}); \ No newline at end of file +tinyMCE.addI18n('en.paste_dlg',{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."}); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm b/library/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm b/library/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/preview/example.html b/library/tinymce/jscripts/tiny_mce/plugins/preview/example.html old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js b/library/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/preview/preview.html b/library/tinymce/jscripts/tiny_mce/plugins/preview/preview.html old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin_src.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js old mode 100755 new mode 100644 index cd9c985b7a..165bc12df5 --- a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){window.focus();a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js old mode 100755 new mode 100644 index 1433a06a4a..4c87e8fa79 --- a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js @@ -12,6 +12,10 @@ tinymce.create('tinymce.plugins.SearchReplacePlugin', { init : function(ed, url) { function open(m) { + // Keep IE from writing out the f/r character to the editor + // instance while initializing a new dialog. See: #3131190 + window.focus(); + ed.windowManager.open({ file : url + '/searchreplace.htm', width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), diff --git a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js old mode 100755 new mode 100644 index c0a6243297..80284b9f3f --- a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js @@ -2,14 +2,18 @@ tinyMCEPopup.requireLangPack(); var SearchReplaceDialog = { init : function(ed) { - var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); + var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); - this.switchMode(m); + t.switchMode(m); f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string"); // Focus input field f[m + '_panel_searchstring'].focus(); + + mcTabs.onChange.add(function(tab_id, panel_id) { + t.switchMode(tab_id.substring(0, tab_id.indexOf('_'))); + }); }, switchMode : function(m) { @@ -42,21 +46,23 @@ var SearchReplaceDialog = { ca = f[m + '_panel_casesensitivebox'].checked; rs = f['replace_panel_replacestring'].value; + if (tinymce.isIE) { + r = ed.getDoc().selection.createRange(); + } + if (s == '') return; function fix() { // Correct Firefox graphics glitches + // TODO: Verify if this is actually needed any more, maybe it was for very old FF versions? r = se.getRng().cloneRange(); ed.getDoc().execCommand('SelectAll', false, null); se.setRng(r); }; function replace() { - if (tinymce.isIE) - ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE - else - ed.getDoc().execCommand('InsertHTML', false, rs); + ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE }; // IE flags @@ -70,6 +76,9 @@ var SearchReplaceDialog = { ed.selection.collapse(true); if (tinymce.isIE) { + ed.focus(); + r = ed.getDoc().selection.createRange(); + while (r.findText(s, b ? -1 : 1, fl)) { r.scrollIntoView(); r.select(); @@ -111,6 +120,9 @@ var SearchReplaceDialog = { return; if (tinymce.isIE) { + ed.focus(); + r = ed.getDoc().selection.createRange(); + if (r.findText(s, b ? -1 : 1, fl)) { r.scrollIntoView(); r.select(); diff --git a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js old mode 100755 new mode 100644 index 370959afa3..8a65900977 --- a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js @@ -1,16 +1 @@ -tinyMCE.addI18n('en.searchreplace_dlg',{ -searchnext_desc:"Find again", -notfound:"The search has been completed. The search string could not be found.", -search_title:"Find", -replace_title:"Find/Replace", -allreplaced:"All occurrences of the search string were replaced.", -findwhat:"Find what", -replacewith:"Replace with", -direction:"Direction", -up:"Up", -down:"Down", -mcase:"Match case", -findnext:"Find next", -replace:"Replace", -replaceall:"Replace all" -}); \ No newline at end of file +tinyMCE.addI18n('en.searchreplace_dlg',{findwhat:"Find What",replacewith:"Replace with",direction:"Direction",up:"Up",down:"Down",mcase:"Match Case",findnext:"Find Next",allreplaced:"All occurrences of the search string were replaced.","searchnext_desc":"Find Again",notfound:"The search has been completed. The search string could not be found.","search_title":"Find","replace_title":"Find/Replace",replaceall:"Replace All",replace:"Replace"}); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm old mode 100755 new mode 100644 index d0424cfc9b..5a22d8aa4d --- a/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm @@ -8,27 +8,28 @@ - + +

    - +
    - +
    - - - +
    + + @@ -39,7 +40,7 @@ - - - - - -
    {#style_dlg.padding} - +
    @@ -288,11 +330,14 @@ @@ -300,11 +345,14 @@ @@ -312,11 +360,14 @@ @@ -324,11 +375,14 @@ @@ -341,7 +395,7 @@
    {#style_dlg.margin} -
     
    - +
    - +
      + + +
    - +
    - +
      + + +
    - +
    - +
      + + +
    - +
    - +
      + + +
    +
    @@ -349,11 +403,14 @@ @@ -361,11 +418,14 @@ @@ -373,11 +433,14 @@ @@ -385,11 +448,14 @@ @@ -401,131 +467,148 @@
    -
     
    - +
    - +
      + + +
    - +
    - +
      + + +
    - +
    - +
      + + +
    - +
    - +
      + + +
    - - - - - - - - - +
    + {#style_dlg.border} +
      {#style_dlg.style} {#style_dlg.width} {#style_dlg.color}
    + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - -
      {#style_dlg.style} {#style_dlg.width} {#style_dlg.color}
          
          
    {#style_dlg.top}   - - - - - - -
     
    -
      - - - - - -
     
    -
    {#style_dlg.top}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.right}   - - - - - - -
     
    -
      - - - - - -
     
    -
    {#style_dlg.right}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.bottom}   - - - - - - -
     
    -
      - - - - - -
     
    -
    {#style_dlg.bottom}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    {#style_dlg.left}   - - - - - - + + + + + + + + +
     
    {#style_dlg.left}   + + + + + + +
      + + +
    +
      + + + + + +
     
    +
    -
      - - - - - -
     
    -
    +
    - +
    + {#style_dlg.list} +
    @@ -541,10 +624,13 @@
    +
    - +
    + {#style_dlg.position} +
    @@ -555,11 +641,14 @@ @@ -570,11 +659,14 @@ @@ -582,12 +674,13 @@
    - +
    - +
      + + +
    - +
    - +
      + + +
    +
    {#style_dlg.placement} - +
    @@ -595,11 +688,14 @@ @@ -607,11 +703,14 @@ @@ -619,11 +718,14 @@ @@ -631,11 +733,14 @@ @@ -648,7 +753,7 @@
    {#style_dlg.clip} -
     
    {#style_dlg.top} - +
    - +
      + + +
    {#style_dlg.right} - +
    - +
      + + +
    {#style_dlg.bottom} - +
    - +
      + + +
    {#style_dlg.left} - +
    - +
      + + +
    +
    @@ -656,11 +761,14 @@ @@ -668,11 +776,14 @@ @@ -680,11 +791,14 @@ @@ -692,11 +806,14 @@ @@ -708,6 +825,11 @@ +
    + + +
    +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/style/readme.txt b/library/tinymce/jscripts/tiny_mce/plugins/style/readme.txt new file mode 100644 index 0000000000..5bac30202e --- /dev/null +++ b/library/tinymce/jscripts/tiny_mce/plugins/style/readme.txt @@ -0,0 +1,19 @@ +Edit CSS Style plug-in notes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Unlike WYSIWYG editor functionality that operates only on the selected text, +typically by inserting new HTML elements with the specified styles. +This plug-in operates on the HTML blocks surrounding the selected text. +No new HTML elements are created. + +This plug-in only operates on the surrounding blocks and not the nearest +parent node. This means that if a block encapsulates a node, +e.g

    text

    , then only the styles in the block are +recognized, not those in the span. + +When selecting text that includes multiple blocks at the same level (peers), +this plug-in accumulates the specified styles in all of the surrounding blocks +and populates the dialogue checkboxes accordingly. There is no differentiation +between styles set in all the blocks versus styles set in some of the blocks. + +When the [Update] or [Apply] buttons are pressed, the styles selected in the +checkboxes are applied to all blocks that surround the selected text. diff --git a/library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js old mode 100755 new mode 100644 index 27d2440222..42a82d112c --- a/library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js @@ -1 +1 @@ -(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(i){o=c.getParent(l.id,"form");n=o.elements;if(o){d(n,function(s,r){if(s.id==l.id){j=r;return false}});if(i>0){for(m=j+1;m=0;m--){if(n[m].type!="hidden"){return n[m]}}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(l=tinymce.get(n.id||n.name)){l.focus()}else{window.setTimeout(function(){window.focus();n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}f.onInit.add(function(){d(c.select("a:first,a:last",f.getContainer()),function(i){a.add(i,"focus",function(){f.focus()})})})},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file +(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js old mode 100755 new mode 100644 index c2be2f40a6..a1579c85f2 --- a/library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js @@ -1,112 +1,122 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function() { - var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; - - tinymce.create('tinymce.plugins.TabFocusPlugin', { - init : function(ed, url) { - function tabCancel(ed, e) { - if (e.keyCode === 9) - return Event.cancel(e); - }; - - function tabHandler(ed, e) { - var x, i, f, el, v; - - function find(d) { - f = DOM.getParent(ed.id, 'form'); - el = f.elements; - - if (f) { - each(el, function(e, i) { - if (e.id == ed.id) { - x = i; - return false; - } - }); - - if (d > 0) { - for (i = x + 1; i < el.length; i++) { - if (el[i].type != 'hidden') - return el[i]; - } - } else { - for (i = x - 1; i >= 0; i--) { - if (el[i].type != 'hidden') - return el[i]; - } - } - } - - return null; - }; - - if (e.keyCode === 9) { - v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); - - if (v.length == 1) { - v[1] = v[0]; - v[0] = ':prev'; - } - - // Find element to focus - if (e.shiftKey) { - if (v[0] == ':prev') - el = find(-1); - else - el = DOM.get(v[0]); - } else { - if (v[1] == ':next') - el = find(1); - else - el = DOM.get(v[1]); - } - - if (el) { - if (ed = tinymce.get(el.id || el.name)) - ed.focus(); - else - window.setTimeout(function() {window.focus();el.focus();}, 10); - - return Event.cancel(e); - } - } - }; - - ed.onKeyUp.add(tabCancel); - - if (tinymce.isGecko) { - ed.onKeyPress.add(tabHandler); - ed.onKeyDown.add(tabCancel); - } else - ed.onKeyDown.add(tabHandler); - - ed.onInit.add(function() { - each(DOM.select('a:first,a:last', ed.getContainer()), function(n) { - Event.add(n, 'focus', function() {ed.focus();}); - }); - }); - }, - - getInfo : function() { - return { - longname : 'Tabfocus', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - } - }); - - // Register plugin - tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); -})(); \ No newline at end of file +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; + + tinymce.create('tinymce.plugins.TabFocusPlugin', { + init : function(ed, url) { + function tabCancel(ed, e) { + if (e.keyCode === 9) + return Event.cancel(e); + } + + function tabHandler(ed, e) { + var x, i, f, el, v; + + function find(d) { + el = DOM.select(':input:enabled,*[tabindex]'); + + function canSelectRecursive(e) { + return e.nodeName==="BODY" || (e.type != 'hidden' && + !(e.style.display == "none") && + !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode)); + } + function canSelectInOldIe(el) { + return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA"; + } + function isOldIe() { + return tinymce.isIE6 || tinymce.isIE7; + } + function canSelect(el) { + return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el); + } + + each(el, function(e, i) { + if (e.id == ed.id) { + x = i; + return false; + } + }); + if (d > 0) { + for (i = x + 1; i < el.length; i++) { + if (canSelect(el[i])) + return el[i]; + } + } else { + for (i = x - 1; i >= 0; i--) { + if (canSelect(el[i])) + return el[i]; + } + } + + return null; + } + + if (e.keyCode === 9) { + v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); + + if (v.length == 1) { + v[1] = v[0]; + v[0] = ':prev'; + } + + // Find element to focus + if (e.shiftKey) { + if (v[0] == ':prev') + el = find(-1); + else + el = DOM.get(v[0]); + } else { + if (v[1] == ':next') + el = find(1); + else + el = DOM.get(v[1]); + } + + if (el) { + if (el.id && (ed = tinymce.get(el.id || el.name))) + ed.focus(); + else + window.setTimeout(function() { + if (!tinymce.isWebKit) + window.focus(); + el.focus(); + }, 10); + + return Event.cancel(e); + } + } + } + + ed.onKeyUp.add(tabCancel); + + if (tinymce.isGecko) { + ed.onKeyPress.add(tabHandler); + ed.onKeyDown.add(tabCancel); + } else + ed.onKeyDown.add(tabHandler); + + }, + + getInfo : function() { + return { + longname : 'Tabfocus', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); +})(); diff --git a/library/tinymce/jscripts/tiny_mce/plugins/table/cell.htm b/library/tinymce/jscripts/tiny_mce/plugins/table/cell.htm old mode 100755 new mode 100644 index d243e1d833..a72a8d6973 --- a/library/tinymce/jscripts/tiny_mce/plugins/table/cell.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/table/cell.htm @@ -5,16 +5,17 @@ + - + @@ -23,7 +24,7 @@
    {#table_dlg.general_props} -
     
    {#style_dlg.top} - +
    - +
      + + +
    {#style_dlg.right} - +
    - +
      + + +
    {#style_dlg.bottom} - +
    - +
      + + +
    {#style_dlg.left} - +
    - +
      + + +
    +
    - + - + @@ -92,7 +93,7 @@
    {#table_dlg.advanced_props} -
    @@ -70,10 +71,10 @@
    +
    @@ -124,7 +125,7 @@
    - +
    @@ -133,10 +134,10 @@ - - + +
     
    - +
    @@ -145,10 +146,10 @@ - - + +
     
    - +
    @@ -166,6 +167,7 @@ diff --git a/library/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css b/library/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/table/css/row.css b/library/tinymce/jscripts/tiny_mce/plugins/table/css/row.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/table/css/table.css b/library/tinymce/jscripts/tiny_mce/plugins/table/css/table.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js old mode 100755 new mode 100644 index 266d7d5371..ad462f0e07 --- a/library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js @@ -1 +1 @@ -(function(b){var c=b.each;function a(F,E,I){var e,J,B,n;r();n=E.getParent(I.getStart(),"th,td");if(n){J=D(n);B=G();n=v(J.x,J.y)}function w(L,K){L=L.cloneNode(K);L.removeAttribute("id");return L}function r(){var K=0;e=[];c(["thead","tbody","tfoot"],function(L){var M=E.select(L+" tr",F);c(M,function(N,O){O+=K;c(E.select("td,th",N),function(U,P){var Q,R,S,T;if(e[O]){while(e[O][P]){P++}}S=g(U,"rowspan");T=g(U,"colspan");for(R=O;R'}return false}},"childNodes");K=w(K,false);K.rowSpan=K.colSpan=1;if(L){K.appendChild(L)}else{if(!b.isIE){K.innerHTML='
    '}}return K}function p(){var K=E.createRng();c(E.select("tr",F),function(L){if(L.cells.length==0){E.remove(L)}});if(E.select("tr",F).length==0){K.setStartAfter(F);K.setEndAfter(F);I.setRng(K);E.remove(F);return}c(E.select("thead,tbody,tfoot",F),function(L){if(L.rows.length==0){E.remove(L)}});r();row=e[Math.min(e.length-1,J.y)];if(row){I.select(row[Math.min(row.length-1,J.x)].elm,true);I.collapse(true)}}function s(Q,O,S,P){var N,L,K,M,R;N=e[O][Q].elm.parentNode;for(K=1;K<=S;K++){N=E.getNext(N,"tr");if(N){for(L=Q;L>=0;L--){R=e[O+K][L].elm;if(R.parentNode==N){for(M=1;M<=P;M++){E.insertAfter(d(R),R)}break}}if(L==-1){for(M=1;M<=P;M++){N.insertBefore(d(N.cells[0]),N.cells[0])}}}}}function A(){c(e,function(K,L){c(K,function(N,M){var Q,P,R,O;if(h(N)){N=N.elm;Q=g(N,"colspan");P=g(N,"rowspan");if(Q>1||P>1){N.colSpan=N.rowSpan=1;for(O=0;O1){P.rowSpan=rowSpan+1;continue}}else{if(K>0&&e[K-1][O]){S=e[K-1][O].elm;rowSpan=g(S,"rowspan");if(rowSpan>1){S.rowSpan=rowSpan+1;continue}}}L=d(P);L.colSpan=P.colSpan;R.appendChild(L);M=P}}if(R.hasChildNodes()){if(!N){E.insertAfter(R,Q)}else{Q.parentNode.insertBefore(R,Q)}}}function f(L){var M,K;c(e,function(N,O){c(N,function(Q,P){if(h(Q)){M=P;if(L){return false}}});if(L){return !M}});c(e,function(Q,R){var N=Q[M].elm,O,P;if(N!=K){P=g(N,"colspan");O=g(N,"rowspan");if(P==1){if(!L){E.insertAfter(d(N),N);s(M,R,O-1,P)}else{N.parentNode.insertBefore(d(N),N);s(M,R,O-1,P)}}else{N.colSpan++}K=N}})}function m(){var K=[];c(e,function(L,M){c(L,function(O,N){if(h(O)&&b.inArray(K,N)===-1){c(e,function(R){var P=R[N].elm,Q;Q=g(P,"colspan");if(Q>1){P.colSpan=Q-1}else{E.remove(P)}});K.push(N)}})});p()}function l(){var L;function K(O){var N,P,M;N=E.getNext(O,"tr");c(O.cells,function(Q){var R=g(Q,"rowspan");if(R>1){Q.rowSpan=R-1;P=D(Q);s(P.x,P.y,1,1)}});P=D(O.cells[0]);c(e[P.y],function(Q){var R;Q=Q.elm;if(Q!=M){R=g(Q,"rowspan");if(R<=1){E.remove(Q)}else{Q.rowSpan=R-1}M=Q}})}L=j();c(L.reverse(),function(M){K(M)});p()}function C(){var K=j();E.remove(K);p();return K}function H(){var K=j();c(K,function(M,L){K[L]=w(M,true)});return K}function z(M,L){var N=j(),K=N[L?0:N.length-1],O=K.cells.length;c(e,function(Q){var P;O=0;c(Q,function(S,R){if(S.real){O+=S.colspan}if(S.elm.parentNode==K){P=1}});if(P){return false}});if(!L){M.reverse()}c(M,function(R){var Q=R.cells.length,P;for(i=0;iL){L=P}if(O>K){K=O}if(Q.real){S=Q.colspan-1;R=Q.rowspan-1;if(S){if(P+S>L){L=P+S}}if(R){if(O+R>K){K=O+R}}}}})});return{x:L,y:K}}function t(Q){var N,M,S,R,L,K,O,P;B=D(Q);if(J&&B){N=Math.min(J.x,B.x);M=Math.min(J.y,B.y);S=Math.max(J.x,B.x);R=Math.max(J.y,B.y);L=S;K=R;for(y=M;y<=K;y++){Q=e[y][N];if(!Q.real){if(N-(Q.colspan-1)L){L=x+O}}if(P){if(y+P>K){K=y+P}}}}}E.removeClass(E.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=M;y<=K;y++){for(x=N;x<=L;x++){E.addClass(e[y][x].elm,"mceSelected")}}}}b.extend(this,{deleteTable:q,split:A,merge:o,insertRow:k,insertCol:f,deleteCols:m,deleteRows:l,cutRows:C,copyRows:H,pasteRows:z,getPos:D,setStartCell:u,setEndCell:t})}b.create("tinymce.plugins.TablePlugin",{init:function(e,f){var d,j;function h(m){var l=e.selection,k=e.dom.getParent(m||l.getNode(),"table");if(k){return new a(k,e.dom,l)}}function g(){e.getBody().style.webkitUserSelect="";e.dom.removeClass(e.dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}c([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(k){e.addButton(k[0],{title:k[1],cmd:k[2],ui:k[3]})});if(!b.isIE){e.onClick.add(function(k,l){l=l.target;if(l.nodeName==="TABLE"){k.selection.select(l)}})}e.onNodeChange.add(function(l,k,o){var m;o=l.selection.getStart();m=l.dom.getParent(o,"td,th,caption");k.setActive("table",o.nodeName==="TABLE"||!!m);if(m&&m.nodeName==="CAPTION"){m=0}k.setDisabled("delete_table",!m);k.setDisabled("delete_col",!m);k.setDisabled("delete_table",!m);k.setDisabled("delete_row",!m);k.setDisabled("col_after",!m);k.setDisabled("col_before",!m);k.setDisabled("row_after",!m);k.setDisabled("row_before",!m);k.setDisabled("row_props",!m);k.setDisabled("cell_props",!m);k.setDisabled("split_cells",!m);k.setDisabled("merge_cells",!m)});e.onInit.add(function(l){var k,o,p=l.dom,m;d=l.windowManager;l.onMouseDown.add(function(q,r){if(r.button!=2){g();o=p.getParent(r.target,"td,th");k=p.getParent(o,"table")}});p.bind(l.getDoc(),"mouseover",function(t){var r,q,s=t.target;if(o&&(m||s!=o)&&(s.nodeName=="TD"||s.nodeName=="TH")){q=p.getParent(s,"table");if(q==k){if(!m){m=h(q);m.setStartCell(o);l.getBody().style.webkitUserSelect="none"}m.setEndCell(s)}r=l.selection.getSel();if(r.removeAllRanges){r.removeAllRanges()}else{r.empty()}t.preventDefault()}});l.onMouseUp.add(function(z,A){var r,t=z.selection,B,C=t.getSel(),q,u,s,w;if(o){if(m){z.getBody().style.webkitUserSelect=""}function v(D,F){var E=new b.dom.TreeWalker(D,D);do{if(D.nodeType==3&&b.trim(D.nodeValue).length!=0){if(F){r.setStart(D,0)}else{r.setEnd(D,D.nodeValue.length)}return}if(D.nodeName=="BR"){if(F){r.setStartBefore(D)}else{r.setEndBefore(D)}return}}while(D=(F?E.next():E.prev()))}B=p.select("td.mceSelected,th.mceSelected");if(B.length>0){r=p.createRng();u=B[0];w=B[B.length-1];v(u,1);q=new b.dom.TreeWalker(u,p.getParent(B[0],"table"));do{if(u.nodeName=="TD"||u.nodeName=="TH"){if(!p.hasClass(u,"mceSelected")){break}s=u}}while(u=q.next());v(s);t.setRng(r)}z.nodeChanged();o=m=k=null}});l.onKeyUp.add(function(q,r){g()});if(l&&l.plugins.contextmenu){l.plugins.contextmenu.onContextMenu.add(function(s,q,u){var v,t=l.selection,r=t.getNode()||l.getBody();if(l.dom.getParent(u,"td")||l.dom.getParent(u,"th")||l.dom.select("td.mceSelected,th.mceSelected").length){q.removeAll();if(r.nodeName=="A"&&!l.dom.getAttrib(r,"name")){q.add({title:"advanced.link_desc",icon:"link",cmd:l.plugins.advlink?"mceAdvLink":"mceLink",ui:true});q.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});q.addSeparator()}if(r.nodeName=="IMG"&&r.className.indexOf("mceItem")==-1){q.add({title:"advanced.image_desc",icon:"image",cmd:l.plugins.advimage?"mceAdvImage":"mceImage",ui:true});q.addSeparator()}q.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});q.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});q.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});q.addSeparator();v=q.addMenu({title:"table.cell"});v.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});v.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});v.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});v=q.addMenu({title:"table.row"});v.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});v.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});v.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});v.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});v.addSeparator();v.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});v.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});v.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!j);v.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!j);v=q.addMenu({title:"table.col"});v.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});v.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});v.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{q.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(!b.isIE){function n(){var q;for(q=l.getBody().lastChild;q&&q.nodeType==3&&!q.nodeValue.length;q=q.previousSibling){}if(q&&q.nodeName=="TABLE"){l.dom.add(l.getBody(),"p",null,'
    ')}}if(b.isGecko){l.onKeyDown.add(function(r,t){var q,s,u=r.dom;if(t.keyCode==37||t.keyCode==38){q=r.selection.getRng();s=u.getParent(q.startContainer,"table");if(s&&r.getBody().firstChild==s){if(isAtStart(q,s)){q=u.createRng();q.setStartBefore(s);q.setEndBefore(s);r.selection.setRng(q);t.preventDefault()}}}})}l.onKeyUp.add(n);l.onSetContent.add(n);l.onVisualAid.add(n);l.onPreProcess.add(function(q,s){var r=s.node.lastChild;if(r&&r.childNodes.length==1&&r.firstChild.nodeName=="BR"){q.dom.remove(r)}});n()}});c({mceTableSplitCells:function(k){k.split()},mceTableMergeCells:function(l){var m,n,k;k=e.dom.getParent(e.selection.getNode(),"th,td");if(k){m=k.rowSpan;n=k.colSpan}if(!e.dom.select("td.mceSelected,th.mceSelected").length){d.open({url:f+"/merge_cells.htm",width:240+parseInt(e.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(e.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:m,cols:n,onaction:function(o){l.merge(k,o.cols,o.rows)},plugin_url:f})}else{l.merge()}},mceTableInsertRowBefore:function(k){k.insertRow(true)},mceTableInsertRowAfter:function(k){k.insertRow()},mceTableInsertColBefore:function(k){k.insertCol(true)},mceTableInsertColAfter:function(k){k.insertCol()},mceTableDeleteCol:function(k){k.deleteCols()},mceTableDeleteRow:function(k){k.deleteRows()},mceTableCutRow:function(k){j=k.cutRows()},mceTableCopyRow:function(k){j=k.copyRows()},mceTablePasteRowBefore:function(k){k.pasteRows(j,true)},mceTablePasteRowAfter:function(k){k.pasteRows(j)},mceTableDelete:function(k){k.deleteTable()}},function(l,k){e.addCommand(k,function(){var m=h();if(m){l(m);e.execCommand("mceRepaint");g()}})});c({mceInsertTable:function(k){d.open({url:f+"/table.htm",width:400+parseInt(e.getLang("table.table_delta_width",0)),height:320+parseInt(e.getLang("table.table_delta_height",0)),inline:1},{plugin_url:f,action:k?k.action:0})},mceTableRowProps:function(){d.open({url:f+"/row.htm",width:400+parseInt(e.getLang("table.rowprops_delta_width",0)),height:295+parseInt(e.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:f})},mceTableCellProps:function(){d.open({url:f+"/cell.htm",width:400+parseInt(e.getLang("table.cellprops_delta_width",0)),height:295+parseInt(e.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:f})}},function(l,k){e.addCommand(k,function(m,n){l(n)})})}});b.PluginManager.add("table",b.plugins.TablePlugin)})(tinymce); \ No newline at end of file +(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='
    '}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;iN){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}if(!d.isIE){function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){r.dom.add(r.getBody(),"p",null,'
    ')}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&z.childNodes.length==1&&z.firstChild.nodeName=="BR"){w.dom.remove(z)}});if(d.isGecko){r.onKeyDown.add(function(z,B){if(B.keyCode===d.VK.ENTER&&B.shiftKey){var A=z.selection.getRng().startContainer;var C=q.getParent(A,"td,th");if(C){var w=z.getDoc().createTextNode("\uFEFF");q.insertAfter(w,A)}}})}s();r.startContent=r.getContent({format:"raw"})}});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js old mode 100755 new mode 100644 index c2f307f045..832b5e9433 --- a/library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js @@ -1,1125 +1,1428 @@ -/** - * editor_plugin_src.js - * - * Copyright 2009, Moxiecode Systems AB - * Released under LGPL License. - * - * License: http://tinymce.moxiecode.com/license - * Contributing: http://tinymce.moxiecode.com/contributing - */ - -(function(tinymce) { - var each = tinymce.each; - - /** - * Table Grid class. - */ - function TableGrid(table, dom, selection) { - var grid, startPos, endPos, selectedCell; - - buildGrid(); - selectedCell = dom.getParent(selection.getStart(), 'th,td'); - if (selectedCell) { - startPos = getPos(selectedCell); - endPos = findEndPos(); - selectedCell = getCell(startPos.x, startPos.y); - } - - function cloneNode(node, children) { - node = node.cloneNode(children); - node.removeAttribute('id'); - - return node; - } - - function buildGrid() { - var startY = 0; - - grid = []; - - each(['thead', 'tbody', 'tfoot'], function(part) { - var rows = dom.select(part + ' tr', table); - - each(rows, function(tr, y) { - y += startY; - - each(dom.select('td,th', tr), function(td, x) { - var x2, y2, rowspan, colspan; - - // Skip over existing cells produced by rowspan - if (grid[y]) { - while (grid[y][x]) - x++; - } - - // Get col/rowspan from cell - rowspan = getSpanVal(td, 'rowspan'); - colspan = getSpanVal(td, 'colspan'); - - // Fill out rowspan/colspan right and down - for (y2 = y; y2 < y + rowspan; y2++) { - if (!grid[y2]) - grid[y2] = []; - - for (x2 = x; x2 < x + colspan; x2++) { - grid[y2][x2] = { - part : part, - real : y2 == y && x2 == x, - elm : td, - rowspan : rowspan, - colspan : colspan - }; - } - } - }); - }); - - startY += rows.length; - }); - }; - - function getCell(x, y) { - var row; - - row = grid[y]; - if (row) - return row[x]; - }; - - function getSpanVal(td, name) { - return parseInt(td.getAttribute(name) || 1); - }; - - function isCellSelected(cell) { - return dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell; - }; - - function getSelectedRows() { - var rows = []; - - each(table.rows, function(row) { - each(row.cells, function(cell) { - if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) { - rows.push(row); - return false; - } - }); - }); - - return rows; - }; - - function deleteTable() { - var rng = dom.createRng(); - - rng.setStartAfter(table); - rng.setEndAfter(table); - - selection.setRng(rng); - - dom.remove(table); - }; - - function cloneCell(cell) { - var formatNode; - - // Clone formats - tinymce.walk(cell, function(node) { - var curNode; - - if (node.nodeType == 3) { - each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) { - node = cloneNode(node, false); - - if (!formatNode) - formatNode = curNode = node; - else if (curNode) - curNode.appendChild(node); - - curNode = node; - }); - - // Add something to the inner node - if (curNode) - curNode.innerHTML = tinymce.isIE ? ' ' : '
    '; - - return false; - } - }, 'childNodes'); - - cell = cloneNode(cell, false); - cell.rowSpan = cell.colSpan = 1; - - if (formatNode) { - cell.appendChild(formatNode); - } else { - if (!tinymce.isIE) - cell.innerHTML = '
    '; - } - - return cell; - }; - - function cleanup() { - var rng = dom.createRng(); - - // Empty rows - each(dom.select('tr', table), function(tr) { - if (tr.cells.length == 0) - dom.remove(tr); - }); - - // Empty table - if (dom.select('tr', table).length == 0) { - rng.setStartAfter(table); - rng.setEndAfter(table); - selection.setRng(rng); - dom.remove(table); - return; - } - - // Empty header/body/footer - each(dom.select('thead,tbody,tfoot', table), function(part) { - if (part.rows.length == 0) - dom.remove(part); - }); - - // Restore selection to start position if it still exists - buildGrid(); - - // Restore the selection to the closest table position - row = grid[Math.min(grid.length - 1, startPos.y)]; - if (row) { - selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true); - selection.collapse(true); - } - }; - - function fillLeftDown(x, y, rows, cols) { - var tr, x2, r, c, cell; - - tr = grid[y][x].elm.parentNode; - for (r = 1; r <= rows; r++) { - tr = dom.getNext(tr, 'tr'); - - if (tr) { - // Loop left to find real cell - for (x2 = x; x2 >= 0; x2--) { - cell = grid[y + r][x2].elm; - - if (cell.parentNode == tr) { - // Append clones after - for (c = 1; c <= cols; c++) - dom.insertAfter(cloneCell(cell), cell); - - break; - } - } - - if (x2 == -1) { - // Insert nodes before first cell - for (c = 1; c <= cols; c++) - tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]); - } - } - } - }; - - function split() { - each(grid, function(row, y) { - each(row, function(cell, x) { - var colSpan, rowSpan, newCell, i; - - if (isCellSelected(cell)) { - cell = cell.elm; - colSpan = getSpanVal(cell, 'colspan'); - rowSpan = getSpanVal(cell, 'rowspan'); - - if (colSpan > 1 || rowSpan > 1) { - cell.colSpan = cell.rowSpan = 1; - - // Insert cells right - for (i = 0; i < colSpan - 1; i++) - dom.insertAfter(cloneCell(cell), cell); - - fillLeftDown(x, y, rowSpan - 1, colSpan); - } - } - }); - }); - }; - - function merge(cell, cols, rows) { - var startX, startY, endX, endY, x, y, startCell, endCell, cell, children; - - // Use specified cell and cols/rows - if (cell) { - pos = getPos(cell); - startX = pos.x; - startY = pos.y; - endX = startX + (cols - 1); - endY = startY + (rows - 1); - } else { - // Use selection - startX = startPos.x; - startY = startPos.y; - endX = endPos.x; - endY = endPos.y; - } - - // Find start/end cells - startCell = getCell(startX, startY); - endCell = getCell(endX, endY); - - // Check if the cells exists and if they are of the same part for example tbody = tbody - if (startCell && endCell && startCell.part == endCell.part) { - // Split and rebuild grid - split(); - buildGrid(); - - // Set row/col span to start cell - startCell = getCell(startX, startY).elm; - startCell.colSpan = (endX - startX) + 1; - startCell.rowSpan = (endY - startY) + 1; - - // Remove other cells and add it's contents to the start cell - for (y = startY; y <= endY; y++) { - for (x = startX; x <= endX; x++) { - cell = grid[y][x].elm; - - if (cell != startCell) { - // Move children to startCell - children = tinymce.grep(cell.childNodes); - each(children, function(node, i) { - // Jump over last BR element - if (node.nodeName != 'BR' || i != children.length - 1) - startCell.appendChild(node); - }); - - // Remove cell - dom.remove(cell); - } - } - } - - // Remove empty rows etc and restore caret location - cleanup(); - } - }; - - function insertRow(before) { - var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell; - - // Find first/last row - each(grid, function(row, y) { - each(row, function(cell, x) { - if (isCellSelected(cell)) { - cell = cell.elm; - rowElm = cell.parentNode; - newRow = cloneNode(rowElm, false); - posY = y; - - if (before) - return false; - } - }); - - if (before) - return !posY; - }); - - for (x = 0; x < grid[0].length; x++) { - cell = grid[posY][x].elm; - - if (cell != lastCell) { - if (!before) { - rowSpan = getSpanVal(cell, 'rowspan'); - if (rowSpan > 1) { - cell.rowSpan = rowSpan + 1; - continue; - } - } else { - // Check if cell above can be expanded - if (posY > 0 && grid[posY - 1][x]) { - otherCell = grid[posY - 1][x].elm; - rowSpan = getSpanVal(otherCell, 'rowspan'); - if (rowSpan > 1) { - otherCell.rowSpan = rowSpan + 1; - continue; - } - } - } - - // Insert new cell into new row - newCell = cloneCell(cell) - newCell.colSpan = cell.colSpan; - newRow.appendChild(newCell); - - lastCell = cell; - } - } - - if (newRow.hasChildNodes()) { - if (!before) - dom.insertAfter(newRow, rowElm); - else - rowElm.parentNode.insertBefore(newRow, rowElm); - } - }; - - function insertCol(before) { - var posX, lastCell; - - // Find first/last column - each(grid, function(row, y) { - each(row, function(cell, x) { - if (isCellSelected(cell)) { - posX = x; - - if (before) - return false; - } - }); - - if (before) - return !posX; - }); - - each(grid, function(row, y) { - var cell = row[posX].elm, rowSpan, colSpan; - - if (cell != lastCell) { - colSpan = getSpanVal(cell, 'colspan'); - rowSpan = getSpanVal(cell, 'rowspan'); - - if (colSpan == 1) { - if (!before) { - dom.insertAfter(cloneCell(cell), cell); - fillLeftDown(posX, y, rowSpan - 1, colSpan); - } else { - cell.parentNode.insertBefore(cloneCell(cell), cell); - fillLeftDown(posX, y, rowSpan - 1, colSpan); - } - } else - cell.colSpan++; - - lastCell = cell; - } - }); - }; - - function deleteCols() { - var cols = []; - - // Get selected column indexes - each(grid, function(row, y) { - each(row, function(cell, x) { - if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) { - each(grid, function(row) { - var cell = row[x].elm, colSpan; - - colSpan = getSpanVal(cell, 'colspan'); - - if (colSpan > 1) - cell.colSpan = colSpan - 1; - else - dom.remove(cell); - }); - - cols.push(x); - } - }); - }); - - cleanup(); - }; - - function deleteRows() { - var rows; - - function deleteRow(tr) { - var nextTr, pos, lastCell; - - nextTr = dom.getNext(tr, 'tr'); - - // Move down row spanned cells - each(tr.cells, function(cell) { - var rowSpan = getSpanVal(cell, 'rowspan'); - - if (rowSpan > 1) { - cell.rowSpan = rowSpan - 1; - pos = getPos(cell); - fillLeftDown(pos.x, pos.y, 1, 1); - } - }); - - // Delete cells - pos = getPos(tr.cells[0]); - each(grid[pos.y], function(cell) { - var rowSpan; - - cell = cell.elm; - - if (cell != lastCell) { - rowSpan = getSpanVal(cell, 'rowspan'); - - if (rowSpan <= 1) - dom.remove(cell); - else - cell.rowSpan = rowSpan - 1; - - lastCell = cell; - } - }); - }; - - // Get selected rows and move selection out of scope - rows = getSelectedRows(); - - // Delete all selected rows - each(rows.reverse(), function(tr) { - deleteRow(tr); - }); - - cleanup(); - }; - - function cutRows() { - var rows = getSelectedRows(); - - dom.remove(rows); - cleanup(); - - return rows; - }; - - function copyRows() { - var rows = getSelectedRows(); - - each(rows, function(row, i) { - rows[i] = cloneNode(row, true); - }); - - return rows; - }; - - function pasteRows(rows, before) { - var selectedRows = getSelectedRows(), - targetRow = selectedRows[before ? 0 : selectedRows.length - 1], - targetCellCount = targetRow.cells.length; - - // Calc target cell count - each(grid, function(row) { - var match; - - targetCellCount = 0; - each(row, function(cell, x) { - if (cell.real) - targetCellCount += cell.colspan; - - if (cell.elm.parentNode == targetRow) - match = 1; - }); - - if (match) - return false; - }); - - if (!before) - rows.reverse(); - - each(rows, function(row) { - var cellCount = row.cells.length, cell; - - // Remove col/rowspans - for (i = 0; i < cellCount; i++) { - cell = row.cells[i]; - cell.colSpan = cell.rowSpan = 1; - } - - // Needs more cells - for (i = cellCount; i < targetCellCount; i++) - row.appendChild(cloneCell(row.cells[cellCount - 1])); - - // Needs less cells - for (i = targetCellCount; i < cellCount; i++) - dom.remove(row.cells[i]); - - // Add before/after - if (before) - targetRow.parentNode.insertBefore(row, targetRow); - else - dom.insertAfter(row, targetRow); - }); - }; - - function getPos(target) { - var pos; - - each(grid, function(row, y) { - each(row, function(cell, x) { - if (cell.elm == target) { - pos = {x : x, y : y}; - return false; - } - }); - - return !pos; - }); - - return pos; - }; - - function setStartCell(cell) { - startPos = getPos(cell); - }; - - function findEndPos() { - var pos, maxX, maxY; - - maxX = maxY = 0; - - each(grid, function(row, y) { - each(row, function(cell, x) { - var colSpan, rowSpan; - - if (isCellSelected(cell)) { - cell = grid[y][x]; - - if (x > maxX) - maxX = x; - - if (y > maxY) - maxY = y; - - if (cell.real) { - colSpan = cell.colspan - 1; - rowSpan = cell.rowspan - 1; - - if (colSpan) { - if (x + colSpan > maxX) - maxX = x + colSpan; - } - - if (rowSpan) { - if (y + rowSpan > maxY) - maxY = y + rowSpan; - } - } - } - }); - }); - - return {x : maxX, y : maxY}; - }; - - function setEndCell(cell) { - var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan; - - endPos = getPos(cell); - - if (startPos && endPos) { - // Get start/end positions - startX = Math.min(startPos.x, endPos.x); - startY = Math.min(startPos.y, endPos.y); - endX = Math.max(startPos.x, endPos.x); - endY = Math.max(startPos.y, endPos.y); - - // Expand end positon to include spans - maxX = endX; - maxY = endY; - - // Expand startX - for (y = startY; y <= maxY; y++) { - cell = grid[y][startX]; - - if (!cell.real) { - if (startX - (cell.colspan - 1) < startX) - startX -= cell.colspan - 1; - } - } - - // Expand startY - for (x = startX; x <= maxX; x++) { - cell = grid[startY][x]; - - if (!cell.real) { - if (startY - (cell.rowspan - 1) < startY) - startY -= cell.rowspan - 1; - } - } - - // Find max X, Y - for (y = startY; y <= endY; y++) { - for (x = startX; x <= endX; x++) { - cell = grid[y][x]; - - if (cell.real) { - colSpan = cell.colspan - 1; - rowSpan = cell.rowspan - 1; - - if (colSpan) { - if (x + colSpan > maxX) - maxX = x + colSpan; - } - - if (rowSpan) { - if (y + rowSpan > maxY) - maxY = y + rowSpan; - } - } - } - } - - // Remove current selection - dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); - - // Add new selection - for (y = startY; y <= maxY; y++) { - for (x = startX; x <= maxX; x++) - dom.addClass(grid[y][x].elm, 'mceSelected'); - } - } - }; - - // Expose to public - tinymce.extend(this, { - deleteTable : deleteTable, - split : split, - merge : merge, - insertRow : insertRow, - insertCol : insertCol, - deleteCols : deleteCols, - deleteRows : deleteRows, - cutRows : cutRows, - copyRows : copyRows, - pasteRows : pasteRows, - getPos : getPos, - setStartCell : setStartCell, - setEndCell : setEndCell - }); - }; - - tinymce.create('tinymce.plugins.TablePlugin', { - init : function(ed, url) { - var winMan, clipboardRows; - - function createTableGrid(node) { - var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table'); - - if (tblElm) - return new TableGrid(tblElm, ed.dom, selection); - }; - - function cleanup() { - // Restore selection possibilities - ed.getBody().style.webkitUserSelect = ''; - ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); - }; - - // Register buttons - each([ - ['table', 'table.desc', 'mceInsertTable', true], - ['delete_table', 'table.del', 'mceTableDelete'], - ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], - ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], - ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], - ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], - ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], - ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], - ['row_props', 'table.row_desc', 'mceTableRowProps', true], - ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], - ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], - ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] - ], function(c) { - ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); - }); - - // Select whole table is a table border is clicked - if (!tinymce.isIE) { - ed.onClick.add(function(ed, e) { - e = e.target; - - if (e.nodeName === 'TABLE') - ed.selection.select(e); - }); - } - - // Handle node change updates - ed.onNodeChange.add(function(ed, cm, n) { - var p; - - n = ed.selection.getStart(); - p = ed.dom.getParent(n, 'td,th,caption'); - cm.setActive('table', n.nodeName === 'TABLE' || !!p); - - // Disable table tools if we are in caption - if (p && p.nodeName === 'CAPTION') - p = 0; - - cm.setDisabled('delete_table', !p); - cm.setDisabled('delete_col', !p); - cm.setDisabled('delete_table', !p); - cm.setDisabled('delete_row', !p); - cm.setDisabled('col_after', !p); - cm.setDisabled('col_before', !p); - cm.setDisabled('row_after', !p); - cm.setDisabled('row_before', !p); - cm.setDisabled('row_props', !p); - cm.setDisabled('cell_props', !p); - cm.setDisabled('split_cells', !p); - cm.setDisabled('merge_cells', !p); - }); - - ed.onInit.add(function(ed) { - var startTable, startCell, dom = ed.dom, tableGrid; - - winMan = ed.windowManager; - - // Add cell selection logic - ed.onMouseDown.add(function(ed, e) { - if (e.button != 2) { - cleanup(); - - startCell = dom.getParent(e.target, 'td,th'); - startTable = dom.getParent(startCell, 'table'); - } - }); - - dom.bind(ed.getDoc(), 'mouseover', function(e) { - var sel, table, target = e.target; - - if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) { - table = dom.getParent(target, 'table'); - if (table == startTable) { - if (!tableGrid) { - tableGrid = createTableGrid(table); - tableGrid.setStartCell(startCell); - - ed.getBody().style.webkitUserSelect = 'none'; - } - - tableGrid.setEndCell(target); - } - - // Remove current selection - sel = ed.selection.getSel(); - - if (sel.removeAllRanges) - sel.removeAllRanges(); - else - sel.empty(); - - e.preventDefault(); - } - }); - - ed.onMouseUp.add(function(ed, e) { - var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode; - - // Move selection to startCell - if (startCell) { - if (tableGrid) - ed.getBody().style.webkitUserSelect = ''; - - function setPoint(node, start) { - var walker = new tinymce.dom.TreeWalker(node, node); - - do { - // Text node - if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { - if (start) - rng.setStart(node, 0); - else - rng.setEnd(node, node.nodeValue.length); - - return; - } - - // BR element - if (node.nodeName == 'BR') { - if (start) - rng.setStartBefore(node); - else - rng.setEndBefore(node); - - return; - } - } while (node = (start ? walker.next() : walker.prev())); - }; - - // Try to expand text selection as much as we can only Gecko supports cell selection - selectedCells = dom.select('td.mceSelected,th.mceSelected'); - if (selectedCells.length > 0) { - rng = dom.createRng(); - node = selectedCells[0]; - endNode = selectedCells[selectedCells.length - 1]; - - setPoint(node, 1); - walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table')); - - do { - if (node.nodeName == 'TD' || node.nodeName == 'TH') { - if (!dom.hasClass(node, 'mceSelected')) - break; - - lastNode = node; - } - } while (node = walker.next()); - - setPoint(lastNode); - - sel.setRng(rng); - } - - ed.nodeChanged(); - startCell = tableGrid = startTable = null; - } - }); - - ed.onKeyUp.add(function(ed, e) { - cleanup(); - }); - - // Add context menu - if (ed && ed.plugins.contextmenu) { - ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { - var sm, se = ed.selection, el = se.getNode() || ed.getBody(); - - if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) { - m.removeAll(); - - if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { - m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); - m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); - m.addSeparator(); - } - - if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { - m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); - m.addSeparator(); - } - - m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}}); - m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'}); - m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'}); - m.addSeparator(); - - // Cell menu - sm = m.addMenu({title : 'table.cell'}); - sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'}); - sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'}); - sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'}); - - // Row menu - sm = m.addMenu({title : 'table.row'}); - sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'}); - sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); - sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); - sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); - sm.addSeparator(); - sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); - sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); - sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows); - sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows); - - // Column menu - sm = m.addMenu({title : 'table.col'}); - sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); - sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); - sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); - } else - m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'}); - }); - } - - // Fixes an issue on Gecko where it's impossible to place the caret behind a table - // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled - if (!tinymce.isIE) { - function fixTableCaretPos() { - var last; - - // Skip empty text nodes form the end - for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; - - if (last && last.nodeName == 'TABLE') - ed.dom.add(ed.getBody(), 'p', null, '
    '); - }; - - // Fixes an bug where it's impossible to place the caret before a table in Gecko - // this fix solves it by detecting when the caret is at the beginning of such a table - // and then manually moves the caret infront of the table - if (tinymce.isGecko) { - ed.onKeyDown.add(function(ed, e) { - var rng, table, dom = ed.dom; - - // On gecko it's not possible to place the caret before a table - if (e.keyCode == 37 || e.keyCode == 38) { - rng = ed.selection.getRng(); - table = dom.getParent(rng.startContainer, 'table'); - - if (table && ed.getBody().firstChild == table) { - if (isAtStart(rng, table)) { - rng = dom.createRng(); - - rng.setStartBefore(table); - rng.setEndBefore(table); - - ed.selection.setRng(rng); - - e.preventDefault(); - } - } - } - }); - } - - ed.onKeyUp.add(fixTableCaretPos); - ed.onSetContent.add(fixTableCaretPos); - ed.onVisualAid.add(fixTableCaretPos); - - ed.onPreProcess.add(function(ed, o) { - var last = o.node.lastChild; - - if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') - ed.dom.remove(last); - }); - - fixTableCaretPos(); - } - }); - - // Register action commands - each({ - mceTableSplitCells : function(grid) { - grid.split(); - }, - - mceTableMergeCells : function(grid) { - var rowSpan, colSpan, cell; - - cell = ed.dom.getParent(ed.selection.getNode(), 'th,td'); - if (cell) { - rowSpan = cell.rowSpan; - colSpan = cell.colSpan; - } - - if (!ed.dom.select('td.mceSelected,th.mceSelected').length) { - winMan.open({ - url : url + '/merge_cells.htm', - width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)), - height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)), - inline : 1 - }, { - rows : rowSpan, - cols : colSpan, - onaction : function(data) { - grid.merge(cell, data.cols, data.rows); - }, - plugin_url : url - }); - } else - grid.merge(); - }, - - mceTableInsertRowBefore : function(grid) { - grid.insertRow(true); - }, - - mceTableInsertRowAfter : function(grid) { - grid.insertRow(); - }, - - mceTableInsertColBefore : function(grid) { - grid.insertCol(true); - }, - - mceTableInsertColAfter : function(grid) { - grid.insertCol(); - }, - - mceTableDeleteCol : function(grid) { - grid.deleteCols(); - }, - - mceTableDeleteRow : function(grid) { - grid.deleteRows(); - }, - - mceTableCutRow : function(grid) { - clipboardRows = grid.cutRows(); - }, - - mceTableCopyRow : function(grid) { - clipboardRows = grid.copyRows(); - }, - - mceTablePasteRowBefore : function(grid) { - grid.pasteRows(clipboardRows, true); - }, - - mceTablePasteRowAfter : function(grid) { - grid.pasteRows(clipboardRows); - }, - - mceTableDelete : function(grid) { - grid.deleteTable(); - } - }, function(func, name) { - ed.addCommand(name, function() { - var grid = createTableGrid(); - - if (grid) { - func(grid); - ed.execCommand('mceRepaint'); - cleanup(); - } - }); - }); - - // Register dialog commands - each({ - mceInsertTable : function(val) { - winMan.open({ - url : url + '/table.htm', - width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)), - height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)), - inline : 1 - }, { - plugin_url : url, - action : val ? val.action : 0 - }); - }, - - mceTableRowProps : function() { - winMan.open({ - url : url + '/row.htm', - width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)), - height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - }, - - mceTableCellProps : function() { - winMan.open({ - url : url + '/cell.htm', - width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)), - height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - } - }, function(func, name) { - ed.addCommand(name, function(ui, val) { - func(val); - }); - }); - } - }); - - // Register plugin - tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); -})(tinymce); \ No newline at end of file +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function(tinymce) { + var each = tinymce.each; + + // Checks if the selection/caret is at the start of the specified block element + function isAtStart(rng, par) { + var doc = par.ownerDocument, rng2 = doc.createRange(), elm; + + rng2.setStartBefore(par); + rng2.setEnd(rng.endContainer, rng.endOffset); + + elm = doc.createElement('body'); + elm.appendChild(rng2.cloneContents()); + + // Check for text characters of other elements that should be treated as content + return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0; + }; + + function getSpanVal(td, name) { + return parseInt(td.getAttribute(name) || 1); + } + + /** + * Table Grid class. + */ + function TableGrid(table, dom, selection) { + var grid, startPos, endPos, selectedCell; + + buildGrid(); + selectedCell = dom.getParent(selection.getStart(), 'th,td'); + if (selectedCell) { + startPos = getPos(selectedCell); + endPos = findEndPos(); + selectedCell = getCell(startPos.x, startPos.y); + } + + function cloneNode(node, children) { + node = node.cloneNode(children); + node.removeAttribute('id'); + + return node; + } + + function buildGrid() { + var startY = 0; + + grid = []; + + each(['thead', 'tbody', 'tfoot'], function(part) { + var rows = dom.select('> ' + part + ' tr', table); + + each(rows, function(tr, y) { + y += startY; + + each(dom.select('> td, > th', tr), function(td, x) { + var x2, y2, rowspan, colspan; + + // Skip over existing cells produced by rowspan + if (grid[y]) { + while (grid[y][x]) + x++; + } + + // Get col/rowspan from cell + rowspan = getSpanVal(td, 'rowspan'); + colspan = getSpanVal(td, 'colspan'); + + // Fill out rowspan/colspan right and down + for (y2 = y; y2 < y + rowspan; y2++) { + if (!grid[y2]) + grid[y2] = []; + + for (x2 = x; x2 < x + colspan; x2++) { + grid[y2][x2] = { + part : part, + real : y2 == y && x2 == x, + elm : td, + rowspan : rowspan, + colspan : colspan + }; + } + } + }); + }); + + startY += rows.length; + }); + }; + + function getCell(x, y) { + var row; + + row = grid[y]; + if (row) + return row[x]; + }; + + function setSpanVal(td, name, val) { + if (td) { + val = parseInt(val); + + if (val === 1) + td.removeAttribute(name, 1); + else + td.setAttribute(name, val, 1); + } + } + + function isCellSelected(cell) { + return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell); + }; + + function getSelectedRows() { + var rows = []; + + each(table.rows, function(row) { + each(row.cells, function(cell) { + if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) { + rows.push(row); + return false; + } + }); + }); + + return rows; + }; + + function deleteTable() { + var rng = dom.createRng(); + + rng.setStartAfter(table); + rng.setEndAfter(table); + + selection.setRng(rng); + + dom.remove(table); + }; + + function cloneCell(cell) { + var formatNode; + + // Clone formats + tinymce.walk(cell, function(node) { + var curNode; + + if (node.nodeType == 3) { + each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) { + node = cloneNode(node, false); + + if (!formatNode) + formatNode = curNode = node; + else if (curNode) + curNode.appendChild(node); + + curNode = node; + }); + + // Add something to the inner node + if (curNode) + curNode.innerHTML = tinymce.isIE ? ' ' : '
    '; + + return false; + } + }, 'childNodes'); + + cell = cloneNode(cell, false); + setSpanVal(cell, 'rowSpan', 1); + setSpanVal(cell, 'colSpan', 1); + + if (formatNode) { + cell.appendChild(formatNode); + } else { + if (!tinymce.isIE) + cell.innerHTML = '
    '; + } + + return cell; + }; + + function cleanup() { + var rng = dom.createRng(); + + // Empty rows + each(dom.select('tr', table), function(tr) { + if (tr.cells.length == 0) + dom.remove(tr); + }); + + // Empty table + if (dom.select('tr', table).length == 0) { + rng.setStartAfter(table); + rng.setEndAfter(table); + selection.setRng(rng); + dom.remove(table); + return; + } + + // Empty header/body/footer + each(dom.select('thead,tbody,tfoot', table), function(part) { + if (part.rows.length == 0) + dom.remove(part); + }); + + // Restore selection to start position if it still exists + buildGrid(); + + // Restore the selection to the closest table position + row = grid[Math.min(grid.length - 1, startPos.y)]; + if (row) { + selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true); + selection.collapse(true); + } + }; + + function fillLeftDown(x, y, rows, cols) { + var tr, x2, r, c, cell; + + tr = grid[y][x].elm.parentNode; + for (r = 1; r <= rows; r++) { + tr = dom.getNext(tr, 'tr'); + + if (tr) { + // Loop left to find real cell + for (x2 = x; x2 >= 0; x2--) { + cell = grid[y + r][x2].elm; + + if (cell.parentNode == tr) { + // Append clones after + for (c = 1; c <= cols; c++) + dom.insertAfter(cloneCell(cell), cell); + + break; + } + } + + if (x2 == -1) { + // Insert nodes before first cell + for (c = 1; c <= cols; c++) + tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]); + } + } + } + }; + + function split() { + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan, newCell, i; + + if (isCellSelected(cell)) { + cell = cell.elm; + colSpan = getSpanVal(cell, 'colspan'); + rowSpan = getSpanVal(cell, 'rowspan'); + + if (colSpan > 1 || rowSpan > 1) { + setSpanVal(cell, 'rowSpan', 1); + setSpanVal(cell, 'colSpan', 1); + + // Insert cells right + for (i = 0; i < colSpan - 1; i++) + dom.insertAfter(cloneCell(cell), cell); + + fillLeftDown(x, y, rowSpan - 1, colSpan); + } + } + }); + }); + }; + + function merge(cell, cols, rows) { + var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count; + + // Use specified cell and cols/rows + if (cell) { + pos = getPos(cell); + startX = pos.x; + startY = pos.y; + endX = startX + (cols - 1); + endY = startY + (rows - 1); + } else { + // Use selection + startX = startPos.x; + startY = startPos.y; + endX = endPos.x; + endY = endPos.y; + } + + // Find start/end cells + startCell = getCell(startX, startY); + endCell = getCell(endX, endY); + + // Check if the cells exists and if they are of the same part for example tbody = tbody + if (startCell && endCell && startCell.part == endCell.part) { + // Split and rebuild grid + split(); + buildGrid(); + + // Set row/col span to start cell + startCell = getCell(startX, startY).elm; + setSpanVal(startCell, 'colSpan', (endX - startX) + 1); + setSpanVal(startCell, 'rowSpan', (endY - startY) + 1); + + // Remove other cells and add it's contents to the start cell + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + if (!grid[y] || !grid[y][x]) + continue; + + cell = grid[y][x].elm; + + if (cell != startCell) { + // Move children to startCell + children = tinymce.grep(cell.childNodes); + each(children, function(node) { + startCell.appendChild(node); + }); + + // Remove bogus nodes if there is children in the target cell + if (children.length) { + children = tinymce.grep(startCell.childNodes); + count = 0; + each(children, function(node) { + if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1) + startCell.removeChild(node); + }); + } + + // Remove cell + dom.remove(cell); + } + } + } + + // Remove empty rows etc and restore caret location + cleanup(); + } + }; + + function insertRow(before) { + var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan; + + // Find first/last row + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell)) { + cell = cell.elm; + rowElm = cell.parentNode; + newRow = cloneNode(rowElm, false); + posY = y; + + if (before) + return false; + } + }); + + if (before) + return !posY; + }); + + for (x = 0; x < grid[0].length; x++) { + // Cell not found could be because of an invalid table structure + if (!grid[posY][x]) + continue; + + cell = grid[posY][x].elm; + + if (cell != lastCell) { + if (!before) { + rowSpan = getSpanVal(cell, 'rowspan'); + if (rowSpan > 1) { + setSpanVal(cell, 'rowSpan', rowSpan + 1); + continue; + } + } else { + // Check if cell above can be expanded + if (posY > 0 && grid[posY - 1][x]) { + otherCell = grid[posY - 1][x].elm; + rowSpan = getSpanVal(otherCell, 'rowSpan'); + if (rowSpan > 1) { + setSpanVal(otherCell, 'rowSpan', rowSpan + 1); + continue; + } + } + } + + // Insert new cell into new row + newCell = cloneCell(cell); + setSpanVal(newCell, 'colSpan', cell.colSpan); + + newRow.appendChild(newCell); + + lastCell = cell; + } + } + + if (newRow.hasChildNodes()) { + if (!before) + dom.insertAfter(newRow, rowElm); + else + rowElm.parentNode.insertBefore(newRow, rowElm); + } + }; + + function insertCol(before) { + var posX, lastCell; + + // Find first/last column + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell)) { + posX = x; + + if (before) + return false; + } + }); + + if (before) + return !posX; + }); + + each(grid, function(row, y) { + var cell, rowSpan, colSpan; + + if (!row[posX]) + return; + + cell = row[posX].elm; + if (cell != lastCell) { + colSpan = getSpanVal(cell, 'colspan'); + rowSpan = getSpanVal(cell, 'rowspan'); + + if (colSpan == 1) { + if (!before) { + dom.insertAfter(cloneCell(cell), cell); + fillLeftDown(posX, y, rowSpan - 1, colSpan); + } else { + cell.parentNode.insertBefore(cloneCell(cell), cell); + fillLeftDown(posX, y, rowSpan - 1, colSpan); + } + } else + setSpanVal(cell, 'colSpan', cell.colSpan + 1); + + lastCell = cell; + } + }); + }; + + function deleteCols() { + var cols = []; + + // Get selected column indexes + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) { + each(grid, function(row) { + var cell = row[x].elm, colSpan; + + colSpan = getSpanVal(cell, 'colSpan'); + + if (colSpan > 1) + setSpanVal(cell, 'colSpan', colSpan - 1); + else + dom.remove(cell); + }); + + cols.push(x); + } + }); + }); + + cleanup(); + }; + + function deleteRows() { + var rows; + + function deleteRow(tr) { + var nextTr, pos, lastCell; + + nextTr = dom.getNext(tr, 'tr'); + + // Move down row spanned cells + each(tr.cells, function(cell) { + var rowSpan = getSpanVal(cell, 'rowSpan'); + + if (rowSpan > 1) { + setSpanVal(cell, 'rowSpan', rowSpan - 1); + pos = getPos(cell); + fillLeftDown(pos.x, pos.y, 1, 1); + } + }); + + // Delete cells + pos = getPos(tr.cells[0]); + each(grid[pos.y], function(cell) { + var rowSpan; + + cell = cell.elm; + + if (cell != lastCell) { + rowSpan = getSpanVal(cell, 'rowSpan'); + + if (rowSpan <= 1) + dom.remove(cell); + else + setSpanVal(cell, 'rowSpan', rowSpan - 1); + + lastCell = cell; + } + }); + }; + + // Get selected rows and move selection out of scope + rows = getSelectedRows(); + + // Delete all selected rows + each(rows.reverse(), function(tr) { + deleteRow(tr); + }); + + cleanup(); + }; + + function cutRows() { + var rows = getSelectedRows(); + + dom.remove(rows); + cleanup(); + + return rows; + }; + + function copyRows() { + var rows = getSelectedRows(); + + each(rows, function(row, i) { + rows[i] = cloneNode(row, true); + }); + + return rows; + }; + + function pasteRows(rows, before) { + var selectedRows = getSelectedRows(), + targetRow = selectedRows[before ? 0 : selectedRows.length - 1], + targetCellCount = targetRow.cells.length; + + // Calc target cell count + each(grid, function(row) { + var match; + + targetCellCount = 0; + each(row, function(cell, x) { + if (cell.real) + targetCellCount += cell.colspan; + + if (cell.elm.parentNode == targetRow) + match = 1; + }); + + if (match) + return false; + }); + + if (!before) + rows.reverse(); + + each(rows, function(row) { + var cellCount = row.cells.length, cell; + + // Remove col/rowspans + for (i = 0; i < cellCount; i++) { + cell = row.cells[i]; + setSpanVal(cell, 'colSpan', 1); + setSpanVal(cell, 'rowSpan', 1); + } + + // Needs more cells + for (i = cellCount; i < targetCellCount; i++) + row.appendChild(cloneCell(row.cells[cellCount - 1])); + + // Needs less cells + for (i = targetCellCount; i < cellCount; i++) + dom.remove(row.cells[i]); + + // Add before/after + if (before) + targetRow.parentNode.insertBefore(row, targetRow); + else + dom.insertAfter(row, targetRow); + }); + }; + + function getPos(target) { + var pos; + + each(grid, function(row, y) { + each(row, function(cell, x) { + if (cell.elm == target) { + pos = {x : x, y : y}; + return false; + } + }); + + return !pos; + }); + + return pos; + }; + + function setStartCell(cell) { + startPos = getPos(cell); + }; + + function findEndPos() { + var pos, maxX, maxY; + + maxX = maxY = 0; + + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan; + + if (isCellSelected(cell)) { + cell = grid[y][x]; + + if (x > maxX) + maxX = x; + + if (y > maxY) + maxY = y; + + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; + + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } + + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + }); + }); + + return {x : maxX, y : maxY}; + }; + + function setEndCell(cell) { + var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan; + + endPos = getPos(cell); + + if (startPos && endPos) { + // Get start/end positions + startX = Math.min(startPos.x, endPos.x); + startY = Math.min(startPos.y, endPos.y); + endX = Math.max(startPos.x, endPos.x); + endY = Math.max(startPos.y, endPos.y); + + // Expand end positon to include spans + maxX = endX; + maxY = endY; + + // Expand startX + for (y = startY; y <= maxY; y++) { + cell = grid[y][startX]; + + if (!cell.real) { + if (startX - (cell.colspan - 1) < startX) + startX -= cell.colspan - 1; + } + } + + // Expand startY + for (x = startX; x <= maxX; x++) { + cell = grid[startY][x]; + + if (!cell.real) { + if (startY - (cell.rowspan - 1) < startY) + startY -= cell.rowspan - 1; + } + } + + // Find max X, Y + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + cell = grid[y][x]; + + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; + + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } + + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + } + + // Remove current selection + dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + + // Add new selection + for (y = startY; y <= maxY; y++) { + for (x = startX; x <= maxX; x++) { + if (grid[y][x]) + dom.addClass(grid[y][x].elm, 'mceSelected'); + } + } + } + }; + + // Expose to public + tinymce.extend(this, { + deleteTable : deleteTable, + split : split, + merge : merge, + insertRow : insertRow, + insertCol : insertCol, + deleteCols : deleteCols, + deleteRows : deleteRows, + cutRows : cutRows, + copyRows : copyRows, + pasteRows : pasteRows, + getPos : getPos, + setStartCell : setStartCell, + setEndCell : setEndCell + }); + }; + + tinymce.create('tinymce.plugins.TablePlugin', { + init : function(ed, url) { + var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload + + function createTableGrid(node) { + var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table'); + + if (tblElm) + return new TableGrid(tblElm, ed.dom, selection); + }; + + function cleanup() { + // Restore selection possibilities + ed.getBody().style.webkitUserSelect = ''; + + if (hasCellSelection) { + ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + hasCellSelection = false; + } + }; + + // Register buttons + each([ + ['table', 'table.desc', 'mceInsertTable', true], + ['delete_table', 'table.del', 'mceTableDelete'], + ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], + ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], + ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], + ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], + ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], + ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], + ['row_props', 'table.row_desc', 'mceTableRowProps', true], + ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], + ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], + ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] + ], function(c) { + ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); + }); + + // Select whole table is a table border is clicked + if (!tinymce.isIE) { + ed.onClick.add(function(ed, e) { + e = e.target; + + if (e.nodeName === 'TABLE') { + ed.selection.select(e); + ed.nodeChanged(); + } + }); + } + + ed.onPreProcess.add(function(ed, args) { + var nodes, i, node, dom = ed.dom, value; + + nodes = dom.select('table', args.node); + i = nodes.length; + while (i--) { + node = nodes[i]; + dom.setAttrib(node, 'data-mce-style', ''); + + if ((value = dom.getAttrib(node, 'width'))) { + dom.setStyle(node, 'width', value); + dom.setAttrib(node, 'width', ''); + } + + if ((value = dom.getAttrib(node, 'height'))) { + dom.setStyle(node, 'height', value); + dom.setAttrib(node, 'height', ''); + } + } + }); + + // Handle node change updates + ed.onNodeChange.add(function(ed, cm, n) { + var p; + + n = ed.selection.getStart(); + p = ed.dom.getParent(n, 'td,th,caption'); + cm.setActive('table', n.nodeName === 'TABLE' || !!p); + + // Disable table tools if we are in caption + if (p && p.nodeName === 'CAPTION') + p = 0; + + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_col', !p); + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_row', !p); + cm.setDisabled('col_after', !p); + cm.setDisabled('col_before', !p); + cm.setDisabled('row_after', !p); + cm.setDisabled('row_before', !p); + cm.setDisabled('row_props', !p); + cm.setDisabled('cell_props', !p); + cm.setDisabled('split_cells', !p); + cm.setDisabled('merge_cells', !p); + }); + + ed.onInit.add(function(ed) { + var startTable, startCell, dom = ed.dom, tableGrid; + + winMan = ed.windowManager; + + // Add cell selection logic + ed.onMouseDown.add(function(ed, e) { + if (e.button != 2) { + cleanup(); + + startCell = dom.getParent(e.target, 'td,th'); + startTable = dom.getParent(startCell, 'table'); + } + }); + + dom.bind(ed.getDoc(), 'mouseover', function(e) { + var sel, table, target = e.target; + + if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) { + table = dom.getParent(target, 'table'); + if (table == startTable) { + if (!tableGrid) { + tableGrid = createTableGrid(table); + tableGrid.setStartCell(startCell); + + ed.getBody().style.webkitUserSelect = 'none'; + } + + tableGrid.setEndCell(target); + hasCellSelection = true; + } + + // Remove current selection + sel = ed.selection.getSel(); + + try { + if (sel.removeAllRanges) + sel.removeAllRanges(); + else + sel.empty(); + } catch (ex) { + // IE9 might throw errors here + } + + e.preventDefault(); + } + }); + + ed.onMouseUp.add(function(ed, e) { + var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode; + + // Move selection to startCell + if (startCell) { + if (tableGrid) + ed.getBody().style.webkitUserSelect = ''; + + function setPoint(node, start) { + var walker = new tinymce.dom.TreeWalker(node, node); + + do { + // Text node + if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { + if (start) + rng.setStart(node, 0); + else + rng.setEnd(node, node.nodeValue.length); + + return; + } + + // BR element + if (node.nodeName == 'BR') { + if (start) + rng.setStartBefore(node); + else + rng.setEndBefore(node); + + return; + } + } while (node = (start ? walker.next() : walker.prev())); + } + + // Try to expand text selection as much as we can only Gecko supports cell selection + selectedCells = dom.select('td.mceSelected,th.mceSelected'); + if (selectedCells.length > 0) { + rng = dom.createRng(); + node = selectedCells[0]; + endNode = selectedCells[selectedCells.length - 1]; + rng.setStartBefore(node); + rng.setEndAfter(node); + + setPoint(node, 1); + walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table')); + + do { + if (node.nodeName == 'TD' || node.nodeName == 'TH') { + if (!dom.hasClass(node, 'mceSelected')) + break; + + lastNode = node; + } + } while (node = walker.next()); + + setPoint(lastNode); + + sel.setRng(rng); + } + + ed.nodeChanged(); + startCell = tableGrid = startTable = null; + } + }); + + ed.onKeyUp.add(function(ed, e) { + cleanup(); + }); + + ed.onKeyDown.add(function (ed, e) { + fixTableCellSelection(ed); + }); + + ed.onMouseDown.add(function (ed, e) { + if (e.button != 2) { + fixTableCellSelection(ed); + } + }); + function tableCellSelected(ed, rng, n, currentCell) { + // The decision of when a table cell is selected is somewhat involved. The fact that this code is + // required is actually a pointer to the root cause of this bug. A cell is selected when the start + // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases) + // or the parent of the table (in the case of the selection containing the last cell of a table). + var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'), + tableParent, allOfCellSelected, tableCellSelection; + if (table) + tableParent = table.parentNode; + allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE && + rng.startOffset == 0 && + rng.endOffset == 0 && + currentCell && + (n.nodeName=="TR" || n==tableParent); + tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell; + return allOfCellSelected || tableCellSelection; + // return false; + } + + // this nasty hack is here to work around some WebKit selection bugs. + function fixTableCellSelection(ed) { + if (!tinymce.isWebKit) + return; + + var rng = ed.selection.getRng(); + var n = ed.selection.getNode(); + var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH'); + + if (!tableCellSelected(ed, rng, n, currentCell)) + return; + if (!currentCell) { + currentCell=n; + } + + // Get the very last node inside the table cell + var end = currentCell.lastChild; + while (end.lastChild) + end = end.lastChild; + + // Select the entire table cell. Nothing outside of the table cell should be selected. + rng.setEnd(end, end.nodeValue.length); + ed.selection.setRng(rng); + } + ed.plugins.table.fixTableCellSelection=fixTableCellSelection; + + // Add context menu + if (ed && ed.plugins.contextmenu) { + ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { + var sm, se = ed.selection, el = se.getNode() || ed.getBody(); + + if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) { + m.removeAll(); + + if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { + m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); + m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); + m.addSeparator(); + } + + if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { + m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); + m.addSeparator(); + } + + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}}); + m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'}); + m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'}); + m.addSeparator(); + + // Cell menu + sm = m.addMenu({title : 'table.cell'}); + sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'}); + sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'}); + sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'}); + + // Row menu + sm = m.addMenu({title : 'table.row'}); + sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'}); + sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); + sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); + sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); + sm.addSeparator(); + sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); + sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); + sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows); + sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows); + + // Column menu + sm = m.addMenu({title : 'table.col'}); + sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); + sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); + sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); + } else + m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'}); + }); + } + + // Fix to allow navigating up and down in a table in WebKit browsers. + if (tinymce.isWebKit) { + function moveSelection(ed, e) { + var VK = tinymce.VK; + var key = e.keyCode; + + function handle(upBool, sourceNode, event) { + var siblingDirection = upBool ? 'previousSibling' : 'nextSibling'; + var currentRow = ed.dom.getParent(sourceNode, 'tr'); + var siblingRow = currentRow[siblingDirection]; + + if (siblingRow) { + moveCursorToRow(ed, sourceNode, siblingRow, upBool); + tinymce.dom.Event.cancel(event); + return true; + } else { + var tableNode = ed.dom.getParent(currentRow, 'table'); + var middleNode = currentRow.parentNode; + var parentNodeName = middleNode.nodeName.toLowerCase(); + if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) { + var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody'); + if (targetParent !== null) { + return moveToRowInTarget(upBool, targetParent, sourceNode, event); + } + } + return escapeTable(upBool, currentRow, siblingDirection, tableNode, event); + } + } + + function getTargetParent(upBool, topNode, secondNode, nodeName) { + var tbodies = ed.dom.select('>' + nodeName, topNode); + var position = tbodies.indexOf(secondNode); + if (upBool && position === 0 || !upBool && position === tbodies.length - 1) { + return getFirstHeadOrFoot(upBool, topNode); + } else if (position === -1) { + var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1; + return tbodies[topOrBottom]; + } else { + return tbodies[position + (upBool ? -1 : 1)]; + } + } + + function getFirstHeadOrFoot(upBool, parent) { + var tagName = upBool ? 'thead' : 'tfoot'; + var headOrFoot = ed.dom.select('>' + tagName, parent); + return headOrFoot.length !== 0 ? headOrFoot[0] : null; + } + + function moveToRowInTarget(upBool, targetParent, sourceNode, event) { + var targetRow = getChildForDirection(targetParent, upBool); + targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool); + tinymce.dom.Event.cancel(event); + return true; + } + + function escapeTable(upBool, currentRow, siblingDirection, table, event) { + var tableSibling = table[siblingDirection]; + if (tableSibling) { + moveCursorToStartOfElement(tableSibling); + return true; + } else { + var parentCell = ed.dom.getParent(table, 'td,th'); + if (parentCell) { + return handle(upBool, parentCell, event); + } else { + var backUpSibling = getChildForDirection(currentRow, !upBool); + moveCursorToStartOfElement(backUpSibling); + return tinymce.dom.Event.cancel(event); + } + } + } + + function getChildForDirection(parent, up) { + var child = parent && parent[up ? 'lastChild' : 'firstChild']; + // BR is not a valid table child to return in this case we return the table cell + return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child; + } + + function moveCursorToStartOfElement(n) { + ed.selection.setCursorLocation(n, 0); + } + + function isVerticalMovement() { + return key == VK.UP || key == VK.DOWN; + } + + function isInTable(ed) { + var node = ed.selection.getNode(); + var currentRow = ed.dom.getParent(node, 'tr'); + return currentRow !== null; + } + + function columnIndex(column) { + var colIndex = 0; + var c = column; + while (c.previousSibling) { + c = c.previousSibling; + colIndex = colIndex + getSpanVal(c, "colspan"); + } + return colIndex; + } + + function findColumn(rowElement, columnIndex) { + var c = 0; + var r = 0; + each(rowElement.children, function(cell, i) { + c = c + getSpanVal(cell, "colspan"); + r = i; + if (c > columnIndex) + return false; + }); + return r; + } + + function moveCursorToRow(ed, node, row, upBool) { + var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th')); + var tgtColumnIndex = findColumn(row, srcColumnIndex); + var tgtNode = row.childNodes[tgtColumnIndex]; + var rowCellTarget = getChildForDirection(tgtNode, upBool); + moveCursorToStartOfElement(rowCellTarget || tgtNode); + } + + function shouldFixCaret(preBrowserNode) { + var newNode = ed.selection.getNode(); + var newParent = ed.dom.getParent(newNode, 'td,th'); + var oldParent = ed.dom.getParent(preBrowserNode, 'td,th'); + return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent) + } + + function checkSameParentTable(nodeOne, NodeTwo) { + return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE'); + } + + if (isVerticalMovement() && isInTable(ed)) { + var preBrowserNode = ed.selection.getNode(); + setTimeout(function() { + if (shouldFixCaret(preBrowserNode)) { + handle(!e.shiftKey && key === VK.UP, preBrowserNode, e); + } + }, 0); + } + } + + ed.onKeyDown.add(moveSelection); + } + + // Fixes an issue on Gecko where it's impossible to place the caret behind a table + // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled + if (!tinymce.isIE) { + function fixTableCaretPos() { + var last; + + // Skip empty text nodes form the end + for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; + + if (last && last.nodeName == 'TABLE') + ed.dom.add(ed.getBody(), 'p', null, '
    '); + }; + + // Fixes an bug where it's impossible to place the caret before a table in Gecko + // this fix solves it by detecting when the caret is at the beginning of such a table + // and then manually moves the caret infront of the table + if (tinymce.isGecko) { + ed.onKeyDown.add(function(ed, e) { + var rng, table, dom = ed.dom; + + // On gecko it's not possible to place the caret before a table + if (e.keyCode == 37 || e.keyCode == 38) { + rng = ed.selection.getRng(); + table = dom.getParent(rng.startContainer, 'table'); + + if (table && ed.getBody().firstChild == table) { + if (isAtStart(rng, table)) { + rng = dom.createRng(); + + rng.setStartBefore(table); + rng.setEndBefore(table); + + ed.selection.setRng(rng); + + e.preventDefault(); + } + } + } + }); + } + + ed.onKeyUp.add(fixTableCaretPos); + ed.onSetContent.add(fixTableCaretPos); + ed.onVisualAid.add(fixTableCaretPos); + + ed.onPreProcess.add(function(ed, o) { + var last = o.node.lastChild; + + if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') + ed.dom.remove(last); + }); + + + /** + * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line + */ + if (tinymce.isGecko) { + ed.onKeyDown.add(function(ed, e) { + if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) { + var node = ed.selection.getRng().startContainer; + var tableCell = dom.getParent(node, 'td,th'); + if (tableCell) { + var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF"); + dom.insertAfter(zeroSizedNbsp, node); + } + } + }); + } + + + fixTableCaretPos(); + ed.startContent = ed.getContent({format : 'raw'}); + } + }); + + // Register action commands + each({ + mceTableSplitCells : function(grid) { + grid.split(); + }, + + mceTableMergeCells : function(grid) { + var rowSpan, colSpan, cell; + + cell = ed.dom.getParent(ed.selection.getNode(), 'th,td'); + if (cell) { + rowSpan = cell.rowSpan; + colSpan = cell.colSpan; + } + + if (!ed.dom.select('td.mceSelected,th.mceSelected').length) { + winMan.open({ + url : url + '/merge_cells.htm', + width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)), + height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)), + inline : 1 + }, { + rows : rowSpan, + cols : colSpan, + onaction : function(data) { + grid.merge(cell, data.cols, data.rows); + }, + plugin_url : url + }); + } else + grid.merge(); + }, + + mceTableInsertRowBefore : function(grid) { + grid.insertRow(true); + }, + + mceTableInsertRowAfter : function(grid) { + grid.insertRow(); + }, + + mceTableInsertColBefore : function(grid) { + grid.insertCol(true); + }, + + mceTableInsertColAfter : function(grid) { + grid.insertCol(); + }, + + mceTableDeleteCol : function(grid) { + grid.deleteCols(); + }, + + mceTableDeleteRow : function(grid) { + grid.deleteRows(); + }, + + mceTableCutRow : function(grid) { + clipboardRows = grid.cutRows(); + }, + + mceTableCopyRow : function(grid) { + clipboardRows = grid.copyRows(); + }, + + mceTablePasteRowBefore : function(grid) { + grid.pasteRows(clipboardRows, true); + }, + + mceTablePasteRowAfter : function(grid) { + grid.pasteRows(clipboardRows); + }, + + mceTableDelete : function(grid) { + grid.deleteTable(); + } + }, function(func, name) { + ed.addCommand(name, function() { + var grid = createTableGrid(); + + if (grid) { + func(grid); + ed.execCommand('mceRepaint'); + cleanup(); + } + }); + }); + + // Register dialog commands + each({ + mceInsertTable : function(val) { + winMan.open({ + url : url + '/table.htm', + width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)), + height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + action : val ? val.action : 0 + }); + }, + + mceTableRowProps : function() { + winMan.open({ + url : url + '/row.htm', + width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }, + + mceTableCellProps : function() { + winMan.open({ + url : url + '/cell.htm', + width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + } + }, function(func, name) { + ed.addCommand(name, function(ui, val) { + func(val); + }); + }); + } + }); + + // Register plugin + tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); +})(tinymce); diff --git a/library/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js b/library/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js old mode 100755 new mode 100644 index b5fc1fda3d..d6f3290599 --- a/library/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js @@ -63,6 +63,11 @@ function init() { function updateAction() { var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; + if (!AutoValidator.validate(formObj)) { + tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.'); + return false; + } + tinyMCEPopup.restoreSelection(); el = ed.selection.getStart(); tdElm = ed.dom.getParent(el, "td,th"); @@ -83,8 +88,6 @@ function updateAction() { return; } - ed.execCommand('mceBeginUndoLevel'); - switch (getSelectValue(formObj, 'action')) { case "cell": var celltype = getSelectValue(formObj, 'celltype'); @@ -125,6 +128,36 @@ function updateAction() { break; + case "col": + var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr"); + + if (cell.nodeName != "TD" && cell.nodeName != "TH") + cell = nextCell(cell); + + do { + if (cell == tdElm) + break; + col += cell.getAttribute("colspan"); + } while ((cell = nextCell(cell)) != null); + + for (var i=0; i - +
    {#table_dlg.merge_cells_title} -
     
    - - - - - - - - -
    {#table_dlg.cols}:
    {#table_dlg.rows}:
    + + + + + + + + + +
    :
    :
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/table/row.htm b/library/tinymce/jscripts/tiny_mce/plugins/table/row.htm old mode 100755 new mode 100644 index 092e6c8270..1885401f6b --- a/library/tinymce/jscripts/tiny_mce/plugins/table/row.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/table/row.htm @@ -5,16 +5,17 @@ + - + @@ -23,7 +24,7 @@
    {#table_dlg.general_props} - +
    - +
    @@ -70,7 +71,7 @@
    @@ -80,7 +81,7 @@
    {#table_dlg.advanced_props} - +
    @@ -112,7 +113,7 @@
    - +
    @@ -122,14 +123,16 @@ - +
     
    - + +
     
    +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/table/table.htm b/library/tinymce/jscripts/tiny_mce/plugins/table/table.htm old mode 100755 new mode 100644 index f269039228..b92fa741eb --- a/library/tinymce/jscripts/tiny_mce/plugins/table/table.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/table/table.htm @@ -10,12 +10,13 @@ - + + @@ -23,48 +24,48 @@
    {#table_dlg.general_props} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    @@ -72,7 +73,7 @@
    {#table_dlg.advanced_props} - +
    @@ -98,7 +99,7 @@
    - +
    @@ -150,10 +151,10 @@ - - + + "}else{e+=""}if(f&&j.ListBox){if(f.Button||f.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,""))}}}g="mceToolbarEnd";if(j.Button){g+=" mceToolbarEndButton"}else{if(j.SplitButton){g+=" mceToolbarEndSplitButton"}else{if(j.ListBox){g+=" mceToolbarEndListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,""));return b.createHTML("table",{id:l.id,"class":"mceToolbar"+(m["class"]?" "+m["class"]:""),cellpadding:"0",cellspacing:"0",align:l.settings.align||""},""+e+"")}});(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{items:[],urls:{},lookup:{},onAdd:new a(this),get:function(d){return this.lookup[d]},requireLangPack:function(e){var d=b.settings;if(d&&d.language){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));b.ScriptLoader.add(e,d,g)}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir';if(F.document_base_url!=m.documentBaseURL){E.iframeHTML+=''}E.iframeHTML+='';if(m.relaxedDomain){E.iframeHTML+=''; + t.iframeHTML += ''; + + // Load the CSS by injecting them into the HTML this will reduce "flicker" + for (i = 0; i < t.contentCSS.length; i++) { + t.iframeHTML += ''; + } + + t.contentCSS = []; bi = s.body_id || 'tinymce'; if (bi.indexOf('=') != -1) { @@ -9567,33 +12357,35 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { bc = bc[t.id] || ''; } - t.iframeHTML += ''; + t.iframeHTML += '
    '; // Domain relaxing enabled, then set document domain - if (tinymce.relaxedDomain) { + if (tinymce.relaxedDomain && (isIE || (tinymce.isOpera && parseFloat(opera.version()) < 11))) { // We need to write the contents here in IE since multiple writes messes up refresh button and back button - if (isIE || (tinymce.isOpera && parseFloat(opera.version()) >= 9.5)) - u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";var ed = window.parent.tinyMCE.get("' + t.id + '");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'; - else if (tinymce.isOpera) - u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";document.close();ed.setupIframe();})()'; + u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";var ed = window.parent.tinyMCE.get("' + t.id + '");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'; } // Create iframe - n = DOM.add(o.iframeContainer, 'iframe', { + // TODO: ACC add the appropriate description on this. + n = DOM.add(o.iframeContainer, 'iframe', { id : t.id + "_ifr", src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 frameBorder : '0', + allowTransparency : "true", + title : s.aria_label, style : { width : '100%', - height : h + height : h, + display : 'block' // Important for Gecko to render the iframe correctly } }); t.contentAreaContainer = o.iframeContainer; DOM.get(o.editorContainer).style.display = t.orgDisplay; DOM.get(t.id).style.display = 'none'; + DOM.setAttrib(t.id, 'aria-hidden', true); - if (!isIE || !tinymce.relaxedDomain) + if (!tinymce.relaxedDomain || !u) t.setupIframe(); e = n = o = null; // Cleanup @@ -9607,30 +12399,21 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { d.open(); d.write(t.iframeHTML); d.close(); + + if (tinymce.relaxedDomain) + d.domain = tinymce.relaxedDomain; } - // Design mode needs to be added here Ctrl+A will fail otherwise - if (!isIE) { - try { - if (!s.readonly) - d.designMode = 'On'; - } catch (ex) { - // Will fail on Gecko if the editor is placed in an hidden container element - // The design mode will be set ones the editor is focused - } - } + // It will not steal focus while setting contentEditable + b = t.getBody(); + b.disabled = true; - // IE needs to use contentEditable or it will display non secure items for HTTPS - if (isIE) { - // It will not steal focus if we hide it while setting contentEditable - b = t.getBody(); - DOM.hide(b); + if (!s.readonly) + b.contentEditable = true; - if (!s.readonly) - b.contentEditable = true; + b.disabled = false; - DOM.show(b); - } + t.schema = new tinymce.html.Schema(s); t.dom = new tinymce.dom.DOMUtils(t.getDoc(), { keep_values : true, @@ -9640,16 +12423,85 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { class_filter : s.class_filter, update_styles : 1, fix_ie_paragraphs : 1, - valid_styles : s.valid_styles + schema : t.schema }); - t.schema = new tinymce.dom.Schema(); + t.parser = new tinymce.html.DomParser(s, t.schema); - t.serializer = new tinymce.dom.Serializer(extend(s, { - valid_elements : s.verify_html === false ? '*[*]' : s.valid_elements, - dom : t.dom, - schema : t.schema - })); + // Force anchor names closed, unless the setting "allow_html_in_named_anchor" is explicitly included. + if (!t.settings.allow_html_in_named_anchor) { + t.parser.addAttributeFilter('name', function(nodes, name) { + var i = nodes.length, sibling, prevSibling, parent, node; + + while (i--) { + node = nodes[i]; + if (node.name === 'a' && node.firstChild) { + parent = node.parent; + + // Move children after current node + sibling = node.lastChild; + do { + prevSibling = sibling.prev; + parent.insert(sibling, node); + sibling = prevSibling; + } while (sibling); + } + } + }); + } + + // Convert src and href into data-mce-src, data-mce-href and data-mce-style + t.parser.addAttributeFilter('src,href,style', function(nodes, name) { + var i = nodes.length, node, dom = t.dom, value, internalName; + + while (i--) { + node = nodes[i]; + value = node.attr(name); + internalName = 'data-mce-' + name; + + // Add internal attribute if we need to we don't on a refresh of the document + if (!node.attributes.map[internalName]) { + if (name === "style") + node.attr(internalName, dom.serializeStyle(dom.parseStyle(value), node.name)); + else + node.attr(internalName, t.convertURL(value, name, node.name)); + } + } + }); + + // Keep scripts from executing + t.parser.addNodeFilter('script', function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + node.attr('type', 'mce-' + (node.attr('type') || 'text/javascript')); + } + }); + + t.parser.addNodeFilter('#cdata', function(nodes, name) { + var i = nodes.length, node; + + while (i--) { + node = nodes[i]; + node.type = 8; + node.name = '#comment'; + node.value = '[CDATA[' + node.value + ']]'; + } + }); + + t.parser.addNodeFilter('p,h1,h2,h3,h4,h5,h6,div', function(nodes, name) { + var i = nodes.length, node, nonEmptyElements = t.schema.getNonEmptyElements(); + + while (i--) { + node = nodes[i]; + + if (node.isEmpty(nonEmptyElements)) + node.empty().append(new tinymce.html.Node('br', 1)).shortEnded = true; + } + }); + + t.serializer = new tinymce.dom.Serializer(s, t.dom, t.schema); t.selection = new tinymce.dom.Selection(t.dom, t.getWin(), t.serializer); @@ -9658,53 +12510,67 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Register default formats t.formatter.register({ alignleft : [ - {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'left'}}, - {selector : 'img,table', styles : {'float' : 'left'}} + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'left'}, defaultBlock: 'div'}, + {selector : 'img,table', collapsed : false, styles : {'float' : 'left'}} ], aligncenter : [ - {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'center'}}, - {selector : 'img', styles : {display : 'block', marginLeft : 'auto', marginRight : 'auto'}}, - {selector : 'table', styles : {marginLeft : 'auto', marginRight : 'auto'}} + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'center'}, defaultBlock: 'div'}, + {selector : 'img', collapsed : false, styles : {display : 'block', marginLeft : 'auto', marginRight : 'auto'}}, + {selector : 'table', collapsed : false, styles : {marginLeft : 'auto', marginRight : 'auto'}} ], alignright : [ - {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'right'}}, - {selector : 'img,table', styles : {'float' : 'right'}} + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'right'}, defaultBlock: 'div'}, + {selector : 'img,table', collapsed : false, styles : {'float' : 'right'}} ], alignfull : [ - {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'justify'}} + {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'justify'}, defaultBlock: 'div'} ], bold : [ - {inline : 'strong'}, + {inline : 'strong', remove : 'all'}, {inline : 'span', styles : {fontWeight : 'bold'}}, - {inline : 'b'} + {inline : 'b', remove : 'all'} ], italic : [ - {inline : 'em'}, + {inline : 'em', remove : 'all'}, {inline : 'span', styles : {fontStyle : 'italic'}}, - {inline : 'i'} + {inline : 'i', remove : 'all'} ], underline : [ {inline : 'span', styles : {textDecoration : 'underline'}, exact : true}, - {inline : 'u'} + {inline : 'u', remove : 'all'} ], strikethrough : [ {inline : 'span', styles : {textDecoration : 'line-through'}, exact : true}, - {inline : 'u'} + {inline : 'strike', remove : 'all'} ], - forecolor : {inline : 'span', styles : {color : '%value'}}, - hilitecolor : {inline : 'span', styles : {backgroundColor : '%value'}}, + forecolor : {inline : 'span', styles : {color : '%value'}, wrap_links : false}, + hilitecolor : {inline : 'span', styles : {backgroundColor : '%value'}, wrap_links : false}, fontname : {inline : 'span', styles : {fontFamily : '%value'}}, fontsize : {inline : 'span', styles : {fontSize : '%value'}}, fontsize_class : {inline : 'span', attributes : {'class' : '%value'}}, blockquote : {block : 'blockquote', wrapper : 1, remove : 'all'}, + subscript : {inline : 'sub'}, + superscript : {inline : 'sup'}, + + link : {inline : 'a', selector : 'a', remove : 'all', split : true, deep : true, + onmatch : function(node) { + return true; + }, + + onformat : function(elm, fmt, vars) { + each(vars, function(value, key) { + t.dom.setAttrib(elm, key, value); + }); + } + }, removeformat : [ {selector : 'b,strong,em,i,font,u,strike', remove : 'all', split : true, expand : false, block_expand : true, deep : true}, @@ -9725,7 +12591,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Pass through t.undoManager.onAdd.add(function(um, l) { - if (!l.initial) + if (um.hasUndo()) return t.onChange.dispatch(t, l, um); }); @@ -9737,9 +12603,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { return t.onRedo.dispatch(t, l, um); }); - t.forceBlocks = new tinymce.ForceBlocks(t, { - forced_root_block : s.forced_root_block - }); + t.forceBlocks = new tinymce.ForceBlocks(t); + t.enterKey = new tinymce.EnterKey(t); t.editorCommands = new tinymce.EditorCommands(t); @@ -9763,35 +12628,14 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.controlManager.onPostRender.dispatch(t, t.controlManager); t.onPostRender.dispatch(t); + t.quirks = new tinymce.util.Quirks(this); + if (s.directionality) t.getBody().dir = s.directionality; if (s.nowrap) t.getBody().style.whiteSpace = "nowrap"; - if (s.custom_elements) { - function handleCustom(ed, o) { - each(explode(s.custom_elements), function(v) { - var n; - - if (v.indexOf('~') === 0) { - v = v.substring(1); - n = 'span'; - } else - n = 'div'; - - o.content = o.content.replace(new RegExp('<(' + v + ')([^>]*)>', 'g'), '<' + n + ' _mce_name="$1"$2>'); - o.content = o.content.replace(new RegExp('', 'g'), ''); - }); - }; - - t.onBeforeSetContent.add(handleCustom); - t.onPostProcess.add(function(ed, o) { - if (o.set) - handleCustom(ed, o); - }); - } - if (s.handle_node_change_callback) { t.onNodeChange.add(function(ed, cm, n) { t.execCallback('handle_node_change_callback', t.id, n, -1, -1, true, t.selection.isCollapsed()); @@ -9813,6 +12657,18 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); } + if (s.protect) { + t.onBeforeSetContent.add(function(ed, o) { + if (s.protect) { + each(s.protect, function(pattern) { + o.content = o.content.replace(pattern, function(str) { + return ''; + }); + }); + } + }); + } + if (s.convert_newlines_to_brs) { t.onBeforeSetContent.add(function(ed, o) { if (o.initial) @@ -9820,12 +12676,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); } - if (s.fix_nesting && isIE) { - t.onBeforeSetContent.add(function(ed, o) { - o.content = t._fixNesting(o.content); - }); - } - if (s.preformatted) { t.onPostProcess.add(function(ed, o) { o.content = o.content.replace(/^\s*/, ''); @@ -9919,7 +12769,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var pn = n.parentNode; if (ed.dom.isBlock(pn) && pn.lastChild === n) - ed.dom.add(pn, 'br', {'_mce_bogus' : 1}); + ed.dom.add(pn, 'br', {'data-mce-bogus' : 1}); }); }; @@ -9929,72 +12779,61 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); t.onSetContent.add(t.selection.onSetContent.add(fixLinks)); - - if (!s.readonly) { - try { - // Design mode must be set here once again to fix a bug where - // Ctrl+A/Delete/Backspace didn't work if the editor was added using mceAddControl then removed then added again - d.designMode = 'Off'; - d.designMode = 'On'; - } catch (ex) { - // Will fail on Gecko if the editor is placed in an hidden container element - // The design mode will be set ones the editor is focused - } - } } - // A small timeout was needed since firefox will remove. Bug: #1838304 - setTimeout(function () { - if (t.removed) - return; + t.load({initial : true, format : 'html'}); + t.startContent = t.getContent({format : 'raw'}); + t.undoManager.add(); + t.initialized = true; - t.load({initial : true, format : (s.cleanup_on_startup ? 'html' : 'raw')}); - t.startContent = t.getContent({format : 'raw'}); - t.initialized = true; + t.onInit.dispatch(t); + t.execCallback('setupcontent_callback', t.id, t.getBody(), t.getDoc()); + t.execCallback('init_instance_callback', t); + t.focus(true); + t.nodeChanged({initial : 1}); - t.onInit.dispatch(t); - t.execCallback('setupcontent_callback', t.id, t.getBody(), t.getDoc()); - t.execCallback('init_instance_callback', t); - t.focus(true); - t.nodeChanged({initial : 1}); + // Load specified content CSS last + each(t.contentCSS, function(u) { + t.dom.loadCSS(u); + }); - // Load specified content CSS last - if (s.content_css) { - tinymce.each(explode(s.content_css), function(u) { - t.dom.loadCSS(t.documentBaseURI.toAbsolute(u)); - }); - } + // Handle auto focus + if (s.auto_focus) { + setTimeout(function () { + var ed = tinymce.get(s.auto_focus); - // Handle auto focus - if (s.auto_focus) { - setTimeout(function () { - var ed = tinymce.get(s.auto_focus); + ed.selection.select(ed.getBody(), 1); + ed.selection.collapse(1); + ed.getBody().focus(); + ed.getWin().focus(); + }, 100); + } - ed.selection.select(ed.getBody(), 1); - ed.selection.collapse(1); - ed.getWin().focus(); - }, 100); - } - }, 1); - e = null; }, focus : function(sf) { - var oed, t = this, ce = t.settings.content_editable, ieRng, controlElm, doc = t.getDoc(); + var oed, t = this, selection = t.selection, ce = t.settings.content_editable, ieRng, controlElm, doc = t.getDoc(); if (!sf) { // Get selected control element - ieRng = t.selection.getRng(); + ieRng = selection.getRng(); if (ieRng.item) { controlElm = ieRng.item(0); } + t._refreshContentEditable(); + // Is not content editable if (!ce) t.getWin().focus(); + // Focus the body as well since it's contentEditable + if (tinymce.isGecko) { + t.getBody().focus(); + } + // Restore selected control element // This is needed when for example an image is selected within a // layer a call to focus will then remove the control selection @@ -10079,7 +12918,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, nodeChanged : function(o) { - var t = this, s = t.selection, n = (isIE ? s.getNode() : s.getStart()) || t.getBody(); + var t = this, s = t.selection, n = s.getStart() || t.getBody(); // Fix for bug #1896577 it seems that this can not be fired while the editor is loading if (t.initialized) { @@ -10112,16 +12951,16 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.buttons[n] = s; }, - addCommand : function(n, f, s) { - this.execCommands[n] = {func : f, scope : s || this}; + addCommand : function(name, callback, scope) { + this.execCommands[name] = {func : callback, scope : scope || this}; }, - addQueryStateHandler : function(n, f, s) { - this.queryStateCommands[n] = {func : f, scope : s || this}; + addQueryStateHandler : function(name, callback, scope) { + this.queryStateCommands[name] = {func : callback, scope : scope || this}; }, - addQueryValueHandler : function(n, f, s) { - this.queryValueCommands[n] = {func : f, scope : s || this}; + addQueryValueHandler : function(name, callback, scope) { + this.queryValueCommands[name] = {func : callback, scope : scope || this}; }, addShortcut : function(pa, desc, cmd_func, sc) { @@ -10184,9 +13023,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd) && (!a || !a.skip_focus)) t.focus(); - o = {}; - t.onBeforeExecCommand.dispatch(t, cmd, ui, val, o); - if (o.terminate) + a = extend({}, a); + t.onBeforeExecCommand.dispatch(t, cmd, ui, val, a); + if (a.terminate) return false; // Command callback @@ -10224,12 +13063,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { return true; } - // Execute global commands - if (tinymce.GlobalCommands.execCommand(t, cmd, ui, val)) { - t.onExecCommand.dispatch(t, cmd, ui, val, a); - return true; - } - // Editor commands if (t.editorCommands.execCommand(cmd, ui, val)) { t.onExecCommand.dispatch(t, cmd, ui, val, a); @@ -10361,7 +13194,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Add undo level will trigger onchange event if (!o.no_events) { - t.undoManager.typing = 0; + t.undoManager.typing = false; t.undoManager.add(); } @@ -10393,66 +13226,87 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { return h; }, - setContent : function(h, o) { - var t = this; + setContent : function(content, args) { + var self = this, rootNode, body = self.getBody(), forcedRootBlockName; - o = o || {}; - o.format = o.format || 'html'; - o.set = true; - o.content = h; + // Setup args object + args = args || {}; + args.format = args.format || 'html'; + args.set = true; + args.content = content; - if (!o.no_events) - t.onBeforeSetContent.dispatch(t, o); + // Do preprocessing + if (!args.no_events) + self.onBeforeSetContent.dispatch(self, args); + + content = args.content; // Padd empty content in Gecko and Safari. Commands will otherwise fail on the content // It will also be impossible to place the caret in the editor unless there is a BR element present - if (!tinymce.isIE && (h.length === 0 || /^\s+$/.test(h))) { - o.content = t.dom.setHTML(t.getBody(), '
    '); - o.format = 'raw'; + if (!tinymce.isIE && (content.length === 0 || /^\s+$/.test(content))) { + forcedRootBlockName = self.settings.forced_root_block; + if (forcedRootBlockName) + content = '<' + forcedRootBlockName + '>
    '; + else + content = '
    '; + + body.innerHTML = content; + self.selection.select(body, true); + self.selection.collapse(true); + return; } - o.content = t.dom.setHTML(t.getBody(), tinymce.trim(o.content)); - - if (o.format != 'raw' && t.settings.cleanup) { - o.getInner = true; - o.content = t.dom.setHTML(t.getBody(), t.serializer.serialize(t.getBody(), o)); + // Parse and serialize the html + if (args.format !== 'raw') { + content = new tinymce.html.Serializer({}, self.schema).serialize( + self.parser.parse(content) + ); } - if (!o.no_events) - t.onSetContent.dispatch(t, o); + // Set the new cleaned contents to the editor + args.content = tinymce.trim(content); + self.dom.setHTML(body, args.content); - return o.content; + // Do post processing + if (!args.no_events) + self.onSetContent.dispatch(self, args); + + self.selection.normalize(); + + return args.content; }, - getContent : function(o) { - var t = this, h; + getContent : function(args) { + var self = this, content; - o = o || {}; - o.format = o.format || 'html'; - o.get = true; + // Setup args object + args = args || {}; + args.format = args.format || 'html'; + args.get = true; - if (!o.no_events) - t.onBeforeGetContent.dispatch(t, o); + // Do preprocessing + if (!args.no_events) + self.onBeforeGetContent.dispatch(self, args); - if (o.format != 'raw' && t.settings.cleanup) { - o.getInner = true; - h = t.serializer.serialize(t.getBody(), o); - } else - h = t.getBody().innerHTML; + // Get raw contents or by default the cleaned contents + if (args.format == 'raw') + content = self.getBody().innerHTML; + else + content = self.serializer.serialize(self.getBody(), args); - h = h.replace(/^\s*|\s*$/g, ''); - o.content = h; + args.content = tinymce.trim(content); - if (!o.no_events) - t.onGetContent.dispatch(t, o); + // Do post processing + if (!args.no_events) + self.onGetContent.dispatch(self, args); - return o.content; + return args.content; }, isDirty : function() { - var t = this; + var self = this; - return tinymce.trim(t.startContent) != tinymce.trim(t.getContent({format : 'raw', no_events : 1})) && !t.isNotDirty; + return tinymce.trim(self.startContent) != tinymce.trim(self.getContent({format : 'raw', no_events : 1})) && !self.isNotDirty; }, getContainer : function() { @@ -10567,17 +13421,32 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { remove : function() { var t = this, e = t.getContainer(); - t.removed = 1; // Cancels post remove event execution - t.hide(); + if (!t.removed) { + t.removed = 1; // Cancels post remove event execution + t.hide(); - t.execCallback('remove_instance_callback', t); - t.onRemove.dispatch(t); + // Remove all events - // Clear all execCommand listeners this is required to avoid errors if the editor was removed inside another command - t.onExecCommand.listeners = []; + // Don't clear the window or document if content editable + // is enabled since other instances might still be present + if (!t.settings.content_editable) { + Event.clear(t.getWin()); + Event.clear(t.getDoc()); + } - tinymce.remove(t); - DOM.remove(e); + Event.clear(t.getBody()); + Event.clear(t.formElement); + Event.unbind(e); + + t.execCallback('remove_instance_callback', t); + t.onRemove.dispatch(t); + + // Clear all execCommand listeners this is required to avoid errors if the editor was removed inside another command + t.onExecCommand.listeners = []; + + tinymce.remove(t); + DOM.remove(e); + } }, destroy : function(s) { @@ -10587,6 +13456,13 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (t.destroyed) return; + // We must unbind on Gecko since it would otherwise produce the pesky "attempt to run compile-and-go script on a cleared scope" message + if (isGecko) { + Event.unbind(t.getDoc()); + Event.unbind(t.getWin()); + Event.unbind(t.getBody()); + } + if (!s) { tinymce.removeUnload(t.destroy); tinyMCE.onBeforeUnload.remove(t._beforeUnload); @@ -10599,18 +13475,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.controlManager.destroy(); t.selection.destroy(); t.dom.destroy(); - - // Remove all events - - // Don't clear the window or document if content editable - // is enabled since other instances might still be present - if (!t.settings.content_editable) { - Event.clear(t.getWin()); - Event.clear(t.getDoc()); - } - - Event.clear(t.getBody()); - Event.clear(t.formElement); } if (t.formElement) { @@ -10630,7 +13494,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { _addEvents : function() { // 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset - var t = this, i, s = t.settings, lo = { + var t = this, i, s = t.settings, dom = t.dom, lo = { mouseup : 'onMouseUp', mousedown : 'onMouseDown', click : 'onClick', @@ -10662,35 +13526,26 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { each(lo, function(v, k) { switch (k) { case 'contextmenu': - if (tinymce.isOpera) { - // Fake contextmenu on Opera - t.dom.bind(t.getBody(), 'mousedown', function(e) { - if (e.ctrlKey) { - e.fakeType = 'contextmenu'; - eventHandler(e); - } - }); - } else - t.dom.bind(t.getBody(), k, eventHandler); + dom.bind(t.getDoc(), k, eventHandler); break; case 'paste': - t.dom.bind(t.getBody(), k, function(e) { + dom.bind(t.getBody(), k, function(e) { eventHandler(e); }); break; case 'submit': case 'reset': - t.dom.bind(t.getElement().form || DOM.getParent(t.id, 'form'), k, eventHandler); + dom.bind(t.getElement().form || DOM.getParent(t.id, 'form'), k, eventHandler); break; default: - t.dom.bind(s.content_editable ? t.getBody() : t.getDoc(), k, eventHandler); + dom.bind(s.content_editable ? t.getBody() : t.getDoc(), k, eventHandler); } }); - t.dom.bind(s.content_editable ? t.getBody() : (isGecko ? t.getDoc() : t.getWin()), 'focus', function(e) { + dom.bind(s.content_editable ? t.getBody() : (isGecko ? t.getDoc() : t.getWin()), 'focus', function(e) { t.focus(true); }); @@ -10698,22 +13553,12 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Fixes bug where a specified document_base_uri could result in broken images // This will also fix drag drop of images in Gecko if (tinymce.isGecko) { - // Convert all images to absolute URLs -/* t.onSetContent.add(function(ed, o) { - each(ed.dom.select('img'), function(e) { - var v; - - if (v = e.getAttribute('_mce_src')) - e.src = t.documentBaseURI.toAbsolute(v); - }) - });*/ - - t.dom.bind(t.getDoc(), 'DOMNodeInserted', function(e) { + dom.bind(t.getDoc(), 'DOMNodeInserted', function(e) { var v; e = e.target; - if (e.nodeType === 1 && e.nodeName === 'IMG' && (v = e.getAttribute('_mce_src'))) + if (e.nodeType === 1 && e.nodeName === 'IMG' && (v = e.getAttribute('data-mce-src'))) e.src = t.documentBaseURI.toAbsolute(v); }); } @@ -10724,14 +13569,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var t = this, d = t.getDoc(), s = t.settings; if (isGecko && !s.readonly) { - if (t._isHidden()) { - try { - if (!s.content_editable) - d.designMode = 'On'; - } catch (ex) { - // Fails if it's hidden - } - } + t._refreshContentEditable(); try { // Try new Gecko method @@ -10754,19 +13592,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.onMouseDown.add(setOpts); } - // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 - // WebKit can't even do simple things like selecting an image - // This also fixes so it's possible to select mceItemAnchors - if (tinymce.isWebKit) { - t.onClick.add(function(ed, e) { - e = e.target; - - // Needs tobe the setBaseAndExtend or it will fail to select floated images - if (e.nodeName == 'IMG' || (e.nodeName == 'A' && t.dom.hasClass(e, 'mceItemAnchor'))) - t.selection.getSel().setBaseAndExtent(e, 0, e, 1); - }); - } - // Add node change handlers t.onMouseUp.add(t.nodeChanged); //t.onClick.add(t.nodeChanged); @@ -10777,6 +13602,37 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { t.nodeChanged(); }); + + // Add block quote deletion handler + t.onKeyDown.add(function(ed, e) { + if (e.keyCode != VK.BACKSPACE) + return; + + var rng = ed.selection.getRng(); + if (!rng.collapsed) + return; + + var n = rng.startContainer; + var offset = rng.startOffset; + + while (n && n.nodeType && n.nodeType != 1 && n.parentNode) + n = n.parentNode; + + // Is the cursor at the beginning of a blockquote? + if (n && n.parentNode && n.parentNode.tagName === 'BLOCKQUOTE' && n.parentNode.firstChild == n && offset == 0) { + // Remove the blockquote + ed.formatter.toggle('blockquote', null, n.parentNode); + + // Move the caret to the beginning of n + rng.setStart(n, 0); + rng.setEnd(n, 0); + ed.selection.setRng(rng); + ed.selection.collapse(false); + } + }); + + + // Add reset handler t.onReset.add(function() { t.setContent(t.startContent, {format : 'raw'}); @@ -10798,9 +13654,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { for (i=1; i<=6; i++) t.addShortcut('ctrl+' + i, '', ['FormatBlock', false, 'h' + i]); - t.addShortcut('ctrl+7', '', ['FormatBlock', false, '

    ']); - t.addShortcut('ctrl+8', '', ['FormatBlock', false, '

    ']); - t.addShortcut('ctrl+9', '', ['FormatBlock', false, '
    ']); + t.addShortcut('ctrl+7', '', ['FormatBlock', false, 'p']); + t.addShortcut('ctrl+8', '', ['FormatBlock', false, 'div']); + t.addShortcut('ctrl+9', '', ['FormatBlock', false, 'address']); function find(e) { var v = null; @@ -10856,7 +13712,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (tinymce.isIE) { // Fix so resize will only update the width and height attributes not the styles of an image // It will also block mceItemNoResize items - t.dom.bind(t.getDoc(), 'controlselect', function(e) { + dom.bind(t.getDoc(), 'controlselect', function(e) { var re = t.resizeInfo, cb; e = e.target; @@ -10866,28 +13722,28 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { return; if (re) - t.dom.unbind(re.node, re.ev, re.cb); + dom.unbind(re.node, re.ev, re.cb); - if (!t.dom.hasClass(e, 'mceItemNoResize')) { + if (!dom.hasClass(e, 'mceItemNoResize')) { ev = 'resizeend'; - cb = t.dom.bind(e, ev, function(e) { + cb = dom.bind(e, ev, function(e) { var v; e = e.target; - if (v = t.dom.getStyle(e, 'width')) { - t.dom.setAttrib(e, 'width', v.replace(/[^0-9%]+/g, '')); - t.dom.setStyle(e, 'width', ''); + if (v = dom.getStyle(e, 'width')) { + dom.setAttrib(e, 'width', v.replace(/[^0-9%]+/g, '')); + dom.setStyle(e, 'width', ''); } - if (v = t.dom.getStyle(e, 'height')) { - t.dom.setAttrib(e, 'height', v.replace(/[^0-9%]+/g, '')); - t.dom.setStyle(e, 'height', ''); + if (v = dom.getStyle(e, 'height')) { + dom.setAttrib(e, 'height', v.replace(/[^0-9%]+/g, '')); + dom.setStyle(e, 'height', ''); } }); } else { ev = 'resizestart'; - cb = t.dom.bind(e, 'resizestart', Event.cancel, Event); + cb = dom.bind(e, 'resizestart', Event.cancel, Event); } re = t.resizeInfo = { @@ -10896,27 +13752,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { cb : cb }; }); - - t.onKeyDown.add(function(ed, e) { - switch (e.keyCode) { - case 8: - // Fix IE control + backspace browser bug - if (t.selection.getRng().item) { - ed.dom.remove(t.selection.getRng().item(0)); - return Event.cancel(e); - } - } - }); - - /*if (t.dom.boxModel) { - t.getBody().style.height = '100%'; - - Event.add(t.getWin(), 'resize', function(e) { - var docElm = t.getDoc().documentElement; - - docElm.style.height = (docElm.offsetHeight - 10) + 'px'; - }); - }*/ } if (tinymce.isOpera) { @@ -10928,81 +13763,62 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Add custom undo/redo handlers if (s.custom_undo_redo) { function addUndo() { - t.undoManager.typing = 0; + t.undoManager.typing = false; t.undoManager.add(); }; - t.dom.bind(t.getDoc(), 'focusout', function(e) { + var focusLostFunc = tinymce.isGecko ? 'blur' : 'focusout'; + dom.bind(t.getDoc(), focusLostFunc, function(e){ if (!t.removed && t.undoManager.typing) addUndo(); }); + // Add undo level when contents is drag/dropped within the editor + t.dom.bind(t.dom.getRoot(), 'dragend', function(e) { + addUndo(); + }); + t.onKeyUp.add(function(ed, e) { - if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.ctrlKey) + var keyCode = e.keyCode; + + if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || keyCode == 45 || e.ctrlKey) addUndo(); }); t.onKeyDown.add(function(ed, e) { - var rng, tmpRng, parent, offset; + var keyCode = e.keyCode, sel; - // IE has a really odd bug where the DOM might include an node that doesn't have - // a proper structure. If you try to access nodeValue it would throw an illegal value exception. - // This seems to only happen when you delete contents and it seems to be avoidable if you refresh the element - // after you delete contents from it. See: #3008923 - if (isIE && e.keyCode == 46) { - rng = t.selection.getRng(); + if (keyCode == 8) { + sel = t.getDoc().selection; - if (rng.parentElement) { - parent = rng.parentElement(); + // Fix IE control + backspace browser bug + if (sel && sel.createRange && sel.createRange().item) { + t.undoManager.beforeChange(); + ed.dom.remove(sel.createRange().item(0)); + addUndo(); - // Get the current caret position within the element - tmpRng = rng.duplicate(); - tmpRng.moveToElementText(parent); - tmpRng.setEndPoint('EndToEnd', rng); - offset = tmpRng.text.length; - - // Select next word when ctrl key is used in combo with delete - if (e.ctrlKey) { - rng.moveEnd('word', 1); - rng.select(); - } - - // Delete contents - t.selection.getSel().clear(); - - // Check if we are within the same parent - if (rng.parentElement() == parent) { - try { - // Update the HTML and hopefully it will remove the artifacts - parent.innerHTML = parent.innerHTML; - } catch (ex) { - // And since it's IE it can sometimes produce an unknown runtime error - } - - // Restore the caret position - tmpRng.moveToElementText(parent); - tmpRng.collapse(); - tmpRng.move('character', offset); - tmpRng.select(); - } - - // Block the default delete behavior since it might be broken - e.preventDefault(); - return; + return Event.cancel(e); } } - // Is caracter positon keys - if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45) { + // Is caracter positon keys left,right,up,down,home,end,pgdown,pgup,enter + if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || keyCode == 45) { + // Add position before enter key is pressed, used by IE since it still uses the default browser behavior + // Todo: Remove this once we normalize enter behavior on IE + if (tinymce.isIE && keyCode == 13) + t.undoManager.beforeChange(); + if (t.undoManager.typing) addUndo(); return; } - if (!t.undoManager.typing) { + // If key isn't shift,ctrl,alt,capslock,metakey + if ((keyCode < 16 || keyCode > 20) && keyCode != 224 && keyCode != 91 && !t.undoManager.typing) { + t.undoManager.beforeChange(); + t.undoManager.typing = true; t.undoManager.add(); - t.undoManager.typing = 1; } }); @@ -11013,6 +13829,21 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } }, + _refreshContentEditable : function() { + var self = this, body, parent; + + // Check if the editor was hidden and the re-initalize contentEditable mode by removing and adding the body again + if (self._isHidden()) { + body = self.getBody(); + parent = body.parentNode; + + parent.removeChild(body); + parent.appendChild(body); + + body.focus(); + } + }, + _isHidden : function() { var s; @@ -11022,57 +13853,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Weird, wheres that cursor selection? s = this.selection.getSel(); return (!s || !s.rangeCount || s.rangeCount == 0); - }, - - // Fix for bug #1867292 - _fixNesting : function(s) { - var d = [], i; - - s = s.replace(/<(\/)?([^\s>]+)[^>]*?>/g, function(a, b, c) { - var e; - - // Handle end element - if (b === '/') { - if (!d.length) - return ''; - - if (c !== d[d.length - 1].tag) { - for (i=d.length - 1; i>=0; i--) { - if (d[i].tag === c) { - d[i].close = 1; - break; - } - } - - return ''; - } else { - d.pop(); - - if (d.length && d[d.length - 1].close) { - a = a + ''; - d.pop(); - } - } - } else { - // Ignore these - if (/^(br|hr|input|meta|img|link|param)$/i.test(c)) - return a; - - // Ignore closed ones - if (/\/>$/.test(a)) - return a; - - d.push({tag : c}); // Push start element - } - - return a; - }); - - // End all open tags - for (i=d.length - 1; i>=0; i--) - s += ''; - - return s; } }); })(tinymce); @@ -11086,6 +13866,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { selection = editor.selection, commands = {state: {}, exec : {}, value : {}}, settings = editor.settings, + formatter = editor.formatter, bookmark; function execCommand(command, ui, value) { @@ -11151,11 +13932,11 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }; function isFormatMatch(name) { - return editor.formatter.match(name); + return formatter.match(name); }; function toggleFormat(name, value) { - editor.formatter.toggle(name, value ? {value : value} : undefined); + formatter.toggle(name, value ? {value : value} : undefined); }; function storeSelection(type) { @@ -11215,10 +13996,11 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Remove all other alignments first each('left,center,right,full'.split(','), function(name) { if (align != name) - editor.formatter.remove('align' + name); + formatter.remove('align' + name); }); toggleFormat('align' + align); + execCommand('mceRepaint'); }, // Override list commands to fix WebKit bug @@ -11244,7 +14026,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, // Override commands to use the text formatter engine - 'Bold,Italic,Underline,Strikethrough' : function(command) { + 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) { toggleFormat(command); }, @@ -11271,7 +14053,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, RemoveFormat : function(command) { - editor.formatter.remove(command); + formatter.remove(command); }, mceBlockQuote : function(command) { @@ -11279,7 +14061,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, FormatBlock : function(command, ui, value) { - return toggleFormat(value); + return toggleFormat(value || 'p'); }, mceCleanup : function() { @@ -11317,12 +14099,140 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, mceInsertContent : function(command, ui, value) { - selection.setContent(value); + var parser, serializer, parentNode, rootNode, fragment, args, + marker, nodeRect, viewPortRect, rng, node, node2, bookmarkHtml, viewportBodyElement; + + //selection.normalize(); + + // Setup parser and serializer + parser = editor.parser; + serializer = new tinymce.html.Serializer({}, editor.schema); + bookmarkHtml = '\uFEFF'; + + // Run beforeSetContent handlers on the HTML to be inserted + args = {content: value, format: 'html'}; + selection.onBeforeSetContent.dispatch(selection, args); + value = args.content; + + // Add caret at end of contents if it's missing + if (value.indexOf('{$caret}') == -1) + value += '{$caret}'; + + // Replace the caret marker with a span bookmark element + value = value.replace(/\{\$caret\}/, bookmarkHtml); + + // Insert node maker where we will insert the new HTML and get it's parent + if (!selection.isCollapsed()) + editor.getDoc().execCommand('Delete', false, null); + + parentNode = selection.getNode(); + + // Parse the fragment within the context of the parent node + args = {context : parentNode.nodeName.toLowerCase()}; + fragment = parser.parse(value, args); + + // Move the caret to a more suitable location + node = fragment.lastChild; + if (node.attr('id') == 'mce_marker') { + marker = node; + + for (node = node.prev; node; node = node.walk(true)) { + if (node.type == 3 || !dom.isBlock(node.name)) { + node.parent.insert(marker, node, node.name === 'br'); + break; + } + } + } + + // If parser says valid we can insert the contents into that parent + if (!args.invalid) { + value = serializer.serialize(fragment); + + // Check if parent is empty or only has one BR element then set the innerHTML of that parent + node = parentNode.firstChild; + node2 = parentNode.lastChild; + if (!node || (node === node2 && node.nodeName === 'BR')) + dom.setHTML(parentNode, value); + else + selection.setContent(value); + } else { + // If the fragment was invalid within that context then we need + // to parse and process the parent it's inserted into + + // Insert bookmark node and get the parent + selection.setContent(bookmarkHtml); + parentNode = editor.selection.getNode(); + rootNode = editor.getBody(); + + // Opera will return the document node when selection is in root + if (parentNode.nodeType == 9) + parentNode = node = rootNode; + else + node = parentNode; + + // Find the ancestor just before the root element + while (node !== rootNode) { + parentNode = node; + node = node.parentNode; + } + + // Get the outer/inner HTML depending on if we are in the root and parser and serialize that + value = parentNode == rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode); + value = serializer.serialize( + parser.parse( + // Need to replace by using a function since $ in the contents would otherwise be a problem + value.replace(//i, function() { + return serializer.serialize(fragment); + }) + ) + ); + + // Set the inner/outer HTML depending on if we are in the root or not + if (parentNode == rootNode) + dom.setHTML(rootNode, value); + else + dom.setOuterHTML(parentNode, value); + } + + marker = dom.get('mce_marker'); + + // Scroll range into view scrollIntoView on element can't be used since it will scroll the main view port as well + nodeRect = dom.getRect(marker); + viewPortRect = dom.getViewPort(editor.getWin()); + + // Check if node is out side the viewport if it is then scroll to it + if ((nodeRect.y + nodeRect.h > viewPortRect.y + viewPortRect.h || nodeRect.y < viewPortRect.y) || + (nodeRect.x > viewPortRect.x + viewPortRect.w || nodeRect.x < viewPortRect.x)) { + viewportBodyElement = tinymce.isIE ? editor.getDoc().documentElement : editor.getBody(); + viewportBodyElement.scrollLeft = nodeRect.x; + viewportBodyElement.scrollTop = nodeRect.y - viewPortRect.h + 25; + } + + // Move selection before marker and remove it + rng = dom.createRng(); + + // If previous sibling is a text node set the selection to the end of that node + node = marker.previousSibling; + if (node && node.nodeType == 3) { + rng.setStart(node, node.nodeValue.length); + } else { + // If the previous sibling isn't a text node or doesn't exist set the selection before the marker node + rng.setStartBefore(marker); + rng.setEndBefore(marker); + } + + // Remove the marker node and set the new range + dom.remove(marker); + selection.setRng(rng); + + // Dispatch after event and add any visual elements needed + selection.onSetContent.dispatch(selection, args); + editor.addVisual(); }, mceInsertRawHTML : function(command, ui, value) { selection.setContent('tiny_mce_marker'); - editor.setContent(editor.getContent().replace(/tiny_mce_marker/g, value)); + editor.setContent(editor.getContent().replace(/tiny_mce_marker/g, function() { return value })); }, mceSetContent : function(command, ui, value) { @@ -11338,6 +14248,11 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { intentValue = parseInt(intentValue); if (!queryCommandState('InsertUnorderedList') && !queryCommandState('InsertOrderedList')) { + // If forced_root_blocks is set to false we don't have a block to indent so lets create a div + if (!settings.forced_root_block && !dom.getParent(selection.getNode(), dom.isBlock)) { + formatter.apply('div'); + } + each(selection.getSelectedBlocks(), function(element) { if (command == 'outdent') { value = Math.max(0, parseInt(element.style.paddingLeft || 0) - intentValue); @@ -11368,11 +14283,11 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, mceToggleFormat : function(command, ui, value) { - editor.formatter.toggle(value); + formatter.toggle(value); }, InsertHorizontalRule : function() { - selection.setContent('
    '); + editor.execCommand('mceInsertContent', false, '
    '); }, mceToggleVisualAid : function() { @@ -11381,33 +14296,37 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, mceReplaceContent : function(command, ui, value) { - selection.setContent(value.replace(/\{\$selection\}/g, selection.getContent({format : 'text'}))); + editor.execCommand('mceInsertContent', false, value.replace(/\{\$selection\}/g, selection.getContent({format : 'text'}))); }, mceInsertLink : function(command, ui, value) { - var link = dom.getParent(selection.getNode(), 'a'); + var anchor; - if (tinymce.is(value, 'string')) + if (typeof(value) == 'string') value = {href : value}; - if (!link) { - execNativeCommand('CreateLink', FALSE, 'javascript:mctmp(0);'); - each(dom.select('a[href=javascript:mctmp(0);]'), function(link) { - dom.setAttribs(link, value); - }); - } else { - if (value.href) - dom.setAttribs(link, value); - else - editor.dom.remove(link, TRUE); + anchor = dom.getParent(selection.getNode(), 'a'); + + // Spaces are never valid in URLs and it's a very common mistake for people to make so we fix it here. + value.href = value.href.replace(' ', '%20'); + + // Remove existing links if there could be child links or that the href isn't specified + if (!anchor || !value.href) { + formatter.remove('link'); + } + + // Apply new link to selection + if (value.href) { + formatter.apply('link', value, anchor); } }, - + selectAll : function() { - var root = dom.getRoot(); - var rng = dom.createRng(); + var root = dom.getRoot(), rng = dom.createRng(); + rng.setStart(root, 0); rng.setEnd(root, root.childNodes.length); + editor.selection.setRng(rng); } }); @@ -11416,10 +14335,17 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { addCommands({ // Override justify commands 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) { - return isFormatMatch('align' + command.substring(7)); + var name = 'align' + command.substring(7); + // Use Formatter.matchNode instead of Formatter.match so that we don't match on parent node. This fixes bug where for both left + // and right align buttons can be active. This could occur when selected nodes have align right and the parent has align left. + var nodes = selection.isCollapsed() ? [selection.getNode()] : selection.getSelectedBlocks(); + var matches = tinymce.map(nodes, function(node) { + return !!formatter.matchNode(node, name); + }); + return tinymce.inArray(matches, TRUE) !== -1; }, - 'Bold,Italic,Underline,Strikethrough' : function(command) { + 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) { return isFormatMatch(command); }, @@ -11476,23 +14402,31 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } }; })(tinymce); + (function(tinymce) { var Dispatcher = tinymce.util.Dispatcher; tinymce.UndoManager = function(editor) { - var self, index = 0, data = []; + var self, index = 0, data = [], beforeBookmark; function getContent() { - return tinymce.trim(editor.getContent({format : 'raw', no_events : 1})); + // Remove whitespace before/after and remove pure bogus nodes + return tinymce.trim(editor.getContent({format : 'raw', no_events : 1}).replace(/]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g, '')); }; return self = { - typing : 0, + typing : false, onAdd : new Dispatcher(self), + onUndo : new Dispatcher(self), + onRedo : new Dispatcher(self), + beforeChange : function() { + beforeBookmark = editor.selection.getBookmark(2, true); + }, + add : function(level) { var i, settings = editor.settings, lastLevel; @@ -11501,10 +14435,12 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Add undo level if needed lastLevel = data[index]; - if (lastLevel && lastLevel.content == level.content) { - if (index > 0 || data.length == 1) - return null; - } + if (lastLevel && lastLevel.content == level.content) + return null; + + // Set before bookmark on previous level + if (data[index]) + data[index].beforeBookmark = beforeBookmark; // Time to compress if (settings.custom_undo_redo_levels) { @@ -11521,13 +14457,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { level.bookmark = editor.selection.getBookmark(2, true); // Crop array if needed - if (index < data.length - 1) { - // Treat first level as initial - if (index == 0) - data = []; - else - data.length = index + 1; - } + if (index < data.length - 1) + data.length = index + 1; data.push(level); index = data.length - 1; @@ -11543,14 +14474,14 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (self.typing) { self.add(); - self.typing = 0; + self.typing = false; } if (index > 0) { level = data[--index]; editor.setContent(level.content, {format : 'raw'}); - editor.selection.moveToBookmark(level.bookmark); + editor.selection.moveToBookmark(level.beforeBookmark); self.onUndo.dispatch(self, level); } @@ -11575,758 +14506,110 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { clear : function() { data = []; - index = self.typing = 0; + index = 0; + self.typing = false; }, hasUndo : function() { - return index > 0 || self.typing; + return index > 0 || this.typing; }, hasRedo : function() { - return index < data.length - 1; + return index < data.length - 1 && !this.typing; } }; }; })(tinymce); -(function(tinymce) { - // Shorten names - var Event = tinymce.dom.Event, - isIE = tinymce.isIE, - isGecko = tinymce.isGecko, - isOpera = tinymce.isOpera, - each = tinymce.each, - extend = tinymce.extend, - TRUE = true, - FALSE = false; +tinymce.ForceBlocks = function(editor) { + var settings = editor.settings, dom = editor.dom, selection = editor.selection, blockElements = editor.schema.getBlockElements(); - function cloneFormats(node) { - var clone, temp, inner; + // Force root blocks + if (settings.forced_root_block) { + function addRootBlocks() { + var node = selection.getStart(), rootNode = editor.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF; - do { - if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(node.nodeName)) { - if (clone) { - temp = node.cloneNode(false); - temp.appendChild(clone); - clone = temp; - } else { - clone = inner = node.cloneNode(false); - } + if (!node || node.nodeType !== 1 || !settings.forced_root_block) + return; - clone.removeAttribute('id'); - } - } while (node = node.parentNode); + // Check if node is wrapped in block + while (node != rootNode) { + if (blockElements[node.nodeName]) + return; - if (clone) - return {wrapper : clone, inner : inner}; - }; - - // Checks if the selection/caret is at the end of the specified block element - function isAtEnd(rng, par) { - var rng2 = par.ownerDocument.createRange(); - - rng2.setStart(rng.endContainer, rng.endOffset); - rng2.setEndAfter(par); - - // Get number of characters to the right of the cursor if it's zero then we are at the end and need to merge the next block element - return rng2.cloneContents().textContent.length == 0; - }; - - function isEmpty(n) { - n = n.innerHTML; - - n = n.replace(/<(img|hr|table|input|select|textarea)[ \>]/gi, '-'); // Keep these convert them to - chars - n = n.replace(/<[^>]+>/g, ''); // Remove all tags - - return n.replace(/[ \u00a0\t\r\n]+/g, '') == ''; - }; - - function splitList(selection, dom, li) { - var listBlock, block; - - if (isEmpty(li)) { - listBlock = dom.getParent(li, 'ul,ol'); - - if (!dom.getParent(listBlock.parentNode, 'ul,ol')) { - dom.split(listBlock, li); - block = dom.create('p', 0, '
    '); - dom.replace(block, li); - selection.select(block, 1); + node = node.parentNode; } - return FALSE; - } - - return TRUE; - }; - - tinymce.create('tinymce.ForceBlocks', { - ForceBlocks : function(ed) { - var t = this, s = ed.settings, elm; - - t.editor = ed; - t.dom = ed.dom; - elm = (s.forced_root_block || 'p').toLowerCase(); - s.element = elm.toUpperCase(); - - ed.onPreInit.add(t.setup, t); - - t.reOpera = new RegExp('(\\u00a0| | )<\/' + elm + '>', 'gi'); - t.rePadd = new RegExp(']+)><\\\/p>|]+)\\\/>|]+)>\\s+<\\\/p>|

    <\\\/p>||

    \\s+<\\\/p>'.replace(/p/g, elm), 'gi'); - t.reNbsp2BR1 = new RegExp(']+)>[\\s\\u00a0]+<\\\/p>|

    [\\s\\u00a0]+<\\\/p>'.replace(/p/g, elm), 'gi'); - t.reNbsp2BR2 = new RegExp('<%p()([^>]+)>( | )<\\\/%p>|<%p>( | )<\\\/%p>'.replace(/%p/g, elm), 'gi'); - t.reBR2Nbsp = new RegExp(']+)>\\s*
    \\s*<\\\/p>|

    \\s*
    \\s*<\\\/p>'.replace(/p/g, elm), 'gi'); - - function padd(ed, o) { - if (isOpera) - o.content = o.content.replace(t.reOpera, ''); - - o.content = o.content.replace(t.rePadd, '<' + elm + '$1$2$3$4$5$6>\u00a0'); - - if (!isIE && !isOpera && o.set) { - // Use   instead of BR in padded paragraphs - o.content = o.content.replace(t.reNbsp2BR1, '<' + elm + '$1$2>
    '); - o.content = o.content.replace(t.reNbsp2BR2, '<' + elm + '$1$2>
    '); - } else - o.content = o.content.replace(t.reBR2Nbsp, '<' + elm + '$1$2>\u00a0'); - }; - - ed.onBeforeSetContent.add(padd); - ed.onPostProcess.add(padd); - - if (s.forced_root_block) { - ed.onInit.add(t.forceRoots, t); - ed.onSetContent.add(t.forceRoots, t); - ed.onBeforeGetContent.add(t.forceRoots, t); - } - }, - - setup : function() { - var t = this, ed = t.editor, s = ed.settings, dom = ed.dom, selection = ed.selection; - - // Force root blocks when typing and when getting output - if (s.forced_root_block) { - ed.onBeforeExecCommand.add(t.forceRoots, t); - ed.onKeyUp.add(t.forceRoots, t); - ed.onPreProcess.add(t.forceRoots, t); - } - - if (s.force_br_newlines) { - // Force IE to produce BRs on enter - if (isIE) { - ed.onKeyPress.add(function(ed, e) { - var n; - - if (e.keyCode == 13 && selection.getNode().nodeName != 'LI') { - selection.setContent('
    ', {format : 'raw'}); - n = dom.get('__'); - n.removeAttribute('id'); - selection.select(n); - selection.collapse(); - return Event.cancel(e); - } - }); - } - } - - if (s.force_p_newlines) { - if (!isIE) { - ed.onKeyPress.add(function(ed, e) { - if (e.keyCode == 13 && !e.shiftKey && !t.insertPara(e)) - Event.cancel(e); - }); - } else { - // Ungly hack to for IE to preserve the formatting when you press - // enter at the end of a block element with formatted contents - // This logic overrides the browsers default logic with - // custom logic that enables us to control the output - tinymce.addUnload(function() { - t._previousFormats = 0; // Fix IE leak - }); - - ed.onKeyPress.add(function(ed, e) { - t._previousFormats = 0; - - // Clone the current formats, this will later be applied to the new block contents - if (e.keyCode == 13 && !e.shiftKey && ed.selection.isCollapsed() && s.keep_styles) - t._previousFormats = cloneFormats(ed.selection.getStart()); - }); - - ed.onKeyUp.add(function(ed, e) { - // Let IE break the element and the wrap the new caret location in the previous formats - if (e.keyCode == 13 && !e.shiftKey) { - var parent = ed.selection.getStart(), fmt = t._previousFormats; - - // Parent is an empty block - if (!parent.hasChildNodes()) { - parent = dom.getParent(parent, dom.isBlock); - - if (parent) { - parent.innerHTML = ''; - - if (t._previousFormats) { - parent.appendChild(fmt.wrapper); - fmt.inner.innerHTML = '\uFEFF'; - } else - parent.innerHTML = '\uFEFF'; - - selection.select(parent, 1); - ed.getDoc().execCommand('Delete', false, null); - } - } - } - }); - } - - if (isGecko) { - ed.onKeyDown.add(function(ed, e) { - if ((e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) - t.backspaceDelete(e, e.keyCode == 8); - }); - } - } - - // Workaround for missing shift+enter support, http://bugs.webkit.org/show_bug.cgi?id=16973 - if (tinymce.isWebKit) { - function insertBr(ed) { - var rng = selection.getRng(), br, div = dom.create('div', null, ' '), divYPos, vpHeight = dom.getViewPort(ed.getWin()).h; - - // Insert BR element - rng.insertNode(br = dom.create('br')); - - // Place caret after BR - rng.setStartAfter(br); - rng.setEndAfter(br); - selection.setRng(rng); - - // Could not place caret after BR then insert an nbsp entity and move the caret - if (selection.getSel().focusNode == br.previousSibling) { - selection.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'), br)); - selection.collapse(TRUE); - } - - // Create a temporary DIV after the BR and get the position as it - // seems like getPos() returns 0 for text nodes and BR elements. - dom.insertAfter(div, br); - divYPos = dom.getPos(div).y; - dom.remove(div); - - // Scroll to new position, scrollIntoView can't be used due to bug: http://bugs.webkit.org/show_bug.cgi?id=16117 - if (divYPos > vpHeight) // It is not necessary to scroll if the DIV is inside the view port. - ed.getWin().scrollTo(0, divYPos); - }; - - ed.onKeyPress.add(function(ed, e) { - if (e.keyCode == 13 && (e.shiftKey || (s.force_br_newlines && !dom.getParent(selection.getNode(), 'h1,h2,h3,h4,h5,h6,ol,ul')))) { - insertBr(ed); - Event.cancel(e); - } - }); - } - - // Padd empty inline elements within block elements - // For example:

    becomes

     

    - ed.onPreProcess.add(function(ed, o) { - each(dom.select('p,h1,h2,h3,h4,h5,h6,div', o.node), function(p) { - if (isEmpty(p)) { - each(dom.select('span,em,strong,b,i', o.node), function(n) { - if (!n.hasChildNodes()) { - n.appendChild(ed.getDoc().createTextNode('\u00a0')); - return FALSE; // Break the loop one padding is enough - } - }); - } - }); - }); - - // IE specific fixes - if (isIE) { - // Replaces IE:s auto generated paragraphs with the specified element name - if (s.element != 'P') { - ed.onKeyPress.add(function(ed, e) { - t.lastElm = selection.getNode().nodeName; - }); - - ed.onKeyUp.add(function(ed, e) { - var bl, n = selection.getNode(), b = ed.getBody(); - - if (b.childNodes.length === 1 && n.nodeName == 'P') { - n = dom.rename(n, s.element); - selection.select(n); - selection.collapse(); - ed.nodeChanged(); - } else if (e.keyCode == 13 && !e.shiftKey && t.lastElm != 'P') { - bl = dom.getParent(n, 'p'); - - if (bl) { - dom.rename(bl, s.element); - ed.nodeChanged(); - } - } - }); - } - } - }, - - find : function(n, t, s) { - var ed = this.editor, w = ed.getDoc().createTreeWalker(n, 4, null, FALSE), c = -1; - - while (n = w.nextNode()) { - c++; - - // Index by node - if (t == 0 && n == s) - return c; - - // Node by index - if (t == 1 && c == s) - return n; - } - - return -1; - }, - - forceRoots : function(ed, e) { - var t = this, ed = t.editor, b = ed.getBody(), d = ed.getDoc(), se = ed.selection, s = se.getSel(), r = se.getRng(), si = -2, ei, so, eo, tr, c = -0xFFFFFF; - var nx, bl, bp, sp, le, nl = b.childNodes, i, n, eid; - - // Fix for bug #1863847 - //if (e && e.keyCode == 13) - // return TRUE; - - // Wrap non blocks into blocks - for (i = nl.length - 1; i >= 0; i--) { - nx = nl[i]; - - // Ignore internal elements - if (nx.nodeType === 1 && nx.getAttribute('_mce_type')) { - bl = null; - continue; - } - - // Is text or non block element - if (nx.nodeType === 3 || (!t.dom.isBlock(nx) && nx.nodeType !== 8 && !/^(script|mce:script|style|mce:style)$/i.test(nx.nodeName))) { - if (!bl) { - // Create new block but ignore whitespace - if (nx.nodeType != 3 || /[^\s]/g.test(nx.nodeValue)) { - // Store selection - if (si == -2 && r) { - if (!isIE) { - // If selection is element then mark it - if (r.startContainer.nodeType == 1 && (n = r.startContainer.childNodes[r.startOffset]) && n.nodeType == 1) { - // Save the id of the selected element - eid = n.getAttribute("id"); - n.setAttribute("id", "__mce"); - } else { - // If element is inside body, might not be the case in contentEdiable mode - if (ed.dom.getParent(r.startContainer, function(e) {return e === b;})) { - so = r.startOffset; - eo = r.endOffset; - si = t.find(b, 0, r.startContainer); - ei = t.find(b, 0, r.endContainer); - } - } - } else { - // Force control range into text range - if (r.item) { - tr = d.body.createTextRange(); - tr.moveToElementText(r.item(0)); - r = tr; - } - - tr = d.body.createTextRange(); - tr.moveToElementText(b); - tr.collapse(1); - bp = tr.move('character', c) * -1; - - tr = r.duplicate(); - tr.collapse(1); - sp = tr.move('character', c) * -1; - - tr = r.duplicate(); - tr.collapse(0); - le = (tr.move('character', c) * -1) - sp; - - si = sp - bp; - ei = le; - } - } - - // Uses replaceChild instead of cloneNode since it removes selected attribute from option elements on IE - // See: http://support.microsoft.com/kb/829907 - bl = ed.dom.create(ed.settings.forced_root_block); - nx.parentNode.replaceChild(bl, nx); - bl.appendChild(nx); - } - } else { - if (bl.hasChildNodes()) - bl.insertBefore(nx, bl.firstChild); - else - bl.appendChild(nx); - } - } else - bl = null; // Time to create new block - } - - // Restore selection - if (si != -2) { - if (!isIE) { - bl = b.getElementsByTagName(ed.settings.element)[0]; - r = d.createRange(); - - // Select last location or generated block - if (si != -1) - r.setStart(t.find(b, 1, si), so); - else - r.setStart(bl, 0); - - // Select last location or generated block - if (ei != -1) - r.setEnd(t.find(b, 1, ei), eo); - else - r.setEnd(bl, 0); - - if (s) { - s.removeAllRanges(); - s.addRange(r); - } - } else { - try { - r = s.createRange(); - r.moveToElementText(b); - r.collapse(1); - r.moveStart('character', si); - r.moveEnd('character', ei); - r.select(); - } catch (ex) { - // Ignore - } - } - } else if (!isIE && (n = ed.dom.get('__mce'))) { - // Restore the id of the selected element - if (eid) - n.setAttribute('id', eid); - else - n.removeAttribute('id'); - - // Move caret before selected element - r = d.createRange(); - r.setStartBefore(n); - r.setEndBefore(n); - se.setRng(r); - } - }, - - getParentBlock : function(n) { - var d = this.dom; - - return d.getParent(n, d.isBlock); - }, - - insertPara : function(e) { - var t = this, ed = t.editor, dom = ed.dom, d = ed.getDoc(), se = ed.settings, s = ed.selection.getSel(), r = s.getRangeAt(0), b = d.body; - var rb, ra, dir, sn, so, en, eo, sb, eb, bn, bef, aft, sc, ec, n, vp = dom.getViewPort(ed.getWin()), y, ch, car; - - // If root blocks are forced then use Operas default behavior since it's really good -// Removed due to bug: #1853816 -// if (se.forced_root_block && isOpera) -// return TRUE; - - // Setup before range - rb = d.createRange(); - - // If is before the first block element and in body, then move it into first block element - rb.setStart(s.anchorNode, s.anchorOffset); - rb.collapse(TRUE); - - // Setup after range - ra = d.createRange(); - - // If is before the first block element and in body, then move it into first block element - ra.setStart(s.focusNode, s.focusOffset); - ra.collapse(TRUE); - - // Setup start/end points - dir = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; - sn = dir ? s.anchorNode : s.focusNode; - so = dir ? s.anchorOffset : s.focusOffset; - en = dir ? s.focusNode : s.anchorNode; - eo = dir ? s.focusOffset : s.anchorOffset; - - // If selection is in empty table cell - if (sn === en && /^(TD|TH)$/.test(sn.nodeName)) { - if (sn.firstChild.nodeName == 'BR') - dom.remove(sn.firstChild); // Remove BR - - // Create two new block elements - if (sn.childNodes.length == 0) { - ed.dom.add(sn, se.element, null, '
    '); - aft = ed.dom.add(sn, se.element, null, '
    '); - } else { - n = sn.innerHTML; - sn.innerHTML = ''; - ed.dom.add(sn, se.element, null, n); - aft = ed.dom.add(sn, se.element, null, '
    '); - } - - // Move caret into the last one - r = d.createRange(); - r.selectNodeContents(aft); - r.collapse(1); - ed.selection.setRng(r); - - return FALSE; - } - - // If the caret is in an invalid location in FF we need to move it into the first block - if (sn == b && en == b && b.firstChild && ed.dom.isBlock(b.firstChild)) { - sn = en = sn.firstChild; - so = eo = 0; - rb = d.createRange(); - rb.setStart(sn, 0); - ra = d.createRange(); - ra.setStart(en, 0); - } - - // Never use body as start or end node - sn = sn.nodeName == "HTML" ? d.body : sn; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes - sn = sn.nodeName == "BODY" ? sn.firstChild : sn; - en = en.nodeName == "HTML" ? d.body : en; // Fix for Opera bug: https://bugs.opera.com/show_bug.cgi?id=273224&comments=yes - en = en.nodeName == "BODY" ? en.firstChild : en; - - // Get start and end blocks - sb = t.getParentBlock(sn); - eb = t.getParentBlock(en); - bn = sb ? sb.nodeName : se.element; // Get block name to create - - // Return inside list use default browser behavior - if (n = t.dom.getParent(sb, 'li,pre')) { - if (n.nodeName == 'LI') - return splitList(ed.selection, t.dom, n); - - return TRUE; - } - - // If caption or absolute layers then always generate new blocks within - if (sb && (sb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) { - bn = se.element; - sb = null; - } - - // If caption or absolute layers then always generate new blocks within - if (eb && (eb.nodeName == 'CAPTION' || /absolute|relative|fixed/gi.test(dom.getStyle(sb, 'position', 1)))) { - bn = se.element; - eb = null; - } - - // Use P instead - if (/(TD|TABLE|TH|CAPTION)/.test(bn) || (sb && bn == "DIV" && /left|right/gi.test(dom.getStyle(sb, 'float', 1)))) { - bn = se.element; - sb = eb = null; - } - - // Setup new before and after blocks - bef = (sb && sb.nodeName == bn) ? sb.cloneNode(0) : ed.dom.create(bn); - aft = (eb && eb.nodeName == bn) ? eb.cloneNode(0) : ed.dom.create(bn); - - // Remove id from after clone - aft.removeAttribute('id'); - - // Is header and cursor is at the end, then force paragraph under - if (/^(H[1-6])$/.test(bn) && isAtEnd(r, sb)) - aft = ed.dom.create(se.element); - - // Find start chop node - n = sc = sn; - do { - if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) - break; - - sc = n; - } while ((n = n.previousSibling ? n.previousSibling : n.parentNode)); - - // Find end chop node - n = ec = en; - do { - if (n == b || n.nodeType == 9 || t.dom.isBlock(n) || /(TD|TABLE|TH|CAPTION)/.test(n.nodeName)) - break; - - ec = n; - } while ((n = n.nextSibling ? n.nextSibling : n.parentNode)); - - // Place first chop part into before block element - if (sc.nodeName == bn) - rb.setStart(sc, 0); - else - rb.setStartBefore(sc); - - rb.setEnd(sn, so); - bef.appendChild(rb.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari - - // Place secnd chop part within new block element - try { - ra.setEndAfter(ec); - } catch(ex) { - //console.debug(s.focusNode, s.focusOffset); - } - - ra.setStart(en, eo); - aft.appendChild(ra.cloneContents() || d.createTextNode('')); // Empty text node needed for Safari - - // Create range around everything - r = d.createRange(); - if (!sc.previousSibling && sc.parentNode.nodeName == bn) { - r.setStartBefore(sc.parentNode); + // Get current selection + rng = selection.getRng(); + if (rng.setStart) { + startContainer = rng.startContainer; + startOffset = rng.startOffset; + endContainer = rng.endContainer; + endOffset = rng.endOffset; } else { - if (rb.startContainer.nodeName == bn && rb.startOffset == 0) - r.setStartBefore(rb.startContainer); - else - r.setStart(rb.startContainer, rb.startOffset); - } - - if (!ec.nextSibling && ec.parentNode.nodeName == bn) - r.setEndAfter(ec.parentNode); - else - r.setEnd(ra.endContainer, ra.endOffset); - - // Delete and replace it with new block elements - r.deleteContents(); - - if (isOpera) - ed.getWin().scrollTo(0, vp.y); - - // Never wrap blocks in blocks - if (bef.firstChild && bef.firstChild.nodeName == bn) - bef.innerHTML = bef.firstChild.innerHTML; - - if (aft.firstChild && aft.firstChild.nodeName == bn) - aft.innerHTML = aft.firstChild.innerHTML; - - // Padd empty blocks - if (isEmpty(bef)) - bef.innerHTML = '
    '; - - function appendStyles(e, en) { - var nl = [], nn, n, i; - - e.innerHTML = ''; - - // Make clones of style elements - if (se.keep_styles) { - n = en; - do { - // We only want style specific elements - if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)) { - nn = n.cloneNode(FALSE); - dom.setAttrib(nn, 'id', ''); // Remove ID since it needs to be unique - nl.push(nn); - } - } while (n = n.parentNode); + // Force control range into text range + if (rng.item) { + node = rng.item(0); + rng = editor.getDoc().body.createTextRange(); + rng.moveToElementText(node); } - // Append style elements to aft - if (nl.length > 0) { - for (i = nl.length - 1, nn = e; i >= 0; i--) - nn = nn.appendChild(nl[i]); + tmpRng = rng.duplicate(); + tmpRng.collapse(true); + startOffset = tmpRng.move('character', offset) * -1; - // Padd most inner style element - nl[0].innerHTML = isOpera ? ' ' : '
    '; // Extra space for Opera so that the caret can move there - return nl[0]; // Move caret to most inner element - } else - e.innerHTML = isOpera ? ' ' : '
    '; // Extra space for Opera so that the caret can move there - }; + if (!tmpRng.collapsed) { + tmpRng = rng.duplicate(); + tmpRng.collapse(false); + endOffset = (tmpRng.move('character', offset) * -1) - startOffset; + } + } - // Fill empty afterblook with current style - if (isEmpty(aft)) - car = appendStyles(aft, en); + // Wrap non block elements and text nodes + for (node = rootNode.firstChild; node; node) { + if (node.nodeType === 3 || (node.nodeType == 1 && !blockElements[node.nodeName])) { + if (!rootBlockNode) { + rootBlockNode = dom.create(settings.forced_root_block); + node.parentNode.insertBefore(rootBlockNode, node); + } - // Opera needs this one backwards for older versions - if (isOpera && parseFloat(opera.version()) < 9.5) { - r.insertNode(bef); - r.insertNode(aft); + tempNode = node; + node = node.nextSibling; + rootBlockNode.appendChild(tempNode); + } else { + rootBlockNode = null; + node = node.nextSibling; + } + } + + if (rng.setStart) { + rng.setStart(startContainer, startOffset); + rng.setEnd(endContainer, endOffset); + selection.setRng(rng); } else { - r.insertNode(aft); - r.insertNode(bef); - } + try { + rng = editor.getDoc().body.createTextRange(); + rng.moveToElementText(rootNode); + rng.collapse(true); + rng.moveStart('character', startOffset); - // Normalize - aft.normalize(); - bef.normalize(); + if (endOffset > 0) + rng.moveEnd('character', endOffset); - function first(n) { - return d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, FALSE).nextNode() || n; - }; - - // Move cursor and scroll into view - r = d.createRange(); - r.selectNodeContents(isGecko ? first(car || aft) : car || aft); - r.collapse(1); - s.removeAllRanges(); - s.addRange(r); - - // scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs - y = ed.dom.getPos(aft).y; - ch = aft.clientHeight; - - // Is element within viewport - if (y < vp.y || y + ch > vp.y + vp.h) { - ed.getWin().scrollTo(0, y < vp.y ? y : y - vp.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks - //console.debug('SCROLL!', 'vp.y: ' + vp.y, 'y' + y, 'vp.h' + vp.h, 'clientHeight' + aft.clientHeight, 'yyy: ' + (y < vp.y ? y : y - vp.h + aft.clientHeight)); - } - - return FALSE; - }, - - backspaceDelete : function(e, bs) { - var t = this, ed = t.editor, b = ed.getBody(), dom = ed.dom, n, se = ed.selection, r = se.getRng(), sc = r.startContainer, n, w, tn, walker; - - // Delete when caret is behind a element doesn't work correctly on Gecko see #3011651 - if (!bs && r.collapsed && sc.nodeType == 1 && r.startOffset == sc.childNodes.length) { - walker = new tinymce.dom.TreeWalker(sc.lastChild, sc); - - // Walk the dom backwards until we find a text node - for (n = sc.lastChild; n; n = walker.prev()) { - if (n.nodeType == 3) { - r.setStart(n, n.nodeValue.length); - r.collapse(true); - se.setRng(r); - return; - } + rng.select(); + } catch (ex) { + // Ignore } } - // The caret sometimes gets stuck in Gecko if you delete empty paragraphs - // This workaround removes the element by hand and moves the caret to the previous element - if (sc && ed.dom.isBlock(sc) && !/^(TD|TH)$/.test(sc.nodeName) && bs) { - if (sc.childNodes.length == 0 || (sc.childNodes.length == 1 && sc.firstChild.nodeName == 'BR')) { - // Find previous block element - n = sc; - while ((n = n.previousSibling) && !ed.dom.isBlock(n)) ; + editor.nodeChanged(); + }; - if (n) { - if (sc != b.firstChild) { - // Find last text node - w = ed.dom.doc.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, FALSE); - while (tn = w.nextNode()) - n = tn; - - // Place caret at the end of last text node - r = ed.getDoc().createRange(); - r.setStart(n, n.nodeValue ? n.nodeValue.length : 0); - r.setEnd(n, n.nodeValue ? n.nodeValue.length : 0); - se.setRng(r); - - // Remove the target container - ed.dom.remove(sc); - } - - return Event.cancel(e); - } - } - } - } - }); -})(tinymce); + editor.onKeyUp.add(addRootBlocks); + editor.onClick.add(addRootBlocks); + } +}; (function(tinymce) { // Shorten names @@ -12484,11 +14767,16 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { id = t.prefix + id; - if (ed.settings.use_native_selects) + + function useNativeListForAccessibility(ed) { + return ed.settings.use_accessible_selects && !tinymce.isGecko + } + + if (ed.settings.use_native_selects || useNativeListForAccessibility(ed)) c = new tinymce.ui.NativeListBox(id, s); else { cls = cc || t._cls.listbox || tinymce.ui.ListBox; - c = new cls(id, s); + c = new cls(id, s, ed); } t.controls[id] = c; @@ -12543,11 +14831,11 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (s.menu_button) { cls = cc || t._cls.menubutton || tinymce.ui.MenuButton; - c = new cls(id, s); + c = new cls(id, s, ed); ed.onMouseDown.add(c.hideMenu, c); } else { cls = t._cls.button || tinymce.ui.Button; - c = new cls(id, s); + c = new cls(id, s, ed); } return t.add(c); @@ -12590,7 +14878,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { id = t.prefix + id; cls = cc || t._cls.splitbutton || tinymce.ui.SplitButton; - c = t.add(new cls(id, s)); + c = t.add(new cls(id, s, ed)); ed.onMouseDown.add(c.hideMenu, c); return c; @@ -12630,7 +14918,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { id = t.prefix + id; cls = cc || t._cls.colorsplitbutton || tinymce.ui.ColorSplitButton; - c = new cls(id, s); + c = new cls(id, s, ed); ed.onMouseDown.add(c.hideMenu, c); // Remove the menu element when the editor is removed @@ -12662,13 +14950,25 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { id = t.prefix + id; cls = cc || t._cls.toolbar || tinymce.ui.Toolbar; - c = new cls(id, s); + c = new cls(id, s, t.editor); if (t.get(id)) return null; return t.add(c); }, + + createToolbarGroup : function(id, s, cc) { + var c, t = this, cls; + id = t.prefix + id; + cls = cc || this._cls.toolbarGroup || tinymce.ui.ToolbarGroup; + c = new cls(id, s, t.editor); + + if (t.get(id)) + return null; + + return t.add(c); + }, createSeparator : function(cc) { var cls = cc || this._cls.separator || tinymce.ui.Separator; @@ -12805,53 +15105,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } }); }(tinymce)); -(function(tinymce) { - function CommandManager() { - var execCommands = {}, queryStateCommands = {}, queryValueCommands = {}; - - function add(collection, cmd, func, scope) { - if (typeof(cmd) == 'string') - cmd = [cmd]; - - tinymce.each(cmd, function(cmd) { - collection[cmd.toLowerCase()] = {func : func, scope : scope}; - }); - }; - - tinymce.extend(this, { - add : function(cmd, func, scope) { - add(execCommands, cmd, func, scope); - }, - - addQueryStateHandler : function(cmd, func, scope) { - add(queryStateCommands, cmd, func, scope); - }, - - addQueryValueHandler : function(cmd, func, scope) { - add(queryValueCommands, cmd, func, scope); - }, - - execCommand : function(scope, cmd, ui, value, args) { - if (cmd = execCommands[cmd.toLowerCase()]) { - if (cmd.func.call(scope || cmd.scope, ui, value, args) !== false) - return true; - } - }, - - queryCommandValue : function() { - if (cmd = queryValueCommands[cmd.toLowerCase()]) - return cmd.func.call(scope || cmd.scope, ui, value, args); - }, - - queryCommandState : function() { - if (cmd = queryStateCommands[cmd.toLowerCase()]) - return cmd.func.call(scope || cmd.scope, ui, value, args); - } - }); - }; - - tinymce.GlobalCommands = new CommandManager(); -})(tinymce); (function(tinymce) { tinymce.Formatter = function(ed) { var formats = {}, @@ -12860,16 +15113,28 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { selection = ed.selection, TreeWalker = tinymce.dom.TreeWalker, rangeUtils = new tinymce.dom.RangeUtils(dom), - isValid = ed.schema.isValid, + isValid = ed.schema.isValidChild, isBlock = dom.isBlock, forcedRootBlock = ed.settings.forced_root_block, nodeIndex = dom.nodeIndex, - INVISIBLE_CHAR = '\uFEFF', + INVISIBLE_CHAR = tinymce.isGecko ? '\u200B' : '\uFEFF', MCE_ATTR_RE = /^(src|href|style)$/, FALSE = false, TRUE = true, - undefined, - pendingFormats = {apply : [], remove : []}; + undefined; + + // Returns the content editable state of a node + function getContentEditable(node) { + var contentEditable = node.getAttribute("data-mce-contenteditable"); + + // Check for fake content editable + if (contentEditable && contentEditable !== "inherit") { + return contentEditable; + } + + // Check for real content editable + return node.contentEditable !== "inherit" ? node.contentEditable : null; + }; function isArray(obj) { return obj instanceof Array; @@ -12880,7 +15145,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }; function isCaretNode(node) { - return node.nodeType === 1 && (node.face === 'mceinline' || node.style.fontFamily === 'mceinline'); + return node.nodeType === 1 && node.id === '_mce_caret'; }; // Public functions @@ -12929,37 +15194,40 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } }; - function apply(name, vars, node) { - var formatList = get(name), format = formatList[0], bookmark, rng, i; + var getTextDecoration = function(node) { + var decoration; - function moveStart(rng) { - var container = rng.startContainer, - offset = rng.startOffset, - walker, node; + ed.dom.getParent(node, function(n) { + decoration = ed.dom.getStyle(n, 'text-decoration'); + return decoration && decoration !== 'none'; + }); - // Move startContainer/startOffset in to a suitable node - if (container.nodeType == 1 || container.nodeValue === "") { - container = container.nodeType == 1 ? container.childNodes[offset] : container; + return decoration; + }; - // Might fail if the offset is behind the last element in it's container - if (container) { - walker = new TreeWalker(container, container.parentNode); - for (node = walker.current(); node; node = walker.next()) { - if (node.nodeType == 3 && !isWhiteSpaceNode(node)) { - rng.setStart(node, 0); - break; - } - } - } + var processUnderlineAndColor = function(node) { + var textDecoration; + if (node.nodeType === 1 && node.parentNode && node.parentNode.nodeType === 1) { + textDecoration = getTextDecoration(node.parentNode); + if (ed.dom.getStyle(node, 'color') && textDecoration) { + ed.dom.setStyle(node, 'text-decoration', textDecoration); + } else if (ed.dom.getStyle(node, 'textdecoration') === textDecoration) { + ed.dom.setStyle(node, 'text-decoration', null); } + } + }; - return rng; - }; + function apply(name, vars, node) { + var formatList = get(name), format = formatList[0], bookmark, rng, i, isCollapsed = selection.isCollapsed(); function setElementFormat(elm, fmt) { fmt = fmt || format; if (elm) { + if (fmt.onformat) { + fmt.onformat(elm, fmt, vars, node); + } + each(fmt.styles, function(value, name) { dom.setStyle(elm, name, replaceVars(value, vars)); }); @@ -12976,9 +15244,90 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }); } }; + function adjustSelectionToVisibleSelection() { + function findSelectionEnd(start, end) { + var walker = new TreeWalker(end); + for (node = walker.current(); node; node = walker.prev()) { + if (node.childNodes.length > 1 || node == start) { + return node; + } + } + }; - function applyRngStyle(rng) { - var newWrappers = [], wrapName, wrapElm; + // Adjust selection so that a end container with a end offset of zero is not included in the selection + // as this isn't visible to the user. + var rng = ed.selection.getRng(); + var start = rng.startContainer; + var end = rng.endContainer; + + if (start != end && rng.endOffset == 0) { + var newEnd = findSelectionEnd(start, end); + var endOffset = newEnd.nodeType == 3 ? newEnd.length : newEnd.childNodes.length; + + rng.setEnd(newEnd, endOffset); + } + + return rng; + } + + function applyStyleToList(node, bookmark, wrapElm, newWrappers, process){ + var nodes = [], listIndex = -1, list, startIndex = -1, endIndex = -1, currentWrapElm; + + // find the index of the first child list. + each(node.childNodes, function(n, index) { + if (n.nodeName === "UL" || n.nodeName === "OL") { + listIndex = index; + list = n; + return false; + } + }); + + // get the index of the bookmarks + each(node.childNodes, function(n, index) { + if (n.nodeName === "SPAN" && dom.getAttrib(n, "data-mce-type") == "bookmark") { + if (n.id == bookmark.id + "_start") { + startIndex = index; + } else if (n.id == bookmark.id + "_end") { + endIndex = index; + } + } + }); + + // if the selection spans across an embedded list, or there isn't an embedded list - handle processing normally + if (listIndex <= 0 || (startIndex < listIndex && endIndex > listIndex)) { + each(tinymce.grep(node.childNodes), process); + return 0; + } else { + currentWrapElm = dom.clone(wrapElm, FALSE); + + // create a list of the nodes on the same side of the list as the selection + each(tinymce.grep(node.childNodes), function(n, index) { + if ((startIndex < listIndex && index < listIndex) || (startIndex > listIndex && index > listIndex)) { + nodes.push(n); + n.parentNode.removeChild(n); + } + }); + + // insert the wrapping element either before or after the list. + if (startIndex < listIndex) { + node.insertBefore(currentWrapElm, list); + } else if (startIndex > listIndex) { + node.insertBefore(currentWrapElm, list.nextSibling); + } + + // add the new nodes to the list. + newWrappers.push(currentWrapElm); + + each(nodes, function(node) { + currentWrapElm.appendChild(node); + }); + + return currentWrapElm; + } + }; + + function applyRngStyle(rng, bookmark, node_specific) { + var newWrappers = [], wrapName, wrapElm, contentEditable = true; // Setup wrapper element wrapName = format.inline || format.block; @@ -12989,7 +15338,18 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { var currentWrapElm; function process(node) { - var nodeName = node.nodeName.toLowerCase(), parentName = node.parentNode.nodeName.toLowerCase(), found; + var nodeName, parentName, found, hasContentEditableState, lastContentEditable; + + lastContentEditable = contentEditable; + nodeName = node.nodeName.toLowerCase(); + parentName = node.parentNode.nodeName.toLowerCase(); + + // Node has a contentEditable value + if (node.nodeType === 1 && getContentEditable(node)) { + lastContentEditable = contentEditable; + contentEditable = getContentEditable(node) === "true"; + hasContentEditableState = true; // We don't want to wrap the container only it's children + } // Stop wrapping on br elements if (isEq(nodeName, 'br')) { @@ -13009,7 +15369,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } // Can we rename the block - if (format.block && !format.wrapper && isTextBlock(nodeName)) { + if (contentEditable && !hasContentEditableState && format.block && !format.wrapper && isTextBlock(nodeName)) { node = dom.rename(node, wrapName); setElementFormat(node); newWrappers.push(node); @@ -13021,6 +15381,11 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (format.selector) { // Look for matching formats each(formatList, function(format) { + // Check collapsed state if it exists + if ('collapsed' in format && format.collapsed !== isCollapsed) { + return; + } + if (dom.is(node, format.selector) && !isCaretNode(node)) { setElementFormat(node, format); found = true; @@ -13035,22 +15400,30 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } // Is it valid to wrap this item - if (isValid(wrapName, nodeName) && isValid(parentName, wrapName)) { + if (contentEditable && !hasContentEditableState && isValid(wrapName, nodeName) && isValid(parentName, wrapName) && + !(!node_specific && node.nodeType === 3 && node.nodeValue.length === 1 && node.nodeValue.charCodeAt(0) === 65279) && !isCaretNode(node)) { // Start wrapping if (!currentWrapElm) { // Wrap the node - currentWrapElm = wrapElm.cloneNode(FALSE); + currentWrapElm = dom.clone(wrapElm, FALSE); node.parentNode.insertBefore(currentWrapElm, node); newWrappers.push(currentWrapElm); } currentWrapElm.appendChild(node); + } else if (nodeName == 'li' && bookmark) { + // Start wrapping - if we are in a list node and have a bookmark, then we will always begin by wrapping in a new element. + currentWrapElm = applyStyleToList(node, bookmark, wrapElm, newWrappers, process); } else { // Start a new wrapper for possible children currentWrapElm = 0; - + each(tinymce.grep(node.childNodes), process); + if (hasContentEditableState) { + contentEditable = lastContentEditable; // Restore last contentEditable state from stack + } + // End the last wrapper currentWrapElm = 0; } @@ -13060,7 +15433,32 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { each(nodes, process); }); + // Wrap links inside as well, for example color inside a link when the wrapper is around the link + if (format.wrap_links === false) { + each(newWrappers, function(node) { + function process(node) { + var i, currentWrapElm, children; + + if (node.nodeName === 'A') { + currentWrapElm = dom.clone(wrapElm, FALSE); + newWrappers.push(currentWrapElm); + + children = tinymce.grep(node.childNodes); + for (i = 0; i < children.length; i++) + currentWrapElm.appendChild(children[i]); + + node.appendChild(currentWrapElm); + } + + each(tinymce.grep(node.childNodes), process); + }; + + process(node); + }); + } + // Cleanup + each(newWrappers, function(node) { var childCount; @@ -13087,7 +15485,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // If child was found and of the same type as the current node if (child && matchName(child, format)) { - clone = child.cloneNode(FALSE); + clone = dom.clone(child, FALSE); setElementFormat(clone); dom.replace(clone, node, TRUE); @@ -13099,8 +15497,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { childCount = getChildCount(node); - // Remove empty nodes - if (childCount === 0) { + // Remove empty nodes but only if there is multiple wrappers and they are not block + // elements so never remove single

    since that would remove the currrent empty block element where the caret is at + if ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) { dom.remove(node, 1); return; } @@ -13116,6 +15515,19 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // this: text // will become: text each(dom.select(format.inline, node), function(child) { + var parent; + + // When wrap_links is set to false we don't want + // to remove the format on children within links + if (format.wrap_links === false) { + parent = child.parentNode; + + do { + if (parent.nodeName === 'A') + return; + } while (parent = parent.parentNode); + } + removeFormat(format, vars, child, format.exact ? child : null); }); }); @@ -13139,7 +15551,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { } // Merge next and previous siblings if they are similar texttext becomes texttext - if (node) { + if (node && format.merge_siblings !== false) { node = mergeSiblings(getNonWhiteSpaceSibling(node), node); node = mergeSiblings(node, getNonWhiteSpaceSibling(node, TRUE)); } @@ -13149,20 +15561,38 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (format) { if (node) { - rng = dom.createRng(); - - rng.setStartBefore(node); - rng.setEndAfter(node); - - applyRngStyle(expandRng(rng, formatList)); + if (node.nodeType) { + rng = dom.createRng(); + rng.setStartBefore(node); + rng.setEndAfter(node); + applyRngStyle(expandRng(rng, formatList), null, true); + } else { + applyRngStyle(node, null, true); + } } else { - if (!selection.isCollapsed() || !format.inline) { + if (!isCollapsed || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) { + // Obtain selection node before selection is unselected by applyRngStyle() + var curSelNode = ed.selection.getNode(); + + // If the formats have a default block and we can't find a parent block then start wrapping it with a DIV this is for forced_root_blocks: false + // It's kind of a hack but people should be using the default block type P since all desktop editors work that way + if (!forcedRootBlock && formatList[0].defaultBlock && !dom.getParent(curSelNode, dom.isBlock)) { + apply(formatList[0].defaultBlock); + } + // Apply formatting to selection + ed.selection.setRng(adjustSelectionToVisibleSelection()); bookmark = selection.getBookmark(); - applyRngStyle(expandRng(selection.getRng(TRUE), formatList)); + applyRngStyle(expandRng(selection.getRng(TRUE), formatList), bookmark); + + // Colored nodes should be underlined so that the color of the underline matches the text color. + if (format.styles && (format.styles.color || format.styles.textDecoration)) { + tinymce.walk(curSelNode, processUnderlineAndColor, 'childNodes'); + processUnderlineAndColor(curSelNode); + } selection.moveToBookmark(bookmark); - selection.setRng(moveStart(selection.getRng(TRUE))); + moveStart(selection.getRng(TRUE)); ed.nodeChanged(); } else performCaretAction('apply', name, vars); @@ -13171,25 +15601,40 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }; function remove(name, vars, node) { - var formatList = get(name), format = formatList[0], bookmark, i, rng; + var formatList = get(name), format = formatList[0], bookmark, i, rng, contentEditable = true; // Merges the styles for each node function process(node) { - var children, i, l; + var children, i, l, localContentEditable, lastContentEditable, hasContentEditableState; + + // Node has a contentEditable value + if (node.nodeType === 1 && getContentEditable(node)) { + lastContentEditable = contentEditable; + contentEditable = getContentEditable(node) === "true"; + hasContentEditableState = true; // We don't want to wrap the container only it's children + } // Grab the children first since the nodelist might be changed children = tinymce.grep(node.childNodes); // Process current node - for (i = 0, l = formatList.length; i < l; i++) { - if (removeFormat(formatList[i], vars, node, node)) - break; + if (contentEditable && !hasContentEditableState) { + for (i = 0, l = formatList.length; i < l; i++) { + if (removeFormat(formatList[i], vars, node, node)) + break; + } } // Process the children if (format.deep) { - for (i = 0, l = children.length; i < l; i++) - process(children[i]); + if (children.length) { + for (i = 0, l = children.length; i < l; i++) + process(children[i]); + + if (hasContentEditableState) { + contentEditable = lastContentEditable; // Restore last contentEditable state from stack + } + } } }; @@ -13220,7 +15665,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { formatRootParent = format_root.parentNode; for (parent = container.parentNode; parent && parent != formatRootParent; parent = parent.parentNode) { - clone = parent.cloneNode(FALSE); + clone = dom.clone(parent, FALSE); for (i = 0; i < formatList.length; i++) { if (removeFormat(formatList[i], vars, clone, clone)) { @@ -13285,8 +15730,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (startContainer != endContainer) { // Wrap start/end nodes in span element since these might be cloned/moved - startContainer = wrap(startContainer, 'span', {id : '_start', _mce_type : 'bookmark'}); - endContainer = wrap(endContainer, 'span', {id : '_end', _mce_type : 'bookmark'}); + startContainer = wrap(startContainer, 'span', {id : '_start', 'data-mce-type' : 'bookmark'}); + endContainer = wrap(endContainer, 'span', {id : '_end', 'data-mce-type' : 'bookmark'}); // Split start/end splitToFormatRoot(startContainer); @@ -13309,30 +15754,56 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { rangeUtils.walk(rng, function(nodes) { each(nodes, function(node) { process(node); + + // Remove parent span if it only contains text-decoration: underline, yet a parent node is also underlined. + if (node.nodeType === 1 && ed.dom.getStyle(node, 'text-decoration') === 'underline' && node.parentNode && getTextDecoration(node.parentNode) === 'underline') { + removeFormat({'deep': false, 'exact': true, 'inline': 'span', 'styles': {'textDecoration' : 'underline'}}, null, node); + } }); }); }; // Handle node if (node) { - rng = dom.createRng(); - rng.setStartBefore(node); - rng.setEndAfter(node); - removeRngStyle(rng); + if (node.nodeType) { + rng = dom.createRng(); + rng.setStartBefore(node); + rng.setEndAfter(node); + removeRngStyle(rng); + } else { + removeRngStyle(node); + } + return; } - if (!selection.isCollapsed() || !format.inline) { + if (!selection.isCollapsed() || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) { bookmark = selection.getBookmark(); removeRngStyle(selection.getRng(TRUE)); selection.moveToBookmark(bookmark); + + // Check if start element still has formatting then we are at: "text|text" and need to move the start into the next text node + if (format.inline && match(name, vars, selection.getStart())) { + moveStart(selection.getRng(true)); + } + ed.nodeChanged(); } else performCaretAction('remove', name, vars); + + // Removed this logic since it breaks unit tests and produces empty caret elements since they will be destroyed in the cleanup process + // Also there must be a better way to rerender a table and I couldn't reproduce the case causing this might be some old WebKit + /* + // When you remove formatting from a table cell in WebKit (cell, not the contents of a cell) there is a rendering issue with column width + if (tinymce.isWebKit) { + ed.execCommand('mceCleanup'); + }*/ }; function toggle(name, vars, node) { - if (match(name, vars, node)) + var fmt = get(name); + + if (match(name, vars, node) && (!('toggle' in fmt[0]) || fmt[0]['toggle'])) remove(name, vars, node); else apply(name, vars, node); @@ -13344,6 +15815,11 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { function matchItems(node, format, item_name) { var key, value, items = format[item_name], i; + // Custom match + if (format.onmatch) { + return format.onmatch(node, format, item_name); + } + // Check all items if (items) { // Non indexed object @@ -13396,7 +15872,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }; function match(name, vars, node) { - var startNode, i; + var startNode; function matchParents(node) { // Find first node with similar format settings @@ -13412,21 +15888,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (node) return matchParents(node); - // Check pending formats - if (selection.isCollapsed()) { - for (i = pendingFormats.apply.length - 1; i >= 0; i--) { - if (pendingFormats.apply[i].name == name) - return true; - } - - for (i = pendingFormats.remove.length - 1; i >= 0; i--) { - if (pendingFormats.remove[i].name == name) - return false; - } - - return matchParents(selection.getNode()); - } - // Check selected node node = selection.getNode(); if (matchParents(node)) @@ -13445,33 +15906,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { function matchAll(names, vars) { var startElement, matchedFormatNames = [], checkedMap = {}, i, ni, name; - // If the selection is collapsed then check pending formats - if (selection.isCollapsed()) { - for (ni = 0; ni < names.length; ni++) { - // If the name is to be removed, then stop it from being added - for (i = pendingFormats.remove.length - 1; i >= 0; i--) { - name = names[ni]; - - if (pendingFormats.remove[i].name == name) { - checkedMap[name] = true; - break; - } - } - } - - // If the format is to be applied - for (i = pendingFormats.apply.length - 1; i >= 0; i--) { - for (ni = 0; ni < names.length; ni++) { - name = names[ni]; - - if (!checkedMap[name] && pendingFormats.apply[i].name == name) { - checkedMap[name] = true; - matchedFormatNames.push(name); - } - } - } - } - // Check start of selection for formats startElement = selection.getStart(); dom.getParent(startElement, function(node) { @@ -13580,7 +16014,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }; function isWhiteSpaceNode(node) { - return node && node.nodeType === 3 && /^([\s\r\n]+|)$/.test(node.nodeValue); + return node && node.nodeType === 3 && /^([\t \r\n]+|)$/.test(node.nodeValue); }; function wrap(node, name, attrs) { @@ -13593,39 +16027,64 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }; function expandRng(rng, format, remove) { - var startContainer = rng.startContainer, + var sibling, lastIdx, leaf, + startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, - endOffset = rng.endOffset, sibling, lastIdx; + endOffset = rng.endOffset, sibling, lastIdx, leaf, endPoint; // This function walks up the tree if there is no siblings before/after the node - function findParentContainer(container, child_name, sibling_name, root) { - var parent, child; + function findParentContainer(start) { + var container, parent, child, sibling, siblingName; - root = root || dom.getRoot(); + container = parent = start ? startContainer : endContainer; + siblingName = start ? 'previousSibling' : 'nextSibling'; + root = dom.getRoot(); + + // If it's a text node and the offset is inside the text + if (container.nodeType == 3 && !isWhiteSpaceNode(container)) { + if (start ? startOffset > 0 : endOffset < container.nodeValue.length) { + return container; + } + } for (;;) { - // Check if we can move up are we at root level or body level - parent = container.parentNode; + // Stop expanding on block elements + if (!format[0].block_expand && isBlock(parent)) + return parent; - // Stop expanding on block elements or root depending on format - if (parent == root || (!format[0].block_expand && isBlock(parent))) - return container; - - for (sibling = parent[child_name]; sibling && sibling != container; sibling = sibling[sibling_name]) { - if (sibling.nodeType == 1 && !isBookmarkNode(sibling)) - return container; - - if (sibling.nodeType == 3 && !isWhiteSpaceNode(sibling)) - return container; + // Walk left/right + for (sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) { + if (!isBookmarkNode(sibling) && !isWhiteSpaceNode(sibling)) { + return parent; + } } - container = container.parentNode; + // Check if we can move up are we at root level or body level + if (parent.parentNode == root) { + container = parent; + break; + } + + parent = parent.parentNode; } return container; }; + // This function walks down the tree to find the leaf at the selection. + // The offset is also returned as if node initially a leaf, the offset may be in the middle of the text node. + function findLeaf(node, offset) { + if (offset === undefined) + offset = node.nodeType === 3 ? node.length : node.childNodes.length; + while (node && node.hasChildNodes()) { + node = node.childNodes[offset]; + if (node) + offset = node.nodeType === 3 ? node.length : node.childNodes.length; + } + return { node: node, offset: offset }; + } + // If index based start position then resolve it if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) { lastIdx = startContainer.childNodes.length - 1; @@ -13644,32 +16103,161 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { endOffset = endContainer.nodeValue.length; } - // Exclude bookmark nodes if possible - if (isBookmarkNode(startContainer.parentNode)) - startContainer = startContainer.parentNode; + // Expands the node to the closes contentEditable false element if it exists + function findParentContentEditable(node) { + var parent = node; - if (isBookmarkNode(startContainer)) + while (parent) { + if (parent.nodeType === 1 && getContentEditable(parent)) { + return getContentEditable(parent) === "false" ? parent : node; + } + + parent = parent.parentNode; + } + + return node; + }; + + // Expand to closest contentEditable element + startContainer = findParentContentEditable(startContainer); + endContainer = findParentContentEditable(endContainer); + + // Exclude bookmark nodes if possible + if (isBookmarkNode(startContainer.parentNode) || isBookmarkNode(startContainer)) { + startContainer = isBookmarkNode(startContainer) ? startContainer : startContainer.parentNode; startContainer = startContainer.nextSibling || startContainer; - if (isBookmarkNode(endContainer.parentNode)) - endContainer = endContainer.parentNode; + if (startContainer.nodeType == 3) + startOffset = 0; + } - if (isBookmarkNode(endContainer)) + if (isBookmarkNode(endContainer.parentNode) || isBookmarkNode(endContainer)) { + endContainer = isBookmarkNode(endContainer) ? endContainer : endContainer.parentNode; endContainer = endContainer.previousSibling || endContainer; + if (endContainer.nodeType == 3) + endOffset = endContainer.length; + } + + if (format[0].inline) { + if (rng.collapsed) { + function findWordEndPoint(container, offset, start) { + var walker, node, pos, lastTextNode; + + function findSpace(node, offset) { + var pos, pos2, str = node.nodeValue; + + if (typeof(offset) == "undefined") { + offset = start ? str.length : 0; + } + + if (start) { + pos = str.lastIndexOf(' ', offset); + pos2 = str.lastIndexOf('\u00a0', offset); + pos = pos > pos2 ? pos : pos2; + + // Include the space on remove to avoid tag soup + if (pos !== -1 && !remove) { + pos++; + } + } else { + pos = str.indexOf(' ', offset); + pos2 = str.indexOf('\u00a0', offset); + pos = pos !== -1 && (pos2 === -1 || pos < pos2) ? pos : pos2; + } + + return pos; + }; + + if (container.nodeType === 3) { + pos = findSpace(container, offset); + + if (pos !== -1) { + return {container : container, offset : pos}; + } + + lastTextNode = container; + } + + // Walk the nodes inside the block + walker = new TreeWalker(container, dom.getParent(container, isBlock) || ed.getBody()); + while (node = walker[start ? 'prev' : 'next']()) { + if (node.nodeType === 3) { + lastTextNode = node; + pos = findSpace(node); + + if (pos !== -1) { + return {container : node, offset : pos}; + } + } else if (isBlock(node)) { + break; + } + } + + if (lastTextNode) { + if (start) { + offset = 0; + } else { + offset = lastTextNode.length; + } + + return {container: lastTextNode, offset: offset}; + } + } + + // Expand left to closest word boundery + endPoint = findWordEndPoint(startContainer, startOffset, true); + if (endPoint) { + startContainer = endPoint.container; + startOffset = endPoint.offset; + } + + // Expand right to closest word boundery + endPoint = findWordEndPoint(endContainer, endOffset); + if (endPoint) { + endContainer = endPoint.container; + endOffset = endPoint.offset; + } + } + + // Avoid applying formatting to a trailing space. + leaf = findLeaf(endContainer, endOffset); + if (leaf.node) { + while (leaf.node && leaf.offset === 0 && leaf.node.previousSibling) + leaf = findLeaf(leaf.node.previousSibling); + + if (leaf.node && leaf.offset > 0 && leaf.node.nodeType === 3 && + leaf.node.nodeValue.charAt(leaf.offset - 1) === ' ') { + + if (leaf.offset > 1) { + endContainer = leaf.node; + endContainer.splitText(leaf.offset - 1); + } else if (leaf.node.previousSibling) { + // TODO: Figure out why this is in here + //endContainer = leaf.node.previousSibling; + } + } + } + } + // Move start/end point up the tree if the leaves are sharp and if we are in different containers // Example * becomes !: !

    *texttext*

    ! // This will reduce the number of wrapper elements that needs to be created // Move start point up the tree if (format[0].inline || format[0].block_expand) { - startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling'); - endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling'); + if (!format[0].inline || (startContainer.nodeType != 3 || startOffset === 0)) { + startContainer = findParentContainer(true); + } + + if (!format[0].inline || (endContainer.nodeType != 3 || endOffset === endContainer.nodeValue.length)) { + endContainer = findParentContainer(); + } } // Expand start/end container to matching selector if (format[0].selector && format[0].expand !== FALSE && !format[0].inline) { function findSelectorEndPoint(container, sibling_name) { - var parents, i, y; + var parents, i, y, curFormat; if (container.nodeType == 3 && container.nodeValue.length == 0 && container[sibling_name]) container = container[sibling_name]; @@ -13677,7 +16265,13 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { parents = getParents(container); for (i = 0; i < parents.length; i++) { for (y = 0; y < format.length; y++) { - if (dom.is(parents[i], format[y].selector)) + curFormat = format[y]; + + // If collapsed state is set then skip formats that doesn't match that + if ("collapsed" in curFormat && curFormat.collapsed !== rng.collapsed) + continue; + + if (dom.is(parents[i], curFormat.selector)) return parents[i]; } } @@ -13731,10 +16325,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Non block element then try to expand up the leaf if (format[0].block) { if (!isBlock(startContainer)) - startContainer = findParentContainer(startContainer, 'firstChild', 'nextSibling'); + startContainer = findParentContainer(true); if (!isBlock(endContainer)) - endContainer = findParentContainer(endContainer, 'lastChild', 'previousSibling'); + endContainer = findParentContainer(); } } @@ -13787,7 +16381,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Remove style attribute if it's empty if (stylesModified && dom.getAttrib(node, 'style') == '') { node.removeAttribute('style'); - node.removeAttribute('_mce_style'); + node.removeAttribute('data-mce-style'); } // Remove attributes @@ -13828,7 +16422,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Remove mce prefixed attributes if (MCE_ATTR_RE.test(name)) - node.removeAttribute('_mce_' + name); + node.removeAttribute('data-mce-' + name); node.removeAttribute(name); } @@ -13913,7 +16507,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }; function isBookmarkNode(node) { - return node && node.nodeType == 1 && node.getAttribute('_mce_type') == 'bookmark'; + return node && node.nodeType == 1 && node.getAttribute('data-mce-type') == 'bookmark'; }; function mergeSiblings(prev, next) { @@ -13984,7 +16578,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (prev && next) { function findElementSibling(node, sibling_name) { for (sibling = node; sibling; sibling = sibling[sibling_name]) { - if (sibling.nodeType == 3 && !isWhiteSpaceNode(sibling)) + if (sibling.nodeType == 3 && sibling.nodeValue.length !== 0) return node; if (sibling.nodeType == 1 && !isBookmarkNode(sibling)) @@ -14027,7 +16621,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }; function getContainer(rng, start) { - var container, offset, lastIdx; + var container, offset, lastIdx, walker; container = rng[start ? 'startContainer' : 'endContainer']; offset = rng[start ? 'startOffset' : 'endOffset']; @@ -14041,102 +16635,312 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { container = container.childNodes[offset > lastIdx ? lastIdx : offset]; } + // If start text node is excluded then walk to the next node + if (container.nodeType === 3 && start && offset >= container.nodeValue.length) { + container = new TreeWalker(container, ed.getBody()).next() || container; + } + + // If end text node is excluded then walk to the previous node + if (container.nodeType === 3 && !start && offset == 0) { + container = new TreeWalker(container, ed.getBody()).prev() || container; + } + return container; }; function performCaretAction(type, name, vars) { - var i, currentPendingFormats = pendingFormats[type], - otherPendingFormats = pendingFormats[type == 'apply' ? 'remove' : 'apply']; + var caretContainerId = '_mce_caret', debug = ed.settings.caret_debug; - function hasPending() { - return pendingFormats.apply.length || pendingFormats.remove.length; + // Creates a caret container bogus element + function createCaretContainer(fill) { + var caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style: debug ? 'color:red' : ''}); + + if (fill) { + caretContainer.appendChild(ed.getDoc().createTextNode(INVISIBLE_CHAR)); + } + + return caretContainer; }; - function resetPending() { - pendingFormats.apply = []; - pendingFormats.remove = []; + function isCaretContainerEmpty(node, nodes) { + while (node) { + if ((node.nodeType === 3 && node.nodeValue !== INVISIBLE_CHAR) || node.childNodes.length > 1) { + return false; + } + + // Collect nodes + if (nodes && node.nodeType === 1) { + nodes.push(node); + } + + node = node.firstChild; + } + + return true; + }; + + // Returns any parent caret container element + function getParentCaretContainer(node) { + while (node) { + if (node.id === caretContainerId) { + return node; + } + + node = node.parentNode; + } }; - function perform(caret_node) { - // Apply pending formats - each(pendingFormats.apply.reverse(), function(item) { - apply(item.name, item.vars, caret_node); - }); + // Finds the first text node in the specified node + function findFirstTextNode(node) { + var walker; - // Remove pending formats - each(pendingFormats.remove.reverse(), function(item) { - remove(item.name, item.vars, caret_node); - }); + if (node) { + walker = new TreeWalker(node, node); - dom.remove(caret_node, 1); - resetPending(); + for (node = walker.current(); node; node = walker.next()) { + if (node.nodeType === 3) { + return node; + } + } + } }; - // Check if it already exists then ignore it - for (i = currentPendingFormats.length - 1; i >= 0; i--) { - if (currentPendingFormats[i].name == name) + // Removes the caret container for the specified node or all on the current document + function removeCaretContainer(node, move_caret) { + var child, rng; + + if (!node) { + node = getParentCaretContainer(selection.getStart()); + + if (!node) { + while (node = dom.get(caretContainerId)) { + removeCaretContainer(node, false); + } + } + } else { + rng = selection.getRng(true); + + if (isCaretContainerEmpty(node)) { + if (move_caret !== false) { + rng.setStartBefore(node); + rng.setEndBefore(node); + } + + dom.remove(node); + } else { + child = findFirstTextNode(node); + + if (child.nodeValue.charAt(0) === INVISIBLE_CHAR) { + child = child.deleteData(0, 1); + } + + dom.remove(node, 1); + } + + selection.setRng(rng); + } + }; + + // Applies formatting to the caret postion + function applyCaretFormat() { + var rng, caretContainer, textNode, offset, bookmark, container, text; + + rng = selection.getRng(true); + offset = rng.startOffset; + container = rng.startContainer; + text = container.nodeValue; + + caretContainer = getParentCaretContainer(selection.getStart()); + if (caretContainer) { + textNode = findFirstTextNode(caretContainer); + } + + // Expand to word is caret is in the middle of a text node and the char before/after is a alpha numeric character + if (text && offset > 0 && offset < text.length && /\w/.test(text.charAt(offset)) && /\w/.test(text.charAt(offset - 1))) { + // Get bookmark of caret position + bookmark = selection.getBookmark(); + + // Collapse bookmark range (WebKit) + rng.collapse(true); + + // Expand the range to the closest word and split it at those points + rng = expandRng(rng, get(name)); + rng = rangeUtils.split(rng); + + // Apply the format to the range + apply(name, vars, rng); + + // Move selection back to caret position + selection.moveToBookmark(bookmark); + } else { + if (!caretContainer || textNode.nodeValue !== INVISIBLE_CHAR) { + caretContainer = createCaretContainer(true); + textNode = caretContainer.firstChild; + + rng.insertNode(caretContainer); + offset = 1; + + apply(name, vars, caretContainer); + } else { + apply(name, vars, caretContainer); + } + + // Move selection to text node + selection.setCursorLocation(textNode, offset); + } + }; + + function removeCaretFormat() { + var rng = selection.getRng(true), container, offset, bookmark, + hasContentAfter, node, formatNode, parents = [], i, caretContainer; + + container = rng.startContainer; + offset = rng.startOffset; + node = container; + + if (container.nodeType == 3) { + if (offset != container.nodeValue.length || container.nodeValue === INVISIBLE_CHAR) { + hasContentAfter = true; + } + + node = node.parentNode; + } + + while (node) { + if (matchNode(node, name, vars)) { + formatNode = node; + break; + } + + if (node.nextSibling) { + hasContentAfter = true; + } + + parents.push(node); + node = node.parentNode; + } + + // Node doesn't have the specified format + if (!formatNode) { return; - } + } - currentPendingFormats.push({name : name, vars : vars}); + // Is there contents after the caret then remove the format on the element + if (hasContentAfter) { + // Get bookmark of caret position + bookmark = selection.getBookmark(); - // Check if it's in the other type, then remove it - for (i = otherPendingFormats.length - 1; i >= 0; i--) { - if (otherPendingFormats[i].name == name) - otherPendingFormats.splice(i, 1); - } + // Collapse bookmark range (WebKit) + rng.collapse(true); - // Pending apply or remove formats - if (hasPending()) { - ed.getDoc().execCommand('FontName', false, 'mceinline'); - pendingFormats.lastRng = selection.getRng(); + // Expand the range to the closest word and split it at those points + rng = expandRng(rng, get(name), true); + rng = rangeUtils.split(rng); - // IE will convert the current word - each(dom.select('font,span'), function(node) { - var bookmark; + // Remove the format from the range + remove(name, vars, rng); - if (isCaretNode(node)) { - bookmark = selection.getBookmark(); - perform(node); - selection.moveToBookmark(bookmark); - ed.nodeChanged(); + // Move selection back to caret position + selection.moveToBookmark(bookmark); + } else { + caretContainer = createCaretContainer(); + + node = caretContainer; + for (i = parents.length - 1; i >= 0; i--) { + node.appendChild(dom.clone(parents[i], false)); + node = node.firstChild; + } + + // Insert invisible character into inner most format element + node.appendChild(dom.doc.createTextNode(INVISIBLE_CHAR)); + node = node.firstChild; + + // Insert caret container after the formated node + dom.insertAfter(caretContainer, formatNode); + + // Move selection to text node + selection.setCursorLocation(node, 1); + } + }; + + // Only bind the caret events once + if (!self._hasCaretEvents) { + // Mark current caret container elements as bogus when getting the contents so we don't end up with empty elements + ed.onBeforeGetContent.addToTop(function() { + var nodes = [], i; + + if (isCaretContainerEmpty(getParentCaretContainer(selection.getStart()), nodes)) { + // Mark children + i = nodes.length; + while (i--) { + dom.setAttrib(nodes[i], 'data-mce-bogus', '1'); + } } }); - // Only register listeners once if we need to - if (!pendingFormats.isListening && hasPending()) { - pendingFormats.isListening = true; - - each('onKeyDown,onKeyUp,onKeyPress,onMouseUp'.split(','), function(event) { - ed[event].addToTop(function(ed, e) { - // Do we have pending formats and is the selection moved has moved - if (hasPending() && !tinymce.dom.RangeUtils.compareRanges(pendingFormats.lastRng, selection.getRng())) { - each(dom.select('font,span'), function(node) { - var textNode, rng; - - // Look for marker - if (isCaretNode(node)) { - textNode = node.firstChild; - - if (textNode) { - perform(node); - - rng = dom.createRng(); - rng.setStart(textNode, textNode.nodeValue.length); - rng.setEnd(textNode, textNode.nodeValue.length); - selection.setRng(rng); - ed.nodeChanged(); - } else - dom.remove(node); - } - }); - - // Always unbind and clear pending styles on keyup - if (e.type == 'keyup' || e.type == 'mouseup') - resetPending(); - } - }); + // Remove caret container on mouse up and on key up + tinymce.each('onMouseUp onKeyUp'.split(' '), function(name) { + ed[name].addToTop(function() { + removeCaretContainer(); }); + }); + + // Remove caret container on keydown and it's a backspace, enter or left/right arrow keys + ed.onKeyDown.addToTop(function(ed, e) { + var keyCode = e.keyCode; + + if (keyCode == 8 || keyCode == 37 || keyCode == 39) { + removeCaretContainer(getParentCaretContainer(selection.getStart())); + } + }); + + self._hasCaretEvents = true; + } + + // Do apply or remove caret format + if (type == "apply") { + applyCaretFormat(); + } else { + removeCaretFormat(); + } + }; + + function moveStart(rng) { + var container = rng.startContainer, + offset = rng.startOffset, + walker, node, nodes, tmpNode; + + // Convert text node into index if possible + if (container.nodeType == 3 && offset >= container.nodeValue.length) { + // Get the parent container location and walk from there + container = container.parentNode; + offset = nodeIndex(container) + 1; + } + + // Move startContainer/startOffset in to a suitable node + if (container.nodeType == 1) { + nodes = container.childNodes; + container = nodes[Math.min(offset, nodes.length - 1)]; + walker = new TreeWalker(container, dom.getParent(container, dom.isBlock)); + + // If offset is at end of the parent node walk to the next one + if (offset > nodes.length - 1) + walker.next(); + + for (node = walker.current(); node; node = walker.next()) { + if (node.nodeType == 3 && !isWhiteSpaceNode(node)) { + // IE has a "neat" feature where it moves the start node into the closest element + // we can avoid this by inserting an element before it and then remove it after we set the selection + tmpNode = dom.create('a', null, INVISIBLE_CHAR); + node.parentNode.insertBefore(tmpNode, node); + + // Set selection and remove tmpNode + rng.setStart(node, 0); + selection.setRng(rng); + dom.remove(tmpNode); + + return; + } } } }; @@ -14147,12 +16951,15 @@ tinymce.onAddEditor.add(function(tinymce, ed) { var filters, fontSizes, dom, settings = ed.settings; if (settings.inline_styles) { - fontSizes = tinymce.explode(settings.font_size_style_values); + fontSizes = tinymce.explode(settings.font_size_legacy_values); function replaceWithSpan(node, styles) { - dom.replace(dom.create('span', { - style : styles - }), node, 1); + tinymce.each(styles, function(value, name) { + if (value) + dom.setStyle(node, name, value); + }); + + dom.rename(node, 'span'); }; filters = { @@ -14189,6 +16996,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) { }; ed.onPreProcess.add(convert); + ed.onSetContent.add(convert); ed.onInit.add(function() { ed.selection.onSetContent.add(convert); @@ -14196,3 +17004,393 @@ tinymce.onAddEditor.add(function(tinymce, ed) { } }); +(function(tinymce) { + var TreeWalker = tinymce.dom.TreeWalker; + + tinymce.EnterKey = function(editor) { + var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager; + + function handleEnterKey(evt) { + var rng = selection.getRng(true), tmpRng, container, offset, parentBlock, newBlock, fragment, containerBlock, parentBlockName, containerBlockName, newBlockName; + + // Returns true if the block can be split into two blocks or not + function canSplitBlock(node) { + return node && dom.isBlock(node) && !/^(TD|TH|CAPTION)$/.test(node.nodeName) && !/^(fixed|absolute)/i.test(node.style.position); + }; + + // Moves the caret to a suitable position within the root for example in the first non pure whitespace text node or before an image + function moveToCaretPosition(root) { + var walker, node, rng, y, viewPort, lastNode = root; + + rng = dom.createRng(); + + if (root.hasChildNodes()) { + walker = new TreeWalker(root, root); + + while (node = walker.current()) { + if (node.nodeType == 3) { + rng.setStart(node, 0); + rng.setEnd(node, 0); + break; + } + + if (/^(BR|IMG)$/.test(node.nodeName)) { + rng.setStartBefore(node); + rng.setEndBefore(node); + break; + } + + lastNode = node; + node = walker.next(); + } + + if (!node) { + rng.setStart(lastNode, 0); + rng.setEnd(lastNode, 0); + } + } else { + if (root.nodeName == 'BR') { + rng.setStartAfter(root); + rng.setEndAfter(root); + } else { + rng.setStart(root, 0); + rng.setEnd(root, 0); + } + } + + selection.setRng(rng); + + viewPort = dom.getViewPort(editor.getWin()); + + // scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs + y = dom.getPos(root).y; + if (y < viewPort.y || y + 25 > viewPort.y + viewPort.h) { + editor.getWin().scrollTo(0, y < viewPort.y ? y : y - viewPort.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks + } + }; + + // Creates a new block element by cloning the current one or creating a new one if the name is specified + // This function will also copy any text formatting from the parent block and add it to the new one + function createNewBlock(name) { + var node = container, block, clonedNode, caretNode; + + block = name ? dom.create(name) : parentBlock.cloneNode(false); + caretNode = block; + + // Clone any parent styles + do { + if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(node.nodeName)) { + clonedNode = node.cloneNode(false); + dom.setAttrib(clonedNode, 'id', ''); // Remove ID since it needs to be document unique + + if (block.hasChildNodes()) { + clonedNode.appendChild(block.firstChild); + block.appendChild(clonedNode); + } else { + caretNode = clonedNode; + block.appendChild(clonedNode); + } + } + } while (node = node.parentNode); + + // BR is needed in empty blocks on non IE browsers + if (!tinymce.isIE) { + caretNode.innerHTML = '
    '; + } + + return block; + }; + + // Returns true/false if the caret is at the start/end of the parent block element + function isCaretAtStartOrEndOfBlock(start) { + var walker, node; + + // Caret is in the middle of a text node like "a|b" + if (container.nodeType == 3 && (start ? offset > 0 : offset < container.nodeValue.length)) { + return false; + } + + // Walk the DOM and look for text nodes or non empty elements + walker = new TreeWalker(container, parentBlock); + while (node = (start ? walker.prev() : walker.next())) { + if (node.nodeType === 1) { + // Ignore bogus elements + if (node.getAttribute('data-mce-bogus')) { + continue; + } + + // Keep empty elements like + name = node.nodeName.toLowerCase(); + if (name === 'IMG') { + return false; + } + } else if (node.nodeType === 3 && !/^[ \t\r\n]*$/.test(node.nodeValue)) { + return false; + } + } + + return true; + }; + + // Wraps any text nodes or inline elements in the specified forced root block name + function wrapSelfAndSiblingsInDefaultBlock(container, offset) { + var newBlock, parentBlock, startNode, node, next; + + // Not in a block element or in a table cell or caption + parentBlock = dom.getParent(container, dom.isBlock); + if (newBlockName && !evt.shiftKey && (!parentBlock || !canSplitBlock(parentBlock))) { + parentBlock = parentBlock || dom.getRoot(); + + if (!parentBlock.hasChildNodes()) { + newBlock = dom.create(newBlockName); + parentBlock.appendChild(newBlock); + rng.setStart(newBlock, 0); + rng.setEnd(newBlock, 0); + return newBlock; + } + + // Find parent that is the first child of parentBlock + node = container; + while (node.parentNode != parentBlock) { + node = node.parentNode; + } + + // Loop left to find start node start wrapping at + while (node && !dom.isBlock(node)) { + startNode = node; + node = node.previousSibling; + } + + if (startNode) { + newBlock = dom.create(newBlockName); + startNode.parentNode.insertBefore(newBlock, startNode); + + // Start wrapping until we hit a block + node = startNode; + while (node && !dom.isBlock(node)) { + next = node.nextSibling; + newBlock.appendChild(node); + node = next; + } + + // Restore range to it's past location + rng.setStart(container, offset); + rng.setEnd(container, offset); + } + } + + return container; + }; + + // Inserts a block or br before/after or in the middle of a split list of the LI is empty + function handleEmptyListItem() { + function isFirstOrLastLi(first) { + var node = containerBlock[first ? 'firstChild' : 'lastChild']; + + // Find first/last element since there might be whitespace there + while (node) { + if (node.nodeType == 1) { + break; + } + + node = node[first ? 'nextSibling' : 'previousSibling']; + } + + return node === parentBlock; + }; + + newBlock = newBlockName ? createNewBlock(newBlockName) : dom.create('BR'); + + if (isFirstOrLastLi(true) && isFirstOrLastLi()) { + // Is first and last list item then replace the OL/UL with a text block + dom.replace(newBlock, containerBlock); + } else if (isFirstOrLastLi(true)) { + // First LI in list then remove LI and add text block before list + containerBlock.parentNode.insertBefore(newBlock, containerBlock); + } else if (isFirstOrLastLi()) { + // Last LI in list then temove LI and add text block after list + dom.insertAfter(newBlock, containerBlock); + } else { + // Middle LI in list the split the list and insert a text block in the middle + // Extract after fragment and insert it after the current block + tmpRng = rng.cloneRange(); + tmpRng.setStartAfter(parentBlock); + tmpRng.setEndAfter(containerBlock); + fragment = tmpRng.extractContents(); + dom.insertAfter(fragment, containerBlock); + dom.insertAfter(newBlock, containerBlock); + } + + dom.remove(parentBlock); + moveToCaretPosition(newBlock); + undoManager.add(); + }; + + // Walks the parent block to the right and look for BR elements + function hasRightSideBr() { + var walker = new TreeWalker(container, parentBlock), node; + + while (node = walker.current()) { + if (node.nodeName == 'BR') { + return true; + } + + node = walker.next(); + } + } + + // Inserts a BR element if the forced_root_block option is set to false or empty string + function insertBr() { + var brElm, extraBr, documentMode; + + 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') + rng.insertNode(brElm); + rng.setStartAfter(brElm); + rng.setEndAfter(brElm); + extraBr = true; + } + } + + brElm = dom.create('br'); + rng.insertNode(brElm); + + // Rendering modes below IE8 doesn't display BR elements in PRE unless we have a \n before it + documentMode = dom.doc.documentMode; + if (tinymce.isIE && parentBlockName == 'PRE' && (!documentMode || documentMode < 8)) { + brElm.parentNode.insertBefore(dom.doc.createTextNode('\r'), brElm); + } + + if (!extraBr) { + rng.setStartAfter(brElm); + rng.setEndAfter(brElm); + } else { + rng.setStartBefore(brElm); + rng.setEndBefore(brElm); + } + + selection.setRng(rng); + undoManager.add(); + }; + + // Trims any linebreaks at the beginning of node user for example when pressing enter in a PRE element + function trimLeadingLineBreaks(node) { + do { + if (node.nodeType === 3) { + node.nodeValue = node.nodeValue.replace(/^[\r\n]+/, ''); + } + + node = node.firstChild; + } while (node); + }; + + // Delete any selected contents + if (!rng.collapsed) { + editor.execCommand('Delete'); + return; + } + + // Event is blocked by some other handler for example the lists plugin + if (evt.isDefaultPrevented()) { + return; + } + + // Setup range items and newBlockName + container = rng.startContainer; + offset = rng.startOffset; + newBlockName = settings.forced_root_block; + newBlockName = newBlockName ? newBlockName.toUpperCase() : ''; + + // Resolve node index + if (container.nodeType == 1 && container.hasChildNodes()) { + container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container; + offset = 0; + } + + undoManager.beforeChange(); + + // Wrap the current node and it's sibling in a default block if it's needed. + // for example this
    will become this + container = wrapSelfAndSiblingsInDefaultBlock(container, offset); + + // Find parent block and setup empty block paddings + parentBlock = dom.getParent(container, dom.isBlock); + containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null; + + // Setup block names + parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5 + containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5 + + // Handle enter inside an empty list item + if (parentBlockName == 'LI' && dom.isEmpty(parentBlock)) { + // Let the list plugin or browser handle nested lists for now + if (/^(UL|OL|LI)$/.test(containerBlock.parentNode.nodeName)) { + return false; + } + + 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) { + 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)) { + insertBr(); + return; + } + } + + // Default block name if it's not configured + newBlockName = newBlockName || 'P'; + + // Insert new block before/after the parent block depending on caret location + if (isCaretAtStartOrEndOfBlock()) { + // If the caret is at the end of a header we produce a P tag after it similar to Word unless we are in a hgroup + if (/^(H[1-6]|PRE)$/.test(parentBlockName) && containerBlockName != 'HGROUP') { + newBlock = createNewBlock(newBlockName); + } else { + newBlock = createNewBlock(); + } + + // Split the current container block element if enter is pressed inside an empty inner block element + if (settings.end_container_on_empty_block && canSplitBlock(containerBlock) && dom.isEmpty(parentBlock)) { + // Split container block for example a BLOCKQUOTE at the current blockParent location for example a P + newBlock = dom.split(containerBlock, parentBlock); + } else { + dom.insertAfter(newBlock, parentBlock); + } + } else if (isCaretAtStartOrEndOfBlock(true)) { + // Insert new block before + newBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock); + } else { + // Extract after fragment and insert it after the current block + tmpRng = rng.cloneRange(); + tmpRng.setEndAfter(parentBlock); + fragment = tmpRng.extractContents(); + trimLeadingLineBreaks(fragment); + newBlock = fragment.firstChild; + dom.insertAfter(fragment, parentBlock); + } + + dom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique + moveToCaretPosition(newBlock); + undoManager.add(); + } + + editor.onKeyDown.add(function(ed, evt) { + if (evt.keyCode == 13) { + if (handleEnterKey(evt) !== false) { + evt.preventDefault(); + } + } + }); + }; +})(tinymce); diff --git a/library/tinymce/jscripts/tiny_mce/utils/editable_selects.js b/library/tinymce/jscripts/tiny_mce/utils/editable_selects.js old mode 100755 new mode 100644 index fd943c0f87..4b920f3d1a --- a/library/tinymce/jscripts/tiny_mce/utils/editable_selects.js +++ b/library/tinymce/jscripts/tiny_mce/utils/editable_selects.js @@ -16,7 +16,7 @@ var TinyMCE_EditableSelects = { for (i=0; i'; - h += ' '; + if (label = dom.select('label[for=' + target_form_element + ']')[0]) { + label.id = label.id || dom.uniqueId(); + } + + h += ''; + h += ' '; return h; } @@ -67,6 +71,9 @@ function selectByValue(form_obj, field_name, value, add_custom, ignore_case) { if (!form_obj || !form_obj.elements[field_name]) return; + if (!value) + value = ""; + var sel = form_obj.elements[field_name]; var found = false; @@ -171,7 +178,7 @@ function convertHexToRGB(col) { } function trimSize(size) { - return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2'); + return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2'); } function getCSSSize(size) { @@ -183,6 +190,9 @@ function getCSSSize(size) { // Add px if (/^[0-9]+$/.test(size)) size += 'px'; + // Sanity check, IE doesn't like broken values + else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size))) + return ""; return size; } diff --git a/library/tinymce/jscripts/tiny_mce/utils/mctabs.js b/library/tinymce/jscripts/tiny_mce/utils/mctabs.js old mode 100755 new mode 100644 index 825d4c1433..458ec86da6 --- a/library/tinymce/jscripts/tiny_mce/utils/mctabs.js +++ b/library/tinymce/jscripts/tiny_mce/utils/mctabs.js @@ -10,6 +10,7 @@ function MCTabs() { this.settings = []; + this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher'); }; MCTabs.prototype.init = function(settings) { @@ -28,26 +29,62 @@ MCTabs.prototype.getParam = function(name, default_value) { return value; }; -MCTabs.prototype.displayTab = function(tab_id, panel_id) { - var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i; +MCTabs.prototype.showTab =function(tab){ + tab.className = 'current'; + tab.setAttribute("aria-selected", true); + tab.setAttribute("aria-expanded", true); + tab.tabIndex = 0; +}; + +MCTabs.prototype.hideTab =function(tab){ + var t=this; + + tab.className = ''; + tab.setAttribute("aria-selected", false); + tab.setAttribute("aria-expanded", false); + tab.tabIndex = -1; +}; + +MCTabs.prototype.showPanel = function(panel) { + panel.className = 'current'; + panel.setAttribute("aria-hidden", false); +}; + +MCTabs.prototype.hidePanel = function(panel) { + panel.className = 'panel'; + panel.setAttribute("aria-hidden", true); +}; + +MCTabs.prototype.getPanelForTab = function(tabElm) { + return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls"); +}; + +MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) { + var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this; + + tabElm = document.getElementById(tab_id); + + if (panel_id === undefined) { + panel_id = t.getPanelForTab(tabElm); + } panelElm= document.getElementById(panel_id); panelContainerElm = panelElm ? panelElm.parentNode : null; - tabElm = document.getElementById(tab_id); tabContainerElm = tabElm ? tabElm.parentNode : null; - selectionClass = this.getParam('selection_class', 'current'); + selectionClass = t.getParam('selection_class', 'current'); if (tabElm && tabContainerElm) { nodes = tabContainerElm.childNodes; // Hide all other tabs for (i = 0; i < nodes.length; i++) { - if (nodes[i].nodeName == "LI") - nodes[i].className = ''; + if (nodes[i].nodeName == "LI") { + t.hideTab(nodes[i]); + } } // Show selected tab - tabElm.className = 'current'; + t.showTab(tabElm); } if (panelElm && panelContainerElm) { @@ -56,11 +93,15 @@ MCTabs.prototype.displayTab = function(tab_id, panel_id) { // Hide all other panels for (i = 0; i < nodes.length; i++) { if (nodes[i].nodeName == "DIV") - nodes[i].className = 'panel'; + t.hidePanel(nodes[i]); + } + + if (!avoid_focus) { + tabElm.focus(); } // Show selected panel - panelElm.className = 'current'; + t.showPanel(panelElm); } }; @@ -73,5 +114,49 @@ MCTabs.prototype.getAnchor = function() { return ""; }; -// Global instance + +//Global instance var mcTabs = new MCTabs(); + +tinyMCEPopup.onInit.add(function() { + var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each; + + each(dom.select('div.tabs'), function(tabContainerElm) { + var keyNav; + + dom.setAttrib(tabContainerElm, "role", "tablist"); + + var items = tinyMCEPopup.dom.select('li', tabContainerElm); + var action = function(id) { + mcTabs.displayTab(id, mcTabs.getPanelForTab(id)); + mcTabs.onChange.dispatch(id); + }; + + each(items, function(item) { + dom.setAttrib(item, 'role', 'tab'); + dom.bind(item, 'click', function(evt) { + action(item.id); + }); + }); + + dom.bind(dom.getRoot(), 'keydown', function(evt) { + if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab + keyNav.moveFocus(evt.shiftKey ? -1 : 1); + tinymce.dom.Event.cancel(evt); + } + }); + + each(dom.select('a', tabContainerElm), function(a) { + dom.setAttrib(a, 'tabindex', '-1'); + }); + + keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { + root: tabContainerElm, + items: items, + onAction: action, + actOnFocus: true, + enableLeftRight: true, + enableUpDown: true + }, tinyMCEPopup.dom); + }); +}); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/utils/validate.js b/library/tinymce/jscripts/tiny_mce/utils/validate.js old mode 100755 new mode 100644 index a6fcf97015..27cbfab811 --- a/library/tinymce/jscripts/tiny_mce/utils/validate.js +++ b/library/tinymce/jscripts/tiny_mce/utils/validate.js @@ -32,7 +32,7 @@ var Validator = { }, isSize : function(s) { - return this.test(s, '^[0-9]+(%|in|cm|mm|em|ex|pt|pc|px)?$'); + return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$'); }, isId : function(s) { @@ -96,8 +96,10 @@ var AutoValidator = { var i, nl, s = this.settings, c = 0; nl = this.tags(f, 'label'); - for (i=0; i Date: Tue, 20 Mar 2012 21:04:09 -0700 Subject: [PATCH 116/133] added README to mcefixes to explain what is going on. --- library/mcefixes/README | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 library/mcefixes/README diff --git a/library/mcefixes/README b/library/mcefixes/README new file mode 100644 index 0000000000..dca70e1c39 --- /dev/null +++ b/library/mcefixes/README @@ -0,0 +1,4 @@ +In order to make TinyMCE work smoothly with Friendica, the files in this directory are those few files we've changed in TinyMCE. We will attempt to keep them current, but if you decide to upgrade tinymce, it is best to save current copies of the files in question from the active tinymce tree and replace them or merge them after upgrade. + +Except for some simple theming, the primary changes are the advanced theme icon set, which we changed the "html" icon to "[]" to represent BBcode, and major changes have been made to the bbcode plugin. + \ No newline at end of file From cf17606d0f6200296b1e6d67f9ae3fb797e0df69 Mon Sep 17 00:00:00 2001 From: tony baldwin Date: Wed, 21 Mar 2012 01:33:48 -0400 Subject: [PATCH 117/133] added Vijay's theme from facepark.in --- library/.slinky.php.swp | Bin 0 -> 16384 bytes view/theme/facepark.tar.gz | Bin 0 -> 112640 bytes view/theme/facepark/border.jpg | Bin 0 -> 342 bytes view/theme/facepark/comment_item.tpl | 32 + view/theme/facepark/contact_template.tpl | 25 + view/theme/facepark/conversation.tpl | 25 + view/theme/facepark/ff-16.jpg | Bin 0 -> 644 bytes view/theme/facepark/file.gif | Bin 0 -> 615 bytes view/theme/facepark/friendika-16.png | Bin 0 -> 699 bytes view/theme/facepark/group_side.tpl | 28 + view/theme/facepark/head.jpg | Bin 0 -> 383 bytes view/theme/facepark/jot.tpl | 84 + view/theme/facepark/lock.cur | Bin 0 -> 4286 bytes view/theme/facepark/login-bg.gif | Bin 0 -> 237 bytes view/theme/facepark/nav.tpl | 68 + view/theme/facepark/nets.tpl | 10 + view/theme/facepark/photo-menu.jpg | Bin 0 -> 459 bytes view/theme/facepark/profile_vcard.tpl | 47 + view/theme/facepark/saved_searches_aside.tpl | 14 + view/theme/facepark/search_item.tpl | 54 + view/theme/facepark/shiny.png | Bin 0 -> 362 bytes view/theme/facepark/style.css | 3066 ++++++++++++++++++ view/theme/facepark/theme.php | 49 + view/theme/facepark/wall_item.tpl | 77 + view/theme/facepark/wallwall_item.tpl | 82 + 25 files changed, 3661 insertions(+) create mode 100644 library/.slinky.php.swp create mode 100644 view/theme/facepark.tar.gz create mode 100755 view/theme/facepark/border.jpg create mode 100755 view/theme/facepark/comment_item.tpl create mode 100755 view/theme/facepark/contact_template.tpl create mode 100755 view/theme/facepark/conversation.tpl create mode 100755 view/theme/facepark/ff-16.jpg create mode 100644 view/theme/facepark/file.gif create mode 100755 view/theme/facepark/friendika-16.png create mode 100755 view/theme/facepark/group_side.tpl create mode 100755 view/theme/facepark/head.jpg create mode 100755 view/theme/facepark/jot.tpl create mode 100755 view/theme/facepark/lock.cur create mode 100755 view/theme/facepark/login-bg.gif create mode 100755 view/theme/facepark/nav.tpl create mode 100755 view/theme/facepark/nets.tpl create mode 100755 view/theme/facepark/photo-menu.jpg create mode 100755 view/theme/facepark/profile_vcard.tpl create mode 100755 view/theme/facepark/saved_searches_aside.tpl create mode 100755 view/theme/facepark/search_item.tpl create mode 100755 view/theme/facepark/shiny.png create mode 100644 view/theme/facepark/style.css create mode 100755 view/theme/facepark/theme.php create mode 100755 view/theme/facepark/wall_item.tpl create mode 100755 view/theme/facepark/wallwall_item.tpl diff --git a/library/.slinky.php.swp b/library/.slinky.php.swp new file mode 100644 index 0000000000000000000000000000000000000000..ab043e8806fcdcc3e94dc35ef9988148cde521bc GIT binary patch literal 16384 zcmeHNU2G#)6~2Z3kV1iiK(t73cDpFa*0GapS6z0yyEyh_J;kxj%w*H>62_kEcp7`g zou9Z?w;&!6v=Rs^`ot^Z4XFr;A5}ttc&K;)BtU&YqC%=b<%u_F3zYBNxlZg&mMuR| zFwuT%&%Ni~bIy0q{X66K@>O$#9xSd3{JmRbO{`POkueZL*K(YO@%{a|lg9QKAc={2v;8ORxU za}3-i&aAF1v+R8*Ptbecv-#$lZpI=x1H(mdzF0X3^6Fq;`_1AR$cdn~{UDrRQ z>sPhGllHIa`cu08`RnR+asH7rkTZ}okTZ}okTZ}okTZ}okT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ah{7Hmk72A_VePvtrm6l#^A{GS~&ParmubR?)s(hhr_HV)7T` z5o4oOFI(Hne0XjfpV)*DD)k81qH5ZedKojYibb>m)6_6JWY@~|x*ESqv$buRS8A|r zs{!9&jUv&6D^1I$HA8V&H)y?S350@Gh6+OwxM5h88XomXFd+mE6?2fLGPTNi0{FqPRSTc!M0{nV8jQEHc zK{Qkg7e2id3kw#F2>X{uT~uIA@v)SJ-DKqQj({D65BBj83rpAUV6$1GhD0f!7_d_Y zZnk|@vl(w?r*;aUXHt!;LAI;nn1Wq8Rtpu5``A%D^hZ3GOOVet-2sjxk?;0nwsRkg z8Fmof#<(}n$Kk?nr+fs+9AjhqC}kDAHv8G>fL8}@&<%N);4KYJJAD_2mk8Ta)>+uW z-W4R-xq|(&1grpLp|5JD@=dJ(0|4ld2E59rC6Z4#yFn72$S*Lt8<4^)H$Q ze~wxJuVS1tI;;cBy0##3wF@^=uf`C!Kn$RY1jK}QNT)iF&9XC19U2W}a$d}`p%z>| zCPB3}iAkQ~C*}h`28zQ_N6jGgIA|2Z1tH3~4k(^t(8$}C^opW#K;A-Ukye+NKZ*$? z-IVIGjk69mY4Oly{%t+q|C_jXzYg&I|CGLq{t9>eZv)Q&bHMGut-#B;>u&)LU;$@< zS8>;W1^7Mi0pO3g@BbS38Sn$(dEooN_kdl%1eSq&fLnk+ASdtw@Eq_(Uo!O>? zgVcHHF&Ugm)7fTSl}Rrpot5Fa&P<1XT-^0aE8~aHt<01soL4W!dn>h>;5lKsPo&(Te^dxB5)gN~AHGn#i4vNRRmu=`oNk?)o90AQrRX?u ztV*=Hc8zB1GEGcPHx05^A_I3%?qst@J48<)U8n{|kIM8jluR5SWO*SOWv@7pW1mg^VzmANb>7VX literal 0 HcmV?d00001 diff --git a/view/theme/facepark.tar.gz b/view/theme/facepark.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0dca01cfe927f9cb5a8d0abf37d25339b2ef8882 GIT binary patch literal 112640 zcmeHw34ondb?{_QhAjyJ0%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B>PKf)jmaz7&j zGGJk52TF(upo=pIC4w}7)T3%(WMT$Nhzg% f9U_4e8jYbYT*|B>4vQSR6atx6%@A>8_ +
    + + + + + + + +
    + $mytitle +
    +
    + + {{ if $qcomment }} + {{ for $qcomment as $qc }} + $qc +   + {{ endfor }} + {{ endif }} + +
    + + +
    + + + diff --git a/view/theme/facepark/contact_template.tpl b/view/theme/facepark/contact_template.tpl new file mode 100755 index 0000000000..48930b48ab --- /dev/null +++ b/view/theme/facepark/contact_template.tpl @@ -0,0 +1,25 @@ + +
    +
    +
    + + $contact.name + + {{ if $contact.photo_menu }} + menu +
    +
      + $contact.photo_menu +
    +
    + {{ endif }} +
    + +
    +
    +
    $contact.name
    + +
    +
    diff --git a/view/theme/facepark/conversation.tpl b/view/theme/facepark/conversation.tpl new file mode 100755 index 0000000000..43bb1dd470 --- /dev/null +++ b/view/theme/facepark/conversation.tpl @@ -0,0 +1,25 @@ +{{ for $threads as $thread }} +
    + {{ for $thread.items as $item }} + {{if $item.comment_firstcollapsed}} +
    + $thread.num_comments $thread.hide_text +
    + {{endif}} + + {{ inc $item.template }}{{ endinc }} + + + {{ endfor }} +
    +{{ endfor }} + +{{ if $dropping }} + +
    +{{ endif }} diff --git a/view/theme/facepark/ff-16.jpg b/view/theme/facepark/ff-16.jpg new file mode 100755 index 0000000000000000000000000000000000000000..3621f59148398ca78a670fd3134cf6739a346cde GIT binary patch literal 644 zcmex=O1eh6>7?=bZ znFSgDA7Kz-U}QiA96(Vy0R~1^u#GS|Rz_wPHg+ZsArVoayeLo(CIg|_LE2OV85mg@ znb?@&a!g=ttRftofimxJ#@AiifwGDncT6PBEX~+9-4*kc)Yu}|R&RLV;{NEiYL$;|B1MOl^sl}6(k*IS zxlQ=Ur&TVeCAu{?E_j{GzV(nGPg!{Enhk4Zi>()|I$g3fp)objfK9UN%lmbzCnv1m z)ypKed3oBtg3ne#r9Qd-k%`Yrg1HKQ?3PYA^0_nm?dEh3E~(EUGmk9uy>z6-@9C7x zj&oC9Pgl0pOg39|H#>fX?9z9~-bj6ms|$vz@7jA literal 0 HcmV?d00001 diff --git a/view/theme/facepark/file.gif b/view/theme/facepark/file.gif new file mode 100644 index 0000000000000000000000000000000000000000..7885b998d578d4523103e1f5dfbcd8133a7f0fe7 GIT binary patch literal 615 zcmZ?wbhEHb6krfwIF`)7#xKb(Aj2uD!Xs-asNo`J94_scC*xeG;M1rUF;y*cx?0ps z_2^mZF>^Fx=V~P{*G^rfleShbd#hf~c7uYwhQ)`B%8nbAoir{#Wm{SZR^k3H=J{9Jm=JO-lh4xYs&@q)(f6(7rfdp`gC0M@46J&eJQBta!B9h@CjEU zCtit~bTwx3)z~T5;-_9qoOUf~`t_6<*HdTSNS}2hbM}p#xi@p?-O8VTt6<^nlEt^n zm)@yZcDHury{0wy+t)wn*zmAxdicePqc2w-f4Szw%e5z8tv~f@)0x*>&c5Dp;q9)AZ+BmMxA*e9{a4-{xcdI^ z^$$mHd^mpV!>KzTPv8A?_TH!S_doro4N&~a!pOx?&!EEq1fV!!U_a7O-_+dF+SU>! zFQMYz-Xh@HBp)OYX*7MhPg@W#w~=pBQbN3eZz~TMmqFs9_?SQ)4OK-ssb;;n#j&A* zd-rW?(vFUgwX!ldG1S#kSCW^J(hQGrGYyNp5g8E{5^SNR78+&d5VFtD$HU2(Cq_BY z%_KY^(BH??#leP8tzN;;s4bxJl1t}A1>2$$i-f1=+Y}7fSVT6ZoamP|_An?=&^XL3 nuk6%xBcZXWg@e6|V^=`pp=K5i9uWlt2ZjcQz9KFz76xkoO@B#U literal 0 HcmV?d00001 diff --git a/view/theme/facepark/friendika-16.png b/view/theme/facepark/friendika-16.png new file mode 100755 index 0000000000000000000000000000000000000000..1a742ecdc1016e7033e78e37fbecade08fef6d50 GIT binary patch literal 699 zcmV;s0!00ZP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L03itg03ithOzq;@00007bV*G`2ipS$ z1Ro(nX?n5%00KKnL_t(I%Y~9nh>c+s$A9O2-|OCCKFWd^Wr4v0`G~T$Ae$*+uPn_* zN>i3(p=38qlogSkm8^({Bw6{GjAABaW^%t~?!C{)-{PHnXGY=Fd7jgG&iOshbIvh< z7~>{0+YWS*i-5R9!ykJYm^8C*nWTds#wSL8PQKl_s^|#85xggaR>ua%i+2&%+mCmS zR=vWOzU+~t)As4p#L4kD5AGd4P(;qjPDC%)CFD z4PUsl;p&-gsDwOO4#{KD0e%4#7@tT8>#8`{!UYlf2K4mGxgFX4ySG{wPwaz2kD&na ze4BAp>rE7Mz{*nO<9HVusN!9dD50!mGXZ4)uKF43Szf*r&R+h(gVGt)sDbi|_H68< ztJwm9nSlgA1`7@|zyK&Du=d~)Vs(b)qIO6}vPE<8M1r7%NYc(zk^qWkW`6@LNED|A zyE)o_ljs@%l!}QB-B=OXeauk&4*)o{w+9$obaWd-Q{4%BjtfQmCqM#ASpL_vJ)D15 zU@1WPVu>;OaE@oM%AN3H29;my={3v4P=}PYZ*?(;q!>?LmU%w-oKXJRdDiOvo>(u_ z?rTg79YAfmlCrLmNiwqpTEVdCuUNZ{5<;XBk^sq?H2_O`O58bry^1g@b3xTw#0LnC zI=(rNZ`5<0ui@rvxcREQb2j_ +

    $title

    + + + + + + diff --git a/view/theme/facepark/head.jpg b/view/theme/facepark/head.jpg new file mode 100755 index 0000000000000000000000000000000000000000..6210b76befb3c2085194217e94e6b6b19d8a5a46 GIT binary patch literal 383 zcmex=LJ%Z3brsRu&*& z29a#6tZW>-931TI90J@toV>yUBEmufLP8?qvXUZVGGanPQp!>?a`K9biXxIK>M9Cq zvI>d{AVU~g+1NPPIrup^_!UHjL={K|{|_(-axl~|urf0$F)#@-G7B>PKf)jhc0V%% z5@2RyWaj`%DF^_4#>m9Zh>#OvViaUy6%7muopcGPLIUV_koOUQiIJIs1tcSgF2f)w z%*gcr76T76BhYqcK?ZwT%fkrCN0aq{`U e%N;)te=@#)^7-|oFLP{6q$G}S_`JRT|4jhcT}_Yx literal 0 HcmV?d00001 diff --git a/view/theme/facepark/jot.tpl b/view/theme/facepark/jot.tpl new file mode 100755 index 0000000000..5fe1f954ee --- /dev/null +++ b/view/theme/facepark/jot.tpl @@ -0,0 +1,84 @@ + +
    +
    +
     
    +
    +
    +
    + +
    + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    + + +
    + +
    +
    + +
    +
    + +
    + + +
    + $bang +
    + + $preview + +
    + + +
    + $jotplugins +
    + +
    + +
    + + + +
    +
    + $acl +
    +
    $emailcc
    +
    + $jotnets +
    +
    + + +
    + +
    + +
    + {{ if $content }}{{ endif }} diff --git a/view/theme/facepark/lock.cur b/view/theme/facepark/lock.cur new file mode 100755 index 0000000000000000000000000000000000000000..892c5e851eedc16e9844061b199e24194cfbc370 GIT binary patch literal 4286 zcmd^C$KVDWfom`T#)dc~R#4I^Rs~r4O)`b{bmUKcqz}))c5uC(7v?)v4a2P)ZNa- z@$&T2)z|&~{r~^}A^8LV00000EC2ui01yBW000GQ;3tk`X`bk)Wk@<6#nZYULKH{p zEx|?+kif!I0vIL|#ZMubBmjWH2OtmxIFVa~6JQ7!1CK!f5W#StOTv&C3=E8h2vI1s n+#cd5;2fT3B_0kF0v!+!GARoV78n&7dMN`JIW(4+BOw4gP{MS* literal 0 HcmV?d00001 diff --git a/view/theme/facepark/nav.tpl b/view/theme/facepark/nav.tpl new file mode 100755 index 0000000000..4675c3e5c2 --- /dev/null +++ b/view/theme/facepark/nav.tpl @@ -0,0 +1,68 @@ + + + diff --git a/view/theme/facepark/nets.tpl b/view/theme/facepark/nets.tpl new file mode 100755 index 0000000000..b0cb8890c5 --- /dev/null +++ b/view/theme/facepark/nets.tpl @@ -0,0 +1,10 @@ +
    +

    $title

    +
    $desc
    + $all +
      + {{ for $nets as $net }} +
    • $net.name
    • + {{ endfor }} +
    +
    diff --git a/view/theme/facepark/photo-menu.jpg b/view/theme/facepark/photo-menu.jpg new file mode 100755 index 0000000000000000000000000000000000000000..fde5eb53524ddb12ec5642f33d0d34e14e256193 GIT binary patch literal 459 zcmex=&g!NbMF!_CFb&C4ewz{@Ad$IUGuCLky*A}T7%!!Ir&CL$pu zA}RthgpnDjhlQ1sm6cP3mz!6FWbpq0gCGZk0D}NCqY?v?AS1IN>UQrQGDKoE6M2QoDc3G+f#K-Lz&!r^Qc^B##H0%WszGMCU1W znAE#pe4KOt&Ml**OEy0VoUS}?d3@zno#;NjlP3257arA~E4nCar)(9G=iXTV|0V#| C@@!oI literal 0 HcmV?d00001 diff --git a/view/theme/facepark/profile_vcard.tpl b/view/theme/facepark/profile_vcard.tpl new file mode 100755 index 0000000000..154f22363c --- /dev/null +++ b/view/theme/facepark/profile_vcard.tpl @@ -0,0 +1,47 @@ +
    + +
    $profile.name
    + + + + {{ if $pdesc }}
    $profile.pdesc
    {{ endif }} +
    $profile.name
    + + + + {{ if $location }} +
    $location
    +
    + {{ if $profile.address }}
    $profile.address
    {{ endif }} + + $profile.locality{{ if $profile.locality }}, {{ endif }} + $profile.region + $profile.postal-code + + {{ if $profile.country-name }}$profile.country-name{{ endif }} +
    +
    + {{ endif }} + + {{ if $gender }}
    $gender
    $profile.gender
    {{ endif }} + + {{ if $profile.pubkey }}{{ endif }} + + {{ if $marital }}
    $marital
    $profile.marital
    {{ endif }} + + {{ if $homepage }}
    $homepage
    $profile.homepage
    {{ endif }} + + {{ inc diaspora_vcard.tpl }}{{ endinc }} + + +
    + +$contact_block + + diff --git a/view/theme/facepark/saved_searches_aside.tpl b/view/theme/facepark/saved_searches_aside.tpl new file mode 100755 index 0000000000..e6a0d6278d --- /dev/null +++ b/view/theme/facepark/saved_searches_aside.tpl @@ -0,0 +1,14 @@ +
    + + $searchbox + +
      + {{ for $saved as $search }} +
    • + + $search.term +
    • + {{ endfor }} +
    +
    +
    diff --git a/view/theme/facepark/search_item.tpl b/view/theme/facepark/search_item.tpl new file mode 100755 index 0000000000..bfad1b7b72 --- /dev/null +++ b/view/theme/facepark/search_item.tpl @@ -0,0 +1,54 @@ +
    +
    +
    +
    + + $item.name + menu +
    +
      + $item.item_photo_menu +
    +
    +
    +
    +
    + {{ if $item.lock }}
    $item.lock
    + {{ else }}
    {{ endif }} +
    $item.location
    +
    +
    +
    + $item.name +
    $item.ago
    + +
    +
    +
    $item.title
    +
    +
    $item.body
    +
    +
    +
    + {{ if $item.drop.dropping }}{{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    +
    +
    +
    + + +
    + {{ if $item.conv }} + $item.conv.title + {{ endif }} +
    + +
    + +
    + + diff --git a/view/theme/facepark/shiny.png b/view/theme/facepark/shiny.png new file mode 100755 index 0000000000000000000000000000000000000000..994c0d05d730d7302a6de1298ba2e6514b1b2b1f GIT binary patch literal 362 zcmeAS@N?(olHy`uVBq!ia0vp^{2DD*GD0X#=CwqOyN|ANrXCgtsO~{o7Kx>VR49a!E110l tt5Y-2UBA!rY|*rqD|U=*i^{m~zTrK5!YQLoO7=6zm!7VEF6*2UngHobgVX>3 literal 0 HcmV?d00001 diff --git a/view/theme/facepark/style.css b/view/theme/facepark/style.css new file mode 100644 index 0000000000..6680a64347 --- /dev/null +++ b/view/theme/facepark/style.css @@ -0,0 +1,3066 @@ +/** + * duepuntozero Frindika style + * Fabio Comuni + */ + + +/* generals */ +body { + font-family: helvetica,arial,freesans,clean,sans-serif; + font-size: 12px; + background-color: #ffffff; + /*background-image: url(head.jpg);*/ + background-repeat: repeat-x; + color: #000000; + margin: 0px; +} + + +a, a:visited, a:link { color: #0B4E7A; text-decoration: none; } +a:hover {text-decoration: underline; } + +input { + /*border: 1px solid #666666;*/ + /*-moz-border-radius: 3px;*/ + border-radius: 3px; + padding: 3px; + background-color: #0B4E7A; + color: #ffffff; + font-size: 12px; + font-weight: bold; +} + +img { border :1px; } + +#id_openid_url, .openid input { + background: url(login-bg.gif) no-repeat; + background-position: 0 50%; + padding-left: 18px; +} +.openid:hover { + +} + +#id_openid_url { + width: 384px; +} + +code { + font-family: Courier, monospace; + white-space: pre; + display: block; + overflow: auto; + border: 1px solid #444; + background: #EEE; + color: #444; + padding: 10px; + margin-top: 20px; +} + +blockquote { + background-color: #f4f8f9; + border-left: 4px solid #dae4ee; + padding: 0.4em; +} + +.icollapse-wrapper, .ccollapse-wrapper { + border: 1px solid #CCC; + padding: 5px; +} + +.hide-comments { + margin-left: 5px; +} + +#panel { + background-color: ivory; + position: absolute; + z-index: 2; + width: 30%; + padding: 25px; + border: 1px solid #444; +} + +.heart { + color: #FF0000; + font-size: 100%; +} + + + +/* nav */ +nav { + height: 94px; + display: block; + margin: 0px 10%; + border-bottom: 1px solid #0B4E7A; +} +nav #site-location { + color: ##0B4E7A; + font-size:12px; + position: absolute; + font-weight: bold; + +} + +.error-message { + color: #245f6e; + font-size: 1.1em; + /*border: 1px solid #245f6e;*/ + background-color: #FFFFFF; + padding: 10px; + font-weight: bold; +} + +.info-message { + color: #204a87; + font-size: 1.1em; + border: 1px solid #3465a4; + background-color: #d7e3f1; + padding: 10px; +} + + +nav #banner { + display: block; + margin-top: 14px; + position: absolute; +} +nav #banner #logo-text a { + font-size: 40px; + font-weight: bold; + margin-left: 3px; + color: #0B4E7A; + +} +nav #banner #logo-text a:hover { text-decoration: none; } + + +.nav-commlink, .nav-login-link { + display: block; + height: 15px; + margin-top: 67px; + margin-right: 2px; + padding: 6px 10px; + float: left; + bottom: 140px; + border: 1px solid #0B4E7A; + border-bottom: 0px; + background-color: #FFFFFF; + /*font-weight: bold;*/ + color: #FFFFFF; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +nav .nav-link { + float: right; + margin: 0.2em 0em; + padding: 0em 0.5em; + background-color: transparent !important; +} + +.nav-commlink.selected { + background-color: #ffffff; + border-bottom: 1px solid #ffffff; + color: #000000 !important; + margin-top: 64px; + padding-top: 6px; + padding-bottom: 8px; +} +.nav-ajax-left { + /*font-size: 0.8em;*/ + font-size:12px ; + font-weight: bold; + float: left; + margin-top: 62px; +} + + +nav #nav-link-wrapper .nav-link { + border-right: 1px solid #babdb6; +} + +/* aside */ +aside { + display: block; + min-height: 112px; + width: 200px; + margin-left: 10%; + padding: 1em; + float: left; + background-image: url(border.jpg); + background-position: top left; + background-repeat: no-repeat; + position: absolute; +} + +#dfrn-request-link { + display: block; + color: #FFFFFF; + -webkit-border-radius: 5px ; + -moz-border-radius: 5px; + border-radius: 5px; + padding: 5px; + font-weight: bold; + background: #3465a4 url('friendika-16.png') no-repeat 95% center; +} + +/* section */ +section { + margin: 0px 10%; + padding-top: 1em; + padding-left: 250px; + padding-right: 1em; + display: block; + background-color: #FFFFFF; + background-image: url(border.jpg); + background-position: top right; + background-repeat: no-repeat; + min-height: 112px; + +} +.tabs { + height: 27px; + background-image: url(head.jpg); + background-repeat: repeat-x; + background-position: 0px -20px; + border-bottom: 1px solid #babdb6; + padding:0px; +} +.tabs li { margin: 0px; list-style: none; } +.tab { + display:block; + float:left; + padding: 0.4em; + margin-right: 1em; +} +.tab.active { + font-weight: bold; +} + + +/* footer */ +footer { + display: none; + +} + +.birthday-today, .event-today { + font-weight: bold; +} + +div.wall-item-content-wrapper.shiny { + background-image: url('shiny.png'); + background-position: -5px 30px; + background-repeat:no-repeat; +} + +.preview { + background: #FFFFC8; +} + +/* from default */ +#jot-perms-icon, +#profile-location, +#profile-nolocation, +#profile-youtube, +#profile-video, +#profile-audio, +#profile-link, +#profile-title, +#wall-image-upload, +#wall-file-upload, +#profile-upload-wrapper, +#wall-image-upload-div, +#wall-file-upload-div, +.hover, .focus { + cursor: pointer; +} + +#jot-perms-icon { + float: left; +} + + +#jot-title { + border: 0px; + margin: 0px; + height: 20px; + width: 530px; + margin-bottom: 5px; + font-weight: bold; + border: 1px solid #ffffff; +} + +#jot-title::-webkit-input-placeholder{font-weight: normal;} +#jot-title:-moz-placeholder{font-weight: normal;} + + +#jot-title:hover, +#jot-title:focus { + border: 1px solid #cccccc; +} + +.jothidden { display:none; } + + +.fakelink, .fakelink:visited, .fakelink:link { + color: #3465a4; + text-decoration: none; + cursor: pointer; + margin-top: 15px; + margin-bottom: 15px; +} +.lockview { + cursor: pointer; +} + +#group-sidebar { + margin-bottom: 10px; +} + +.group-selected, .nets-selected { + padding: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid #CCCCCC; + background: #F8F8F8; + font-weight: bold; +} + +.fakelink:hover { + color: #3465a4; + text-decoration: underline; + cursor: pointer; +} +.smalltext { + font-size: 0.7em; +} +#sysmsg { + /*width: 600px;*/ + margin-bottom: 10px; +} + +#register-fill-ext { + margin-bottom: 25px; +} + +#label-register-name, #label-register-email, #label-register-nickname, #label-register-openid { + float: left; + width: 350px; + margin-top: 10px; +} + +#register-name, #register-email, #register-nickname { + float: left; + margin-top: 10px; + width: 150px; +} + +#register-openid { + float: left; + margin-top: 10px; + width: 130px; +} + +#register-name-end, #register-email-end, #register-nickname-end, #register-submit-end, #register-openid-end { + clear: both; +} + +#register-nickname-desc { + margin-top: 30px; + width: 650px; +} +#register-sitename { + float: left; + margin-top: 10px; +} + +#register-submit-button { + margin-top: 10px; +} + + +#login_standard { + width: 210px; + float: left; +} +#login_openid { + width: 210px; + margin-left: 250px; +} + +#login_standard input, +#login_openid input { + width: 180px; +} + +#login-extra-links { + clear: both; +} + +#register-link, #lost-password-link { + /*float: left;*/ + /*font-size: 80%;*/ + margin-right: 15px; +} + +#login-name-end, #login-password-end, #login-extra-end, #login-submit-end { + height: 50px; +} + +#login-submit-button { +/* margin-top: 10px; */ +/* margin-left: 200px; */ + -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; + -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; + box-shadow:inset 0px 1px 0px 0px #ffffff; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #0b4e7a), color-stop(1, #165db3) ); + background:-moz-linear-gradient( center top, #0b4e7a 5%, #165db3 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0b4e7a', endColorstr='#165db3'); + background-color:#0b4e7a; + border:3px solid #f2eff2; + display:inline-block; + color:#ffffff; + font-family:arial; + font-size:14px; + font-weight:bold; + padding:4px 11px; + text-decoration:none; + text-shadow:0px 0px 0px #ffffff; + +} + + +input#dfrn-url { + float: left; + background: url(friendika-16.png) no-repeat; + background-position: 2px center; + font-size: 17px; + padding-left: 21px; + height: 21px; + background-color: #FFFFFF; + color: #000000; + margin-bottom: 20px; +} + +#dfrn-url-label { + float: left; + width: 250px; +} + +#dfrn-request-url-end { + clear: both; +} + +#knowyouyes, #knowyouno { + float: left; +} + +#dfrn-request-knowyou-yes-wrapper, #dfrn-request-knowyou-no-wrapper { + + float: none; +} +#dfrn-request-knowyou-yes-label, #dfrn-request-knowyou-no-label { + float: left; + width: 75px; + margin-left: 50px; + margin-bottom: 7px; +} +#dfrn-request-knowyou-break, #dfrn-request-knowyou-end { + clear: both; + +} + +#dfrn-request-message-wrapper { + margin-bottom: 50px; +} +#dfrn-request-submit-wrapper { + clear: both; + margin-left: 50px; +} + +#dfrn-request-info-wrapper { + margin-left: 50px; +} + + + +#cropimage-wrapper, #cropimage-preview-wrapper { + float: left; + padding: 30px; +} + +#crop-image-form { + margin-top: 30px; + clear: both; +} + +.intro-wrapper { + margin-top: 20px; +} + +.intro-fullname { + font-size: 1.1em; + font-weight: bold; + +} +.intro-desc { + margin-bottom: 20px; + font-weight: bold; +} + +.intro-note { + padding: 10px; +} + +.intro-end { + padding: 30px; +} + +.intro-form { + float: left; +} +.intro-approve-form { + clear: both; +} +.intro-approve-as-friend-end { + clear: both; +} +.intro-submit-approve, .intro-submit-ignore { + margin-right: 20px; +} +.intro-submit-approve { + margin-top: 15px; +} + +.intro-approve-as-friend-label, .intro-approve-as-fan-label { + float: left; + width: 100px; + margin-left: 20px; +} +.intro-approve-as-friend, .intro-approve-as-fan { + float: left; +} +.intro-form-end { + clear: both; +} +.intro-approve-as-friend-desc { + margin-top: 15px; +} +.intro-approve-as-end { + clear: both; + margin-bottom: 10px; +} + +.intro-end { + clear: both; + margin-bottom: 30px; +} + +#profile-extra-links { + clear: both; + margin-top: 10px; +} + +#profile-extra-links ul { + list-style-type: none; + padding: 0px; +} + + +#profile-extra-links li { + margin-top: 5px; +} + +#profile-edit-links ul { + list-style-type: none; +} + +#profile-edit-links li { + margin-top: 10px; +} +.profile-edit-side-div { + float: right; +} +.profile-edit-side-link { + opacity: 0.3; + filter:alpha(opacity=30); +} +.profile-edit-side-link:hover { + opacity: 1.0; + filter:alpha(opacity=100); +} + +.view-contact-wrapper { + margin-top: 20px; + float: left; + margin-left: 20px; + width: 180px; +} + +.contact-wrapper { + float: left; + width: 150px; + height: 150px; + overflow: auto; +} + +#view-contact-end { + clear: both; +} + + +#viewcontacts { + margin-top: 15px; +} +#profile-edit-default-desc { + color: #FF0000; + border: 1px solid #FF8888; + background-color: #FFEEEE; + padding: 7px; +} + +#profile-edit-clone-link-wrapper { + float: left; + margin-left: 50px; + margin-bottom: 20px; + width: 300px; +} + + +#profile-edit-links-end { + clear: both; + margin-bottom: 15px; +} + +.profile-listing-photo { + border: none; +} + +.profile-edit-submit-wrapper { + margin-top: 20px; + margin-bottom: 20px; +} + +#profile-photo-link-select-wrapper { + margin-top: 2em; +} + +#profile-photo-submit-wrapper { + margin-top: 10px; +} + +#profile-photo-wrapper img { + width:175px; + height:175px; + padding: 12px; +} + +#profile-edit-profile-name-label, +#profile-edit-name-label, +#profile-edit-pdesc-label, +#profile-edit-gender-label, +#profile-edit-dob-label, +#profile-edit-address-label, +#profile-edit-locality-label, +#profile-edit-region-label, +#profile-edit-postal-code-label, +#profile-edit-country-name-label, +#profile-edit-marital-label, +#profile-edit-sexual-label, +#profile-edit-politic-label, +#profile-edit-religion-label, +#profile-edit-pubkeywords-label, +#profile-edit-prvkeywords-label, +#profile-edit-homepage-label { + float: left; + width: 175px; +} + +#profile-edit-profile-name, +#profile-edit-name, +#profile-edit-pdesc, +#gender-select, +#profile-edit-dob, +#profile-edit-address, +#profile-edit-locality, +#profile-edit-region, +#profile-edit-postal-code, +#profile-edit-country-name, +#marital-select, +#sexual-select, +#profile-edit-politic, +#profile-edit-religion, +#profile-edit-pubkeywords, +#profile-edit-prvkeywords, +#profile-in-dir-yes, +#profile-in-dir-no, +#profile-in-netdir-yes, +#profile-in-netdir-no, +#hide-wall-yes, +#hide-wall-no, +#hide-friends-yes, +#hide-friends-no { + float: left; + margin-bottom: 20px; +} +#settings-normal, +#settings-soapbox, +#settings-freelove, +#settings-community { + float: left; +} + + +#profile-in-dir-yes-label, +#profile-in-dir-no-label, +#profile-in-netdir-yes-label, +#profile-in-netdir-no-label, +#hide-wall-yes-label, +#hide-wall-no-label, +#hide-friends-yes-label, +#hide-friends-no-label { + margin-left: 125px; + float: left; + width: 50px; +} + +#profile-edit-with-label { + width: 175px; + margin-left: 20px; +} + +#profile-publish-yes-reg, +#profile-publish-no-reg { + float: left; + margin-bottom: 10px; +} + +#profile-publish-yes-label-reg, +#profile-publish-no-label-reg { + margin-left: 350px; + float: left; + width: 50px; +} + +#profile-publish-break-reg, +#profile-publish-end-reg { + clear: both; +} + + +#profile-edit-pdesc-desc, +#profile-edit-pubkeywords-desc, +#profile-edit-prvkeywords-desc { + float: left; + margin-left: 20px; +} + + +#profile-edit-homepage { + float: left; + margin-bottom: 35px; +} +#settings-normal-label, +#settings-soapbox-label, +#settings-community-label, +#settings-freelove-label { + float: left; + width: 200px; +} +#settings-normal-desc, +#settings-soapbox-desc, +#settings-community-desc, +#settings-freelove-desc { + /*float: left; + margin-left: 75px;*/ + clear: left; + color: #666666; + display: block; + margin-bottom: 20px +} + +#profile-edit-profile-name-end, +#profile-edit-name-end, +#profile-edit-pdesc-end, +#profile-edit-gender-end, +#profile-edit-dob-end, +#profile-edit-address-end, +#profile-edit-locality-end, +#profile-edit-region-end, +#profile-edit-postal-code-end, +#profile-edit-country-name-end, +#profile-edit-marital-end, +#profile-edit-sexual-end, +#profile-edit-politic-end, +#profile-edit-religion-end, +#profile-edit-pubkeywords-end, +#profile-edit-prvkeywords-end, +#profile-edit-homepage-end, +#profile-in-dir-break, +#profile-in-dir-end, +#profile-in-netdir-break, +#profile-in-netdir-end, +#hide-wall-break, +#hide-wall-end, +#hide-friends-break, +#hide-friends-end, +#settings-normal-break, +#settings-soapbox-break, +#settings-community-break, +#settings-freelove-break { + clear: both; +} + + + + + +#gender-select, #marital-select, #sexual-select { + width: 220px; +} + +#profile-edit-profile-name-wrapper .required { + color: #FF0000; + float: left; +} + +#contacts-main { + margin-top: 20px; + margin-bottom: 20px; +} + +.contact-entry-wrapper { + float: left; + width: 120px; + height: 120px; +} +#contacts-search-end { + margin-bottom: 10px; +} + +.contact-entry-direction-icon { + margin-top: 24px; + margin-right: 2px; +} + +.contact-entry-photo img { + border: none; +} +.contact-entry-photo-end { + clear: both; +} +.contact-entry-name { + float: left; + margin-left: 0px; + margin-right: 10px; + width: 120px; + overflow: hidden; +} +.contact-entry-edit-links { + margin-top: 6px; + margin-left: 10px; + width: 16px; +} +.contact-entry-nav-wrapper { + float: left; + margin-left: 10px; +} + +.contact-entry-edit-links img { + border: none; + margin-right: 15px; +} +.contact-entry-photo { + float: left; + position: relative; +} +.contact-entry-end { + clear: both; +} + +#fsuggest-desc, #fsuggest-submit-wrapper { + margin-top: 15px; + margin-bottom: 15px; +} + +#network-star-link{ + margin-top: 10px; +} +.network-star { + float: left; + margin-right: 5px; +} +#network-bmark-link { + margin-top: 10px; +} + +.wall-item-content-wrapper { + margin-top: 10px; + /*border: 1px solid #CCC;*/ + position: relative; + -moz-border-radius: 3px; + /*border-radius: 3px; */ + +} + +.wall-item-content-wrapper.comment { + margin-left: 0px; + background: #ededed; +} + +.wall-item-info { + display: block; + float: left; + width:110px; + margin-right:10px; +} +.comment .wall-item-info { + width: 70px; +} + +.wall-item-photo-wrapper { + margin-top: 10px; + margin-left: 10px; + margin-bottom: 10px; + width: 100px; +} +.wall-item-photo-menu-button { + display: block; + position: absolute; + background-image: url("photo-menu.jpg"); + background-position: top left; + background-repeat: no-repeat; + margin: 0px; padding: 0px; + width: 16px; + height: 16px; + top: 74px; left:10px; + overflow: hidden; + text-indent: 40px; + display: none; + +} +.wall-item-photo-menu { + width: auto; + border: 2px solid #444444; + background: #FFFFFF; + position: absolute; + left: 10px; top: 90px; + display: none; + z-index: 10000; +} +.wall-item-photo-menu ul { margin:0px; padding: 0px; list-style: none } +.wall-item-photo-menu li a { display: block; padding: 2px; } +.wall-item-photo-menu li a:hover { color: #FFFFFF; background: #3465A4; text-decoration: none; } + + +.comment .wall-item-photo-menu-button { top: 44px;} +.comment .wall-item-photo-menu { top: 60px; } + +.wallwall .wwto { + left: 50px; + margin: 0; + position: absolute; + top: 70px; + width: 30px +} +.wallwall .wwto img { + width: 30px !important; + height: 30px !important; +} + +.wallwall .wall-item-photo-end { + clear: both; +} + +.wall-item-arrowphoto-wrapper { + position: absolute; + left: 75px; + top: 70px; + z-index: 100; +} +.wall-item-wrapper { + /*float: left; + margin-right: 5px; + width: 250px;*/ + margin-left:10px; +} +.wall-item-lock { + /*height: 20px;*/ + /*margin-top: 10px;*/ + left: 105px; + position: absolute; + top: 1px; +} +.comment .wall-item-lock { + left: 65px; +} + +.wall-item-ago { + color: #888888; + font-size: 0.8em; +} + +.wall-item-location { + overflow: hidden; + /* add ellipsis on text overflow */ + /* this work on safari, opera, ie, chrome. */ + /* firefox users have to wait support or we */ + /* can use a jquery plugin http://bit.ly/zJskg */ + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + width: 100%; +} + +.wall-item-like-buttons { + float: left; + margin-right: 10px; +/* padding-right: 10px; */ +/* border-right: 2px solid #fff; */ +} + +.like-rotator { + margin-left: 5px; +} + +.wall-item-like-buttons > a, +.wall-item-like-buttons > img { + float: left; +} + +.wall-item-like-buttons img { + cursor: pointer; +} + +.wall-item-share-buttons { + margin-left: 10px; + margin-right: 10px; +} + +.editpost { + margin-left: 10px; + float: left; +} +.star-item { + margin-left: 10px; + float: left; +} +.tag-item { + margin-left: 10px; + float: left; +} + + +.wall-item-links-wrapper { + float: left; +} + +.wall-item-delete-wrapper { + float: right; +} + +.wall-item-delete-end { + clear: both; +} + +.wall-item-delete-icon { + border: none; +} + + +.wall-item-wrapper-end { + clear: both; +} +.wall-item-name-link { + font-weight: bold; + text-decoration: none; + color: #3172BD; +} +.wall-item-photo { + border: none; +} +.comment .wall-item-photo { + width: 50px !important; + height: 50px !important; +} +.wall-item-content { + /*float: left;*/ + /*width: 450px;*/ + margin-left: 10px; + /*margin-bottom: 20px;*/ + /*padding: 20px;*/ + max-height: 400px; + overflow: auto; +} + +.wall-item-title { + float: left; + font-weight: bold; + /*width: 450px;*/ +} + +.wall-item-title-end { + clear: both; +} + +.wall-item-body { + float: left; + /*width: 450px;*/ + margin-top: 10px; +} + +.wall-item-tools { + /*clear: both;*/ + /*background-image: url("head.jpg");*/ + /*background-position: 0 -20px;*/ + /*background-repeat: repeat-x;*/ + padding: 5px 10px 0px; +} +.wall-item-author { + margin-top: 10px; +} + +.comment .wall-item-tools { + background:none; +} + +.comment-edit-wrapper { + margin-top: 15px; + background: #f3f3f3; + margin-left: 50px; +} + +.comment-wwedit-wrapper { + margin-top: 5px; + background: #ededed; + /*margin-left: 50px;*/ +} + +.comment-edit-photo { + margin-top: 10px; + margin-left: 10px; + margin-bottom: 10px; + width: 100px; + float: left; +} +.comment-edit-photo img { + width: 25px; +} +.comment-edit-text-empty, .comment-edit-text-full { + float: left; + margin-top: 10px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid #cccccc; + padding: 3px 1px 1px 3px; +} +.comment-edit-text-end { + clear: both; +} + +.comment-edit-submit { + margin: 10px 0px 10px 110px; +} + +#profile-jot-plugin-wrapper, +#profile-jot-submit-wrapper { + margin-top: 15px; +} + +#profile-jot-submit { + float: left; +} +#profile-upload-wrapper { + float: left; + margin-left: 30px; +} +#profile-attach-wrapper { + float: left; + margin-left: 30px; +} +#profile-rotator { + float: left; + margin-left: 30px; +} +#profile-link-wrapper { + float: left; + margin-left: 15px; +} +#profile-youtube-wrapper { + float: left; + margin-left: 15px; +} +#profile-video-wrapper { + float: left; + margin-left: 15px; +} +#profile-audio-wrapper { + float: left; + margin-left: 15px; +} +#profile-location-wrapper { + float: left; + margin-left: 15px; +} +#jot-preview-link { + float: left; + margin-left: 45px; + margin-top: 0px !important; +} + + +#profile-nolocation-wrapper { + float: left; + margin-left: 15px; +} +#profile-title-wrapper { + float: left; + margin-left: 15px; +} + +#profile-jot-perms { + float: left; + margin-left: 100px; + font-weight: bold; + font-size: 1.2em; +} + + +#profile-jot-perms-end { + /*clear: left;*/ + height: 30px; +} + +#profile-jot-plugin-end{ + clear: both; +} +.profile-jot-net { + float: left; + margin-right: 10px; + margin-top: 5px; + margin-bottom: 5px; +} + +#profile-jot-networks-end { + clear: both; +} + +#profile-jot-end { + /*clear: both;*/ + margin-bottom: 30px; +} +#about-jot-submit-wrapper { + margin-top: 15px; +} +#about-jot-end { + margin-bottom: 30px; +} +#contacts-main { + margin-bottom: 30px; +} + +#profile-listing-desc { + margin-left: 30px; +} + +#profile-listing-new-link-wrapper { + margin-left: 30px; + margin-bottom: 30px; +} +.profile-listing-photo-wrapper { + float: left; +} + +.profile-listing-edit-buttons-wrapper { + clear: both; +} +.profile-listing-photo-edit-link { + float: left; + width: 125px; +} +.profile-listing-end { + clear: both; +} +.profile-listing-edit-buttons-wrapper img{ + border: none; + margin-right: 20px; +} +.profile-listing { + margin-top: 25px; +} +.profile-listing-name { + float: left; + margin-left: 32px; + margin-top: 10px; + color: #3172BD; + font-weight: bold; + width: 200px; + +} +.fortune { + margin-top: 50px; + color: #4444FF; + font-weight: bold; + margin-bottom: 20px; +} + + +.directory-end { + clear: both; +} +.directory-name { + text-align: center; +} +.directory-photo { + margin-left: 25px; +} +.directory-details { + font-size: 0.7em; + text-align: center; + margin-left: 5px; + margin-right: 5px; +} +.directory-item { + float: left; + width: 225px; + height: 260px; + overflow: auto; +} + +#directory-search-wrapper { + margin-top: 20px; + margin-right: 20px; + margin-bottom: 50px; +} + +#directory-search-end { +} + +.directory-photo-img { + border: none; +} + + +.pager { + padding: 10px; + text-align: center; + font-size: 1.0em; +} + + +.pager_first, +.pager_last, +.pager_prev, +.pager_next, +.pager_n { + border: 1px solid black; + background: #EEE; + padding: 4px; +} + +.pager_first a, +.pager_last a, +.pager_prev a, +.pager_next a, +.pager_n a { + text-decoration: none; +} + +.pager_current { + border: 1px solid black; + background: #FFCCCC; + padding: 4px; +} + + +#advanced-profile-name-wrapper, +#advanced-profile-gender-wrapper, +#advanced-profile-dob-wrapper, +#advanced-profile-age-wrapper, +#advanced-profile-marital-wrapper, +#advanced-profile-sexual-wrapper, +#advanced-profile-homepage-wrapper, +#advanced-profile-politic-wrapper, +#advanced-profile-religion-wrapper, +#advanced-profile-about-wrapper, +#advanced-profile-interest-wrapper, +#advanced-profile-contact-wrapper, +#advanced-profile-music-wrapper, +#advanced-profile-book-wrapper, +#advanced-profile-tv-wrapper, +#advanced-profile-film-wrapper, +#advanced-profile-romance-wrapper, +#advanced-profile-work-wrapper, +#advanced-profile-education-wrapper { + margin-top: 20px; +} + +#advanced-profile-name-text, +#advanced-profile-gender-text, +#advanced-profile-dob-text, +#advanced-profile-age-text, +#advanced-profile-marital-text, +#advanced-profile-sexual-text, +#advanced-profile-homepage-text, +#advanced-profile-politic-text, +#advanced-profile-religion-text, +#advanced-profile-about-text, +#advanced-profile-interest-text, +#advanced-profile-contact-text, +#advanced-profile-music-text, +#advanced-profile-book-text, +#advanced-profile-tv-text, +#advanced-profile-film-text, +#advanced-profile-romance-text, +#advanced-profile-work-text, +#advanced-profile-education-text { + width: 300px; + float: left; +} + +#advanced-profile-name-end, +#advanced-profile-gender-end, +#advanced-profile-dob-end, +#advanced-profile-age-end, +#advanced-profile-marital-end, +#advanced-profile-sexual-end, +#advanced-profile-homepage-end, +#advanced-profile-politic-end, +#advanced-profile-religion-end { + height: 10px; +} + +#advanced-profile-about-end, +#advanced-profile-interest-end, +#advanced-profile-contact-end, +#advanced-profile-music-end, +#advanced-profile-book-end, +#advanced-profile-tv-end, +#advanced-profile-film-end, +#advanced-profile-romance-end, +#advanced-profile-work-end, +#advanced-profile-education-end { + + +} + +#advanced-profile-name, +#advanced-profile-gender, +#advanced-profile-dob, +#advanced-profile-age, +#advanced-profile-marital, +#advanced-profile-sexual, +#advanced-profile-homepage, +#advanced-profile-politic, +#advanced-profile-religion { + float: left; + +} + + +#advanced-profile-about, +#advanced-profile-interest, +#advanced-profile-contact, +#advanced-profile-music, +#advanced-profile-book, +#advanced-profile-tv, +#advanced-profile-film, +#advanced-profile-romance, +#advanced-profile-work, +#advanced-profile-education { + margin-top: 10px; + margin-left: 50px; + margin-right: 20px; + padding: 10px; + border: 1px solid #CCCCCC; +} + +#advanced-profile-with { + float: left; + margin-left: 15px; +} + +#contact-edit-wrapper { + margin-top: 10px; +} + +#contact-edit-banner-name { + font-size: 1.4em; + font-weight: bold; +} + +#contact-edit-poll-wrapper { + margin-top: 15px; +} + +#contact-edit-poll-text { + margin-top: 15px; + margin-bottom: 5px; +} + +#contact-edit-update-now { + margin-top: 15px; +} + +#contact-edit-links{ + clear: both; +} + +#contact-edit-links ul { + list-style: none; + list-style-type: none; + margin-left: 0px; + padding-left: 0px; +} + +#contact-edit-links li { + margin-top: 5px; +} + +#contact-edit-drop-link { + float: right; + margin-right: 20px; +} + +#contact-edit-nav-end { + clear: both; +} + +#contact-edit-wrapper { + width: 100%; +} + +#contact-edit-end { + clear: both; + margin-top: 15px; +} + +#contact-profile-selector { + width: 175px; + margin-left: 175px; +} + +.contact-edit-submit { + margin-top: 20px; +} + + +.contact-photo-menu-button { + position: absolute; + background-image: url("photo-menu.jpg"); + background-position: top left; + background-repeat: no-repeat; + margin: 0px; padding: 0px; + width: 16px; + height: 16px; + top: 64px; left:0px; + overflow: hidden; + text-indent: 40px; + display: none; + +} +.contact-photo-menu { + width: auto; + border: 2px solid #444444; + background: #FFFFFF; + position: absolute; + left: 0px; top: 90px; + display: none; + z-index: 10000; +} +.contact-photo-menu ul { margin:0px; padding: 0px; list-style: none } +.contact-photo-menu li a { display: block; padding: 2px; } +.contact-photo-menu li a:hover { color: #FFFFFF; background: #3465A4; text-decoration: none; } + + +#block-message, #ignore-message { + color: #FF0000; +} + +#profile-edit-insecure { + margin-top: 20px; + color: #FF0000; + font-size: 1.1em; + border: 1px solid #FF8888; + background-color: #FFEEEE; + padding-left: 5px; + /*: 3px 3px 3px 5px; */ + width: 587px; +} + +#profile-jot-text { + height: 20px; + color:#cccccc; + border: 1px solid #cccccc; + padding: 3px 0px 0px 5px; + -moz-border-radius: 3px; + border-radius: 3px; +} + + +/** acl **/ +#photo-edit-perms-select, +#photos-upload-permissions-wrapper, +#profile-jot-acl-wrapper{ + display:block!important; +} + + + +#acl-wrapper { + width: 690px; + float:left; +} +#acl-search { + float:right; + background: #ffffff url("../../../images/search_18.png") no-repeat right center; + padding-right:20px; +} +#acl-showall { + float: left; + display: block; + width: auto; + height: 18px; + background-color: #cccccc; + background-image: url("../../../images/show_all_off.png"); + background-position: 7px 7px; + background-repeat: no-repeat; + padding: 7px 5px 0px 30px; + -webkit-border-radius: 5px ; + -moz-border-radius: 5px; + border-radius: 5px; + color: #999999; +} +#acl-showall.selected { + color: #000000; + background-color: #ff9900; + background-image: url("../../../images/show_all_on.png"); +} + +#acl-list { + height: 210px; + border: 1px solid #cccccc; + clear: both; + margin-top: 30px; + overflow: auto; +} +#acl-list-content { + +} +.acl-list-item { + display: block; + width: 150px; + height: 30px; + border: 1px solid #cccccc; + margin: 5px; + float: left; +} +.acl-list-item img{ + width:22px; + height: 22px; + float: left; + margin: 4px; +} +.acl-list-item p { height: 12px; font-size: 10px; margin: 0px; padding: 2px 0px 1px; overflow: hidden;} +.acl-list-item a { + font-size: 8px; + display: block; + width: 40px; + height: 10px; + float: left; + color: #999999; + background-color: #cccccc; + background-position: 3px 3px; + background-repeat: no-repeat; + margin-right: 5px; + -webkit-border-radius: 2px ; + -moz-border-radius: 2px; + border-radius: 2px; + padding-left: 15px; +} +#acl-wrapper a:hover { + text-decoration: none; + color:#000000; +} +.acl-button-show { background-image: url("../../../images/show_off.png"); } +.acl-button-hide { background-image: url("../../../images/hide_off.png"); } + +.acl-button-show.selected { + color: #000000; + background-color: #9ade00; + background-image: url("../../../images/show_on.png"); +} +.acl-button-hide.selected { + color: #000000; + background-color: #ff4141; + background-image: url("../../../images/hide_on.png"); +} +.acl-list-item.groupshow { border-color: #9ade00; } +.acl-list-item.grouphide { border-color: #ff4141; } +/** /acl **/ + + +.comment-edit-text-empty { + /*color: black;*/ + height: 30px; + width: 300px; + overflow: auto; + margin-bottom: 10px; +} + +.comment-edit-text-full { + color: black; + height: 150px; + width: 350px; + overflow: auto; +} + +#group-new-submit-wrapper { + margin-top: 30px; +} + +#group-edit-name-label { + float: left; + width: 175px; + margin-top: 20px; + margin-bottom: 20px; +} + +#group-edit-name { + float: left; + width: 225px; + margin-top: 20px; + margin-bottom: 20px; +} + +#group-edit-name-wrapper { + + +} + + +#group_members_select_label { + display: block; + float: left; + width: 175px; +} + +.group_members_select { + float: left; + width: 230px; + overflow: auto; +} + +#group_members_select_end { + clear: both; +} +#group-edit-name-end { + clear: both; +} + +#prvmail-to-label, #prvmail-subject-label, #prvmail-message-label { + margin-bottom: 10px; + margin-top: 20px; +} + +#prvmail-submit { + float: left; + margin-top: 10px; + margin-right: 30px; +} +#prvmail-upload-wrapper, +#prvmail-link-wrapper, +#prvmail-rotator-wrapper { + float: left; + margin-top: 10px; + margin-right: 10px; + width: 24px; +} + +#prvmail-end { + clear: both; +} + +.mail-list-sender, +.mail-list-detail { + float: left; +} +.mail-list-detail { + margin-left: 20px; +} + +.mail-list-subject { + font-size: 1.1em; + margin-top: 10px; +} +a.mail-list-link { + display: block; + font-size: 1.3em; + padding: 4px 0; +} + +/* +*a.mail-list-link:hover { +* background-color: #15607B; +* color: #F5F6FB; +*} +*/ + +.mail-list-outside-wrapper-end { + clear: both; +} + +.mail-list-outside-wrapper { + margin-top: 30px; +} + +.mail-list-delete-wrapper { + float: right; + margin-right: 30px; + margin-top: 15px; +} + +.mail-list-delete-icon { + border: none; +} + +.mail-conv-sender, +.mail-conv-detail { + float: left; +} +.mail-conv-detail { + margin-left: 20px; + width: 500px; +} + +.mail-conv-subject { + font-size: 1.4em; + margin: 10px 0; +} + +.mail-conv-outside-wrapper-end { + clear: both; +} + +.mail-conv-outside-wrapper { + margin-top: 30px; +} + +.mail-conv-delete-wrapper { + float: right; + margin-right: 30px; + margin-top: 15px; +} +.mail-conv-break { + clear: both; +} + +.mail-conv-delete-icon { + border: none; +} + +.message-links ul { + list-style-type: none; + padding: 0px; +} + +.message-links li { + margin-top: 10px; + float: left; +} +.message-links a { + padding: 3px 5px; +} + +.message-links-end { + clear: both; +} + +#sidebar-group-list ul { + list-style-type: none; +} + +#sidebar-group-list .icon, #sidebar-group-list .iconspacer { + display: inline-block; + height: 12px; + width: 12px; +} + +#sidebar-group-list li { + margin-top: 10px; +} + +.nets-ul { + list-style-type: none; +} + +.nets-ul li { + margin-top: 10px; +} + +.nets-link { + margin-left: 24px; +} +.nets-all { + margin-left: 42px; +} + +#search-save { + margin-left: 5px; +} +.groupsideedit { + margin-right: 10px; +} +#saved-search-ul { + list-style-type: none; +} +.savedsearchdrop, .savedsearchterm { + float: left; + margin-top: 10px; +} +.savedsearchterm { + margin-left: 10px; +} + + +#side-follow-wrapper { + margin-top: 20px; +} +#side-follow-url, #side-peoplefind-url { + margin-top: 5px; +} +#side-follow-submit, #side-peoplefind-submit { + margin-top: 15px; +} + +#side-match-link { + margin-top: 10px; +} + +aside input[type='text'] { + width: 174px; +} + +.widget { + border: 1px solid #DDDDDD; + padding: 8px; + margin-top: 5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + border-radius:5px; + +} + + +.photos { + height: auto; + overflow: auto; +} + +.photo-album-image-wrapper { + float: left; + margin-top: 15px; + margin-right: 15px; + width: 200px; height: 200px; + overflow: hidden; + position: relative; +} +.photo-album-image-wrapper .caption { + display: none; + width: 100%; + position: absolute; + bottom: 0px; + padding: 0.5em 0.5em 0px 0.5em; + background-color: rgba(245, 245, 255, 0.8); + border-bottom: 2px solid #CCC; + margin: 0px; +} +.photo-album-image-wrapper a:hover .caption { + display:block; +} + +#photo-album-end { + clear: both; +} + +.photo-top-image-wrapper { + position: relative; + float: left; + margin-top: 15px; + margin-right: 15px; + width: 200px; height: 200px; + overflow: hidden; +} +.photo-top-album-name { + width: 100%; + min-height: 2em; + position: absolute; + bottom: 0px; + padding: 0px 3px; + padding-top: 0.5em; + background-color: rgb(255, 255, 255); +} +#photo-top-end { + clear: both; +} + +#photo-top-links { + margin-bottom: 30px; + margin-left: 30px; +} + +#photos-upload-newalbum-div { + float: left; + width: 175px; +} + +#photos-upload-noshare { + margin-bottom: 10px; +} +#photos-upload-existing-album-text { + float: left; + width: 175px; +} +#photos-upload-newalbum { + float: left; +} +#photos-upload-album-select { + float: left; +} + +#photos-upload-spacer { + margin-top: 25px; +} +#photos-upload-new-end, #photos-upload-exist-end { + clear: both; +} +#photos-upload-exist-end { + margin-bottom: 15px; +} +#photos-upload-submit { + margin-top: 15px; +} + +#photos_upload_applet_wrapper { + margin-bottom: 15px; +} + +#photos-upload-no-java-message { + margin-bottom: 15px; +} + +#profile-jot-desc { + /*float: left;*/ + width: 480px; + color: #FF0000; + margin-top: 10px; + margin-bottom: 10px; +} + +#character-counter { + float: right; + font-size: 120%; +} + +#character-counter.grey { + color: #888888; +} + +#character-counter.orange { + color: orange; +} +#character-counter.red { + color: red; +} + +#profile-jot-banner-end { + /* clear: both; */ +} + +#photos-upload-select-files-text { + margin-top: 15px; + margin-bottom: 15px; +} + +#photos-upload-perms-menu, #photos-upload-perms-menu:visited, #photos-upload-perms-menu:link { + color: #8888FF; + text-decoration: none; + cursor: pointer; +} + +#photos-upload-perms-menu:hover { + color: #0000FF; + text-decoration: underline; + cursor: pointer; +} +#settings-default-perms-menu { + margin-top: 15px; + margin-bottom: 15px; +} + +#photo-edit-caption-label, #photo-edit-tags-label, #photo-edit-albumname-label { + float: left; + width: 150px; +} + +#photo-edit-perms-end { + margin-bottom: 15px; +} + +#photo-edit-caption, #photo-edit-newtag, #photo-edit-albumname { + float: left; + margin-bottom: 25px; +} +#photo-edit-link-wrap { + margin-bottom: 15px; +} +#photo-like-div { + margin-bottom: 25px; +} + +#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end { + clear: both; +} + +#photo-edit-delete-button { + margin-left: 200px; +} +#photo-edit-end { + margin-bottom: 35px; +} +#photo-caption { + font-size: 110%; + font-weight: bold; + margin-top: 15px; + margin-bottom: 15px; +} + +#in-this-photo-text { + color: #0000FF; + margin-left: 30px; +} + +#in-this-photo { + margin-left: 60px; + margin-top: 10px; + margin-bottom: 20px; +} + +#photo-album-edit-submit, #photo-album-edit-drop { + margin-top: 15px; + margin-bottom: 15px; +} + +#photo-album-edit-drop { + margin-left: 200px; +} + +.group-delete-wrapper { + float: right; + margin-right: 50px; +} + +#install-dbhost-label, +#install-dbuser-label, +#install-dbpass-label, +#install-dbdata-label, +#install-tz-desc { + float: left; + width: 250px; + margin-top: 10px; + margin-bottom: 10px; + +} + +#install-dbhost, +#install-dbuser, +#install-dbpass, +#install-dbdata { + float: left; + width: 200px; + margin-left: 20px; +} + +#install-dbhost-end, +#install-dbuser-end, +#install-dbpass-end, +#install-dbdata-end, +#install-tz-end { + clear: both; +} + +#install-form select#timezone_select { + float: left; + margin-top: 18px; + margin-left: 20px; +} + +#dfrn-request-networks { + margin-bottom: 30px; +} + +#pause { + position: fixed; + bottom: 5px; + right: 5px; +} + +.sparkle { + cursor: url('lock.cur'), pointer; +/* cursor: pointer !important; */ +} + +.contact-block-div { + float: left; + width: 52px; + height: 52px; +} +.contact-block-textdiv { + float: left; + width: 150px; + height: 34px; +} + +#contact-block-end { + clear: both; +} +.contact-block-link { + float: left; +} +.contact-block-img { + width:48px; + height:48px; +} + +#tag-remove { + margin-bottom: 15px; +} + +#tagrm li { + margin-bottom: 10px; +} + +#tagrm-submit, #tagrm-cancel { + margin-top: 25px; +} + +#tagrm-cancel { + margin-left: 15px; +} + +.wall-item-conv { + margin-top: 5px; + margin-bottom: 25px; +} + +#search-submit { + margin-left: 15px; +} + +#search-box { + margin-bottom: 25px; +} + +.location-label, .gender-label, .marital-label, .homepage-label { + float: left; + text-align: right; + display: block; + width: 65px; +} + +.adr, .x-gender, .marital-text, .homepage-url { + float: left; + display: block; + margin-left: 8px; +} + +.profile-clear { + clear: both; +} + + +.clear { + clear: both; +} + +.cc-license { + margin-top: 50px; + font-size: 70%; +} + + +#plugin-settings-link, #account-settings-link { + margin-bottom: 10px; +} + +#uexport-link { + margin-bottom: 20px; +} + +/* end from default */ + + +.fn { + padding: 0px 0px 5px 12px; + font-size: 120%; + font-weight: bold; +} + +.vcard .title { + margin-bottom: 5px; + margin-left: 12px; +} + +.vcard dl { + clear: both; +} + +#birthday-title { + float: left; + font-weight: bold; +} + +#birthday-adjust { + float: left; + font-size: 75%; + margin-left: 10px; +} + +#birthday-title-end { + clear: both; +} + +.birthday-list { + margin-left: 15px; +} + +#birthday-wrapper { + margin-bottom: 20px; +} + +#network-new-link { + margin-top: 15px; + margin-bottom: 15px; +} + + +.tool-wrapper { + float: left; + margin-left: 15px; +} + +.tool-link { + cursor: pointer; +} + +.eventcal { + float: left; + font-size: 20px; +} + +.vevent { + border: 1px solid #CCCCCC; +} +.vevent .event-description, .vevent .event-location { + margin-left: 10px; + margin-right: 10px; +} +.vevent .event-start { + margin-left: 10px; + margin-right: 10px; +} + +#new-event-link { + margin-bottom: 10px; +} + +.edit-event-link, .plink-event-link { + float: left; + margin-top: 4px; + margin-right: 4px; + margin-bottom: 15px; +} + +.event-description:before { + content: url('../../../images/calendar.png'); + margin-right: 15px; +} + +.event-start, .event-end { + margin-left: 10px; + width: 330px; + clear: both; +} + +.event-start .dtstart, .event-end .dtend { + float: right; +} + +.event-list-date { + margin-bottom: 10px; +} + +.prevcal, .nextcal { + float: left; + margin-left: 32px; + margin-right: 32px; + margin-top: 64px; +} +.event-calendar-end { + clear: both; +} + + +.calendar { + font-family: Courier, monospace; +} +.today { + font-weight: bold; + color: #FF0000; +} + +.settings-block { + border: 1px solid #AAA; + margin: 10px; + padding: 10px; +} + +.app-title { + margin: 10px; +} + +#identity-manage-desc { + margin-top:15px; + margin-bottom: 15px; +} + +#identity-manage-choose { + margin-bottom: 15px; +} + +#identity-submit { + margin-top: 20px; +} + +#photo-prev-link, #photo-next-link { + padding: 10px; + float: left; +} + +#photo-photo { + float: left; +} + +#photo-photo-end { + clear: both; +} + +.profile-match-photo { + float: left; + text-align: center; + width: 120px; +} + +.profile-match-name { + float: left; + text-align: center; + width: 120px; + overflow: hidden; +} + +.profile-match-break, +.profile-match-end { + clear: both; +} + +.profile-match-connect { + text-align: center; + font-weight: bold; +} + +.profile-match-wrapper { + float: left; + padding: 10px; + width: 120px; + height: 120px; + scroll: auto; +} +#profile-match-wrapper-end { + clear: both; +} +.side-link { + margin-bottom: 15px; +} + +#language-selector { + position: absolute; + top: 0px; + left: 16px; +} + +#group-members { + margin-top: 20px; + padding: 10px; + height: 250px; + overflow: auto; + border: 1px solid #ddd; +} + +#group-members-end { + clear: both; +} + +#group-separator { + margin-top: 10px; + margin-bottom: 10px; +} + +#group-all-contacts { + padding: 10px; + height: 450px; + overflow: auto; + border: 1px solid #ddd; +} + +#group-all-contacts-end { + clear: both; + margin-bottom: 10px; +} + +#group-edit-desc { + margin-top: 15px; +} + + +#prof-members { + margin-top: 20px; + padding: 10px; + height: 250px; + overflow: auto; + border: 1px solid #ddd; +} + +#prof-members-end { + clear: both; +} + +#prof-separator { + margin-top: 10px; + margin-bottom: 10px; +} + +#prof-all-contacts { + padding: 10px; + height: 450px; + overflow: auto; + border: 1px solid #ddd; +} + +#prof-all-contacts-end { + clear: both; + margin-bottom: 10px; +} + +#prof-edit-desc { + margin-top: 15px; +} + +#crepair-name-label, +#crepair-nick-label, +#crepair-attag-label, +#crepair-url-label, +#crepair-request-label, +#crepair-confirm-label, +#crepair-notify-label, +#crepair-photo-label, +#crepair-poll-label { + float: left; + width: 200px; + margin-bottom: 15px; +} + +#crepair-name, +#crepair-nick, +#crepair-attag, +#crepair-url, +#crepair-request, +#crepair-confirm, +#crepair-notify, +#crepair-photo, +#crepair-poll { + float: left; + width: 300px; +} + + +#netsearch-box { + margin-top: 20px; +} + +#netsearch-box #search-submit { + margin: 5px 0px 0px 0px; +} + +.required { + color: #FF0000; +} + +#event-start-text, #event-finish-text { + margin-top: 10px; + margin-bottom: 5px; +} + +#event-nofinish-checkbox, #event-nofinish-text, #event-adjust-checkbox, #event-adjust-text { + float: left; +} +#event-datetime-break { + margin-bottom: 10px; +} + +#event-nofinish-break, #event-adjust-break { + clear: both; +} + +#event-desc-text, #event-location-text { + margin-top: 10px; + margin-bottom: 5px; +} +#event-submit { + margin-top: 10px; +} + +.body-tag { + opacity: 0.5; + filter:alpha(opacity=50); +} + +.body-tag:hover { + opacity: 1.0 !important; + filter:alpha(opacity=100) !important; +} + +.item-select { + opacity: 0.1; + filter:alpha(opacity=10); + float: right; + margin-right: 10px; + +} +.item-select:hover, .checkeditem { + opacity: 1; + filter:alpha(opacity=100); +} + + +#item-delete-selected { + margin-top: 30px; +} + +#item-delete-selected-end { + clear: both; +} +#item-delete-selected-icon, #item-delete-selected-desc { + float: left; + margin-right: 5px; +} +#item-delete-selected-desc:hover { + text-decoration: underline; +} + +#lang-select-icon { + cursor: pointer; + position: absolute; + left: 0px; + top: 0px; + opacity: 0.2; + filter:alpha(opacity=20); +} + +#lang-select-icon:hover { + opacity: 1; + filter:alpha(opacity=100); +} + +.notif-image { + height: 80px; + width: 80px; + margin-right: 15px; +} +.notification-listing-end { + clear: both; + margin-bottom: 15px; +} + + + +/** + * Plugins settings + */ + +.settings-block > h3, +.settings-heading { + border-bottom: 1px solid #babdb6; +} + + +/** + * Form fields + */ +.field { + margin-bottom: 10px; + padding-bottom: 10px; + overflow: auto; + width: 100% +} + +.field label { + float: left; + width: 200px; +} + +.field input, +.field textarea { + width: 400px; +} +.field textarea { height: 100px; } +.field_help { + display: block; + margin-left: 200px; + color: #666666; + +} + + +.field .onoff { + float: left; + width: 80px; +} +.field .onoff a { + display: block; + border:1px solid #666666; + background-image:url("../../../images/onoff.jpg"); + background-repeat: no-repeat; + padding: 4px 2px 2px 2px; + height: 16px; + text-decoration: none; +} +.field .onoff .off { + border-color:#666666; + padding-left: 40px; + background-position: left center; + background-color: #cccccc; + color: #666666; + text-align: right; +} +.field .onoff .on { + border-color:#204A87; + padding-right: 40px; + background-position: right center; + background-color: #D7E3F1; + color: #204A87; + text-align: left; +} +.hidden { display: none!important; } + +.field.radio .field_help { margin-left: 0px; } + +/** + * ADMIN + */ +#pending-update { + float:right; + color: #ffffff; + font-weight: bold; + background-color: #FF0000; + padding: 0em 0.3em; + +} +#adminpage dl { + clear: left; + margin-bottom: 2px; + padding-bottom: 2px; + border-bottom: 1px solid black; +} +#adminpage dt { + width: 200px; + float: left; + font-weight: bold; +} +#adminpage dd { + margin-left: 200px; +} + +#adminpage h3 { + border-bottom: 1px solid #cccccc; +} +#adminpage .field label { + font-weight: bold; +} +#adminpage .submit { + clear:left; + text-align: right; +} + +#adminpage #pluginslist { + margin: 0px; padding: 0px; +} +#adminpage .plugin { + list-style: none; + display: block; + border: 1px solid #888888; + padding: 1em; + margin-bottom: 5px; + clear: left; +} +#adminpage .plugin .desc { margin-left: 2.5em;} +#adminpage .toggleplugin { + float:left; + margin-right: 1em; +} + +#adminpage table {width:100%; border-bottom: 1px solid #000000; margin: 5px 0px;} +#adminpage table th { text-align: left;} +#adminpage td .icon { float: left;} +#adminpage table#users img { width: 16px; height: 16px; } +#adminpage table tr:hover { background-color: #bbc7d7; } +#adminpage .selectall { text-align: right; } + +/* + * UPDATE + */ +.popup { + width: 100%; height: 100%; + top:0px; left:0px; + position: absolute; + display: none; +} + +.popup .background { + background-color: rgba(0,0,0,128); + opacity: 0.5; + width: 100%; height: 100%; + position: absolute; + top:0px; left:0px; +} +.popup .panel { + top:25%;left:25%;width:50%;height:50%; + padding: 1em; + position: absolute; + border: 4px solid #000000; + background-color: #FFFFFF; +} +.popup .panel .panel_text { display: block; overflow: auto; height: 80%; } +.popup .panel .panel_in { width: 100%; height: 100%; position: relative; } +.popup .panel .panel_actions { width: 100%; bottom: 4px; left: 0px; position: absolute; } +.panel_text .progress { width: 50%; overflow: hidden; height: auto; border: 1px solid #cccccc; margin-bottom: 5px} +.panel_text .progress span {float: right; display: block; width: 25%; background-color: #eeeeee; text-align: right;} + +/** + * OAuth + */ +.oauthapp { + height: auto; overflow: auto; + border-bottom: 2px solid #cccccc; + padding-bottom: 1em; + margin-bottom: 1em; +} +.oauthapp img { + float: left; + width: 48px; height: 48px; + margin: 10px; +} +.oauthapp img.noicon { + background-image: url("../../../images/icons/48/plugin.png"); + background-position: center center; + background-repeat: no-repeat; +} +.oauthapp a { + float: left; +} + +/** + * ICONS + */ +.iconspacer { + display: block; width: 16px; height: 16px; +} + +.icon { + display: block; width: 16px; height: 16px; + background-image: url('../../../images/icons.png'); +} +.article { background-position: 0px 0px;} +.audio { background-position: -16px 0px;} +.block { background-position: -32px 0px;} +.drop { background-position: -48px 0px;} +.drophide { background-position: -64px 0px;} +.edit { background-position: -80px 0px;} +.camera { background-position: -96px 0px;} +.dislike { background-position: -112px 0px;} +.like { background-position: -128px 0px;} +.link { background-position: -144px 0px;} + +.globe { background-position: 0px -16px;} +.noglobe { background-position: -16px -16px;} +.no { background-position: -32px -16px;} +.pause { background-position: -48px -16px;} +.play { background-position: -64px -16px;} +.pencil { background-position: -80px -16px;} +.small-pencil { background-position: -96px -16px;} +.recycle { background-position: -112px -16px;} +.remote-link { background-position: -128px -16px;} +.share { background-position: -144px -16px;} + +.tools { background-position: 0px -32px;} +.lock { background-position: -16px -32px;} +.unlock { background-position: -32px -32px;} +.video { background-position: -48px -32px;} +.youtube { background-position: -64px -32px;} +.attach { background-position: -80px -32px; } +.language { background-position: -96px -32px; } +.prev { background-position: -112px -32px; } +.next { background-position: -128px -32px; } +.on { background-position: -144px -32px; } + +.off { background-position: 0px -48px; } +.starred { background-position: -16px -48px; } +.unstarred { background-position: -32px -48px; } +.tagged { background-position: -48px -48px; } + + +.icon.dim { opacity: 0.3;filter:alpha(opacity=30); } + +.attachtype { + display: block; width: 20px; height: 23px; + float: left; + background-image: url('../../../images/content-types.png'); +} + +.body-attach { + margin-top: 10px; +} + +.type-video { background-position: 0px 0px; } +.type-image { background-position: -20px 0px; } +.type-audio { background-position: -40px 0px; } +.type-text { background-position: -60px 0px; } +.type-unkn { background-position: -80px 0px; } + + +/* autocomplete popup */ +.acpopup { + max-height:150px; + background-color:#ffffff; + overflow:auto; + z-index:100000; + border:1px solid #cccccc; +} +.acpopupitem { + background-color:#ffffff; padding: 4px; + clear:left; +} +.acpopupitem img { + float: left; + margin-right: 4px; +} + +.acpopupitem.selected { + color: #FFFFFF; background: #3465A4; +} + +/* popup notifications */ +div.jGrowl div.notice { + background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; + color: #ffffff; + padding-left: 58px; +} +div.jGrowl div.info { + background: #364e59 url("../../../images/icons/48/info.png") no-repeat 5px center; + color: #ffffff; + padding-left: 58px; +} + +.qcomment { + border: 1px solid #EEE; + padding: 3px; +} + +.qcomment { + opacity: 0; + filter:alpha(opacity=0); +} +.qcomment:hover { + opacity: 1.0; + filter:alpha(opacity=100); +} + +/* notifications popup menu */ +.nav-notify { + display: none; + position: absolute; + font-size: 10px; + padding: 1px 3px; + top: 0px; + right: -10px; + min-width: 15px; + text-align: right; +} +.nav-notify.show { + display: block; +} +ul.menu-popup { + position: absolute; + display: none; + width: 10em; + margin: 0px; + padding: 0px; + list-style: none; + z-index: 100000; + top: 90px; + left: 400px; +} +#nav-notifications-menu { + width: 320px; + max-height: 400px; + overflow-y: scroll;overflow-style:scrollbar; + background-color:#FFFFFF; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius:5px; + border: 1px solid #888; +} +#nav-notifications-menu .contactname { font-weight: bold; font-size: 0.9em; } +#nav-notifications-menu img { float: left; margin-right: 5px; } +#nav-notifications-menu .notif-when { font-size: 0.8em; display: block; } +#nav-notifications-menu li { + padding: 7px 0px 7px 10px; + word-wrap:normal; + border-bottom: 1px solid #000; +} + +#nav-notifications-menu li:hover { + +} + +#nav-notifications-menu a:hover { + text-decoration: underline; +} + +.notif-item a { + color: #000000; +} + +.notif-item a:hover { + text-decoration: underline; +} + +.notif-image { + width: 32px; + height: 32px; + padding: 7px 7px 0px 0px; +} + +.notify-seen { + background: #DDDDDD; +} diff --git a/view/theme/facepark/theme.php b/view/theme/facepark/theme.php new file mode 100755 index 0000000000..701fb13491 --- /dev/null +++ b/view/theme/facepark/theme.php @@ -0,0 +1,49 @@ +theme_info = array(); + +$a->page['htmlhead'] .= <<< EOT + +EOT; diff --git a/view/theme/facepark/wall_item.tpl b/view/theme/facepark/wall_item.tpl new file mode 100755 index 0000000000..2c88fc598e --- /dev/null +++ b/view/theme/facepark/wall_item.tpl @@ -0,0 +1,77 @@ +
    +
    +
    +
    + + $item.name + + menu +
    +
      + $item.item_photo_menu +
    +
    +
    +
    +
    + {{ if $item.lock }}
    $item.lock
    + {{ else }}
    {{ endif }} +
    $item.location
    +
    +
    +
    + $item.name +
    $item.ago
    + +
    +
    +
    $item.title
    +
    +
    $item.body +
    + {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
    +
    +
    +
    + {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + + {{ endif }} + +
    + {{ if $item.drop.dropping }}{{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    +
    +
    +
    + +
    $item.dislike
    +
    + $item.comment +
    + +
    +
    diff --git a/view/theme/facepark/wallwall_item.tpl b/view/theme/facepark/wallwall_item.tpl new file mode 100755 index 0000000000..211906c934 --- /dev/null +++ b/view/theme/facepark/wallwall_item.tpl @@ -0,0 +1,82 @@ +
    +
    +
    +
    + + $item.owner_name +
    +
    $item.wall
    +
    + + $item.name + menu +
    +
      + $item.item_photo_menu +
    +
    + +
    +
    +
    + {{ if $item.lock }}
    $item.lock
    + {{ else }}
    {{ endif }} +
    $item.location
    +
    +
    +
    + $item.name $item.to $item.owner_name $item.vwall
    +
    $item.ago
    +
    +
    +
    $item.title
    +
    +
    $item.body +
    + {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
    +
    +
    +
    + {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + {{ endif }} + +
    + {{ if $item.drop.dropping }}{{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    +
    +
    +
    + +
    $item.dislike
    +
    +
    + $item.comment +
    + +
    +
    + From 4d39b0658f0319aeea659e03db4bad3e77325901 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Mar 2012 22:53:19 -0700 Subject: [PATCH 118/133] use password field for DB input --- view/install_db.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/install_db.tpl b/view/install_db.tpl index 7e2acdca57..1302b5a708 100755 --- a/view/install_db.tpl +++ b/view/install_db.tpl @@ -20,7 +20,7 @@ $info_03 {{ inc field_input.tpl with $field=$dbhost }}{{endinc}} {{ inc field_input.tpl with $field=$dbuser }}{{endinc}} -{{ inc field_input.tpl with $field=$dbpass }}{{endinc}} +{{ inc field_password.tpl with $field=$dbpass }}{{endinc}} {{ inc field_input.tpl with $field=$dbdata }}{{endinc}} From 0dc4c3f48426294dde998d46f47aacd1c9a3f370 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Mar 2012 22:54:20 -0700 Subject: [PATCH 119/133] add comix theme --- view/theme/comix/search_item.tpl | 54 ++++++++++++++ view/theme/comix/style.css | 109 +++++++++++++++++++++++++++++ view/theme/comix/theme.php | 60 ++++++++++++++++ view/theme/comix/wall_item.tpl | 78 +++++++++++++++++++++ view/theme/comix/wallwall_item.tpl | 85 ++++++++++++++++++++++ 5 files changed, 386 insertions(+) create mode 100755 view/theme/comix/search_item.tpl create mode 100755 view/theme/comix/style.css create mode 100755 view/theme/comix/theme.php create mode 100755 view/theme/comix/wall_item.tpl create mode 100755 view/theme/comix/wallwall_item.tpl diff --git a/view/theme/comix/search_item.tpl b/view/theme/comix/search_item.tpl new file mode 100755 index 0000000000..dba289031c --- /dev/null +++ b/view/theme/comix/search_item.tpl @@ -0,0 +1,54 @@ +
    +
    +
    +
    + + $item.name + menu +
    +
      + $item.item_photo_menu +
    +
    +
    +
    +
    + {{ if $item.lock }}
    $item.lock
    + {{ else }}
    {{ endif }} +
    $item.location
    +
    +
    +
    + $item.name +
    $item.ago
    + +
    +
    +
    $item.title
    +
    +
    $item.body
    +
    +
    +
    + {{ if $item.drop.dropping }}{{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    +
    +
    +
    + + +
    + {{ if $item.conv }} + $item.conv.title + {{ endif }} +
    + +
    + +
    + + diff --git a/view/theme/comix/style.css b/view/theme/comix/style.css new file mode 100755 index 0000000000..534e79cf49 --- /dev/null +++ b/view/theme/comix/style.css @@ -0,0 +1,109 @@ +@import url('../duepuntozero/style.css'); + +body { + font-family: "Comic Sans MS", sans !important; + font-size: 13px; +} +.wall-item-content-wrapper { + border: none; +} + +.wall-item-content-wrapper.comment { + background: #ffffff !important; + border-left: 1px solid #EEE; +} + +.wall-item-tools { + background: none; +} + +.comment-edit-text-empty, .comment-edit-text-full { + border: none; + border-left: 1px solid #EEE; + background: #EEEEEE; +} + +.comment-edit-wrapper, .comment-wwedit-wrapper { + background: #ffffff !important; +} + +section { + margin: 0px 32px; +} + +aside { + margin-left: 32px; +} +nav { + margin-left: 32px; + margin-right: 32px; +} + +nav #site-location { + top: 80px; + right: 36px; +} + +.wall-item-photo, .photo, .contact-block-img, .my-comment-photo { + border-radius: 3px; + -moz-border-radius: 3px; + margin-top: 15px; +} + +.wall-item-photo.comment { + margin-top: 26px; +} + + +.triangle-isosceles { + position:relative; + padding:15px; + margin:1em 0 3em; + color:#000; + background:#EEEEEE; /* default background for browsers without gradient support */ + /* css3 */ + background:-webkit-gradient(linear, 0 0, 0 100%, from(#EEEEEE), to(#ffffff)); + background:-moz-linear-gradient(#EEEEEE, #ffffff); + background:-o-linear-gradient(#EEEEEE, #ffffff); + background:linear-gradient(#EEEEEE, #ffffff); + -webkit-border-radius:10px; + -moz-border-radius:10px; + border-radius:10px; +} + +/* Variant : for left/right positioned triangle +------------------------------------------ */ + +.triangle-isosceles.left { + margin-left:30px; + background:#F8F8F8; + border: 2px solid #CCCCCC; +} + +/* THE TRIANGLE +------------------------------------------------------------------------------------------------------------------------------- */ + +/* creates triangle */ +.triangle-isosceles:after { + content:""; + position:absolute; + bottom:-8px; /* value = - border-top-width - border-bottom-width */ + left:30px; /* controls horizontal position */ + border-width:15px 15px 0; /* vary these values to change the angle of the vertex */ + border-style:solid; + border-color:#f8f8f8 transparent; + /* reduce the damage in FF3.0 */ + display:block; + width:0; +} + +/* Variant : left +------------------------------------------ */ + +.triangle-isosceles.left:after { + top:12px; /* controls vertical position */ + left:-30px; /* value = - border-left-width - border-right-width */ + bottom:auto; + border-width:10px 30px 10px 0; + border-color:transparent #f8f8f8; +} diff --git a/view/theme/comix/theme.php b/view/theme/comix/theme.php new file mode 100755 index 0000000000..e2f7f4db38 --- /dev/null +++ b/view/theme/comix/theme.php @@ -0,0 +1,60 @@ + + */ + + +$a->theme_info = array( + 'extends' => 'duepuntozero', +); + +$a->page['htmlhead'] .= <<< EOT + +EOT; diff --git a/view/theme/comix/wall_item.tpl b/view/theme/comix/wall_item.tpl new file mode 100755 index 0000000000..dae16a1c74 --- /dev/null +++ b/view/theme/comix/wall_item.tpl @@ -0,0 +1,78 @@ +
    +
    +
    +
    + + $item.name + + menu +
    +
      + $item.item_photo_menu +
    +
    +
    +
    +
    + {{ if $item.lock }}
    $item.lock
    + {{ else }}
    {{ endif }} +
    $item.location
    +
    +
    +
    + $item.name +
    $item.ago
    + +
    +
    +
    $item.title
    +
    +
    $item.body +
    + {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
    +
    +
    +
    + {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + {{ endif }} + {{ if $item.filer }} + + {{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    +
    +
    +
    + +
    $item.dislike
    +
    + $item.comment +
    + +
    +
    diff --git a/view/theme/comix/wallwall_item.tpl b/view/theme/comix/wallwall_item.tpl new file mode 100755 index 0000000000..11decf9c45 --- /dev/null +++ b/view/theme/comix/wallwall_item.tpl @@ -0,0 +1,85 @@ +
    +
    +
    +
    + + $item.owner_name +
    +
    $item.wall
    +
    + + $item.name + menu +
    +
      + $item.item_photo_menu +
    +
    + +
    +
    +
    + {{ if $item.lock }}
    $item.lock
    + {{ else }}
    {{ endif }} +
    $item.location
    +
    +
    +
    + $item.name $item.to $item.owner_name $item.vwall
    +
    $item.ago
    +
    +
    +
    $item.title
    +
    +
    $item.body +
    + {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
    +
    +
    +
    + {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + {{ endif }} + {{ if $item.filer }} + + {{ endif }} + +
    + {{ if $item.drop.dropping }}{{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    +
    +
    +
    + +
    $item.dislike
    +
    +
    + $item.comment +
    + +
    +
    + From 6c7b619b34e60f391087c669732b9efd0344d41c Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Mar 2012 23:57:33 -0700 Subject: [PATCH 120/133] remove stray template variable from old code --- include/conversation.php | 3 +-- view/jot-header.tpl | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index e9f024c274..5de4fcb51a 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -897,8 +897,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { '$audurl' => t("Please enter an audio link/URL:"), '$term' => t('Tag term:'), '$fileas' => t('File as:'), - '$whereareu' => t('Where are you right now?'), - '$title' => t('Enter a title for this item') + '$whereareu' => t('Where are you right now?') )); diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 88df73494f..ef760abe0f 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -121,7 +121,6 @@ function enableOnUser(){ +EOT; diff --git a/view/theme/comix-plain/wall_item.tpl b/view/theme/comix-plain/wall_item.tpl new file mode 100755 index 0000000000..dae16a1c74 --- /dev/null +++ b/view/theme/comix-plain/wall_item.tpl @@ -0,0 +1,78 @@ +
    +
    +
    +
    + + $item.name + + menu +
    +
      + $item.item_photo_menu +
    +
    +
    +
    +
    + {{ if $item.lock }}
    $item.lock
    + {{ else }}
    {{ endif }} +
    $item.location
    +
    +
    +
    + $item.name +
    $item.ago
    + +
    +
    +
    $item.title
    +
    +
    $item.body +
    + {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
    +
    +
    +
    + {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + {{ endif }} + {{ if $item.filer }} + + {{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    +
    +
    +
    + +
    $item.dislike
    +
    + $item.comment +
    + +
    +
    diff --git a/view/theme/comix-plain/wallwall_item.tpl b/view/theme/comix-plain/wallwall_item.tpl new file mode 100755 index 0000000000..11decf9c45 --- /dev/null +++ b/view/theme/comix-plain/wallwall_item.tpl @@ -0,0 +1,85 @@ +
    +
    +
    +
    + + $item.owner_name +
    +
    $item.wall
    +
    + + $item.name + menu +
    +
      + $item.item_photo_menu +
    +
    + +
    +
    +
    + {{ if $item.lock }}
    $item.lock
    + {{ else }}
    {{ endif }} +
    $item.location
    +
    +
    +
    + $item.name $item.to $item.owner_name $item.vwall
    +
    $item.ago
    +
    +
    +
    $item.title
    +
    +
    $item.body +
    + {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
    +
    +
    +
    + {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + {{ endif }} + {{ if $item.filer }} + + {{ endif }} + +
    + {{ if $item.drop.dropping }}{{ endif }} +
    + {{ if $item.drop.dropping }}{{ endif }} +
    +
    +
    +
    + +
    $item.dislike
    +
    +
    + $item.comment +
    + +
    +
    + From c1d6ece98e9c0793432d1046033e0b8cb93e63bb Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 21 Mar 2012 14:56:06 -0700 Subject: [PATCH 127/133] revert permissions relaxation on community --- mod/community.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/community.php b/mod/community.php index cf459617ea..f8cc3305b1 100755 --- a/mod/community.php +++ b/mod/community.php @@ -50,7 +50,7 @@ function community_content(&$a, $update = 0) { WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' - AND `item`.`private` = 0 AND `user`.`hidewall` = 0 + AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `user`.`hidewall` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 " ); @@ -72,7 +72,7 @@ function community_content(&$a, $update = 0) { WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' - AND `item`.`private` = 0 AND `user`.`hidewall` = 0 + AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `user`.`hidewall` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 ORDER BY `received` DESC LIMIT %d, %d ", intval($a->pager['start']), From 72d0756fa6a6118801ce9623aeacc760cbc93166 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Thu, 22 Mar 2012 04:33:21 +0100 Subject: [PATCH 128/133] add icons to aside diabook, fixes in css --- view/theme/diabook-blue/icons/head.jpg | Bin 383 -> 0 bytes view/theme/diabook-blue/photo_album.tpl | 7 --- view/theme/diabook-blue/photo_top.tpl | 7 --- view/theme/diabook-blue/style.css | 15 +++--- view/theme/diabook/icons/com_side.png | Bin 0 -> 680 bytes view/theme/diabook/icons/events.png | Bin 0 -> 663 bytes view/theme/diabook/icons/head.jpg | Bin 383 -> 0 bytes view/theme/diabook/icons/home.png | Bin 0 -> 722 bytes view/theme/diabook/icons/mess_side.png | Bin 0 -> 664 bytes view/theme/diabook/icons/notes.png | Bin 0 -> 739 bytes view/theme/diabook/icons/pubgroups.png | Bin 0 -> 710 bytes view/theme/diabook/profile_side.tpl | 12 ++--- view/theme/diabook/style.css | 66 ++++++++++++++++++------ view/theme/diabook/theme.php | 4 +- 14 files changed, 65 insertions(+), 46 deletions(-) delete mode 100644 view/theme/diabook-blue/icons/head.jpg delete mode 100755 view/theme/diabook-blue/photo_album.tpl delete mode 100755 view/theme/diabook-blue/photo_top.tpl create mode 100644 view/theme/diabook/icons/com_side.png create mode 100644 view/theme/diabook/icons/events.png delete mode 100644 view/theme/diabook/icons/head.jpg create mode 100644 view/theme/diabook/icons/home.png create mode 100644 view/theme/diabook/icons/mess_side.png create mode 100644 view/theme/diabook/icons/notes.png create mode 100644 view/theme/diabook/icons/pubgroups.png diff --git a/view/theme/diabook-blue/icons/head.jpg b/view/theme/diabook-blue/icons/head.jpg deleted file mode 100644 index 6210b76befb3c2085194217e94e6b6b19d8a5a46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 383 zcmex=LJ%Z3brsRu&*& z29a#6tZW>-931TI90J@toV>yUBEmufLP8?qvXUZVGGanPQp!>?a`K9biXxIK>M9Cq zvI>d{AVU~g+1NPPIrup^_!UHjL={K|{|_(-axl~|urf0$F)#@-G7B>PKf)jhc0V%% z5@2RyWaj`%DF^_4#>m9Zh>#OvViaUy6%7muopcGPLIUV_koOUQiIJIs1tcSgF2f)w z%*gcr76T76BhYqcK?ZwT%fkrCN0aq{`U e%N;)te=@#)^7-|oFLP{6q$G}S_`JRT|4jhcT}_Yx diff --git a/view/theme/diabook-blue/photo_album.tpl b/view/theme/diabook-blue/photo_album.tpl deleted file mode 100755 index 7e6c2f6669..0000000000 --- a/view/theme/diabook-blue/photo_album.tpl +++ /dev/null @@ -1,7 +0,0 @@ - -
    diff --git a/view/theme/diabook-blue/photo_top.tpl b/view/theme/diabook-blue/photo_top.tpl deleted file mode 100755 index 98ac9c4576..0000000000 --- a/view/theme/diabook-blue/photo_top.tpl +++ /dev/null @@ -1,7 +0,0 @@ - - diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index 738dde0e5d..f88c7b9547 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -2411,21 +2411,22 @@ float: left; -moz-box-shadow: 0 0 5px #888; -webkit-box-shadow: 0 0 5px #888; box-shadow: 0 0 5px #888; - background-color: #EEE; + background-color: #000; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; padding-bottom: 20px; position: relative; margin: 0 10px 10px 0; - overflow: hidden; - float: left; - position: relative; + width: 200px; height: 140px; + overflow: hidden; } .photo-top-album-name { - position: absolute; - bottom: 0; - padding: 0 5px; + width: 100%; + position: absolute; + bottom: 0px; + padding-left: 3px; + background-color: #EEE; } .photo-top-album-link{ color: #1872A2; diff --git a/view/theme/diabook/icons/com_side.png b/view/theme/diabook/icons/com_side.png new file mode 100644 index 0000000000000000000000000000000000000000..bc5969ef1afd41f0cfba08f51a0ac17356e60c3f GIT binary patch literal 680 zcmV;Z0$2TsP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z0Rkbx3`0-=00JmUL_t(I%k9#=Z&Fbh2Jq)S_k-KZ1#T4r@^xEjWNEvYK;oo}sYAEM zq3K3oHHI`Dn;1778dLuQ{WDD6YBZ7>gG~UVKm(>GG`&!IODX5LD-CpTF@469_x$qa zJO{YWzYa}0SO#PPD2yS)3@ry>7N9BaIPA^G~#Tg@6?w7#SGGYWL(F?X~!*~Yxj6(t_byC0;WYDIx*FHs_d z>adTk)(4Dl9yubC_du#c$gS6%b&u*`|91x z$4@RRpN%-1CB*@C>%{$Ta1z)#K7_E7NQKj4zt*O4=q0~`rsPNrvfl%4g&-LkJU$cm zX&$EJrE;T%ap>ss9EUpF1!&7d49o=#&NLKCyO=v#L#!RW^i8kxALTa>E5j@Pn;_Hx O0000 literal 0 HcmV?d00001 diff --git a/view/theme/diabook/icons/events.png b/view/theme/diabook/icons/events.png new file mode 100644 index 0000000000000000000000000000000000000000..4a0b3f3f11316265ad45472244094c3fbc27147d GIT binary patch literal 663 zcmV;I0%-k-P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z067OPaYLd200I|DL_t(I%k7j+OB+!XhMzl`8BGSXGpW?p)x_=se$Z*9BgdJX%NV_=NVB&JC#O|bzxpT`0kaZKN~>1mC5 zGbeX}|FE$Sj~^LE^Q>HE-*tH!hP-MvQCgEk5kFj)Q_JFQqrtPwODx&R43Es#EIpBK`&^S4Pxw-o@HaZ<>w-FJ@GLEZN_O`YN&(En>tL$uUl7pLmyN$ZK zVyNTYmWWU+7U_1oc%DbE*JEa8hJL?K6h-JeBKT_*gJ8#T07#OAcDv2^_&Bv%4G|%V zB9v0Yft6Cfhebpbfa5s$zR%Ru6k2Oar4pS^hitP=_j5V0w84ZHw6Fy002ovPDHLkV1n4c9mD_t literal 0 HcmV?d00001 diff --git a/view/theme/diabook/icons/head.jpg b/view/theme/diabook/icons/head.jpg deleted file mode 100644 index 6210b76befb3c2085194217e94e6b6b19d8a5a46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 383 zcmex=LJ%Z3brsRu&*& z29a#6tZW>-931TI90J@toV>yUBEmufLP8?qvXUZVGGanPQp!>?a`K9biXxIK>M9Cq zvI>d{AVU~g+1NPPIrup^_!UHjL={K|{|_(-axl~|urf0$F)#@-G7B>PKf)jhc0V%% z5@2RyWaj`%DF^_4#>m9Zh>#OvViaUy6%7muopcGPLIUV_koOUQiIJIs1tcSgF2f)w z%*gcr76T76BhYqcK?ZwT%fkrCN0aq{`U e%N;)te=@#)^7-|oFLP{6q$G}S_`JRT|4jhcT}_Yx diff --git a/view/theme/diabook/icons/home.png b/view/theme/diabook/icons/home.png new file mode 100644 index 0000000000000000000000000000000000000000..be47a48fc3638b94385eec044d6373e056890b09 GIT binary patch literal 722 zcmV;@0xkWCP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z05l_~+}S<=00L4;L_t(I%k7liYm!kM$A9P1`8M4|%%*E|>72nvF4lRY zSLsNG5JJRX>$k*MI!~_Lo5`2+Nh?8}!){rlN@nk9){kq5(XLKYpk$idq*Ib?#+fqF`eavL(Ftk`~D97Z%?a$itMDybLT-deE;h^vC=^vH) zDGPoRzou&cl2IE~Qy`Hmp~wp`zhnxIPSZCad~xHi9*CxY)aX3W`ttncz9TECb&^SM zgAA#`ByU3Qv1!kGEIgE*y_&8DE-CN+8TqTuqrJyyWh;pnbincklw!2N@KQLw_nUPP zJ?VM-G4!|^xa7L^w`?6^={eX8GpLRNq>uw>4S*7{B-)el!U=2cU@cLUWX#p?JG`~V zIs!rOaGgTYO#vkpFc$d&vm7%scW`IhCxF@AU-p02Pg$c1kPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z05%0j=RQFI00J0EL_t(I%k7lSYEw}Zh1a<`r+>M&iCi0~MWl6*f?x~?9Y}qFj>PwH z;>DJa(Yt)k)4GM+APPJNH3ByoyyIn4& z%tiAzgVR38(#k3(rt-y3r}Kn!zAA($CrR?4(P+FJ_3+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K`4=OZen32Em}3$Fq=T6A|_Us z$nBaf_OBdY?Q%O>J)S2jM&mOY^|ZKC($t!C=4FRKKj+JsDo_aLj~k#aoXPRZck97e zRMy1JmXgQi6&pQX0isY#LZJxO!Vx6vlSFSbU|ZV7YJQR0Yk2ptBmH;?vp!jl->e*3 z<*aO|;fN2MQ$Xv90JtU_iVOovmCz9_l?o*ijwW!9Q#Z?Y{3><>{FjjA=7QKVT7dEn zUQQM1&+I1Q>Jp$7B$dsU6hG`^dB1slF9xYN3B0g$G#Ks;UF*Ia&rKr{O#zez@9e_E z`@xShW9lBDeSN=8s(8GSKFx#HlbwAT-h(BHr&)C)NtE5#+$Hpwqu@F#-nuXzoV>Fi zxWe&8e!1U}{)UB64kQmSdBC6r-N= diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 437f323faa..ffab5b4c4e 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -881,22 +881,47 @@ ul.menu-popup .empty { text-decoration: none; } .menu-profile-side{ - list-style: none; - padding-left: 16px; - min-height: 16px; + list-style: none; + padding-left: 0px; + min-height: 0px; } .menu-profile-list{ height: auto; overflow: auto; padding-top: 3px; padding-bottom: 3px; + padding-left: 16px; + min-height: 16px; + list-style: none; } .menu-profile-list:hover{ background: #EEE; } +.menu-profile-list-item{ + padding-left: 5px; + } .menu-profile-list-item:hover{ - text-decoration: none; + text-decoration: none; } +/*http://prothemedesign.com/circular-icons/*/ +.menu-profile-list.home{ + background: url("../../../view/theme/diabook-blue/icons/home.png") no-repeat; + } +.menu-profile-list.photos{ + background: url("../../../view/theme/diabook-blue/icons/mess_side.png") no-repeat; + } +.menu-profile-list.events{ + background: url("../../../view/theme/diabook-blue/icons/events.png") no-repeat; + } +.menu-profile-list.notes{ + background: url("../../../view/theme/diabook-blue/icons/notes.png") no-repeat; + } +.menu-profile-list.foren{ + background: url("../../../view/theme/diabook-blue/icons/pubgroups.png") no-repeat; + } +.menu-profile-list.com_side{ + background: url("../../../view/theme/diabook-blue/icons/com_side.png") no-repeat; + } /* aside */ aside { @@ -2348,7 +2373,13 @@ float: left; .contact-details { color: #999999; } - +#side-bar-photos-albums li{ +list-style-type: disc; +} +#side-bar-photos-albums ul li{ + margin-left: 30px; + padding-left: 0px; + } #side-bar-photos-albums{ margin-top: 15px; } @@ -2362,39 +2393,40 @@ float: left; -moz-box-shadow: 0 0 5px #888; -webkit-box-shadow: 0 0 5px #888; box-shadow: 0 0 5px #888; - background-color: #EEE; + background-color: #000; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; padding-bottom: 20px; position: relative; margin: 0 10px 10px 0; + width: 200px; height: 140px; + overflow: hidden; } +/* .photo-top-album-name { position: absolute; bottom: 0; padding: 0 5px; -} -.photo-top-album-link{ - color: #1872A2; - } +}*/ /*.photo-top-image-wrapper { position: relative; float: left; margin-top: 15px; margin-right: 15px; width: 200px; height: 200px; - overflow: hidden; -} + +}*/ .photo-top-album-name { width: 100%; - min-height: 2em; position: absolute; bottom: 0px; - padding: 0px 3px; - padding-top: 0.5em; - background-color: rgb(255, 255, 255); -}*/ + padding-left: 3px; + background-color: #EEE; +} +.photo-top-album-link{ + color: #3465A4; + } #photo-top-end { clear: both; } diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 9093ac2ca2..39479ce522 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -1,8 +1,8 @@ Date: Wed, 21 Mar 2012 21:42:27 -0700 Subject: [PATCH 129/133] work around doubled linefeeds in tinymce3.5b2 --- mod/item.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mod/item.php b/mod/item.php index fe570075f2..ee6c5c9a73 100755 --- a/mod/item.php +++ b/mod/item.php @@ -243,6 +243,7 @@ function item_post(&$a) { } + if(! strlen($body)) { if($preview) killme(); @@ -253,6 +254,15 @@ function item_post(&$a) { } } + // Work around doubled linefeeds in Tinymce 3.5b2 + // First figure out if it's a status post that would've been + // created using tinymce. Otherwise leave it alone. + + $plaintext = (local_user() ? intval(get_pconfig(local_user(),'system','plaintext')) : 0); + if((! $parent) && (! $api_source) && (! $plaintext)) { + $body = str_replace("\r\n","\n",$body); + $body = str_replace("\n\n","\n",$body); + } // get contact info for poster From d81256d7b051d9a76b087feeb64ac79fb4aeff4d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 21 Mar 2012 21:45:45 -0700 Subject: [PATCH 130/133] support lowercase :-p smilie --- include/text.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/text.php b/include/text.php index 527f3a3442..92a74eb49e 100644 --- a/include/text.php +++ b/include/text.php @@ -712,6 +712,7 @@ function smilies($s, $sample = false) { ';-)', ':-(', ':-P', + ':-p', ':-"', ':-"', ':-x', @@ -745,6 +746,7 @@ function smilies($s, $sample = false) { ';-)', ':-(', ':-P', + ':-p', ':-\', ':-\', ':-x', From e37c4f69b42cc8a278fb37d1d7cdb374bfd7d156 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Thu, 22 Mar 2012 06:54:18 +0100 Subject: [PATCH 131/133] add file_as-option to diabook-derivates --- view/theme/diabook-blue/icons/file_as.png | Bin 0 -> 352 bytes view/theme/diabook-blue/style.css | 1 + view/theme/diabook-blue/wall_item.tpl | 4 ++++ view/theme/diabook/icons/file_as.png | Bin 0 -> 352 bytes view/theme/diabook/style.css | 1 + view/theme/diabook/wall_item.tpl | 4 ++++ 6 files changed, 10 insertions(+) create mode 100755 view/theme/diabook-blue/icons/file_as.png create mode 100755 view/theme/diabook/icons/file_as.png diff --git a/view/theme/diabook-blue/icons/file_as.png b/view/theme/diabook-blue/icons/file_as.png new file mode 100755 index 0000000000000000000000000000000000000000..16713fa5300e9590c8c57c86b81954c7091d78af GIT binary patch literal 352 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfk2x#UOQDEjNYe;||Cb$8Zz-I@oo z?2Ro7nV}lBP02imVy%<(4_fv)IT$+1Zku@7+?Pf4oxzb!F0r$oD}B0~{wMv#a#N4h zd*#oytG0ID++)s7y*kHDh;NzBz^nK^Ze53d9L%HZkh=d#Wzp$PzSPKbU0 literal 0 HcmV?d00001 diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index f88c7b9547..d3d3d9eb7a 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -102,6 +102,7 @@ .icon.recycle { background-image: url("../../../view/theme/diabook-blue/icons/recycle.png");} .icon.remote-link { background-image: url("../../../view/theme/diabook-blue/icons/remote.png");} .icon.tagged { background-image: url("../../../view/theme/diabook-blue/icons/tagged.png");} +.icon.file-as { background-image: url("../../../view/theme/diabook-blue/icons/file_as.png");} .star-item.icon.unstarred { background-image: url("../../../view/theme/diabook-blue/icons/unstarred.png");} .star-item.icon.starred { background-image: url("../../../view/theme/diabook-blue/icons/starred.png");} .icon.link { background-image: url("../../../view/theme/diabook-blue/icons/link.png");} diff --git a/view/theme/diabook-blue/wall_item.tpl b/view/theme/diabook-blue/wall_item.tpl index ebe40fd4ea..20d24702b9 100644 --- a/view/theme/diabook-blue/wall_item.tpl +++ b/view/theme/diabook-blue/wall_item.tpl @@ -66,6 +66,10 @@ {{ endif }} + {{ if $item.filer }} + + {{ endif }} + {{ if $item.plink }}$item.plink.title{{ endif }} diff --git a/view/theme/diabook/icons/file_as.png b/view/theme/diabook/icons/file_as.png new file mode 100755 index 0000000000000000000000000000000000000000..16713fa5300e9590c8c57c86b81954c7091d78af GIT binary patch literal 352 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgfk2x#UOQDEjNYe;||Cb$8Zz-I@oo z?2Ro7nV}lBP02imVy%<(4_fv)IT$+1Zku@7+?Pf4oxzb!F0r$oD}B0~{wMv#a#N4h zd*#oytG0ID++)s7y*kHDh;NzBz^nK^Ze53d9L%HZkh=d#Wzp$PzSPKbU0 literal 0 HcmV?d00001 diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index ffab5b4c4e..5841a96b36 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -102,6 +102,7 @@ .icon.recycle { background-image: url("../../../view/theme/diabook/icons/recycle.png");} .icon.remote-link { background-image: url("../../../view/theme/diabook/icons/remote.png");} .icon.tagged { background-image: url("../../../view/theme/diabook/icons/tagged.png");} +.icon.file-as { background-image: url("../../../view/theme/diabook/icons/file_as.png");} .star-item.icon.unstarred { background-image: url("../../../view/theme/diabook/icons/unstarred.png");} .star-item.icon.starred { background-image: url("../../../view/theme/diabook/icons/starred.png");} .icon.link { background-image: url("../../../view/theme/diabook/icons/link.png");} diff --git a/view/theme/diabook/wall_item.tpl b/view/theme/diabook/wall_item.tpl index ebe40fd4ea..20d24702b9 100644 --- a/view/theme/diabook/wall_item.tpl +++ b/view/theme/diabook/wall_item.tpl @@ -66,6 +66,10 @@ {{ endif }} + {{ if $item.filer }} + + {{ endif }} + {{ if $item.plink }}$item.plink.title{{ endif }} From ebdf0ee99e517c6718099fda2f1b2288c42e66da Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 22 Mar 2012 01:46:52 -0700 Subject: [PATCH 132/133] prevent re-registrations using a deleted username - not an issue with Friendica but could create a serious privacy issue with federated platforms --- boot.php | 2 +- database.sql | 6 ++++++ include/Contact.php | 6 ++++++ mod/register.php | 10 ++++++++++ mod/regmod.php | 5 +++++ update.php | 11 ++++++++++- 6 files changed, 38 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index 910de6f82d..04e16e64dc 100755 --- a/boot.php +++ b/boot.php @@ -11,7 +11,7 @@ require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '2.3.1288' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1132 ); +define ( 'DB_UPDATE_VERSION', 1133 ); define ( 'EOL', "
    \r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index f058bc59ef..327b482c06 100755 --- a/database.sql +++ b/database.sql @@ -861,3 +861,9 @@ INDEX ( `term` ) ) ENGINE = MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `userd` ( +`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , +`username` CHAR( 255 ) NOT NULL, +INDEX ( `username` ) +) ENGINE = MyISAM DEFAULT CHARSET=utf8; + diff --git a/include/Contact.php b/include/Contact.php index baccea3055..d9949b1ef8 100755 --- a/include/Contact.php +++ b/include/Contact.php @@ -15,6 +15,12 @@ function user_remove($uid) { call_hooks('remove_user',$r[0]); + // save username (actually the nickname as it is guaranteed + // unique), so it cannot be re-registered in the future. + + q("insert into userd ( username ) values ( '%s' )", + $r[0]['nickname'] + ); q("DELETE FROM `contact` WHERE `uid` = %d", intval($uid)); q("DELETE FROM `group` WHERE `uid` = %d", intval($uid)); diff --git a/mod/register.php b/mod/register.php index 388b3e2507..6d0e2700bc 100755 --- a/mod/register.php +++ b/mod/register.php @@ -150,6 +150,16 @@ function register_post(&$a) { if(count($r)) $err .= t('Nickname is already registered. Please choose another.') . EOL; + // Check deleted accounts that had this nickname. Doesn't matter to us, + // but could be a security issue for federated platforms. + + $r = q("SELECT * FROM `userd` + WHERE `username` = '%s' LIMIT 1", + dbesc($nickname) + ); + if(count($r)) + $err .= t('Nickname was once registered here and may not be re-used. Please choose another.') . EOL; + if(strlen($err)) { notice( $err ); return; diff --git a/mod/regmod.php b/mod/regmod.php index 17e728ba2d..21f41eb01c 100755 --- a/mod/regmod.php +++ b/mod/regmod.php @@ -64,6 +64,11 @@ function user_allow($hash) { } + +// This does not have to go through user_remove() and save the nickname +// permanently against re-registration, as the person was not yet +// allowed to have friends on this system + function user_deny($hash) { $register = q("SELECT * FROM `register` WHERE `hash` = '%s' LIMIT 1", diff --git a/update.php b/update.php index 6a685a6ff0..a69742a949 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Thu, 22 Mar 2012 04:07:37 -0700 Subject: [PATCH 133/133] missing tooltip for "file as" --- view/theme/comix-plain/wall_item.tpl | 2 +- view/theme/comix-plain/wallwall_item.tpl | 2 +- view/theme/comix/wall_item.tpl | 2 +- view/theme/comix/wallwall_item.tpl | 2 +- view/theme/duepuntozero/wall_item.tpl | 2 +- view/theme/duepuntozero/wallwall_item.tpl | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/view/theme/comix-plain/wall_item.tpl b/view/theme/comix-plain/wall_item.tpl index dae16a1c74..dfcd8ca960 100755 --- a/view/theme/comix-plain/wall_item.tpl +++ b/view/theme/comix-plain/wall_item.tpl @@ -58,7 +58,7 @@ {{ endif }} {{ if $item.filer }} - + {{ endif }}
    {{ if $item.drop.dropping }}{{ endif }} diff --git a/view/theme/comix-plain/wallwall_item.tpl b/view/theme/comix-plain/wallwall_item.tpl index 11decf9c45..abd5967b2a 100755 --- a/view/theme/comix-plain/wallwall_item.tpl +++ b/view/theme/comix-plain/wallwall_item.tpl @@ -62,7 +62,7 @@ {{ endif }} {{ if $item.filer }} - + {{ endif }}
    diff --git a/view/theme/comix/wall_item.tpl b/view/theme/comix/wall_item.tpl index dae16a1c74..dfcd8ca960 100755 --- a/view/theme/comix/wall_item.tpl +++ b/view/theme/comix/wall_item.tpl @@ -58,7 +58,7 @@ {{ endif }} {{ if $item.filer }} - + {{ endif }}
    {{ if $item.drop.dropping }}{{ endif }} diff --git a/view/theme/comix/wallwall_item.tpl b/view/theme/comix/wallwall_item.tpl index 11decf9c45..abd5967b2a 100755 --- a/view/theme/comix/wallwall_item.tpl +++ b/view/theme/comix/wallwall_item.tpl @@ -62,7 +62,7 @@ {{ endif }} {{ if $item.filer }} - + {{ endif }}
    diff --git a/view/theme/duepuntozero/wall_item.tpl b/view/theme/duepuntozero/wall_item.tpl index e2db70a14a..9d1dd7d70e 100755 --- a/view/theme/duepuntozero/wall_item.tpl +++ b/view/theme/duepuntozero/wall_item.tpl @@ -58,7 +58,7 @@ {{ endif }} {{ if $item.filer }} - + {{ endif }}
    {{ if $item.drop.dropping }}{{ endif }} diff --git a/view/theme/duepuntozero/wallwall_item.tpl b/view/theme/duepuntozero/wallwall_item.tpl index 420c0e08b9..bad5680c7a 100755 --- a/view/theme/duepuntozero/wallwall_item.tpl +++ b/view/theme/duepuntozero/wallwall_item.tpl @@ -62,7 +62,7 @@ {{ endif }} {{ if $item.filer }} - + {{ endif }}
     
    - +
    @@ -162,10 +163,10 @@ - - + + <\/tr>/g, ''); return html; } diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js old mode 100755 new mode 100644 index fd9700f222..cc891c1711 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js @@ -1,253 +1,345 @@ -tinyMCEPopup.requireLangPack(); - -var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; - -var colors = [ - "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", - "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", - "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff", - "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033", - "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399", - "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff", - "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333", - "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399", - "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff", - "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633", - "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699", - "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff", - "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633", - "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999", - "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff", - "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933", - "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999", - "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff", - "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33", - "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99", - "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff", - "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33", - "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99", - "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff", - "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33", - "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99", - "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff" -]; - -var named = { - '#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige', - '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'BlanchedAlmond','#0000FF':'Blue','#8A2BE2':'BlueViolet','#A52A2A':'Brown', - '#DEB887':'BurlyWood','#5F9EA0':'CadetBlue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'CornflowerBlue', - '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'DarkBlue','#008B8B':'DarkCyan','#B8860B':'DarkGoldenRod', - '#A9A9A9':'DarkGray','#A9A9A9':'DarkGrey','#006400':'DarkGreen','#BDB76B':'DarkKhaki','#8B008B':'DarkMagenta','#556B2F':'DarkOliveGreen', - '#FF8C00':'Darkorange','#9932CC':'DarkOrchid','#8B0000':'DarkRed','#E9967A':'DarkSalmon','#8FBC8F':'DarkSeaGreen','#483D8B':'DarkSlateBlue', - '#2F4F4F':'DarkSlateGray','#2F4F4F':'DarkSlateGrey','#00CED1':'DarkTurquoise','#9400D3':'DarkViolet','#FF1493':'DeepPink','#00BFFF':'DeepSkyBlue', - '#696969':'DimGray','#696969':'DimGrey','#1E90FF':'DodgerBlue','#B22222':'FireBrick','#FFFAF0':'FloralWhite','#228B22':'ForestGreen', - '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'GhostWhite','#FFD700':'Gold','#DAA520':'GoldenRod','#808080':'Gray','#808080':'Grey', - '#008000':'Green','#ADFF2F':'GreenYellow','#F0FFF0':'HoneyDew','#FF69B4':'HotPink','#CD5C5C':'IndianRed','#4B0082':'Indigo','#FFFFF0':'Ivory', - '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'LavenderBlush','#7CFC00':'LawnGreen','#FFFACD':'LemonChiffon','#ADD8E6':'LightBlue', - '#F08080':'LightCoral','#E0FFFF':'LightCyan','#FAFAD2':'LightGoldenRodYellow','#D3D3D3':'LightGray','#D3D3D3':'LightGrey','#90EE90':'LightGreen', - '#FFB6C1':'LightPink','#FFA07A':'LightSalmon','#20B2AA':'LightSeaGreen','#87CEFA':'LightSkyBlue','#778899':'LightSlateGray','#778899':'LightSlateGrey', - '#B0C4DE':'LightSteelBlue','#FFFFE0':'LightYellow','#00FF00':'Lime','#32CD32':'LimeGreen','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon', - '#66CDAA':'MediumAquaMarine','#0000CD':'MediumBlue','#BA55D3':'MediumOrchid','#9370D8':'MediumPurple','#3CB371':'MediumSeaGreen','#7B68EE':'MediumSlateBlue', - '#00FA9A':'MediumSpringGreen','#48D1CC':'MediumTurquoise','#C71585':'MediumVioletRed','#191970':'MidnightBlue','#F5FFFA':'MintCream','#FFE4E1':'MistyRose','#FFE4B5':'Moccasin', - '#FFDEAD':'NavajoWhite','#000080':'Navy','#FDF5E6':'OldLace','#808000':'Olive','#6B8E23':'OliveDrab','#FFA500':'Orange','#FF4500':'OrangeRed','#DA70D6':'Orchid', - '#EEE8AA':'PaleGoldenRod','#98FB98':'PaleGreen','#AFEEEE':'PaleTurquoise','#D87093':'PaleVioletRed','#FFEFD5':'PapayaWhip','#FFDAB9':'PeachPuff', - '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'PowderBlue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'RosyBrown','#4169E1':'RoyalBlue', - '#8B4513':'SaddleBrown','#FA8072':'Salmon','#F4A460':'SandyBrown','#2E8B57':'SeaGreen','#FFF5EE':'SeaShell','#A0522D':'Sienna','#C0C0C0':'Silver', - '#87CEEB':'SkyBlue','#6A5ACD':'SlateBlue','#708090':'SlateGray','#708090':'SlateGrey','#FFFAFA':'Snow','#00FF7F':'SpringGreen', - '#4682B4':'SteelBlue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet', - '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'WhiteSmoke','#FFFF00':'Yellow','#9ACD32':'YellowGreen' -}; - -function init() { - var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')); - - tinyMCEPopup.resizeToInnerSize(); - - generatePicker(); - - if (inputColor) { - changeFinalColor(inputColor); - - col = convertHexToRGB(inputColor); - - if (col) - updateLight(col.r, col.g, col.b); - } -} - -function insertAction() { - var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); - - tinyMCEPopup.restoreSelection(); - - if (f) - f(color); - - tinyMCEPopup.close(); -} - -function showColor(color, name) { - if (name) - document.getElementById("colorname").innerHTML = name; - - document.getElementById("preview").style.backgroundColor = color; - document.getElementById("color").value = color.toLowerCase(); -} - -function convertRGBToHex(col) { - var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); - - if (!col) - return col; - - var rgb = col.replace(re, "$1,$2,$3").split(','); - if (rgb.length == 3) { - r = parseInt(rgb[0]).toString(16); - g = parseInt(rgb[1]).toString(16); - b = parseInt(rgb[2]).toString(16); - - r = r.length == 1 ? '0' + r : r; - g = g.length == 1 ? '0' + g : g; - b = b.length == 1 ? '0' + b : b; - - return "#" + r + g + b; - } - - return col; -} - -function convertHexToRGB(col) { - if (col.indexOf('#') != -1) { - col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); - - r = parseInt(col.substring(0, 2), 16); - g = parseInt(col.substring(2, 4), 16); - b = parseInt(col.substring(4, 6), 16); - - return {r : r, g : g, b : b}; - } - - return null; -} - -function generatePicker() { - var el = document.getElementById('light'), h = '', i; - - for (i = 0; i < detail; i++){ - h += '
    '; - } - - el.innerHTML = h; -} - -function generateWebColors() { - var el = document.getElementById('webcolors'), h = '', i; - - if (el.className == 'generated') - return; - - h += '
     
    - +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/template/blank.htm b/library/tinymce/jscripts/tiny_mce/plugins/template/blank.htm old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/template/css/template.css b/library/tinymce/jscripts/tiny_mce/plugins/template/css/template.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin_src.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/template/js/template.js b/library/tinymce/jscripts/tiny_mce/plugins/template/js/template.js old mode 100755 new mode 100644 index 24045d7311..bc3045d244 --- a/library/tinymce/jscripts/tiny_mce/plugins/template/js/template.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/template/js/template.js @@ -42,7 +42,7 @@ var TemplateDialog = { if (e) { e.style.height = Math.abs(h) + 'px'; - e.style.width = Math.abs(w - 5) + 'px'; + e.style.width = Math.abs(w - 5) + 'px'; } }, diff --git a/library/tinymce/jscripts/tiny_mce/plugins/template/langs/en_dlg.js b/library/tinymce/jscripts/tiny_mce/plugins/template/langs/en_dlg.js old mode 100755 new mode 100644 index 2471c3fa04..83e599d68f --- a/library/tinymce/jscripts/tiny_mce/plugins/template/langs/en_dlg.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/template/langs/en_dlg.js @@ -1,15 +1 @@ -tinyMCE.addI18n('en.template_dlg',{ -title:"Templates", -label:"Template", -desc_label:"Description", -desc:"Insert predefined template content", -select:"Select a template", -preview:"Preview", -warning:"Warning: Updating a template with a different one may cause data loss.", -mdate_format:"%Y-%m-%d %H:%M:%S", -cdate_format:"%Y-%m-%d %H:%M:%S", -months_long:"January,February,March,April,May,June,July,August,September,October,November,December", -months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", -day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", -day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun" -}); \ No newline at end of file +tinyMCE.addI18n('en.template_dlg',{title:"Templates",label:"Template","desc_label":"Description",desc:"Insert Predefined Template Content",select:"Select a Template",preview:"Preview",warning:"Warning: Updating a template with a different one may cause data loss.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"}); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/template/template.htm b/library/tinymce/jscripts/tiny_mce/plugins/template/template.htm old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/visualblocks/css/visualblocks.css b/library/tinymce/jscripts/tiny_mce/plugins/visualblocks/css/visualblocks.css new file mode 100644 index 0000000000..17b9aeff16 --- /dev/null +++ b/library/tinymce/jscripts/tiny_mce/plugins/visualblocks/css/visualblocks.css @@ -0,0 +1,19 @@ +p, h1, h2, h3, h4, h5, h6, hgroup, aside, div, section, article, blockquote, address, pre {display: block; padding-top: 10px; border: 1px dashed #BBB; background: transparent no-repeat} +p, h1, h2, h3, h4, h5, h6, hgroup, aside, div, section, article, address, pre {margin-left: 3px} +section, article, address, hgroup, aside {margin: 1em 0 0 3px} + +p {background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)} +h1 {background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)} +h2 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)} +h3 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)} +h4 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)} +h5 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)} +h6 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)} +div {background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)} +section {background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)} +article {background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)} +blockquote {background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)} +address {background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)} +pre {background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)} +hgroup {background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)} +aside {background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)} diff --git a/library/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin.js new file mode 100644 index 0000000000..62cc2e4ced --- /dev/null +++ b/library/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.VisualBlocks",{init:function(a,b){var c;if(!window.NodeList){return}a.addCommand("mceVisualBlocks",function(){var e=a.dom,d;if(!c){c=e.uniqueId();d=e.create("link",{id:c,rel:"stylesheet",href:b+"/css/visualblocks.css"});a.getDoc().getElementsByTagName("head")[0].appendChild(d)}else{d=e.get(c);d.disabled=!d.disabled}a.controlManager.setActive("visualblocks",!d.disabled)});a.addButton("visualblocks",{title:"visualblocks.desc",cmd:"mceVisualBlocks"});a.onInit.add(function(){if(a.settings.visualblocks_default_state){a.execCommand("mceVisualBlocks")}})},getInfo:function(){return{longname:"Visual blocks",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualblocks",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("visualblocks",tinymce.plugins.VisualBlocks)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin_src.js new file mode 100644 index 0000000000..e74c0bdc0d --- /dev/null +++ b/library/tinymce/jscripts/tiny_mce/plugins/visualblocks/editor_plugin_src.js @@ -0,0 +1,63 @@ +/** + * editor_plugin_src.js + * + * Copyright 2012, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.VisualBlocks', { + init : function(ed, url) { + var cssId; + + // We don't support older browsers like IE6/7 and they don't provide prototypes for DOM objects + if (!window.NodeList) { + return; + } + + ed.addCommand('mceVisualBlocks', function() { + var dom = ed.dom, linkElm; + + if (!cssId) { + cssId = dom.uniqueId(); + linkElm = dom.create('link', { + id: cssId, + rel : 'stylesheet', + href : url + '/css/visualblocks.css' + }); + + ed.getDoc().getElementsByTagName('head')[0].appendChild(linkElm); + } else { + linkElm = dom.get(cssId); + linkElm.disabled = !linkElm.disabled; + } + + ed.controlManager.setActive('visualblocks', !linkElm.disabled); + }); + + ed.addButton('visualblocks', {title : 'visualblocks.desc', cmd : 'mceVisualBlocks'}); + + ed.onInit.add(function() { + if (ed.settings.visualblocks_default_state) { + ed.execCommand('mceVisualBlocks'); + } + }); + }, + + getInfo : function() { + return { + longname : 'Visual blocks', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualblocks', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('visualblocks', tinymce.plugins.VisualBlocks); +})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js old mode 100755 new mode 100644 index 53d31c44fa..1a148e8b4f --- a/library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.VisualChars",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceVisualChars",c._toggleVisualChars,c);a.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"});a.onBeforeGetContent.add(function(d,e){if(c.state){c.state=true;c._toggleVisualChars()}})},getInfo:function(){return{longname:"Visual characters",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_toggleVisualChars:function(){var m=this,g=m.editor,a,e,f,k=g.getDoc(),l=g.getBody(),j,n=g.selection,c;m.state=!m.state;g.controlManager.setActive("visualchars",m.state);if(m.state){a=[];tinymce.walk(l,function(b){if(b.nodeType==3&&b.nodeValue&&b.nodeValue.indexOf("\u00a0")!=-1){a.push(b)}},"childNodes");for(e=0;e$1');j=j.replace(/\u00a0/g,"\u00b7");g.dom.setOuterHTML(a[e],j,k)}}else{a=tinymce.grep(g.dom.select("span",l),function(b){return g.dom.hasClass(b,"mceVisualNbsp")});for(e=0;e$1');c=k.dom.create("div",null,l);while(node=c.lastChild){k.dom.insertAfter(node,a[g])}k.dom.remove(a[g])}}else{a=k.dom.select("span.mceItemNbsp",o);for(g=a.length-1;g>=0;g--){k.dom.remove(a[g],1)}}q.moveToBookmark(f)}});tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin_src.js old mode 100755 new mode 100644 index 0a5275fe28..df985905b6 --- a/library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin_src.js @@ -22,9 +22,9 @@ ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'}); ed.onBeforeGetContent.add(function(ed, o) { - if (t.state) { + if (t.state && o.format != 'raw' && !o.draft) { t.state = true; - t._toggleVisualChars(); + t._toggleVisualChars(false); } }); }, @@ -41,12 +41,15 @@ // Private methods - _toggleVisualChars : function() { - var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo; + _toggleVisualChars : function(bookmark) { + var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo, div, bm; t.state = !t.state; ed.controlManager.setActive('visualchars', t.state); + if (bookmark) + bm = s.getBookmark(); + if (t.state) { nl = []; tinymce.walk(b, function(n) { @@ -54,20 +57,24 @@ nl.push(n); }, 'childNodes'); - for (i=0; i$1'); - nv = nv.replace(/\u00a0/g, '\u00b7'); - ed.dom.setOuterHTML(nl[i], nv, d); + nv = nv.replace(/(\u00a0)/g, '$1'); + + div = ed.dom.create('div', null, nv); + while (node = div.lastChild) + ed.dom.insertAfter(node, nl[i]); + + ed.dom.remove(nl[i]); } } else { - nl = tinymce.grep(ed.dom.select('span', b), function(n) { - return ed.dom.hasClass(n, 'mceVisualNbsp'); - }); + nl = ed.dom.select('span.mceItemNbsp', b); - for (i=0; i= 0; i--) + ed.dom.remove(nl[i], 1); } + + s.moveToBookmark(bm); } }); diff --git a/library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin.js old mode 100755 new mode 100644 index a099e6a8c5..42ece2092f --- a/library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(a,b){var c=this,d=0;c.countre=a.getParam("wordcount_countregex",/\S\s+/g);c.cleanre=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$¿'"_+=\\\/-]*/g);c.id=a.id+"-word-count";a.onPostRender.add(function(f,e){var g,h;h=f.getParam("wordcount_target_id");if(!h){g=tinymce.DOM.get(f.id+"_path_row");if(g){tinymce.DOM.add(g.parentNode,"div",{style:"float: right"},f.getLang("wordcount.words","Words: ")+'0')}}else{tinymce.DOM.add(h,"span",{},'0')}});a.onInit.add(function(e){e.selection.onSetContent.add(function(){c._count(e)});c._count(e)});a.onSetContent.add(function(e){c._count(e)});a.onKeyUp.add(function(f,g){if(g.keyCode==d){return}if(13==g.keyCode||8==d||46==d){c._count(f)}d=g.keyCode})},_count:function(b){var c=this,a=0;if(c.block){return}c.block=1;setTimeout(function(){var d=b.getContent({format:"raw"});if(d){d=d.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");d=d.replace(c.cleanre,"");d.replace(c.countre,function(){a++})}tinymce.DOM.setHTML(c.id,a.toString());setTimeout(function(){c.block=0},2000)},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(c,d){var e=this,f=0,g=tinymce.VK;e.countre=c.getParam("wordcount_countregex",/[\w\u2019\'-]+/g);e.cleanre=c.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);e.update_rate=c.getParam("wordcount_update_rate",2000);e.update_on_delete=c.getParam("wordcount_update_on_delete",false);e.id=c.id+"-word-count";c.onPostRender.add(function(i,h){var j,k;k=i.getParam("wordcount_target_id");if(!k){j=tinymce.DOM.get(i.id+"_path_row");if(j){tinymce.DOM.add(j.parentNode,"div",{style:"float: right"},i.getLang("wordcount.words","Words: ")+'0')}}else{tinymce.DOM.add(k,"span",{},'0')}});c.onInit.add(function(h){h.selection.onSetContent.add(function(){e._count(h)});e._count(h)});c.onSetContent.add(function(h){e._count(h)});function b(h){return h!==f&&(h===g.ENTER||f===g.SPACEBAR||a(f))}function a(h){return h===g.DELETE||h===g.BACKSPACE}c.onKeyUp.add(function(h,i){if(b(i.keyCode)||e.update_on_delete&&a(i.keyCode)){e._count(h)}f=i.keyCode})},_getCount:function(c){var a=0;var b=c.getContent({format:"raw"});if(b){b=b.replace(/\.\.\./g," ");b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");b=b.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," ");b=b.replace(this.cleanre,"");var d=b.match(this.countre);if(d){a=d.length}}return a},_count:function(a){var b=this;if(b.block){return}b.block=1;setTimeout(function(){if(!a.destroyed){var c=b._getCount(a);tinymce.DOM.setHTML(b.id,c.toString());setTimeout(function(){b.block=0},b.update_rate)}},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin_src.js old mode 100755 new mode 100644 index 5cb92fa0f0..34b265553f --- a/library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin_src.js @@ -9,17 +9,19 @@ */ (function() { - tinymce.create('tinymce.plugins.WordCount', { + tinymce.create('tinymce.plugins.WordCount', { block : 0, id : null, countre : null, cleanre : null, init : function(ed, url) { - var t = this, last = 0; + var t = this, last = 0, VK = tinymce.VK; - t.countre = ed.getParam('wordcount_countregex', /\S\s+/g); - t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$¿'"_+=\\\/-]*/g); + t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == ’ + t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g); + t.update_rate = ed.getParam('wordcount_update_rate', 2000); + t.update_on_delete = ed.getParam('wordcount_update_on_delete', false); t.id = ed.id + '-word-count'; ed.onPostRender.add(function(ed, cm) { @@ -32,11 +34,12 @@ if (row) tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '0'); - } else + } else { tinymce.DOM.add(id, 'span', {}, '0'); + } }); - ed.onInit.add(function(ed) { + ed.onInit.add(function(ed) { ed.selection.onSetContent.add(function() { t._count(ed); }); @@ -48,19 +51,46 @@ t._count(ed); }); - ed.onKeyUp.add(function(ed, e) { - if (e.keyCode == last) - return; + function checkKeys(key) { + return key !== last && (key === VK.ENTER || last === VK.SPACEBAR || checkDelOrBksp(last)); + } - if (13 == e.keyCode || 8 == last || 46 == last) + function checkDelOrBksp(key) { + return key === VK.DELETE || key === VK.BACKSPACE; + } + + ed.onKeyUp.add(function(ed, e) { + if (checkKeys(e.keyCode) || t.update_on_delete && checkDelOrBksp(e.keyCode)) { t._count(ed); + } last = e.keyCode; }); }, + _getCount : function(ed) { + var tc = 0; + var tx = ed.getContent({ format: 'raw' }); + + if (tx) { + tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces + tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars + + // deal with html entities + tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' '); + tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation + + var wordArray = tx.match(this.countre); + if (wordArray) { + tc = wordArray.length; + } + } + + return tc; + }, + _count : function(ed) { - var t = this, tc = 0; + var t = this; // Keep multiple calls from happening at the same time if (t.block) @@ -69,21 +99,15 @@ t.block = 1; setTimeout(function() { - var tx = ed.getContent({format : 'raw'}); - - if (tx) { - tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars - tx = tx.replace(t.cleanre, ''); // remove numbers and punctuation - tx.replace(t.countre, function() {tc++;}); // count the words + if (!ed.destroyed) { + var tc = t._getCount(ed); + tinymce.DOM.setHTML(t.id, tc.toString()); + setTimeout(function() {t.block = 0;}, t.update_rate); } - - tinymce.DOM.setHTML(t.id, tc.toString()); - - setTimeout(function() {t.block = 0;}, 2000); }, 1); }, - getInfo: function() { + getInfo: function() { return { longname : 'Word Count plugin', author : 'Moxiecode Systems AB', @@ -91,8 +115,8 @@ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount', version : tinymce.majorVersion + "." + tinymce.minorVersion }; - } - }); + } + }); - tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount); + tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount); })(); diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/abbr.htm b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/abbr.htm old mode 100755 new mode 100644 index 3aeac0deba..30a894f7c3 --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/abbr.htm @@ -10,11 +10,12 @@ - + + @@ -23,7 +24,7 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
     
    +
    @@ -41,7 +42,7 @@ - + @@ -67,7 +68,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    :
    ::
    +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm old mode 100755 new mode 100644 index 31ee7b70f3..c109345928 --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm @@ -10,11 +10,12 @@ - + + @@ -23,7 +24,7 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
    :
    +
    @@ -41,7 +42,7 @@ - + @@ -67,7 +68,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    :
    ::
    +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm old mode 100755 new mode 100644 index 17054da3ed..e8d606a340 --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm @@ -9,12 +9,13 @@ - + + @@ -22,7 +23,7 @@
    {#xhtmlxtras_dlg.attribute_attrib_tab} -
    :
    +
    @@ -75,7 +76,7 @@
    {#xhtmlxtras_dlg.attribute_events_tab} -
    :
    +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm old mode 100755 new mode 100644 index d0a3e3a8e5..0ac6bdb667 --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm @@ -10,11 +10,12 @@ - + + @@ -23,7 +24,7 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
    :
    +
    @@ -67,7 +68,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    :
    +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/popup.css b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/popup.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm old mode 100755 new mode 100644 index 8b07fa8429..5f667510f5 --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm @@ -10,11 +10,12 @@ - + + @@ -23,14 +24,14 @@
    {#xhtmlxtras_dlg.fieldset_general_tab} -
    :
    +
    @@ -43,7 +44,7 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
    : - +
    - +
    +
    @@ -61,7 +62,7 @@ - + @@ -87,7 +88,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    :
    ::
    +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js old mode 100755 new mode 100644 index e5195265e0..9b98a5154b --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(b,c){b.addCommand("mceCite",function(){b.windowManager.open({file:c+"/cite.htm",width:350+parseInt(b.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:c})});b.addCommand("mceAcronym",function(){b.windowManager.open({file:c+"/acronym.htm",width:350+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAbbr",function(){b.windowManager.open({file:c+"/abbr.htm",width:350+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceDel",function(){b.windowManager.open({file:c+"/del.htm",width:340+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceIns",function(){b.windowManager.open({file:c+"/ins.htm",width:340+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAttributes",function(){b.windowManager.open({file:c+"/attributes.htm",width:380,height:370,inline:1},{plugin_url:c})});b.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});b.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});b.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});b.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});b.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});b.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});if(tinymce.isIE){function a(d,e){if(e.set){e.content=e.content.replace(/]+)>/gi,"");e.content=e.content.replace(/<\/abbr>/gi,"")}}b.onBeforeSetContent.add(a);b.onPostProcess.add(a)}b.onNodeChange.add(function(e,d,g,f){g=e.dom.getParent(g,"CITE,ACRONYM,ABBR,DEL,INS");d.setDisabled("cite",f);d.setDisabled("acronym",f);d.setDisabled("abbr",f);d.setDisabled("del",f);d.setDisabled("ins",f);d.setDisabled("attribs",g&&g.nodeName=="BODY");d.setActive("cite",0);d.setActive("acronym",0);d.setActive("abbr",0);d.setActive("del",0);d.setActive("ins",0);if(g){do{d.setDisabled(g.nodeName.toLowerCase(),0);d.setActive(g.nodeName.toLowerCase(),1)}while(g=g.parentNode)}});b.onPreInit.add(function(){b.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(a,b){a.addCommand("mceCite",function(){a.windowManager.open({file:b+"/cite.htm",width:350+parseInt(a.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAcronym",function(){a.windowManager.open({file:b+"/acronym.htm",width:350+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.acronym_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAbbr",function(){a.windowManager.open({file:b+"/abbr.htm",width:350+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.abbr_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceDel",function(){a.windowManager.open({file:b+"/del.htm",width:340+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.del_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceIns",function(){a.windowManager.open({file:b+"/ins.htm",width:340+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.ins_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAttributes",function(){a.windowManager.open({file:b+"/attributes.htm",width:380+parseInt(a.getLang("xhtmlxtras.attr_delta_width",0)),height:370+parseInt(a.getLang("xhtmlxtras.attr_delta_height",0)),inline:1},{plugin_url:b})});a.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});a.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});a.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});a.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});a.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});a.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});a.onNodeChange.add(function(d,c,f,e){f=d.dom.getParent(f,"CITE,ACRONYM,ABBR,DEL,INS");c.setDisabled("cite",e);c.setDisabled("acronym",e);c.setDisabled("abbr",e);c.setDisabled("del",e);c.setDisabled("ins",e);c.setDisabled("attribs",f&&f.nodeName=="BODY");c.setActive("cite",0);c.setActive("acronym",0);c.setActive("abbr",0);c.setActive("del",0);c.setActive("ins",0);if(f){do{c.setDisabled(f.nodeName.toLowerCase(),0);c.setActive(f.nodeName.toLowerCase(),1)}while(f=f.parentNode)}});a.onPreInit.add(function(){a.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js old mode 100755 new mode 100644 index 9b51b8368d..f24057211c --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js @@ -27,7 +27,7 @@ ed.windowManager.open({ file : url + '/acronym.htm', width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), - height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -38,7 +38,7 @@ ed.windowManager.open({ file : url + '/abbr.htm', width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), - height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), + height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -49,7 +49,7 @@ ed.windowManager.open({ file : url + '/del.htm', width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), - height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -60,7 +60,7 @@ ed.windowManager.open({ file : url + '/ins.htm', width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), - height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), + height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -70,8 +70,8 @@ ed.addCommand('mceAttributes', function() { ed.windowManager.open({ file : url + '/attributes.htm', - width : 380, - height : 370, + width : 380 + parseInt(ed.getLang('xhtmlxtras.attr_delta_width', 0)), + height : 370 + parseInt(ed.getLang('xhtmlxtras.attr_delta_height', 0)), inline : 1 }, { plugin_url : url @@ -86,18 +86,6 @@ ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'}); ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'}); - if (tinymce.isIE) { - function fix(ed, o) { - if (o.set) { - o.content = o.content.replace(/]+)>/gi, ''); - o.content = o.content.replace(/<\/abbr>/gi, ''); - } - }; - - ed.onBeforeSetContent.add(fix); - ed.onPostProcess.add(fix); - } - ed.onNodeChange.add(function(ed, cm, n, co) { n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS'); diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm old mode 100755 new mode 100644 index 6c5470cfcc..d001ac7c4d --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm @@ -10,11 +10,12 @@ - + + @@ -23,19 +24,19 @@
    {#xhtmlxtras_dlg.fieldset_general_tab} -
    :
    +
    - + @@ -43,9 +44,9 @@
    {#xhtmlxtras_dlg.fieldset_attrib_tab} -
    : - +
    - +
    :
    +
    - + @@ -61,7 +62,7 @@ - + @@ -87,7 +88,7 @@
    {#xhtmlxtras_dlg.fieldset_events_tab} -
    ::
    ::
    +
    diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js old mode 100755 new mode 100644 index d62a219e6b..9c99995adb --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js @@ -53,7 +53,6 @@ function insertAction() { var inst = tinyMCEPopup.editor; var elm = inst.selection.getNode(); - tinyMCEPopup.execCommand("mceBeginUndoLevel"); setAllAttribs(elm); tinyMCEPopup.execCommand("mceEndUndoLevel"); tinyMCEPopup.close(); @@ -72,21 +71,7 @@ function setAttrib(elm, attrib, value) { value = valueElm.value; } - if (value != "") { - dom.setAttrib(elm, attrib.toLowerCase(), value); - - if (attrib == "style") - attrib = "style.cssText"; - - if (attrib.substring(0, 2) == 'on') - value = 'return true;' + value; - - if (attrib == "class") - attrib = "className"; - - elm[attrib]=value; - } else - elm.removeAttribute(attrib); + dom.setAttrib(elm, attrib.toLowerCase(), value); } function setAllAttribs(elm) { diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/cite.js b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/cite.js old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js old mode 100755 new mode 100644 index 9e5d8c5717..1f957dc786 --- a/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js @@ -21,17 +21,17 @@ function setElementAttribs(elm) { setAllCommonAttribs(elm); setAttrib(elm, 'datetime'); setAttrib(elm, 'cite'); + elm.removeAttribute('data-mce-new'); } function insertDel() { var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); - tinyMCEPopup.execCommand('mceBeginUndoLevel'); if (elm == null) { var s = SXE.inst.selection.getContent(); if(s.length > 0) { insertInlineElement('del'); - var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';}); + var elementArray = SXE.inst.dom.select('del[data-mce-new]'); for (var i=0; i 0) { @@ -165,11 +164,11 @@ SXE.insertElement = function(element_name) { for (var i=0; i 0) { - insertInlineElement('INS'); - var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';}); + insertInlineElement('ins'); + var elementArray = SXE.inst.dom.select('ins[data-mce-new]'); for (var i=0; i
    :
    +
    - + - - + +
    {#advanced_dlg.anchor_title}{#advanced_dlg.anchor_title}
    {#advanced_dlg.anchor_name}:
    diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm b/library/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm old mode 100755 new mode 100644 index 3991b8141b..d4b6bdfb7b --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm @@ -5,48 +5,51 @@ - - - - - - -
    {#advanced_dlg.charmap_title}
    + + + + + + + - - - - - + + + + + + + + + +
    - - - - - - - - -
     
     
    -
    - - - - - - - - - - - - - - - - -
    HTML-Code
     
     
    NUM-Code
     
    -
    + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + +
     
     
     
    +
    {#advanced_dlg.charmap_usage}
    - diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm b/library/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm old mode 100755 new mode 100644 index 096e7550c3..ad1bb0f6cc --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm @@ -6,13 +6,14 @@ - + + @@ -34,7 +35,7 @@
    - {#advanced_dlg.colorpicker_palette_title} + {#advanced_dlg.colorpicker_palette_title}
    @@ -44,9 +45,9 @@
    -
    - {#advanced_dlg.colorpicker_named_title} -
    +
    + {#advanced_dlg.colorpicker_named_title} +
    @@ -65,7 +66,7 @@
    - +
    diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js b/library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js old mode 100755 new mode 100644 index dc61977461..a887018125 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js @@ -1 +1 @@ -(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l)}if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute("themes/advanced/skins/"+j.settings.skin+"/content.css"))}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(p[0]==o){i.formatter.remove(o)}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){i.execCommand("FontName",false,l);k.select(function(m){return l==m});return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(o){return i==o});return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=d.stdMode?u.getElementsByTagName("tr"):u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_tbl");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,l){var j=this.editor,k=this.settings,m=d.get(j.id+"_tbl"),n=d.get(j.id+"_ifr");i=Math.max(k.theme_advanced_resizing_min_width||100,i);l=Math.max(k.theme_advanced_resizing_min_height||100,l);i=Math.min(k.theme_advanced_resizing_max_width||65535,i);l=Math.min(k.theme_advanced_resizing_max_height||65535,l);d.setStyle(m,"height","");d.setStyle(n,"height",l);if(k.theme_advanced_resize_horizontal){d.setStyle(m,"width","");d.setStyle(n,"width",i);if(i"))}q.push(d.createHTML("a",{href:"#",accesskey:"q",title:r.getLang("advanced.toolbar_focus")},""));for(p=1;(y=A["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(A["theme_advanced_buttons"+p+"_add"]){y+=","+A["theme_advanced_buttons"+p+"_add"]}if(A["theme_advanced_buttons"+p+"_add_before"]){y=A["theme_advanced_buttons"+p+"_add_before"]+","+y}z._addControls(y,m);q.push(m.renderHTML());k.deltaHeight-=A.theme_advanced_row_height}q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},""));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row"},w.theme_advanced_path?p.translate("advanced.path")+": ":" ");d.add(k,"a",{href:"#",accesskey:"x"});if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);if(w.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+p.id+"_size",{cw:n,ch:E})}}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_nodeChanged:function(r,z,l,x,j){var C=this,i,y=0,B,u,D=C.settings,A,k,w,m,q;e.each(C.stateControls,function(n){z.setActive(n,r.queryCommandState(C.controls[n][1]))});function o(p){var s,n=j.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},""),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j"));i.setHTML(l,q.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{}," ")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true)}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(i.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(i.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js b/library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js old mode 100755 new mode 100644 index 279ca359ce..d94c8e4992 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js @@ -11,6 +11,85 @@ (function(tinymce) { var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode; + // Generates a preview for a format + function getPreviewCss(ed, fmt) { + var previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName; + + previewStyles = ed.settings.preview_styles; + + // No preview forced + if (previewStyles === false) + return ''; + + // Default preview + if (!previewStyles) + previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color'; + + // Removes any variables since these can't be previewed + function removeVars(val) { + return val.replace(/%(\w+)/g, ''); + }; + + // Create block/inline element to use for preview + name = fmt.block || fmt.inline || 'span'; + previewElm = dom.create(name); + + // Add format styles to preview element + each(fmt.styles, function(value, name) { + value = removeVars(value); + + if (value) + dom.setStyle(previewElm, name, value); + }); + + // Add attributes to preview element + each(fmt.attributes, function(value, name) { + value = removeVars(value); + + if (value) + dom.setAttrib(previewElm, name, value); + }); + + // Add classes to preview element + each(fmt.classes, function(value) { + value = removeVars(value); + + if (!dom.hasClass(previewElm, value)) + dom.addClass(previewElm, value); + }); + + // Add the previewElm outside the visual area + dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF}); + ed.getBody().appendChild(previewElm); + + // Get parent container font size so we can compute px values out of em/% for older IE:s + parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true); + parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0; + + each(previewStyles.split(' '), function(name) { + var value = dom.getStyle(previewElm, name, true); + + // Old IE won't calculate the font size so we need to do that manually + if (name == 'font-size') { + if (/em|%$/.test(value)) { + if (parentFontSize === 0) { + return; + } + + // Convert font size from em/% to px + value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1); + value = (value * parentFontSize) + 'px'; + } + } + + previewCss += name + ':' + value + ';'; + }); + + dom.remove(previewElm); + + return previewCss; + }; + // Tell it to load theme specific language pack(s) tinymce.ThemeManager.requireLangPack('advanced'); @@ -66,6 +145,9 @@ t.url = url; t.onResolveName = new tinymce.util.Dispatcher(this); + ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast(); + ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin; + // Default settings t.settings = s = extend({ theme_advanced_path : true, @@ -81,6 +163,8 @@ theme_advanced_resize_horizontal : 1, theme_advanced_resizing_use_cookie : 1, theme_advanced_font_sizes : "1,2,3,4,5,6,7", + theme_advanced_font_selector : "span", + theme_advanced_show_current_color: 0, readonly : ed.settings.readonly }, ed.settings); @@ -119,13 +203,19 @@ if (s.theme_advanced_statusbar_location == 'none') s.theme_advanced_statusbar_location = 0; + if (ed.settings.content_css !== false) + ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css")); + // Init editor ed.onInit.add(function() { - if (!ed.settings.readonly) + if (!ed.settings.readonly) { ed.onNodeChange.add(t._nodeChanged, t); - - if (ed.settings.content_css !== false) - ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/" + ed.settings.skin + "/content.css")); + ed.onKeyUp.add(t._updateUndoStatus, t); + ed.onMouseUp.add(t._updateUndoStatus, t); + ed.dom.bind(ed.dom.getRoot(), 'dragend', function() { + t._updateUndoStatus(ed); + }); + } }); ed.onSetProgressState.add(function(ed, b, ti) { @@ -153,6 +243,15 @@ DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css"); }, + _isHighContrast : function() { + var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'}); + + actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, ''); + DOM.remove(div); + + return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56'; + }, + createControl : function(n, cf) { var cd, c; @@ -199,15 +298,21 @@ if (ctrl.getLength() == 0) { each(ed.dom.getClasses(), function(o, idx) { - var name = 'style_' + idx; + var name = 'style_' + idx, fmt; - ed.formatter.register(name, { + fmt = { inline : 'span', attributes : {'class' : o['class']}, selector : '*' - }); + }; - ctrl.add(o['class'], name); + ed.formatter.register(name, fmt); + + ctrl.add(o['class'], name, { + style: function() { + return getPreviewCss(ed, fmt); + } + }); }); } }, @@ -219,7 +324,7 @@ ctrl = ctrlMan.createListBox('styleselect', { title : 'advanced.style_select', onselect : function(name) { - var matches, formatNames = []; + var matches, formatNames = [], removedFormat; each(ctrl.items, function(item) { formatNames.push(item.value); @@ -228,11 +333,18 @@ ed.focus(); ed.undoManager.add(); - // Toggle off the current format + // Toggle off the current format(s) matches = ed.formatter.matchAll(formatNames); - if (matches[0] == name) - ed.formatter.remove(name); - else + tinymce.each(matches, function(match) { + if (!name || match == name) { + if (match) + ed.formatter.remove(match); + + removedFormat = true; + } + }); + + if (!removedFormat) ed.formatter.apply(name); ed.undoManager.add(); @@ -243,7 +355,7 @@ }); // Handle specified format - ed.onInit.add(function() { + ed.onPreInit.add(function() { var counter = 0, formats = ed.getParam('style_formats'); if (formats) { @@ -255,24 +367,32 @@ if (keys > 1) { name = fmt.name = fmt.name || 'style_' + (counter++); ed.formatter.register(name, fmt); - ctrl.add(fmt.title, name); + ctrl.add(fmt.title, name, { + style: function() { + return getPreviewCss(ed, fmt); + } + }); } else ctrl.add(fmt.title); }); } else { each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) { - var name; + var name, fmt; if (val) { name = 'style_' + (counter++); - - ed.formatter.register(name, { + fmt = { inline : 'span', classes : val, selector : '*' - }); + }; - ctrl.add(t.editor.translate(key), name); + ed.formatter.register(name, fmt); + ctrl.add(t.editor.translate(key), name, { + style: function() { + return getPreviewCss(ed, fmt); + } + }); } }); } @@ -300,6 +420,13 @@ c = ed.controlManager.createListBox('fontselect', { title : 'advanced.fontdefault', onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + ed.execCommand('FontName', false, cur.value); + return; + } + ed.execCommand('FontName', false, v); // Fake selection, execCommand will fire a nodeChange and update the selection @@ -307,6 +434,10 @@ return v == sv; }); + if (cur && cur.value == v) { + c.select(null); + } + return false; // No auto select } }); @@ -324,6 +455,22 @@ var t = this, ed = t.editor, c, i = 0, cl = []; c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + cur = cur.value; + + if (cur['class']) { + ed.formatter.toggle('fontsize_class', {value : cur['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else { + ed.execCommand('FontSize', false, cur.fontSize); + } + + return; + } + if (v['class']) { ed.focus(); ed.undoManager.add(); @@ -338,6 +485,10 @@ return v == sv; }); + if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) { + c.select(null); + } + return false; // No auto select }}); @@ -374,10 +525,16 @@ samp : 'advanced.samp' }, t = this; - c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', cmd : 'FormatBlock'}); + c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) { + t.editor.execCommand('FormatBlock', false, v); + return false; + }}); + if (c) { each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) { - c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v}); + c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() { + return getPreviewCss(t.editor, {block: v}); + }}); }); } @@ -445,12 +602,19 @@ renderUI : function(o) { var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl; - n = p = DOM.create('span', {id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + if (ed.settings) { + ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut'); + } + + // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for. + // Maybe actually inherit it from the original textara? + n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')}); + DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label); if (!DOM.boxModel) n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'}); - n = sc = DOM.add(n, 'table', {id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); + n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0}); n = tb = DOM.add(n, 'tbody'); switch ((s.theme_advanced_layout_manager || '').toLowerCase()) { @@ -469,7 +633,7 @@ n = o.targetNode; // Add classes to first and last TRs - nl = DOM.stdMode ? sc.getElementsByTagName('tr') : sc.rows; // Quick fix for IE 8 + nl = sc.rows; DOM.addClass(nl[0], 'mceFirst'); DOM.addClass(nl[nl.length - 1], 'mceLast'); @@ -489,8 +653,7 @@ if (e.nodeName == 'A') { t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1')); - - return Event.cancel(e); + return false; } }); /* @@ -525,6 +688,28 @@ t.deltaHeight = o.deltaHeight; o.targetNode = null; + ed.onKeyDown.add(function(ed, evt) { + var DOM_VK_F10 = 121, DOM_VK_F11 = 122; + + if (evt.altKey) { + if (evt.keyCode === DOM_VK_F10) { + // Make sure focus is given to toolbar in Safari. + // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame + if (tinymce.isWebKit) { + window.focus(); + } + t.toolbarGroup.focus(); + return Event.cancel(evt); + } else if (evt.keyCode === DOM_VK_F11) { + DOM.get(ed.id + '_path_row').focus(); + return Event.cancel(evt); + } + } + }); + + // alt+0 is the UK recommended shortcut for accessing the list of access controls. + ed.addShortcut('alt+0', '', 'mceShortcuts', t); + return { iframeContainer : ic, editorContainer : ed.id + '_parent', @@ -543,12 +728,12 @@ }, resizeBy : function(dw, dh) { - var e = DOM.get(this.editor.id + '_tbl'); + var e = DOM.get(this.editor.id + '_ifr'); this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); }, - resizeTo : function(w, h) { + resizeTo : function(w, h, store) { var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'); // Boundery fix box @@ -566,8 +751,18 @@ DOM.setStyle(ifr, 'width', w); // Make sure that the size is never smaller than the over all ui - if (w < e.clientWidth) + if (w < e.clientWidth) { + w = e.clientWidth; DOM.setStyle(ifr, 'width', e.clientWidth); + } + } + + // Store away the size + if (store && s.theme_advanced_resizing_use_cookie) { + Cookie.setHash("TinyMCE_" + ed.id + "_size", { + cw : w, + ch : h + }); } }, @@ -662,7 +857,7 @@ each(explode(s.theme_advanced_containers || ''), function(c, i) { var v = s['theme_advanced_container_' + c] || ''; - switch (v.toLowerCase()) { + switch (c.toLowerCase()) { case 'mceeditor': n = DOM.add(tb, 'tr'); n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'}); @@ -730,17 +925,19 @@ }, _addToolbars : function(c, o) { - var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a; + var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup; + + toolbarGroup = cf.createToolbarGroup('toolbargroup', { + 'name': ed.getLang('advanced.toolbar'), + 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar') + }); + + t.toolbarGroup = toolbarGroup; a = s.theme_advanced_toolbar_align.toLowerCase(); a = 'mce' + t._ufirst(a); - n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar ' + a}); - - if (!ed.getParam('accessibility_focus')) - h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '')); - - h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '')); + n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"presentation"}); // Create toolbar and add the controls for (i=1; (v = s['theme_advanced_buttons' + i]); i++) { @@ -753,13 +950,11 @@ v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v; t._addControls(v, tb); - - //n.appendChild(n = tb.render()); - h.push(tb.renderHTML()); + toolbarGroup.add(tb); o.deltaHeight -= s.theme_advanced_row_height; } - + h.push(toolbarGroup.renderHTML()); h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '')); DOM.setHTML(n, h.join('')); }, @@ -768,12 +963,18 @@ var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td; n = DOM.add(tb, 'tr'); - n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); - n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : ' '); - DOM.add(n, 'a', {href : '#', accesskey : 'x'}); + n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); + n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'}); + if (s.theme_advanced_path) { + DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path')); + DOM.add(n, 'span', {}, ': '); + } else { + DOM.add(n, 'span', {}, ' '); + } + if (s.theme_advanced_resizing) { - DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'}); + DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"}); if (s.theme_advanced_resizing_use_cookie) { ed.onPostRender.add(function() { @@ -787,12 +988,18 @@ } ed.onPostRender.add(function() { + Event.add(ed.id + '_resize', 'click', function(e) { + e.preventDefault(); + }); + Event.add(ed.id + '_resize', 'mousedown', function(e) { var mouseMoveHandler1, mouseMoveHandler2, mouseUpHandler1, mouseUpHandler2, startX, startY, startWidth, startHeight, width, height, ifrElm; function resizeOnMove(e) { + e.preventDefault(); + width = startWidth + (e.screenX - startX); height = startHeight + (e.screenY - startY); @@ -806,13 +1013,9 @@ Event.remove(DOM.doc, 'mouseup', mouseUpHandler1); Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2); - // Store away the size - if (s.theme_advanced_resizing_use_cookie) { - Cookie.setHash("TinyMCE_" + ed.id + "_size", { - cw : width, - ch : height - }); - } + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + t.resizeTo(width, height, true); }; e.preventDefault(); @@ -837,8 +1040,15 @@ n = tb = null; }, + _updateUndoStatus : function(ed) { + var cm = ed.controlManager, um = ed.undoManager; + + cm.setDisabled('undo', !um.hasUndo() && !um.typing); + cm.setDisabled('redo', !um.hasRedo()); + }, + _nodeChanged : function(ed, cm, n, co, ob) { - var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, formatNames, matches; + var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches; tinymce.each(t.stateControls, function(c) { cm.setActive(c, ed.queryCommandState(t.controls[c][1])); @@ -860,8 +1070,7 @@ }; cm.setActive('visualaid', ed.hasVisual); - cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing); - cm.setDisabled('redo', !ed.undoManager.hasRedo()); + t._updateUndoStatus(ed); cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); p = getParent('A'); @@ -878,12 +1087,12 @@ } if (c = cm.get('anchor')) { - c.setActive(!!p && p.name); + c.setActive(!co && !!p && p.name); } p = getParent('IMG'); if (c = cm.get('image')) - c.setActive(!!p && n.className.indexOf('mceItem') == -1); + c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1); if (c = cm.get('styleselect')) { t._importClasses(); @@ -895,6 +1104,11 @@ matches = ed.formatter.matchAll(formatNames); c.select(matches[0]); + tinymce.each(matches, function(match, index) { + if (index > 0) { + c.mark(match); + } + }); } if (c = cm.get('formatselect')) { @@ -909,12 +1123,20 @@ if (n.nodeName === 'SPAN') { if (!cl && n.className) cl = n.className; + } + if (ed.dom.is(n, s.theme_advanced_font_selector)) { if (!fz && n.style.fontSize) fz = n.style.fontSize; if (!fn && n.style.fontFamily) fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); + + if (!fc && n.style.color) + fc = n.style.color; + + if (!bc && n.style.backgroundColor) + bc = n.style.backgroundColor; } return false; @@ -940,24 +1162,52 @@ return true; }); } + + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } + } + updateColor('forecolor', fc); + updateColor('backcolor', bc); + } + + if (s.theme_advanced_show_current_color) { + function updateColor(controlId, color) { + if (c = cm.get(controlId)) { + if (!color) + color = c.settings.default_color; + if (color !== c.value) { + c.displayColor(color); + } + } + }; + + updateColor('forecolor', fc); + updateColor('backcolor', bc); + } if (s.theme_advanced_path && s.theme_advanced_statusbar_location) { p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); + + if (t.statusKeyboardNavigation) { + t.statusKeyboardNavigation.destroy(); + t.statusKeyboardNavigation = null; + } + DOM.setHTML(p, ''); getParent(function(n) { var na = n.nodeName.toLowerCase(), u, pi, ti = ''; - /*if (n.getAttribute('_mce_bogus')) + // Ignore non element and bogus/hidden elements + if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')) return; -*/ - // Ignore non element and hidden elements - if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))) - return; - - // Fake name - if (v = DOM.getAttrib(n, 'mce_name')) - na = v; // Handle prefix if (tinymce.isIE && n.scopeName !== 'HTML') @@ -1033,14 +1283,25 @@ na = na.name; //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');"; - pi = DOM.create('a', {'href' : "javascript:;", onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); + pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na); if (p.hasChildNodes()) { - p.insertBefore(DOM.doc.createTextNode(' \u00bb '), p.firstChild); + p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild); p.insertBefore(pi, p.firstChild); } else p.appendChild(pi); }, ed.getBody()); + + if (DOM.select('a', p).length > 0) { + t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({ + root: ed.id + "_path_row", + items: DOM.select('a', p), + excludeFromTabOrder: true, + onCancel: function() { + ed.focus(); + } + }, DOM); + } } }, @@ -1054,7 +1315,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/anchor.htm', + url : this.url + '/anchor.htm', width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)), height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)), inline : true @@ -1067,9 +1328,9 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/charmap.htm', + url : this.url + '/charmap.htm', width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), - height : 250 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), + height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), inline : true }, { theme_url : this.url @@ -1080,7 +1341,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/about.htm', + url : this.url + '/about.htm', width : 480, height : 380, inline : true @@ -1089,13 +1350,25 @@ }); }, + _mceShortcuts : function() { + var ed = this.editor; + ed.windowManager.open({ + url: this.url + '/shortcuts.htm', + width: 480, + height: 380, + inline: true + }, { + theme_url: this.url + }); + }, + _mceColorPicker : function(u, v) { var ed = this.editor; v = v || {}; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/color_picker.htm', + url : this.url + '/color_picker.htm', width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)), height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)), close_previous : false, @@ -1111,7 +1384,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/source_editor.htm', + url : this.url + '/source_editor.htm', width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)), height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)), inline : true, @@ -1126,11 +1399,11 @@ var ed = this.editor; // Internal image object like a flash placeholder - if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) + if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1) return; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/image.htm', + url : this.url + '/image.htm', width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)), height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)), inline : true @@ -1143,7 +1416,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/link.htm', + url : this.url + '/link.htm', width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)), height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)), inline : true @@ -1191,4 +1464,4 @@ }); tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme); -}(tinymce)); \ No newline at end of file +}(tinymce)); diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/image.htm b/library/tinymce/jscripts/tiny_mce/themes/advanced/image.htm old mode 100755 new mode 100644 index f30d670641..b8ba729f6f --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/image.htm +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/image.htm @@ -17,57 +17,57 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
     
    - x -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + x +
    diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/img/colorpicker.jpg b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/colorpicker.jpg old mode 100755 new mode 100644 index b4c542d107b25f68a9d4f9d7a109d0565d1f1437..b1a377aba7784d3a0a0fabb4d22b8114cde25ace GIT binary patch delta 2365 zcmYjO3pmqzAD>I9aMlowjp#C>)aEu~#cYyDxlQJt%Q?biYTo#tN~-`!P7ZFtr#nbAadE%ze9HDSzJMmFK4-1(Z9?%`+We=EjEv|W8 z!>fdSp#4VT&;i*tOEuLrFX!SvV5H)yQ$M{NTKU}Rsefh3dVL?o0U74_i)ZpjwWnX6 z6^GWUCyvDw8vI51WW6>*;PC!a;G{L3-)U)nS4+Mz!|^Nm96;x!$DzG3Jg0jb`V-hT z!RX58Qg_~Hsn)#>vYGK5Cq(JfK-%aRXp7MeN&Rl53iw{+L-+)W-WD?_Gv)rlC}&nC zch!w<-^aJ@-bXR16@ZXoZ~3np zHkJWU^yj*MC@S4CIAgtc)vERJ4#=w=c+x!dem~k9`*nt*JjoffY`OboyxPRP%Mp{o z3Is?qbu6n_(|p={5t(PxygI_$Ki%gJ3y86r22ZDXMbgbic+$jl@tct8aDGX^P8!5py0G(Y*e#hDL&adl}yF;&k=#MEQU?%wx7lj zg^D@iej=|$udQ;j$Y1u^zY&>rQP;i^ny}sb(MkyS^{Avxui{9St*d5QRuoe&vw$RE zP`P<}Ncy#QG=nPKM&5dVQ)wId<$bVOT??<&g0+x8xGtRC`12NY#>OFV_7*T09&zsL z$6JHpw~f9AFw<)B2$mIpy3fZdjzLS$Uyis3_x*H`v6FzN8P#9b2*N+pXh^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(c= z{?V^}q$&*ST0{H+~kYM|3uYAs#ozCy(?T>GWX{31NhEwAXaj z$-4<~)zvKkig3>%>7H#88haoT&KLQ(p^}5wZDdLx6KuYt)#=5@obg1ET z!{g_qB0WaNtYWyPG+?L#;E<_|jLW|K#~bMh0c5F+bE?jc+QiEu*c*>0hl)mt&v;q9 zPKAu!+3dJ`Y)zlylp^0O;m9NO(KQNpN*rDyx3ok0O5&`hV>Gm_4_)o#6CnbVu%_YL zkA_EL0QME}wev(ESKLmxMjDBc)Yb-aJM+rU(|mZh4tM?0}d<^7HhJa22mwL*EptRLFpXUAn5J_@V diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/img/flash.gif b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/flash.gif new file mode 100644 index 0000000000000000000000000000000000000000..dec3f7c7028df98657860529461af29b8793601c GIT binary patch literal 239 zcmVM~p;I&fgwbZVtlRJPxC7uw?yFxEX;uVr4IeWCJ^(5m4hjYVM>G^+2V)FnXE$mS p86yHh03AmHCKD}bWutOkFce4&0zF5CG_Myp4hRT+ig>^g06S0cRV@Gj literal 0 HcmV?d00001 diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/img/icons.gif b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/icons.gif old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/img/iframe.gif b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/iframe.gif new file mode 100644 index 0000000000000000000000000000000000000000..410c7ad084db698e9f35e3230233aa4040682566 GIT binary patch literal 600 zcmZ?wbhEHb6krfwcoxm@|NsB$<##6SeDUYszh8g<{{H*-%a7k_-3KZc-T3+YPwBiX zzyAIE^Y`z!U%$Wp{QdX;|FQ*Fw;jIy{pasbUw?o3{yVB>Q_sRgx-G9iegFLZcfrha#d9w;%sU=Zx~6K$tw~$%z4`#O^Y@3Z zKV#~)MpSKh@#b63l#}6=>yq2|{`&JLqwny)|NnC)o%r$l&-Y)yKYjo8?#quSuRaGB zt_&<%`RV)bl#YEr{`~p)?RU|v^Y1_Z`u*?Ux8J`*N>>+5JlMAOZr+qr@y$D{mfVhO z+zt#7208-8pDc_F4ABfaAUi>E!oa?@A-bu#r8Qd6oKeb*Lx9UTz)0QBL@+vxY38ii zvqGa87c5+~h&?)zVa3W-D;=U$88}^qMBJ^ERU|z17!;#97+4%Rd1XcXJq#>t8KR;E z7zr5i6BgH5y=gAD)sAQlGB zh8au?j!n~E(Pks?@!j1fR&j*RWY8GF(-=x H6d0@lT&58X literal 0 HcmV?d00001 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/pagebreak.gif old mode 100755 new mode 100644 similarity index 100% rename from library/tinymce/jscripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif rename to library/tinymce/jscripts/tiny_mce/themes/advanced/img/pagebreak.gif diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/img/quicktime.gif b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/quicktime.gif new file mode 100644 index 0000000000000000000000000000000000000000..8f10e7aa6b6ab40ee69a1a41a961c092168d6fda GIT binary patch literal 301 zcmV+|0n+|QNk%w1VGsZi0Q4UK+~)L6v+~s9^fsC5ZpZP=*zu3F=Jxpf8k_5u%JNv6 z=md-84VLU4w)kSE=yI&-yw>b=v+SqE?+kq47pC+YrR?bJ^yu>Zyvpn;hTp*6^mM!O zu+8!}sO$`q%8%`=C5EEn#1d#z95FHtK5(^#(cp^e+Y!d=4FCrFbY9A3U z4-O0-4kHJPJ2(jk13n5879s!!3Q`V>8VwW`9my3H#|R8ZD+fdx0E-+693cQZ;!k;* literal 0 HcmV?d00001 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/media/img/realmedia.gif b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/realmedia.gif old mode 100755 new mode 100644 similarity index 100% rename from library/tinymce/jscripts/tiny_mce/plugins/media/img/realmedia.gif rename to library/tinymce/jscripts/tiny_mce/themes/advanced/img/realmedia.gif diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/img/shockwave.gif b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/shockwave.gif new file mode 100644 index 0000000000000000000000000000000000000000..9314d044709c9845876e08003cf94526fd69177f GIT binary patch literal 384 zcmZ?wbhEHb6lD-#_^Qe9?Af#b->&}n`s(k;lb>H+`#+Q6|3c{>OLTv23;utm>DSfy zuOD3adm!iUuGar)4FAhzel5=UwZ7*6(K(+k@BP_g{o}}@k7u_2k7W2iGwlom!+#Z( z|Hj5w_4MwTo8QaHxm#EFYX1DUOO|}vvgQBb!_ST${rmj+`+Fep|C$j4HGtwz7FGrZ zO$Hs1VIV&_u+2R%#bJV$RKJIcL*N7vss0Y-EsB{gGlSJaTr>sRLKbLj5HMTpyK;)l zJcfpaMYltBZdEK6Kht6+BPy*VtthFMtIoqFC=#Tu$e^eaDXCC7U0vOYOJjNk(;P!VagC#fQ*?7otVO)-#9rK#nB%ry4`E_DHQ Wm01j~^6E13^D1O7+^=wCum%9s<%z=p literal 0 HcmV?d00001 diff --git a/library/tinymce/jscripts/tiny_mce/plugins/media/img/trans.gif b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/trans.gif old mode 100755 new mode 100644 similarity index 100% rename from library/tinymce/jscripts/tiny_mce/plugins/media/img/trans.gif rename to library/tinymce/jscripts/tiny_mce/themes/advanced/img/trans.gif diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/img/video.gif b/library/tinymce/jscripts/tiny_mce/themes/advanced/img/video.gif new file mode 100644 index 0000000000000000000000000000000000000000..3570104077a3b3585f11403c8d4c3fc9351f35d2 GIT binary patch literal 597 zcmZ?wbhEHb6krfwc$UTx9v<%P?Ok48Ze?YanwpxCkzrwBk(ZYzB_&l;Qw!gmM(Ep^QBwbzIoSdAh>*2n> zz9l6k0Xw#(?);y5^ls9w|LObxXI*si^YfcEYu3*P8J(S-PEJlaNB-yTd}C^Ax@_69 zzP`Ryt5)S5`=P3;TDk9SbaeFk_3NiTjGA~aFd-pf@}tlxQ>GLb7jM|Gp`oFHlaq7F zk|nvhxjsHV=g+oST3Rl6T(N1>rn0iK*Ed>3MMVn>3vF#}**q!otE>Sy|^jDoRUBoBANRc=wyaJged$+}u3x zK}ld>puWET{||NozXdO-0f3nK$V8iNkVNKl+Guy1NeYie$3 zZB}=&Zex!RYq8YfVwgNdMpdFkN|rU!Fha}0m66q>CDxczOhH^pM9qvxw1p`;Rftzu zQJ&9}g>iErlc2ORw;aC_=l*6UJ=st%r*ISVV2jgDT<)w>rXHGL<21Kdo z#'; document.getElementById('iframecontainer').innerHTML = html; document.getElementById('help_tab').style.display = 'block'; + document.getElementById('help_tab').setAttribute("aria-hidden", "false"); } } diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js old mode 100755 new mode 100644 index 7fe7810558..2940db3591 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js @@ -19,16 +19,23 @@ var AnchorDialog = { update : function() { var ed = this.editor, elm, name = document.forms[0].anchorName.value; + if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) { + tinyMCEPopup.alert('advanced_dlg.anchor_invalid'); + return; + } + tinyMCEPopup.restoreSelection(); if (this.action != 'update') ed.selection.collapse(1); elm = ed.dom.getParent(ed.selection.getNode(), 'A'); - if (elm) + if (elm) { + elm.setAttribute('name', name); elm.name = name; - else - ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '')); + } else + // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it + ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, '\uFEFF')); tinyMCEPopup.close(); } diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js old mode 100755 new mode 100644 index 8c5aea1721..bb1869558c --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js @@ -173,7 +173,7 @@ var charmap = [ ['ý', 'ý', true, 'y - acute'], ['þ', 'þ', true, 'thorn'], ['ÿ', 'ÿ', true, 'y - diaeresis'], - ['Α', 'Α', true, 'Alpha'], + ['Α', 'Α', true, 'Alpha'], ['Β', 'Β', true, 'Beta'], ['Γ', 'Γ', true, 'Gamma'], ['Δ', 'Δ', true, 'Delta'], @@ -258,8 +258,8 @@ var charmap = [ ['⌋', '⌋', false,'right floor'], ['⟨', '〈', false,'left-pointing angle bracket'], ['⟩', '〉', false,'right-pointing angle bracket'], - ['◊', '◊', true,'lozenge'], - ['♠', '♠', false,'black spade suit'], + ['◊', '◊', true, 'lozenge'], + ['♠', '♠', true, 'black spade suit'], ['♣', '♣', true, 'black club suit'], ['♥', '♥', true, 'black heart suit'], ['♦', '♦', true, 'black diamond suit'], @@ -275,19 +275,46 @@ var charmap = [ tinyMCEPopup.onInit.add(function() { tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML()); + addKeyboardNavigation(); }); +function addKeyboardNavigation(){ + var tableElm, cells, settings; + + cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup"); + + settings ={ + root: "charmapgroup", + items: cells + }; + cells[0].tabindex=0; + tinyMCEPopup.dom.addClass(cells[0], "mceFocus"); + if (tinymce.isGecko) { + cells[0].focus(); + } else { + setTimeout(function(){ + cells[0].focus(); + }, 100); + } + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom); +} + function renderCharMapHTML() { var charsPerRow = 20, tdWidth=20, tdHeight=20, i; - var html = ''; + var html = '
    '+ + '
    '; var cols=-1; for (i=0; i' - + '' + + '' + charmap[i][1] + ''; if ((cols+1) % charsPerRow == 0) @@ -301,7 +328,8 @@ function renderCharMapHTML() { html += ''; } - html += '
     
    '; + html += '
    '; + html = html.replace(/
    ' - + ''; - - for (i=0; i' - + '' - + ''; - if ((i+1) % 18 == 0) - h += ''; - } - - h += '
    '; - - el.innerHTML = h; - el.className = 'generated'; -} - -function generateNamedColors() { - var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; - - if (el.className == 'generated') - return; - - for (n in named) { - v = named[n]; - h += '' - } - - el.innerHTML = h; - el.className = 'generated'; -} - -function dechex(n) { - return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); -} - -function computeColor(e) { - var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB; - - x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0); - y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0); - - partWidth = document.getElementById('colors').width / 6; - partDetail = detail / 2; - imHeight = document.getElementById('colors').height; - - r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; - g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); - b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); - - coef = (imHeight - y) / imHeight; - r = 128 + (r - 128) * coef; - g = 128 + (g - 128) * coef; - b = 128 + (b - 128) * coef; - - changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); - updateLight(r, g, b); -} - -function updateLight(r, g, b) { - var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; - - for (i=0; i=0) && (i 1 ? value : '0' + value; // Padd with leading zero + }; + + color = tinymce.trim(color); + color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#' + color = namedLookup[color] || color; + + matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color); + + if (matches) { + red = toInt(matches[1]); + green = toInt(matches[2]); + blue = toInt(matches[3]); + } else { + matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color); + + if (matches) { + red = toInt(matches[1], 16); + green = toInt(matches[2], 16); + blue = toInt(matches[3], 16); + } else { + matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color); + + if (matches) { + red = toInt(matches[1] + matches[1], 16); + green = toInt(matches[2] + matches[2], 16); + blue = toInt(matches[3] + matches[3], 16); + } else { + return ''; + } + } + } + + return '#' + hex(red) + hex(green) + hex(blue); +} + +function insertAction() { + var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func'); + + var hexColor = toHexColor(color); + + if (hexColor === '') { + var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value'); + tinyMCEPopup.alert(text + ': ' + color); + } + else { + tinyMCEPopup.restoreSelection(); + + if (f) + f(hexColor); + + tinyMCEPopup.close(); + } +} + +function showColor(color, name) { + if (name) + document.getElementById("colorname").innerHTML = name; + + document.getElementById("preview").style.backgroundColor = color; + document.getElementById("color").value = color.toUpperCase(); +} + +function convertRGBToHex(col) { + var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi"); + + if (!col) + return col; + + var rgb = col.replace(re, "$1,$2,$3").split(','); + if (rgb.length == 3) { + r = parseInt(rgb[0]).toString(16); + g = parseInt(rgb[1]).toString(16); + b = parseInt(rgb[2]).toString(16); + + r = r.length == 1 ? '0' + r : r; + g = g.length == 1 ? '0' + g : g; + b = b.length == 1 ? '0' + b : b; + + return "#" + r + g + b; + } + + return col; +} + +function convertHexToRGB(col) { + if (col.indexOf('#') != -1) { + col = col.replace(new RegExp('[^0-9A-F]', 'gi'), ''); + + r = parseInt(col.substring(0, 2), 16); + g = parseInt(col.substring(2, 4), 16); + b = parseInt(col.substring(4, 6), 16); + + return {r : r, g : g, b : b}; + } + + return null; +} + +function generatePicker() { + var el = document.getElementById('light'), h = '', i; + + for (i = 0; i < detail; i++){ + h += '
    '; + } + + el.innerHTML = h; +} + +function generateWebColors() { + var el = document.getElementById('webcolors'), h = '', i; + + if (el.className == 'generated') + return; + + // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby. + h += '
    ' + + ''; + + for (i=0; i' + + ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + if ((i+1) % 18 == 0) + h += ''; + } + + h += '
    '; + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el.firstChild); +} + +function paintCanvas(el) { + tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) { + var context; + if (canvas.getContext && (context = canvas.getContext("2d"))) { + context.fillStyle = canvas.getAttribute('data-color'); + context.fillRect(0, 0, 10, 10); + } + }); +} +function generateNamedColors() { + var el = document.getElementById('namedcolors'), h = '', n, v, i = 0; + + if (el.className == 'generated') + return; + + for (n in named) { + v = named[n]; + h += ''; + if (tinyMCEPopup.editor.forcedHighContrastMode) { + h += ''; + } + h += ''; + h += ''; + i++; + } + + el.innerHTML = h; + el.className = 'generated'; + + paintCanvas(el); + enableKeyboardNavigation(el); +} + +function enableKeyboardNavigation(el) { + tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', { + root: el, + items: tinyMCEPopup.dom.select('a', el) + }, tinyMCEPopup.dom); +} + +function dechex(n) { + return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16); +} + +function computeColor(e) { + var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target); + + x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0); + y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0); + + partWidth = document.getElementById('colors').width / 6; + partDetail = detail / 2; + imHeight = document.getElementById('colors').height; + + r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255; + g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth); + b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth); + + coef = (imHeight - y) / imHeight; + r = 128 + (r - 128) * coef; + g = 128 + (g - 128) * coef; + b = 128 + (b - 128) * coef; + + changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b)); + updateLight(r, g, b); +} + +function updateLight(r, g, b) { + var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color; + + for (i=0; i=0) && (i 0) { lst.options[lst.options.length] = new Option('', ''); @@ -77,7 +77,7 @@ var ImageDialog = { args.style = this.styleVal; tinymce.extend(args, { - src : f.src.value, + src : f.src.value.replace(/ /g, '%20'), alt : f.alt.value, width : f.width.value, height : f.height.value @@ -87,10 +87,16 @@ var ImageDialog = { if (el && el.nodeName == 'IMG') { ed.dom.setAttribs(el, args); + tinyMCEPopup.editor.execCommand('mceRepaint'); + tinyMCEPopup.editor.focus(); } else { - ed.execCommand('mceInsertContent', false, '', {skip_undo : 1}); - ed.dom.setAttribs('__mce_tmp', args); - ed.dom.setAttrib('__mce_tmp', 'id', ''); + tinymce.each(args, function(value, name) { + if (value === "") { + delete args[name]; + } + }); + + ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1}); ed.undoManager.add(); } diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js old mode 100755 new mode 100644 index f67a5bc828..53ff409e79 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js @@ -31,7 +31,7 @@ var LinkDialog = { }, update : function() { - var f = document.forms[0], ed = tinyMCEPopup.editor, e, b; + var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20'); tinyMCEPopup.restoreSelection(); e = ed.dom.getParent(ed.selection.getNode(), 'A'); @@ -39,7 +39,6 @@ var LinkDialog = { // Remove element if there is no href if (!f.href.value) { if (e) { - tinyMCEPopup.execCommand("mceBeginUndoLevel"); b = ed.selection.getBookmark(); ed.dom.remove(e, 1); ed.selection.moveToBookmark(b); @@ -49,19 +48,17 @@ var LinkDialog = { } } - tinyMCEPopup.execCommand("mceBeginUndoLevel"); - // Create new anchor elements if (e == null) { ed.getDoc().execCommand("unlink", false, null); - tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); + tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1}); tinymce.each(ed.dom.select("a"), function(n) { if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') { e = n; ed.dom.setAttribs(e, { - href : f.href.value, + href : href, title : f.linktitle.value, target : f.target_list ? getSelectValue(f, "target_list") : null, 'class' : f.class_list ? getSelectValue(f, "class_list") : null @@ -70,7 +67,7 @@ var LinkDialog = { }); } else { ed.dom.setAttribs(e, { - href : f.href.value, + href : href, title : f.linktitle.value, target : f.target_list ? getSelectValue(f, "target_list") : null, 'class' : f.class_list ? getSelectValue(f, "class_list") : null diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js old mode 100755 new mode 100644 index 279328614c..dd5e366fa9 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js @@ -16,7 +16,7 @@ function onLoadInit() { document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true}); if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) { - setWrap('soft'); + turnWrapOn(); document.getElementById('wraped').checked = true; } @@ -37,26 +37,42 @@ function setWrap(val) { } } -function toggleWordWrap(elm) { - if (elm.checked) - setWrap('soft'); - else - setWrap('off'); +function setWhiteSpaceCss(value) { + var el = document.getElementById('htmlSource'); + tinymce.DOM.setStyle(el, 'white-space', value); } -var wHeight=0, wWidth=0, owHeight=0, owWidth=0; +function turnWrapOff() { + if (tinymce.isWebKit) { + setWhiteSpaceCss('pre'); + } else { + setWrap('off'); + } +} + +function turnWrapOn() { + if (tinymce.isWebKit) { + setWhiteSpaceCss('pre-wrap'); + } else { + setWrap('soft'); + } +} + +function toggleWordWrap(elm) { + if (elm.checked) { + turnWrapOn(); + } else { + turnWrapOff(); + } +} function resizeInputs() { - var el = document.getElementById('htmlSource'); + var vp = tinyMCEPopup.dom.getViewPort(window), el; - if (!tinymce.isIE) { - wHeight = self.innerHeight - 65; - wWidth = self.innerWidth - 16; - } else { - wHeight = document.body.clientHeight - 70; - wWidth = document.body.clientWidth - 16; + el = document.getElementById('htmlSource'); + + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 65) + 'px'; } - - el.style.height = Math.abs(wHeight) + 'px'; - el.style.width = Math.abs(wWidth) + 'px'; } diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js b/library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js old mode 100755 new mode 100644 index 502b008176..6e58481874 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js @@ -1,62 +1 @@ -tinyMCE.addI18n('en.advanced',{ -style_select:"Styles", -font_size:"Font size", -fontdefault:"Font family", -block:"Format", -paragraph:"Paragraph", -div:"Div", -address:"Address", -pre:"Preformatted", -h1:"Heading 1", -h2:"Heading 2", -h3:"Heading 3", -h4:"Heading 4", -h5:"Heading 5", -h6:"Heading 6", -blockquote:"Blockquote", -code:"Code", -samp:"Code sample", -dt:"Definition term ", -dd:"Definition description", -bold_desc:"Bold (Ctrl+B)", -italic_desc:"Italic (Ctrl+I)", -underline_desc:"Underline (Ctrl+U)", -striketrough_desc:"Strikethrough", -justifyleft_desc:"Align left", -justifycenter_desc:"Align center", -justifyright_desc:"Align right", -justifyfull_desc:"Align full", -bullist_desc:"Unordered list", -numlist_desc:"Ordered list", -outdent_desc:"Outdent", -indent_desc:"Indent", -undo_desc:"Undo (Ctrl+Z)", -redo_desc:"Redo (Ctrl+Y)", -link_desc:"Insert/edit link", -unlink_desc:"Unlink", -image_desc:"Insert/edit image", -cleanup_desc:"Cleanup messy code", -code_desc:"Edit BBcode Source", -sub_desc:"Subscript", -sup_desc:"Superscript", -hr_desc:"Insert horizontal ruler", -removeformat_desc:"Remove formatting", -custom1_desc:"Your custom description here", -forecolor_desc:"Select text color", -backcolor_desc:"Select background color", -charmap_desc:"Insert custom character", -visualaid_desc:"Toggle guidelines/invisible elements", -anchor_desc:"Insert/edit anchor", -cut_desc:"Cut", -copy_desc:"Copy", -paste_desc:"Paste", -image_props_desc:"Image properties", -newdocument_desc:"New document", -help_desc:"Help", -blockquote_desc:"Blockquote", -clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?", -path:"Path", -newdocument:"Are you sure you want clear all contents?", -toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", -more_colors:"More colors" -}); \ No newline at end of file +tinyMCE.addI18n('en.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition Description",dt:"Definition Term ",samp:"Code Sample",code:"Code",blockquote:"Block Quote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"DIV",paragraph:"Paragraph",block:"Format",fontdefault:"Font Family","font_size":"Font Size","style_select":"Styles","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"More Colors...","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Are you sure you want clear all contents?",path:"Path","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","blockquote_desc":"Block Quote","help_desc":"Help","newdocument_desc":"New Document","image_props_desc":"Image Properties","paste_desc":"Paste (Ctrl+V)","copy_desc":"Copy (Ctrl+C)","cut_desc":"Cut (Ctrl+X)","anchor_desc":"Insert/Edit Anchor","visualaid_desc":"show/Hide Guidelines/Invisible Elements","charmap_desc":"Insert Special Character","backcolor_desc":"Select Background Color","forecolor_desc":"Select Text Color","custom1_desc":"Your Custom Description Here","removeformat_desc":"Remove Formatting","hr_desc":"Insert Horizontal Line","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup Messy Code","image_desc":"Insert/Edit Image","unlink_desc":"Unlink","link_desc":"Insert/Edit Link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Increase Indent","outdent_desc":"Decrease Indent","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","justifyfull_desc":"Align Full","justifyright_desc":"Align Right","justifycenter_desc":"Align Center","justifyleft_desc":"Align Left","striketrough_desc":"Strikethrough","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Toolbar"}); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js b/library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js old mode 100755 new mode 100644 index ea5a6dae28..50cd87e3d0 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js @@ -1,51 +1 @@ -tinyMCE.addI18n('en.advanced_dlg',{ -about_title:"About TinyMCE", -about_general:"About", -about_help:"Help", -about_license:"License", -about_plugins:"Plugins", -about_plugin:"Plugin", -about_author:"Author", -about_version:"Version", -about_loaded:"Loaded plugins", -anchor_title:"Insert/edit anchor", -anchor_name:"Anchor name", -code_title:"BBcode Source Editor", -code_wordwrap:"Word wrap", -colorpicker_title:"Select a color", -colorpicker_picker_tab:"Picker", -colorpicker_picker_title:"Color picker", -colorpicker_palette_tab:"Palette", -colorpicker_palette_title:"Palette colors", -colorpicker_named_tab:"Named", -colorpicker_named_title:"Named colors", -colorpicker_color:"Color:", -colorpicker_name:"Name:", -charmap_title:"Select custom character", -image_title:"Insert/edit image", -image_src:"Image URL", -image_alt:"Image description", -image_list:"Image list", -image_border:"Border", -image_dimensions:"Dimensions", -image_vspace:"Vertical space", -image_hspace:"Horizontal space", -image_align:"Alignment", -image_align_baseline:"Baseline", -image_align_top:"Top", -image_align_middle:"Middle", -image_align_bottom:"Bottom", -image_align_texttop:"Text top", -image_align_textbottom:"Text bottom", -image_align_left:"Left", -image_align_right:"Right", -link_title:"Insert/edit link", -link_url:"Link URL", -link_target:"Target", -link_target_same:"Open link in the same window", -link_target_blank:"Open link in a new window", -link_titlefield:"Title", -link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", -link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", -link_list:"Link list" -}); \ No newline at end of file +tinyMCE.addI18n('en.advanced_dlg', {"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character", "charmap_usage":"Use left and right arrows to navigate.","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value","":""}); diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/link.htm b/library/tinymce/jscripts/tiny_mce/themes/advanced/link.htm old mode 100755 new mode 100644 index 7565b9ae8b..5d9dea9b8c --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/link.htm +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/link.htm @@ -18,34 +18,33 @@
    - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
     
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/shortcuts.htm b/library/tinymce/jscripts/tiny_mce/themes/advanced/shortcuts.htm new file mode 100644 index 0000000000..20ec2f5a34 --- /dev/null +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/shortcuts.htm @@ -0,0 +1,47 @@ + + + + {#advanced_dlg.accessibility_help} + + + + +

    {#advanced_dlg.accessibility_usage_title}

    +

    Toolbars

    +

    Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys. + Press enter to activate a button and return focus to the editor. + Press escape to return focus to the editor without performing any actions.

    + +

    Status Bar

    +

    To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path. + Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.

    + +

    Context Menu

    +

    Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key. + To close submenus press the left arrow key. Press escape to close the context menu.

    + +

    Keyboard Shortcuts

    + + + + + + + + + + + + + + + + + + + + + +
    KeystrokeFunction
    Control-BBold
    Control-IItalic
    Control-ZUndo
    Control-YRedo
    + + diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css old mode 100755 new mode 100644 index 444063a828..52a1d67e26 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css @@ -1,6 +1,7 @@ body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;} body {background:#FFF;} body.mceForceColors {background:#FFF; color:#000;} +body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;} h1 {font-size: 2em} h2 {font-size: 1.5em} h3 {font-size: 1.17em} @@ -8,28 +9,17 @@ h4 {font-size: 1em} h5 {font-size: .83em} h6 {font-size: .75em} .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} -a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;} +a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center} +span.mceItemNbsp {background: #DDD} td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} -table {cursor:default} +table, img, hr, .mceItemAnchor {cursor:default} table td, table th {cursor:text} ins {border-bottom:1px solid green; text-decoration: none; color:green} del {color:red; text-decoration:line-through} cite {border-bottom:1px dashed blue} acronym {border-bottom:1px dotted #CCC; cursor:help} abbr {border-bottom:1px dashed #CCC; cursor:help} -code { - font-family: Courier, monospace; - white-space: pre; - display: block; - overflow: auto; - border: 1px solid #444; - background: #EEE; - color: #444; - padding: 10px; - margin-top: 20px; -} - /* IE */ * html body { @@ -45,3 +35,17 @@ scrollbar-track-color:#F5F5F5; img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} font[face=mceinline] {font-family:inherit !important} +*[contentEditable]:focus {outline:0} + +.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc} +.mceItemShockWave {background-image:url(../../img/shockwave.gif)} +.mceItemFlash {background-image:url(../../img/flash.gif)} +.mceItemQuickTime {background-image:url(../../img/quicktime.gif)} +.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)} +.mceItemRealMedia {background-image:url(../../img/realmedia.gif)} +.mceItemVideo {background-image:url(../../img/video.gif)} +.mceItemAudio {background-image:url(../../img/video.gif)} +.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)} +.mceItemIframe {background-image:url(../../img/iframe.gif)} +.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;} +.mceHideBrInPre pre br {display: none} diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css old mode 100755 new mode 100644 diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/buttons.png b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/buttons.png old mode 100755 new mode 100644 index 7dd58418ba7cfe58ae7efdf174e0b223fe3aa6a0..1e53560e0aa7bb1b9a0373fc2f330acab7d1d51f GIT binary patch delta 2525 zcmV<32_p8&8NC>gBe7Up0)GjqNklW6KNnY z5Dmy?f+RtfI3miXgUZ$l3N2OYxbJnZTdVCj)}{MCZD&hL34hpp-*fJkN9^6-rttRd_kS0lKeglM98q|x zSXg)|clwtWRQ;MY1qEx?toa>1R4`M3mjVKlOJfdD-oUKKN?soPS!gqP#L^XT4aOn{ z<|RX4N|~K3sI#VE=T7#D$4&spi{!Bt^$m?o{QUC{rr%gvO7{Aqylm?0S+zX;7S)5x zYH`$|q9m`!4|np5D1R_fYSKe+^>SWz0Y7FK1ysuqN>D&2@AB2F{;N0@haxPiQCh0& zhw4lG5r0WZQ4t;*Lqq;NdgWD1{6j!LBHsQN0n-H)T^-WjVH5Nl`Db5R>T*R~PM05_ zz&}62x_GwK&EQ;@DGPWTGSzxvULAk)dDV>VGDjevLnadS|zjKJgNr z`bf8#+LA20zq{MdV;qyd)>%W;u2b1cxN5qol8KVq;TnzZb$VIutgWfp%2Ix?b*q1c zp^rpdy`U!2+}vDCtV5;l-Wsivb|!ywlycE%FI3t1UC}6o*QwN+^e&e(+6tmh&IV$* zwKr1BS*PP_Wq6=`xrq%|~+T_C5$Ej&(aBhffVASe$q7B6G zIup%|XhSd0Mu0Qgpy>-sR}42bHT5AGzmv^*wAx7)^Unf>~5$T9%lO1CJm!P4FXMOHKz$z zM=wnfkZ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gckjT}y9l_OSwlNWoYbF36-^jIhRBu!dXSgwZ`?amH3bh@M#|o&e)3aMz#P>h7 zN2K)I*JWfZ=nA9i=}iA@8&FYEO^0!^vtPLMn&a*g=xvR#+6lY`ARvA62(r!>rz2ANhRI*qH;b7AwQ7nN8@TH#Ws&GcSz85IM7W=p+9@ zRI74y*H;0$iA=)}@wHcH>)3TL_cxy(uBoX>Tjg*4KU!L#8?ha{ezmgtG#WajIMLFG m$9hVqYNgZs*94epU`y6#e2-qmp8{7)K diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png old mode 100755 new mode 100644 index 8996c7493e8a58c9c40845cbe8abdc3e6730716d..7fc57f2bc2d63a3ad6fbf98b663f336539f011ec GIT binary patch delta 618 zcmV-w0+s!k9g78!83+Ra0086$;ro#x7k>cEP)t-s0002HySo4Y08>*_a&~-=k(7~{ zq?n(no1(0rrmv!@vZk!Hsjs-Lv%9dizO=c)x4gu=z{b14$GpMFzQf7C#LL0P%)`gc z#L3Ub%FxKn(aFuz%g@yRt3Us-P5-h`|Fl&9wO9YQTmQIT|GHxTyJi2qY5%`%|9`=9 z|HF3w#e4t9fd9#a|I3O0&5r-ub^qLY|J{H8--Q3*iT~k_|KpSYd|L3Cr z=%)YbtN-h;|LwH@@45f*zW?&W|MbWI_00eO|F&Wq@&Et;0(4SNQveU|I_8w5<1)+Sxjy>khxmTZ^UMAPuDhl=nJ%xacLVXE zN31WKSh0P^hawhnw)jf}#5_+GPu2e^5c51aiV00%6xVrr#$!*$V|i{OPJb2GYE{RI zUk${E_f%7X#d{l5O*06LqA`1W{A{z-KcE#qKx)lR6a_=R{wHo}S^x<1c*Pfemr)l5 zdENxVv+rLvA{OzVh(9zy{H9446TMvi`r@7X*kwhrq7{r{OWVwhm!6C_^4vrmA^ryB ziMy8mgg|d`WSser1qE6f|5sqVKRBqtZ!0b!I11C^6r?o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0026e000+nl3&F} z000BCNkl%`Zo(Y1Aj?R|BwL*lGFS%byy z6<_PB?8gMKt#y$3n#Pv>Rr3?i;C|+)$6!Au23uMOnXhSV*-V3Q@xhOu1K)$MU%g`FFW0215ys%%osV6|Va)Tq5mdhUN6U~J-AM~#pUO%r%hKW> zB7eusX0zWr)GVVYyceilo$(Yz}V4nP`(d_C!HvOqs3Ng zayGsi@d6C|wnfB2sVXyr<6toNU~muS7Jp%5!G7Wx>|A`%&Y)*EBQp3H z2j^7#-9YRw^5q6F@uMxC7i4t%>0n!!hpD9ts>D$Uth zU#de?8&_dbEojxLRFxCA$%)qMsCas#?K7L3ocQuk8=uZsWj;k%IYs!L-$f*s!GD8v zieLt#8SD=Oz(@w;URN@MZQ$V7nZbQx@b0(d0Q~o0U;$RD%K5zvB-b1urssJhJBPP$ z>+c;#%1@;#JE-3(oBmc<*HFJzMwzRv(wbTrRaXZ%Z590fKye~-XQQ}NT^<@TI z+2lmEK+fpwvFbapEke{2MBvsQY@+%ygNODMkt7E5DS{b1R6Up(%q@Z$j0YI0)Y`Tr tDd0rp<~3DXQ_F!8)>XlC0|M~B0RV7?*50eEtCs)(002ovPDHLkV1i_X4a@)l diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png old mode 100755 new mode 100644 index bd5d2550c06d83c1141b78c5af7217e89559fc32..c0dcc6cac2003f7405fff3ea5df7bcf276243596 GIT binary patch delta 2072 zcmV+z2bL86o&f`_+2dMjNDlznH&TyHd_URN{##*Ml(GE~%a^)cgqM3rM6 zy{bondNjd$e}A~n3(q}gq4ulxA1GMAU&Onw&G(G!`w1>rDpD?2qyj2sDOZq}vmEsd z@}xM$9V2sUnzinX>{lh^hXjQ<)2Nkx*%9e)zkkSD0CoV{iZJ)DasnENC6 zO3eKu1`Fo?3BIrvYh2$;@cjI|BpLJbiDbD&l4LPSRIcEBvIV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*8SU-N@Z4=h=ATktzooG$I%jf zM^9NqP`kBL{y`K^Q5aM2ED-e}OpJ=ndH@$KuK0e+hz~1_tWL#>s0WxKT0l$@h4C8d{u@yJ}>WAE3Fd(@KviX7h9|z;NfuiI1EEH+t=KPgTM3Aw^tS8%B9EP z^FIQ3GY}A4!0e!2MEv!BH|*f^eOPO4vn>O8GOk!rNj0Vl^C`K{oB$@Vy3__9;QQZu zsT%p6nI|0@Px#?8vwI>zRXr6&qMS=T9077Cn~IJ)5MpqpvI zv*Y?!y^a9vbgF8avwNRNI6?R_xcWD=lsNK`)oC{XE_1H47NP>Y@&~8_J8U8J9{vFU zaP8Kjt$p*SAL^5fKL#$m)&YR~8wE(E1t_M@-d$N4PclpTv(-N;ISMKwaxkx7!L@h) z?Ofv@=u{EZUkCL!fwc{Yb$ys~>ThPh>-m8-eczl@e;u@L&NuaSNK0aRs52VW1Ma=! zW`6IzQ`|$`4H1F0bD)atgv*kf_TDsm_bxeM`GEfvi4`EMXxeA*;pX*U0iV6+){Bk+ z%x6ReTe}PSOr2szl;!Ry`!)GE+Z)6|z#gj^AWExl?*DF~j;SAfiH08s_s-@COXCse zt1K&4O)3x&A>UQ0%;Mqbl!n9UBEXfN+*(&e#D=3fmi?ZrZcfuxmO$jOUxm5?aMX7! zfjl>t#TnF+1%XC-2r6=Uu4xg9gQtKvc9uisyY6kqWefa}R)j}lGU^Bi!vc^> z9-S($V$V6bv=SaqzQ4o2%)s%DcQ3_4T)pHJ_8n&Rr~9ROG-5#LxX)wLf6NO|fq`uOj7mdgJI0H2v4wf~~Kng9R* M07*qoM6N<$f@g#ZbN~PV diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css old mode 100755 new mode 100644 index a6253976af..7b5103be29 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css @@ -4,8 +4,8 @@ .o2k7Skin table td {vertical-align:middle} /* Containers */ -.o2k7Skin table {background:#E5EFFD} -.o2k7Skin iframe {display:block; background:#FFF} +.o2k7Skin table {background:transparent} +.o2k7Skin iframe {display:block;} .o2k7Skin .mceToolbar {height:26px} /* External */ @@ -19,7 +19,8 @@ .o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD} .o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0} .o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD} -.o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} +.o2k7Skin td.mceToolbar{background:#E5EFFD} +.o2k7Skin .mceStatusbar {background:#E5EFFD; display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} .o2k7Skin .mceStatusbar div {float:left; padding:2px} .o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} .o2k7Skin .mceStatusbar a:hover {text-decoration:underline} @@ -50,19 +51,19 @@ .o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px} /* ListBox */ -.o2k7Skin .mceListBox {margin-left:3px} +.o2k7Skin .mceListBox {padding-left: 3px} .o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block} .o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} .o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0} .o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF} .o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px} .o2k7Skin .mceListBoxDisabled .mceText {color:gray} -.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden} +.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden; margin-left:3px} .o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px} .o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;} /* SplitButton */ -.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px} +.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px; direction:ltr} .o2k7Skin .mceSplitButton {background:url(img/button_bg.png)} .o2k7Skin .mceSplitButton a.mceAction {width:22px} .o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)} @@ -105,6 +106,7 @@ .o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center} .o2k7Skin .mceMenu span.mceMenuLine {display:none} .o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;} +.o2k7Skin .mceMenuItem td, .o2k7Skin .mceMenuItem th {line-height: normal} /* Progress,Resize */ .o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} @@ -213,3 +215,4 @@ .o2k7Skin span.mce_pagebreak {background-position:0 -40px} .o2k7Skin span.mce_restoredraft {background-position:-20px -40px} .o2k7Skin span.mce_spellchecker {background-position:-540px -20px} +.o2k7Skin span.mce_visualblocks {background-position: -40px -40px} diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css old mode 100755 new mode 100644 index 153f0c38a6..50c9b76a2d --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css @@ -1,6 +1,6 @@ /* Black */ .o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)} -.o2k7SkinBlack table, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} +.o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF} .o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0} .o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0} .o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;} diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css old mode 100755 new mode 100644 index 7fe3b45e12..960a8e4755 --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css @@ -1,5 +1,5 @@ /* Silver */ .o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)} -.o2k7SkinSilver table, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} +.o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee} .o2k7SkinSilver .mceListBox .mceText {background:#FFF} .o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb} diff --git a/library/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm b/library/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm old mode 100755 new mode 100644 index 5957bbd178..3c6d65808a --- a/library/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm +++ b/library/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm @@ -6,7 +6,7 @@
    -
    {#advanced_dlg.code_title}
    +
    @@ -17,8 +17,8 @@
    - - + +
    diff --git a/library/tinymce/jscripts/tiny_mce/themes/simple/editor_template.js b/library/tinymce/jscripts/tiny_mce/themes/simple/editor_template.js old mode 100755 new mode 100644 index ed89abc067..4b3209cc92 --- a/library/tinymce/jscripts/tiny_mce/themes/simple/editor_template.js +++ b/library/tinymce/jscripts/tiny_mce/themes/simple/editor_template.js @@ -1 +1 @@ -(function(){var a=tinymce.DOM;tinymce.ThemeManager.requireLangPack("simple");tinymce.create("tinymce.themes.SimpleTheme",{init:function(c,d){var e=this,b=["Bold","Italic","Underline","Strikethrough","InsertUnorderedList","InsertOrderedList"],f=c.settings;e.editor=c;c.onInit.add(function(){c.onNodeChange.add(function(h,g){tinymce.each(b,function(i){g.get(i.toLowerCase()).setActive(h.queryCommandState(i))})});c.dom.loadCSS(d+"/skins/"+f.skin+"/content.css")});a.loadCSS((f.editor_css?c.documentBaseURI.toAbsolute(f.editor_css):"")||d+"/skins/"+f.skin+"/ui.css")},renderUI:function(h){var e=this,i=h.targetNode,b,c,d=e.editor,f=d.controlManager,g;i=a.insertAfter(a.create("span",{id:d.id+"_container","class":"mceEditor "+d.settings.skin+"SimpleSkin"}),i);i=g=a.add(i,"table",{cellPadding:0,cellSpacing:0,"class":"mceLayout"});i=c=a.add(i,"tbody");i=a.add(c,"tr");i=b=a.add(a.add(i,"td"),"div",{"class":"mceIframeContainer"});i=a.add(a.add(c,"tr",{"class":"last"}),"td",{"class":"mceToolbar mceLast",align:"center"});c=e.toolbar=f.createToolbar("tools1");c.add(f.createButton("bold",{title:"simple.bold_desc",cmd:"Bold"}));c.add(f.createButton("italic",{title:"simple.italic_desc",cmd:"Italic"}));c.add(f.createButton("underline",{title:"simple.underline_desc",cmd:"Underline"}));c.add(f.createButton("strikethrough",{title:"simple.striketrough_desc",cmd:"Strikethrough"}));c.add(f.createSeparator());c.add(f.createButton("undo",{title:"simple.undo_desc",cmd:"Undo"}));c.add(f.createButton("redo",{title:"simple.redo_desc",cmd:"Redo"}));c.add(f.createSeparator());c.add(f.createButton("cleanup",{title:"simple.cleanup_desc",cmd:"mceCleanup"}));c.add(f.createSeparator());c.add(f.createButton("insertunorderedlist",{title:"simple.bullist_desc",cmd:"InsertUnorderedList"}));c.add(f.createButton("insertorderedlist",{title:"simple.numlist_desc",cmd:"InsertOrderedList"}));c.renderTo(i);return{iframeContainer:b,editorContainer:d.id+"_container",sizeContainer:g,deltaHeight:-20}},getInfo:function(){return{longname:"Simple theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add("simple",tinymce.themes.SimpleTheme)})(); \ No newline at end of file +(function(){var a=tinymce.DOM;tinymce.ThemeManager.requireLangPack("simple");tinymce.create("tinymce.themes.SimpleTheme",{init:function(c,d){var e=this,b=["Bold","Italic","Underline","Strikethrough","InsertUnorderedList","InsertOrderedList"],f=c.settings;e.editor=c;c.contentCSS.push(d+"/skins/"+f.skin+"/content.css");c.onInit.add(function(){c.onNodeChange.add(function(h,g){tinymce.each(b,function(i){g.get(i.toLowerCase()).setActive(h.queryCommandState(i))})})});a.loadCSS((f.editor_css?c.documentBaseURI.toAbsolute(f.editor_css):"")||d+"/skins/"+f.skin+"/ui.css")},renderUI:function(h){var e=this,i=h.targetNode,b,c,d=e.editor,f=d.controlManager,g;i=a.insertAfter(a.create("span",{id:d.id+"_container","class":"mceEditor "+d.settings.skin+"SimpleSkin"}),i);i=g=a.add(i,"table",{cellPadding:0,cellSpacing:0,"class":"mceLayout"});i=c=a.add(i,"tbody");i=a.add(c,"tr");i=b=a.add(a.add(i,"td"),"div",{"class":"mceIframeContainer"});i=a.add(a.add(c,"tr",{"class":"last"}),"td",{"class":"mceToolbar mceLast",align:"center"});c=e.toolbar=f.createToolbar("tools1");c.add(f.createButton("bold",{title:"simple.bold_desc",cmd:"Bold"}));c.add(f.createButton("italic",{title:"simple.italic_desc",cmd:"Italic"}));c.add(f.createButton("underline",{title:"simple.underline_desc",cmd:"Underline"}));c.add(f.createButton("strikethrough",{title:"simple.striketrough_desc",cmd:"Strikethrough"}));c.add(f.createSeparator());c.add(f.createButton("undo",{title:"simple.undo_desc",cmd:"Undo"}));c.add(f.createButton("redo",{title:"simple.redo_desc",cmd:"Redo"}));c.add(f.createSeparator());c.add(f.createButton("cleanup",{title:"simple.cleanup_desc",cmd:"mceCleanup"}));c.add(f.createSeparator());c.add(f.createButton("insertunorderedlist",{title:"simple.bullist_desc",cmd:"InsertUnorderedList"}));c.add(f.createButton("insertorderedlist",{title:"simple.numlist_desc",cmd:"InsertOrderedList"}));c.renderTo(i);return{iframeContainer:b,editorContainer:d.id+"_container",sizeContainer:g,deltaHeight:-20}},getInfo:function(){return{longname:"Simple theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add("simple",tinymce.themes.SimpleTheme)})(); \ No newline at end of file diff --git a/library/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js b/library/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js old mode 100755 new mode 100644 index 4b862d49d6..01ce87c58a --- a/library/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js +++ b/library/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js @@ -19,6 +19,7 @@ var t = this, states = ['Bold', 'Italic', 'Underline', 'Strikethrough', 'InsertUnorderedList', 'InsertOrderedList'], s = ed.settings; t.editor = ed; + ed.contentCSS.push(url + "/skins/" + s.skin + "/content.css"); ed.onInit.add(function() { ed.onNodeChange.add(function(ed, cm) { @@ -26,8 +27,6 @@ cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c)); }); }); - - ed.dom.loadCSS(url + "/skins/" + s.skin + "/content.css"); }); DOM.loadCSS((s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : '') || url + "/skins/" + s.skin + "/ui.css"); diff --git a/library/tinymce/jscripts/tiny_mce/themes/simple/img/icons.gif b/library/tinymce/jscripts/tiny_mce/themes/simple/img/icons.gif old mode 100755 new mode 100644 index 16af141ff0eea376a889b1e8d28e9c1cacaaab16..6fcbcb5dedf16a5fa1d15c2aa127bceb612f1e71 GIT binary patch literal 806 zcmZ?wbhEHbJi#Es@KuxH{{08bHy>kQU|4+kcV*u?6Yu2z|Nk2X_I-c9E~4fBsnb_x z&7Ngzq1inB@Woqi-rnfiGF7yw9zM z^p;~=3MY4TT)2AY!iC=7fBwej_wPS(UDm1P!}|}9?`#au+qhx#R?Fl=KuakHia%Lc z85lGfbU;Rd{N%v)|G<<24;`ug6HAIt=2*?Yu%d)ZG@><(acbwmDSj%f4MMZ#%vkt3 z%+g~)i8kP^LLB_(WJHBo z)4eilyozQ8a&qqSt%<6xpa0;xA7k;M?mchbzI*>+`RnL~M?L!{MDwZt;o_B2F2$0=pQSpQ!u@RcUGT{(44KaY91N#ws_nDH9G%Qf=ZF z5o_THWH`G~`GwyilS^z$ZvV~I`dh4Lx_8c>?R@8gr-07UIgFjp0y#A&c{B)cE>2kS zL5I1;i$zoEA)6qV`HGJvVWE!{8MZ6ST|PC}d%Kid7{KiD{l18xziSGKuWtj9AkWy-*`}#c~0`Lrjq> z-;O-o=3A#@&dst%_SasuJq0xZW;OwR3vM!diY%Es?;J~Pp}LYununP(i|XxU>#u=* zSvNC^0?cJ=S?=UK4&2DdcCO^BsHxjWc4vR-Z64x&8r#>V9!JMd4O!Z*d@mNrgX=jUy;0|T>ZntHjDU$=-I8y`|tN~Y9 literal 1440 zcmV;R1z-9{Nk%w1VaNa!0QUd@Ib*`7v&H}b0P*i`B{WZ*I4YI8{iDPCZ*XyWj;?N! z&ooP8CcKTM%}ImAk&d@bUef&=iA% zhPA3sm56OYcjM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c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();tinymce.create("static tinymce.util.JSON",{serialize:function(e){var c,a,d=tinymce.util.JSON.serialize,b;if(e==null){return"null"}b=typeof e;if(b=="string"){a="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+e.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(g,f){c=a.indexOf(f);if(c+1){return"\\"+a.charAt(c+1)}g=f.charCodeAt().toString(16);return"\\u"+"0000".substring(g.length)+g})+'"'}if(b=="object"){if(e.hasOwnProperty&&e instanceof Array){for(c=0,a="[";c0?",":"")+d(e[c])}return a+"]"}a="{";for(c in e){a+=typeof e[c]!="function"?(a.length>1?',"':'"')+c+'":'+d(e[c]):""}return a+"}"}return""+e},parse:function(s){try{return eval("("+s+")")}catch(ex){}}});tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){e.call(f.error_scope||f.scope,h,g)};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(m){var k=m.each,j=m.is,i=m.isWebKit,d=m.isIE,a=/^(H[1-6R]|P|DIV|ADDRESS|PRE|FORM|T(ABLE|BODY|HEAD|FOOT|H|R|D)|LI|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|MENU|ISINDEX|SAMP)$/,e=g("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),f=g("src,href,style,coords,shape"),c={"&":"&",'"':""","<":"<",">":">"},n=/[<>&\"]/g,b=/^([a-z0-9],?)+$/i,h=/<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)(\s*\/?)>/g,l=/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;function g(q){var p={},o;q=q.split(",");for(o=q.length;o>=0;o--){p[q[o]]=1}return p}m.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(u,q){var p=this,o;p.doc=u;p.win=window;p.files={};p.cssFlicker=false;p.counter=0;p.boxModel=!m.isIE||u.compatMode=="CSS1Compat";p.stdMode=u.documentMode===8;p.settings=q=m.extend({keep_values:false,hex_colors:1,process_html:1},q);if(m.isIE6){try{u.execCommand("BackgroundImageCache",false,true)}catch(r){p.cssFlicker=true}}if(q.valid_styles){p._styles={};k(q.valid_styles,function(t,s){p._styles[s]=m.explode(t)})}m.addUnload(p.destroy,p)},getRoot:function(){var o=this,p=o.settings;return(p&&o.get(p.root_element))||o.doc.body},getViewPort:function(p){var q,o;p=!p?this.win:p;q=p.document;o=this.boxModel?q.documentElement:q.body;return{x:p.pageXOffset||o.scrollLeft,y:p.pageYOffset||o.scrollTop,w:p.innerWidth||o.clientWidth,h:p.innerHeight||o.clientHeight}},getRect:function(s){var r,o=this,q;s=o.get(s);r=o.getPos(s);q=o.getSize(s);return{x:r.x,y:r.y,w:q.w,h:q.h}},getSize:function(r){var p=this,o,q;r=p.get(r);o=p.getStyle(r,"width");q=p.getStyle(r,"height");if(o.indexOf("px")===-1){o=0}if(q.indexOf("px")===-1){q=0}return{w:parseInt(o)||r.offsetWidth||r.clientWidth,h:parseInt(q)||r.offsetHeight||r.clientHeight}},getParent:function(q,p,o){return this.getParents(q,p,o,false)},getParents:function(z,v,s,y){var q=this,p,u=q.settings,x=[];z=q.get(z);y=y===undefined;if(u.strict_root){s=s||q.getRoot()}if(j(v,"string")){p=v;if(v==="*"){v=function(o){return o.nodeType==1}}else{v=function(o){return q.is(o,p)}}}while(z){if(z==s||!z.nodeType||z.nodeType===9){break}if(!v||v(z)){if(y){x.push(z)}else{return z}}z=z.parentNode}return y?x:null},get:function(o){var p;if(o&&this.doc&&typeof(o)=="string"){p=o;o=this.doc.getElementById(o);if(o&&o.id!==p){return this.doc.getElementsByName(p)[1]}}return o},getNext:function(p,o){return this._findSib(p,o,"nextSibling")},getPrev:function(p,o){return this._findSib(p,o,"previousSibling")},select:function(q,p){var o=this;return m.dom.Sizzle(q,o.get(p)||o.get(o.settings.root_element)||o.doc,[])},is:function(q,o){var p;if(q.length===undefined){if(o==="*"){return q.nodeType==1}if(b.test(o)){o=o.toLowerCase().split(/,/);q=q.nodeName.toLowerCase();for(p=o.length-1;p>=0;p--){if(o[p]==q){return true}}return false}}return m.dom.Sizzle.matches(o,q.nodeType?[q]:q).length>0},add:function(s,v,o,r,u){var q=this;return this.run(s,function(y){var x,t;x=j(v,"string")?q.doc.createElement(v):v;q.setAttribs(x,o);if(r){if(r.nodeType){x.appendChild(r)}else{q.setHTML(x,r)}}return !u?y.appendChild(x):x})},create:function(q,o,p){return this.add(this.doc.createElement(q),q,o,p,1)},createHTML:function(v,p,s){var u="",r=this,q;u+="<"+v;for(q in p){if(p.hasOwnProperty(q)){u+=" "+q+'="'+r.encode(p[q])+'"'}}if(m.is(s)){return u+">"+s+""}return u+" />"},remove:function(o,p){return this.run(o,function(r){var q,s;q=r.parentNode;if(!q){return null}if(p){while(s=r.firstChild){if(!m.isIE||s.nodeType!==3||s.nodeValue){q.insertBefore(s,r)}else{r.removeChild(s)}}}return q.removeChild(r)})},setStyle:function(r,o,p){var q=this;return q.run(r,function(v){var u,t;u=v.style;o=o.replace(/-(\D)/g,function(x,s){return s.toUpperCase()});if(q.pixelStyles.test(o)&&(m.is(p,"number")||/^[\-0-9\.]+$/.test(p))){p+="px"}switch(o){case"opacity":if(d){u.filter=p===""?"":"alpha(opacity="+(p*100)+")";if(!r.currentStyle||!r.currentStyle.hasLayout){u.display="inline-block"}}u[o]=u["-moz-opacity"]=u["-khtml-opacity"]=p||"";break;case"float":d?u.styleFloat=p:u.cssFloat=p;break;default:u[o]=p||""}if(q.settings.update_styles){q.setAttrib(v,"_mce_style")}})},getStyle:function(r,o,q){r=this.get(r);if(!r){return false}if(this.doc.defaultView&&q){o=o.replace(/[A-Z]/g,function(s){return"-"+s});try{return this.doc.defaultView.getComputedStyle(r,null).getPropertyValue(o)}catch(p){return null}}o=o.replace(/-(\D)/g,function(t,s){return s.toUpperCase()});if(o=="float"){o=d?"styleFloat":"cssFloat"}if(r.currentStyle&&q){return r.currentStyle[o]}return r.style[o]},setStyles:function(u,v){var q=this,r=q.settings,p;p=r.update_styles;r.update_styles=0;k(v,function(o,s){q.setStyle(u,s,o)});r.update_styles=p;if(r.update_styles){q.setAttrib(u,r.cssText)}},setAttrib:function(q,r,o){var p=this;if(!q||!r){return}if(p.settings.strict){r=r.toLowerCase()}return this.run(q,function(u){var t=p.settings;switch(r){case"style":if(!j(o,"string")){k(o,function(s,x){p.setStyle(u,x,s)});return}if(t.keep_values){if(o&&!p._isRes(o)){u.setAttribute("_mce_style",o,2)}else{u.removeAttribute("_mce_style",2)}}u.style.cssText=o;break;case"class":u.className=o||"";break;case"src":case"href":if(t.keep_values){if(t.url_converter){o=t.url_converter.call(t.url_converter_scope||p,o,r,u)}p.setAttrib(u,"_mce_"+r,o,2)}break;case"shape":u.setAttribute("_mce_style",o);break}if(j(o)&&o!==null&&o.length!==0){u.setAttribute(r,""+o,2)}else{u.removeAttribute(r,2)}})},setAttribs:function(q,r){var p=this;return this.run(q,function(o){k(r,function(s,t){p.setAttrib(o,t,s)})})},getAttrib:function(r,s,q){var o,p=this;r=p.get(r);if(!r||r.nodeType!==1){return false}if(!j(q)){q=""}if(/^(src|href|style|coords|shape)$/.test(s)){o=r.getAttribute("_mce_"+s);if(o){return o}}if(d&&p.props[s]){o=r[p.props[s]];o=o&&o.nodeValue?o.nodeValue:o}if(!o){o=r.getAttribute(s,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(s)){if(r[p.props[s]]===true&&o===""){return s}return o?s:""}if(r.nodeName==="FORM"&&r.getAttributeNode(s)){return r.getAttributeNode(s).nodeValue}if(s==="style"){o=o||r.style.cssText;if(o){o=p.serializeStyle(p.parseStyle(o),r.nodeName);if(p.settings.keep_values&&!p._isRes(o)){r.setAttribute("_mce_style",o)}}}if(i&&s==="class"&&o){o=o.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(d){switch(s){case"rowspan":case"colspan":if(o===1){o=""}break;case"size":if(o==="+0"||o===20||o===0){o=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(o===0){o=""}break;case"hspace":if(o===-1){o=""}break;case"maxlength":case"tabindex":if(o===32768||o===2147483647||o==="32768"){o=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(o===65535){return s}return q;case"shape":o=o.toLowerCase();break;default:if(s.indexOf("on")===0&&o){o=(""+o).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1")}}}return(o!==undefined&&o!==null&&o!=="")?""+o:q},getPos:function(A,s){var p=this,o=0,z=0,u,v=p.doc,q;A=p.get(A);s=s||v.body;if(A){if(d&&!p.stdMode){A=A.getBoundingClientRect();u=p.boxModel?v.documentElement:v.body;o=p.getStyle(p.select("html")[0],"borderWidth");o=(o=="medium"||p.boxModel&&!p.isIE6)&&2||o;A.top+=p.win.self!=p.win.top?2:0;return{x:A.left+u.scrollLeft-o,y:A.top+u.scrollTop-o}}q=A;while(q&&q!=s&&q.nodeType){o+=q.offsetLeft||0;z+=q.offsetTop||0;q=q.offsetParent}q=A.parentNode;while(q&&q!=s&&q.nodeType){o-=q.scrollLeft||0;z-=q.scrollTop||0;q=q.parentNode}}return{x:o,y:z}},parseStyle:function(r){var u=this,v=u.settings,x={};if(!r){return x}function p(D,A,C){var z,B,o,y;z=x[D+"-top"+A];if(!z){return}B=x[D+"-right"+A];if(z!=B){return}o=x[D+"-bottom"+A];if(B!=o){return}y=x[D+"-left"+A];if(o!=y){return}x[C]=y;delete x[D+"-top"+A];delete x[D+"-right"+A];delete x[D+"-bottom"+A];delete x[D+"-left"+A]}function q(y,s,o,A){var z;z=x[s];if(!z){return}z=x[o];if(!z){return}z=x[A];if(!z){return}x[y]=x[s]+" "+x[o]+" "+x[A];delete x[s];delete x[o];delete x[A]}r=r.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");k(r.split(";"),function(s){var o,t=[];if(s){s=s.replace(/_MCE_SEMI_/g,";");s=s.replace(/url\([^\)]+\)/g,function(y){t.push(y);return"url("+t.length+")"});s=s.split(":");o=m.trim(s[1]);o=o.replace(/url\(([^\)]+)\)/g,function(z,y){return t[parseInt(y)-1]});o=o.replace(/rgb\([^\)]+\)/g,function(y){return u.toHex(y)});if(v.url_converter){o=o.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(y,z){return"url("+v.url_converter.call(v.url_converter_scope||u,u.decode(z),"style",null)+")"})}x[m.trim(s[0]).toLowerCase()]=o}});p("border","","border");p("border","-width","border-width");p("border","-color","border-color");p("border","-style","border-style");p("padding","","padding");p("margin","","margin");q("border","border-width","border-style","border-color");if(d){if(x.border=="medium none"){x.border=""}}return x},serializeStyle:function(v,p){var q=this,r="";function u(s,o){if(o&&s){if(o.indexOf("-")===0){return}switch(o){case"font-weight":if(s==700){s="bold"}break;case"color":case"background-color":s=s.toLowerCase();break}r+=(r?" ":"")+o+": "+s+";"}}if(p&&q._styles){k(q._styles["*"],function(o){u(v[o],o)});k(q._styles[p.toLowerCase()],function(o){u(v[o],o)})}else{k(v,u)}return r},loadCSS:function(o){var q=this,r=q.doc,p;if(!o){o=""}p=q.select("head")[0];k(o.split(","),function(s){var t;if(q.files[s]){return}q.files[s]=true;t=q.create("link",{rel:"stylesheet",href:m._addVer(s)});if(d&&r.documentMode){t.onload=function(){r.recalc();t.onload=null}}p.appendChild(t)})},addClass:function(o,p){return this.run(o,function(q){var r;if(!p){return 0}if(this.hasClass(q,p)){return q.className}r=this.removeClass(q,p);return q.className=(r!=""?(r+" "):"")+p})},removeClass:function(q,r){var o=this,p;return o.run(q,function(t){var s;if(o.hasClass(t,r)){if(!p){p=new RegExp("(^|\\s+)"+r+"(\\s+|$)","g")}s=t.className.replace(p," ");s=m.trim(s!=" "?s:"");t.className=s;if(!s){t.removeAttribute("class");t.removeAttribute("className")}return s}return t.className})},hasClass:function(p,o){p=this.get(p);if(!p||!o){return false}return(" "+p.className+" ").indexOf(" "+o+" ")!==-1},show:function(o){return this.setStyle(o,"display","block")},hide:function(o){return this.setStyle(o,"display","none")},isHidden:function(o){o=this.get(o);return !o||o.style.display=="none"||this.getStyle(o,"display")=="none"},uniqueId:function(o){return(!o?"mce_":o)+(this.counter++)},setHTML:function(q,p){var o=this;return this.run(q,function(v){var r,t,s,z,u,r;p=o.processHTML(p);if(d){function y(){while(v.firstChild){v.firstChild.removeNode()}try{v.innerHTML="
    "+p;v.removeChild(v.firstChild)}catch(x){r=o.create("div");r.innerHTML="
    "+p;k(r.childNodes,function(B,A){if(A){v.appendChild(B)}})}}if(o.settings.fix_ie_paragraphs){p=p.replace(/

    <\/p>|]+)><\/p>|/gi,' 

    ')}y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("p");for(t=s.length-1,r=0;t>=0;t--){z=s[t];if(!z.hasChildNodes()){if(!z._mce_keep){r=1;break}z.removeAttribute("_mce_keep")}}}if(r){p=p.replace(/

    ]+)>|

    /ig,'

    ');p=p.replace(/<\/p>/gi,"
    ");y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("DIV");for(t=s.length-1;t>=0;t--){z=s[t];if(z._mce_tmp){u=o.doc.createElement("p");z.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(A,x){var B;if(x!=="_mce_tmp"){B=z.getAttribute(x);if(!B&&x==="class"){B=z.className}u.setAttribute(x,B)}});for(r=0;r]+)\/>|/gi,"");if(q.keep_values){if(/)/g,"\n");t=t.replace(/^[\r\n]*|[\r\n]*$/g,"");t=t.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,"");return t}r=r.replace(/]+|)>([\s\S]*?)<\/script>/gi,function(s,x,t){if(!x){x=' type="text/javascript"'}x=x.replace(/src=\"([^\"]+)\"?/i,function(y,z){if(q.url_converter){z=p.encode(q.url_converter.call(q.url_converter_scope||p,p.decode(z),"src","script"))}return'_mce_src="'+z+'"'});if(m.trim(t)){v.push(o(t));t=""}return""+t+""});r=r.replace(/]+|)>([\s\S]*?)<\/style>/gi,function(s,x,t){if(t){v.push(o(t));t=""}return""+t+""});r=r.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(s,x,t){return""})}r=r.replace(//g,"");function u(s){return s.replace(h,function(y,z,x,t){return"<"+z+x.replace(l,function(B,A,E,D,C){var F;A=A.toLowerCase();E=E||D||C||"";if(e[A]){if(E==="false"||E==="0"){return}return A+'="'+A+'"'}if(f[A]&&x.indexOf("_mce_"+A)==-1){F=p.decode(E);if(q.url_converter&&(A=="src"||A=="href")){F=q.url_converter.call(q.url_converter_scope||p,F,A,z)}if(A=="style"){F=p.serializeStyle(p.parseStyle(F),A)}return A+'="'+E+'" _mce_'+A+'="'+p.encode(F)+'"'}return B})+t+">"})}r=u(r);r=r.replace(/MCE_SCRIPT:([0-9]+)/g,function(t,s){return v[s]})}return r},getOuterHTML:function(o){var p;o=this.get(o);if(!o){return null}if(o.outerHTML!==undefined){return o.outerHTML}p=(o.ownerDocument||this.doc).createElement("body");p.appendChild(o.cloneNode(true));return p.innerHTML},setOuterHTML:function(r,p,s){var o=this;function q(u,t,x){var y,v;v=x.createElement("body");v.innerHTML=t;y=v.lastChild;while(y){o.insertAfter(y.cloneNode(true),u);y=y.previousSibling}o.remove(u)}return this.run(r,function(u){u=o.get(u);if(u.nodeType==1){s=s||u.ownerDocument||o.doc;if(d){try{if(d&&u.nodeType==1){u.outerHTML=p}else{q(u,p,s)}}catch(t){q(u,p,s)}}else{q(u,p,s)}}})},decode:function(p){var q,r,o;if(/&[\w#]+;/.test(p)){q=this.doc.createElement("div");q.innerHTML=p;r=q.firstChild;o="";if(r){do{o+=r.nodeValue}while(r=r.nextSibling)}return o||p}return p},encode:function(o){return(""+o).replace(n,function(p){return c[p]})},insertAfter:function(o,p){p=this.get(p);return this.run(o,function(r){var q,s;q=p.parentNode;s=p.nextSibling;if(s){q.insertBefore(r,s)}else{q.appendChild(r)}return r})},isBlock:function(o){if(o.nodeType&&o.nodeType!==1){return false}o=o.nodeName||o;return a.test(o)},replace:function(s,r,p){var q=this;if(j(r,"array")){s=s.cloneNode(true)}return q.run(r,function(t){if(p){k(m.grep(t.childNodes),function(o){s.appendChild(o)})}return t.parentNode.replaceChild(s,t)})},rename:function(r,o){var q=this,p;if(r.nodeName!=o.toUpperCase()){p=q.create(o);k(q.getAttribs(r),function(s){q.setAttrib(p,s.nodeName,q.getAttrib(r,s.nodeName))});q.replace(p,r,1)}return p||r},findCommonAncestor:function(q,o){var r=q,p;while(r){p=o;while(p&&r!=p){p=p.parentNode}if(r==p){break}r=r.parentNode}if(!r&&q.ownerDocument){return q.ownerDocument.documentElement}return r},toHex:function(o){var q=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(o);function p(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}if(q){o="#"+p(q[1])+p(q[2])+p(q[3]);return o}return o},getClasses:function(){var s=this,o=[],r,u={},v=s.settings.class_filter,q;if(s.classes){return s.classes}function x(t){k(t.imports,function(y){x(y)});k(t.cssRules||t.rules,function(y){switch(y.type||1){case 1:if(y.selectorText){k(y.selectorText.split(","),function(z){z=z.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(z)||!/\.[\w\-]+$/.test(z)){return}q=z;z=z.replace(/.*\.([a-z0-9_\-]+).*/i,"$1");if(v&&!(z=v(z,q))){return}if(!u[z]){o.push({"class":z});u[z]=1}})}break;case 3:x(y.styleSheet);break}})}try{k(s.doc.styleSheets,x)}catch(p){}if(o.length>0){s.classes=o}return o},run:function(u,r,q){var p=this,v;if(p.doc&&typeof(u)==="string"){u=p.get(u)}if(!u){return false}q=q||this;if(!u.nodeType&&(u.length||u.length===0)){v=[];k(u,function(s,o){if(s){if(typeof(s)=="string"){s=p.doc.getElementById(s)}v.push(r.call(q,s,o))}});return v}return r.call(q,u)},getAttribs:function(q){var p;q=this.get(q);if(!q){return[]}if(d){p=[];if(q.nodeName=="OBJECT"){return q.attributes}if(q.nodeName==="OPTION"&&this.getAttrib(q,"selected")){p.push({specified:1,nodeName:"selected"})}q.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(o){p.push({specified:1,nodeName:o})});return p}return q.attributes},destroy:function(p){var o=this;if(o.events){o.events.destroy()}o.win=o.doc=o.root=o.events=null;if(!p){m.removeUnload(o.destroy)}},createRng:function(){var o=this.doc;return o.createRange?o.createRange():new m.dom.Range(this)},nodeIndex:function(s,t){var o=0,q,r,p;if(s){for(q=s.nodeType,s=s.previousSibling,r=s;s;s=s.previousSibling){p=s.nodeType;if(t&&p==3){if(p==q||!s.nodeValue.length){continue}}o++;q=p}}return o},split:function(u,s,y){var z=this,o=z.createRng(),v,q,x;function p(A){var t,r=A.childNodes;if(A.nodeType==1&&A.getAttribute("_mce_type")=="bookmark"){return}for(t=r.length-1;t>=0;t--){p(r[t])}if(A.nodeType!=9){if(A.nodeType==3&&A.nodeValue.length>0){return}if(A.nodeType==1){r=A.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("_mce_type")=="bookmark"){A.parentNode.insertBefore(r[0],A)}if(r.length||/^(br|hr|input|img)$/i.test(A.nodeName)){return}}z.remove(A)}return A}if(u&&s){o.setStart(u.parentNode,z.nodeIndex(u));o.setEnd(s.parentNode,z.nodeIndex(s));v=o.extractContents();o=z.createRng();o.setStart(s.parentNode,z.nodeIndex(s)+1);o.setEnd(u.parentNode,z.nodeIndex(u)+1);q=o.extractContents();x=u.parentNode;x.insertBefore(p(v),u);if(y){x.replaceChild(y,s)}else{x.insertBefore(s,u)}x.insertBefore(p(q),u);z.remove(u);return y||s}},bind:function(s,o,r,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.add(s,o,r,q||this)},unbind:function(r,o,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.remove(r,o,q)},_findSib:function(r,o,p){var q=this,s=o;if(r){if(j(s,"string")){s=function(t){return q.is(t,o)}}for(r=r[p];r;r=r[p]){if(s(r)){return r}}}return null},_isRes:function(o){return/^(top|left|bottom|right|width|height)/i.test(o)||/;\s*(top|left|bottom|right|width|height)/i.test(o)}});m.DOM=new m.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(W,X){var Z=N[h],Y=N[U],V=N[P],t=N[z];if(W===0){return G(Z,Y,Z,Y)}if(W===1){return G(Z,Y,V,t)}if(W===2){return G(V,t,V,t)}if(W===3){return G(V,t,Z,Y)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(g){var i=this,j="\uFEFF",e,h,d=g.dom,c=true,f=false;function b(){var n=g.getRng(),k=d.createRng(),m,o;m=n.item?n.item(0):n.parentElement();if(m.ownerDocument!=d.doc){return k}if(n.item||!m.hasChildNodes()){k.setStart(m.parentNode,d.nodeIndex(m));k.setEnd(k.startContainer,k.startOffset+1);return k}o=g.isCollapsed();function l(s){var u,q,t,p,A=0,x,y,z,r,v;r=n.duplicate();r.collapse(s);u=d.create("a");z=r.parentElement();if(!z.hasChildNodes()){k[s?"setStart":"setEnd"](z,0);return}z.appendChild(u);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){k[s?"setStartAfter":"setEndAfter"](z);d.remove(u);return}p=tinymce.grep(z.childNodes);x=p.length-1;while(A<=x){y=Math.floor((A+x)/2);z.insertBefore(u,p[y]);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){A=y+1}else{if(v<0){x=y-1}else{found=true;break}}}q=v>0||y==0?u.nextSibling:u.previousSibling;if(q.nodeType==1){d.remove(u);t=d.nodeIndex(q);q=q.parentNode;if(!s||y>0){t++}}else{if(v>0||y==0){r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=r.text.length}else{r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=q.nodeValue.length-r.text.length}d.remove(u)}k[s?"setStart":"setEnd"](q,t)}l(true);if(!o){l()}return k}this.addRange=function(l){var t,A,z=g.dom.doc,r=z.body,u,n,y,o,s,k,p,q,x,m;this.destroy();y=l.startContainer;o=l.startOffset;s=l.endContainer;k=l.endOffset;t=r.createTextRange();if(y==z||s==z){t=r.createTextRange();t.collapse();t.select();return}if(y.nodeType==1&&y.hasChildNodes()){q=y.childNodes.length-1;if(o>q){x=1;y=y.childNodes[q]}else{y=y.childNodes[o]}if(y.nodeType==3){o=0}}if(s.nodeType==1&&s.hasChildNodes()){q=s.childNodes.length-1;if(k==0){m=1;s=s.childNodes[0]}else{s=s.childNodes[Math.min(q,k-1)];if(s.nodeType==3){k=s.nodeValue.length}}}if(y==s&&y.nodeType==1){if(/^(IMG|TABLE)$/.test(y.nodeName)&&o!=k){t=r.createControlRange();t.addElement(y)}else{t=r.createTextRange();if(!y.hasChildNodes()&&y.canHaveHTML){y.innerHTML=j}t.moveToElementText(y);if(y.innerHTML==j){t.collapse(c);y.removeChild(y.firstChild)}}if(o==k){t.collapse(k<=l.endContainer.childNodes.length-1)}t.select();t.scrollIntoView();return}t=r.createTextRange();p=z.createElement("span");p.innerHTML=" ";if(y.nodeType==3){if(x){d.insertAfter(p,y)}else{y.parentNode.insertBefore(p,y)}t.moveToElementText(p);p.parentNode.removeChild(p);if(o>0){t.move("character",o)}}else{t.moveToElementText(y);if(x){t.collapse(f)}}if(y==s&&y.nodeType==3){try{t.moveEnd("character",k-o);t.select();t.scrollIntoView()}catch(v){}return}A=r.createTextRange();if(s.nodeType==3){s.parentNode.insertBefore(p,s);A.moveToElementText(p);p.parentNode.removeChild(p);A.move("character",k);t.setEndPoint("EndToStart",A)}else{A.moveToElementText(s);A.collapse(!!m);t.setEndPoint("EndToEnd",A)}t.select();t.scrollIntoView()};this.getRangeAt=function(){if(!e||!tinymce.dom.RangeUtils.compareRanges(h,g.getRng())){e=b();h=g.getRng()}try{e.startContainer.nextSibling}catch(k){e=b();h=null}return e};this.destroy=function(){h=e=null};if(g.dom.boxModel){(function(){var q=d.doc,l=q.body,n,o;q.documentElement.unselectable=c;function p(r,u){var s=l.createTextRange();try{s.moveToPoint(r,u)}catch(t){s=null}return s}function m(s){var r;if(s.button){r=p(s.x,s.y);if(r){if(r.compareEndPoints("StartToStart",o)>0){r.setEndPoint("StartToStart",o)}else{r.setEndPoint("EndToEnd",o)}r.select()}}else{k()}}function k(){d.unbind(q,"mouseup",k);d.unbind(q,"mousemove",m);n=0}d.bind(q,"mousedown",function(r){if(r.target.nodeName==="HTML"){if(n){k()}n=1;o=p(r.x,r.y);if(o){d.bind(q,"mouseup",k);d.bind(q,"mousemove",m);o.select()}}})})()}}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,j=0,d=Object.prototype.toString,o=false,i=true;[0,0].sort(function(){i=false;return 0});var b=function(v,e,z,A){z=z||[];e=e||document;var C=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!v||typeof v!=="string"){return z}var x=[],s,E,H,r,u=true,t=b.isXML(e),B=v,D,G,F,y;do{p.exec("");s=p.exec(B);if(s){B=s[3];x.push(s[1]);if(s[2]){r=s[3];break}}}while(s);if(x.length>1&&k.exec(v)){if(x.length===2&&f.relative[x[0]]){E=h(x[0]+x[1],e)}else{E=f.relative[x[0]]?[e]:b(x.shift(),e);while(x.length){v=x.shift();if(f.relative[v]){v+=x.shift()}E=h(v,E)}}}else{if(!A&&x.length>1&&e.nodeType===9&&!t&&f.match.ID.test(x[0])&&!f.match.ID.test(x[x.length-1])){D=b.find(x.shift(),e,t);e=D.expr?b.filter(D.expr,D.set)[0]:D.set[0]}if(e){D=A?{expr:x.pop(),set:a(A)}:b.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&e.parentNode?e.parentNode:e,t);E=D.expr?b.filter(D.expr,D.set):D.set;if(x.length>0){H=a(E)}else{u=false}while(x.length){G=x.pop();F=G;if(!f.relative[G]){G=""}else{F=x.pop()}if(F==null){F=e}f.relative[G](H,F,t)}}else{H=x=[]}}if(!H){H=E}if(!H){b.error(G||v)}if(d.call(H)==="[object Array]"){if(!u){z.push.apply(z,H)}else{if(e&&e.nodeType===1){for(y=0;H[y]!=null;y++){if(H[y]&&(H[y]===true||H[y].nodeType===1&&b.contains(e,H[y]))){z.push(E[y])}}}else{for(y=0;H[y]!=null;y++){if(H[y]&&H[y].nodeType===1){z.push(E[y])}}}}}else{a(H,z)}if(r){b(r,C,z,A);b.uniqueSort(z)}return z};b.uniqueSort=function(r){if(c){o=i;r.sort(c);if(o){for(var e=1;e":function(x,r){var u=typeof r==="string",v,s=0,e=x.length;if(u&&!/\W/.test(r)){r=r.toLowerCase();for(;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){return r[1].toLowerCase()},CHILD:function(e){if(e[1]==="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=j++;return e},ATTR:function(u,r,s,e,v,x){var t=u[1].replace(/\\/g,"");if(!x&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if((p.exec(u[3])||"").length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0===r},eq:function(s,r,e){return e[3]-0===r}},filter:{PSEUDO:function(s,y,x,z){var e=y[1],r=f.filters[e];if(r){return r(s,x,y,z)}else{if(e==="contains"){return(s.textContent||s.innerText||b.getText([s])||"").indexOf(y[3])>=0}else{if(e==="not"){var t=y[3];for(var v=0,u=t.length;v=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName.toLowerCase()===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),x=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?x===r:u==="*="?x.indexOf(r)>=0:u==="~="?(" "+x+" ").indexOf(r)>=0:!r?x&&e!==false:u==="!="?x!==r:u==="^="?x.indexOf(r)===0:u==="$="?x.substr(x.length-r.length)===r:u==="|="?x===r||x.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var k=f.match.POS,g=function(r,e){return"\\"+(e-0+1)};for(var m in f.match){f.match[m]=new RegExp(f.match[m].source+(/(?![^\[]*\])(?![^\(]*\))/.source));f.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+f.match[m].source.replace(/\\(\d+)/g,g))}var a=function(r,e){r=Array.prototype.slice.call(r,0);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(l){a=function(u,t){var r=t||[],s=0;if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(document.getElementById(s)){f.find.ID=function(u,v,x){if(typeof v.getElementById!=="undefined"&&!x){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r);e=r=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

    ";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(x,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!b.isXML(v)){try{return a(v.querySelectorAll(x),t)}catch(y){}}return e(x,v,t,u)};for(var r in e){b[r]=e[r]}s=null})()}(function(){var e=document.createElement("div");e.innerHTML="
    ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}};e=null})();function n(r,x,v,A,y,z){for(var t=0,s=A.length;t0){u=e;break}}}e=e[r]}A[t]=u}}}b.contains=document.compareDocumentPosition?function(r,e){return !!(r.compareDocumentPosition(e)&16)}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};b.isXML=function(e){var r=(e?e.ownerDocument||e:0).documentElement;return r?r.nodeName!=="HTML":false};var h=function(e,y){var t=[],u="",v,s=y.nodeType?[y]:y;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var x=0,r=s.length;x=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j_';if(j.startContainer==k&&j.endContainer==k){k.body.innerHTML=i}else{j.deleteContents();if(k.body.childNodes.length==0){k.body.innerHTML=i}else{j.insertNode(j.createContextualFragment(i))}}l=f.dom.get("__caret");j=k.createRange();j.setStartBefore(l);j.setEndBefore(l);f.setRng(j);f.dom.remove("__caret")}else{if(j.item){k.execCommand("Delete",false,null);j=f.getRng()}j.pasteHTML(i)}f.onSetContent.dispatch(f,g)},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}if(h&&h.nodeName=="BODY"){return h.firstChild||h}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(q,r){var u=this,m=u.dom,g,j,i,n,h,o,p,l="\uFEFF",s;function f(v,x){var t=0;d(m.select(v),function(z,y){if(z==x){t=y}});return t}if(q==2){function k(){var v=u.getRng(true),t=m.getRoot(),x={};function y(B,G){var A=B[G?"startContainer":"endContainer"],F=B[G?"startOffset":"endOffset"],z=[],C,E,D=0;if(A.nodeType==3){if(r){for(C=A.previousSibling;C&&C.nodeType==3;C=C.previousSibling){F+=C.nodeValue.length}}z.push(F)}else{E=A.childNodes;if(F>=E.length&&E.length){D=1;F=Math.max(0,E.length-1)}z.push(u.dom.nodeIndex(E[F],r)+D)}for(;A&&A!=t;A=A.parentNode){z.push(u.dom.nodeIndex(A,r))}return z}x.start=y(v,true);if(!u.isCollapsed()){x.end=y(v)}return x}return k()}if(q){return{rng:u.getRng()}}g=u.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();s="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);j.pasteHTML(''+l+"")}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=u.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_end",style:s},l))}g.collapse(true);g.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_start",style:s},l))}u.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(r.tridentSel){r.tridentSel.destroy()}if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(u.length){x=u[t[v]]}}if(z){f.setStart(x,t[0])}else{f.setEnd(x,t[0])}}}g(true);g();r.setRng(f)}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(!a&&l.isBlock(t)&&!t.innerHTML){t.innerHTML='
    '}return t}k("start");k("end");f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g);return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var g=this,h=g.getRng(),i;if(h.item){i=h.item(0);h=this.win.document.body.createTextRange();h.moveToElementText(i)}h.collapse(!!f);g.setRng(h)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(j){var g=this,h,i;if(j&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():g.win.document.createRange())}}catch(f){}if(!i){i=g.win.document.createRange?g.win.document.createRange():g.win.document.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;h.removeAllRanges();h.addRange(i);g.selectedRange=h.getRangeAt(0)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var g=this,f=g.getRng(),h=g.getSel(),i;if(f.setStart){if(!f){return g.dom.getRoot()}i=f.commonAncestorContainer;if(!f.collapsed){if(f.startContainer==f.endContainer){if(f.startOffset-f.endOffset<2){if(f.startContainer.hasChildNodes()){i=f.startContainer.childNodes[f.startOffset]}}}if(c.isWebKit&&h.anchorNode&&h.anchorNode.nodeType==1){return h.anchorNode.childNodes[h.anchorOffset]}}if(i&&i.nodeType==3){return i.parentNode}return i}return f.item?f.item(0):f.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}}})})(tinymce);(function(a){a.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(c){function b(){var e=document.implementation;if(!e||!e.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(d){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(d){}}else{return e.createDocument("","",null)}}this.doc=b();this.valid=a.isOpera||a.isWebKit;this.reset()},reset:function(){var b=this,c=b.doc;if(c.firstChild){c.removeChild(c.firstChild)}b.node=c.appendChild(c.createElement("html"))},writeStartElement:function(c){var b=this;b.node=b.node.appendChild(b.doc.createElement(c))},writeAttribute:function(c,b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.setAttribute(c,b)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var b=this,c=b.node;c.appendChild(b.doc.createTextNode(""));b.node=c.parentNode},writeText:function(b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.appendChild(this.doc.createTextNode(b))},writeCDATA:function(b){this.node.appendChild(this.doc.createCDATASection(b))},writeComment:function(b){if(a.isIE){b=b.replace(/^\-|\-$/g," ")}this.node.appendChild(this.doc.createComment(b.replace(/\-\-/g," ")))},getContent:function(){var b;b=this.doc.xml||new XMLSerializer().serializeToString(this.doc);b=b.replace(/<\?[^?]+\?>||<\/html>||]+>/g,"");b=b.replace(/ ?\/>/g," />");if(this.valid){b=b.replace(/\%MCGT%/g,">")}return b}})})(tinymce);(function(a){a.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(b){this.settings=a.extend({indent_char:" ",indentation:0},b);this.reset()},reset:function(){this.indent="";this.str="";this.tags=[];this.count=0},writeStartElement:function(b){this._writeAttributesEnd();this.writeRaw("<"+b);this.tags.push(b);this.inAttr=true;this.count++;this.elementCount=this.count},writeAttribute:function(d,b){var c=this;c.writeRaw(" "+c.encode(d)+'="'+c.encode(b)+'"')},writeEndElement:function(){var b;if(this.tags.length>0){b=this.tags.pop();if(this._writeAttributesEnd(1)){this.writeRaw("")}if(this.settings.indentation>0){this.writeRaw("\n")}}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("");if(this.settings.indentation>0){this.writeRaw("\n")}}},writeText:function(b){this._writeAttributesEnd();this.writeRaw(this.encode(b));this.count++},writeCDATA:function(b){this._writeAttributesEnd();this.writeRaw("");this.count++},writeComment:function(b){this._writeAttributesEnd();this.writeRaw("");this.count++},writeRaw:function(b){this.str+=b},encode:function(b){return b.replace(/[<>&"]/g,function(c){switch(c){case"<":return"<";case">":return">";case"&":return"&";case'"':return"""}return c})},getContent:function(){return this.str},_writeAttributesEnd:function(b){if(!this.inAttr){return}this.inAttr=false;if(b&&this.elementCount==this.count){this.writeRaw(" />");return false}this.writeRaw(">");return true}})})(tinymce);(function(e){var g=e.extend,f=e.each,b=e.util.Dispatcher,d=e.isIE,a=e.isGecko;function c(h){return h.replace(/([?+*])/g,".$1")}e.create("tinymce.dom.Serializer",{Serializer:function(j){var i=this;i.key=0;i.onPreProcess=new b(i);i.onPostProcess=new b(i);try{i.writer=new e.dom.XMLWriter()}catch(h){i.writer=new e.dom.StringWriter()}i.settings=j=g({dom:e.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(_mce_|_moz_|sizset|sizcache)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",valid_elements:"*[*]",extended_valid_elements:0,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},j);i.dom=j.dom;i.schema=j.schema;if(j.entity_encoding=="named"&&!j.entities){j.entity_encoding="raw"}if(j.remove_redundant_brs){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/(
    \s*)+<\/(p|h[1-6]|div|li)>/gi,function(n,m,o){if(/^
    \s*<\//.test(n)){return""}return n})})}if(j.element_format=="html"){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/<([^>]+) \/>/g,"<$1>")})}if(j.fix_list_elements){i.onPreProcess.add(function(v,s){var l,z,y=["ol","ul"],u,t,q,k=/^(OL|UL)$/,A;function m(r,x){var o=x.split(","),p;while((r=r.previousSibling)!=null){for(p=0;p=1767){f(i.dom.select("p table",l.node).reverse(),function(p){var o=i.dom.getParent(p.parentNode,"table,p");if(o.nodeName!="TABLE"){try{i.dom.split(o,p)}catch(m){}}})}})}},setEntities:function(o){var n=this,j,m,h={},k;if(n.entityLookup){return}j=o.split(",");for(m=0;m1){f(q[1].split("|"),function(u){var p={},t;k=k||[];u=u.replace(/::/g,"~");u=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(u);u[2]=u[2].replace(/~/g,":");if(u[1]=="!"){r=r||[];r.push(u[2])}if(u[1]=="-"){for(t=0;t=1767)){p=j.createHTMLDocument("");f(r.nodeName=="BODY"?r.childNodes:[r],function(h){p.body.appendChild(p.importNode(h,true))});if(r.nodeName!="BODY"){r=p.body.firstChild}else{r=p.body}i=k.dom.doc;k.dom.doc=p}k.key=""+(parseInt(k.key)+1);if(!q.no_events){q.node=r;k.onPreProcess.dispatch(k,q)}k.writer.reset();k._info=q;k._serializeNode(r,q.getInner);q.content=k.writer.getContent();if(i){k.dom.doc=i}if(!q.no_events){k.onPostProcess.dispatch(k,q)}k._postProcess(q);q.node=null;return e.trim(q.content)},_postProcess:function(n){var i=this,k=i.settings,j=n.content,m=[],l;if(n.format=="html"){l=i._protect({content:j,patterns:[{pattern:/(]*>)(.*?)(<\/script>)/g},{pattern:/(]*>)(.*?)(<\/noscript>)/g},{pattern:/(]*>)(.*?)(<\/style>)/g},{pattern:/(]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/()/g}]});j=l.content;if(k.entity_encoding!=="raw"){j=i._encode(j)}if(!n.set){j=j.replace(/

    \s+<\/p>|]+)>\s+<\/p>/g,k.entity_encoding=="numeric"?" 

    ":" 

    ");if(k.remove_linebreaks){j=j.replace(/\r?\n|\r/g," ");j=j.replace(/(<[^>]+>)\s+/g,"$1 ");j=j.replace(/\s+(<\/[^>]+>)/g," $1");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,"<$1 $2>");j=j.replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>");j=j.replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"")}if(k.apply_source_formatting&&k.indent_mode=="simple"){j=j.replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n");j=j.replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>");j=j.replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"\n");j=j.replace(/\n\n/g,"\n")}}j=i._unprotect(j,l);j=j.replace(//g,"");if(k.entity_encoding=="raw"){j=j.replace(/

     <\/p>|]+)> <\/p>/g,"\u00a0

    ")}j=j.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(h,p,o){return""+i.dom.decode(o.replace(//g,""))+""})}n.content=j},_serializeNode:function(D,I){var z=this,A=z.settings,x=z.writer,q,j,u,F,E,H,B,h,y,k,r,C,p,m,G,o;if(!A.node_filter||A.node_filter(D)){switch(D.nodeType){case 1:if(D.hasAttribute?D.hasAttribute("_mce_bogus"):D.getAttribute("_mce_bogus")){return}p=G=false;q=D.hasChildNodes();k=D.getAttribute("_mce_name")||D.nodeName.toLowerCase();o=D.getAttribute("_mce_type");if(o){if(!z._info.cleanup){p=true;return}else{G=1}}if(d){if(D.scopeName!=="HTML"&&D.scopeName!=="html"){k=D.scopeName+":"+k}}if(k.indexOf("mce:")===0){k=k.substring(4)}if(!G){if(!z.validElementsRE||!z.validElementsRE.test(k)||(z.invalidElementsRE&&z.invalidElementsRE.test(k))||I){p=true;break}}if(d){if(A.fix_content_duplication){if(D._mce_serialized==z.key){return}D._mce_serialized=z.key}if(k.charAt(0)=="/"){k=k.substring(1)}}else{if(a){if(D.nodeName==="BR"&&D.getAttribute("type")=="_moz"){return}}}if(A.validate_children){if(z.elementName&&!z.schema.isValid(z.elementName,k)){p=true;break}z.elementName=k}r=z.findRule(k);if(!r){p=true;break}k=r.name||k;m=A.closed.test(k);if((!q&&r.noEmpty)||(d&&!k)){p=true;break}if(r.requiredAttribs){H=r.requiredAttribs;for(F=H.length-1;F>=0;F--){if(this.dom.getAttrib(D,H[F])!==""){break}}if(F==-1){p=true;break}}x.writeStartElement(k);if(r.attribs){for(F=0,B=r.attribs,E=B.length;F-1;F--){h=B[F];if(h.specified){H=h.nodeName.toLowerCase();if(A.invalid_attrs.test(H)||!r.validAttribsRE.test(H)){continue}C=z.findAttribRule(r,H);y=z._getAttrib(D,C,H);if(y!==null){x.writeAttribute(H,y)}}}}if(o&&G){x.writeAttribute("_mce_type",o)}if(k==="script"&&e.trim(D.innerHTML)){x.writeText("// ");x.writeCDATA(D.innerHTML.replace(/|<\[CDATA\[|\]\]>/g,""));q=false;break}if(r.padd){if(q&&(u=D.firstChild)&&u.nodeType===1&&D.childNodes.length===1){if(u.hasAttribute?u.hasAttribute("_mce_bogus"):u.getAttribute("_mce_bogus")){x.writeText("\u00a0")}}else{if(!q){x.writeText("\u00a0")}}}break;case 3:if(A.validate_children&&z.elementName&&!z.schema.isValid(z.elementName,"#text")){return}return x.writeText(D.nodeValue);case 4:return x.writeCDATA(D.nodeValue);case 8:return x.writeComment(D.nodeValue)}}else{if(D.nodeType==1){q=D.hasChildNodes()}}if(q&&!m){u=D.firstChild;while(u){z._serializeNode(u);z.elementName=k;u=u.nextSibling}}if(!p){if(!m){x.writeFullEndElement()}else{x.writeEndElement()}}},_protect:function(j){var i=this;j.items=j.items||[];function h(l){return l.replace(/[\r\n\\]/g,function(m){if(m==="\n"){return"\\n"}else{if(m==="\\"){return"\\\\"}}return"\\r"})}function k(l){return l.replace(/\\[\\rn]/g,function(m){if(m==="\\n"){return"\n"}else{if(m==="\\\\"){return"\\"}}return"\r"})}f(j.patterns,function(l){j.content=k(h(j.content).replace(l.pattern,function(n,o,m,p){m=k(m);if(l.encode){m=i._encode(m)}j.items.push(m);return o+""+p}))});return j},_unprotect:function(i,j){i=i.replace(/\"))}if(a&&j.ListBox){if(a.Button||a.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,""))}}if(b.stdMode){e+='
    '+j.renderHTML()+""+j.renderHTML()+"
    text|text2

    text|text2