diff options
author | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-05 00:28:42 +0100 |
---|---|---|
committer | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-05 00:28:42 +0100 |
commit | c14dc699ae749b5242f1ce14847a1db4c0eebc30 (patch) | |
tree | e4625b9e73b118d04a5bbd2ab3475334283df6ff | |
parent | a7db0ed0716e9dd51f33469620303e6126251d4f (diff) | |
download | volse-hubzilla-c14dc699ae749b5242f1ce14847a1db4c0eebc30.tar.gz volse-hubzilla-c14dc699ae749b5242f1ce14847a1db4c0eebc30.tar.bz2 volse-hubzilla-c14dc699ae749b5242f1ce14847a1db4c0eebc30.zip |
Fix initEditor on non-wall pages
-rw-r--r-- | view/js/autocomplete.js | 3 | ||||
-rwxr-xr-x | view/tpl/jot-header.tpl | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 259dca1bc..cc14f75d1 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -43,7 +43,8 @@ function replace(item) { * jQuery plugin 'contact_autocomplete' */ (function( $ ){ - $.fn.contact_autocomplete = function(backend_url, extra_channels = null) { + $.fn.contact_autocomplete = function(backend_url, extra_channels) { + if (typeof extra_channels === 'undefined') extra_channels = false; // Autocomplete contacts contacts = { diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index c23395b03..8d26fc653 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -10,7 +10,10 @@ function initEditor(cb){ if(plaintext == 'none') { $("#profile-jot-text-loading").spin(false).hide(); $("#profile-jot-text").css({ 'height': 200, 'color': '#000' }); - $("#profile-jot-text").contact_autocomplete(baseurl+"/acl",[channelId]); // Also gives suggestions from current channel's connections + if(typeof channelId === 'undefined') + $("#profile-jot-text").contact_autocomplete(baseurl+"/acl"); + else + $("#profile-jot-text").contact_autocomplete(baseurl+"/acl",[channelId]); // Also gives suggestions from current channel's connections editor = true; $("a#jot-perms-icon").colorbox({ 'inline' : true, |