some work on comanche autocomplete

This commit is contained in:
Mario Vavti
2016-04-09 12:16:42 +02:00
parent 7690dca67b
commit e2b4d33627
14 changed files with 54 additions and 19 deletions

View File

@@ -269,7 +269,14 @@ function string2bb(element) {
}
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 elements = open_close_elements.concat(open_elements);

View File

@@ -11,11 +11,15 @@ function initEditor(cb){
if(plaintext == 'none') {
$("#profile-jot-text-loading").spin(false).hide();
$("#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')
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl");
else
$("#profile-jot-text").editor_autocomplete(baseurl+"/acl",[channelId]); // Also gives suggestions from current channel's connections
{{/if}}
editor = true;
$("a#jot-perms-icon").colorbox({
'inline' : true,

View File

@@ -48,6 +48,7 @@
{{/if}}
<div id="profile-jot-submit-wrapper" class="jothidden">
<div id="profile-jot-submit-left" class="btn-toolbar pull-left">
{{if $bbcode}}
<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;">
<i class="icon-bold jot-icons"></i>
@@ -65,6 +66,7 @@
<i class="icon-terminal jot-icons"></i>
</button>
</div>
{{/if}}
{{if $visitor}}
<div class="btn-group hidden-xs">
{{if $writefiles}}

View File

@@ -18,4 +18,7 @@
<input type="submit" name="submit" value="{{$submit}}" />
</form>
<script>
$('textarea').bbco_autocomplete('comanche');
</script>
</div>