Merge commit 'upstream/master'
|
@ -1,13 +1,10 @@
|
|||
#Options -Indexes
|
||||
Options -Indexes
|
||||
AddType application/x-java-archive .jar
|
||||
AddType audio/ogg .oga
|
||||
|
||||
<FilesMatch "\.(out|log)$">
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
<Files "(include|library)">
|
||||
Deny from all
|
||||
</Files>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
|
|
32
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.1294' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||
define ( 'DB_UPDATE_VERSION', 1131 );
|
||||
define ( 'DB_UPDATE_VERSION', 1133 );
|
||||
|
||||
define ( 'EOL', "<br />\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
|
@ -135,6 +135,9 @@ define ( 'NOTIFY_PROFILE', 0x0040 );
|
|||
define ( 'NOTIFY_TAGSELF', 0x0080 );
|
||||
define ( 'NOTIFY_TAGSHARE', 0x0100 );
|
||||
|
||||
define ( 'NOTIFY_SYSTEM', 0x8000 );
|
||||
|
||||
|
||||
/**
|
||||
* various namespaces we may need to parse
|
||||
*/
|
||||
|
@ -286,7 +289,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'];
|
||||
|
@ -380,7 +388,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.
|
||||
|
@ -555,6 +563,10 @@ function absurl($path) {
|
|||
return $path;
|
||||
}
|
||||
|
||||
function is_ajax() {
|
||||
return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
|
||||
}
|
||||
|
||||
|
||||
// Primarily involved with database upgrade, but also sets the
|
||||
// base url for use in cmdline programs which don't have
|
||||
|
@ -708,15 +720,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(
|
||||
|
||||
|
@ -1372,6 +1385,11 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
$arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
|
||||
call_hooks('profile_tabs', $arr);
|
||||
|
||||
$tpl = get_markup_template('common_tabs.tpl');
|
||||
return replace_macros($tpl,array('$tabs'=>$tabs));
|
||||
|
||||
return replace_macros($tpl,array('$tabs' => $arr['tabs']));
|
||||
}}
|
||||
|
|
|
@ -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`)
|
||||
|
@ -859,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;
|
||||
|
||||
|
|
BIN
images/blank.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/person-175.jpg
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
images/person-48.jpg
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/person-80.jpg
Normal file
After Width: | Height: | Size: 2.2 KiB |
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -114,10 +114,12 @@ function contact_selector($selname, $selclass, $preselected = false, $options) {
|
|||
$sql_extra .= " AND `network` IN ( $str_nets ) ";
|
||||
}
|
||||
|
||||
$tabindex = (x($options, 'tabindex') ? "tabindex=\"" . $options["tabindex"] . "\"" : "");
|
||||
|
||||
if($x['single'])
|
||||
$o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"" . $x['size'] . "\" >\r\n";
|
||||
$o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"" . $x['size'] . "\" $tabindex >\r\n";
|
||||
else
|
||||
$o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"" . $x['size'] . "$\" >\r\n";
|
||||
$o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"" . $x['size'] . "$\" $tabindex >\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 .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" >\r\n";
|
||||
$o .= "<select name=\"$selname\" id=\"$selclass\" class=\"$selclass\" size=\"$size\" $tabindex >\r\n";
|
||||
else
|
||||
$o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" >\r\n";
|
||||
$o .= "<select name=\"{$selname}[]\" id=\"$selclass\" class=\"$selclass\" multiple=\"multiple\" size=\"$size\" $tabindex >\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` != ''
|
||||
|
|
|
@ -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());
|
||||
|
@ -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,32 +99,12 @@ else {
|
|||
$openid->identity = $openid_url;
|
||||
$_SESSION['openid'] = $openid_url;
|
||||
$a = get_app();
|
||||
$openid->returnUrl = $a->get_baseurl() . '/openid';
|
||||
$openid->returnUrl = $a->get_baseurl(true) . '/openid';
|
||||
goaway($openid->authUrl());
|
||||
// NOTREACHED
|
||||
}
|
||||
}
|
||||
|
||||
$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
|
||||
}
|
||||
}
|
||||
}
|
||||
if((x($_POST,'auth-params')) && $_POST['auth-params'] === 'login') {
|
||||
|
||||
$record = null;
|
||||
|
@ -165,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());
|
||||
}
|
||||
|
|
|
@ -15,8 +15,6 @@ function findpeople_widget() {
|
|||
|
||||
$a = get_app();
|
||||
|
||||
$inv = (($a->config['register_policy'] != REGISTER_CLOSED) ? t('Invite Friends') : '');
|
||||
|
||||
if(get_config('system','invitation_only')) {
|
||||
$x = get_pconfig(local_user(),'system','invites_remaining');
|
||||
if($x || is_site_admin()) {
|
||||
|
@ -34,7 +32,7 @@ function findpeople_widget() {
|
|||
'$findthem' => t('Find'),
|
||||
'$suggest' => t('Friend Suggestions'),
|
||||
'$similar' => t('Similar Interests'),
|
||||
'$inv' => $inv
|
||||
'$inv' => t('Invite Friends')
|
||||
));
|
||||
|
||||
}
|
||||
|
@ -48,7 +46,7 @@ function networks_widget($baseurl,$selected = '') {
|
|||
return '';
|
||||
|
||||
|
||||
$r = q("select distinct(network) from contact where uid = %d",
|
||||
$r = q("select distinct(network) from contact where uid = %d and self = 0",
|
||||
intval(local_user())
|
||||
);
|
||||
|
||||
|
|
|
@ -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)),
|
||||
|
@ -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(
|
||||
|
@ -886,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?')
|
||||
));
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
require_once('include/datetime.php');
|
||||
|
||||
/**
|
||||
*
|
||||
* MySQL database class
|
||||
|
@ -104,7 +106,6 @@ class dba {
|
|||
|
||||
logger('dba: ' . $str );
|
||||
}
|
||||
else {
|
||||
|
||||
/**
|
||||
* If dbfail.out exists, we will write any failed calls directly to it,
|
||||
|
@ -115,8 +116,7 @@ class dba {
|
|||
if($result === false) {
|
||||
logger('dba: ' . printable($sql) . ' returned false.');
|
||||
if(file_exists('dbfail.out'))
|
||||
file_put_contents('dbfail.out', printable($sql) . ' returned false' . "\n", FILE_APPEND);
|
||||
}
|
||||
file_put_contents('dbfail.out', datetime_convert() . "\n" . printable($sql) . ' returned false' . "\n", FILE_APPEND);
|
||||
}
|
||||
|
||||
if(($result === true) || ($result === false))
|
||||
|
@ -140,7 +140,7 @@ class dba {
|
|||
|
||||
|
||||
if($this->debug)
|
||||
logger('dba: ' . printable(print_r($r, true)), LOGGER_DATA);
|
||||
logger('dba: ' . printable(print_r($r, true)));
|
||||
return($r);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) ? '<dfrn:community>1</dfrn:community>' : '')
|
||||
));
|
||||
|
||||
foreach($items as $item) {
|
||||
|
|
|
@ -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'] . '/' . $message_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;
|
||||
}
|
||||
|
||||
|
@ -1695,7 +1737,7 @@ function diaspora_retraction($importer,$xml) {
|
|||
contact_remove($contact['id']);
|
||||
}
|
||||
elseif($type === 'Post') {
|
||||
$r = q("select * from item where guid = '%s' and uid = %d limit 1",
|
||||
$r = q("select * from item where guid = '%s' and uid = %d and not file like '%%[%%' limit 1",
|
||||
dbesc('guid'),
|
||||
intval($importer['uid'])
|
||||
);
|
||||
|
@ -1743,7 +1785,7 @@ function diaspora_signed_retraction($importer,$xml,$msg) {
|
|||
}
|
||||
|
||||
if($type === 'StatusMessage') {
|
||||
$r = q("select * from item where guid = '%s' and uid = %d limit 1",
|
||||
$r = q("select * from item where guid = '%s' and uid = %d and not file like '%%[%%' limit 1",
|
||||
dbesc($guid),
|
||||
intval($importer['uid'])
|
||||
);
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -5,6 +5,12 @@ function notification($params) {
|
|||
logger('notification: entry', LOGGER_DEBUG);
|
||||
|
||||
$a = get_app();
|
||||
|
||||
// from here on everything is in the recipients language
|
||||
|
||||
push_lang($params['language']);
|
||||
|
||||
|
||||
$banner = t('Friendica Notification');
|
||||
$product = FRIENDICA_PLATFORM;
|
||||
$siteurl = z_path();
|
||||
|
@ -153,9 +159,33 @@ function notification($params) {
|
|||
|
||||
}
|
||||
|
||||
// from here on everything is in the recipients language
|
||||
if($params['type'] == NOTIFY_SYSTEM) {
|
||||
|
||||
}
|
||||
|
||||
$h = array(
|
||||
'params' => $params,
|
||||
'subject' => $subject,
|
||||
'preamble' => $preamble,
|
||||
'epreamble' => $epreamble,
|
||||
'body' => $body,
|
||||
'sitelink' => $sitelink,
|
||||
'tsitelink' => $tsitelink,
|
||||
'hsitelink' => $hsitelink,
|
||||
'itemlink' => $itemlink
|
||||
);
|
||||
|
||||
call_hooks('enotify',$h);
|
||||
|
||||
$subject = $h['subject'];
|
||||
$preamble = $h['preamble'];
|
||||
$epreamble = $h['epreamble'];
|
||||
$body = $h['body'];
|
||||
$sitelink = $h['sitelink'];
|
||||
$tsitelink = $h['tsitelink'];
|
||||
$hsitelink = $h['hsitelink'];
|
||||
$itemlink = $h['itemlink'];
|
||||
|
||||
push_lang($params['language']);
|
||||
|
||||
require_once('include/html2bbcode.php');
|
||||
|
||||
|
@ -207,8 +237,10 @@ function notification($params) {
|
|||
);
|
||||
if($r)
|
||||
$notify_id = $r[0]['id'];
|
||||
else
|
||||
else {
|
||||
pop_lang();
|
||||
return;
|
||||
}
|
||||
|
||||
$itemlink = $a->get_baseurl() . '/notify/view/' . $notify_id;
|
||||
$msg = replace_macros($epreamble,array('$itemlink' => $itemlink));
|
||||
|
@ -219,11 +251,10 @@ function notification($params) {
|
|||
);
|
||||
|
||||
|
||||
|
||||
// send email notification if notification preferences permit
|
||||
|
||||
require_once('bbcode.php');
|
||||
if(intval($params['notify_flags']) & intval($params['type'])) {
|
||||
if((intval($params['notify_flags']) & intval($params['type'])) || $params['type'] == NOTIFY_SYSTEM) {
|
||||
|
||||
logger('notification: sending notification email');
|
||||
|
||||
|
|
|
@ -7,13 +7,10 @@ require_once('include/crypto.php');
|
|||
|
||||
function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) {
|
||||
|
||||
// default permissions - anonymous user
|
||||
|
||||
if(! strlen($owner_nick))
|
||||
killme();
|
||||
|
||||
$sitefeed = ((strlen($owner_nick)) ? false : true); // not yet implemented, need to rewrite huge chunks of following logic
|
||||
$public_feed = (($dfrn_id) ? false : true);
|
||||
$starred = false;
|
||||
$starred = false; // not yet implemented, possible security issues
|
||||
$converse = false;
|
||||
|
||||
if($public_feed && $a->argc > 2) {
|
||||
|
@ -25,10 +22,11 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
|
|||
}
|
||||
}
|
||||
|
||||
// default permissions - anonymous user
|
||||
|
||||
$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 +154,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)) ? '<dfrn:birthday>' . xmlify($birthday) . '</dfrn:birthday>' : '')
|
||||
'$birthday' => ((strlen($birthday)) ? '<dfrn:birthday>' . xmlify($birthday) . '</dfrn:birthday>' : ''),
|
||||
'$community' => (($owner['page-flags'] == PAGE_COMMUNITY) ? '<dfrn:community>1</dfrn:community>' : '')
|
||||
));
|
||||
|
||||
call_hooks('atom_feed', $atom);
|
||||
|
@ -1048,6 +1047,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 +1092,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 +1136,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));
|
||||
|
@ -1399,6 +1403,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
|
||||
|
||||
|
@ -1418,7 +1435,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
|
|||
}
|
||||
if($deleted && is_array($contact)) {
|
||||
$r = q("SELECT `item`.*, `contact`.`self` FROM `item` left join `contact` on `item`.`contact-id` = `contact`.`id`
|
||||
WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d LIMIT 1",
|
||||
WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1",
|
||||
dbesc($uri),
|
||||
intval($importer['uid']),
|
||||
intval($contact['id'])
|
||||
|
@ -1563,9 +1580,10 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
|
|||
|
||||
if(count($r)) {
|
||||
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
||||
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($datarray['title']),
|
||||
dbesc($datarray['body']),
|
||||
dbesc($datarray['tag']),
|
||||
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
||||
dbesc($item_id),
|
||||
intval($importer['uid'])
|
||||
|
@ -1708,9 +1726,10 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
|
|||
|
||||
if(count($r)) {
|
||||
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
||||
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($datarray['title']),
|
||||
dbesc($datarray['body']),
|
||||
dbesc($datarray['tag']),
|
||||
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
||||
dbesc($item_id),
|
||||
intval($importer['uid'])
|
||||
|
@ -1781,7 +1800,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
|
|||
// but otherwise there's a possible data mixup on the sender's system.
|
||||
// the tgroup delivery code called from item_store will correct it if it's a forum,
|
||||
// but we're going to unconditionally correct it here so that the post will always be owned by our contact.
|
||||
logger('local_delivery: Correcting item owner.', LOGGER_DEBUG);
|
||||
logger('consume_feed: Correcting item owner.', LOGGER_DEBUG);
|
||||
$datarray['owner-name'] = $contact['name'];
|
||||
$datarray['owner-link'] = $contact['url'];
|
||||
$datarray['owner-avatar'] = $contact['thumb'];
|
||||
|
@ -1877,6 +1896,14 @@ function local_delivery($importer,$data) {
|
|||
);
|
||||
if(count($r)) {
|
||||
$fid = $r[0]['id'];
|
||||
|
||||
// OK, we do. Do we already have an introduction for this person ?
|
||||
$r = q("select id from intro where uid = %d and fid = %d limit 1",
|
||||
intval($fsugg['uid']),
|
||||
intval($fid)
|
||||
);
|
||||
if(count($r))
|
||||
return 0;
|
||||
}
|
||||
if(! $fid)
|
||||
$r = q("INSERT INTO `fcontact` ( `name`,`url`,`photo`,`request` ) VALUES ( '%s', '%s', '%s', '%s' ) ",
|
||||
|
@ -1897,6 +1924,7 @@ function local_delivery($importer,$data) {
|
|||
else
|
||||
return 0;
|
||||
|
||||
|
||||
$hash = random_string();
|
||||
|
||||
$r = q("INSERT INTO `intro` ( `uid`, `fid`, `contact-id`, `note`, `hash`, `datetime`, `blocked` )
|
||||
|
@ -1983,6 +2011,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());
|
||||
|
||||
// process any deleted entries
|
||||
|
@ -2004,7 +2045,7 @@ function local_delivery($importer,$data) {
|
|||
if($deleted) {
|
||||
|
||||
$r = q("SELECT `item`.*, `contact`.`self` FROM `item` left join contact on `item`.`contact-id` = `contact`.`id`
|
||||
WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d LIMIT 1",
|
||||
WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1",
|
||||
dbesc($uri),
|
||||
intval($importer['importer_uid']),
|
||||
intval($importer['id'])
|
||||
|
@ -2021,6 +2062,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),
|
||||
|
@ -2299,9 +2341,10 @@ function local_delivery($importer,$data) {
|
|||
|
||||
if(count($r)) {
|
||||
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
||||
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($datarray['title']),
|
||||
dbesc($datarray['body']),
|
||||
dbesc($datarray['tag']),
|
||||
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
||||
dbesc($item_id),
|
||||
intval($importer['importer_uid'])
|
||||
|
@ -2464,9 +2507,10 @@ function local_delivery($importer,$data) {
|
|||
|
||||
if(count($r)) {
|
||||
if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) {
|
||||
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
$r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `tag` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($datarray['title']),
|
||||
dbesc($datarray['body']),
|
||||
dbesc($datarray['tag']),
|
||||
dbesc(datetime_convert('UTC','UTC',$datarray['edited'])),
|
||||
dbesc($item_id),
|
||||
intval($importer['importer_uid'])
|
||||
|
@ -2892,6 +2936,11 @@ function item_expire($uid,$days) {
|
|||
|
||||
foreach($r as $item) {
|
||||
|
||||
// don't expire filed items
|
||||
|
||||
if(strpos($item['file'],'[') !== false)
|
||||
continue;
|
||||
|
||||
// Only expire posts, not photos and photo comments
|
||||
|
||||
if($expire_photos==0 && strlen($item['resource-id']))
|
||||
|
|
|
@ -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'],
|
||||
);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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) ? '<dfrn:community>1</dfrn:community>' : '')
|
||||
|
||||
));
|
||||
|
||||
if($mail) {
|
||||
|
|
|
@ -38,7 +38,8 @@ function oembed_fetch_url($embedurl){
|
|||
$entries = $xpath->query("//link[@type='application/json+oembed']");
|
||||
foreach($entries as $e){
|
||||
$href = $e->getAttributeNode("href")->nodeValue;
|
||||
$txt = fetch_url($href);
|
||||
$txt = fetch_url($href . '&maxwidth=425');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +47,7 @@ function oembed_fetch_url($embedurl){
|
|||
|
||||
if ($txt==false || $txt==""){
|
||||
// try oohembed service
|
||||
$ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl);
|
||||
$ourl = "http://oohembed.com/oohembed/?url=".urlencode($embedurl).'&maxwidth=425';
|
||||
$txt = fetch_url($ourl);
|
||||
}
|
||||
|
||||
|
|
|
@ -249,6 +249,7 @@ function get_theme_info($theme){
|
|||
list($k,$v) = array_map("trim", explode(":",$l,2));
|
||||
$k= strtolower($k);
|
||||
if ($k=="author"){
|
||||
|
||||
$r=preg_match("|([^<]+)<([^>]+)>|", $v, $m);
|
||||
if ($r) {
|
||||
$info['author'][] = array('name'=>$m[1], 'link'=>$m[2]);
|
||||
|
@ -276,3 +277,13 @@ function get_theme_info($theme){
|
|||
return $info;
|
||||
}}
|
||||
|
||||
|
||||
function get_theme_screenshot($theme) {
|
||||
$a = get_app();
|
||||
$exts = array('.png','.jpg');
|
||||
foreach($exts as $ext) {
|
||||
if(file_exists('view/theme/' . $theme . '/screenshot' . $ext))
|
||||
return($a->get_baseurl() . '/view/theme/' . $theme . '/screenshot' . $ext);
|
||||
}
|
||||
return($a->get_baseurl() . '/images/blank.png');
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,10 +327,20 @@ 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') {
|
||||
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();
|
||||
}
|
||||
}
|
|
@ -230,19 +230,21 @@ 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();
|
||||
|
||||
$r = q("SELECT count(glink.gcid) as `total`, gcontact.* from gcontact
|
||||
left join glink on glink.gcid = gcontact.id
|
||||
where uid = %d and not gcontact.nurl in ( select nurl from contact where uid = %d)
|
||||
where uid = %d and not gcontact.nurl in ( select nurl from contact where uid = %d )
|
||||
and not gcontact.name in ( select name from contact where uid = %d )
|
||||
and not gcontact.id in ( select gcid from gcign where uid = %d )
|
||||
group by glink.gcid order by total desc limit %d, %d ",
|
||||
intval($uid),
|
||||
intval($uid),
|
||||
intval($uid),
|
||||
intval($uid),
|
||||
intval($start),
|
||||
intval($limit)
|
||||
);
|
||||
|
@ -252,11 +254,13 @@ function suggestion_query($uid, $start = 0, $limit = 40) {
|
|||
|
||||
$r2 = q("SELECT gcontact.* from gcontact
|
||||
left join glink on glink.gcid = gcontact.id
|
||||
where glink.uid = 0 and glink.cid = 0 and not gcontact.nurl in ( select nurl from contact where uid = %d)
|
||||
where glink.uid = 0 and glink.cid = 0 and not gcontact.nurl in ( select nurl from contact where uid = %d )
|
||||
and not gcontact.name in ( select name from contact where uid = %d )
|
||||
and not gcontact.id in ( select gcid from gcign where uid = %d )
|
||||
order by rand() limit %d, %d ",
|
||||
intval($uid),
|
||||
intval($uid),
|
||||
intval($uid),
|
||||
intval($start),
|
||||
intval($limit)
|
||||
);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
@ -203,7 +203,7 @@
|
|||
$os=$s; $count++;
|
||||
$s = $this->var_replace($s);
|
||||
}
|
||||
return template_unescape($s);
|
||||
return $s;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ function replace_macros($s,$r) {
|
|||
|
||||
//$a = get_app();
|
||||
//$a->page['debug'] .= "$tt <br>\n";
|
||||
return $r;
|
||||
return template_unescape($r);
|
||||
|
||||
}}
|
||||
|
||||
|
@ -638,7 +638,7 @@ if(! function_exists('search')) {
|
|||
function search($s,$id='search-box',$url='/search',$save = false) {
|
||||
$a = get_app();
|
||||
$o = '<div id="' . $id . '">';
|
||||
$o .= '<form action="' . $a->get_baseurl() . $url . '" method="get" >';
|
||||
$o .= '<form action="' . $a->get_baseurl((stristr($url,'network')) ? true : false) . $url . '" method="get" >';
|
||||
$o .= '<input type="text" name="search" id="search-text" value="' . $s .'" />';
|
||||
$o .= '<input type="submit" name="submit" id="search-submit" value="' . t('Search') . '" />';
|
||||
if($save)
|
||||
|
@ -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>(.*?)<\/pre>/ism','smile_encode',$s);
|
||||
$s = preg_replace_callback('/<code>(.*?)<\/code>/ism','smile_encode',$s);
|
||||
|
||||
|
@ -704,27 +709,21 @@ function smilies($s, $sample = false) {
|
|||
'</3',
|
||||
'<\\3',
|
||||
':-)',
|
||||
// ':)',
|
||||
';-)',
|
||||
// ';)',
|
||||
':-(',
|
||||
// ':(',
|
||||
':-P',
|
||||
// ':P',
|
||||
':-p',
|
||||
':-"',
|
||||
':-"',
|
||||
':-x',
|
||||
':-X',
|
||||
':-D',
|
||||
// ':D',
|
||||
'8-|',
|
||||
'8-O',
|
||||
':-O',
|
||||
'\\o/',
|
||||
'o.O',
|
||||
'O.o',
|
||||
'\\.../',
|
||||
'\\ooo/',
|
||||
":'(",
|
||||
":-!",
|
||||
":-/",
|
||||
|
@ -734,12 +733,8 @@ function smilies($s, $sample = false) {
|
|||
':homebrew',
|
||||
':coffee',
|
||||
':facepalm',
|
||||
':headdesk',
|
||||
'~friendika',
|
||||
'~friendica',
|
||||
// 'Diaspora*'
|
||||
':beard',
|
||||
':whitebeard'
|
||||
'~friendica'
|
||||
|
||||
);
|
||||
|
||||
|
@ -748,27 +743,21 @@ function smilies($s, $sample = false) {
|
|||
'<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
|
||||
// '<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":)" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
|
||||
// '<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";)"/>',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
|
||||
// '<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":(" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />',
|
||||
// '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":P" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-p" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />',
|
||||
// '<img src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":D"/>',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-shaka.gif" alt="\\.../" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-shaka.gif" alt="\\ooo/" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />',
|
||||
|
@ -778,12 +767,8 @@ function smilies($s, $sample = false) {
|
|||
'<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-bangheaddesk.gif" alt=":headdesk" />',
|
||||
'<a href="http://project.friendika.com">~friendika <img src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>',
|
||||
'<a href="http://friendica.com">~friendica <img src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>',
|
||||
// '<a href="http://diasporafoundation.org">Diaspora<img src="' . $a->get_baseurl() . '/images/diaspora.png" alt="Diaspora*" /></a>',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-beard.png" alt=":beard" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-whitebeard.png" alt=":whitebeard" />'
|
||||
'<a href="http://friendica.com">~friendica <img src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>'
|
||||
);
|
||||
|
||||
$params = array('texts' => $texts, 'icons' => $icons, 'string' => $s);
|
||||
|
@ -1345,6 +1330,7 @@ function file_tag_save_file($uid,$item,$file) {
|
|||
$saved = get_pconfig($uid,'system','filetags');
|
||||
if((! strlen($saved)) || (! stristr($saved,'[' . file_tag_encode($file) . ']')))
|
||||
set_pconfig($uid,'system','filetags',$saved . '[' . file_tag_encode($file) . ']');
|
||||
info( t('Item filed') );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -1380,3 +1366,19 @@ function file_tag_unsave_file($uid,$item,$file) {
|
|||
return true;
|
||||
}
|
||||
|
||||
function normalise_openid($s) {
|
||||
return trim(str_replace(array('http://','https://'),array('',''),$s),'/');
|
||||
}
|
||||
|
||||
|
||||
function undo_post_tagging($s) {
|
||||
$matches = null;
|
||||
$cnt = preg_match_all('/([@#])\[url=(.*?)\](.*?)\[\/url\]/ism',$s,$matches,PREG_SET_ORDER);
|
||||
if($cnt) {
|
||||
foreach($matches as $mtch) {
|
||||
$s = str_replace($mtch[0], $mtch[1] . $mtch[3],$s);
|
||||
}
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
|
|
@ -342,13 +342,13 @@ $profile = $a->profile;
|
|||
|
||||
header("Content-type: text/html; charset=utf-8");
|
||||
|
||||
$template = 'view/' . $lang . '/'
|
||||
$template = 'view/' . current_theme() . '/'
|
||||
. ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
|
||||
|
||||
if(file_exists($template))
|
||||
require_once($template);
|
||||
else
|
||||
require_once(str_replace($lang . '/', '', $template));
|
||||
require_once(str_replace(current_theme() . '/', '', $template));
|
||||
|
||||
session_write_close();
|
||||
exit;
|
||||
|
|
|
@ -52,7 +52,7 @@ aStates[28]="|Central|Chobe|Francistown|Gaborone|Ghanzi|Kgalagadi|Kgatleng|Kwene
|
|||
aStates[29]="|Acre|Alagoas|Amapa|Amazonas|Bahia|Ceara|Distrito Federal|Espirito Santo|Goias|Maranhao|Mato Grosso|Mato Grosso do Sul|Minas Gerais|Para|Paraiba|Parana|Pernambuco|Piaui|Rio de Janeiro|Rio Grande do Norte|Rio Grande do Sul|Rondonia|Roraima|Santa Catarina|Sao Paulo|Sergipe|Tocantins";
|
||||
aStates[30]="|Anegada|Jost Van Dyke|Tortola|Virgin Gorda";
|
||||
aStates[31]="|Belait|Brunei and Muara|Temburong|Tutong";
|
||||
aStates[32]="|Blagoevgrad|Burgas|Dobrich|Gabrovo|Khaskovo|Kurdzhali|Kyustendil|Lovech|Montana|Pazardzhik|Pernik|Pleven|Plovdiv|Razgrad|Ruse|Shumen|Silistra|Sliven|Smolyan|Sofiya|Sofiya-Grad|Stara Zagora|Turgovishte|Varna|Veliko Turnovo|Vidin|Vratsa|Yambol";
|
||||
aStates[32]="|Blagoevgrad|Burgas|Dobrich|Gabrovo|Haskovo|Kardzhali|Kyustendil|Lovech|Montana|Pazardzhik|Pernik|Pleven|Plovdiv|Razgrad|Rousse|Shumen|Silistra|Sliven|Smolyan|Sofia|Stara Zagora|Turgovishte|Varna|Veliko Turnovo|Vidin|Vratsa|Yambol";
|
||||
aStates[33]="|Bale|Bam|Banwa|Bazega|Bougouriba|Boulgou|Boulkiemde|Comoe|Ganzourgou|Gnagna|Gourma|Houet|Ioba|Kadiogo|Kenedougou|Komandjari|Kompienga|Kossi|Koupelogo|Kouritenga|Kourweogo|Leraba|Loroum|Mouhoun|Nahouri|Namentenga|Naumbiel|Nayala|Oubritenga|Oudalan|Passore|Poni|Samentenga|Sanguie|Seno|Sissili|Soum|Sourou|Tapoa|Tuy|Yagha|Yatenga|Ziro|Zondomo|Zoundweogo";
|
||||
aStates[34]="|Ayeyarwady|Bago|Chin State|Kachin State|Kayah State|Kayin State|Magway|Mandalay|Mon State|Rakhine State|Sagaing|Shan State|Tanintharyi|Yangon";
|
||||
aStates[35]="|Bubanza|Bujumbura|Bururi|Cankuzo|Cibitoke|Gitega|Karuzi|Kayanza|Kirundo|Makamba|Muramvya|Muyinga|Mwaro|Ngozi|Rutana|Ruyigi";
|
||||
|
@ -105,7 +105,7 @@ aStates[79]="|Estuaire|Haut-Ogooue|Moyen-Ogooue|Ngounie|Nyanga|Ogooue-Ivindo|Ogo
|
|||
aStates[80]="|Banjul|Central River|Lower River|North Bank|Upper River|Western";
|
||||
aStates[81]="|Gaza Strip";
|
||||
aStates[82]="|Abashis|Abkhazia or Ap'khazet'is Avtonomiuri Respublika (Sokhumi)|Adigenis|Ajaria or Acharis Avtonomiuri Respublika (Bat'umi)|Akhalgoris|Akhalk'alak'is|Akhalts'ikhis|Akhmetis|Ambrolauris|Aspindzis|Baghdat'is|Bolnisis|Borjomis|Ch'khorotsqus|Ch'okhatauris|Chiat'ura|Dedop'listsqaros|Dmanisis|Dushet'is|Gardabanis|Gori|Goris|Gurjaanis|Javis|K'arelis|K'ut'aisi|Kaspis|Kharagaulis|Khashuris|Khobis|Khonis|Lagodekhis|Lanch'khut'is|Lentekhis|Marneulis|Martvilis|Mestiis|Mts'khet'is|Ninotsmindis|Onis|Ozurget'is|P'ot'i|Qazbegis|Qvarlis|Rust'avi|Sach'kheris|Sagarejos|Samtrediis|Senakis|Sighnaghis|T'bilisi|T'elavis|T'erjolis|T'et'ritsqaros|T'ianet'is|Tqibuli|Ts'ageris|Tsalenjikhis|Tsalkis|Tsqaltubo|Vanis|Zestap'onis|Zugdidi|Zugdidis";
|
||||
aStates[83]="|Baden-Wuerttemberg|Bayern|Berlin|Brandenburg|Bremen|Hamburg|Hessen|Mecklenburg-Vorpommern|Niedersachsen|Nordrhein-Westfalen|Rheinland-Pfalz|Saarland|Sachsen|Sachsen-Anhalt|Schleswig-Holstein|Thueringen";
|
||||
aStates[83]="|Baden-Württemberg|Bayern|Berlin|Brandenburg|Bremen|Hamburg|Hessen|Mecklenburg-Vorpommern|Niedersachsen|Nordrhein-Westfalen|Rheinland-Pfalz|Saarland|Sachsen|Sachsen-Anhalt|Schleswig-Holstein|Thüringen";
|
||||
aStates[84]="|Ashanti|Brong-Ahafo|Central|Eastern|Greater Accra|Northern|Upper East|Upper West|Volta|Western";
|
||||
aStates[85]="|Gibraltar";
|
||||
aStates[86]="|Ile du Lys|Ile Glorieuse";
|
||||
|
@ -131,8 +131,8 @@ aStates[105]="|Andaman and Nicobar Islands|Andhra Pradesh|Arunachal Pradesh|Assa
|
|||
aStates[106]="|Aceh|Bali|Banten|Bengkulu|East Timor|Gorontalo|Irian Jaya|Jakarta Raya|Jambi|Jawa Barat|Jawa Tengah|Jawa Timur|Kalimantan Barat|Kalimantan Selatan|Kalimantan Tengah|Kalimantan Timur|Kepulauan Bangka Belitung|Lampung|Maluku|Maluku Utara|Nusa Tenggara Barat|Nusa Tenggara Timur|Riau|Sulawesi Selatan|Sulawesi Tengah|Sulawesi Tenggara|Sulawesi Utara|Sumatera Barat|Sumatera Selatan|Sumatera Utara|Yogyakarta";
|
||||
aStates[107]="|Ardabil|Azarbayjan-e Gharbi|Azarbayjan-e Sharqi|Bushehr|Chahar Mahall va Bakhtiari|Esfahan|Fars|Gilan|Golestan|Hamadan|Hormozgan|Ilam|Kerman|Kermanshah|Khorasan|Khuzestan|Kohgiluyeh va Buyer Ahmad|Kordestan|Lorestan|Markazi|Mazandaran|Qazvin|Qom|Semnan|Sistan va Baluchestan|Tehran|Yazd|Zanjan";
|
||||
aStates[108]="|Al Anbar|Al Basrah|Al Muthanna|Al Qadisiyah|An Najaf|Arbil|As Sulaymaniyah|At Ta'mim|Babil|Baghdad|Dahuk|Dhi Qar|Diyala|Karbala'|Maysan|Ninawa|Salah ad Din|Wasit";
|
||||
aStates[109]="|Carlow|Cavan|Clare|Cork|Donegal|Dublin|Galway|Kerry|Kildare|Kilkenny|Laois|Leitrim|Limerick|Longford|Louth|Mayo|Meath|Monaghan|Offaly|Roscommon|Sligo|Tipperary|Waterford|Westmeath|Wexford|Wicklow";
|
||||
aStates[110]="|Antrim|Ards|Armagh|Ballymena|Ballymoney|Banbridge|Belfast|Carrickfergus|Castlereagh|Coleraine|Cookstown|Craigavon|Derry|Down|Dungannon|Fermanagh|Larne|Limavady|Lisburn|Magherafelt|Moyle|Newry and Mourne|Newtownabbey|North Down|Omagh|Strabane";
|
||||
aStates[109]="|Antrim|Armargh|Carlow|Cavan|Clare|Cork|Derry|Donegal|Down|Dún Laoghaire–Rathdown|Fermanagh|Dublin|Fingal|Galway|Kerry|Kildare|Kilkenny|Laois|Leitrim|Limerick|Longford|Louth|Mayo|Meath|Monaghan|Offaly|Roscommon|Sligo|Tipperary|Tyrone|Waterford|Westmeath|Wexford|Wicklow";
|
||||
aStates[110]="|Antrim|Armagh|Belfast|Down|Fermanagh|Londonderry|Tyrone";
|
||||
aStates[111]="|Central|Haifa|Jerusalem|Northern|Southern|Tel Aviv";
|
||||
aStates[112]="|Abruzzi|Basilicata|Calabria|Campania|Emilia-Romagna|Friuli-Venezia Giulia|Lazio|Liguria|Lombardia|Marche|Molise|Piemonte|Puglia|Sardegna|Sicilia|Toscana|Trentino-Alto Adige|Umbria|Valle d'Aosta|Veneto";
|
||||
aStates[113]="|Clarendon|Hanover|Kingston|Manchester|Portland|Saint Andrew|Saint Ann|Saint Catherine|Saint Elizabeth|Saint James|Saint Mary|Saint Thomas|Trelawny|Westmoreland";
|
||||
|
@ -222,7 +222,7 @@ aStates[196]="|A'ana|Aiga-i-le-Tai|Atua|Fa'asaleleaga|Gaga'emauga|Gagaifomauga|P
|
|||
aStates[197]="|Acquaviva|Borgo Maggiore|Chiesanuova|Domagnano|Faetano|Fiorentino|Monte Giardino|San Marino|Serravalle";
|
||||
aStates[198]="|Principe|Sao Tome";
|
||||
aStates[199]="|'Asir|Al Bahah|Al Hudud ash Shamaliyah|Al Jawf|Al Madinah|Al Qasim|Ar Riyad|Ash Sharqiyah (Eastern Province)|Ha'il|Jizan|Makkah|Najran|Tabuk";
|
||||
aStates[200]="|Aberdeen City|Aberdeenshire|Angus|Argyll and Bute|City of Edinburgh|Clackmannanshire|Dumfries and Galloway|Dundee City|East Ayrshire|East Dunbartonshire|East Lothian|East Renfrewshire|Eilean Siar (Western Isles)|Falkirk|Fife|Glasgow City|Highland|Inverclyde|Midlothian|Moray|North Ayrshire|North Lanarkshire|Orkney Islands|Perth and Kinross|Renfrewshire|Shetland Islands|South Ayrshire|South Lanarkshire|Stirling|The Scottish Borders|West Dunbartonshire|West Lothian";
|
||||
aStates[200]="|Aberdeenshire|Angus|Argyll|Ayrshire|Banffshire|Berwickshire|Bute|Caithness|Clackmannanshire|Cromartyshire|Dumfriesshire|Dunbartonshire|Dundee City|East Lothian|Edinburgh|Fife|Glasgow City|Inverness-shire|Kincardineshire|Kinross-shire|Kirkcudbrightshire|Lanarkshire|Midlothian|Moray|Nairnshire|Orkney Islands|Peeblesshire|Perthshire|Renfrewshire|Ross and Cromarty|Ross-shire|Roxburghshire|Selkirkshire|Shetland Islands|Stirlingshire|Sutherland|West Lothian|Wigtownshire";
|
||||
aStates[201]="|Dakar|Diourbel|Fatick|Kaolack|Kolda|Louga|Saint-Louis|Tambacounda|Thies|Ziguinchor";
|
||||
aStates[202]="|Anse aux Pins|Anse Boileau|Anse Etoile|Anse Louis|Anse Royale|Baie Lazare|Baie Sainte Anne|Beau Vallon|Bel Air|Bel Ombre|Cascade|Glacis|Grand' Anse (on Mahe)|Grand' Anse (on Praslin)|La Digue|La Riviere Anglaise|Mont Buxton|Mont Fleuri|Plaisance|Pointe La Rue|Port Glaud|Saint Louis|Takamaka";
|
||||
aStates[203]="|Eastern|Northern|Southern|Western";
|
||||
|
@ -233,7 +233,7 @@ aStates[207]="|Bellona|Central|Choiseul (Lauru)|Guadalcanal|Honiara|Isabel|Makir
|
|||
aStates[208]="|Awdal|Bakool|Banaadir|Bari|Bay|Galguduud|Gedo|Hiiraan|Jubbada Dhexe|Jubbada Hoose|Mudug|Nugaal|Sanaag|Shabeellaha Dhexe|Shabeellaha Hoose|Sool|Togdheer|Woqooyi Galbeed";
|
||||
aStates[209]="|Eastern Cape|Free State|Gauteng|KwaZulu-Natal|Mpumalanga|North-West|Northern Cape|Northern Province|Western Cape";
|
||||
aStates[210]="|Bird Island|Bristol Island|Clerke Rocks|Montagu Island|Saunders Island|South Georgia|Southern Thule|Traversay Islands";
|
||||
aStates[211]="|Andalucia|Aragon|Asturias|Baleares (Balearic Islands)|Canarias (Canary Islands)|Cantabria|Castilla y Leon|Castilla-La Mancha|Catalunya|Ceuta|Communidad Valencian|Extremadura|Galicia|Islas Chafarinas|La Rioja|Madrid|Melilla|Murcia|Navarra|Pais Vasco (Basque Country)|Penon de Alhucemas|Penon de Velez de la Gomera";
|
||||
aStates[211]="|Andalucia|Aragon|Asturias|Ceuta|Islas Baleares|Islas Chafarinas|Islas Canarias|Cantabria|Castilla y Leon|Castilla-La Mancha|Catalunya|Extremadura|Galicia|La Rioja|Madrid|Melilla|Murcia|Navarra|Pais Vasco|Peñón de Alhucemas|Peñón de Vélez de la Gomera|Valencia";
|
||||
aStates[212]="|Spratly Islands";
|
||||
aStates[213]="|Central|Eastern|North Central|North Eastern|North Western|Northern|Sabaragamuwa|Southern|Uva|Western";
|
||||
aStates[214]="|A'ali an Nil|Al Bahr al Ahmar|Al Buhayrat|Al Jazirah|Al Khartum|Al Qadarif|Al Wahdah|An Nil al Abyad|An Nil al Azraq|Ash Shamaliyah|Bahr al Jabal|Gharb al Istiwa'iyah|Gharb Bahr al Ghazal|Gharb Darfur|Gharb Kurdufan|Janub Darfur|Janub Kurdufan|Junqali|Kassala|Nahr an Nil|Shamal Bahr al Ghazal|Shamal Darfur|Shamal Kurdufan|Sharq al Istiwa'iyah|Sinnar|Warab";
|
||||
|
@ -259,7 +259,7 @@ aStates[233]="|Tuvalu";
|
|||
aStates[234]="|Adjumani|Apac|Arua|Bugiri|Bundibugyo|Bushenyi|Busia|Gulu|Hoima|Iganga|Jinja|Kabale|Kabarole|Kalangala|Kampala|Kamuli|Kapchorwa|Kasese|Katakwi|Kibale|Kiboga|Kisoro|Kitgum|Kotido|Kumi|Lira|Luwero|Masaka|Masindi|Mbale|Mbarara|Moroto|Moyo|Mpigi|Mubende|Mukono|Nakasongola|Nebbi|Ntungamo|Pallisa|Rakai|Rukungiri|Sembabule|Soroti|Tororo";
|
||||
aStates[235]="|Avtonomna Respublika Krym (Simferopol')|Cherkas'ka (Cherkasy)|Chernihivs'ka (Chernihiv)|Chernivets'ka (Chernivtsi)|Dnipropetrovs'ka (Dnipropetrovs'k)|Donets'ka (Donets'k)|Ivano-Frankivs'ka (Ivano-Frankivs'k)|Kharkivs'ka (Kharkiv)|Khersons'ka (Kherson)|Khmel'nyts'ka (Khmel'nyts'kyy)|Kirovohrads'ka (Kirovohrad)|Kyyiv|Kyyivs'ka (Kiev)|L'vivs'ka (L'viv)|Luhans'ka (Luhans'k)|Mykolayivs'ka (Mykolayiv)|Odes'ka (Odesa)|Poltavs'ka (Poltava)|Rivnens'ka (Rivne)|Sevastopol'|Sums'ka (Sumy)|Ternopil's'ka (Ternopil')|Vinnyts'ka (Vinnytsya)|Volyns'ka (Luts'k)|Zakarpats'ka (Uzhhorod)|Zaporiz'ka (Zaporizhzhya)|Zhytomyrs'ka (Zhytomyr)"
|
||||
aStates[236]="|'Ajman|Abu Zaby (Abu Dhabi)|Al Fujayrah|Ash Shariqah (Sharjah)|Dubayy (Dubai)|Ra's al Khaymah|Umm al Qaywayn";
|
||||
aStates[237]="|Barking and Dagenham|Barnet|Barnsley|Bath and North East Somerset|Bedfordshire|Bexley|Birmingham|Blackburn with Darwen|Blackpool|Bolton|Bournemouth|Bracknell Forest|Bradford|Brent|Brighton and Hove|Bromley|Buckinghamshire|Bury|Calderdale|Cambridgeshire|Camden|Cheshire|City of Bristol|City of Kingston upon Hull|City of London|Cornwall|Coventry|Croydon|Cumbria|Darlington|Derby|Derbyshire|Devon|Doncaster|Dorset|Dudley|Durham|Ealing|East Riding of Yorkshire|East Sussex|Enfield|Essex|Gateshead|Gloucestershire|Greenwich|Hackney|Halton|Hammersmith and Fulham|Hampshire|Haringey|Harrow|Hartlepool|Havering|Herefordshire|Hertfordshire|Hillingdon|Hounslow|Isle of Wight|Islington|Kensington and Chelsea|Kent|Kingston upon Thames|Kirklees|Knowsley|Lambeth|Lancashire|Leeds|Leicester|Leicestershire|Lewisham|Lincolnshire|Liverpool|Luton|Manchester|Medway|Merton|Middlesbrough|Milton Keynes|Newcastle upon Tyne|Newham|Norfolk|North East Lincolnshire|North Lincolnshire|North Somerset|North Tyneside|North Yorkshire|Northamptonshire|Northumberland|Nottingham|Nottinghamshire|Oldham|Oxfordshire|Peterborough|Plymouth|Poole|Portsmouth|Reading|Redbridge|Redcar and Cleveland|Richmond upon Thames|Rochdale|Rotherham|Rutland|Salford|Sandwell|Sefton|Sheffield|Shropshire|Slough|Solihull|Somerset|South Gloucestershire|South Tyneside|Southampton|Southend-on-Sea|Southwark|St. Helens|Staffordshire|Stockport|Stockton-on-Tees|Stoke-on-Trent|Suffolk|Sunderland|Surrey|Sutton|Swindon|Tameside|Telford and Wrekin|Thurrock|Torbay|Tower Hamlets|Trafford|Wakefield|Walsall|Waltham Forest|Wandsworth|Warrington|Warwickshire|West Berkshire|West Sussex|Westminster|Wigan|Wiltshire|Windsor and Maidenhead|Wirral|Wokingham|Wolverhampton|Worcestershire|York";
|
||||
aStates[237]="|Aberdeen|Aberdeenshire|Anglesey|Angus|Antrim|Argyl|Armagh|Avon|Ayrshire|Banffshire|Bedfordshire|Belfast|Berwickshire|Brecknockshire|Bristol|Buckinghamshire|Bute|Caernarfonshire|Cardiganshire|Caithness|Cambridgeshire|Carmarthenshire|Chesire|Clackmannashire|Cleveland|Clwyd|Cornwall|Cromartyshire|Cumberland|Cumbria|Denbighshire|Derbyshire|Devon|Dfyed|Dorset|Down|Dumfriesshire|Dunbartonshire|Dundee|Durham|East Lothian|East Suffolk|Derry|East Sussex|Edinburgh|Essex|Fermanagh|Fife|Flintshire|Glasgow|Glamorgan|Gloucestershire|Greater London|Greater Manchester|Gwent|Gwynedd|Hampshire|Hereford and Worcester|Herefordshire|Inverness-shire|Hertfordshire|Humberside|Huntingdon and Peterborough|Huntingdonshire|Isle of Ely|Isle of Wight|Kent|Kincardineshire|Kincross-shire|Kirkcudbrightshire|Lanarkshire|Lancashire|Leicestershire|Lincolnshire|London|Londonderry|Merionethshire|Merseyside|Middlesex|Mid Glamorgan|Midlothian|Monmouthshire|Montgomeryshire|Moray|Nairnshire|Norfolk|Northamptonshire|Northumberland|North Humberside|North Yorkshire|Nottinghamshire|Orkney|Oxfordshire|Peeblesshire|Pembrokeshire|Perthshire|Powys|Radnorshire|Renfrewshire|Ross And Cromarty|Ross-shire|Roxburghshire|Selkirkshire|Shetland|Stirlingshire|Sutherland|Soke of Peterborough|Rutland|Shropshire|Somerset|South Glamorgan|South Humberside|South Yorkshire|Staffordshite|Suffolk|Surrey|Sussex|Tyne and Wear|Tyrone|Warwickshire|West Glamorgan|West Lothian|West Midlands|Westmorland|West Suffolk|West Sussex|West Yorkshire|Wigtownshire|Wiltshire|Worcestershire|Yorkshire";
|
||||
aStates[238]="|Artigas|Canelones|Cerro Largo|Colonia|Durazno|Flores|Florida|Lavalleja|Maldonado|Montevideo|Paysandu|Rio Negro|Rivera|Rocha|Salto|San Jose|Soriano|Tacuarembo|Treinta y Tres";
|
||||
aStates[239]="|Alabama|Alaska|Arizona|Arkansas|California|Colorado|Connecticut|Delaware|District of Columbia|Florida|Georgia|Hawaii|Idaho|Illinois|Indiana|Iowa|Kansas|Kentucky|Louisiana|Maine|Maryland|Massachusetts|Michigan|Minnesota|Mississippi|Missouri|Montana|Nebraska|Nevada|New Hampshire|New Jersey|New Mexico|New York|North Carolina|North Dakota|Ohio|Oklahoma|Oregon|Pennsylvania|Rhode Island|South Carolina|South Dakota|Tennessee|Texas|Utah|Vermont|Virginia|Washington|West Virginia|Wisconsin|Wyoming";
|
||||
aStates[240]="|Andijon Wiloyati|Bukhoro Wiloyati|Farghona Wiloyati|Jizzakh Wiloyati|Khorazm Wiloyati (Urganch)|Namangan Wiloyati|Nawoiy Wiloyati|Qashqadaryo Wiloyati (Qarshi)|Qoraqalpoghiston (Nukus)|Samarqand Wiloyati|Sirdaryo Wiloyati (Guliston)|Surkhondaryo Wiloyati (Termiz)|Toshkent Shahri|Toshkent Wiloyati";
|
||||
|
@ -267,7 +267,7 @@ aStates[241]="|Malampa|Penama|Sanma|Shefa|Tafea|Torba";
|
|||
aStates[242]="|Amazonas|Anzoategui|Apure|Aragua|Barinas|Bolivar|Carabobo|Cojedes|Delta Amacuro|Dependencias Federales|Distrito Federal|Falcon|Guarico|Lara|Merida|Miranda|Monagas|Nueva Esparta|Portuguesa|Sucre|Tachira|Trujillo|Vargas|Yaracuy|Zulia";
|
||||
aStates[243]="|An Giang|Ba Ria-Vung Tau|Bac Giang|Bac Kan|Bac Lieu|Bac Ninh|Ben Tre|Binh Dinh|Binh Duong|Binh Phuoc|Binh Thuan|Ca Mau|Can Tho|Cao Bang|Da Nang|Dac Lak|Dong Nai|Dong Thap|Gia Lai|Ha Giang|Ha Nam|Ha Noi|Ha Tay|Ha Tinh|Hai Duong|Hai Phong|Ho Chi Minh|Hoa Binh|Hung Yen|Khanh Hoa|Kien Giang|Kon Tum|Lai Chau|Lam Dong|Lang Son|Lao Cai|Long An|Nam Dinh|Nghe An|Ninh Binh|Ninh Thuan|Phu Tho|Phu Yen|Quang Binh|Quang Nam|Quang Ngai|Quang Ninh|Quang Tri|Soc Trang|Son La|Tay Ninh|Thai Binh|Thai Nguyen|Thanh Hoa|Thua Thien-Hue|Tien Giang|Tra Vinh|Tuyen Quang|Vinh Long|Vinh Phuc|Yen Bai";
|
||||
aStates[244]="|Saint Croix|Saint John|Saint Thomas";
|
||||
aStates[245]="|Blaenau Gwent|Bridgend|Caerphilly|Cardiff|Carmarthenshire|Ceredigion|Conwy|Denbighshire|Flintshire|Gwynedd|Isle of Anglesey|Merthyr Tydfil|Monmouthshire|Neath Port Talbot|Newport|Pembrokeshire|Powys|Rhondda Cynon Taff|Swansea|The Vale of Glamorgan|Torfaen|Wrexham";
|
||||
aStates[245]="|Anglesey|Brecknockshire|Caernfonshire|Cardiganshire|Carmarthenshire|Clwyd|Denbighshire|Dyfed|Flintshire|Glamorgan|Gwent|Gwynedd|Merionethshire|Mid Glamorgan|Monmouthsire|Montgomeryshire|Pembrokeshire|Powys|Radnorshire|South Glamorgan|West Glamorgan";
|
||||
aStates[246]="|Alo|Sigave|Wallis";
|
||||
aStates[247]="|West Bank";
|
||||
aStates[248]="|Western Sahara";
|
||||
|
|
|
@ -14,22 +14,22 @@ function ACPopup(elm,backend_url){
|
|||
this.kp_timer = false;
|
||||
this.url = backend_url;
|
||||
|
||||
var w = 530;
|
||||
var h = 130;
|
||||
|
||||
|
||||
if(typeof elm.editorId == "undefined") {
|
||||
style = $(elm).offset();
|
||||
w = $(elm).width();
|
||||
h = $(elm).height();
|
||||
}
|
||||
else {
|
||||
style = $(elm.container).offset();
|
||||
w = elm.container.offsetWidth;
|
||||
h = elm.container.offsetHeight;
|
||||
// Quick fix for chrome until I get a tool to inspect the dom
|
||||
// Chrome returns 0x0
|
||||
if(! w)
|
||||
w = 530;
|
||||
if(! h)
|
||||
h = 130;
|
||||
|
||||
var container = elm.getContainer();
|
||||
if(typeof container != "undefined") {
|
||||
style = $(container).offset();
|
||||
w = $(container).width();
|
||||
h = $(container).height();
|
||||
}
|
||||
}
|
||||
|
||||
style.top=style.top+h;
|
||||
|
|
30
js/main.js
|
@ -28,13 +28,15 @@
|
|||
var in_progress = false;
|
||||
var langSelect = false;
|
||||
var commentBusy = false;
|
||||
var last_popup_menu = null;
|
||||
var last_popup_button = null;
|
||||
|
||||
$(function() {
|
||||
$.ajaxSetup({cache: false});
|
||||
|
||||
msie = $.browser.msie ;
|
||||
|
||||
/* setup tooltips */
|
||||
/* setup tooltips *//*
|
||||
$("a,.tt").each(function(){
|
||||
var e = $(this);
|
||||
var pos="bottom";
|
||||
|
@ -43,7 +45,7 @@
|
|||
if (e.hasClass("ttleft")) pos="left";
|
||||
if (e.hasClass("ttright")) pos="right";
|
||||
e.tipTip({defaultPosition: pos, edgeOffset: 8});
|
||||
});
|
||||
});*/
|
||||
|
||||
|
||||
|
||||
|
@ -76,8 +78,21 @@
|
|||
if (menu.attr('popup')=="false") return false;
|
||||
$(this).parent().toggleClass("selected");
|
||||
menu.toggle();
|
||||
if (menu.css("display") == "none") {
|
||||
last_popup_menu = null;
|
||||
last_popup_button = null;
|
||||
} else {
|
||||
last_popup_menu = menu;
|
||||
last_popup_button = $(this).parent();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('html').click(function() {
|
||||
last_popup_menu.hide();
|
||||
last_popup_button.removeClass("selected");
|
||||
last_popup_menu = null;
|
||||
last_popup_button = null;
|
||||
});
|
||||
|
||||
// fancyboxes
|
||||
$("a.popupbox").fancybox({
|
||||
|
@ -486,9 +501,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');
|
||||
});
|
||||
|
@ -573,3 +588,10 @@ Array.prototype.remove = function(item) {
|
|||
return this.push.apply(this, rest);
|
||||
};
|
||||
|
||||
function previewTheme(elm) {
|
||||
theme = $(elm).val();
|
||||
$.getJSON('pretheme?f=&theme=' + theme,function(data) {
|
||||
$('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
|
||||
});
|
||||
|
||||
}
|
4
library/mcefixes/README
Normal file
|
@ -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.
|
||||
|
258
library/mcefixes/plugins.bbcode.editor_plugin_src.js
Executable file
|
@ -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 = /<span [^>]*class *= *[\"'](?:[^\"']* )*oembed(?: [^\"']*)*[\"'][^>]*>(.*?(?:<span[^>]*>(.*?)<\/span *>)*.*?)<\/span *>/ig;
|
||||
while (f = find_spanc.exec(match)) {
|
||||
var find_a = /<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: <strong> to [b]
|
||||
rep(/<a class=\"bookmark\" href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[bookmark=$1]$2[/bookmark]");
|
||||
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
|
||||
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
|
||||
rep(/<span style=\"color:(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
|
||||
rep(/<font>(.*?)<\/font>/gi,"$1");
|
||||
rep(/<img.*?width=\"(.*?)\".*?height=\"(.*?)\".*?src=\"(.*?)\".*?\/>/gi,"[img=$1x$2]$3[/img]");
|
||||
rep(/<img.*?height=\"(.*?)\".*?width=\"(.*?)\".*?src=\"(.*?)\".*?\/>/gi,"[img=$2x$1]$3[/img]");
|
||||
rep(/<img.*?src=\"(.*?)\".*?height=\"(.*?)\".*?width=\"(.*?)\".*?\/>/gi,"[img=$3x$2]$1[/img]");
|
||||
rep(/<img.*?src=\"(.*?)\".*?width=\"(.*?)\".*?height=\"(.*?)\".*?\/>/gi,"[img=$2x$3]$1[/img]");
|
||||
rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
|
||||
|
||||
rep(/<ul class=\"listbullet\" style=\"list-style-type\: circle\;\">(.*?)<\/ul>/gi,"[list]$1[/list]");
|
||||
rep(/<ul class=\"listnone\" style=\"list-style-type\: none\;\">(.*?)<\/ul>/gi,"[list=]$1[/list]");
|
||||
rep(/<ul class=\"listdecimal\" style=\"list-style-type\: decimal\;\">(.*?)<\/ul>/gi,"[list=1]$1[/list]");
|
||||
rep(/<ul class=\"listlowerroman\" style=\"list-style-type\: lower-roman\;\">(.*?)<\/ul>/gi,"[list=i]$1[/list]");
|
||||
rep(/<ul class=\"listupperroman\" style=\"list-style-type\: upper-roman\;\">(.*?)<\/ul>/gi,"[list=I]$1[/list]");
|
||||
rep(/<ul class=\"listloweralpha\" style=\"list-style-type\: lower-alpha\;\">(.*?)<\/ul>/gi,"[list=a]$1[/list]");
|
||||
rep(/<ul class=\"listupperalpha\" style=\"list-style-type\: upper-alpha\;\">(.*?)<\/ul>/gi,"[list=A]$1[/list]");
|
||||
rep(/<li>(.*?)<\/li>/gi,'[li]$1[/li]');
|
||||
|
||||
rep(/<code>(.*?)<\/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 style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");
|
||||
rep(/<u>/gi,"[u]");
|
||||
rep(/<blockquote[^>]*>/gi,"[quote]");
|
||||
rep(/<\/blockquote>/gi,"[/quote]");
|
||||
rep(/<hr \/>/gi,"[hr]");
|
||||
rep(/<br (.*?)\/>/gi,"\n\n");
|
||||
rep(/<br\/>/gi,"\n\n");
|
||||
rep(/<br>/gi,"\n");
|
||||
rep(/<p>/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 <strong>
|
||||
rep(/\n/gi,"<br />");
|
||||
rep(/\[b\]/gi,"<strong>");
|
||||
rep(/\[\/b\]/gi,"</strong>");
|
||||
rep(/\[i\]/gi,"<em>");
|
||||
rep(/\[\/i\]/gi,"</em>");
|
||||
rep(/\[u\]/gi,"<u>");
|
||||
rep(/\[\/u\]/gi,"</u>");
|
||||
rep(/\[hr\]/gi,"<hr />");
|
||||
rep(/\[bookmark=([^\]]+)\](.*?)\[\/bookmark\]/gi,"<a class=\"bookmark\" href=\"$1\">$2</a>");
|
||||
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
|
||||
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
|
||||
rep(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,"<img width=\"$1\" height=\"$2\" src=\"$3\" />");
|
||||
rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
|
||||
|
||||
rep(/\[list\](.*?)\[\/list\]/gi, '<ul class="listbullet" style="list-style-type: circle;">$1</ul>');
|
||||
rep(/\[list=\](.*?)\[\/list\]/gi, '<ul class="listnone" style="list-style-type: none;">$1</ul>');
|
||||
rep(/\[list=1\](.*?)\[\/list\]/gi, '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>');
|
||||
rep(/\[list=i\](.*?)\[\/list\]/gi,'<ul class="listlowerroman" style="list-style-type: lower-roman;">$1</ul>');
|
||||
rep(/\[list=I\](.*?)\[\/list\]/gi, '<ul class="listupperroman" style="list-style-type: upper-roman;">$1</ul>');
|
||||
rep(/\[list=a\](.*?)\[\/list\]/gi, '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$1</ul>');
|
||||
rep(/\[list=A\](.*?)\[\/list\]/gi, '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$1</ul>');
|
||||
rep(/\[li\](.*?)\[\/li\]/gi, '<li>$1</li>');
|
||||
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<span style=\"color: $1;\">$2</span>");
|
||||
rep(/\[size=(.*?)\](.*?)\[\/size\]/gi,"<span style=\"font-size: $1;\">$2</span>");
|
||||
rep(/\[code\](.*?)\[\/code\]/gi,"<code>$1</code>");
|
||||
rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<blockquote>$1</blockquote>");
|
||||
|
||||
/* 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);
|
||||
})();
|
BIN
library/mcefixes/themes.advanced.img.icons.gif
Executable file
After Width: | Height: | Size: 12 KiB |
117
library/mcefixes/themes.advanced.skins.default.dialog.css
Executable file
|
@ -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;}
|
213
library/mcefixes/themes.advanced.skins.default.ui.css
Executable file
|
@ -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}
|
453
library/tinymce/changelog.txt
Executable file → Normal file
|
@ -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 <html xmlns=""> 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.
|
||||
|
|
101
library/tinymce/examples/accessibility.html
Normal file
|
@ -0,0 +1,101 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Full featured example</title>
|
||||
|
||||
<!-- TinyMCE -->
|
||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
// General options
|
||||
mode : "textareas",
|
||||
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,wordcount,advlist,autosave",
|
||||
|
||||
// Theme options
|
||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "left",
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
theme_advanced_resizing : true,
|
||||
|
||||
// Example content CSS (should be your site CSS)
|
||||
// using false to ensure that the default browser settings are used for best Accessibility
|
||||
// ACCESSIBILITY SETTINGS
|
||||
content_css : false,
|
||||
// Use browser preferred colors for dialogs.
|
||||
browser_preferred_colors : true,
|
||||
detect_highcontrast : true,
|
||||
|
||||
// Drop lists for link/image/media/template dialogs
|
||||
template_external_list_url : "lists/template_list.js",
|
||||
external_link_list_url : "lists/link_list.js",
|
||||
external_image_list_url : "lists/image_list.js",
|
||||
media_external_list_url : "lists/media_list.js",
|
||||
|
||||
// Style formats
|
||||
style_formats : [
|
||||
{title : 'Bold text', inline : 'b'},
|
||||
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
|
||||
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
|
||||
{title : 'Example 1', inline : 'span', classes : 'example1'},
|
||||
{title : 'Example 2', inline : 'span', classes : 'example2'},
|
||||
{title : 'Table styles'},
|
||||
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
|
||||
],
|
||||
|
||||
// Replace values for the template plugin
|
||||
template_replace_values : {
|
||||
username : "Some User",
|
||||
staffid : "991234"
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- /TinyMCE -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
||||
<div>
|
||||
<h3>Full featured example, with Accessibility settings enabled</h3>
|
||||
|
||||
<p>
|
||||
This page has got the TinyMCE set up to work with configurations related to accessiblity enabled.
|
||||
In particular
|
||||
<ul>
|
||||
<li>the <strong>content_css</strong> is set to false, to ensure that all default browser styles are used, </li>
|
||||
<li>the <strong>browser_preferred_colors</strong> dialog option is used to ensure that default css is used for dialogs, </li>
|
||||
<li>and the <strong>detect_highcontrast</strong> option has been set to ensure that highcontrast mode in Windows browsers
|
||||
is detected and the toolbars are displayed in a high contrast mode.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
||||
<div>
|
||||
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
||||
<p>
|
||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
||||
</p>
|
||||
<p>
|
||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
||||
</p>
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<input type="submit" name="save" value="Submit" />
|
||||
<input type="reset" name="reset" value="Reset" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
if (document.location.protocol == 'file:') {
|
||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
0
library/tinymce/examples/css/content.css
Executable file → Normal file
0
library/tinymce/examples/css/word.css
Executable file → Normal file
8
library/tinymce/examples/custom_formats.html
Executable file → Normal file
|
@ -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 @@
|
|||
<input type="reset" name="reset" value="Reset" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
if (document.location.protocol == 'file:') {
|
||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
31
library/tinymce/examples/full.html
Executable file → Normal file
|
@ -2,7 +2,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Full featured example</title>
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- TinyMCE -->
|
||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
@ -10,13 +10,13 @@
|
|||
// 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,visualblocks",
|
||||
|
||||
// Theme options
|
||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "left",
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
|
@ -52,7 +52,7 @@
|
|||
<!-- /TinyMCE -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body role="application">
|
||||
|
||||
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
||||
<div>
|
||||
|
@ -76,15 +76,15 @@
|
|||
</div>
|
||||
|
||||
<!-- Some integration calls -->
|
||||
<a href="javascript:;" onmousedown="tinyMCE.get('elm1').show();">[Show]</a>
|
||||
<a href="javascript:;" onmousedown="tinyMCE.get('elm1').hide();">[Hide]</a>
|
||||
<a href="javascript:;" onmousedown="tinyMCE.get('elm1').execCommand('Bold');">[Bold]</a>
|
||||
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').getContent());">[Get contents]</a>
|
||||
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getContent());">[Get selected HTML]</a>
|
||||
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getContent({format : 'text'}));">[Get selected text]</a>
|
||||
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getNode().nodeName);">[Get selected element]</a>
|
||||
<a href="javascript:;" onmousedown="tinyMCE.execCommand('mceInsertContent',false,'<b>Hello world!!</b>');">[Insert HTML]</a>
|
||||
<a href="javascript:;" onmousedown="tinyMCE.execCommand('mceReplaceContent',false,'<b>{$selection}</b>');">[Replace selection]</a>
|
||||
<a href="javascript:;" onclick="tinyMCE.get('elm1').show();return false;">[Show]</a>
|
||||
<a href="javascript:;" onclick="tinyMCE.get('elm1').hide();return false;">[Hide]</a>
|
||||
<a href="javascript:;" onclick="tinyMCE.get('elm1').execCommand('Bold');return false;">[Bold]</a>
|
||||
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').getContent());return false;">[Get contents]</a>
|
||||
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').selection.getContent());return false;">[Get selected HTML]</a>
|
||||
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').selection.getContent({format : 'text'}));return false;">[Get selected text]</a>
|
||||
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').selection.getNode().nodeName);return false;">[Get selected element]</a>
|
||||
<a href="javascript:;" onclick="tinyMCE.execCommand('mceInsertContent',false,'<b>Hello world!!</b>');return false;">[Insert HTML]</a>
|
||||
<a href="javascript:;" onclick="tinyMCE.execCommand('mceReplaceContent',false,'<b>{$selection}</b>');return false;">[Replace selection]</a>
|
||||
|
||||
<br />
|
||||
<input type="submit" name="save" value="Submit" />
|
||||
|
@ -92,5 +92,10 @@
|
|||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
if (document.location.protocol == 'file:') {
|
||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
0
library/tinymce/examples/index.html
Executable file → Normal file
0
library/tinymce/examples/lists/image_list.js
Executable file → Normal file
0
library/tinymce/examples/lists/link_list.js
Executable file → Normal file
6
library/tinymce/examples/lists/media_list.js
Executable file → Normal file
|
@ -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"]
|
||||
];
|
0
library/tinymce/examples/lists/template_list.js
Executable file → Normal file
0
library/tinymce/examples/media/logo.jpg
Executable file → Normal file
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
0
library/tinymce/examples/media/logo_over.jpg
Executable file → Normal file
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
0
library/tinymce/examples/media/sample.avi
Executable file → Normal file
0
library/tinymce/examples/media/sample.dcr
Executable file → Normal file
BIN
library/tinymce/examples/media/sample.flv
Normal file
0
library/tinymce/examples/media/sample.mov
Executable file → Normal file
0
library/tinymce/examples/media/sample.ram
Executable file → Normal file
0
library/tinymce/examples/media/sample.rm
Executable file → Normal file
0
library/tinymce/examples/media/sample.swf
Executable file → Normal file
1
library/tinymce/examples/menu.html
Executable file → Normal file
|
@ -13,5 +13,6 @@ a {display:block;}
|
|||
<a href="skins.html" target="main">Skin support</a>
|
||||
<a href="word.html" target="main">Word processor</a>
|
||||
<a href="custom_formats.html" target="main">Custom formats</a>
|
||||
<a href="accessibility.html" target="main">Accessibility Options</a>
|
||||
</body>
|
||||
</html>
|
6
library/tinymce/examples/simple.html
Executable file → Normal file
|
@ -38,6 +38,10 @@
|
|||
<input type="submit" name="save" value="Submit" />
|
||||
<input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
if (document.location.protocol == 'file:') {
|
||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
14
library/tinymce/examples/skins.html
Executable file → Normal file
|
@ -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 @@
|
|||
<input type="submit" name="save" value="Submit" />
|
||||
<input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
if (document.location.protocol == 'file:') {
|
||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
0
library/tinymce/examples/templates/layout1.htm
Executable file → Normal file
0
library/tinymce/examples/templates/snippet1.htm
Executable file → Normal file
|
@ -1,80 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Full featured example</title>
|
||||
<style>
|
||||
body {font-family:Arial,Verdana; font-size: 12px;}
|
||||
</style>
|
||||
|
||||
<!-- TinyMCE -->
|
||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
// 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",
|
||||
|
||||
// Theme options
|
||||
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
|
||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "left",
|
||||
theme_advanced_path_location : "bottom",
|
||||
theme_advanced_resizing : true,
|
||||
|
||||
// Example content CSS (should be your site CSS)
|
||||
content_css : "css/content.css",
|
||||
|
||||
// Drop lists for link/image/media/template dialogs
|
||||
template_external_list_url : "lists/template_list.js",
|
||||
external_link_list_url : "lists/link_list.js",
|
||||
external_image_list_url : "lists/image_list.js",
|
||||
media_external_list_url : "lists/media_list.js",
|
||||
|
||||
// Replace values for the template plugin
|
||||
template_replace_values : {
|
||||
username : "Some User",
|
||||
staffid : "991234"
|
||||
},
|
||||
|
||||
// Enable translation mode
|
||||
translate_mode : true,
|
||||
language : "en"
|
||||
});
|
||||
</script>
|
||||
<!-- /TinyMCE -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
||||
<h3>Translation</h3>
|
||||
|
||||
<p>This page enables you to translate TinyMCE by using XML files.</p>
|
||||
<p>Steps to translate:</p>
|
||||
<ol>
|
||||
<li>Download one of the language XML files from the TinyMCE site.</li>
|
||||
<li>Place it in /jscripts/tiny_mce/langs directory, for example /jscripts/tiny_mce/langs/sv.xml.</li>
|
||||
<li>Change the language init option in this file to match the XML file code. For example: sv</li>
|
||||
<li>TinyMCE will now use the XML file instead of the .js versions.</li>
|
||||
<li>Modify the XML file until everything is translated</li>
|
||||
<li>Modify the author information, this is optional.</li>
|
||||
<li>Upload the XML file to the TinyMCE site to share it with others.</li>
|
||||
<li>You can now download the .js versions of the language pack from the TinyMCE site.</li>
|
||||
</ol>
|
||||
|
||||
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
||||
<p>
|
||||
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
||||
</p>
|
||||
<p>
|
||||
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
||||
</p>
|
||||
</textarea>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
11
library/tinymce/examples/word.html
Executable file → Normal file
|
@ -2,7 +2,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Word processor example</title>
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- TinyMCE -->
|
||||
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
@ -10,7 +10,8 @@
|
|||
// General options
|
||||
mode : "textareas",
|
||||
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",
|
||||
skin : "o2k7",
|
||||
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",
|
||||
|
@ -62,6 +63,10 @@
|
|||
<input type="submit" name="save" value="Submit" />
|
||||
<input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
if (document.location.protocol == 'file:') {
|
||||
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
171
library/tinymce/jscripts/tiny_mce/langs/en.js
vendored
Executable file → Normal file
0
library/tinymce/jscripts/tiny_mce/license.txt
Executable file → Normal file
0
library/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css
vendored
Executable file → Normal file
0
library/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js
vendored
Executable file → Normal file
0
library/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js
vendored
Executable file → Normal file
0
library/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js
vendored
Executable file → Normal file
6
library/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en_dlg.js
vendored
Executable file → Normal file
|
@ -1,5 +1 @@
|
|||
tinyMCE.addI18n('en.advhr_dlg',{
|
||||
width:"Width",
|
||||
size:"Height",
|
||||
noshade:"No shadow"
|
||||
});
|
||||
tinyMCE.addI18n('en.advhr_dlg',{size:"Height",noshade:"No Shadow",width:"Width",normal:"Normal",widthunits:"Units"});
|
15
library/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm
vendored
Executable file → Normal file
|
@ -8,22 +8,23 @@
|
|||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||
<link href="css/advhr.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<body role="application">
|
||||
<form onsubmit="AdvHRDialog.update();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
|
||||
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div id="general_panel" class="panel current">
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td><label for="width">{#advhr_dlg.width}</label></td>
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
||||
<tr role="group" aria-labelledby="width_label">
|
||||
<td><label id="width_label" for="width">{#advhr_dlg.width}</label></td>
|
||||
<td class="nowrap">
|
||||
<input id="width" name="width" type="text" value="" class="mceFocus" />
|
||||
<select name="width2" id="width2">
|
||||
<span style="display:none;" id="width_unit_label">{#advhr_dlg.widthunits}</span>
|
||||
<select name="width2" id="width2" aria-labelledby="width_unit_label">
|
||||
<option value="">px</option>
|
||||
<option value="%">%</option>
|
||||
</select>
|
||||
|
@ -32,7 +33,7 @@
|
|||
<tr>
|
||||
<td><label for="size">{#advhr_dlg.size}</label></td>
|
||||
<td><select id="size" name="size">
|
||||
<option value="">Normal</option>
|
||||
<option value="">{#advhr_dlg.normal}</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
|
|
0
library/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css
vendored
Executable file → Normal file
2
library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js
vendored
Executable file → Normal file
|
@ -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)})();
|
||||
(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)})();
|
2
library/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js
vendored
Executable file → Normal file
|
@ -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({
|
||||
|
|
39
library/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm
vendored
Executable file → Normal file
|
@ -10,13 +10,14 @@
|
|||
<script type="text/javascript" src="js/image.js"></script>
|
||||
<link href="css/advimage.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="advimage" style="display: none">
|
||||
<body id="advimage" style="display: none" role="application" aria-labelledby="app_title">
|
||||
<span id="app_title" style="display:none">{#advimage_dlg.dialog_title}</span>
|
||||
<form onsubmit="ImageDialog.insert();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
|
||||
<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
|
||||
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
|
||||
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
|
||||
<li id="appearance_tab" aria-controls="appearance_panel"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
|
||||
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -25,12 +26,12 @@
|
|||
<fieldset>
|
||||
<legend>{#advimage_dlg.general}</legend>
|
||||
|
||||
<table class="properties">
|
||||
<table role="presentation" class="properties">
|
||||
<tr>
|
||||
<td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
|
||||
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
|
||||
<td colspan="2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td>
|
||||
<td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" aria-required="true" /></td>
|
||||
<td id="srcbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
@ -60,7 +61,7 @@
|
|||
<fieldset>
|
||||
<legend>{#advimage_dlg.tab_appearance}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
|
||||
<td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
|
||||
|
@ -86,17 +87,19 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr role="group" aria-labelledby="widthlabel">
|
||||
<td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
|
||||
<td class="nowrap">
|
||||
<input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x
|
||||
<input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px
|
||||
<span style="display:none" id="width_voiceLabel">{#advimage_dlg.width}</span>
|
||||
<input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" aria-labelledby="width_voiceLabel" /> x
|
||||
<span style="display:none" id="height_voiceLabel">{#advimage_dlg.height}</span>
|
||||
<input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" aria-labelledby="height_voiceLabel" /> px
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><table border="0" cellpadding="0" cellspacing="0">
|
||||
<td><table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
|
||||
<td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
|
||||
|
@ -142,13 +145,13 @@
|
|||
<fieldset>
|
||||
<legend>{#advimage_dlg.swap_image}</legend>
|
||||
|
||||
<input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" />
|
||||
<input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" aria-controls="onmouseoversrc onmouseoutsrc" />
|
||||
<label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0" width="100%">
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
|
||||
<td id="onmouseoversrccontainer"> </td>
|
||||
|
@ -161,7 +164,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td>
|
||||
<td class="column2"><table border="0" cellspacing="0" cellpadding="0">
|
||||
<td class="column2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
|
||||
<td id="onmouseoutsrccontainer"> </td>
|
||||
|
@ -178,7 +181,7 @@
|
|||
<fieldset>
|
||||
<legend>{#advimage_dlg.misc}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" /></td>
|
||||
|
@ -211,7 +214,7 @@
|
|||
|
||||
<tr>
|
||||
<td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="longdesc" name="longdesc" type="text" value="" /></td>
|
||||
<td id="longdesccontainer"> </td>
|
||||
|
|
0
library/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif
vendored
Executable file → Normal file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
45
library/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js
vendored
Executable file → Normal file
|
@ -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, '<img id="__mce_tmp" />', {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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
44
library/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js
vendored
Executable file → Normal file
|
@ -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"
|
||||
});
|
||||
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"});
|
0
library/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css
vendored
Executable file → Normal file
0
library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js
vendored
Executable file → Normal file
0
library/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js
vendored
Executable file → Normal file
49
library/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js
vendored
Executable file → Normal file
|
@ -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 += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" o2nfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value=';
|
||||
html += 'this.options[this.selectedIndex].value;">';
|
||||
html += '<option value="">---</option>';
|
||||
|
||||
for (i=0; i<nodes.length; i++) {
|
||||
if ((name = inst.dom.getAttrib(nodes[i], "name")) != "")
|
||||
for (i=0, len=nodes.length; i<len; i++) {
|
||||
if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
|
||||
html += '<option value="#' + name + '">' + name + '</option>';
|
||||
}
|
||||
|
||||
html += '</select>';
|
||||
if (html == "")
|
||||
return "";
|
||||
|
||||
html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
|
||||
+ ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
|
||||
+ '>'
|
||||
+ '<option value="">---</option>'
|
||||
+ html
|
||||
+ '</select>';
|
||||
|
||||
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<elementArray.length; i++)
|
||||
|
@ -425,7 +436,7 @@ function insertAction() {
|
|||
|
||||
function setAllAttribs(elm) {
|
||||
var formObj = document.forms[0];
|
||||
var href = formObj.href.value;
|
||||
var href = formObj.href.value.replace(/ /g, '%20');
|
||||
var target = getSelectValue(formObj, 'targetlist');
|
||||
|
||||
setAttrib(elm, 'href', href);
|
||||
|
@ -477,7 +488,7 @@ function getLinkListHTML(elm_id, target_form_element, onchange_func) {
|
|||
var html = "";
|
||||
|
||||
html += '<select id="' + elm_id + '" name="' + elm_id + '"';
|
||||
html += ' class="mceLinkList" onfoc2us="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
|
||||
html += ' class="mceLinkList" onchange="this.form.' + target_form_element + '.value=';
|
||||
html += 'this.options[this.selectedIndex].value;';
|
||||
|
||||
if (typeof(onchange_func) != "undefined")
|
||||
|
@ -499,7 +510,7 @@ function getTargetListHTML(elm_id, target_form_element) {
|
|||
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
|
||||
var html = '';
|
||||
|
||||
html += '<select id="' + elm_id + '" name="' + elm_id + '" onf2ocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
|
||||
html += '<select id="' + elm_id + '" name="' + elm_id + '" onchange="this.form.' + target_form_element + '.value=';
|
||||
html += 'this.options[this.selectedIndex].value;">';
|
||||
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
|
||||
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
|
||||
|
|
53
library/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js
vendored
Executable file → Normal file
|
@ -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"
|
||||
});
|
||||
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"});
|
49
library/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm
vendored
Executable file → Normal file
|
@ -9,28 +9,29 @@
|
|||
<script type="text/javascript" src="js/advlink.js"></script>
|
||||
<link href="css/advlink.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body id="advlink" style="display: none">
|
||||
<body id="advlink" style="display: none" role="application" onload="javascript:mcTabs.displayTab('general_tab','general_panel', true);" aria-labelledby="app_label">
|
||||
<span class="mceVoiceLabel" id="app_label" style="display:none;">{#advlink_dlg.title}</span>
|
||||
<form onsubmit="insertAction();return false;" action="#">
|
||||
<div class="tabs">
|
||||
<div class="tabs" role="presentation">
|
||||
<ul>
|
||||
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
|
||||
<li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
|
||||
<li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
|
||||
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
|
||||
<li id="general_tab" class="current" aria-controls="general_panel" ><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
|
||||
<li id="popup_tab" aria-controls="popup_panel" ><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
|
||||
<li id="events_tab" aria-controls="events_panel"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
|
||||
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel_wrapper">
|
||||
<div class="panel_wrapper" role="presentation">
|
||||
<div id="general_panel" class="panel current">
|
||||
<fieldset>
|
||||
<legend>{#advlink_dlg.general_props}</legend>
|
||||
|
||||
<table border="0" cellpadding="4" cellspacing="0">
|
||||
<table border="0" cellpadding="4" cellspacing="0" role="presentation">
|
||||
<tr>
|
||||
<td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
|
||||
<td><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td>
|
||||
<td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" aria-required="true" /></td>
|
||||
<td id="hrefbrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
@ -39,7 +40,7 @@
|
|||
<td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
|
||||
<td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id="anchorlistrow">
|
||||
<td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
|
||||
<td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td>
|
||||
</tr>
|
||||
|
@ -70,7 +71,7 @@
|
|||
<input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
|
||||
<label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="4">
|
||||
<table border="0" cellpadding="0" cellspacing="4" role="presentation" >
|
||||
<tr>
|
||||
<td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td>
|
||||
<td>
|
||||
|
@ -86,18 +87,22 @@
|
|||
<td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td>
|
||||
<td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><label>{#advlink_dlg.popup_size}</label> </td>
|
||||
<tr role="group" aria-labelledby="popup_size_label">
|
||||
<td class="nowrap"><label id="popup_size_label">{#advlink_dlg.popup_size}</label> </td>
|
||||
<td class="nowrap">
|
||||
<input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x
|
||||
<input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px
|
||||
<span style="display:none" id="width_voiceLabel">{#advlink_dlg.width}</span>
|
||||
<input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" aria-labelledby="width_voiceLabel" /> x
|
||||
<span style="display:none" id="height_voiceLabel">{#advlink_dlg.height}</span>
|
||||
<input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" aria-labelledby="height_voiceLabel" /> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td>
|
||||
<tr role="group" aria-labelledby="popup_position_label center_hint">
|
||||
<td class="nowrap" id="labelleft"><label id="popup_position_label">{#advlink_dlg.popup_position}</label> </td>
|
||||
<td class="nowrap">
|
||||
<input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> /
|
||||
<input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center)
|
||||
<span style="display:none" id="x_voiceLabel">X</span>
|
||||
<input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" aria-labelledby="x_voiceLabel" /> /
|
||||
<span style="display:none" id="y_voiceLabel">Y</span>
|
||||
<input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" aria-labelledby="y_voiceLabel" /> <span id="center_hint">(c /c = center)</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -105,7 +110,7 @@
|
|||
<fieldset>
|
||||
<legend>{#advlink_dlg.popup_opts}</legend>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="4">
|
||||
<table border="0" cellpadding="0" cellspacing="4" role="presentation" >
|
||||
<tr>
|
||||
<td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
|
||||
<td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
|
||||
|
@ -139,7 +144,7 @@
|
|||
<fieldset>
|
||||
<legend>{#advlink_dlg.advanced_props}</legend>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="4">
|
||||
<table border="0" cellpadding="0" cellspacing="4" role="presentation" >
|
||||
<tr>
|
||||
<td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
|
||||
<td><input id="id" name="id" type="text" value="" /></td>
|
||||
|
@ -259,7 +264,7 @@
|
|||
<fieldset>
|
||||
<legend>{#advlink_dlg.event_props}</legend>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="4">
|
||||
<table border="0" cellpadding="0" cellspacing="4" role="presentation" >
|
||||
<tr>
|
||||
<td class="column1"><label for="onfocus">onfocus</label></td>
|
||||
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
|
||||
|
|
2
library/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin.js
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
|||
(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square")},createControl:function(d,b){var f=this,e,h;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){h=f[d][0]}function c(i,k){var j=true;a(k.styles,function(m,l){if(f.editor.dom.getStyle(i,l)!=m){j=false;return false}});return j}function g(){var k,i=f.editor,l=i.dom,j=i.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,h)){i.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(h){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,h.styles);k.removeAttribute("_mce_style")}}}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){g()}});e.onRenderMenu.add(function(i,j){j.onShowMenu.add(function(){var m=f.editor.dom,l=m.getParent(f.editor.selection.getNode(),"ol,ul"),k;if(l||h){k=f[d];a(j.items,function(n){var o=true;n.setSelected(0);if(l&&!n.isDisabled()){a(k,function(p){if(p.id==n.id){if(!c(l,p)){o=false;return false}}});if(o){n.setSelected(1)}}});if(!l){j.items[h.id].setSelected(1)}}});j.add({id:f.editor.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle"}).setDisabled(1);a(f[d],function(k){k.id=f.editor.dom.uniqueId();j.add({id:k.id,title:k.title,onclick:function(){h=k;g()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})();
|
||||
(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,i,g=f.editor;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){i=f[d][0]}function c(j,l){var k=true;a(l.styles,function(n,m){if(g.dom.getStyle(j,m)!=n){k=false;return false}});return k}function h(){var k,l=g.dom,j=g.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,i)){g.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(i){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,i.styles);k.removeAttribute("data-mce-style")}}g.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){h()}});e.onRenderMenu.add(function(j,k){k.onHideMenu.add(function(){if(f.bookmark){g.selection.moveToBookmark(f.bookmark);f.bookmark=0}});k.onShowMenu.add(function(){var n=g.dom,m=n.getParent(g.selection.getNode(),"ol,ul"),l;if(m||i){l=f[d];a(k.items,function(o){var p=true;o.setSelected(0);if(m&&!o.isDisabled()){a(l,function(q){if(q.id==o.id){if(!c(m,q)){p=false;return false}}});if(p){o.setSelected(1)}}});if(!m){k.items[i.id].setSelected(1)}}g.focus();if(tinymce.isIE){f.bookmark=g.selection.getBookmark(1)}});k.add({id:g.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(l){if(f.isIE7&&l.styles.listStyleType=="lower-greek"){return}l.id=g.dom.uniqueId();k.add({id:l.id,title:l.title,onclick:function(){i=l;h()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})();
|
40
library/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin_src.js
vendored
Executable file → Normal file
|
@ -35,10 +35,13 @@
|
|||
// Setup number formats from config or default
|
||||
t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");
|
||||
t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square");
|
||||
|
||||
if (tinymce.isIE && /MSIE [2-7]/.test(navigator.userAgent))
|
||||
t.isIE7 = true;
|
||||
},
|
||||
|
||||
createControl: function(name, cm) {
|
||||
var t = this, btn, format;
|
||||
var t = this, btn, format, editor = t.editor;
|
||||
|
||||
if (name == 'numlist' || name == 'bullist') {
|
||||
// Default to first item if it's a default item
|
||||
|
@ -50,7 +53,7 @@
|
|||
|
||||
each(format.styles, function(value, name) {
|
||||
// Format doesn't match
|
||||
if (t.editor.dom.getStyle(node, name) != value) {
|
||||
if (editor.dom.getStyle(node, name) != value) {
|
||||
state = false;
|
||||
return false;
|
||||
}
|
||||
|
@ -60,24 +63,25 @@
|
|||
};
|
||||
|
||||
function applyListFormat() {
|
||||
var list, ed = t.editor, dom = ed.dom, sel = ed.selection;
|
||||
var list, dom = editor.dom, sel = editor.selection;
|
||||
|
||||
// Check for existing list element
|
||||
list = dom.getParent(sel.getNode(), 'ol,ul');
|
||||
|
||||
// Switch/add list type if needed
|
||||
if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format))
|
||||
ed.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList');
|
||||
editor.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList');
|
||||
|
||||
// Append styles to new list element
|
||||
if (format) {
|
||||
list = dom.getParent(sel.getNode(), 'ol,ul');
|
||||
|
||||
if (list) {
|
||||
dom.setStyles(list, format.styles);
|
||||
list.removeAttribute('_mce_style');
|
||||
list.removeAttribute('data-mce-style');
|
||||
}
|
||||
}
|
||||
|
||||
editor.focus();
|
||||
};
|
||||
|
||||
btn = cm.createSplitButton(name, {
|
||||
|
@ -89,8 +93,15 @@
|
|||
});
|
||||
|
||||
btn.onRenderMenu.add(function(btn, menu) {
|
||||
menu.onHideMenu.add(function() {
|
||||
if (t.bookmark) {
|
||||
editor.selection.moveToBookmark(t.bookmark);
|
||||
t.bookmark = 0;
|
||||
}
|
||||
});
|
||||
|
||||
menu.onShowMenu.add(function() {
|
||||
var dom = t.editor.dom, list = dom.getParent(t.editor.selection.getNode(), 'ol,ul'), fmtList;
|
||||
var dom = editor.dom, list = dom.getParent(editor.selection.getNode(), 'ol,ul'), fmtList;
|
||||
|
||||
if (list || format) {
|
||||
fmtList = t[name];
|
||||
|
@ -120,12 +131,23 @@
|
|||
if (!list)
|
||||
menu.items[format.id].setSelected(1);
|
||||
}
|
||||
|
||||
editor.focus();
|
||||
|
||||
// IE looses it's selection so store it away and restore it later
|
||||
if (tinymce.isIE) {
|
||||
t.bookmark = editor.selection.getBookmark(1);
|
||||
}
|
||||
});
|
||||
|
||||
menu.add({id : t.editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
||||
menu.add({id : editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle', titleItem: true}).setDisabled(1);
|
||||
|
||||
each(t[name], function(item) {
|
||||
item.id = t.editor.dom.uniqueId();
|
||||
// IE<8 doesn't support lower-greek, skip it
|
||||
if (t.isIE7 && item.styles.listStyleType == 'lower-greek')
|
||||
return;
|
||||
|
||||
item.id = editor.dom.uniqueId();
|
||||
|
||||
menu.add({id : item.id, title : item.title, onclick : function() {
|
||||
format = item;
|
||||
|
|
1
library/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;if(tinyMCE.isIE){return}a.onKeyDown.add(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng().cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})();
|
174
library/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin_src.js
vendored
Normal file
|
@ -0,0 +1,174 @@
|
|||
/**
|
||||
* editor_plugin_src.js
|
||||
*
|
||||
* Copyright 2011, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://tinymce.moxiecode.com/license
|
||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||
*/
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.AutolinkPlugin', {
|
||||
/**
|
||||
* Initializes the plugin, this will be executed after the plugin has been created.
|
||||
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
||||
* of the editor instance to intercept that event.
|
||||
*
|
||||
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
||||
* @param {string} url Absolute URL to where the plugin is located.
|
||||
*/
|
||||
|
||||
init : function(ed, url) {
|
||||
var t = this;
|
||||
|
||||
// Internet Explorer has built-in automatic linking
|
||||
if (tinyMCE.isIE)
|
||||
return;
|
||||
|
||||
// Add a key down handler
|
||||
ed.onKeyDown.add(function(ed, e) {
|
||||
if (e.keyCode == 13)
|
||||
return t.handleEnter(ed);
|
||||
});
|
||||
|
||||
ed.onKeyPress.add(function(ed, e) {
|
||||
if (e.which == 41)
|
||||
return t.handleEclipse(ed);
|
||||
});
|
||||
|
||||
// Add a key up handler
|
||||
ed.onKeyUp.add(function(ed, e) {
|
||||
if (e.keyCode == 32)
|
||||
return t.handleSpacebar(ed);
|
||||
});
|
||||
},
|
||||
|
||||
handleEclipse : function(ed) {
|
||||
this.parseCurrentLine(ed, -1, '(', true);
|
||||
},
|
||||
|
||||
handleSpacebar : function(ed) {
|
||||
this.parseCurrentLine(ed, 0, '', true);
|
||||
},
|
||||
|
||||
handleEnter : function(ed) {
|
||||
this.parseCurrentLine(ed, -1, '', false);
|
||||
},
|
||||
|
||||
parseCurrentLine : function(ed, end_offset, delimiter, goback) {
|
||||
var r, end, start, endContainer, bookmark, text, matches, prev, len;
|
||||
|
||||
// We need at least five characters to form a URL,
|
||||
// hence, at minimum, five characters from the beginning of the line.
|
||||
r = ed.selection.getRng().cloneRange();
|
||||
if (r.startOffset < 5) {
|
||||
// During testing, the caret is placed inbetween two text nodes.
|
||||
// The previous text node contains the URL.
|
||||
prev = r.endContainer.previousSibling;
|
||||
if (prev == null) {
|
||||
if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null)
|
||||
return;
|
||||
|
||||
prev = r.endContainer.firstChild.nextSibling;
|
||||
}
|
||||
len = prev.length;
|
||||
r.setStart(prev, len);
|
||||
r.setEnd(prev, len);
|
||||
|
||||
if (r.endOffset < 5)
|
||||
return;
|
||||
|
||||
end = r.endOffset;
|
||||
endContainer = prev;
|
||||
} else {
|
||||
endContainer = r.endContainer;
|
||||
|
||||
// Get a text node
|
||||
if (endContainer.nodeType != 3 && endContainer.firstChild) {
|
||||
while (endContainer.nodeType != 3 && endContainer.firstChild)
|
||||
endContainer = endContainer.firstChild;
|
||||
|
||||
r.setStart(endContainer, 0);
|
||||
r.setEnd(endContainer, endContainer.nodeValue.length);
|
||||
}
|
||||
|
||||
if (r.endOffset == 1)
|
||||
end = 2;
|
||||
else
|
||||
end = r.endOffset - 1 - end_offset;
|
||||
}
|
||||
|
||||
start = end;
|
||||
|
||||
do
|
||||
{
|
||||
// Move the selection one character backwards.
|
||||
r.setStart(endContainer, end - 2);
|
||||
r.setEnd(endContainer, end - 1);
|
||||
end -= 1;
|
||||
|
||||
// Loop until one of the following is found: a blank space, , delimeter, (end-2) >= 0
|
||||
} while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter);
|
||||
|
||||
if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) {
|
||||
r.setStart(endContainer, end);
|
||||
r.setEnd(endContainer, start);
|
||||
end += 1;
|
||||
} else if (r.startOffset == 0) {
|
||||
r.setStart(endContainer, 0);
|
||||
r.setEnd(endContainer, start);
|
||||
}
|
||||
else {
|
||||
r.setStart(endContainer, end);
|
||||
r.setEnd(endContainer, start);
|
||||
}
|
||||
|
||||
text = r.toString();
|
||||
matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|[A-Z0-9._%+-]+@)(.+)$/i);
|
||||
|
||||
if (matches) {
|
||||
if (matches[1] == 'www.') {
|
||||
matches[1] = 'http://www.';
|
||||
} else if (/@$/.test(matches[1])) {
|
||||
matches[1] = 'mailto:' + matches[1];
|
||||
}
|
||||
|
||||
bookmark = ed.selection.getBookmark();
|
||||
|
||||
ed.selection.setRng(r);
|
||||
tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
|
||||
ed.selection.moveToBookmark(bookmark);
|
||||
|
||||
// TODO: Determine if this is still needed.
|
||||
if (tinyMCE.isWebKit) {
|
||||
// move the caret to its original position
|
||||
ed.selection.collapse(false);
|
||||
var max = Math.min(endContainer.length, start + 1);
|
||||
r.setStart(endContainer, max);
|
||||
r.setEnd(endContainer, max);
|
||||
ed.selection.setRng(r);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns information about the plugin as a name/value array.
|
||||
* The current keys are longname, author, authorurl, infourl and version.
|
||||
*
|
||||
* @return {Object} Name/value array containing information about the plugin.
|
||||
*/
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Autolink',
|
||||
author : 'Moxiecode Systems AB',
|
||||
authorurl : 'http://tinymce.moxiecode.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink',
|
||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Register plugin
|
||||
tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin);
|
||||
})();
|
2
library/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin.js
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
|||
(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this;if(a.getParam("fullscreen_is_enabled")){return}function b(){var h=a.getDoc(),e=h.body,j=h.documentElement,g=tinymce.DOM,i=d.autoresize_min_height,f;f=tinymce.isIE?e.scrollHeight:j.offsetHeight;if(f>d.autoresize_min_height){i=f}g.setStyle(g.get(a.id+"_ifr"),"height",i+"px");if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=a.getElement().offsetHeight;a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onInit.add(function(f,e){f.setProgressState(true);d.throbbing=true;f.getBody().style.overflowY="hidden"});a.onLoadContent.add(function(f,e){b();setTimeout(function(){b();f.setProgressState(false);d.throbbing=false},1250)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})();
|
||||
(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var j,i=a.getDoc(),f=i.body,l=i.documentElement,h=tinymce.DOM,k=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:(tinymce.isWebKit&&f.clientHeight==0?0:f.offsetHeight);if(g>d.autoresize_min_height){k=g}if(d.autoresize_max_height&&g>d.autoresize_max_height){k=d.autoresize_max_height;f.style.overflowY="auto";l.style.overflowY="auto"}else{f.style.overflowY="hidden";l.style.overflowY="hidden";f.scrollTop=0}if(k!==e){j=k-e;h.setStyle(h.get(a.id+"_ifr"),"height",k+"px");e=k;if(tinymce.isWebKit&&j<0){b()}}}d.editor=a;d.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight));d.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0));a.onInit.add(function(f){f.dom.setStyle(f.getBody(),"paddingBottom",f.getParam("autoresize_bottom_margin",50)+"px")});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onLoad.add(b);a.onLoadContent.add(b)}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})();
|
68
library/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin_src.js
vendored
Executable file → Normal file
|
@ -26,7 +26,7 @@
|
|||
* @param {string} url Absolute URL to where the plugin is located.
|
||||
*/
|
||||
init : function(ed, url) {
|
||||
var t = this;
|
||||
var t = this, oldSize = 0;
|
||||
|
||||
if (ed.getParam('fullscreen_is_enabled'))
|
||||
return;
|
||||
|
@ -35,29 +35,51 @@
|
|||
* This method gets executed each time the editor needs to resize.
|
||||
*/
|
||||
function resize() {
|
||||
var d = ed.getDoc(), b = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
|
||||
var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
|
||||
|
||||
// Get height differently depending on the browser used
|
||||
myHeight = tinymce.isIE ? b.scrollHeight : de.offsetHeight;
|
||||
myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
|
||||
|
||||
// Don't make it smaller than the minimum height
|
||||
if (myHeight > t.autoresize_min_height)
|
||||
resizeHeight = myHeight;
|
||||
|
||||
// Resize content element
|
||||
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
|
||||
// If a maximum height has been defined don't exceed this height
|
||||
if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
|
||||
resizeHeight = t.autoresize_max_height;
|
||||
body.style.overflowY = "auto";
|
||||
de.style.overflowY = "auto"; // Old IE
|
||||
} else {
|
||||
body.style.overflowY = "hidden";
|
||||
de.style.overflowY = "hidden"; // Old IE
|
||||
body.scrollTop = 0;
|
||||
}
|
||||
|
||||
// if we're throbbing, we'll re-throb to match the new size
|
||||
if (t.throbbing) {
|
||||
ed.setProgressState(false);
|
||||
ed.setProgressState(true);
|
||||
// Resize content element
|
||||
if (resizeHeight !== oldSize) {
|
||||
deltaSize = resizeHeight - oldSize;
|
||||
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
|
||||
oldSize = resizeHeight;
|
||||
|
||||
// WebKit doesn't decrease the size of the body element until the iframe gets resized
|
||||
// So we need to continue to resize the iframe down until the size gets fixed
|
||||
if (tinymce.isWebKit && deltaSize < 0)
|
||||
resize();
|
||||
}
|
||||
};
|
||||
|
||||
t.editor = ed;
|
||||
|
||||
// Define minimum height
|
||||
t.autoresize_min_height = ed.getElement().offsetHeight;
|
||||
t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
|
||||
|
||||
// Define maximum height
|
||||
t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
|
||||
|
||||
// Add padding at the bottom for better UX
|
||||
ed.onInit.add(function(ed){
|
||||
ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
|
||||
});
|
||||
|
||||
// Add appropriate listeners for resizing content area
|
||||
ed.onChange.add(resize);
|
||||
|
@ -67,30 +89,8 @@
|
|||
ed.onPostRender.add(resize);
|
||||
|
||||
if (ed.getParam('autoresize_on_init', true)) {
|
||||
// Things to do when the editor is ready
|
||||
ed.onInit.add(function(ed, l) {
|
||||
// Show throbber until content area is resized properly
|
||||
ed.setProgressState(true);
|
||||
t.throbbing = true;
|
||||
|
||||
// Hide scrollbars
|
||||
ed.getBody().style.overflowY = "hidden";
|
||||
});
|
||||
|
||||
ed.onLoadContent.add(function(ed, l) {
|
||||
resize();
|
||||
|
||||
// Because the content area resizes when its content CSS loads,
|
||||
// and we can't easily add a listener to its onload event,
|
||||
// we'll just trigger a resize after a short loading period
|
||||
setTimeout(function() {
|
||||
resize();
|
||||
|
||||
// Disable throbber
|
||||
ed.setProgressState(false);
|
||||
t.throbbing = false;
|
||||
}, 1250);
|
||||
});
|
||||
ed.onLoad.add(resize);
|
||||
ed.onLoadContent.add(resize);
|
||||
}
|
||||
|
||||
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
||||
|
|
2
library/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin.js
vendored
Executable file → Normal file
|
@ -1 +1 @@
|
|||
(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent().replace(/\s| |<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();m.save("TinyMCE")},getItem:function(l){var m=i.getElement();m.load("TinyMCE");return m.getAttribute(l)},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent();if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,i=h.storage;if(i){content=i.getItem(h.key);if(content){h.editor.setContent(content);h.onRestoreDraft.dispatch(h,{content:content})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce);
|
||||
(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s| |<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce);
|
17
library/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js
vendored
Executable file → Normal file
|
@ -106,7 +106,7 @@
|
|||
ed.addButton(RESTORE_DRAFT, {
|
||||
title : PLUGIN_NAME + ".restore_content",
|
||||
onclick : function() {
|
||||
if (ed.getContent().replace(/\s| |<\/?p[^>]*>|<br[^>]*>/gi, "").length > 0) {
|
||||
if (ed.getContent({draft: true}).replace(/\s| |<\/?p[^>]*>|<br[^>]*>/gi, "").length > 0) {
|
||||
// Show confirm dialog if the editor isn't empty
|
||||
ed.windowManager.confirm(
|
||||
PLUGIN_NAME + ".warning_message",
|
||||
|
@ -257,15 +257,24 @@
|
|||
|
||||
userDataElement.setAttribute(key, value);
|
||||
userDataElement.expires = self.getExpDate();
|
||||
|
||||
try {
|
||||
userDataElement.save("TinyMCE");
|
||||
} catch (e) {
|
||||
// Ignore, saving might fail if "Userdata Persistence" is disabled in IE
|
||||
}
|
||||
},
|
||||
|
||||
getItem : function(key) {
|
||||
var userDataElement = ed.getElement();
|
||||
|
||||
try {
|
||||
userDataElement.load("TinyMCE");
|
||||
|
||||
return userDataElement.getAttribute(key);
|
||||
} catch (e) {
|
||||
// Ignore, loading might fail if "Userdata Persistence" is disabled in IE
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
removeItem : function(key) {
|
||||
|
@ -303,7 +312,7 @@
|
|||
return;
|
||||
|
||||
// Store contents if the contents if longer than the minlength of characters
|
||||
content = editor.getContent();
|
||||
content = editor.getContent({draft: true});
|
||||
if (content.length > editor.settings.autosave_minlength) {
|
||||
expires = self.getExpDate();
|
||||
|
||||
|
@ -326,7 +335,7 @@
|
|||
* @method restoreDraft
|
||||
*/
|
||||
restoreDraft : function() {
|
||||
var self = this, storage = self.storage;
|
||||
var self = this, storage = self.storage, content;
|
||||
|
||||
if (storage) {
|
||||
content = storage.getItem(self.key);
|
||||
|
|
0
library/tinymce/jscripts/tiny_mce/plugins/autosave/langs/en.js
vendored
Executable file → Normal file
156
library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js
vendored
Executable file → Normal file
|
@ -1,155 +1 @@
|
|||
/**
|
||||
* 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) {
|
||||
s = s.replace(re, str);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* oembed */
|
||||
function _h2b_cb(match) {
|
||||
text = bin2hex(match);
|
||||
function s_h2b(data) {
|
||||
match = data;
|
||||
}
|
||||
$.ajax({
|
||||
url: 'oembed/h2b?text=' + text,
|
||||
async: false,
|
||||
success: s_h2b,
|
||||
dataType: 'html'
|
||||
});
|
||||
return match;
|
||||
}
|
||||
s = s.replace(/<span class=\"oembed(.*?)<\/span>/gi, _h2b_cb);
|
||||
/* /oembed */
|
||||
|
||||
|
||||
// example: <strong> to [b]
|
||||
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
|
||||
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
|
||||
rep(/<span style=\"color:(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
|
||||
rep(/<font>(.*?)<\/font>/gi,"$1");
|
||||
rep(/<img.*?width=\"(.*?)\".*?height=\"(.*?)\".*?src=\"(.*?)\".*?\/>/gi,"[img=$1x$2]$3[/img]");
|
||||
rep(/<img.*?height=\"(.*?)\".*?width=\"(.*?)\".*?src=\"(.*?)\".*?\/>/gi,"[img=$2x$1]$3[/img]");
|
||||
rep(/<img.*?src=\"(.*?)\".*?height=\"(.*?)\".*?width=\"(.*?)\".*?\/>/gi,"[img=$3x$2]$1[/img]");
|
||||
rep(/<img.*?src=\"(.*?)\".*?width=\"(.*?)\".*?height=\"(.*?)\".*?\/>/gi,"[img=$2x$3]$1[/img]");
|
||||
rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
|
||||
rep(/<code>(.*?)<\/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 style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");
|
||||
rep(/<u>/gi,"[u]");
|
||||
rep(/<blockquote[^>]*>/gi,"[quote]");
|
||||
rep(/<\/blockquote>/gi,"[/quote]");
|
||||
rep(/<br \/>/gi,"\n\n");
|
||||
rep(/<br\/>/gi,"\n\n");
|
||||
rep(/<br>/gi,"\n");
|
||||
rep(/<p>/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) {
|
||||
s = s.replace(re, str);
|
||||
};
|
||||
|
||||
// example: [b] to <strong>
|
||||
rep(/\n/gi,"<br />");
|
||||
rep(/\[b\]/gi,"<strong>");
|
||||
rep(/\[\/b\]/gi,"</strong>");
|
||||
rep(/\[i\]/gi,"<em>");
|
||||
rep(/\[\/i\]/gi,"</em>");
|
||||
rep(/\[u\]/gi,"<u>");
|
||||
rep(/\[\/u\]/gi,"</u>");
|
||||
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
|
||||
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
|
||||
rep(/\[img=(.*?)x(.*?)\](.*?)\[\/img\]/gi,"<img width=\"$1\" height=\"$2\" src=\"$3\" />");
|
||||
rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
|
||||
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<span style=\"color: $1;\">$2</span>");
|
||||
rep(/\[size=(.*?)\](.*?)\[\/size\]/gi,"<span style=\"font-size: $1;\">$2</span>");
|
||||
rep(/\[code\](.*?)\[\/code\]/gi,"<code>$1</code>");
|
||||
rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<blockquote>$1</blockquote>");
|
||||
|
||||
/* 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);
|
||||
})();
|
||||
(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.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}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/<font>(.*?)<\/font>/gi,"$1");b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");b(/<u>/gi,"[u]");b(/<blockquote[^>]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/<br \/>/gi,"\n");b(/<br\/>/gi,"\n");b(/<br>/gi,"\n");b(/<p>/gi,"");b(/<\/p>/gi,"\n");b(/ |\u00a0/gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"<br />");b(/\[b\]/gi,"<strong>");b(/\[\/b\]/gi,"</strong>");b(/\[i\]/gi,"<em>");b(/\[\/i\]/gi,"</em>");b(/\[u\]/gi,"<u>");b(/\[\/u\]/gi,"</u>");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>');b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>');b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>');b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})();
|
|
@ -1 +0,0 @@
|
|||
(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 version:tinymce.majorVersion+"."+tinymce.minorVersion}},_dfrn_html2bbcode:function(s){s=tinymce.trim(s);function rep(re,str){s=s.replace(re,str)};rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");rep(/<font>(.*?)<\/font>/gi,"$1");rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");rep(/<code>(.*?)<\/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 style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");rep(/<u>/gi,"[u]");rep(/<blockquote[^>]*>/gi,"[quote]");rep(/<\/blockquote>/gi,"[/quote]");rep(/<br \/>/gi,"\n");rep(/<br\/>/gi,"\n");rep(/<br>/gi,"\n");rep(/<p>/gi,"");rep(/<\/p>/gi,"\n");rep(/ /gi," ");rep(/"/gi,"\"");rep(/</gi,"<");rep(/>/gi,">");rep(/&/gi,"&");return s},_dfrn_bbcode2html:function(s){s=tinymce.trim(s);function rep(re,str){s=s.replace(re,str)};rep(/\n/gi,"<br />");rep(/\[b\]/gi,"<strong>");rep(/\[\/b\]/gi,"</strong>");rep(/\[i\]/gi,"<em>");rep(/\[\/i\]/gi,"</em>");rep(/\[u\]/gi,"<u>");rep(/\[\/u\]/gi,"</u>");rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>");rep(/\[code\](.*?)\[\/code\]/gi,"<code>$1</code>");rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<blockquote>$1</blockquote>");return s}});tinymce.PluginManager.add('bbcode',tinymce.plugins.BBCodePlugin)})();
|
2
library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
vendored
Executable file → Normal file
|
@ -150,7 +150,7 @@
|
|||
rep(/<blockquote[^>]*>/gi,"[quote]");
|
||||
rep(/<\/blockquote>/gi,"[/quote]");
|
||||
rep(/<hr \/>/gi,"[hr]");
|
||||
rep(/<br \/>/gi,"\n\n");
|
||||
rep(/<br (.*?)\/>/gi,"\n\n");
|
||||
rep(/<br\/>/gi,"\n\n");
|
||||
rep(/<br>/gi,"\n");
|
||||
rep(/<p>/gi,"");
|
||||
|
|