Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
thisismeonmounteverest committed Dec 28, 2023
2 parents b5f8eb1 + 825bd10 commit 4f3446d
Show file tree
Hide file tree
Showing 108 changed files with 3,511 additions and 2,107 deletions.
3 changes: 3 additions & 0 deletions .env
Expand Up @@ -6,6 +6,9 @@ DB_PORT=3306

APP_REFRESH_TOKEN_TTL=600

MANTICORE_HOST=manticore
MANTICORE_PORT=9312

###> symfony/framework-bundle ###
APP_ENV=dev
# Set secret in .env.local
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -8,6 +8,7 @@ null :=
SPACE := $(null) $(null)
COMMA := ,
SRC_DIR_COMMA := $(subst $(SPACE),$(COMMA),$(SRC_DIR))
TIME_STAMP := $(shell git log -n 1 --format=%aI)

all: phpci

Expand Down Expand Up @@ -98,3 +99,4 @@ phpmetrics:

version:
git rev-parse --short HEAD > VERSION
touch -d $(TIME_STAMP) VERSION
14 changes: 0 additions & 14 deletions assets/js/admin/tools/login_message.js

This file was deleted.

33 changes: 33 additions & 0 deletions assets/js/admin/tools/login_message.ts
@@ -0,0 +1,33 @@
import VanillaCalendar, { Options } from 'vanilla-calendar-pro';
import 'vanilla-calendar-pro/build/vanilla-calendar.min.css';

const options: Options = {
input: true,
type: 'default',
actions: {
changeToInput(e, calendar, self) {
if (!self.HTMLInputElement) return;
if (self.selectedDates[0]) {
self.HTMLInputElement.value = self.selectedDates[0] + " " + self.selectedTime;
} else {
self.HTMLInputElement.value = '';
}
},
},
settings: {
range: {
disablePast: true,
},
selection: {
time: 24,
},
visibility: {
positionToInput: 'center',
theme: 'light',
},
},
};

const expires = document.getElementById('login_message_expires');
const calendar = new VanillaCalendar(expires, options);
calendar.init();
15 changes: 15 additions & 0 deletions assets/js/conversations.js
Expand Up @@ -25,3 +25,18 @@ function updateConversations()
parameters = parameters.replace('?&', '?');
window.location.search = parameters;
}

const checkAll = document.getElementById('checkAll');
const checkAllLabel = document.querySelector('label[for="checkAll"]');
const checkAllLabelText = document.getElementById('checkAllLabelText').value;
const uncheckAllLabelText = document.getElementById('uncheckAllLabelText').value;
checkAll.addEventListener('click', (e) => {
const checkboxes = document.querySelectorAll('input[type=checkbox].checkable');
checkboxes.forEach((checkbox) => {checkbox.checked = checkAll.checked;
});
if (checkAll.checked) {
checkAllLabel.innerText = uncheckAllLabelText;
} else {
checkAllLabel.innerText = checkAllLabelText;
}
})
5 changes: 5 additions & 0 deletions assets/js/conversations/report.js
@@ -0,0 +1,5 @@
import MicroModal from 'micromodal';

document.addEventListener('DOMContentLoaded', () => {
MicroModal.show('report-modal');
});
2 changes: 1 addition & 1 deletion assets/js/micromodal.js
@@ -1,4 +1,4 @@
import MicroModal from 'micromodal/dist/micromodal.js';
import MicroModal from 'micromodal';

MicroModal.init({
awaitCloseAnimation: true
Expand Down
38 changes: 38 additions & 0 deletions assets/js/searchresults.js
@@ -0,0 +1,38 @@
import ShowMore from 'show-more-read/dist/js/showMore.esm.js';
import Mark from 'mark.js';

const keyword = document.getElementById("keyword").value;
let markInstance = null;

document.addEventListener('DOMContentLoaded', function () {
new ShowMore('.js-read-more', {
onMoreLess: (type, object) => {
markInstance.mark(keyword, {
"diacritics": false
});
},
regex: {
image: {
match: /<img([\w\W]+?)[/]?>/g,
replace: ''
},
blockquote: {
match: /<blockquote>.*?<\/blockquote>/gi,
replace: ""
}

},
config: {
type: "text",
btnClass: "o-show-more-btn",
limit: 300,
more: document.getElementById('read.more').value,
less: document.getElementById('show.less').value,
}
});

markInstance = new Mark(".js-highlight");
markInstance.mark(keyword, {
"diacritics": false
});
});
3 changes: 3 additions & 0 deletions assets/scss/_custom.scss
Expand Up @@ -61,3 +61,6 @@ $jumbotron-padding: 1rem;
$font-size-h4: 1.25rem;

$list-group-border-color: #aaa;

$mark-bg: #fdff00;
$mark-padding: 0;
117 changes: 83 additions & 34 deletions assets/scss/_forums.scss
Expand Up @@ -74,50 +74,72 @@
"edit edit"
"report permalink"
"moderate admin_edit"
;
grid-template-columns: 150px 1fr;
margin-bottom: 8px;
border: 1px solid #fff;
background-color: #ddd;
}

.l-search-post {
display: grid;
grid-template-areas:
"user_info post_info"
"content content"
"permalink thread_info"
"moderate admin_edit"
;
grid-template-columns: 150px 1fr;
margin-bottom: 8px;
border: 1px solid #fff;
background-color: #ddd;
}

.l-forum-single-post img {
.l-forum-single-post img,
.l-search-post img {
max-width: 100%;
}

.c-single-post-post_info {
.c-single-post-post_info,
.c-search-post_info {
grid-area: post_info;
background-color: white;
padding: 4px;
}

.c-single-post-content {
grid-area: content;
.c-search-thread_info {
grid-area: thread_info;
background-color: white;
padding: 4px;
word-break: break-word;
}

.l-forum-single-post--dark > .c-single-post-content {
background-color: #eee;
.c-single-post-content,
.c-search-content {
grid-area: content;
background-color: white;
padding: 4px;
word-break: break-word;
}

/**
Components to structure the forum results grid
*/
.c-single-post-user_info {
.c-single-post-user_info,
.c-search-user_info {
grid-area: user_info;
background-color: #ccc;
padding: 4px;
}

.c-single-post-post_info {
.c-single-post-post_info,
.c-search-post_info{
grid-area: post_info;
background-color: #ccc;
padding: 4px;
}

.c-single-post-moderate {
.c-single-post-moderate,
.c-search-moderate {
grid-area: moderate;
padding: 4px;
}
Expand All @@ -126,23 +148,27 @@
padding: 0;
}

.c-single-post-admin_edit {
.c-single-post-admin_edit,
.c-search-admin_edit {
grid-area: admin_edit;
padding: 4px;
}

.c-single-post-admin_edit:empty {
.c-single-post-admin_edit:empty,
.c-search-admin_edit:empty {
padding: 0;
height: 0;
}

.c-single-post-permalink {
.c-single-post-permalink,
.c-search-permalink {
background-color: white;
grid-area: permalink;
padding: 4px;
}

.c-single-post-report {
.c-single-post-report,
.c-search-report {
background-color: white;
grid-area: report;
align-self: center;
Expand All @@ -163,16 +189,21 @@
/**
* Color changes for alternating posts
*/
.l-forum-single-post--dark > .c-single-post-report {
background-color: #eee;
}

.l-forum-single-post--dark > .c-single-post-permalink {
.l-forum-single-post--dark > .c-single-post-report,
.l-forum-single-post--dark > .c-single-post-permalink,
.l-forum-single-post--dark > .c-single-post-edit,
.l-forum-single-post--dark > .c-single-post-content,
.l-search-post--dark > .c-search-report,
.l-search-post--dark > .c-search-permalink,
.l-search-post--dark > .c-search-edit,
.l-search-post--dark > .c-search-thread_info,
.l-search-post--dark > .c-search-content {
background-color: #eee;
}

.l-forum-single-post--dark > .c-single-post-edit {
background-color: #eee;
.l-search-post--dark > .c-search-user_info,
.l-search-post--dark > .c-search-post_info {
background-color: #bbb;
}

@media (min-width: 768px) {
Expand All @@ -190,37 +221,55 @@
grid-template-rows: min-content min-content min-content min-content min-content 1fr;
}

.c-single-post-edit {
background-color: #ddd;
.l-search-post {
display: grid;
grid-template-areas:
"user_info post_info"
"user_info content"
"permalink content"
"permalink thread_info";
grid-template-columns: 150px 1fr;
grid-template-rows: min-content max-content 1fr;
}

.c-single-post-post_info {
.c-single-post-post_info,
.c-search-post_info,
.c-search-thread_info {
background-color: white;
}

.c-single-post-report,
.c-single-post-permalink {
background-color: #ddd;
.c-single-post-permalink,
.c-single-post-edit,
.c-search-permalink {
background-color: #ddd;
}

.l-forum-single-post--dark > .c-single-post-edit {
background-color: #ddd;
.l-search-post--dark > .c-search-post_info,
.l-search-post--dark > .c-search-post-content,
.l-search-post--dark > .c-search-post-thread_info {
background-color: green;
}

.l-forum-single-post--dark > .c-single-post-post_info {
.l-search-post--dark > .c-search-post_info {
background-color: #eee;
}

.l-forum-single-post--dark > .c-single-post-permalink {
background-color: #ddd;
.l-forum-single-post--dark > .c-single-post-post_info,
.l-forum-single-post--dark > .c-single-post-content {
background-color: #eee;
}

.l-forum-single-post--dark > .c-single-post-report {

.l-forum-single-post--dark > .c-single-post-permalink,
.l-forum-single-post--dark > .c-single-post-moderate,
.l-forum-single-post--dark > .c-single-post-admin_edit,
.l-forum-single-post--dark > .c-single-post-edit,
.l-search-post--dark > .c-search-permalink {
background-color: #ddd;
}

.l-forum-single-post--dark > .c-single-post-edit {
.l-forum-single-post--dark > .c-single-post-report {
background-color: #ddd;
}

}
5 changes: 5 additions & 0 deletions assets/scss/bewelcome.scss
Expand Up @@ -259,6 +259,7 @@ a.active .metric .value {
@extend .alert-danger;
}

.community-news-wrapper img,
figure > img {
max-width: 100%;
height: auto;
Expand Down Expand Up @@ -633,3 +634,7 @@ $avatar-sizes: 30, 50, 75, 100, 150, 200, 500;
}

.pointer {cursor: pointer;}

.o-form-group, .o-form-group-sm {
margin-bottom: 8px;
}
1 change: 1 addition & 0 deletions assets/tailwindcss/objects/_objects.input.css
Expand Up @@ -253,6 +253,7 @@ textarea.o-input::placeholder {

.o-input--select {
cursor: pointer;
padding-right: 32px;
}

.o-input--select-white {
Expand Down
1 change: 1 addition & 0 deletions build/admin/treasurer/admintreasurer.ctrl.php
Expand Up @@ -77,6 +77,7 @@ public function treasurerEditCreateDonationCallback(StdClass $args, ReadOnlyObje

$id = $vars['id'];
if ($id == 0) {
$memberId = $vars['IdMember'] != 0 ? $vars['IdMember'] : null;
$success = $this->model->createDonation($vars['IdMember'], $vars['DonatedOn'],
$vars['donate-amount'], $vars['donate-comment'], $countryid);
} else {
Expand Down

0 comments on commit 4f3446d

Please sign in to comment.