Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
This commit is contained in:
commit
e9f1bac062
@ -1173,7 +1173,9 @@ function status_editor($a, $x, $popup = false) {
|
|||||||
'$term' => t('Tag term:'),
|
'$term' => t('Tag term:'),
|
||||||
'$fileas' => t('Save to Folder:'),
|
'$fileas' => t('Save to Folder:'),
|
||||||
'$whereareu' => t('Where are you right now?'),
|
'$whereareu' => t('Where are you right now?'),
|
||||||
'$expireswhen' => t('Expires YYYY-MM-DD HH:MM')
|
'$expireswhen' => t('Expires YYYY-MM-DD HH:MM'),
|
||||||
|
'$editor_autocomplete'=> ((x($x,'editor_autocomplete')) ? $x['editor_autocomplete'] : ''),
|
||||||
|
'$bbco_autocomplete'=> ((x($x,'bbco_autocomplete')) ? $x['bbco_autocomplete'] : ''),
|
||||||
));
|
));
|
||||||
|
|
||||||
$tpl = get_markup_template('jot.tpl');
|
$tpl = get_markup_template('jot.tpl');
|
||||||
@ -1274,6 +1276,7 @@ function status_editor($a, $x, $popup = false) {
|
|||||||
'$expiryModalOK' => t('OK'),
|
'$expiryModalOK' => t('OK'),
|
||||||
'$expiryModalCANCEL' => t('Cancel'),
|
'$expiryModalCANCEL' => t('Cancel'),
|
||||||
'$expanded' => ((x($x, 'expanded')) ? $x['expanded'] : false),
|
'$expanded' => ((x($x, 'expanded')) ? $x['expanded'] : false),
|
||||||
|
'$bbcode' => ((x($x, 'bbcode')) ? $x['bbcode'] : false)
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($popup === true) {
|
if ($popup === true) {
|
||||||
|
@ -95,7 +95,9 @@ function blocks_content(&$a) {
|
|||||||
'ptlabel' => t('Block Name'),
|
'ptlabel' => t('Block Name'),
|
||||||
'profile_uid' => intval($owner),
|
'profile_uid' => intval($owner),
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'novoting' => true
|
'novoting' => true,
|
||||||
|
'bbco_autocomplete' => 'bbcode',
|
||||||
|
'bbcode' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
if($_REQUEST['title'])
|
if($_REQUEST['title'])
|
||||||
|
@ -124,15 +124,18 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
|
|
||||||
$x = array(
|
$x = array(
|
||||||
'is_owner' => $is_owner,
|
'is_owner' => $is_owner,
|
||||||
'allow_location' => ((($is_owner || $observer) && (intval(get_pconfig(App::$profile['profile_uid'],'system','use_browser_location')))) ? true : false),
|
'allow_location' => ((($is_owner || $observer) && (intval(get_pconfig(App::$profile['profile_uid'],'system','use_browser_location')))) ? true : false),
|
||||||
'default_location' => (($is_owner) ? App::$profile['channel_location'] : ''),
|
'default_location' => (($is_owner) ? App::$profile['channel_location'] : ''),
|
||||||
'nickname' => App::$profile['channel_address'],
|
'nickname' => App::$profile['channel_address'],
|
||||||
'lockstate' => (((strlen(App::$profile['channel_allow_cid'])) || (strlen(App::$profile['channel_allow_gid'])) || (strlen(App::$profile['channel_deny_cid'])) || (strlen(App::$profile['channel_deny_gid']))) ? 'lock' : 'unlock'),
|
'lockstate' => (((strlen(App::$profile['channel_allow_cid'])) || (strlen(App::$profile['channel_allow_gid'])) || (strlen(App::$profile['channel_deny_cid'])) || (strlen(App::$profile['channel_deny_gid']))) ? 'lock' : 'unlock'),
|
||||||
'acl' => (($is_owner) ? populate_acl($channel_acl,true,((App::$profile['channel_r_stream'] & PERMS_PUBLIC) ? t('Public') : '')) : ''),
|
'acl' => (($is_owner) ? populate_acl($channel_acl,true,((App::$profile['channel_r_stream'] & PERMS_PUBLIC) ? t('Public') : '')) : ''),
|
||||||
'showacl' => (($is_owner) ? 'yes' : ''),
|
'showacl' => (($is_owner) ? 'yes' : ''),
|
||||||
'bang' => '',
|
'bang' => '',
|
||||||
'visitor' => (($is_owner || $observer) ? true : false),
|
'visitor' => (($is_owner || $observer) ? true : false),
|
||||||
'profile_uid' => App::$profile['profile_uid']
|
'profile_uid' => App::$profile['profile_uid'],
|
||||||
|
'editor_autocomplete' => true,
|
||||||
|
'bbco_autocomplete' => 'bbcode',
|
||||||
|
'bbcode' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
$o .= status_editor($a,$x);
|
$o .= status_editor($a,$x);
|
||||||
|
@ -65,7 +65,10 @@ function display_content(&$a, $update = 0, $load = false) {
|
|||||||
'visitor' => true,
|
'visitor' => true,
|
||||||
'profile_uid' => local_channel(),
|
'profile_uid' => local_channel(),
|
||||||
'return_path' => 'channel/' . $channel['channel_address'],
|
'return_path' => 'channel/' . $channel['channel_address'],
|
||||||
'expanded' => true
|
'expanded' => true,
|
||||||
|
'editor_autocomplete' => true,
|
||||||
|
'bbco_autocomplete' => 'bbcode',
|
||||||
|
'bbcode' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
$o = '<div id="jot-popup">';
|
$o = '<div id="jot-popup">';
|
||||||
|
@ -115,7 +115,8 @@ function editblock_content(&$a) {
|
|||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => '',
|
'$geotag' => '',
|
||||||
'$nickname' => $channel['channel_address'],
|
'$nickname' => $channel['channel_address'],
|
||||||
'$confirmdelete' => t('Delete block?')
|
'$confirmdelete' => t('Delete block?'),
|
||||||
|
'$bbco_autocomplete'=> (($mimetype == 'text/bbcode') ? 'bbcode' : 'comanche-block')
|
||||||
));
|
));
|
||||||
|
|
||||||
$tpl = get_markup_template("jot.tpl");
|
$tpl = get_markup_template("jot.tpl");
|
||||||
@ -174,6 +175,7 @@ function editblock_content(&$a) {
|
|||||||
'$defexpire' => '',
|
'$defexpire' => '',
|
||||||
'$feature_expire' => false,
|
'$feature_expire' => false,
|
||||||
'$expires' => t('Set expiration date'),
|
'$expires' => t('Set expiration date'),
|
||||||
|
'$bbcode' => (($mimetype == 'text/bbcode') ? true : false)
|
||||||
));
|
));
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
||||||
|
@ -109,7 +109,8 @@ function editlayout_content(&$a) {
|
|||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $channel['channel_address'],
|
'$nickname' => $channel['channel_address'],
|
||||||
'$confirmdelete' => t('Delete layout?')
|
'$confirmdelete' => t('Delete layout?'),
|
||||||
|
'$bbco_autocomplete'=> 'comanche'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,7 +54,9 @@ function editpost_content(&$a) {
|
|||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $channel['channel_address'],
|
'$nickname' => $channel['channel_address'],
|
||||||
'$expireswhen' => t('Expires YYYY-MM-DD HH:MM'),
|
'$expireswhen' => t('Expires YYYY-MM-DD HH:MM'),
|
||||||
'$confirmdelete' => t('Delete item?'),
|
'$confirmdelete' => t('Delete item?'),
|
||||||
|
'$editor_autocomplete'=> true,
|
||||||
|
'$bbco_autocomplete'=> 'bbcode'
|
||||||
));
|
));
|
||||||
|
|
||||||
if(intval($itm[0]['item_obscured'])) {
|
if(intval($itm[0]['item_obscured'])) {
|
||||||
|
@ -150,7 +150,8 @@ function editwebpage_content(&$a) {
|
|||||||
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
'$ispublic' => ' ', // t('Visible to <strong>everybody</strong>'),
|
||||||
'$geotag' => $geotag,
|
'$geotag' => $geotag,
|
||||||
'$nickname' => $channel['channel_address'],
|
'$nickname' => $channel['channel_address'],
|
||||||
'$confirmdelete' => t('Delete webpage?')
|
'$confirmdelete' => t('Delete webpage?'),
|
||||||
|
'$bbco_autocomplete'=> 'bbcode',
|
||||||
));
|
));
|
||||||
|
|
||||||
$tpl = get_markup_template("jot.tpl");
|
$tpl = get_markup_template("jot.tpl");
|
||||||
@ -215,7 +216,7 @@ function editwebpage_content(&$a) {
|
|||||||
'$defexpire' => '',
|
'$defexpire' => '',
|
||||||
'$feature_expire' => false,
|
'$feature_expire' => false,
|
||||||
'$expires' => t('Set expiration date'),
|
'$expires' => t('Set expiration date'),
|
||||||
|
'$bbco_autocomplete'=> 'bbcode'
|
||||||
));
|
));
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
$o .= replace_macros(get_markup_template('edpost_head.tpl'), array(
|
||||||
|
@ -122,7 +122,8 @@ function layouts_content(&$a) {
|
|||||||
'profile_uid' => intval($owner),
|
'profile_uid' => intval($owner),
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'placeholdertitle' => t('Layout Description (Optional)'),
|
'placeholdertitle' => t('Layout Description (Optional)'),
|
||||||
'novoting' => true
|
'novoting' => true,
|
||||||
|
'bbco_autocomplete' => 'comanche'
|
||||||
);
|
);
|
||||||
|
|
||||||
if($_REQUEST['title'])
|
if($_REQUEST['title'])
|
||||||
|
@ -169,7 +169,10 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
'acl' => populate_acl((($private_editing) ? $def_acl : $channel_acl), true, (($channel['channel_r_stream'] & PERMS_PUBLIC) ? t('Public') : '')),
|
'acl' => populate_acl((($private_editing) ? $def_acl : $channel_acl), true, (($channel['channel_r_stream'] & PERMS_PUBLIC) ? t('Public') : '')),
|
||||||
'bang' => (($private_editing) ? '!' : ''),
|
'bang' => (($private_editing) ? '!' : ''),
|
||||||
'visitor' => true,
|
'visitor' => true,
|
||||||
'profile_uid' => local_channel()
|
'profile_uid' => local_channel(),
|
||||||
|
'editor_autocomplete' => true,
|
||||||
|
'bbco_autocomplete' => 'bbcode',
|
||||||
|
'bbcode' => true
|
||||||
);
|
);
|
||||||
if($deftag)
|
if($deftag)
|
||||||
$x['pretext'] = $deftag;
|
$x['pretext'] = $deftag;
|
||||||
|
@ -114,7 +114,9 @@ function webpages_content(&$a) {
|
|||||||
'mimetype' => $mimetype,
|
'mimetype' => $mimetype,
|
||||||
'layout' => $layout,
|
'layout' => $layout,
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
'novoting' => true
|
'novoting'=> true,
|
||||||
|
'bbco_autocomplete' => 'bbcode',
|
||||||
|
'bbcode' => true
|
||||||
);
|
);
|
||||||
|
|
||||||
if($_REQUEST['title'])
|
if($_REQUEST['title'])
|
||||||
|
@ -269,7 +269,14 @@ function string2bb(element) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(type=='comanche') {
|
if(type=='comanche') {
|
||||||
var open_close_elements = ['region', 'widget', 'var', 'template', 'css', 'js'];
|
var open_close_elements = ['region', 'layout', 'template', 'theme', 'widget', 'block', 'menu', 'var', 'css', 'js', 'authored', 'comment', 'webpage'];
|
||||||
|
var open_elements = [];
|
||||||
|
|
||||||
|
var elements = open_close_elements.concat(open_elements);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(type=='comanche-block') {
|
||||||
|
var open_close_elements = ['menu', 'var'];
|
||||||
var open_elements = [];
|
var open_elements = [];
|
||||||
|
|
||||||
var elements = open_close_elements.concat(open_elements);
|
var elements = open_close_elements.concat(open_elements);
|
||||||
|
@ -15,4 +15,7 @@ $(document).ready(function() {
|
|||||||
$('#jot-public').show();
|
$('#jot-public').show();
|
||||||
}
|
}
|
||||||
}).trigger('change');
|
}).trigger('change');
|
||||||
|
|
||||||
|
$('#chatText').bbco_autocomplete('bbcode');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -3,9 +3,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$(document).ready( function() {
|
$(document).ready( function() {
|
||||||
|
|
||||||
enableDisableFinishDate();
|
enableDisableFinishDate();
|
||||||
|
$('#comment-edit-text-desc, #comment-edit-text-loc').bbco_autocomplete('bbcode');
|
||||||
});
|
});
|
||||||
|
|
||||||
function enableDisableFinishDate() {
|
function enableDisableFinishDate() {
|
||||||
|
@ -3,4 +3,5 @@ $(document).ready(function() {
|
|||||||
$("#recip-complete").val(data.xid);
|
$("#recip-complete").val(data.xid);
|
||||||
});
|
});
|
||||||
$(".autotime").timeago()
|
$(".autotime").timeago()
|
||||||
|
$('#prvmail-text').bbco_autocomplete('bbcode');
|
||||||
});
|
});
|
||||||
|
@ -11,6 +11,8 @@ $(document).ready(function() {
|
|||||||
$("#photo-edit-newtag").val('@' + data.name);
|
$("#photo-edit-newtag").val('@' + data.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#id_body').bbco_autocomplete('bbcode');
|
||||||
|
|
||||||
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
|
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
|
||||||
var selstr;
|
var selstr;
|
||||||
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
|
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('form').areYouSure(); // Warn user about unsaved settings
|
$('form').areYouSure(); // Warn user about unsaved settings
|
||||||
|
$('textarea').bbco_autocomplete('bbcode');
|
||||||
});
|
});
|
||||||
|
@ -11,11 +11,15 @@ function initEditor(cb){
|
|||||||
if(plaintext == 'none') {
|
if(plaintext == 'none') {
|
||||||
$("#profile-jot-text-loading").spin(false).hide();
|
$("#profile-jot-text-loading").spin(false).hide();
|
||||||
$("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
|
$("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
|
||||||
$("#profile-jot-text").bbco_autocomplete('bbcode'); // autocomplete bbcode
|
{{if $bbco_autocomplete}}
|
||||||
|
$("#profile-jot-text").bbco_autocomplete('{{$bbco_autocomplete}}'); // autocomplete bbcode
|
||||||
|
{{/if}}
|
||||||
|
{{if $editor_autocomplete}}
|
||||||
if(typeof channelId === 'undefined')
|
if(typeof channelId === 'undefined')
|
||||||
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl");
|
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl");
|
||||||
else
|
else
|
||||||
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl",[channelId]); // Also gives suggestions from current channel's connections
|
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl",[channelId]); // Also gives suggestions from current channel's connections
|
||||||
|
{{/if}}
|
||||||
editor = true;
|
editor = true;
|
||||||
$("a#jot-perms-icon").colorbox({
|
$("a#jot-perms-icon").colorbox({
|
||||||
'inline' : true,
|
'inline' : true,
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
<div id="profile-jot-submit-wrapper" class="jothidden">
|
<div id="profile-jot-submit-wrapper" class="jothidden">
|
||||||
<div id="profile-jot-submit-left" class="btn-toolbar pull-left">
|
<div id="profile-jot-submit-left" class="btn-toolbar pull-left">
|
||||||
|
{{if $bbcode}}
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button id="main-editor-bold" class="btn btn-default btn-sm" title="{{$bold}}" onclick="inserteditortag('b', 'profile-jot-text'); return false;">
|
<button id="main-editor-bold" class="btn btn-default btn-sm" title="{{$bold}}" onclick="inserteditortag('b', 'profile-jot-text'); return false;">
|
||||||
<i class="icon-bold jot-icons"></i>
|
<i class="icon-bold jot-icons"></i>
|
||||||
@ -65,6 +66,7 @@
|
|||||||
<i class="icon-terminal jot-icons"></i>
|
<i class="icon-terminal jot-icons"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{if $visitor}}
|
{{if $visitor}}
|
||||||
<div class="btn-group hidden-xs">
|
<div class="btn-group hidden-xs">
|
||||||
{{if $writefiles}}
|
{{if $writefiles}}
|
||||||
|
@ -18,4 +18,7 @@
|
|||||||
<input type="submit" name="submit" value="{{$submit}}" />
|
<input type="submit" name="submit" value="{{$submit}}" />
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
<script>
|
||||||
|
$('textarea').bbco_autocomplete('comanche');
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user