aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/autocomplete.js38
-rwxr-xr-xview/tpl/admin_site.tpl3
-rwxr-xr-xview/tpl/edpost_head.tpl7
-rwxr-xr-xview/tpl/jot-header.tpl10
-rwxr-xr-xview/tpl/new_channel.tpl2
-rwxr-xr-xview/tpl/siteinfo.tpl4
6 files changed, 32 insertions, 32 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 97bb62fef..b61af23f8 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -7,21 +7,6 @@ function contact_search(term, callback, backend_url, type, extra_channels, spine
if(spinelement) {
$(spinelement).show();
}
- // Check if there is a cached result that contains the same information we would get with a full server-side search
-// var bt = backend_url+type;
-// if(!(bt in contact_search.cache)) contact_search.cache[bt] = {};
-
-// var lterm = term.toLowerCase(); // Ignore case
-// for(var t in contact_search.cache[bt]) {
-// if(lterm.indexOf(t) >= 0) { // A more broad search has been performed already, so use those results
-// $(spinelement).hide();
- // Filter old results locally
-// var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || (typeof x.nick !== 'undefined' && x.nick.toLowerCase().indexOf(lterm) >= 0)); }); // Need to check that nick exists because groups don't have one
-// matching.unshift({taggable:false, text: term, replace: term});
-// setTimeout(function() { callback(matching); } , 1); // Use "pseudo-thread" to avoid some problems
-// return;
-// }
-// }
var postdata = {
start:0,
@@ -38,12 +23,7 @@ function contact_search(term, callback, backend_url, type, extra_channels, spine
url: backend_url,
data: postdata,
dataType: 'json',
- success: function(data){
- // Cache results if we got them all (more information would not improve results)
- // data.count represents the maximum number of items
-// if(data.items.length -1 < data.count) {
-// contact_search.cache[bt][lterm] = data.items;
-// }
+ success: function(data) {
var items = data.items.slice(0);
items.unshift({taggable:false, text: term, replace: term});
callback(items);
@@ -188,7 +168,7 @@ function string2bb(element) {
// Autocomplete contacts
contacts = {
- match: /(^|\s)(@\!*)([^ \n]{3,})$/,
+ match: /(^|\s)(@\!*)([^ \n]{2,})$/,
index: 3,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
@@ -198,7 +178,7 @@ function string2bb(element) {
// Autocomplete forums
forums = {
- match: /(^|\s)(\!\!*)([^ \n]{3,})$/,
+ match: /(^|\s)(\!\!*)([^ \n]{2,})$/,
index: 3,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'f', extra_channels, spinelement=false); },
@@ -209,7 +189,7 @@ function string2bb(element) {
// Autocomplete hashtags
tags = {
- match: /(^|\s)(\#)([^ \n]{3,})$/,
+ match: /(^|\s)(\#)([^ \n]{2,})$/,
index: 3,
cache: true,
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
@@ -253,7 +233,7 @@ function string2bb(element) {
// Autocomplete contacts
contacts = {
- match: /(^@)([^\n]{3,})$/,
+ match: /(^@)([^\n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', [], spinelement='#nav-search-spinner'); },
@@ -263,7 +243,7 @@ function string2bb(element) {
// Autocomplete forums
forums = {
- match: /(^\!)([^\n]{3,})$/,
+ match: /(^\!)([^\n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'f', [], spinelement='#nav-search-spinner'); },
@@ -273,7 +253,7 @@ function string2bb(element) {
// Autocomplete hashtags
tags = {
- match: /(^\#)([^ \n]{3,})$/,
+ match: /(^\#)([^ \n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
@@ -306,7 +286,7 @@ function string2bb(element) {
// Autocomplete contacts
contacts = {
- match: /(^)([^\n]{3,})$/,
+ match: /(^)([^\n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },
@@ -344,7 +324,7 @@ function string2bb(element) {
// Autocomplete contacts
names = {
- match: /(^)([^\n]{3,})$/,
+ match: /(^)([^\n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl
index 7e99b2c86..3288c2988 100755
--- a/view/tpl/admin_site.tpl
+++ b/view/tpl/admin_site.tpl
@@ -68,6 +68,7 @@
<h3>{{$registration}}</h3>
{{include file="field_input.tpl" field=$register_text}}
+ {{include file="field_select_grouped.tpl" field=$role}}
{{include file="field_select.tpl" field=$register_policy}}
{{include file="field_checkbox.tpl" field=$invite_only}}
{{include file="field_input.tpl" field=$minimum_age}}
@@ -85,6 +86,8 @@
{{include file="field_checkbox.tpl" field=$disable_discover_tab}}
{{include file="field_checkbox.tpl" field=$site_firehose}}
{{include file="field_checkbox.tpl" field=$open_pubstream}}
+ {{include file="field_textarea.tpl" field=$incl}}
+ {{include file="field_textarea.tpl" field=$excl}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
diff --git a/view/tpl/edpost_head.tpl b/view/tpl/edpost_head.tpl
index b2ab5db4e..4f39137ab 100755
--- a/view/tpl/edpost_head.tpl
+++ b/view/tpl/edpost_head.tpl
@@ -1,10 +1,13 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
- {{if $delete}}
<div class="pull-right">
+ {{if $cancel}}
+ <button id="dbtn-cancel" class="btn btn-warning btn-sm" onclick="itemCancel(); return false;">{{$cancel}}</button>
+ {{/if}}
+ {{if $delete}}
<a href="item/drop/{{$id}}" id="delete-btn" class="btn btn-sm btn-danger" onclick="return confirmDelete();"><i class="fa fa-trash-o"></i>&nbsp;{{$delete}}</a>
+ {{/if}}
</div>
- {{/if}}
<h2>{{$title}}</h2>
<div class="clear"></div>
</div>
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index df67e9b2d..f2b68ece0 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -357,6 +357,14 @@ var activeCommentText = '';
}
}
+ function itemCancel() {
+ $("#jot-title").val('');
+ $("#profile-jot-text").val('');
+ $("#jot-category").val('');
+ postSaveChanges('clean','');
+ window.history.back();
+ }
+
function itemFiler(id) {
if($('#item-filer-dialog').length)
$('#item-filer-dialog').remove();
@@ -575,7 +583,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del
localStorage.setItem("post_title" + postid, $("#jot-title").val());
localStorage.setItem("post_body" + postid, $("#profile-jot-text").val());
if($("#jot-category").length)
- localStorage.setItem("post_category + postid", $("#jot-category").val());
+ localStorage.setItem("post_category" + postid, $("#jot-category").val());
}
if(action == 'start') {
diff --git a/view/tpl/new_channel.tpl b/view/tpl/new_channel.tpl
index f415e4e2c..a89208228 100755
--- a/view/tpl/new_channel.tpl
+++ b/view/tpl/new_channel.tpl
@@ -3,6 +3,7 @@
<h2>{{$title}}</h2>
</div>
<div class="section-content-wrapper">
+ {{if ! $default_role}}
<div class="section-content-info-wrapper">
{{$desc}}
</div>
@@ -11,6 +12,7 @@
{{$channel_usage_message}}
</div>
{{/if}}
+ {{/if}}
<form action="new_channel" method="post" id="newchannel-form">
{{if $default_role}}
<input type="hidden" name="permissions_role" value="{{$default_role}}" />
diff --git a/view/tpl/siteinfo.tpl b/view/tpl/siteinfo.tpl
index a5b99fd83..4d9c53656 100755
--- a/view/tpl/siteinfo.tpl
+++ b/view/tpl/siteinfo.tpl
@@ -38,4 +38,8 @@
<br><br>
<div>{{$prj_transport}} ({{$transport_link}})</div>
+{{if $additional_fed}}
+<div>{{$additional_text}} {{$additional_fed}}</div>
+{{/if}}
+
</div>