aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/autocomplete.js9
-rw-r--r--view/js/mod_chat.js3
-rw-r--r--view/js/mod_events.js3
-rw-r--r--view/js/mod_mail.js1
-rw-r--r--view/js/mod_photos.js2
-rw-r--r--view/js/mod_profiles.js1
-rwxr-xr-xview/tpl/jot-header.tpl6
-rwxr-xr-xview/tpl/jot.tpl2
-rw-r--r--view/tpl/pdledit.tpl3
9 files changed, 26 insertions, 4 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 0ba291004..a4a1fdf51 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -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);
diff --git a/view/js/mod_chat.js b/view/js/mod_chat.js
index 0d47e3e77..f9d2a599c 100644
--- a/view/js/mod_chat.js
+++ b/view/js/mod_chat.js
@@ -15,4 +15,7 @@ $(document).ready(function() {
$('#jot-public').show();
}
}).trigger('change');
+
+ $('#chatText').bbco_autocomplete('bbcode');
+
});
diff --git a/view/js/mod_events.js b/view/js/mod_events.js
index 0b7b3d24c..74b811dd6 100644
--- a/view/js/mod_events.js
+++ b/view/js/mod_events.js
@@ -3,9 +3,8 @@
*/
$(document).ready( function() {
-
enableDisableFinishDate();
-
+ $('#comment-edit-text-desc, #comment-edit-text-loc').bbco_autocomplete('bbcode');
});
function enableDisableFinishDate() {
diff --git a/view/js/mod_mail.js b/view/js/mod_mail.js
index 561df7229..3e55c8aeb 100644
--- a/view/js/mod_mail.js
+++ b/view/js/mod_mail.js
@@ -3,4 +3,5 @@ $(document).ready(function() {
$("#recip-complete").val(data.xid);
});
$(".autotime").timeago()
+ $('#prvmail-text').bbco_autocomplete('bbcode');
});
diff --git a/view/js/mod_photos.js b/view/js/mod_photos.js
index d371c3f2f..34e2e3f25 100644
--- a/view/js/mod_photos.js
+++ b/view/js/mod_photos.js
@@ -11,6 +11,8 @@ $(document).ready(function() {
$("#photo-edit-newtag").val('@' + data.name);
});
+ $('#id_body').bbco_autocomplete('bbcode');
+
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
var selstr;
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
diff --git a/view/js/mod_profiles.js b/view/js/mod_profiles.js
index aad2ca902..a7754e0c5 100644
--- a/view/js/mod_profiles.js
+++ b/view/js/mod_profiles.js
@@ -1,3 +1,4 @@
$(document).ready(function() {
$('form').areYouSure(); // Warn user about unsaved settings
+ $('textarea').bbco_autocomplete('bbcode');
});
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index 2b62f2407..769923a51 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -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,
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl
index dea75efa9..026c586a0 100755
--- a/view/tpl/jot.tpl
+++ b/view/tpl/jot.tpl
@@ -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}}
diff --git a/view/tpl/pdledit.tpl b/view/tpl/pdledit.tpl
index af8e37602..3e1f5a3fc 100644
--- a/view/tpl/pdledit.tpl
+++ b/view/tpl/pdledit.tpl
@@ -18,4 +18,7 @@
<input type="submit" name="submit" value="{{$submit}}" />
</form>
+<script>
+ $('textarea').bbco_autocomplete('comanche');
+</script>
</div>