aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/css/mod_prep.css4
-rw-r--r--view/js/autocomplete.js14
-rw-r--r--view/js/mod_connedit.js8
-rw-r--r--view/theme/redbasic/css/style.css4
-rwxr-xr-xview/tpl/abook_edit.tpl30
-rw-r--r--view/tpl/hdr.tpl2
-rw-r--r--view/tpl/locmanage.tpl6
7 files changed, 42 insertions, 26 deletions
diff --git a/view/css/mod_prep.css b/view/css/mod_prep.css
index 3701cbdff..bb29086da 100644
--- a/view/css/mod_prep.css
+++ b/view/css/mod_prep.css
@@ -5,4 +5,8 @@
.prep-details {
float: left;
+}
+
+.directory-item {
+ margin: 10px;
} \ No newline at end of file
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 1c524789d..86847cb35 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -3,15 +3,18 @@
*
* require jQuery, jquery.textcomplete
*/
-function contact_search(term, callback, backend_url, type, extra_channels) {
+function contact_search(term, callback, backend_url, type, extra_channels, spinelement) {
+ if(spinelement){
+ $(spinelement).spin('tiny');
+ }
// 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(t in contact_search.cache[bt]) {
if(lterm.indexOf(t) >= 0) { // A more broad search has been performed already, so use those results
+ $(spinelement).spin(false);
// 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});
@@ -44,6 +47,7 @@ function contact_search(term, callback, backend_url, type, extra_channels) {
var items = data.items.slice(0);
items.unshift({taggable:false, text: term, replace: term});
callback(items);
+ $(spinelement).spin(false);
},
}).fail(function () {callback([]); }); // Callback must be invoked even if something went wrong.
}
@@ -98,7 +102,7 @@ function submit_form(e) {
contacts = {
match: /(^|\s)(@\!*)([^ \n]+)$/,
index: 3,
- search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels); },
+ search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
replace: editor_replace,
template: contact_format,
}
@@ -125,7 +129,7 @@ function submit_form(e) {
contacts = {
match: /(^@)([^\n]{2,})$/,
index: 2,
- search: function(term, callback) { contact_search(term, callback, backend_url, 'x',[]); },
+ search: function(term, callback) { contact_search(term, callback, backend_url, 'x', [], spinelement='#nav-search-spinner'); },
replace: basic_replace,
template: contact_format,
}
@@ -147,7 +151,7 @@ function submit_form(e) {
contacts = {
match: /(^)([^\n]+)$/,
index: 2,
- search: function(term, callback) { contact_search(term, callback, backend_url, typ,[]); },
+ search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },
replace: basic_replace,
template: contact_format,
}
diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js
index 765cbcc30..ee34f0508 100644
--- a/view/js/mod_connedit.js
+++ b/view/js/mod_connedit.js
@@ -1,13 +1,13 @@
function abook_perms_msg() {
- $('.abook-permsmsg').show();
+// $('.abook-permsmsg').show();
// $('.abook-permschange').html(aStr['permschange']);
- $('.abook-permssave').show();
+// $('.abook-permssave').show();
}
function abook_perms_new() {
- $('.abook-permsnew').show();
- $('.abook-permssave').show();
+// $('.abook-permsnew').show();
+// $('.abook-permssave').show();
}
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index ce933ba10..c95909085 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -876,8 +876,8 @@ footer {
nav .acpopup {
top: 49px !important;
- right: 30px !important;
- margin-left: -45px;
+ margin-left: -35px;
+ width: 290px;
}
.profile-clear {
diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl
index 7c75bfac4..fb02ff8ed 100755
--- a/view/tpl/abook_edit.tpl
+++ b/view/tpl/abook_edit.tpl
@@ -30,12 +30,18 @@
<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
</div>
-
-
{{if $last_update}}
{{$lastupdtext}} {{$last_update}}
{{/if}}
+
+{{if $is_pending}}
+<div class="abook-pending-contact">
+{{include file="field_checkbox.tpl" field=$unapproved}}
+</div>
+{{/if}}
+
+
{{if $notself}}
{{if $slide}}
<h3>{{$lbl_slider}}</h3>
@@ -55,7 +61,6 @@
{{/if}}
-
{{if $self}}
<div class="abook-autotext">
<div id="autoperm-desc" class="descriptive-paragraph">{{$autolbl}}</div>
@@ -63,19 +68,11 @@
</div>
{{/if}}
-
<input type="hidden" name="contact_id" value="{{$contact_id}}">
<input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" />
<input id="contact-rating-mirror" type="hidden" name="rating" value="{{$rating_val}}" />
-
-{{if $is_pending}}
-<div class="abook-pending-contact">
-{{include file="field_checkbox.tpl" field=$unapproved}}
-</div>
-{{/if}}
-
{{if $rating}}
{{if $notself}}
<h3 class="abook-rating-text-desc">{{$lbl_rating_txt}}</h3>
@@ -83,6 +80,7 @@
{{/if}}
{{/if}}
+{{if $notself}}
{{if $multiprofs }}
<div>
<h3>{{$lbl_vis1}}</h3>
@@ -91,8 +89,15 @@
{{$profile_select}}
</div>
{{/if}}
+{{/if}}
<h3>{{$permlbl}}</h3>
+
+{{if $notself}}
+<div id="connedit-perms-wrap" class="fakelink" onclick="openClose('connedit-perms');">{{$clickme}}</div>
+<div id="connedit-perms" style="display: none;" >
+{{/if}}
+
<div id="perm-desc" class="descriptive-text">{{$permnote}}</div>
<table>
<tr><td></td><td class="abook-them">{{$them}}</td><td colspan="2" class="abook-me">{{$me}}</td><td></td></tr>
@@ -105,6 +110,9 @@
</div>
+{{if $notself}}
+</div>
+{{/if}}
<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
diff --git a/view/tpl/hdr.tpl b/view/tpl/hdr.tpl
index cfd22e607..c3f0700f0 100644
--- a/view/tpl/hdr.tpl
+++ b/view/tpl/hdr.tpl
@@ -1,5 +1,5 @@
<div id="banner" class="hidden-sm hidden-xs">{{$banner}}</div>
<ul id="nav-notifications-template" style="display:none;" rel="template">
- <li class="{5}"><a href="{0}" title="{2} {3}"><img data-src="{1}"><span class='contactname'>{2}</span><span class="dropdown-sub-text">{3}<br>{4}</span></a></li>
+ <li class="{5}"><a href="{0}" title="{2} {3}"><img data-src="{1}"><span class="contactname">{2}</span><span class="dropdown-sub-text">{3}<br>{4}</span></a></li>
</ul>
diff --git a/view/tpl/locmanage.tpl b/view/tpl/locmanage.tpl
index 5a25850a1..d1bb00543 100644
--- a/view/tpl/locmanage.tpl
+++ b/view/tpl/locmanage.tpl
@@ -2,10 +2,10 @@
<script>
function primehub(id) {
- $.post('locs','primary='+id,function(data) { window.location.href=window.location.href; });
+ $.post(baseurl + '/locs','primary='+id,function(data) { window.location.href=window.location.href; });
}
function drophub(id) {
- $.post('locs','drop='+id,function(data) { window.location.href=window.location.href; });
+ $.post(baseurl + '/locs','drop='+id,function(data) { window.location.href=window.location.href; });
}
</script>
@@ -17,7 +17,7 @@ function drophub(id) {
{{$hub.hubloc_url}} ({{$hub.hubloc_addr}}){{if $hub.deleted}}</strike>{{/if}}</td>
<td>
-{{if $hub.primary}}<i class="icon-check"></i>{{else}}<button class="btn btn-std"><i class="icon-check-empty" onclick="primehub({{$hub.hubloc_id}}); return false;" ></i></button>{{/if}}
+{{if $hub.primary}}<i class="icon-check"></i>{{else}}<button class="btn btn-std" onclick="primehub({{$hub.hubloc_id}}); return false;" ><i class="icon-check-empty" ></i></button>{{/if}}
</td>
<td>{{if $hub.primary}}{{else}}{{if ! $hub.deleted}}<button class="btn btn-std" onclick="drophub({{$hub.hubloc_id}}); return false;"><i class="icon-remove"></i></button>{{/if}}{{/if}}</td>
</tr>