$("nav").bind('nav-update', function(e,data){
var elm = $('#pending-update');
- var register = $(data).find('register').text();
+ var register = $(data).find('register').html();
if (register=="0") { register=""; elm.hide();} else { elm.show(); }
elm.html(register);
});
$('#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() {
- selstr = $(this).text();
+ selstr = $(this).html();
$('#jot-public').hide();
});
if(selstr == null) {
$('#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() {
- selstr = $(this).text();
+ selstr = $(this).html();
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
$('#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() {
- selstr = $(this).text();
+ selstr = $(this).html();
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
$('#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() {
- selstr = $(this).text();
+ selstr = $(this).html();
$('#jot-public').hide();
});
if (selstr == null) {
$('#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() {
- selstr = $(this).text();
+ selstr = $(this).html();
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
var title = "";
// Get the text of the first element with "heading" class.
- title = $("#modal-body .heading").first().text();
+ title = $("#modal-body .heading").first().html();
// for event modals we need some speacial handling
if($("#modal-body .event-wrapper .event-summary").length) {
title = '<i class="fa fa-calendar" aria-hidden="true"></i> ';
- var eventsum = $("#modal-body .event-wrapper .event-summary").text();
+ var eventsum = $("#modal-body .event-wrapper .event-summary").html();
title = title + eventsum;
}
if( $(".search-content-wrapper").length ) {
// get the text of the heading (we catch the plain text because we don't
// want to have a h4 heading in the navbar
- var searchText = $(".section-title-wrapper > h2").text();
+ var searchText = $(".section-title-wrapper > h2").html();
// insert the plain text in a <h4> heading and give it a class
var newText = '<h4 class="search-heading">'+searchText+'</h4>';
// append the new heading to the navbar
// get the heading element
var heading = $(".network-content-wrapper > .section-title-wrapper > h2");
// get the text of the heading
- var headingContent = heading.text();
+ var headingContent = heading.html();
// create a new element with the content of the heading
var newText = '<h4 class="heading" data-toggle="tooltip" title="'+headingContent+'">'+headingContent+'</h4>';
// remove the old heading element
// get the heading element
var heading = $(".community-content-wrapper > h3").first();
// get the text of the heading
- var headingContent = heading.text();
+ var headingContent = heading.html();
// create a new element with the content of the heading
var newText = '<h4 class="heading">'+headingContent+'</h4>';
// remove the old heading element
// Dropdown menus with the class "dropdown-head" will display the active tab
// as button text
function toggleDropdownText(elm) {
- $(elm).closest(".dropdown").find('.btn').html($(elm).text() + ' <span class="caret"></span>');
+ $(elm).closest(".dropdown").find('.btn').html($(elm).html() + ' <span class="caret"></span>');
$(elm).closest(".dropdown").find('.btn').val($(elm).data('value'));
$(elm).closest("ul").children("li").show();
$(elm).parent("li").hide();
$(function(){
$("nav").bind('nav-update', function(e,data){
var elm = $('#pending-update');
- var register = $(data).find('register').text();
- if (register=="0") { register = ""; }
- elm.html(register);
+ var register = parseInt($(data).find('register').text());
+ if (register > 0) {
+ elm.html(register);
+ }
});
});
</script>
$(document).ready(function(){
$('nav').bind('nav-update', function(e,data){
var notifCount = $(data).find('notif').attr('count');
- var intro = $(data).find('intro').text();
- var mail = $(data).find('mail').text();
+ var intro = parseInt($(data).find('intro').text());
+ var mail = parseInt($(data).find('mail').text());
$(".tool .notify").removeClass("on");
$(data).find("group").each(function() {
$('#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() {
- selstr = $(this).text();
+ selstr = $(this).html();
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
$('.profile-jot-net input').attr('disabled', 'disabled');
$('#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() {
- selstr = $(this).text();
+ selstr = $(this).html();
$('#jot-public').hide();
});
if(selstr == null) {