Replace "group" with "circle" in the rest of the code
- Remaining mentions already mean "forum"
This commit is contained in:
parent
4f6e02357a
commit
4f7740264e
120 changed files with 1308 additions and 1304 deletions
|
@ -1,67 +1,67 @@
|
|||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
|
||||
|
||||
/**
|
||||
* @file view/theme/frio/js/mod_group.js
|
||||
* The javascript for the group module
|
||||
* @file view/theme/frio/js/mod_circle.js
|
||||
* The javascript for the circle module
|
||||
*/
|
||||
|
||||
$(document).ready(function () {
|
||||
// Add an event listeners on buttons for switching the contact list view
|
||||
$("body").on("click", ".group-list-switcher", function () {
|
||||
switchGroupViewMode(this);
|
||||
$("body").on("click", ".circle-list-switcher", function () {
|
||||
switchCircleViewMode(this);
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Change the group membership of the contacts and fetch the new grup list
|
||||
* Change the circle membership of the contacts and fetch the new grup list
|
||||
* as html
|
||||
*
|
||||
* @param {int} gid The group ID
|
||||
* @param {int} gid The circle ID
|
||||
* @param {int} cid The contact ID
|
||||
* @param {string} sec_token The security token
|
||||
*
|
||||
* @returns {undefined}
|
||||
*/
|
||||
function groupChangeMember(gid, cid, sec_token) {
|
||||
function circleChangeMember(gid, cid, sec_token) {
|
||||
$("#contact-entry-wrapper-" + cid).fadeTo("fast", 0.33);
|
||||
$(".tooltip").tooltip("hide");
|
||||
$("body").css("cursor", "wait");
|
||||
|
||||
$.get("group/" + gid + "/" + cid + "?t=" + sec_token, function (data) {
|
||||
// Insert the new group member list
|
||||
$("#group-update-wrapper").html(data);
|
||||
$.get("circle/" + gid + "/" + cid + "?t=" + sec_token, function (data) {
|
||||
// Insert the new circle member list
|
||||
$("#circle-update-wrapper").html(data);
|
||||
|
||||
// Apply the actual group list view mode to the new
|
||||
// group list html
|
||||
var activeMode = $(".group-list-switcher.active");
|
||||
switchGroupViewMode(activeMode[0]);
|
||||
// Apply the actual circle list view mode to the new
|
||||
// circle list html
|
||||
var activeMode = $(".circle-list-switcher.active");
|
||||
switchCircleViewMode(activeMode[0]);
|
||||
|
||||
$("body").css("cursor", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the group list view mode
|
||||
* Change the circle list view mode
|
||||
*
|
||||
* @param {object} elm The button element of the view mode switcher
|
||||
* @returns {undefined}
|
||||
*/
|
||||
function switchGroupViewMode(elm) {
|
||||
// Remove the active class from group list switcher buttons
|
||||
$(".group-list-switcher").removeClass("active");
|
||||
function switchCircleViewMode(elm) {
|
||||
// Remove the active class from circle list switcher buttons
|
||||
$(".circle-list-switcher").removeClass("active");
|
||||
// And add it to the active button element
|
||||
$(elm).addClass("active");
|
||||
|
||||
// Add or remove the css classes for the group list with regard to the active view mode
|
||||
if (elm.id === "group-list-small") {
|
||||
$("#contact-group-list > li").addClass("shortmode col-lg-6 col-md-6 col-sm-6 col-xs-12");
|
||||
// Add or remove the css classes for the circle list with regard to the active view mode
|
||||
if (elm.id === "circle-list-small") {
|
||||
$("#contact-circle-list > li").addClass("shortmode col-lg-6 col-md-6 col-sm-6 col-xs-12");
|
||||
} else {
|
||||
$("#contact-group-list > li").removeClass("shortmode col-lg-6 col-md-6 col-sm-6 col-xs-12");
|
||||
$("#contact-circle-list > li").removeClass("shortmode col-lg-6 col-md-6 col-sm-6 col-xs-12");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the group member list for contacts
|
||||
* Filter the circle member list for contacts
|
||||
*
|
||||
* @returns {undefined}
|
||||
*/
|
||||
|
@ -70,7 +70,7 @@ function filterList() {
|
|||
var input, filter, ul, li, a, i;
|
||||
input = document.getElementById("contacts-search");
|
||||
filter = input.value.toUpperCase();
|
||||
li = document.querySelectorAll("#contact-group-list>li");
|
||||
li = document.querySelectorAll("#contact-circle-list>li");
|
||||
|
||||
// Loop through all list items, and hide those who don't match the search query
|
||||
for (i = 0; i < li.length; i++) {
|
|
@ -136,11 +136,11 @@ $(document).ready(function () {
|
|||
.trigger("change");
|
||||
|
||||
// JS for the permission section.
|
||||
$("#contact_allow, #contact_deny, #group_allow, #group_deny")
|
||||
$("#contact_allow, #contact_deny, #circle_allow, #circle_deny")
|
||||
.change(function () {
|
||||
var selstr;
|
||||
$(
|
||||
"#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected",
|
||||
"#contact_allow option:selected, #contact_deny option:selected, #circle_allow option:selected, #circle_deny option:selected",
|
||||
).each(function () {
|
||||
selstr = $(this).html();
|
||||
$("#jot-public").hide();
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later
|
||||
|
||||
$(document).ready(function () {
|
||||
$("#contact_allow, #contact_deny, #group_allow, #group_deny")
|
||||
$("#contact_allow, #contact_deny, #circle_allow, #circle_deny")
|
||||
.change(function () {
|
||||
var selstr;
|
||||
$(
|
||||
"#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected",
|
||||
"#contact_allow option:selected, #contact_deny option:selected, #circle_allow option:selected, #circle_deny option:selected",
|
||||
).each(function () {
|
||||
selstr = $(this).html();
|
||||
$("#jot-perms-icon").removeClass("unlock").addClass("lock");
|
||||
|
|
|
@ -36,9 +36,9 @@ $(document).ready(function () {
|
|||
return false;
|
||||
});
|
||||
|
||||
// add the class "selected" to group widgets li if li > a does have the class group-selected
|
||||
if ($("#sidebar-group-ul li a").hasClass("group-selected")) {
|
||||
$("#sidebar-group-ul li a.group-selected").parent("li").addClass("selected");
|
||||
// add the class "selected" to circle widgets li if li > a does have the class circle-selected
|
||||
if ($("#sidebar-circle-ul li a").hasClass("circle-selected")) {
|
||||
$("#sidebar-circle-ul li a.circle-selected").parent("li").addClass("selected");
|
||||
}
|
||||
|
||||
// add the class "selected" to forums widgets li if li > a does have the class forum-selected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue