aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-25 14:40:31 -0700
committerzotlabs <mike@macgirvin.com>2017-03-25 14:40:31 -0700
commite5e0a6b31f7870a46766c1e8ff87886fdb14b6de (patch)
tree7035d84f2edbc6b6efa435527ffdc3cd38b8027a /view/js
parent5c63f7dd58c5b3b88efcc47120c791f92527f720 (diff)
parent2115eb26a7fd2ca937286bd4e98ab74c7d6e9525 (diff)
downloadvolse-hubzilla-e5e0a6b31f7870a46766c1e8ff87886fdb14b6de.tar.gz
volse-hubzilla-e5e0a6b31f7870a46766c1e8ff87886fdb14b6de.tar.bz2
volse-hubzilla-e5e0a6b31f7870a46766c1e8ff87886fdb14b6de.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'view/js')
-rw-r--r--view/js/acl.js20
-rw-r--r--view/js/autocomplete.js18
-rw-r--r--view/js/main.js6
-rw-r--r--view/js/mod_cloud.js2
-rw-r--r--view/js/mod_network.js1
5 files changed, 29 insertions, 18 deletions
diff --git a/view/js/acl.js b/view/js/acl.js
index 4dd60d303..e016158e9 100644
--- a/view/js/acl.js
+++ b/view/js/acl.js
@@ -333,20 +333,20 @@ ACL.prototype.update_view = function(value) {
type = itemid[0];
id = itemid.substr(1);
- btshow = $(this).children(".acl-button-show").removeClass("btn-success").addClass("btn-default");
- bthide = $(this).children(".acl-button-hide").removeClass("btn-danger").addClass("btn-default");
+ btshow = $(this).children(".acl-button-show").removeClass("btn-success").addClass("btn-outline-success");
+ bthide = $(this).children(".acl-button-hide").removeClass("btn-danger").addClass("btn-outline-danger");
switch(type) {
case "g":
var uclass = "";
if (that.allow_gid.indexOf(id)>=0) {
- btshow.removeClass("btn-default").addClass("btn-success");
- bthide.removeClass("btn-danger").addClass("btn-default");
+ btshow.removeClass("btn-outline-success").addClass("btn-success");
+ bthide.removeClass("btn-danger").addClass("btn-outline-danger");
uclass="groupshow";
}
if (that.deny_gid.indexOf(id)>=0) {
- btshow.removeClass("btn-success").addClass("btn-default");
- bthide.removeClass("btn-default").addClass("btn-danger");
+ btshow.removeClass("btn-success").addClass("btn-outline-success");
+ bthide.removeClass("btn-outline-danger").addClass("btn-danger");
uclass = "grouphide";
}
$(that.group_uids[id]).each(function(i, v) {
@@ -366,13 +366,13 @@ ACL.prototype.update_view = function(value) {
case "c":
if (that.allow_cid.indexOf(id)>=0){
if(!$(this).hasClass("grouphide") ) {
- btshow.removeClass("btn-default").addClass("btn-success");
- bthide.removeClass("btn-danger").addClass("btn-default");
+ btshow.removeClass("btn-outline-success").addClass("btn-success");
+ bthide.removeClass("btn-danger").addClass("btn-outline-danger");
}
}
if (that.deny_cid.indexOf(id)>=0){
- btshow.removeClass("btn-success").addClass("btn-default");
- bthide.removeClass("btn-default").addClass("btn-danger");
+ btshow.removeClass("btn-success").addClass("btn-outline-success");
+ bthide.removeClass("btn-outline-danger").addClass("btn-danger");
$(this).removeClass("groupshow");
}
}
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 5a616b6fc..313e501e2 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -60,12 +60,20 @@ function contact_format(item) {
var desc = ((item.label) ? item.nick + ' ' + item.label : item.nick);
if(typeof desc === 'undefined') desc = '';
if(desc) desc = ' ('+desc+')';
- return "<div class='{0}' title='{4}'><img class='dropdown-menu-img-sm' src='{1}'><span class='contactname'>{2}</span><span class='dropdown-sub-text'>{3}</span><div class='clear'></div></div>".format(item.taggable, item.photo, item.name, desc, item.link);
+ return "<div class='{0} dropdown-item dropdown-notification clearfix' title='{4}'><img class='menu-img-2' src='{1}'><span class='contactname'>{2}</span><span class='dropdown-sub-text'>{3}</span></div>".format(item.taggable, item.photo, item.name, desc, item.link);
}
else
return "<div>" + item.text + "</div>";
}
+function smiley_format(item) {
+ return "<div class='dropdown-item'>" + item.icon + ' ' + item.text + "</div>";
+}
+
+function bbco_format(item) {
+ return "<div class='dropdown-item'>" + item + "</div>";
+}
+
function editor_replace(item) {
if(typeof item.replace !== 'undefined') {
return '$1$2' + item.replace;
@@ -181,15 +189,16 @@ function string2bb(element) {
index: 3,
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
replace: editor_replace,
- template: contact_format,
+ template: contact_format
};
smilies = {
match: /(^|\s)(:[a-z_:]{2,})$/,
index: 2,
search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term) === 0 ? entry : null; })); }); },
- template: function(item) { return item.icon + item.text; },
+ //template: function(item) { return item.icon + item.text; },
replace: function(item) { return "$1" + item.text + ' '; },
+ template: smiley_format
};
this.attr('autocomplete','off');
this.textcomplete([contacts,smilies], {className:'acpopup', zIndex:1020});
@@ -321,7 +330,8 @@ function string2bb(element) {
else {
return '\[' + element + '\] ';
}
- }
+ },
+ template: bbco_format
};
this.attr('autocomplete','off');
diff --git a/view/js/main.js b/view/js/main.js
index db7ad110b..150f517a9 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -369,10 +369,10 @@ function NavUpdate() {
updateCountsOnly = false;
if(data.network || data.home || data.intros || data.mail || data.all_events || data.notify) {
- $('#notifications-btn').css('color', 'white').prop('disabled', false);
+ $('#notifications-btn').removeClass('text-muted').addClass('text-white');
}
else {
- $('#notifications-btn').css('color', 'grey').prop('disabled', true);
+ $('#notifications-btn').removeClass('text-white').addClass('text-muted');
$('#navbar-collapse-1').removeClass('in');
}
@@ -939,6 +939,8 @@ function notify_popup_loader(notifyType) {
window.location.href=window.location.href;
}
+ console.log(data);
+
if(data.notify.length == 0){
$("#nav-" + notifyType + "-menu").html(aStr[nothingnew]);
} else {
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js
index 8b8a3ba3f..8af90863e 100644
--- a/view/js/mod_cloud.js
+++ b/view/js/mod_cloud.js
@@ -91,7 +91,7 @@ function prepareHtml(f, i) {
'<td><i class="fa ' + getIconFromType(f.type) + '" title="' + f.type + '"></i></td>' +
'<td>' + f.name + '</td>' +
'<td id="upload-progress-' + i + '"></td><td></td><td></td><td></td><td></td>' +
- '<td class="hidden-xs">' + formatSizeUnits(f.size) + '</td><td class="hidden-xs"></td>' +
+ '<td class="d-none d-md-table-cell">' + formatSizeUnits(f.size) + '</td><td class="d-none d-md-table-cell"></td>' +
'</tr>' +
'<tr id="new-upload-progress-bar-' + i + '" class="new-upload">' +
'<td id="upload-progress-bar-' + i + '" colspan="9" class="upload-progress-bar"></td>' +
diff --git a/view/js/mod_network.js b/view/js/mod_network.js
index cd36786df..2899bbacd 100644
--- a/view/js/mod_network.js
+++ b/view/js/mod_network.js
@@ -1,5 +1,4 @@
$(document).ready(function() {
$("#search-text").contact_autocomplete(baseurl + '/search_ac','',true);
- $('.jslider-scale ins').addClass('hidden-xs');
});