Merge pull request #1 from friendica/master
Test update of my branched Red
This commit is contained in:
commit
f3ba283613
2
boot.php
2
boot.php
@ -43,7 +43,7 @@ require_once('include/taxonomy.php');
|
|||||||
define ( 'RED_PLATFORM', 'Red Matrix' );
|
define ( 'RED_PLATFORM', 'Red Matrix' );
|
||||||
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||||
define ( 'ZOT_REVISION', 1 );
|
define ( 'ZOT_REVISION', 1 );
|
||||||
define ( 'DB_UPDATE_VERSION', 1059 );
|
define ( 'DB_UPDATE_VERSION', 1060 );
|
||||||
|
|
||||||
define ( 'EOL', '<br />' . "\r\n" );
|
define ( 'EOL', '<br />' . "\r\n" );
|
||||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||||
|
@ -137,7 +137,7 @@ function localize_item(&$item){
|
|||||||
case ACTIVITY_OBJ_NOTE:
|
case ACTIVITY_OBJ_NOTE:
|
||||||
default:
|
default:
|
||||||
$post_type = t('status');
|
$post_type = t('status');
|
||||||
if($obj['id'] != $item['mid'])
|
if($obj['mid'] != $obj['parent_mid'])
|
||||||
$post_type = t('comment');
|
$post_type = t('comment');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -840,6 +840,9 @@ function encode_mail($item) {
|
|||||||
$x['from'] = encode_item_xchan($item['from']);
|
$x['from'] = encode_item_xchan($item['from']);
|
||||||
$x['to'] = encode_item_xchan($item['to']);
|
$x['to'] = encode_item_xchan($item['to']);
|
||||||
|
|
||||||
|
if($item['attach'])
|
||||||
|
$x['attach'] = json_decode_plus($item['attach']);
|
||||||
|
|
||||||
$x['flags'] = array();
|
$x['flags'] = array();
|
||||||
|
|
||||||
if($item['mail_flags'] & MAIL_RECALLED) {
|
if($item['mail_flags'] & MAIL_RECALLED) {
|
||||||
@ -885,6 +888,9 @@ function get_mail_elements($x) {
|
|||||||
$arr['mid'] = (($x['message_id']) ? htmlentities($x['message_id'], ENT_COMPAT,'UTF-8',false) : '');
|
$arr['mid'] = (($x['message_id']) ? htmlentities($x['message_id'], ENT_COMPAT,'UTF-8',false) : '');
|
||||||
$arr['parent_mid'] = (($x['message_parent']) ? htmlentities($x['message_parent'], ENT_COMPAT,'UTF-8',false) : '');
|
$arr['parent_mid'] = (($x['message_parent']) ? htmlentities($x['message_parent'], ENT_COMPAT,'UTF-8',false) : '');
|
||||||
|
|
||||||
|
if($x['attach'])
|
||||||
|
$arr['attach'] = activity_sanitise($x['attach']);
|
||||||
|
|
||||||
|
|
||||||
if(import_author_xchan($x['from']))
|
if(import_author_xchan($x['from']))
|
||||||
$arr['from_xchan'] = base64url_encode(hash('whirlpool',$x['from']['guid'] . $x['from']['guid_sig'], true));
|
$arr['from_xchan'] = base64url_encode(hash('whirlpool',$x['from']['guid'] . $x['from']['guid_sig'], true));
|
||||||
@ -2202,6 +2208,9 @@ function mail_store($arr) {
|
|||||||
if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
|
if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false))
|
||||||
$arr['body'] = escape_tags($arr['body']);
|
$arr['body'] = escape_tags($arr['body']);
|
||||||
|
|
||||||
|
if(array_key_exists('attach',$arr) && is_array($arr['attach']))
|
||||||
|
$arr['attach'] = json_encode($arr['attach']);
|
||||||
|
|
||||||
$arr['account_id'] = ((x($arr,'account_id')) ? intval($arr['account_id']) : 0);
|
$arr['account_id'] = ((x($arr,'account_id')) ? intval($arr['account_id']) : 0);
|
||||||
$arr['mid'] = ((x($arr,'mid')) ? notags(trim($arr['mid'])) : random_string());
|
$arr['mid'] = ((x($arr,'mid')) ? notags(trim($arr['mid'])) : random_string());
|
||||||
$arr['from_xchan'] = ((x($arr,'from_xchan')) ? notags(trim($arr['from_xchan'])) : '');
|
$arr['from_xchan'] = ((x($arr,'from_xchan')) ? notags(trim($arr['from_xchan'])) : '');
|
||||||
@ -2210,6 +2219,7 @@ function mail_store($arr) {
|
|||||||
$arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : '');
|
$arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : '');
|
||||||
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? notags(trim($arr['parent_mid'])) : '');
|
$arr['parent_mid'] = ((x($arr,'parent_mid')) ? notags(trim($arr['parent_mid'])) : '');
|
||||||
$arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : '');
|
$arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : '');
|
||||||
|
|
||||||
$arr['mail_flags'] = ((x($arr,'mail_flags')) ? intval($arr['mail_flags']) : 0 );
|
$arr['mail_flags'] = ((x($arr,'mail_flags')) ? intval($arr['mail_flags']) : 0 );
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
/* Private Message backend API */
|
/* Private Message backend API */
|
||||||
|
|
||||||
require_once('include/crypto.php');
|
require_once('include/crypto.php');
|
||||||
|
require_once('include/attach.php');
|
||||||
|
|
||||||
// send a private message
|
// send a private message
|
||||||
|
|
||||||
@ -74,14 +75,44 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
|
|||||||
if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match))
|
if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match))
|
||||||
$images = $match[1];
|
$images = $match[1];
|
||||||
|
|
||||||
|
$match = false;
|
||||||
|
|
||||||
|
if(preg_match_all("/\[attachment\](.*?)\[\/attachment\]/",$body,$match))
|
||||||
|
$attaches = $match[1];
|
||||||
|
|
||||||
|
$attachments = '';
|
||||||
|
|
||||||
|
if(preg_match_all('/(\[attachment\](.*?)\[\/attachment\])/',$body,$match)) {
|
||||||
|
$attachments = array();
|
||||||
|
foreach($match[2] as $mtch) {
|
||||||
|
$hash = substr($mtch,0,strpos($mtch,','));
|
||||||
|
$rev = intval(substr($mtch,strpos($mtch,',')));
|
||||||
|
$r = attach_by_hash_nodata($hash,$rev);
|
||||||
|
if($r['success']) {
|
||||||
|
$attachments[] = array(
|
||||||
|
'href' => $a->get_baseurl() . '/attach/' . $r['data']['hash'],
|
||||||
|
'length' => $r['data']['filesize'],
|
||||||
|
'type' => $r['data']['filetype'],
|
||||||
|
'title' => urlencode($r['data']['filename']),
|
||||||
|
'revision' => $r['data']['revision']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$body = str_replace($match[1],'',$body);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$jattach = (($attachments) ? json_encode($attachments) : '');
|
||||||
|
|
||||||
$key = get_config('system','pubkey');
|
$key = get_config('system','pubkey');
|
||||||
if($subject)
|
if($subject)
|
||||||
$subject = json_encode(aes_encapsulate($subject,$key));
|
$subject = json_encode(aes_encapsulate($subject,$key));
|
||||||
if($body)
|
if($body)
|
||||||
$body = json_encode(aes_encapsulate($body,$key));
|
$body = json_encode(aes_encapsulate($body,$key));
|
||||||
|
|
||||||
$r = q("INSERT INTO mail ( account_id, mail_flags, channel_id, from_xchan, to_xchan, title, body, mid, parent_mid, created )
|
|
||||||
VALUES ( %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
|
|
||||||
|
$r = q("INSERT INTO mail ( account_id, mail_flags, channel_id, from_xchan, to_xchan, title, body, attach, mid, parent_mid, created )
|
||||||
|
VALUES ( %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
|
||||||
intval($channel['channel_account_id']),
|
intval($channel['channel_account_id']),
|
||||||
intval(MAIL_OBSCURED),
|
intval(MAIL_OBSCURED),
|
||||||
intval($channel['channel_id']),
|
intval($channel['channel_id']),
|
||||||
@ -89,6 +120,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
|
|||||||
dbesc($recipient),
|
dbesc($recipient),
|
||||||
dbesc($subject),
|
dbesc($subject),
|
||||||
dbesc($body),
|
dbesc($body),
|
||||||
|
dbesc($jattach),
|
||||||
dbesc($mid),
|
dbesc($mid),
|
||||||
dbesc($replyto),
|
dbesc($replyto),
|
||||||
dbesc(datetime_convert())
|
dbesc(datetime_convert())
|
||||||
@ -122,6 +154,19 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($attaches) {
|
||||||
|
foreach($attaches as $attach) {
|
||||||
|
$hash = substr($attach,0,strpos($attach,','));
|
||||||
|
$rev = intval(substr($attach,strpos($attach,',')));
|
||||||
|
attach_store($channel,$observer_hash,$options = 'update', array(
|
||||||
|
'hash' => $hash,
|
||||||
|
'revision' => $rev,
|
||||||
|
'allow_cid' => '<' . $recipient . '>',
|
||||||
|
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
proc_run('php','include/notifier.php','mail',$post_id);
|
proc_run('php','include/notifier.php','mail',$post_id);
|
||||||
|
|
||||||
$ret['success'] = true;
|
$ret['success'] = true;
|
||||||
|
@ -504,6 +504,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
|
|||||||
`channel_id` int(10) unsigned NOT NULL,
|
`channel_id` int(10) unsigned NOT NULL,
|
||||||
`title` text NOT NULL,
|
`title` text NOT NULL,
|
||||||
`body` mediumtext NOT NULL,
|
`body` mediumtext NOT NULL,
|
||||||
|
`attach` mediumtext NOT NULL DEFAULT '',
|
||||||
`mid` char(255) NOT NULL,
|
`mid` char(255) NOT NULL,
|
||||||
`parent_mid` char(255) NOT NULL,
|
`parent_mid` char(255) NOT NULL,
|
||||||
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1059 );
|
define( 'UPDATE_VERSION' , 1060 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -682,3 +682,10 @@ ADD INDEX ( `mitem_flags` ) ");
|
|||||||
return UPDATE_SUCCESS;
|
return UPDATE_SUCCESS;
|
||||||
return UPDATE_FAILED;
|
return UPDATE_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_r1059() {
|
||||||
|
$r = q("ALTER TABLE `mail` ADD `attach` MEDIUMTEXT NOT NULL DEFAULT '' AFTER `body` ");
|
||||||
|
if($r)
|
||||||
|
return UPDATE_SUCCESS;
|
||||||
|
return UPDATE_FAILED;
|
||||||
|
}
|
||||||
|
@ -206,10 +206,35 @@ function import_post(&$a) {
|
|||||||
|
|
||||||
// import xchans and contact photos
|
// import xchans and contact photos
|
||||||
|
|
||||||
|
if($seize) {
|
||||||
|
|
||||||
|
// replace our existing xchan if we're seizing control
|
||||||
|
|
||||||
|
$r = q("delete from xchan where xchan_hash = '%s' limit 1",
|
||||||
|
dbesc($channel['channel_hash'])
|
||||||
|
);
|
||||||
|
|
||||||
|
$r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_l, xchan_photo_m, xchan_photo_s, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_photo_date, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",
|
||||||
|
dbesc($channel['channel_hash']),
|
||||||
|
dbesc($channel['channel_guid']),
|
||||||
|
dbesc($channel['channel_guid_sig']),
|
||||||
|
dbesc($channel['channel_pubkey']),
|
||||||
|
dbesc($a->get_baseurl() . "/photo/profile/l/" . $channel['channel_id']),
|
||||||
|
dbesc($a->get_baseurl() . "/photo/profile/m/" . $channel['channel_id']),
|
||||||
|
dbesc($a->get_baseurl() . "/photo/profile/s/" . $channel['channel_id']),
|
||||||
|
dbesc($channel['channel_address'] . '@' . get_app()->get_hostname()),
|
||||||
|
dbesc(z_root() . '/channel/' . $channel['channel_address']),
|
||||||
|
dbesc($channel['channel_name']),
|
||||||
|
dbesc('zot'),
|
||||||
|
dbesc(datetime_convert()),
|
||||||
|
dbesc(datetime_convert())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$xchans = $data['xchan'];
|
$xchans = $data['xchan'];
|
||||||
if($xchans) {
|
if($xchans) {
|
||||||
foreach($xchans as $xchan) {
|
foreach($xchans as $xchan) {
|
||||||
|
|
||||||
$r = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
|
$r = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
|
||||||
dbesc($xchan['xchan_hash'])
|
dbesc($xchan['xchan_hash'])
|
||||||
);
|
);
|
||||||
|
@ -110,6 +110,7 @@ function like_content(&$a) {
|
|||||||
$obj = json_encode(array(
|
$obj = json_encode(array(
|
||||||
'type' => $objtype,
|
'type' => $objtype,
|
||||||
'id' => $item['mid'],
|
'id' => $item['mid'],
|
||||||
|
'parent' => (($item['thr_parent']) ? $item['thr_parent'] : $item['parent_mid']),
|
||||||
'link' => $links,
|
'link' => $links,
|
||||||
'title' => $item['title'],
|
'title' => $item['title'],
|
||||||
'content' => $item['body'],
|
'content' => $item['body'],
|
||||||
|
@ -249,7 +249,7 @@ function message_content(&$a) {
|
|||||||
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
$a->page['htmlhead'] .= replace_macros($tpl, array(
|
||||||
'$baseurl' => $a->get_baseurl(true),
|
'$baseurl' => $a->get_baseurl(true),
|
||||||
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
|
||||||
'$nickname' => $channel['channel_addr'],
|
'$nickname' => $channel['channel_address'],
|
||||||
'$linkurl' => t('Please enter a link URL:')
|
'$linkurl' => t('Please enter a link URL:')
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -293,6 +293,7 @@ function message_content(&$a) {
|
|||||||
'$select' => $select,
|
'$select' => $select,
|
||||||
'$parent' => '',
|
'$parent' => '',
|
||||||
'$upload' => t('Upload photo'),
|
'$upload' => t('Upload photo'),
|
||||||
|
'$attach' => t('Attach file'),
|
||||||
'$insert' => t('Insert web link'),
|
'$insert' => t('Insert web link'),
|
||||||
'$wait' => t('Please wait'),
|
'$wait' => t('Please wait'),
|
||||||
'$submit' => t('Submit')
|
'$submit' => t('Submit')
|
||||||
@ -371,10 +372,39 @@ function message_content(&$a) {
|
|||||||
|
|
||||||
foreach($messages as $message) {
|
foreach($messages as $message) {
|
||||||
|
|
||||||
// FIXME
|
$s = $arr = '';
|
||||||
// $extracted = item_extract_images($message['body']);
|
|
||||||
// if($extracted['images'])
|
if($message['attach'])
|
||||||
// $message['body'] = item_redir_and_replace_images($extracted['body'], $extracted['images'], $message['contact-id']);
|
$arr = json_decode_plus($message['attach']);
|
||||||
|
if($arr) {
|
||||||
|
$s .= '<div class="body-attach">';
|
||||||
|
foreach($arr as $r) {
|
||||||
|
$matches = false;
|
||||||
|
$icon = '';
|
||||||
|
$icontype = substr($r['type'],0,strpos($r['type'],'/'));
|
||||||
|
|
||||||
|
switch($icontype) {
|
||||||
|
case 'video':
|
||||||
|
case 'audio':
|
||||||
|
case 'image':
|
||||||
|
case 'text':
|
||||||
|
$icon = '<div class="attachtype icon s22 type-' . $icontype . '"></div>';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$icon = '<div class="attachtype icon s22 type-unkn"></div>';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$title = htmlentities($r['title'], ENT_COMPAT,'UTF-8');
|
||||||
|
if(! $title)
|
||||||
|
$title = t('unknown.???');
|
||||||
|
$title .= ' ' . $r['length'] . ' ' . t('bytes');
|
||||||
|
|
||||||
|
$url = $a->get_baseurl() . '/magic?f=&hash=' . $message['from_xchan'] . '&dest=' . $r['href'] . '/' . $r['revision'];
|
||||||
|
$s .= '<a href="' . $url . '" title="' . $title . '" class="attachlink" >' . $icon . '</a>';
|
||||||
|
}
|
||||||
|
$s .= '<div class="clear"></div></div>';
|
||||||
|
}
|
||||||
|
|
||||||
$mails[] = array(
|
$mails[] = array(
|
||||||
'id' => $message['id'],
|
'id' => $message['id'],
|
||||||
@ -385,7 +415,7 @@ function message_content(&$a) {
|
|||||||
'to_url' => chanlink_hash($message['to_xchan']),
|
'to_url' => chanlink_hash($message['to_xchan']),
|
||||||
'to_photo' => $message['to']['xchan_photo_m'],
|
'to_photo' => $message['to']['xchan_photo_m'],
|
||||||
'subject' => $message['title'],
|
'subject' => $message['title'],
|
||||||
'body' => smilies(bbcode($message['body'])),
|
'body' => smilies(bbcode($message['body']) . $s),
|
||||||
'delete' => t('Delete message'),
|
'delete' => t('Delete message'),
|
||||||
'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'],'D, d M Y - g:i A'),
|
'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'],'D, d M Y - g:i A'),
|
||||||
);
|
);
|
||||||
@ -425,6 +455,7 @@ function message_content(&$a) {
|
|||||||
'$select' => $select,
|
'$select' => $select,
|
||||||
'$parent' => $parent,
|
'$parent' => $parent,
|
||||||
'$upload' => t('Upload photo'),
|
'$upload' => t('Upload photo'),
|
||||||
|
'$attach' => t('Attach file'),
|
||||||
'$insert' => t('Insert web link'),
|
'$insert' => t('Insert web link'),
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
'$wait' => t('Please wait')
|
'$wait' => t('Please wait')
|
||||||
|
@ -1 +1 @@
|
|||||||
2013-08-18.409
|
2013-08-19.410
|
||||||
|
@ -64,7 +64,7 @@ $a->config['system']['max_import_size'] = 200000;
|
|||||||
|
|
||||||
// maximum size of uploaded photos
|
// maximum size of uploaded photos
|
||||||
|
|
||||||
$a->config['system']['maximagesize'] = 800000;
|
$a->config['system']['maximagesize'] = 3000000;
|
||||||
|
|
||||||
// Location of PHP command line processor
|
// Location of PHP command line processor
|
||||||
|
|
||||||
|
@ -1882,6 +1882,7 @@ tr.mceLast {
|
|||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
}
|
}
|
||||||
#prvmail-upload-wrapper,
|
#prvmail-upload-wrapper,
|
||||||
|
#prvmail-attach-wrapper,
|
||||||
#prvmail-link-wrapper,
|
#prvmail-link-wrapper,
|
||||||
#prvmail-rotator-wrapper {
|
#prvmail-rotator-wrapper {
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -54,7 +54,19 @@ else
|
|||||||
name: 'userfile',
|
name: 'userfile',
|
||||||
onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); },
|
onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); },
|
||||||
onComplete: function(file,response) {
|
onComplete: function(file,response) {
|
||||||
tinyMCE.execCommand('mceInsertRawHTML',false,response);
|
addeditortext(response);
|
||||||
|
$('#profile-rotator').spin(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
var file_uploader = new window.AjaxUpload(
|
||||||
|
'prvmail-attach',
|
||||||
|
{ action: 'wall_attach/{{$nickname}}',
|
||||||
|
name: 'userfile',
|
||||||
|
onSubmit: function(file,ext) { $('#profile-rotator').spin('tiny'); },
|
||||||
|
onComplete: function(file,response) {
|
||||||
|
addeditortext(response);
|
||||||
$('#profile-rotator').spin(false);
|
$('#profile-rotator').spin(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,7 +79,7 @@ else
|
|||||||
if(reply && reply.length) {
|
if(reply && reply.length) {
|
||||||
$('#profile-rotator').spin('tiny');
|
$('#profile-rotator').spin('tiny');
|
||||||
$.get('parse_url?url=' + reply, function(data) {
|
$.get('parse_url?url=' + reply, function(data) {
|
||||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
addeditortext(response);
|
||||||
$('#profile-rotator').spin(false);
|
$('#profile-rotator').spin(false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -86,11 +98,22 @@ else
|
|||||||
if(reply && reply.length) {
|
if(reply && reply.length) {
|
||||||
$('#profile-rotator').spin('tiny');
|
$('#profile-rotator').spin('tiny');
|
||||||
$.get('parse_url?url=' + reply, function(data) {
|
$.get('parse_url?url=' + reply, function(data) {
|
||||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
addeditortext(response);
|
||||||
$('#profile-rotator').spin(false);
|
$('#profile-rotator').spin(false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addeditortext(data) {
|
||||||
|
if(plaintext == 'none') {
|
||||||
|
var currentText = $("#prvmail-text").val();
|
||||||
|
$("#prvmail-text").val(currentText + data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -26,6 +26,12 @@
|
|||||||
<div id="prvmail-upload-wrapper" >
|
<div id="prvmail-upload-wrapper" >
|
||||||
<div id="prvmail-upload" class="icon border camera" title="{{$upload}}" ></div>
|
<div id="prvmail-upload" class="icon border camera" title="{{$upload}}" ></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="prvmail-attach-wrapper" >
|
||||||
|
<div id="prvmail-attach" class="icon attach" title="{{$attach}}" ></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="prvmail-link-wrapper" >
|
<div id="prvmail-link-wrapper" >
|
||||||
<div id="prvmail-link" class="icon border link" title="{{$insert}}" onclick="jotGetLink();" ></div>
|
<div id="prvmail-link" class="icon border link" title="{{$insert}}" onclick="jotGetLink();" ></div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user