Compare commits

..

No commits in common. "main" and "v7.21" have entirely different histories.
main ... v7.21

667 changed files with 17880 additions and 50428 deletions

View file

@ -1,24 +1,20 @@
FROM ubuntu:24.04
LABEL maintainer="wekan"
LABEL org.opencontainers.image.ref.name="ubuntu"
LABEL org.opencontainers.image.version="24.04"
LABEL org.opencontainers.image.source="https://github.com/wekan/wekan"
FROM ubuntu:21.10
LABEL maintainer="sgr"
# 2022-04-25:
# - gyp does not yet work with Ubuntu 22.04 ubuntu:rolling,
# so changing to 21.10. https://github.com/wekan/wekan/issues/4488
ENV BUILD_DEPS="apt-utils gnupg gosu wget bzip2 g++ iproute2 apt-transport-https libarchive-tools"
ENV DEV_DEPS="curl python3 ca-certificates build-essential git"
ARG DEBIAN_FRONTEND=noninteractive
ENV BUILD_DEPS="gnupg gosu libarchive-tools wget curl bzip2 g++ build-essential python3 git ca-certificates iproute2"
ENV DEBIAN_FRONTEND=noninteractive
ENV \
DEBUG=false \
NODE_VERSION=v14.21.4 \
METEOR_RELEASE=METEOR@2.14 \
METEOR_RELEASE=METEOR@2.13 \
USE_EDGE=false \
METEOR_EDGE=1.5-beta.17 \
NPM_VERSION=6.14.17 \
NPM_VERSION=latest \
FIBERS_VERSION=4.0.1 \
ARCHITECTURE=linux-x64 \
SRC_PATH=./ \
@ -32,14 +28,15 @@ ENV \
ACCOUNTS_LOCKOUT_UNKNOWN_USERS_LOCKOUT_PERIOD=60 \
ACCOUNTS_LOCKOUT_UNKNOWN_USERS_FAILURE_WINDOW=15 \
ACCOUNTS_COMMON_LOGIN_EXPIRATION_IN_DAYS=90 \
RICHER_CARD_COMMENT_EDITOR=false \
CARD_OPENED_WEBHOOK_ENABLED=false \
ATTACHMENTS_STORE_PATH="" \
ATTACHMENTS_UPLOAD_EXTERNAL_PROGRAM="" \
ATTACHMENTS_UPLOAD_MIME_TYPES="" \
ATTACHMENTS_UPLOAD_MAX_SIZE=0 \
AVATARS_UPLOAD_EXTERNAL_PROGRAM="" \
AVATARS_UPLOAD_MIME_TYPES="" \
AVATARS_UPLOAD_MAX_SIZE=0 \
RICHER_CARD_COMMENT_EDITOR=false \
CARD_OPENED_WEBHOOK_ENABLED=false \
MAX_IMAGE_PIXEL="" \
IMAGE_COMPRESS_RATIO="" \
NOTIFICATION_TRAY_AFTER_READ_DAYS_BEFORE_REMOVE="" \
@ -51,15 +48,12 @@ ENV \
MATOMO_SITE_ID="" \
MATOMO_DO_NOT_TRACK=true \
MATOMO_WITH_USERNAME=false \
METRICS_ALLOWED_IP_ADDRESSES="" \
BROWSER_POLICY_ENABLED=true \
TRUSTED_URL="" \
WEBHOOKS_ATTRIBUTES="" \
OAUTH2_ENABLED=false \
OIDC_REDIRECTION_ENABLED=false \
OAUTH2_CA_CERT="" \
OAUTH2_ADFS_ENABLED=false \
OAUTH2_B2C_ENABLED=false \
OAUTH2_LOGIN_STYLE=redirect \
OAUTH2_CLIENT_ID="" \
OAUTH2_SECRET="" \
@ -76,9 +70,6 @@ ENV \
LDAP_ENABLE=false \
LDAP_PORT=389 \
LDAP_HOST="" \
LDAP_AD_SIMPLE_AUTH="" \
LDAP_USER_AUTHENTICATION=false \
LDAP_USER_AUTHENTICATION_FIELD=uid \
LDAP_BASEDN="" \
LDAP_LOGIN_FALLBACK=false \
LDAP_RECONNECT=true \
@ -96,6 +87,8 @@ ENV \
LDAP_ENCRYPTION=false \
LDAP_CA_CERT="" \
LDAP_REJECT_UNAUTHORIZED=false \
LDAP_USER_AUTHENTICATION=false \
LDAP_USER_AUTHENTICATION_FIELD=uid \
LDAP_USER_SEARCH_FILTER="" \
LDAP_USER_SEARCH_SCOPE="" \
LDAP_USER_SEARCH_FIELD="" \
@ -150,32 +143,69 @@ ENV \
SAML_IDENTIFIER_FORMAT="" \
SAML_LOCAL_PROFILE_MATCH_ATTRIBUTE="" \
SAML_ATTRIBUTES="" \
ORACLE_OIM_ENABLED=false \
WAIT_SPINNER="" \
WRITABLE_PATH=/data \
DEFAULT_WAIT_SPINNER="" \
S3=""
# \
# NODE_OPTIONS="--max_old_space_size=4096"
# NODE_OPTIONS="--max_old_space_size=4096"
#---------------------------------------------
# == at docker-compose.yml: AUTOLOGIN WITH OIDC/OAUTH2 ====
# https://github.com/wekan/wekan/wiki/autologin
#- OIDC_REDIRECTION_ENABLED=true
#---------------------------------------------------------------------
# https://github.com/wekan/wekan/issues/3585#issuecomment-1021522132
# Add more Node heap:
# NODE_OPTIONS="--max_old_space_size=4096"
# Add more stack:
# bash -c "ulimit -s 65500; exec node --stack-size=65500 main.js"
#---------------------------------------------------------------------
# Install OS
RUN set -o xtrace \
&& useradd --user-group -m --system --home-dir /home/wekan wekan \
&& apt-get update \
&& apt-get install --assume-yes --no-install-recommends apt-utils apt-transport-https ca-certificates 2>&1 \
&& apt-get install --assume-yes --no-install-recommends ${BUILD_DEPS}
# OLD:
# && curl -fsSLO --compressed "https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$ARCHITECTURE.tar.xz" \
# && curl -fsSLO --compressed "https://nodejs.org/dist/$NODE_VERSION/SHASUMS256.txt.asc" \
# Install NodeJS
RUN set -o xtrace \
&& cd /tmp \
&& curl -fsSLO --compressed "https://github.com/wekan/node-v14-esm/releases/download/${NODE_VERSION}/node-${NODE_VERSION}-${ARCHITECTURE}.tar.xz" \
&& curl -fsSLO --compressed "https://github.com/wekan/node-v14-esm/releases/download/${NODE_VERSION}/SHASUMS256.txt" \
&& grep " node-$NODE_VERSION-$ARCHITECTURE.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-$NODE_VERSION-$ARCHITECTURE.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-$NODE_VERSION-$ARCHITECTURE.tar.xz" SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& mkdir -p /usr/local/lib/node_modules/fibers/.node-gyp /root/.node-gyp/${NODE_VERSION} /home/wekan/.config \
&& npm install -g npm@${NPM_VERSION} \
&& chown wekan:wekan --recursive /home/wekan/.config
ENV DEBIAN_FRONTEND=dialog
USER wekan
# Install Meteor
RUN set -o xtrace \
&& cd /home/wekan \
&& curl https://install.meteor.com/?release=$METEOR_VERSION --output /home/wekan/install-meteor.sh \
# Replace tar with bsdtar in the install script; https://github.com/jshimko/meteor-launchpad/issues/39
&& sed --in-place "s/tar -xzf.*/bsdtar -xf \"\$TARBALL_FILE\" -C \"\$INSTALL_TMPDIR\"/g" /home/wekan/install-meteor.sh \
&& sed --in-place 's/VERBOSITY="--silent"/VERBOSITY="--progress-bar"/' /home/wekan/install-meteor.sh \
&& printf "\n[-] Installing Meteor $METEOR_VERSION...\n\n" \
&& sh /home/wekan/install-meteor.sh
ENV PATH=$PATH:/home/wekan/.meteor/
RUN <<EOR
echo "export PATH=$PATH" >> /etc/environment
EOR
USER root
RUN echo "export PATH=$PATH" >> /etc/environment
USER wekan
# Copy source dir
RUN <<EOR
set -o xtrace
mkdir -p /home/wekan/app/.meteor
mkdir -p /home/wekan/app/packages
EOR
RUN set -o xtrace \
&& mkdir -p /home/wekan/app/.meteor \
&& mkdir -p /home/wekan/app/packages
COPY \
.meteor/.finished-upgraders \
@ -200,83 +230,44 @@ COPY \
packages \
/home/wekan/app/packages/
# Install OS
RUN <<EOR
set -o xtrace
USER root
# Add non-root user wekan
useradd --user-group --system --home-dir /home/wekan wekan
# OS dependencies
apt-get update --assume-yes
apt-get install --assume-yes --no-install-recommends ${BUILD_DEPS} ${DEV_DEPS}
RUN set -o xtrace \
&& chown -R wekan:wekan /home/wekan/app /home/wekan/.meteor
# Meteor installer doesn't work with the default tar binary, so using bsdtar while installing.
# https://github.com/coreos/bugs/issues/1095#issuecomment-350574389
cp $(which tar) $(which tar)~
ln -sf $(which bsdtar) $(which tar)
USER wekan
# Install NodeJS
cd /tmp
RUN \
set -o xtrace && \
# Build app
cd /home/wekan/app && \
/home/wekan/.meteor/meteor add standard-minifier-js && \
/home/wekan/.meteor/meteor npm install && \
/home/wekan/.meteor/meteor build --directory /home/wekan/app_build
# Download nodejs
wget "https://github.com/wekan/node-v14-esm/releases/download/${NODE_VERSION}/node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz"
wget "https://github.com/wekan/node-v14-esm/releases/download/${NODE_VERSION}/SHASUMS256.txt"
# Verify nodejs authenticity
grep "node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz" "SHASUMS256.txt" | shasum -a 256 -c -
rm -f "SHASUMS256.txt"
# Install Node
tar xzf "node-$NODE_VERSION-$ARCHITECTURE.tar.gz" -C /usr/local --strip-components=1 --no-same-owner
rm "node-$NODE_VERSION-$ARCHITECTURE.tar.gz" "SHASUMS256.txt"
ln -s "/usr/local/bin/node" "/usr/local/bin/nodejs"
mkdir -p "/opt/nodejs/lib/node_modules/fibers/.node-gyp" "/root/.node-gyp/${NODE_VERSION} /home/wekan/.config"
# Install node dependencies
npm install -g npm@${NPM_VERSION}
chown --recursive wekan:wekan /home/wekan/.config
# Install Meteor
cd /home/wekan
chown --recursive wekan:wekan /home/wekan
echo "Starting meteor ${METEOR_RELEASE} installation... \n"
gosu wekan:wekan curl https://install.meteor.com/ | /bin/sh
mv /root/.meteor /home/wekan/
chown --recursive wekan:wekan /home/wekan/.meteor
# sed -i 's/api\.versionsFrom/\/\/api.versionsFrom/' /home/wekan/app/packages/meteor-useraccounts-core/package.js
cd /home/wekan/.meteor
gosu wekan:wekan /home/wekan/.meteor/meteor -- help
# Build app (Development)
cd /home/wekan/app
gosu wekan:wekan /home/wekan/.meteor/meteor add standard-minifier-js
gosu wekan:wekan /home/wekan/.meteor/meteor npm install
# Put back the original tar
mv $(which tar)~ $(which tar)
RUN \
set -o xtrace && \
cd /home/wekan/app_build/bundle/programs/server/ && \
chmod u+w package.json npm-shrinkwrap.json && \
npm install && \
cd node_modules/fibers && \
node build.js
USER root
# Cleanup
apt-get remove --purge --assume-yes ${BUILD_DEPS}
apt-get install --assume-yes --no-install-recommends build-essential
apt-get autoremove --assume-yes
apt-get clean --assume-yes
rm -Rf /tmp/*
rm -Rf /var/lib/apt/lists/*
rm -Rf /var/cache/apt
rm -Rf /var/lib/apt/lists
rm -Rf /home/wekan/app_build
mkdir /data
chown wekan --recursive /data
EOR
RUN \
set -o xtrace && \
apt-get clean -y && \
apt-get autoremove -y && \
rm -Rf /tmp/* && \
rm -Rf /home/wekan/app_build && \
rm -Rf /var/cache/apt /var/lib/apt/lists && \
rm -Rf /var/lib/apt/lists/*
USER wekan
ENV PORT=3000
EXPOSE $PORT
STOPSIGNAL SIGKILL
WORKDIR /home/wekan/app
#---------------------------------------------------------------------
@ -286,6 +277,7 @@ WORKDIR /home/wekan/app
# Add more stack:
# bash -c "ulimit -s 65500; exec node --stack-size=65500 main.js"
#---------------------------------------------------------------------
#
#TODO:
#CMD ["bash", "-c", "ulimit -s 65500; exec node --stack-size=65500 /build/main.js"]
CMD ["/home/wekan/.meteor/meteor", "run", "--verbose", "--settings", "settings.json"]

View file

@ -1,26 +1,18 @@
## Issue
Please report these issues elsewhere:
<!--
Please report these elsewhere:
- SECURITY ISSUES, PGP EMAIL: https://github.com/wekan/wekan/blob/main/SECURITY.md
- UCS: https://github.com/wekan/univention/issues
If WeKan Snap is slow, try this: https://github.com/wekan/wekan/wiki/Cron
**[PLEASE UPGRADE](https://github.com/wekan/wekan/wiki/Backup)** to the newest
WeKan ® before reporting an issue, if possible.
**[PLEASE UPGRADE](https://github.com/wekan/wekan/wiki/Backup)** to the newest WeKan ® before reporting an issue.
Please search existing Open and Closed issues, most questions have already been answered.
If you can not login for any reason: https://github.com/wekan/wekan/wiki/Forgot-Password
Email settings, only SMTP MAIL_URL and MAIL_FROM are in use:
https://github.com/wekan/wekan/wiki/Troubleshooting-Mail
Email settings, only SMTP MAIL_URL and MAIL_FROM are in use: https://github.com/wekan/wekan/wiki/Troubleshooting-Mail
-->
### Server Setup Information
Please anonymize info, and do not any of your Wekan board URLs, passwords,
API tokens etc to this public issue.
<!-- Please anonymize info, and do not any of your Wekan board URLs, passwords, API tokens etc to this public issue. -->
* Did you test in newest Wekan?:
* Did you configure root-url correctly so Wekan cards open correctly (see https://github.com/wekan/wekan/wiki/Settings)?
* Operating System:
@ -31,25 +23,13 @@ API tokens etc to this public issue.
* What webbrowser version are you using (Wekan should work on all modern browsers that support Javascript)?
### Problem description
Add a recorded animated gif (e.g. with https://github.com/phw/peek) about
how it works currently, and screenshot mockups how it should work.
<!-- Add a recorded animated gif (e.g. with https://github.com/phw/peek) about how it works currently, and screenshot mockups how it should work. -->
#### Reproduction Steps
#### Logs
<!-- Check Right Click>Inspect>Console in you browser - generally Chrome shows more detailed info than Firefox. -->
Check Right Click / Inspect / Console in you browser - generally Chromium
based browsers show more detailed info than Firefox based browsers.
Please anonymize logs.
<!-- Please anonymize logs.
Snap: sudo snap logs wekan.wekan
Docker: sudo docker logs wekan-app
If logs are very long, attach them in .zip file
If logs are very long, attach them in .zip file -->

View file

@ -11,4 +11,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
uses: actions/dependency-review-action@v3

View file

@ -38,7 +38,7 @@ jobs:
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@ -48,14 +48,14 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
with:
context: .
push: ${{ github.event_name != 'pull_request' }}

View file

@ -25,6 +25,6 @@ jobs:
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

View file

@ -95,7 +95,7 @@ jobs:
# CACHING
- name: Install Meteor
id: cache-meteor-install
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: ~/.meteor
key: v1-meteor-${{ hashFiles('.meteor/versions') }}
@ -104,7 +104,7 @@ jobs:
- name: Cache NPM dependencies
id: cache-meteor-npm
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: ~/.npm
key: v1-npm-${{ hashFiles('package-lock.json') }}
@ -113,7 +113,7 @@ jobs:
- name: Cache Meteor build
id: cache-meteor-build
uses: actions/cache@v4
uses: actions/cache@v3
with:
path: |
.meteor/local/resolver-result-cache.json
@ -125,7 +125,7 @@ jobs:
v1-meteor_build_cache-
- name: Setup meteor
uses: meteorengineer/setup-meteor@v2
uses: meteorengineer/setup-meteor@v1
with:
meteor-release: '2.2'
@ -136,7 +136,7 @@ jobs:
run: sh ./test-wekan.sh -cv
- name: Upload coverage
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: coverage-folder
path: .coverage/
@ -150,14 +150,14 @@ jobs:
uses: actions/checkout@v4
- name: Download coverage
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: coverage-folder
path: .coverage/
- name: Coverage Report
uses: VeryGoodOpenSource/very_good_coverage@v3.0.0
uses: VeryGoodOpenSource/very_good_coverage@v2.2.0
with:
path: ".coverage/lcov.info"
min_coverage: 1 # TODO add tests and increase to 95!

View file

@ -6,7 +6,7 @@
meteor-base@1.5.1
# Build system
ecmascript@0.16.8
ecmascript@0.16.8-beta2140.4
standard-minifier-js@2.8.1
mquandalle:jade
coffeescript@2.4.1!
@ -20,11 +20,11 @@ cottz:publish-relations
dburles:collection-helpers
idmontie:migrations
easy:search
mongo@1.16.8
mongo@1.16.8-beta2140.4
mquandalle:collection-mutations
# Account system
accounts-password@2.4.0
accounts-password@2.4.0-beta2140.4
useraccounts:core
useraccounts:flow-routing
useraccounts:unstyled
@ -42,7 +42,7 @@ jquery@3.0.0!
random@1.2.1
reactive-dict@1.3.1
session@1.2.1
tracker@1.3.3
tracker@1.3.2
underscore@1.0.13
arillo:flow-router-helpers
audit-argument-checks@1.0.7
@ -83,14 +83,14 @@ matb33:collection-hooks
simple:json-routes
kadira:flow-router
spacebars
service-configuration@1.3.2
service-configuration@1.3.2-beta2140.4
communitypackages:picker
minifier-css@1.6.4
blaze
kadira:blaze-layout
peerlibrary:blaze-components
ejson@1.1.3
logging@1.3.3
logging@1.3.3-beta2140.4
wekan-fullcalendar
momentjs:moment@2.29.3
wekan-fontawesome

View file

@ -1 +1 @@
METEOR@2.14
METEOR@2.14-beta.4

View file

@ -1,6 +1,6 @@
accounts-base@2.2.10
accounts-oauth@1.4.3
accounts-password@2.4.0
accounts-base@2.2.9-beta2140.4
accounts-oauth@1.4.3-beta2140.4
accounts-password@2.4.0-beta2140.4
aldeed:collection2@2.10.0
aldeed:collection2-core@1.2.0
aldeed:schema-deny@1.1.0
@ -10,13 +10,13 @@ allow-deny@1.1.1
arillo:flow-router-helpers@0.5.2
audit-argument-checks@1.0.7
autoupdate@1.8.0
babel-compiler@7.10.5
babel-compiler@7.10.5-beta2140.4
babel-runtime@1.5.1
base64@1.0.12
binary-heap@1.0.11
blaze@2.7.1
blaze-tools@1.1.3
boilerplate-generator@1.7.2
boilerplate-generator@1.7.2-beta2140.4
caching-compiler@1.2.2
caching-html-compiler@1.2.1
callback-hook@1.5.1
@ -29,22 +29,22 @@ dburles:collection-helpers@1.1.0
ddp@1.4.1
ddp-client@2.6.1
ddp-common@1.4.0
ddp-rate-limiter@1.2.1
ddp-server@2.7.0
ddp-rate-limiter@1.2.1-beta2140.4
ddp-server@2.7.0-beta2140.4
deps@1.0.12
diff-sequence@1.1.2
dynamic-import@0.7.3
easy:search@2.2.1
easysearch:components@2.2.2
easysearch:core@2.2.2
ecmascript@0.16.8
ecmascript@0.16.8-beta2140.4
ecmascript-runtime@0.8.1
ecmascript-runtime-client@0.12.1
ecmascript-runtime-server@0.11.0
ejson@1.1.3
email@2.2.5
es5-shim@4.8.0
fetch@0.1.4
fetch@0.1.4-beta2140.4
geojson-utils@1.0.11
hot-code-push@1.0.4
html-tools@1.1.3
@ -60,10 +60,10 @@ kadira:flow-router@2.12.1
konecty:mongo-counter@0.0.5_3
lmieulet:meteor-coverage@1.1.4
localstorage@1.2.0
logging@1.3.3
logging@1.3.3-beta2140.4
matb33:collection-hooks@1.3.0
mdg:validation-error@0.5.1
meteor@1.11.5
meteor@1.11.4-beta2140.4
meteor-autosize@5.0.1
meteor-base@1.5.1
meteorhacks:aggregate@1.3.0
@ -77,11 +77,11 @@ minifier-css@1.6.4
minifier-js@2.7.5
minifiers@1.1.8-faster-rebuild.0
minimongo@1.9.3
modern-browsers@0.1.10
modules@0.20.0
modern-browsers@0.1.10-beta2140.4
modules@0.20.0-beta2140.4
modules-runtime@0.13.1
momentjs:moment@2.29.3
mongo@1.16.8
mongo@1.16.8-beta2140.4
mongo-decimal@0.1.3
mongo-dev-server@1.1.0
mongo-id@1.0.8
@ -94,8 +94,8 @@ mquandalle:jade-compiler@0.4.5
mquandalle:jquery-textcomplete@0.8.0_1
mquandalle:mousetrap-bindglobal@0.0.1
msavin:usercache@1.8.0
npm-mongo@4.17.2
oauth@2.2.1
npm-mongo@4.17.0-beta2140.4
oauth@2.2.1-beta2140.4
oauth2@1.3.2
observe-sequence@1.0.21
ongoworks:speakingurl@1.1.0
@ -111,19 +111,19 @@ peerlibrary:blaze-components@0.23.0
peerlibrary:computed-field@0.10.0
peerlibrary:data-lookup@0.3.0
peerlibrary:reactive-field@0.6.0
percolate:synced-cron@1.5.2
percolate:synced-cron@1.3.2
promise@0.12.2
raix:eventemitter@0.1.3
raix:handlebar-helpers@0.2.5
random@1.2.1
rate-limit@1.1.1
react-fast-refresh@0.2.8
react-fast-refresh@0.2.8-beta2140.4
reactive-dict@1.3.1
reactive-var@1.0.12
reload@1.3.1
retry@1.1.0
routepolicy@1.1.1
service-configuration@1.3.3
service-configuration@1.3.2-beta2140.4
session@1.2.1
sha@1.0.9
shell-server@0.5.0
@ -132,7 +132,7 @@ simple:json-routes@2.3.1
simple:rest-accounts-password@1.2.2
simple:rest-bearer-token-parser@1.1.1
simple:rest-json-error-handler@1.1.1
socket-stream-client@0.5.2
socket-stream-client@0.5.2-beta2140.4
spacebars@1.4.1
spacebars-compiler@1.3.1
standard-minifier-js@2.8.1
@ -141,15 +141,15 @@ templating@1.4.1
templating-compiler@1.4.1
templating-runtime@1.5.0
templating-tools@1.2.2
tracker@1.3.3
typescript@4.9.5
tracker@1.3.2
typescript@4.9.5-beta2140.4
ui@1.0.13
underscore@1.0.13
url@1.3.2
useraccounts:core@1.16.2
useraccounts:flow-routing@1.15.0
useraccounts:unstyled@1.14.2
webapp@1.13.6
webapp@1.13.5
webapp-hashing@1.1.1
wekan-accounts-cas@0.1.0
wekan-accounts-lockout@1.0.0

View file

@ -1,6 +1,6 @@
[main]
host = https://www.transifex.com
lang_map = te_IN: te-IN, es_AR: es-AR, es_419: es-LA, es_TX: es-TX, he_IL: he-IL, zh_CN: zh-CN, ar_EG: ar-EG, cs_CZ: cs-CZ, fa_IR: fa-IR, ms_MY: ms-MY, nl_NL: nl-NL, de_CH: de-CH, en_IT: en-IT, uz_UZ: uz-UZ, fr_CH: fr-CH, hi_IN: hi-IN, et_EE: et-EE, es_PE: es-PE, es_MX: es-MX, gl_ES: gl-ES, mn_MN: mn, sl_SI: sl, zh_TW: zh-TW, ast_ES: ast-ES, es_CL: es-CL, ja_JP: ja, lv_LV: lv, ro_RO: ro-RO, az_AZ: az-AZ, cy_GB: cy-GB, gu_IN: gu-IN, pl_PL: pl-PL, vep: ve-PP, en_BR: en-BR, en@ysv: en-YS, hu_HU: hu, ko_KR: ko-KR, pt_BR: pt-BR, zh_HK: zh-HK, zu_ZA: zu-ZA, en_MY: en-MY, ja-Hira: ja-HI, fi_FI: fi, vec: ve-CC, vi_VN: vi-VN, fr_FR: fr-FR, id_ID: id, zh_Hans: zh-Hans, en_DE: en-DE, en_GB: en-GB, el_GR: el-GR, uk_UA: uk-UA, az@latin: az-LA, de_AT: de-AT, uz@Latn: uz-LA, vls: vl-SS, ar_DZ: ar-DZ, bg_BG: bg, es_PY: es-PY, fy_NL: fy-NL, uz@Arab: uz-AR, ru_UA: ru-UA, war: wa-RR, zh_CN.GB2312: zh-GB
lang_map = es_AR: es-AR, es_419: es-LA, es_TX: es-TX, he_IL: he-IL, zh_CN: zh-CN, ar_EG: ar-EG, cs_CZ: cs-CZ, fa_IR: fa-IR, ms_MY: ms-MY, nl_NL: nl-NL, de_CH: de-CH, en_IT: en-IT, uz_UZ: uz-UZ, fr_CH: fr-CH, hi_IN: hi-IN, et_EE: et-EE, es_PE: es-PE, es_MX: es-MX, gl_ES: gl-ES, mn_MN: mn, sl_SI: sl, zh_TW: zh-TW, ast_ES: ast-ES, es_CL: es-CL, ja_JP: ja, lv_LV: lv, ro_RO: ro-RO, az_AZ: az-AZ, cy_GB: cy-GB, gu_IN: gu-IN, pl_PL: pl-PL, vep: ve-PP, en_BR: en-BR, en@ysv: en-YS, hu_HU: hu, ko_KR: ko-KR, pt_BR: pt-BR, zh_HK: zh-HK, zu_ZA: zu-ZA, en_MY: en-MY, ja-Hira: ja-HI, fi_FI: fi, vec: ve-CC, vi_VN: vi-VN, fr_FR: fr-FR, id_ID: id, zh_Hans: zh-Hans, en_DE: en-DE, en_GB: en-GB, el_GR: el-GR, uk_UA: uk-UA, az@latin: az-LA, de_AT: de-AT, uz@Latn: uz-LA, vls: vl-SS, ar_DZ: ar-DZ, bg_BG: bg, es_PY: es-PY, fy_NL: fy-NL, uz@Arab: uz-AR, ru_UA: ru-UA, war: wa-RR, zh_CN.GB2312: zh-GB
[o:wekan:p:wekan:r:application]
file_filter = imports/i18n/data/<lang>.i18n.json

84
.vscode/launch.json vendored
View file

@ -1,57 +1,45 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Meteor: Node",
"runtimeExecutable": "meteor",
"runtimeArgs": [
"--port=4000",
"--exclude-archs=web.browser.legacy,web.cordova",
"--raw-logs"
],
"env": {
"WRITABLE_PATH": "/tmp/uploads",
{
"type": "chrome",
"request": "launch",
"name": "Meteor: Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
"outputCapture": "std",
"restart": true,
"timeout": 60000
},
{
"type": "chrome",
"request": "launch",
"name": "Meteor: Chrome",
"url": "http://localhost:4000",
"sourceMapPathOverrides": {
"meteor://💻app/*": "${workspaceFolder}/*"
{
"type": "node",
"request": "launch",
"name": "Meteor: Node",
"runtimeExecutable": "/home/wekan/.meteor/meteor",
"runtimeArgs": ["run", "--inspect-brk=9229"],
"outputCapture": "std",
"port": 9229,
"timeout": 60000
},
"userDataDir": "${env:HOME}/.vscode/chrome"
},
{
"type": "node",
"request": "launch",
"name": "Test: Node",
"runtimeExecutable": "meteor",
"runtimeArgs": [
"test",
"--port=4040",
"--exclude-archs=web.browser.legacy,web.cordova",
"--driver-package=meteortesting:mocha",
"--settings=settings.json",
"--raw-logs"
],
"env": {
"TEST_WATCH": "1"
},
"outputCapture": "std",
"timeout": 60000
}
{
"type": "node",
"request": "launch",
"name": "Test: Node",
"runtimeExecutable": "meteor",
"runtimeArgs": [
"test",
"--inspect-brk=9229",
"--port=4040",
"--exclude-archs=web.browser.legacy,web.cordova",
"--driver-package=meteortesting:mocha",
"--settings=settings.json"
],
"outputCapture": "std",
"port": 9229,
"timeout": 60000
}
],
"compounds": [
{
"name": "Meteor: All",
"configurations": ["Meteor: Node", "Meteor: Chrome"]
}
{
"name": "Meteor: All",
"configurations": ["Meteor: Node", "Meteor: Chrome"]
}
]
}

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@ For all code at WeKan GitHub Organization https://github.com/wekan
## Private reports
- Email support@wekan.team
- Email support (at) wekan.team using [this PGP public key](support-at-wekan.team_pgp-publickey.asc) if possible
- Security issues: [SECURITY.md](SECURITY.md)
- License violations
- Anything private, sensitive or negative

View file

@ -27,9 +27,13 @@ CVE Hall of Fame is at https://wekan.github.io/hall-of-fame/
## Contributing to Documentation Wiki
Fork WeKan repo https://github.com/wekan/wekan ,
edit `docs` directory content at GitHub web interface,
and click send PR.
Please clone wiki:
```
git clone https://github.com/wekan/wekan.wiki
```
Edit .md files, and add changed files in .zip attachment
directly to comment of new issue at
https://github.com/wekan/wekan/issues
## Contributing code

View file

@ -1,8 +1,13 @@
FROM ubuntu:24.04
LABEL maintainer="wekan"
LABEL org.opencontainers.image.ref.name="ubuntu"
LABEL org.opencontainers.image.version="24.04"
LABEL org.opencontainers.image.source="https://github.com/wekan/wekan"
FROM --platform=linux/amd64 ubuntu:23.10 as wekan
LABEL maintainer="wekan" \
org.opencontainers.image.ref.name="ubuntu" \
org.opencontainers.image.version="23.10" \
org.opencontainers.image.source="https://github.com/wekan/wekan"
# 2022-09-04:
# - above "--platform=linux/amd64 ubuntu:22.04 as wekan" is needed to build Dockerfile
# correctly on Mac M1 etc, to not get this error:
# https://stackoverflow.com/questions/71040681/qemu-x86-64-could-not-open-lib64-ld-linux-x86-64-so-2-no-such-file-or-direc
# 2022-04-25:
# - gyp does not yet work with Ubuntu 22.04 ubuntu:rolling,
@ -11,17 +16,19 @@ LABEL org.opencontainers.image.source="https://github.com/wekan/wekan"
# 2021-09-18:
# - Above Ubuntu base image copied from Docker Hub ubuntu:hirsute-20210825
# to Quay to avoid Docker Hub rate limits.
# Set the environment variables (defaults where required)
# DOES NOT WORK: paxctl fix for alpine linux: https://github.com/wekan/wekan/issues/1303
# ENV BUILD_DEPS="paxctl"
ARG DEBIAN_FRONTEND=noninteractive
ENV BUILD_DEPS="apt-utils gnupg gosu wget bzip2 g++ curl libarchive-tools build-essential git ca-certificates python3"
ENV \
ENV BUILD_DEPS="apt-utils libarchive-tools gnupg gosu wget curl bzip2 g++ build-essential git ca-certificates python3" \
DEBUG=false \
NODE_VERSION=v14.21.4 \
METEOR_RELEASE=METEOR@2.14 \
METEOR_RELEASE=METEOR@2.13.3 \
USE_EDGE=false \
METEOR_EDGE=1.5-beta.17 \
NPM_VERSION=6.14.17 \
NPM_VERSION=9.8.1 \
FIBERS_VERSION=4.0.1 \
ARCHITECTURE=linux-x64 \
SRC_PATH=./ \
@ -62,7 +69,6 @@ ENV \
OIDC_REDIRECTION_ENABLED=false \
OAUTH2_CA_CERT="" \
OAUTH2_ADFS_ENABLED=false \
OAUTH2_B2C_ENABLED=false \
OAUTH2_LOGIN_STYLE=redirect \
OAUTH2_CLIENT_ID="" \
OAUTH2_SECRET="" \
@ -158,7 +164,7 @@ ENV \
WRITABLE_PATH=/data \
S3=""
# NODE_OPTIONS="--max_old_space_size=4096"
# NODE_OPTIONS="--max_old_space_size=4096" \
#---------------------------------------------
# == at docker-compose.yml: AUTOLOGIN WITH OIDC/OAUTH2 ====
@ -169,98 +175,99 @@ ENV \
# Copy the app to the image
COPY ${SRC_PATH} /home/wekan/app
# Install OS
RUN <<EOR
set -o xtrace
# Add non-root user wekan
useradd --user-group --system --home-dir /home/wekan wekan
# OS dependencies
apt-get update --assume-yes
apt-get install --assume-yes --no-install-recommends ${BUILD_DEPS}
# Meteor installer doesn't work with the default tar binary, so using bsdtar while installing.
# https://github.com/coreos/bugs/issues/1095#issuecomment-350574389
cp $(which tar) $(which tar)~
ln -sf $(which bsdtar) $(which tar)
# Install NodeJS
cd /tmp
# Download nodejs
wget "https://github.com/wekan/node-v14-esm/releases/download/${NODE_VERSION}/node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz"
wget "https://github.com/wekan/node-v14-esm/releases/download/${NODE_VERSION}/SHASUMS256.txt"
# Verify nodejs authenticity
grep "node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz" "SHASUMS256.txt" | shasum -a 256 -c -
rm -f "SHASUMS256.txt"
# Install Node
tar xzf "node-$NODE_VERSION-$ARCHITECTURE.tar.gz" -C /usr/local --strip-components=1 --no-same-owner
rm "node-$NODE_VERSION-$ARCHITECTURE.tar.gz" "SHASUMS256.txt"
ln -s "/usr/local/bin/node" "/usr/local/bin/nodejs"
mkdir -p "/opt/nodejs/lib/node_modules/fibers/.node-gyp" "/root/.node-gyp/${NODE_VERSION} /home/wekan/.config"
# Install node dependencies
npm install -g npm@${NPM_VERSION} --production
chown --recursive wekan:wekan /home/wekan/.config
# Install Meteor
cd /home/wekan
chown --recursive wekan:wekan /home/wekan
echo "Starting meteor ${METEOR_RELEASE} installation... \n"
gosu wekan:wekan curl https://install.meteor.com/ | /bin/sh
mv /root/.meteor /home/wekan/
chown --recursive wekan:wekan /home/wekan/.meteor
sed -i 's/api\.versionsFrom/\/\/api.versionsFrom/' /home/wekan/app/packages/meteor-useraccounts-core/package.js
cd /home/wekan/.meteor
gosu wekan:wekan /home/wekan/.meteor/meteor -- help
# Build app (Production)
cd /home/wekan/app
mkdir -p /home/wekan/.npm
chown --recursive wekan:wekan /home/wekan/.npm
chmod u+w *.json
gosu wekan:wekan meteor npm install --production
gosu wekan:wekan /home/wekan/.meteor/meteor build --directory /home/wekan/app_build
cd /home/wekan/app_build/bundle/programs/server/
chmod u+w *.json
gosu wekan:wekan meteor npm install --production
cd node_modules/fibers
node build.js
cd ../..
# Remove legacy webbroser bundle, so that Wekan works also at Android Firefox, iOS Safari, etc.
rm -rf /home/wekan/app_build/bundle/programs/web.browser.legacy
mv /home/wekan/app_build/bundle /build
# Put back the original tar
mv $(which tar)~ $(which tar)
# Cleanup
apt-get remove --purge --assume-yes ${BUILD_DEPS}
npm uninstall -g api2html
apt-get autoremove --assume-yes
apt-get clean --assume-yes
rm -Rf /tmp/*
rm -Rf /var/lib/apt/lists/*
rm -Rf /var/cache/apt
rm -Rf /var/lib/apt/lists
rm -Rf /home/wekan/app_build
rm -Rf /home/wekan/app
rm -Rf /home/wekan/.meteor
mkdir /data
chown wekan --recursive /data
EOR
USER wekan
RUN \
set -o xtrace && \
# Add non-root user wekan
useradd --user-group --system --home-dir /home/wekan wekan && \
\
# OS dependencies
apt-get update -y && apt-get install -y --no-install-recommends ${BUILD_DEPS} && \
\
# Meteor installer doesn't work with the default tar binary, so using bsdtar while installing.
# https://github.com/coreos/bugs/issues/1095#issuecomment-350574389
cp $(which tar) $(which tar)~ && \
ln -sf $(which bsdtar) $(which tar) && \
\
# Download nodejs
wget https://github.com/wekan/node-v14-esm/releases/download/${NODE_VERSION}/node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz && \
wget https://github.com/wekan/node-v14-esm/releases/download/${NODE_VERSION}/SHASUMS256.txt && \
#wget https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz && \
#wget https://nodejs.org/dist/${NODE_VERSION}/SHASUMS256.txt.asc && \
#---------------------------------------------------------------------------------------------
\
# Verify nodejs authenticity
grep node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz SHASUMS256.txt | shasum -a 256 -c - && \
rm -f SHASUMS256.txt && \
#grep ${NODE_VERSION}-${ARCHITECTURE}.tar.gz SHASUMS256.txt.asc | shasum -a 256 -c - && \
#rm -f SHASUMS256.txt.asc && \
\
# Install Node
tar xvzf node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz && \
rm node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz && \
mv node-${NODE_VERSION}-${ARCHITECTURE} /opt/nodejs && \
ln -s /opt/nodejs/bin/node /usr/bin/node && \
ln -s /opt/nodejs/bin/npm /usr/bin/npm && \
mkdir -p /opt/nodejs/lib/node_modules/fibers/.node-gyp /root/.node-gyp/${NODE_VERSION} /home/wekan/.config && \
chown wekan --recursive /home/wekan/.config && \
\
#DOES NOT WORK: paxctl fix for alpine linux: https://github.com/wekan/wekan/issues/1303
#paxctl -mC `which node` && \
\
# Install Node dependencies. Python path for node-gyp.
#npm install -g npm@${NPM_VERSION} && \
\
# Change user to wekan and install meteor
cd /home/wekan/ && \
chown wekan --recursive /home/wekan && \
echo "Starting meteor ${METEOR_RELEASE} installation... \n" && \
gosu wekan:wekan curl https://install.meteor.com/ | /bin/sh && \
mv /root/.meteor /home/wekan/ && \
chown wekan --recursive /home/wekan/.meteor && \
\
sed -i 's/api\.versionsFrom/\/\/api.versionsFrom/' /home/wekan/app/packages/meteor-useraccounts-core/package.js && \
cd /home/wekan/.meteor && \
gosu wekan:wekan /home/wekan/.meteor/meteor -- help; \
\
# Build app
cd /home/wekan/app && \
mkdir -p /home/wekan/.npm && \
chown wekan --recursive /home/wekan/.npm /home/wekan/.config /home/wekan/.meteor && \
chmod u+w *.json && \
gosu wekan:wekan meteor npm install && \
gosu wekan:wekan /home/wekan/.meteor/meteor build --directory /home/wekan/app_build && \
cd /home/wekan/app_build/bundle/programs/server/ && \
chmod u+w *.json && \
gosu wekan:wekan meteor npm install && \
cd node_modules/fibers && \
node build.js && \
cd ../.. && \
# Remove legacy webbroser bundle, so that Wekan works also at Android Firefox, iOS Safari, etc.
rm -rf /home/wekan/app_build/bundle/programs/web.browser.legacy && \
mv /home/wekan/app_build/bundle /build && \
\
# Put back the original tar
mv $(which tar)~ $(which tar) && \
\
# Cleanup
apt-get remove --purge -y ${BUILD_DEPS} && \
apt-get autoremove -y && \
npm uninstall -g api2html &&\
rm -R /tmp/* && \
rm -R /var/lib/apt/lists/* && \
rm -R /home/wekan/.meteor && \
rm -R /home/wekan/app && \
rm -R /home/wekan/app_build && \
mkdir /data && \
chown wekan --recursive /data
#cat /home/wekan/python/esprima-python/files.txt | xargs rm -R && \
#rm -R /home/wekan/python
#rm /home/wekan/install_meteor.sh
ENV PORT=8080
EXPOSE $PORT
USER wekan
STOPSIGNAL SIGKILL
WORKDIR /home/wekan/app
#---------------------------------------------------------------------
# https://github.com/wekan/wekan/issues/3585#issuecomment-1021522132
@ -271,6 +278,6 @@ WORKDIR /home/wekan/app
#---------------------------------------------------------------------
#
# CMD ["node", "/build/main.js"]
# CMD ["bash", "-c", "ulimit -s 65500; exec node --stack-size=65500 /build/main.js"]
# CMD ["bash", "-c", "ulimit -s 65500; exec node --stack-size=65500 --max-old-space-size=8192 /build/main.js"]
#CMD ["bash", "-c", "ulimit -s 65500; exec node --stack-size=65500 /build/main.js"]
CMD ["bash", "-c", "ulimit -s 65500; exec node /build/main.js"]

View file

@ -88,6 +88,5 @@ RUN \
EXPOSE $PORT
USER wekan
# CMD ["bash", "-c", "ulimit -s 65500; exec node --stack-size=65500 --max-old-space-size=8192 /home/wekan/bundle/main.js"]
CMD ["bash", "-c", "ulimit -s 65500; exec node /home/wekan/bundle/main.js"]

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014-2024 The Wekan Team
Copyright (c) 2014-2023 The Wekan Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -12,7 +12,7 @@ https://wekan.github.io / Install WeKan ® Server
- [Quay](https://quay.io/repository/wekan/wekan)
- [Docker Hub](https://hub.docker.com/r/wekanteam/wekan)
docker-compose.yml at https://github.com/wekan/wekan/blob/main/docker-compose.yml
docker-compose.yml at https://github.com/wekan/wekan
## Standards
@ -29,7 +29,7 @@ docker-compose.yml at https://github.com/wekan/wekan/blob/main/docker-compose.ym
## [Translate WeKan ® at Transifex](https://app.transifex.com/wekan/)
Translations to non-English languages are accepted only at [Transifex](https://app.transifex.com/wekan/wekan) using webbrowser.
Translations to non-English languages are accepted only at [Transifex](https://app.transifex.com/wekan/) using webbrowser.
New English strings of new features can be added as PRs to master branch file wekan/imports/i18n/data/en.i18n.json .
## [WeKan ® feature requests and bugs](https://github.com/wekan/wekan/issues)
@ -107,14 +107,6 @@ that by providing one-click installation on various platforms.
We also welcome sponsors for features and bugfixes.
By working directly with WeKan ® you get the benefit of active maintenance and new features added by growing WeKan ® developer community.
## Getting Started with Development
The default branch uses [Meteor 2 with Node.js 14](https://wekan.github.io/install/).
To contribute, [create a fork](https://github.com/wekan/wekan/wiki/Emoji#2-create-fork-of-httpsgithubcomwekanwekan-at-github-web-page) and run `./rebuild-wekan.sh` (or `./rebuild-wekan.bat` on Windows) as detailed [here](https://github.com/wekan/wekan/wiki/Emoji#3-select-option-1-to-install-dependencies-and-then-enter). Once you're ready, please test your code and [submit a pull request (PR)](https://github.com/wekan/wekan/wiki/Emoji#7-test).
Please refer to the [developer documentation](https://github.com/wekan/wekan/wiki/Developer-Documentation) for more information.
## Screenshot
[More screenshots at Features page](https://github.com/wekan/wekan/wiki/Features)

View file

@ -1,7 +1,8 @@
About money, see [CONTRIBUTING.md](CONTRIBUTING.md)
Security is very important to us. If you discover any issue regarding security, please disclose
the information responsibly by sending an email to security@wekan.team and not by
the information responsibly by sending an email to support (at) wekan.team using
[this PGP public key](support-at-wekan.team_pgp-publickey.asc) and not by
creating a GitHub issue. We will respond swiftly to fix verifiable security issues.
We thank you with a place at our hall of fame page, that is
@ -59,7 +60,7 @@ and by by companies that have 30k users.
## SSL/TLS
- SSL/TLS encrypts traffic between webbrowser and webserver.
- If you are thinking about TLS MITM, look at https://github.com/caddyserver/caddy/issues/2530
- If you are thinking about TLS MITM, look at Caddy 2 webserver MITM detections.
- Let's Encrypt TLS requires publicly accessible webserver, that Let's Encrypt TLS validation servers check.
- If firewall limits to only allowed IP addresses, you may need non-Let's Encrypt TLS cert.
- For On Premise:
@ -217,7 +218,7 @@ Typical already known or "no impact" bugs such as:
- Email spoofing, SPF, DMARC & DKIM. Wekan does not include email server.
Wekan is Open Source with MIT license, and free to use also for commercial use.
We welcome all fixes to improve security by email to security@wekan.team
We welcome all fixes to improve security by email to security (at) wekan.team .
## Bonus Points

View file

@ -1,5 +1,5 @@
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
appVersion: "v7.85.0"
appVersion: "v7.21.0"
files:
userUploads:
- README.md

357
api.py
View file

@ -37,24 +37,9 @@ If *nix: chmod +x api.py => ./api.py users
python3 api.py customfields BOARDID # Custom Fields of BOARDID
python3 api.py customfield BOARDID CUSTOMFIELDID # Info of CUSTOMFIELDID
python3 api.py addcustomfieldtoboard AUTHORID BOARDID NAME TYPE SETTINGS SHOWONCARD AUTOMATICALLYONCARD SHOWLABELONMINICARD SHOWSUMATTOPOFLIST # Add Custom Field to Board
python3 api.py editcustomfield BOARDID LISTID CARDID CUSTOMFIELDID NEWCUSTOMFIELDVALUE # Edit Custom Field
python3 api.py editcustomfield BOARDID LISTID CARDID CUSTOMFIELDID NEWCUSTOMFIELDVALUE
python3 api.py listattachments BOARDID # List attachments
python3 api.py cardsbyswimlane SWIMLANEID LISTID # Retrieve cards list on a swimlane
python3 api.py getcard BOARDID LISTID CARDID # Get card info
python3 api.py addlabel BOARDID LISTID CARDID LABELID # Add label to a card
python3 api.py addcardwithlabel AUTHORID BOARDID SWIMLANEID LISTID CARDTITLE CARDDESCRIPTION LABELIDS # Add a card and a label
python3 api.py editboardtitle BOARDID NEWBOARDTITLE # Edit board title
python3 api.py copyboard BOARDID NEWBOARDTITLE # Copy a board
python3 api.py createlabel BOARDID LABELCOLOR LABELNAME (Color available: `white`, `green`, `yellow`, `orange`, `red`, `purple`, `blue`, `sky`, `lime`, `pink`, `black`, `silver`, `peachpuff`, `crimson`, `plum`, `darkgreen`, `slateblue`, `magenta`, `gold`, `navy`, `gray`, `saddlebrown`, `paleturquoise`, `mistyrose`, `indigo`) # Create a new label
python3 api.py editcardcolor BOARDID LISTID CARDID COLOR (Color available: `white`, `green`, `yellow`, `orange`, `red`, `purple`, `blue`, `sky`, `lime`, `pink`, `black`, `silver`, `peachpuff`, `crimson`, `plum`, `darkgreen`, `slateblue`, `magenta`, `gold`, `navy`, `gray`, `saddlebrown`, `paleturquoise`, `mistyrose`, `indigo`) # Edit card color
python3 api.py addchecklist BOARDID CARDID TITLE ITEM1 ITEM2 ITEM3 ITEM4 (You can add multiple items or just one, or also without any item, just TITLE works as well. * If items or Title contains spaces, you should add ' between them.) # Add checklist + item on a card
python3 api.py deleteallcards BOARDID SWIMLANEID ( * Be careful will delete ALL CARDS INSIDE the swimlanes automatically in every list * ) # Delete all cards on a swimlane
python3 api.py checklistid BOARDID CARDID # Retrieve Checklist ID attached to a card
python3 api.py checklistinfo BOARDID CARDID CHECKLISTID # Get checklist info
python3 api.py get_list_cards_count BOARDID LISTID # Retrieve how many cards in a list
python3 api.py get_board_cards_count BOARDID # Retrieve how many cards in a board
Admin API:
python3 api.py users # All users
python3 api.py boards # All Public Boards
@ -194,52 +179,6 @@ if arguments == 10:
print(body.text)
# ------- ADD CUSTOM FIELD TO BOARD END -----------
if arguments == 8:
if sys.argv[1] == 'addcardwithlabel':
# ------- ADD CARD WITH LABEL START -----------
authorid = sys.argv[2]
boardid = sys.argv[3]
swimlaneid = sys.argv[4]
listid = sys.argv[5]
cardtitle = sys.argv[6]
carddescription = sys.argv[7]
labelIds = sys.argv[8] # Aggiunto labelIds
cardtolist = wekanurl + apiboards + boardid + s + l + s + listid + s + cs
# Add card
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
post_data = {
'authorId': '{}'.format(authorid),
'title': '{}'.format(cardtitle),
'description': '{}'.format(carddescription),
'swimlaneId': '{}'.format(swimlaneid),
'labelIds': labelIds
}
body = requests.post(cardtolist, data=post_data, headers=headers)
print(body.text)
# If ok id card
if body.status_code == 200:
card_data = body.json()
new_card_id = card_data.get('_id')
# Updating card
if new_card_id:
edcard = wekanurl + apiboards + boardid + s + l + s + listid + s + cs + s + new_card_id
put_data = {'labelIds': labelIds}
body = requests.put(edcard, data=put_data, headers=headers)
print("=== EDIT CARD ===\n")
body = requests.get(edcard, headers=headers)
data2 = body.text.replace('}', "}\n")
print(data2)
else:
print("Error obraining ID.")
else:
print("Error adding card.")
# ------- ADD CARD WITH LABEL END -----------
if arguments == 7:
if sys.argv[1] == 'addcard':
@ -298,53 +237,7 @@ if arguments == 6:
print(data2)
# ------- EDIT CUSTOMFIELD END -----------
if arguments == 5:
if sys.argv[1] == 'addlabel':
# ------- EDIT CARD ADD LABEL START -----------
boardid = sys.argv[2]
listid = sys.argv[3]
cardid = sys.argv[4]
labelIds = sys.argv[5]
edcard = wekanurl + apiboards + boardid + s + l + s + listid + s + cs + s + cardid
print(edcard)
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
put_data = {'labelIds': labelIds}
body = requests.put(edcard, data=put_data, headers=headers)
print("=== ADD LABEL ===\n")
body = requests.get(edcard, headers=headers)
data2 = body.text.replace('}',"}\n")
print(data2)
# ------- EDIT CARD ADD LABEL END -----------
if sys.argv[1] == 'editcardcolor':
# ------- EDIT CARD COLOR START -----------
boardid = sys.argv[2]
listid = sys.argv[3]
cardid = sys.argv[4]
newcolor = sys.argv[5]
valid_colors = ['white', 'green', 'yellow', 'orange', 'red', 'purple', 'blue', 'sky', 'lime', 'pink', 'black',
'silver', 'peachpuff', 'crimson', 'plum', 'darkgreen', 'slateblue', 'magenta', 'gold', 'navy',
'gray', 'saddlebrown', 'paleturquoise', 'mistyrose', 'indigo']
if newcolor not in valid_colors:
print("Invalid color. Choose a color from the list.")
sys.exit(1)
edcard = wekanurl + apiboards + boardid + s + l + s + listid + s + cs + s + cardid
print(edcard)
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
put_data = {'color': '{}'.format(newcolor)}
body = requests.put(edcard, data=put_data, headers=headers)
print("=== EDIT CARD COLOR ===\n")
body = requests.get(edcard, headers=headers)
data2 = body.text.replace('}', "}\n")
print(data2)
# ------- EDIT CARD COLOR END -----------
if arguments >= 4:
if arguments == 4:
if sys.argv[1] == 'newuser':
@ -358,155 +251,9 @@ if arguments >= 4:
print("=== CREATE NEW USER ===\n")
print(body.text)
# ------- CREATE NEW USER END -----------
if sys.argv[1] == 'getcard':
# ------- LIST OF CARD START -----------
boardid = sys.argv[2]
listid = sys.argv[3]
cardid = sys.argv[4]
listone = wekanurl + apiboards + boardid + s + l + s + listid + s + cs + s + cardid
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
print("=== INFO OF ONE LIST ===\n")
print("URL:", listone) # Stampa l'URL per debug
try:
response = requests.get(listone, headers=headers)
print("=== RESPONSE ===\n")
print("Status Code:", response.status_code) # Stampa il codice di stato per debug
if response.status_code == 200:
data2 = response.text.replace('}', "}\n")
print(data2)
else:
print(f"Error: {response.status_code}")
print(f"Response: {response.text}")
except Exception as e:
print(f"Error in the GET request: {e}")
# ------- LISTS OF CARD END -----------
if sys.argv[1] == 'createlabel':
# ------- CREATE LABEL START -----------
boardid = sys.argv[2]
labelcolor = sys.argv[3]
labelname = sys.argv[4]
label_url = wekanurl + apiboards + boardid + s + 'labels'
print(label_url)
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
# Object to send
put_data = {'label': {'color': labelcolor, 'name': labelname}}
print("URL:", label_url)
print("Headers:", headers)
print("Data:", put_data)
try:
response = requests.put(label_url, json=put_data, headers=headers)
print("=== CREATE LABELS ===\n")
print("Response Status Code:", response.status_code)
print("Response Text:", response.text)
except Exception as e:
print("Error:", e)
# ------- CREATE LABEL END -----------
if sys.argv[1] == 'addchecklist':
# ------- ADD CHECKLIST START -----------
board_id = sys.argv[2]
card_id = sys.argv[3]
checklist_title = sys.argv[4]
# Aggiungi la checklist
checklist_url = wekanurl + apiboards + board_id + s + cs + s + card_id + '/checklists'
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
data = {'title': checklist_title}
response = requests.post(checklist_url, data=data, headers=headers)
response.raise_for_status()
result = json.loads(response.text)
checklist_id = result.get('_id')
print(f"Checklist '{checklist_title}' created. ID: {checklist_id}")
# Aggiungi gli items alla checklist
items_to_add = sys.argv[5:]
for item_title in items_to_add:
checklist_item_url = wekanurl + apiboards + board_id + s + cs + s + card_id + s + 'checklists' + s + checklist_id + '/items'
item_data = {'title': item_title}
item_response = requests.post(checklist_item_url, data=item_data, headers=headers)
item_response.raise_for_status()
item_result = json.loads(item_response.text)
checklist_item_id = item_result.get('_id')
print(f"Item '{item_title}' added. ID: {checklist_item_id}")
if sys.argv[1] == 'checklistinfo':
# ------- ADD CHECKLIST START -----------
board_id = sys.argv[2]
card_id = sys.argv[3]
checklist_id = sys.argv[4]
checklist_url = wekanurl + apiboards + board_id + s + cs + s + card_id + '/checklists' + s + checklist_id
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
response = requests.get(checklist_url, headers=headers)
response.raise_for_status()
checklist_info = response.json()
print("Checklist Info:")
print(checklist_info)
if arguments == 3:
if sys.argv[1] == 'editboardtitle':
# ------- EDIT BOARD TITLE START -----------
boardid = sys.argv[2]
boardtitle = sys.argv[3]
edboardtitle = wekanurl + apiboards + boardid + s + 'title'
print(edboardtitle)
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
post_data = {'title': boardtitle}
body = requests.put(edboardtitle, json=post_data, headers=headers)
print("=== EDIT BOARD TITLE ===\n")
#body = requests.get(edboardtitle, headers=headers)
data2 = body.text.replace('}',"}\n")
print(data2)
if body.status_code == 200:
print("Succesfull!")
else:
print(f"Error: {body.status_code}")
print(body.text)
# ------- EDIT BOARD TITLE END -----------
if sys.argv[1] == 'copyboard':
# ------- COPY BOARD START -----------
boardid = sys.argv[2]
boardtitle = sys.argv[3]
edboardcopy = wekanurl + apiboards + boardid + s + 'copy'
print(edboardcopy)
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
post_data = {'title': boardtitle}
body = requests.post(edboardcopy, json=post_data, headers=headers)
print("=== COPY BOARD ===\n")
#body = requests.get(edboardcopy, headers=headers)
data2 = body.text.replace('}',"}\n")
print(data2)
if body.status_code == 200:
print("Succesfull!")
else:
print(f"Error: {body.status_code}")
print(body.text)
# ------- COPY BOARD END -----------
if sys.argv[1] == 'createlist':
# ------- CREATE LIST START -----------
@ -546,90 +293,6 @@ if arguments == 3:
print(data2)
# ------- INFO OF CUSTOM FIELD END -----------
if sys.argv[1] == 'cardsbyswimlane':
# ------- RETRIEVE CARDS BY SWIMLANE ID START -----------
boardid = sys.argv[2]
swimlaneid = sys.argv[3]
cardsbyswimlane = wekanurl + apiboards + boardid + s + sws + s + swimlaneid + s + cs
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
print("=== CARDS BY SWIMLANE ID ===\n")
print("URL:", cardsbyswimlane) # Debug
try:
body = requests.get(cardsbyswimlane, headers=headers)
print("Status Code:", body.status_code) # Debug
data = body.text.replace('}', "}\n")
print("Data:", data)
except Exception as e:
print("Error GET:", e)
# ------- RETRIEVE CARDS BY SWIMLANE ID END -----------
if sys.argv[1] == 'deleteallcards':
boardid = sys.argv[2]
swimlaneid = sys.argv[3]
# ------- GET SWIMLANE CARDS START -----------
get_swimlane_cards_url = wekanurl + apiboards + boardid + s + "swimlanes" + s + swimlaneid + s + "cards"
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
try:
response = requests.get(get_swimlane_cards_url, headers=headers)
response.raise_for_status()
cards_data = response.json()
# Print the details of each card
for card in cards_data:
# ------- DELETE CARD START -----------
delete_card_url = wekanurl + apiboards + boardid + s + "lists" + s + card['listId'] + s + "cards" + s + card['_id']
try:
response = requests.delete(delete_card_url, headers=headers)
if response.status_code == 404:
print(f"Card not found: {card['_id']}")
else:
response.raise_for_status()
deleted_card_data = response.json()
print(f"Card Deleted Successfully. Card ID: {deleted_card_data['_id']}")
except requests.exceptions.RequestException as e:
print(f"Error deleting card: {e}")
# ------- DELETE CARD END -----------
except requests.exceptions.RequestException as e:
print(f"Error getting swimlane cards: {e}")
sys.exit(1)
# ------- GET SWIMLANE CARDS END -----------
if sys.argv[1] == 'get_list_cards_count':
# ------- GET LIST CARDS COUNT START -----------
boardid = sys.argv[2]
listid = sys.argv[3]
get_list_cards_count_url = wekanurl + apiboards + boardid + s + l + s + listid + s + "cards_count"
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
try:
response = requests.get(get_list_cards_count_url, headers=headers)
response.raise_for_status()
data = response.json()
print(f"List Cards Count: {data['list_cards_count']}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
# ------- GET LIST CARDS COUNT END -----------
if sys.argv[1] == 'checklistid':
# ------- ADD CHECKLIST START -----------
board_id = sys.argv[2]
card_id = sys.argv[3]
checklist_url = wekanurl + apiboards + board_id + s + cs + s + card_id + '/checklists'
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
response = requests.get(checklist_url, headers=headers)
response.raise_for_status()
checklists = response.json()
print("Checklists:")
for checklist in checklists:
print(checklist)
if arguments == 2:
# ------- BOARDS LIST START -----------
@ -701,22 +364,6 @@ if arguments == 2:
print(data2)
# ------- LISTS OF ATTACHMENTS END -----------
if sys.argv[1] == 'get_board_cards_count':
# ------- GET BOARD CARDS COUNT START -----------
boardid = sys.argv[2]
get_board_cards_count_url = wekanurl + apiboards + boardid + s + "cards_count"
headers = {'Accept': 'application/json', 'Authorization': 'Bearer {}'.format(apikey)}
try:
response = requests.get(get_board_cards_count_url, headers=headers)
response.raise_for_status()
data = response.json()
print(f"Board Cards Count: {data['board_cards_count']}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
# ------- GET BOARD CARDS COUNT END -----------
if arguments == 1:
if sys.argv[1] == 'users':

View file

@ -49,6 +49,43 @@
margin-top: 5px;
padding: 5px;
}
.activities .activity .activity-desc .reactions {
display: flex;
margin-top: 5px;
gap: 5px;
}
.activities .activity .activity-desc .reactions .open-comment-reaction-popup {
display: flex;
align-items: center;
text-decoration: none;
height: 24px;
}
.activities .activity .activity-desc .reactions .open-comment-reaction-popup i.fa.fa-smile-o {
font-size: 17px;
font-weight: 500;
margin-left: 2px;
}
.activities .activity .activity-desc .reactions .open-comment-reaction-popup i.fa.fa-plus {
font-size: 8px;
margin-top: -7px;
margin-left: 1px;
}
.activities .activity .activity-desc .reactions .reaction {
cursor: pointer;
border: 1px solid #808080;
border-radius: 15px;
display: flex;
padding: 2px 5px;
}
.activities .activity .activity-desc .reactions .reaction.selected {
background-color: #b0c4de;
}
.activities .activity .activity-desc .reactions .reaction:hover {
background-color: #b0c4de;
}
.activities .activity .activity-desc .reactions .reaction .reaction-count {
font-size: 12px;
}
.activities .activity .activity-desc .activity-checklist {
display: block;
border-radius: 3px;

View file

@ -1,12 +1,11 @@
template(name="activities")
if showActivities
.activities.js-sidebar-activities
//- We should use Template.dynamic here but there is a bug with
//- blaze-components: https://github.com/peerlibrary/meteor-blaze-components/issues/30
if $eq mode "board"
+boardActivities
else
+cardActivities
.activities.js-sidebar-activities
//- We should use Template.dynamic here but there is a bug with
//- blaze-components: https://github.com/peerlibrary/meteor-blaze-components/issues/30
if $eq mode "board"
+boardActivities
else
+cardActivities
template(name="boardActivities")
each activityData in currentBoard.activities
@ -16,6 +15,32 @@ template(name="cardActivities")
each activityData in activities
+activity(activity=activityData card=card mode=mode)
template(name="editOrDeleteComment")
= ' - '
a.js-open-inlined-form {{_ "edit"}}
= ' - '
a.js-delete-comment {{_ "delete"}}
template(name="deleteCommentPopup")
p {{_ "comment-delete"}}
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
template(name="commentReactions")
.reactions
each reaction in reactions
span.reaction(class="{{#if isSelected reaction.userIds}}selected{{/if}}" data-codepoint="#{reaction.reactionCodepoint}" title="{{userNames reaction.userIds}}")
span.reaction-codepoint !{reaction.reactionCodepoint}
span.reaction-count #{reaction.userIds.length}
if (currentUser.isBoardMember)
a.open-comment-reaction-popup(title="{{_ 'addReactionPopup-title'}}")
i.fa.fa-smile-o
i.fa.fa-plus
template(name="addReactionPopup")
.reactions-popup
each codepoint in codepoints
span.add-comment-reaction(data-codepoint="#{codepoint}") !{codepoint}
template(name="activity")
.activity(data-id=activity._id)
+userAvatar(userId=activity.user._id)
@ -105,17 +130,39 @@ template(name="activity")
| {{{_ 'activity-checklist-item-removed' (sanitize activity.checklist.title) cardLink}}}.
//- comment activity ----------------------------------------------------
if($eq activity.activityType 'deleteComment')
| {{{_ 'activity-deleteComment' activity.commentId}}}.
if($eq mode 'card')
//- if we are in card mode we display the comment in a way that it
//- can be edited by the owner
if($eq activity.activityType 'addComment')
+inlinedForm(classNames='js-edit-comment')
+editor(autofocus=true)
= activity.comment.text
.edit-controls
button.primary(type="submit") {{_ 'edit'}}
.fa.fa-times-thin.js-close-inlined-form
else
.activity-comment
+viewer
= activity.comment.text
+commentReactions(reactions=activity.comment.reactions commentId=activity.comment._id)
span(title=activity.createdAt).activity-meta {{ moment activity.createdAt }}
if($eq currentUser._id activity.comment.userId)
+editOrDeleteComment
else if currentUser.isBoardAdmin
+editOrDeleteComment
if($eq activity.activityType 'editComment')
| {{{_ 'activity-editComment' activity.commentId}}}.
if($eq activity.activityType 'deleteComment')
| {{{_ 'activity-deleteComment' activity.commentId}}}.
if($eq activity.activityType 'addComment')
| {{{_ 'activity-on' cardLink}}}
a.activity-comment(href="{{ activity.card.originRelativeUrl }}")
+viewer
= activity.comment.text
if($eq activity.activityType 'editComment')
| {{{_ 'activity-editComment' activity.commentId}}}.
else
//- if we are not in card mode we only display a summary of the comment
if($eq activity.activityType 'addComment')
| {{{_ 'activity-on' cardLink}}}
a.activity-comment(href="{{ activity.card.originRelativeUrl }}")
+viewer
= activity.comment.text
//- date activity ------------------------------------------------
if($eq activity.activityType 'a-receivedAt')
@ -161,9 +208,6 @@ template(name="activity")
if($eq activity.activityType 'archivedList')
| {{_ 'activity-archived' (sanitize listLabel)}}.
if($eq activity.activityType 'changedListTitle')
| {{_ 'activity-changedListTitle' (sanitize listLabel) boardLabelLink}}
//- member activity ----------------------------------------------------
if($eq activity.activityType 'joinMember')
if($eq user._id activity.member._id)
@ -199,4 +243,4 @@ template(name="activity")
else if(currentData.timeValue)
| {{_ activity.activityType currentData.timeValue}}
div(title=activity.createdAt).activity-meta {{ moment activity.createdAt }}
span(title=activity.createdAt).activity-meta {{ moment activity.createdAt }}

View file

@ -13,41 +13,39 @@ BlazeComponent.extendComponent({
const sidebar = Sidebar;
sidebar && sidebar.callFirstWith(null, 'resetNextPeak');
this.autorun(() => {
let mode = this.data()?.mode;
if (mode) {
const capitalizedMode = Utils.capitalize(mode);
let searchId;
const showActivities = this.showActivities();
if (mode === 'linkedcard' || mode === 'linkedboard') {
const currentCard = Utils.getCurrentCard();
searchId = currentCard.linkedId;
mode = mode.replace('linked', '');
} else if (mode === 'card') {
searchId = Utils.getCurrentCardId();
} else {
searchId = Session.get(`current${capitalizedMode}`);
}
const limit = this.page.get() * activitiesPerPage;
if (searchId === null) return;
this.subscribe('activities', mode, searchId, limit, showActivities, () => {
this.loadNextPageLocked = false;
// TODO the guard can be removed as soon as the TODO above is resolved
if (!sidebar) return;
// If the sibear peak hasn't increased, that mean that there are no more
// activities, and we can stop calling new subscriptions.
// XXX This is hacky! We need to know excatly and reactively how many
// activities there are, we probably want to denormalize this number
// dirrectly into card and board documents.
const nextPeakBefore = sidebar.callFirstWith(null, 'getNextPeak');
sidebar.calculateNextPeak();
const nextPeakAfter = sidebar.callFirstWith(null, 'getNextPeak');
if (nextPeakBefore === nextPeakAfter) {
sidebar.callFirstWith(null, 'resetNextPeak');
}
});
let mode = this.data().mode;
const capitalizedMode = Utils.capitalize(mode);
let searchId;
if (mode === 'linkedcard' || mode === 'linkedboard') {
searchId = Utils.getCurrentCard().linkedId;
mode = mode.replace('linked', '');
} else if (mode === 'card') {
searchId = Utils.getCurrentCardId();
} else {
searchId = Session.get(`current${capitalizedMode}`);
}
const limit = this.page.get() * activitiesPerPage;
const user = ReactiveCache.getCurrentUser();
const hideSystem = user ? user.hasHiddenSystemMessages() : false;
if (searchId === null) return;
this.subscribe('activities', mode, searchId, limit, hideSystem, () => {
this.loadNextPageLocked = false;
// TODO the guard can be removed as soon as the TODO above is resolved
if (!sidebar) return;
// If the sibear peak hasn't increased, that mean that there are no more
// activities, and we can stop calling new subscriptions.
// XXX This is hacky! We need to know excatly and reactively how many
// activities there are, we probably want to denormalize this number
// dirrectly into card and board documents.
const nextPeakBefore = sidebar.callFirstWith(null, 'getNextPeak');
sidebar.calculateNextPeak();
const nextPeakAfter = sidebar.callFirstWith(null, 'getNextPeak');
if (nextPeakBefore === nextPeakAfter) {
sidebar.callFirstWith(null, 'resetNextPeak');
}
});
});
},
loadNextPage() {
@ -56,27 +54,15 @@ BlazeComponent.extendComponent({
this.loadNextPageLocked = true;
}
},
showActivities() {
let ret = false;
let mode = this.data()?.mode;
if (mode) {
if (mode === 'linkedcard' || mode === 'linkedboard') {
const currentCard = Utils.getCurrentCard();
ret = currentCard.showActivities ?? false;
} else if (mode === 'card') {
ret = this.data()?.card?.showActivities ?? false;
} else {
ret = Utils.getCurrentBoard().showActivities ?? false;
}
}
return ret;
},
activities() {
const ret = this.data().card.activities();
return ret;
},
}).register('activities');
Template.activities.helpers({
activities() {
const ret = this.card.activities();
return ret;
},
});
BlazeComponent.extendComponent({
checkItem() {
const checkItemId = this.currentData().activity.checklistItemId;
@ -261,6 +247,32 @@ BlazeComponent.extendComponent({
return customField.name;
},
events() {
return [
{
// XXX We should use Popup.afterConfirmation here
'click .js-delete-comment': Popup.afterConfirm('deleteComment', () => {
const commentId = this.data().activity.commentId;
CardComments.remove(commentId);
Popup.back();
}),
'submit .js-edit-comment'(evt) {
evt.preventDefault();
const commentText = this.currentComponent()
.getValue()
.trim();
const commentId = Template.parentData().activity.commentId;
if (commentText) {
CardComments.update(commentId, {
$set: {
text: commentText,
},
});
}
},
},
];
},
}).register('activity');
Template.activity.helpers({

View file

@ -63,78 +63,3 @@
display: block;
margin: auto;
}
.comments {
clear: both;
}
.comments .comment {
margin: 0.5px 0;
padding: 6px 0;
display: flex;
}
.comments .comment .member {
width: 32px;
height: 32px;
}
.comments .comment .comment-member {
font-weight: 700;
}
.comments .comment .comment-desc {
word-wrap: break-word;
overflow: hidden;
flex: 1;
align-self: center;
margin: 0;
margin-left: 3px;
overflow: hidden;
word-break: break-word;
}
.comments .comment .comment-desc .comment-text {
display: block;
border-radius: 3px;
background: #fff;
text-decoration: none;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
margin-top: 5px;
padding: 5px;
}
.comments .comment .comment-desc .reactions {
display: flex;
margin-top: 5px;
gap: 5px;
}
.comments .comment .comment-desc .reactions .open-comment-reaction-popup {
display: flex;
align-items: center;
text-decoration: none;
height: 24px;
}
.comments .comment .comment-desc .reactions .open-comment-reaction-popup i.fa.fa-smile-o {
font-size: 17px;
font-weight: 500;
margin-left: 2px;
}
.comments .comment .comment-desc .reactions .open-comment-reaction-popup i.fa.fa-plus {
font-size: 8px;
margin-top: -7px;
margin-left: 1px;
}
.comments .comment .comment-desc .reactions .reaction {
cursor: pointer;
border: 1px solid #808080;
border-radius: 15px;
display: flex;
padding: 2px 5px;
}
.comments .comment .comment-desc .reactions .reaction.selected {
background-color: #b0c4de;
}
.comments .comment .comment-desc .reactions .reaction:hover {
background-color: #b0c4de;
}
.comments .comment .comment-desc .reactions .reaction .reaction-count {
font-size: 12px;
}
.comments .comment .comment-desc .comment-meta {
font-size: 0.8em;
color: #999;
}

View file

@ -7,59 +7,3 @@ template(name="commentForm")
| {{getUnsavedValue 'cardComment' currentCard._id}}
.add-controls
button.primary.confirm.clear.js-add-comment(type="submit") {{_ 'comment'}}
template(name="comments")
.comments
each commentData in getComments
+comment(commentData)
template(name="comment")
.comment
+userAvatar(userId=userId)
p.comment-desc
span.comment-member
+memberName(user=user)
+inlinedForm(classNames='js-edit-comment')
+editor(autofocus=true)
= text
.edit-controls
button.primary(type="submit") {{_ 'edit'}}
.fa.fa-times-thin.js-close-inlined-form
else
.comment-text
+viewer
= text
+commentReactions(reactions=reactions commentId=_id)
span(title=createdAt).comment-meta {{ moment createdAt }}
if($eq currentUser._id userId)
+editOrDeleteComment
else if currentUser.isBoardAdmin
+editOrDeleteComment
template(name="editOrDeleteComment")
= ' - '
a.js-open-inlined-form {{_ "edit"}}
= ' - '
a.js-delete-comment {{_ "delete"}}
template(name="deleteCommentPopup")
p {{_ "comment-delete"}}
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
template(name="commentReactions")
.reactions
each reaction in reactions
span.reaction(class="{{#if isSelected reaction.userIds}}selected{{/if}}" data-codepoint="#{reaction.reactionCodepoint}" title="{{userNames reaction.userIds}}")
span.reaction-codepoint !{reaction.reactionCodepoint}
span.reaction-count #{reaction.userIds.length}
if (currentUser.isBoardMember)
a.open-comment-reaction-popup(title="{{_ 'addReactionPopup-title'}}")
i.fa.fa-smile-o
i.fa.fa-plus
template(name="addReactionPopup")
.reactions-popup
each codepoint in codepoints
span.add-comment-reaction(data-codepoint="#{codepoint}") !{codepoint}

View file

@ -55,41 +55,6 @@ BlazeComponent.extendComponent({
},
}).register('commentForm');
BlazeComponent.extendComponent({
getComments() {
const ret = this.data().comments();
return ret;
},
}).register("comments");
BlazeComponent.extendComponent({
events() {
return [
{
'click .js-delete-comment': Popup.afterConfirm('deleteComment', () => {
const commentId = this.data()._id;
CardComments.remove(commentId);
Popup.back();
}),
'submit .js-edit-comment'(evt) {
evt.preventDefault();
const commentText = this.currentComponent()
.getValue()
.trim();
const commentId = this.data()._id;
if (commentText) {
CardComments.update(commentId, {
$set: {
text: commentText,
},
});
}
},
},
];
},
}).register("comment");
// XXX This should be a static method of the `commentForm` component
function resetCommentInput(input) {
input.val(''); // without manually trigger, input event won't be fired

View file

@ -16,6 +16,9 @@
transition: margin 0.1s;
overflow-y: auto;
}
.board-wrapper .board-canvas.is-sibling-sidebar-open {
margin-right: 248px;
}
.board-wrapper .board-canvas .board-overlay {
position: fixed;
left: 0;

View file

@ -17,32 +17,25 @@ template(name="boardBody")
| {{_ 'tableVisibilityMode-allowPrivateOnly'}}
else
.board-wrapper(class=currentBoard.colorClass)
+sidebar
.board-canvas.js-swimlanes(
class="{{#if hasSwimlanes}}dragscroll{{/if}}"
class="{{#if Sidebar.isOpen}}is-sibling-sidebar-open{{/if}}"
class="{{#if MultiSelection.isActive}}is-multiselection-active{{/if}}"
class="{{#if draggingActive.get}}is-dragging-active{{/if}}"
class="{{#unless isVerticalScrollbars}}no-scrollbars{{/unless}}")
class="{{#if draggingActive.get}}is-dragging-active{{/if}}")
if showOverlay.get
.board-overlay
if currentBoard.isTemplatesBoard
each currentBoard.swimlanes
+swimlane(this)
else if isViewSwimlanes
if hasSwimlanes
each currentBoard.swimlanes
+swimlane(this)
else
a.js-empty-board-add-swimlane(title="{{_ 'add-swimlane'}}")
h1.big-message.quiet
| {{_ 'add-swimlane'}} +
each currentBoard.swimlanes
+swimlane(this)
else if isViewLists
+listsGroup(currentBoard)
else if isViewCalendar
+calendarView
else
+listsGroup(currentBoard)
+sidebar
template(name="calendarView")
if isViewCalendar

View file

@ -1,6 +1,5 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import dragscroll from '@wekanteam/dragscroll';
const subManager = new SubsManager();
const { calculateIndex } = Utils;
@ -195,9 +194,6 @@ BlazeComponent.extendComponent({
});
this.autorun(() => {
// Always reset dragscroll on view switch
dragscroll.reset();
if (Utils.isTouchScreenOrShowDesktopDragHandles()) {
$swimlanesDom.sortable({
handle: '.js-swimlane-header-handle',
@ -223,7 +219,6 @@ BlazeComponent.extendComponent({
boardComponent.openNewListForm();
}
dragscroll.reset();
Utils.setBackgroundImage();
},
@ -248,10 +243,6 @@ BlazeComponent.extendComponent({
}
},
hasSwimlanes() {
return Utils.getCurrentBoard().swimlanes().length > 0;
},
isViewLists() {
const currentUser = ReactiveCache.getCurrentUser();
if (currentUser) {
@ -270,11 +261,6 @@ BlazeComponent.extendComponent({
}
},
isVerticalScrollbars() {
const user = ReactiveCache.getCurrentUser();
return user && user.isVerticalScrollbars();
},
openNewListForm() {
if (this.isViewSwimlanes()) {
// The form had been removed in 416b17062e57f215206e93a85b02ef9eb1ab4902
@ -297,7 +283,6 @@ BlazeComponent.extendComponent({
this._isDragging = false;
}
},
'click .js-empty-board-add-swimlane': Popup.open('swimlaneAdd'),
},
];
},

File diff suppressed because it is too large Load diff

View file

@ -12,9 +12,8 @@ template(name="boardHeaderBar")
if currentBoard
if currentUser
with currentBoard
if currentUser.isBoardAdmin
a.board-header-btn(class="{{#if currentUser.isBoardAdmin}}js-edit-board-title{{else}}is-disabled{{/if}}" title="{{_ 'edit'}}" value=title)
i.fa.fa-pencil-square-o
a.board-header-btn(class="{{#if currentUser.isBoardAdmin}}js-edit-board-title{{else}}is-disabled{{/if}}" title="{{_ 'edit'}}" value=title)
i.fa.fa-pencil-square-o
a.board-header-btn.js-star-board(class="{{#if isStarred}}is-active{{/if}}"
title="{{#if isStarred}}{{_ 'click-to-unstar'}}{{else}}{{_ 'click-to-star'}}{{/if}} {{_ 'starred-boards-description'}}")

View file

@ -1,12 +1,42 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import dragscroll from '@wekanteam/dragscroll';
/*
const DOWNCLS = 'fa-sort-down';
const UPCLS = 'fa-sort-up';
*/
const sortCardsBy = new ReactiveVar('');
Template.boardMenuPopup.events({
'click .js-rename-board': Popup.open('boardChangeTitle'),
'click .js-custom-fields'() {
Sidebar.setView('customFields');
Popup.back();
},
'click .js-open-archives'() {
Sidebar.setView('archives');
Popup.back();
},
'click .js-change-board-color': Popup.open('boardChangeColor'),
'click .js-change-language': Popup.open('changeLanguage'),
'click .js-archive-board ': Popup.afterConfirm('archiveBoard', function() {
const currentBoard = Utils.getCurrentBoard();
currentBoard.archive();
// XXX We should have some kind of notification on top of the page to
// confirm that the board was successfully archived.
FlowRouter.go('home');
}),
'click .js-delete-board': Popup.afterConfirm('deleteBoard', function() {
const currentBoard = Utils.getCurrentBoard();
Popup.back();
Boards.remove(currentBoard._id);
FlowRouter.go('home');
}),
'click .js-outgoing-webhooks': Popup.open('outgoingWebhooks'),
'click .js-import-board': Popup.open('chooseBoardSource'),
'click .js-subtask-settings': Popup.open('boardSubtaskSettings'),
'click .js-card-settings': Popup.open('boardCardSettings'),
'click .js-minicard-settings': Popup.open('boardMinicardSettings'),
});
Template.boardChangeTitlePopup.events({
submit(event, templateInstance) {

View file

@ -151,8 +151,8 @@ BlazeComponent.extendComponent({
}
const currUser = ReactiveCache.getCurrentUser();
let orgIdsUserBelongs = currUser?.orgIdsUserBelongs() || '';
if (orgIdsUserBelongs) {
let orgIdsUserBelongs = currUser !== undefined && currUser.teams !== 'undefined' ? currUser.orgIdsUserBelongs() : '';
if (orgIdsUserBelongs && orgIdsUserBelongs != '') {
let orgsIds = orgIdsUserBelongs.split(',');
// for(let i = 0; i < orgsIds.length; i++){
// query.$and[2].$or.push({'orgs.orgId': orgsIds[i]});
@ -162,8 +162,8 @@ BlazeComponent.extendComponent({
query.$and[2].$or.push({ 'orgs.orgId': { $in: orgsIds } });
}
let teamIdsUserBelongs = currUser?.teamIdsUserBelongs() || '';
if (teamIdsUserBelongs) {
let teamIdsUserBelongs = currUser !== undefined && currUser.teams !== 'undefined' ? currUser.teamIdsUserBelongs() : '';
if (teamIdsUserBelongs && teamIdsUserBelongs != '') {
let teamsIds = teamIdsUserBelongs.split(',');
// for(let i = 0; i < teamsIds.length; i++){
// query.$or[2].$or.push({'teams.teamId': teamsIds[i]});
@ -199,12 +199,15 @@ BlazeComponent.extendComponent({
},
boardMembers(boardId) {
let boardMembers = [];
/* Bug Board icons random dance https://github.com/wekan/wekan/issues/4214
const lists = ReactiveCache.getBoard(boardId)
const boardMembers = lists?.members.map(member => member.userId);
return boardMembers;
let members = lists.members
members.forEach(member => {
boardMembers.push(member.userId);
});
*/
return [];
return boardMembers;
},
isStarred() {

View file

@ -51,9 +51,8 @@ template(name="attachmentGallery")
.attachment-gallery
if canModifyCard
a.attachment-item.add-attachment.js-add-attachment
i.fa.fa-plus.icon
a.attachment-item.add-attachment.js-add-attachment
i.fa.fa-plus.icon
each attachments
@ -117,6 +116,8 @@ template(name="attachmentActionsPopup")
| {{_ 'remove-background-image'}}
else
| {{_ 'add-background-image'}}
p.attachment-storage
| {{versions.original.storage}}
if $neq versions.original.storage "fs"
a.js-move-storage-fs

View file

@ -39,7 +39,7 @@ Template.attachmentGallery.events({
'click .js-rename': Popup.open('attachmentRename'),
'click .js-confirm-delete': Popup.afterConfirm('attachmentDelete', function() {
Attachments.remove(this._id);
Popup.back();
Popup.back(2);
}),
});
@ -501,7 +501,7 @@ BlazeComponent.extendComponent({
if (name === DOMPurify.sanitize(name)) {
Meteor.call('renameAttachment', this.data()._id, name);
}
Popup.back();
Popup.back(2);
},
}
]

View file

@ -79,14 +79,13 @@ template(name="cardCustomField-currency")
template(name="cardCustomField-date")
if canModifyCard
a.js-edit-date(title="{{showTitle}} {{_ 'predicate-week'}} {{#if showWeekOfYear}}{{showWeek}}{{/if}}" class="{{classes}}")
a.js-edit-date(title="{{showTitle}} {{_ 'predicate-week'}} {{showWeek}}" class="{{classes}}")
if value
div.card-date
time(datetime="{{showISODate}}")
| {{showDate}}
if showWeekOfYear
b
| {{showWeek}}
b
| {{showWeek}}
else
| {{_ 'edit'}}
else
@ -94,9 +93,8 @@ template(name="cardCustomField-date")
div.card-date
time(datetime="{{showISODate}}")
| {{showDate}}
if showWeekOfYear
b
| {{showWeek}}
b
| {{showWeek}}
template(name="cardCustomField-dropdown")
if canModifyCard

View file

@ -148,10 +148,6 @@ CardCustomField.register('cardCustomField');
return this.date.get().week().toString();
}
showWeekOfYear() {
return ReactiveCache.getCurrentUser().isShowWeekOfYear();
}
showDate() {
// this will start working once mquandalle:moment
// is updated to at least moment.js 2.10.5

View file

@ -1,23 +1,20 @@
template(name="dateBadge")
if canModifyCard
a.js-edit-date.card-date(title="{{showTitle}} {{_ 'predicate-week'}} {{#if showWeekOfYear}}{{showWeek}}{{/if}}" class="{{classes}}")
a.js-edit-date.card-date(title="{{showTitle}} {{_ 'predicate-week'}} {{showWeek}}" class="{{classes}}")
time(datetime="{{showISODate}}")
| {{showDate}}
if showWeekOfYear
b
| {{showWeek}}
else
a.card-date(title="{{showTitle}} {{_ 'predicate-week'}} {{#if showWeekOfYear}}{{showWeek}}{{/if}}" class="{{classes}}")
time(datetime="{{showISODate}}")
| {{showDate}}
if showWeekOfYear
b
| {{showWeek}}
template(name="dateCustomField")
a(title="{{showTitle}} {{_ 'predicate-week'}} {{#if showWeekOfYear}}{{showWeek}}{{/if}}" class="{{classes}}")
time(datetime="{{showISODate}}")
| {{showDate}}
if showWeekOfYear
b
| {{showWeek}}
else
a.card-date(title="{{showTitle}} {{_ 'predicate-week'}} {{showWeek}}" class="{{classes}}")
time(datetime="{{showISODate}}")
| {{showDate}}
b
| {{showWeek}}
template(name="dateCustomField")
a(title="{{showTitle}} {{_ 'predicate-week'}} {{showWeek}}" class="{{classes}}")
time(datetime="{{showISODate}}")
| {{showDate}}
b
| {{showWeek}}

View file

@ -11,7 +11,7 @@ import { DatePicker } from '/client/lib/datepicker';
}
_storeDate(date) {
this.card.setReceived(moment(date).format('YYYY-MM-DD HH:mm'));
this.card.setReceived(date);
}
_deleteDate() {
@ -37,7 +37,7 @@ import { DatePicker } from '/client/lib/datepicker';
}
_storeDate(date) {
this.card.setStart(moment(date).format('YYYY-MM-DD HH:mm'));
this.card.setStart(date);
}
_deleteDate() {
@ -60,7 +60,7 @@ import { DatePicker } from '/client/lib/datepicker';
}
_storeDate(date) {
this.card.setDue(moment(date).format('YYYY-MM-DD HH:mm'));
this.card.setDue(date);
}
_deleteDate() {
@ -83,7 +83,7 @@ import { DatePicker } from '/client/lib/datepicker';
}
_storeDate(date) {
this.card.setEnd(moment(date).format('YYYY-MM-DD HH:mm'));
this.card.setEnd(date);
}
_deleteDate() {
@ -110,10 +110,6 @@ const CardDate = BlazeComponent.extendComponent({
return this.date.get().week().toString();
},
showWeekOfYear() {
return ReactiveCache.getCurrentUser().isShowWeekOfYear();
},
showDate() {
// this will start working once mquandalle:moment
// is updated to at least moment.js 2.10.5
@ -287,10 +283,6 @@ class CardCustomFieldDate extends CardDate {
return this.date.get().week().toString();
}
showWeekOfYear() {
return ReactiveCache.getCurrentUser().isShowWeekOfYear();
}
showDate() {
// this will start working once mquandalle:moment
// is updated to at least moment.js 2.10.5
@ -322,19 +314,19 @@ CardCustomFieldDate.register('cardCustomFieldDate');
(class extends CardStartDate {
showDate() {
return this.date.get().format('YYYY-MM-DD HH:mm');
return this.date.get().format('L');
}
}.register('minicardStartDate'));
(class extends CardDueDate {
showDate() {
return this.date.get().format('YYYY-MM-DD HH:mm');
return this.date.get().format('L');
}
}.register('minicardDueDate'));
(class extends CardEndDate {
showDate() {
return this.date.get().format('YYYY-MM-DD HH:mm');
return this.date.get().format('L');
}
}.register('minicardEndDate'));

View file

@ -5,7 +5,7 @@
float: left;
height: 30px;
width: 30px;
margin: .3vh;
margin: 0 4px 4px 0;
cursor: pointer;
user-select: none;
z-index: 1;
@ -272,7 +272,7 @@
box-sizing: border-box;
top: 97px;
left: 0px;
height: calc(100% - 100px);
height: calc(100% - 20px);
width: calc(100% - 20px);
float: left;
}

View file

@ -5,7 +5,7 @@ template(name="cardDetails")
+attachmentViewer
section.card-details.js-card-details.nodragscroll(class='{{#if cardMaximized}}card-details-maximized{{/if}}' class='{{#if isPopup}}card-details-popup{{/if}}' class='{{#unless isVerticalScrollbars}}no-scrollbars{{/unless}}'): .card-details-canvas
section.card-details.js-card-details(class='{{#if cardMaximized}}card-details-maximized{{/if}}' class='{{#if isPopup}}card-details-popup{{/if}}'): .card-details-canvas
.card-details-header(class='{{#if colorClass}}card-details-{{colorClass}}{{/if}}')
+inlinedForm(classNames="js-card-details-title")
+editCardTitleForm
@ -13,12 +13,11 @@ template(name="cardDetails")
unless isMiniScreen
unless isPopup
a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
if canModifyCard
if cardMaximized
a.fa.fa-window-minimize.minimize-card-details.js-minimize-card-details(title="{{_ 'minimize-card'}}")
else
a.fa.fa-window-maximize.maximize-card-details.js-maximize-card-details(title="{{_ 'maximize-card'}}")
if canModifyCard
if cardMaximized
a.fa.fa-window-minimize.minimize-card-details.js-minimize-card-details(title="{{_ 'minimize-card'}}")
else
a.fa.fa-window-maximize.maximize-card-details.js-maximize-card-details(title="{{_ 'maximize-card'}}")
if currentUser.isBoardMember
a.fa.fa-navicon.card-details-menu.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
a.fa.fa-link.card-copy-button.js-copy-link(
id="cardURL_copy"
@ -30,7 +29,7 @@ template(name="cardDetails")
else
unless isPopup
a.fa.fa-times-thin.close-card-details.js-close-card-details(title="{{_ 'close-card'}}")
if canModifyCard
if currentUser.isBoardMember
a.fa.fa-navicon.card-details-menu-mobile-web.js-open-card-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
a.fa.fa-link.card-copy-mobile-button.js-copy-link(
id="cardURL_copy"
@ -525,12 +524,11 @@ template(name="cardDetails")
a.fa.fa-times-thin.js-close-inlined-form
else
if currentBoard.allowsDescriptionText
a.js-open-inlined-form(title="{{_ 'edit'}}" value=title)
a.js-open-inlined-form.right(title="{{_ 'edit'}}" value=title)
i.fa.fa-pencil-square-o
a.js-open-inlined-form(title="{{_ 'edit'}}" value=title)
if getDescription
+viewer
= getDescription
if getDescription
+viewer
= getDescription
if (hasUnsavedValue 'cardDescription' _id)
p.quiet
| {{_ 'unsaved-description'}}
@ -549,7 +547,7 @@ template(name="cardDetails")
.card-checklist-attachmentGallery.card-checklists
if currentBoard.allowsChecklists
hr
+checklists(cardId = _id card = this)
+checklists(cardId = _id)
if currentBoard.allowsSubtasks
hr
+subtasks(cardId = _id)
@ -569,34 +567,25 @@ template(name="cardDetails")
+attachmentGallery
hr
unless currentUser.isNoComments
.comment-title
h3.card-details-item-title
i.fa.fa-comment-o
| {{_ 'comments'}}
if currentBoard.allowsComments
if currentUser.isBoardMember
unless currentUser.isNoComments
+commentForm
+comments
hr
.card-details-right
unless currentUser.isNoComments
.activity-title
h3.card-details-item-title
i.fa.fa-history
| {{ _ 'activities'}}
| {{ _ 'activity'}}
if currentUser.isBoardMember
.material-toggle-switch(title="{{_ 'show-activities'}}")
if showActivities
input.toggle-switch(type="checkbox" id="toggleShowActivitiesCard" checked="checked")
.material-toggle-switch(title="{{_ 'hide-system-messages'}}")
//span.toggle-switch-title
if hiddenSystemMessages
input.toggle-switch(type="checkbox" id="toggleButton" checked="checked")
else
input.toggle-switch(type="checkbox" id="toggleShowActivitiesCard")
label.toggle-label(for="toggleShowActivitiesCard")
input.toggle-switch(type="checkbox" id="toggleButton")
label.toggle-label(for="toggleButton")
if currentBoard.allowsComments
if currentUser.isBoardMember
unless currentUser.isNoComments
+commentForm
unless currentUser.isNoComments
if isLoaded.get
if isLinkedCard

View file

@ -63,6 +63,10 @@ BlazeComponent.extendComponent({
return card.findWatcher(Meteor.userId());
},
hiddenSystemMessages() {
return ReactiveCache.getCurrentUser().hasHiddenSystemMessages();
},
customFieldsGrid() {
return ReactiveCache.getCurrentUser().hasCustomFieldsGrid();
},
@ -114,11 +118,6 @@ BlazeComponent.extendComponent({
);
},
isVerticalScrollbars() {
const user = ReactiveCache.getCurrentUser();
return user && user.isVerticalScrollbars();
},
/** returns if the list id is the current list id
* @param listId list id to check
* @return is the list id the current list id ?
@ -378,11 +377,8 @@ BlazeComponent.extendComponent({
Session.set('cardDetailsIsDragging', false);
Session.set('cardDetailsIsMouseDown', false);
},
'click #toggleShowActivitiesCard'() {
this.data().toggleShowActivities();
},
'click #toggleHideCheckedChecklistItems'() {
this.data().toggleHideCheckedChecklistItems();
'click #toggleButton'() {
Meteor.call('toggleSystemMessages');
},
'click #toggleCustomFieldsGridButton'() {
Meteor.call('toggleCustomFieldsGrid');
@ -850,15 +846,13 @@ BlazeComponent.extendComponent({
'click .js-palette-color'() {
this.currentColor.set(this.currentData().color);
},
'click .js-submit'(event) {
event.preventDefault();
'click .js-submit'() {
this.currentCard.setColor(this.currentColor.get());
Popup.back();
Popup.close();
},
'click .js-remove-color'(event) {
event.preventDefault();
'click .js-remove-color'() {
this.currentCard.setColor(null);
Popup.back();
Popup.close();
},
},
];

View file

@ -8,6 +8,20 @@ textarea.js-edit-checklist-item {
resize: none;
height: 34px;
}
.card-details .text-show-at-minicard {
width: 350px;
text-align: left;
}
.minicard .text-show-at-minicard {
display: none;
}
.text-some-space {
width: 20px;
}
.text-hide-checked-items {
width: 400px;
text-align: left;
}
.delete-text,
.js-delete-checklist-item,
.js-convert-checklist-item-to-card {
@ -26,6 +40,8 @@ textarea.js-edit-checklist-item {
display: flex;
justify-content: space-between;
}
.checklist-progress-bar-container {
display: flex;
flex-direction: row;
@ -45,9 +61,6 @@ textarea.js-edit-checklist-item {
border-radius: 16px;
height: 100%;
}
.checklist-title {
padding: 10px;
}
.checklist-title .checkbox {
float: left;
width: 30px;

View file

@ -9,19 +9,10 @@ template(name="checklists")
else
a.add-checklist-top.js-open-inlined-form(title="{{_ 'add-checklist'}}")
i.fa.fa-plus
if currentUser.isBoardMember
.material-toggle-switch(title="{{_ 'hide-finished-checklist'}}")
//span.toggle-switch-title
if card.hideFinishedChecklistIfItemsAreHidden
input.toggle-switch(type="checkbox" id="toggleHideFinishedChecklist" checked="checked")
else
input.toggle-switch(type="checkbox" id="toggleHideFinishedChecklist")
label.toggle-label(for="toggleHideFinishedChecklist")
.card-checklist-items
each checklist in checklists
if checklist.showChecklist card.hideFinishedChecklistIfItemsAreHidden
+checklistDetail(checklist = checklist card = card)
+checklistDetail(checklist=checklist)
if canModifyCard
+inlinedForm(autoclose=false classNames="js-add-checklist" cardId = cardId)
@ -31,7 +22,7 @@ template(name="checklists")
i.fa.fa-plus
template(name="checklistDetail")
.js-checklist.checklist.nodragscroll
.js-checklist.checklist
+inlinedForm(classNames="js-edit-checklist-title" checklist = checklist)
+editChecklistItemForm(checklist = checklist)
else
@ -56,7 +47,7 @@ template(name="checklistDetail")
.checklist-progress-text {{finishedPercent}}%
.checklist-progress-bar
.checklist-progress(style="width:{{finishedPercent}}%")
+checklistItems(checklist = checklist card = card)
+checklistItems(checklist = checklist)
template(name="checklistDeletePopup")
p {{_ 'confirm-checklist-delete-popup'}}
@ -73,12 +64,6 @@ template(name="addChecklistItemForm")
.material-toggle-switch(title="{{_ 'newlineBecomesNewChecklistItem'}}")
input.toggle-switch(type="checkbox" id="toggleNewlineBecomesNewChecklistItem")
label.toggle-label(for="toggleNewlineBecomesNewChecklistItem")
| {{_ 'newLineNewItem'}}
if $eq position 'top'
.material-toggle-switch(title="{{_ 'newlineBecomesNewChecklistItemOriginOrder'}}")
input.toggle-switch(type="checkbox" id="toggleNewlineBecomesNewChecklistItemOriginOrder")
label.toggle-label(for="toggleNewlineBecomesNewChecklistItemOriginOrder")
| {{_ 'originOrder'}}
template(name="editChecklistItemForm")
a.fa.fa-copy(title="{{_ 'copy-text-to-clipboard'}}")
@ -102,7 +87,7 @@ template(name="checklistItems")
if checklist.items.length
if canModifyCard
+inlinedForm(autoclose=false classNames="js-add-checklist-item" checklist = checklist position="top")
+addChecklistItemForm(checklist=checklist showNewlineBecomesNewChecklistItem=true position="top")
+addChecklistItemForm(checklist=checklist showNewlineBecomesNewChecklistItem=true)
else
a.add-checklist-item.js-open-inlined-form(title="{{_ 'add-checklist-item'}}")
i.fa.fa-plus
@ -111,7 +96,7 @@ template(name="checklistItems")
+inlinedForm(classNames="js-edit-checklist-item" item = item checklist = checklist)
+editChecklistItemForm(type = 'item' item = item checklist = checklist)
else
+checklistItemDetail(item = item checklist = checklist card = card)
+checklistItemDetail(item = item checklist = checklist)
if canModifyCard
+inlinedForm(autoclose=false classNames="js-add-checklist-item" checklist = checklist)
+addChecklistItemForm(checklist=checklist showNewlineBecomesNewChecklistItem=true)
@ -120,7 +105,7 @@ template(name="checklistItems")
i.fa.fa-plus
template(name='checklistItemDetail')
.js-checklist-item.checklist-item(class="{{#if item.isFinished }}is-checked{{#if checklist.hideCheckedChecklistItems}} invisible{{/if}}{{/if}}{{#if checklist.hideAllChecklistItems}} is-checked invisible{{/if}}"
.js-checklist-item.checklist-item(class="{{#if item.isFinished }}is-checked{{#if hideCheckedItems}} invisible{{/if}}{{/if}}"
role="checkbox" aria-checked="{{#if item.isFinished }}true{{else}}false{{/if}}" tabindex="0")
if canModifyCard
.check-box-container
@ -137,6 +122,27 @@ template(name='checklistItemDetail')
= item.title
template(name="checklistActionsPopup")
if currentUser.isBoardMember
span.text-show-at-minicard
| {{_ 'show-at-minicard'}}
.material-toggle-switch(title="{{_ 'show-checklist-at-minicard'}}")
if showAtMinicard
input.toggle-switch(type="checkbox" id="toggleShowChecklistAtMinicardButton" checked="checked")
else
input.toggle-switch(type="checkbox" id="toggleShowChecklistAtMinicardButton")
label.toggle-label(for="toggleShowChecklistAtMinicardButton")
hr
span.text-hide-checked-items
| {{_ 'hide-checked-items'}}
.material-toggle-switch(title="{{_ 'hide-checked-items'}}")
//span.toggle-switch-title
//.check-square-icon.i.fa.fa-check-square-o
if hideCheckedItems
input.toggle-switch(type="checkbox" id="toggleHideCheckedItemsButton" checked="checked")
else
input.toggle-switch(type="checkbox" id="toggleHideCheckedItemsButton")
label.toggle-label(for="toggleHideCheckedItemsButton")
hr
ul.pop-over-list
li
a.js-delete-checklist.delete-checklist
@ -148,24 +154,6 @@ template(name="checklistActionsPopup")
a.js-copy-checklist.copy-checklist
i.fa.fa-copy
| {{_ "copyChecklist"}} ...
a.js-hide-checked-checklist-items
i.fa.fa-eye-slash
| {{_ "hideCheckedChecklistItems"}} ...
.material-toggle-switch(title="{{_ 'hide-checked-items'}}")
if checklist.hideCheckedChecklistItems
input.toggle-switch(type="checkbox" id="toggleHideCheckedChecklistItems_{{checklist._id}}" checked="checked")
else
input.toggle-switch(type="checkbox" id="toggleHideCheckedChecklistItems_{{checklist._id}}")
label.toggle-label(for="toggleHideCheckedChecklistItems_{{checklist._id}}")
a.js-hide-all-checklist-items
i.fa.fa-ban
| {{_ "hideAllChecklistItems"}} ...
.material-toggle-switch(title="{{_ 'hideAllChecklistItems'}}")
if checklist.hideAllChecklistItems
input.toggle-switch(type="checkbox" id="toggleHideAllChecklistItems_{{checklist._id}}" checked="checked")
else
input.toggle-switch(type="checkbox" id="toggleHideAllChecklistItems_{{checklist._id}}")
label.toggle-label(for="toggleHideAllChecklistItems_{{checklist._id}}")
template(name="copyChecklistPopup")
+copyAndMoveChecklist

View file

@ -119,7 +119,6 @@ BlazeComponent.extendComponent({
event.preventDefault();
const textarea = this.find('textarea.js-add-checklist-item');
const newlineBecomesNewChecklistItem = this.find('input#toggleNewlineBecomesNewChecklistItem');
const newlineBecomesNewChecklistItemOriginOrder = this.find('input#toggleNewlineBecomesNewChecklistItemOriginOrder');
const title = textarea.value.trim();
const checklist = this.currentData().checklist;
@ -128,28 +127,22 @@ BlazeComponent.extendComponent({
if (newlineBecomesNewChecklistItem.checked) {
checklistItems = title.split('\n').map(_value => _value.trim());
if (this.currentData().position === 'top') {
if (newlineBecomesNewChecklistItemOriginOrder.checked === false) {
checklistItems = checklistItems.reverse();
}
checklistItems = checklistItems.reverse();
}
}
let addIndex;
let sortIndex;
if (this.currentData().position === 'top') {
sortIndex = Utils.calculateIndexData(null, checklist.firstItem()).base;
addIndex = -1;
} else {
sortIndex = Utils.calculateIndexData(checklist.lastItem(), null).base;
addIndex = 1;
}
for (let checklistItem of checklistItems) {
let sortIndex;
if (this.currentData().position === 'top') {
sortIndex = Utils.calculateIndexData(null, checklist.firstItem()).base;
} else {
sortIndex = Utils.calculateIndexData(checklist.lastItem(), null).base;
}
ChecklistItems.insert({
title: checklistItem,
checklistId: checklist._id,
cardId: checklist.cardId,
sort: sortIndex,
});
sortIndex += addIndex;
}
}
// We keep the form opened, empty it.
@ -208,8 +201,12 @@ BlazeComponent.extendComponent({
},
events() {
const events = {
};
return [
{
...events,
'click .js-open-checklist-details-menu': Popup.open('checklistActions'),
'submit .js-add-checklist': this.addChecklist,
'submit .js-edit-checklist-title': this.editChecklist,
@ -220,10 +217,6 @@ BlazeComponent.extendComponent({
'focus .js-add-checklist-item': this.focusChecklistItem,
// add and delete checklist / checklist-item
'click .js-open-inlined-form': this.closeAllInlinedForms,
'click #toggleHideFinishedChecklist'(event) {
event.preventDefault();
this.data().card.toggleHideFinishedChecklist();
},
keydown: this.pressKey,
},
];
@ -278,6 +271,16 @@ Template.checklists.helpers({
const ret = card.checklists();
return ret;
},
showAtMinicard() {
const card = ReactiveCache.getCard(this.cardId);
const ret = card.checklists({'showAtMinicard':1});
return ret;
},
hideCheckedItems() {
const currentUser = ReactiveCache.getCurrentUser();
if (currentUser) return currentUser.hasHideCheckedItems();
return false;
},
});
BlazeComponent.extendComponent({
@ -300,9 +303,26 @@ BlazeComponent.extendComponent({
}).register('addChecklistItemForm');
BlazeComponent.extendComponent({
toggleItem() {
const checklist = this.currentData().checklist;
const item = this.currentData().item;
if (checklist && item && item._id) {
item.toggleItem();
}
},
events() {
return [
{
'click .js-checklist-item .check-box-container': this.toggleItem,
'click #toggleShowChecklistAtMinicardButton'() {
const checklist = this.checklist;
if (checklist && checklist._id) {
Meteor.call('toggleShowChecklistAtMinicard', checklist._id);
}
},
'click #toggleHideCheckedItemsButton'() {
Meteor.call('toggleHideCheckedItems');
},
'click .js-delete-checklist': Popup.afterConfirm('checklistDelete', function () {
Popup.back(2);
const checklist = this.checklist;
@ -312,16 +332,6 @@ BlazeComponent.extendComponent({
}),
'click .js-move-checklist': Popup.open('moveChecklist'),
'click .js-copy-checklist': Popup.open('copyChecklist'),
'click .js-hide-checked-checklist-items'(event) {
event.preventDefault();
this.data().checklist.toggleHideCheckedChecklistItems();
Popup.back();
},
'click .js-hide-all-checklist-items'(event) {
event.preventDefault();
this.data().checklist.toggleHideAllChecklistItems();
Popup.back();
},
}
]
}
@ -347,6 +357,11 @@ BlazeComponent.extendComponent({
}).register('editChecklistItemForm');
Template.checklistItemDetail.helpers({
hideCheckedItems() {
const user = ReactiveCache.getCurrentUser();
if (user) return user.hasHideCheckedItems();
return false;
},
});
BlazeComponent.extendComponent({

View file

@ -37,4 +37,5 @@ template(name="cardLabelsPopup")
= name
if(isLabelSelected ../_id)
i.card-label-selectable-icon.fa.fa-check
a.quiet-button.full.js-add-label {{_ 'label-create'}}
if currentUser.isBoardAdmin
a.quiet-button.full.js-add-label {{_ 'label-create'}}

View file

@ -1,3 +1,12 @@
.minicard .checklists-title,
.minicard .add-checklist,
.minicard .add-checklist-item,
.minicard .checklist-details-menu {
display: none;
}
.minicard .checklist-progress-bar-container {
width: 190px; /* TODO: Add adjustable width https://github.com/wekan/wekan/pull/4964 */
}
.minicard-wrapper {
cursor: pointer;
position: relative;
@ -47,12 +56,10 @@
float: right;
font-size: 18px;
padding-right: 30px;
padding-left: 5px;
}
.minicard-details-menu {
float: right;
font-size: 18px;
padding-left: 5px;
}
@media print {
.minicard-details-menu,
@ -92,7 +99,7 @@
background-size: contain;
height: 145px;
user-select: none;
margin: 6px -8px 6px -8px;
margin: -6px -8px 6px -8px;
border-radius: top 2px;
}
.minicard .minicard-labels {
@ -129,6 +136,14 @@
max-width: 100%;
margin-right: 4px;
}
/*
.minicard .checklists-title,
.minicard .add-checklist,
.minicard .add-checklist-item,
.minicard .checklist-details-menu {
display: none;
}
*/
.minicard .handle {
width: 20px;
height: 20px;
@ -158,6 +173,7 @@
.minicard .minicard-title .viewer {
display: block;
word-wrap: break-word;
max-width: 230px;
}
}
.minicard .dates {

View file

@ -1,15 +1,14 @@
template(name="minicard")
.minicard.nodragscroll(
.minicard(
class="{{#if isLinkedCard}}linked-card{{/if}}"
class="{{#if isLinkedBoard}}linked-board{{/if}}"
class="{{#if colorClass}}minicard-{{colorClass}}{{/if}}")
if canModifyCard
if isTouchScreenOrShowDesktopDragHandles
a.fa.fa-navicon.minicard-details-menu-with-handle.js-open-minicard-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
.handle
.fa.fa-arrows
else
a.fa.fa-navicon.minicard-details-menu.js-open-minicard-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
if isTouchScreenOrShowDesktopDragHandles
a.fa.fa-navicon.minicard-details-menu-with-handle.js-open-minicard-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
.handle
.fa.fa-arrows
else
a.fa.fa-navicon.minicard-details-menu.js-open-minicard-details-menu(title="{{_ 'cardDetailsActionsPopup-title'}}")
.dates
if getReceived
unless getStart
@ -112,6 +111,12 @@ template(name="minicard")
+viewer
= trueValue
.card-checklist-attachmentGalleries
.card-checklist-attachmentGallery.card-checklists
if currentBoard.allowsChecklists
//hr
//+checklists(cardId=_id showAtMinicard=true)
if showAssignee
if getAssignees
.minicard-assignees.js-minicard-assignees
@ -124,12 +129,12 @@ template(name="minicard")
each getMembers
+userAvatar(userId=this)
if showCreatorOnMinicard
if showCreator
.minicard-creator
+userAvatar(userId=this.userId noRemove=true)
.badges
if canModifyCard
unless currentUser.isNoComments
if comments.length
.badge(title="{{_ 'card-comments-title' comments.length }}")
span.badge-icon.fa.fa-comment-o.badge-comment.badge-text
@ -184,11 +189,12 @@ template(name="editCardSortOrderPopup")
template(name="minicardDetailsActionsPopup")
ul.pop-over-list
if canModifyCard
if currentUser.isBoardAdmin
li
a.js-move-card
i.fa.fa-arrow-right
| {{_ 'moveCardPopup-title'}}
unless currentUser.isWorker
li
a.js-copy-card
i.fa.fa-copy

View file

@ -37,12 +37,16 @@ BlazeComponent.extendComponent({
return ret;
},
showCreatorOnMinicard() {
showCreator() {
// cache "board" to reduce the mini-mongodb access
const board = this.data().board();
let ret = false;
if (board) {
ret = board.allowsCreatorOnMinicard ?? false;
ret =
board.allowsCreator === null ||
board.allowsCreator === undefined ||
board.allowsCreator
;
}
return ret;
},
@ -88,6 +92,11 @@ BlazeComponent.extendComponent({
events() {
return [
{
'click .minicard-checklists'() {
// Prevents clicking checklist at minicard from opening card details,
// while still allowing checking checlist items.
event.preventDefault();
},
'click .js-linked-link'() {
if (this.data().isLinkedCard()) Utils.goCardId(this.data().linkedId);
else if (this.data().isLinkedBoard())

View file

@ -7,16 +7,18 @@
border-left: 1px solid #ccc;
padding: 0;
float: left;
}
[id^="swimlane-"] .list:first-child {
min-width: 20px;
}
.list.list-auto-width {
flex: 1;
min-width: 100px; /* TODO(mark-i-m): hardcoded? */
/*max-width: 270px;*/
/* Reverted incomplete change list width: */
/* https://github.com/wekan/wekan/issues/4558 */
/* Orinal width: 270px. Changes not saved yet: */
/*resize: both; - List width and height resizeable */
/* overflow: auto; - List width and height resizeable */
}
.list:first-child {
min-width: 20px;
margin-left: 5px;
border-left: none;
flex: none;
}
.card-details + .list {
border-left: none;
@ -35,9 +37,6 @@
box-shadow: none;
height: 100px;
}
.list.list-collapsed {
flex: none;
}
.list.list-composer .open-list-composer,
.list .list-composer .open-list-composer {
color: #8c8c8c;
@ -49,7 +48,7 @@
}
.list-header-add {
flex: 0 0 auto;
padding: 12px;
padding: 20px 12px 4px;
position: relative;
min-height: 20px;
}
@ -82,20 +81,6 @@
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
}
.list-rotated {
width: 10px;
height: 250px;
margin-top: -90px;
margin-left: -110px;
margin-right: 0;
transform: rotate(90deg);
position: relative;
text-overflow: ellipsis;
white-space: nowrap;
}
.list-header .list-rotated {
}
.list-header .list-header-watch-icon {
padding-left: 10px;
@ -114,23 +99,6 @@
color: #a6a6a6;
margin-right: 15px;
}
.list-header .list-header-collapse-right {
color: #a6a6a6;
}
.list-header .list-header-collapse-left {
color: #a6a6a6;
margin-right: 15px;
}
.list-header .list-header-uncollapse-left {
color: #a6a6a6;
}
.list-header .list-header-uncollapse-right {
color: #a6a6a6;
}
.list-header .list-header-collapse {
color: #a6a6a6;
margin-right: 15px;
}
.list-header .highlight {
color: #ce1414;
}
@ -252,11 +220,11 @@
padding: 15px 19px;
}
.list-header {
/*Updated padding values for mobile devices, this should fix text grouping issue*/
padding: 20px 0px 20px 0px;
padding: 0 12px 0px;
border-bottom: 0px solid #e4e4e4;
min-height: 30px;
height: 60px;
margin-top: 10px;
display: flex;
align-items: center;
}
.list-header .list-header-left-icon {
@ -329,6 +297,7 @@
}
.list-header-white {
border-bottom: 6px solid #fff;
border: 1px solid #eee;
}
.list-header-green {
border-bottom: 6px solid #3cb500;
@ -361,7 +330,7 @@
border-bottom: 6px solid #51e898;
}
.list-header-silver {
border-bottom: 6px solid #e4e4e4;
border-bottom: 6px solid unset;
}
.list-header-peachpuff {
border-bottom: 6px solid #ffdab9;

View file

@ -1,7 +1,6 @@
template(name='list')
.list.js-list(id="js-list-{{_id}}"
style="{{#unless collapsed}}min-width:{{listWidth}}px;max-width:{{listConstraint}}px;{{/unless}}"
class="{{#if collapsed}}list-collapsed{{/if}} {{#if autoWidth}}list-auto-width{{/if}}")
style="width:{{listWidth}}px;")
+listHeader
+listBody

View file

@ -196,22 +196,10 @@ BlazeComponent.extendComponent({
},
listWidth() {
const user = ReactiveCache.getCurrentUser();
const user = Meteor.user();
const list = Template.currentData();
return user.getListWidth(list.boardId, list._id);
},
listConstraint() {
const user = ReactiveCache.getCurrentUser();
const list = Template.currentData();
return user.getListConstraint(list.boardId, list._id);
},
autoWidth() {
const user = ReactiveCache.getCurrentUser();
const list = Template.currentData();
return user.isAutoWidth(list.boardId);
},
}).register('list');
Template.miniList.events({

View file

@ -1,38 +1,37 @@
template(name="listBody")
unless collapsed
.list-body(class="{{#unless isVerticalScrollbars}}no-scrollbars{{/unless}}")
.minicards.clearfix.js-minicards(class="{{#if reachedWipLimit}}js-list-full{{/if}}")
if cards.length
+inlinedForm(autoclose=false position="top")
+addCardForm(listId=_id position="top")
ul.sidebar-list
each customFieldsSum
li
.list-body
.minicards.clearfix.js-minicards(class="{{#if reachedWipLimit}}js-list-full{{/if}}")
if cards.length
+inlinedForm(autoclose=false position="top")
+addCardForm(listId=_id position="top")
ul.sidebar-list
each customFieldsSum
li
+viewer
= name
if $eq customFieldsSum.type "number"
+viewer
= name
if $eq customFieldsSum.type "number"
+viewer
= value
if $eq customFieldsSum.type "currency"
+viewer
= formattedCurrencyCustomFieldValue(value)
each (cardsWithLimit (idOrNull ../../_id))
a.minicard-wrapper.js-minicard(href=originRelativeUrl
class="{{#if cardIsSelected}}is-selected{{/if}}"
class="{{#if MultiSelection.isSelected _id}}is-checked{{/if}}")
if MultiSelection.isActive
.materialCheckBox.multi-selection-checkbox.js-toggle-multi-selection(
class="{{#if MultiSelection.isSelected _id}}is-checked{{/if}}")
+minicard(this)
if (showSpinner (idOrNull ../../_id))
+spinnerList
= value
if $eq customFieldsSum.type "currency"
+viewer
= formattedCurrencyCustomFieldValue(value)
each (cardsWithLimit (idOrNull ../../_id))
a.minicard-wrapper.js-minicard(href=originRelativeUrl
class="{{#if cardIsSelected}}is-selected{{/if}}"
class="{{#if MultiSelection.isSelected _id}}is-checked{{/if}}")
if MultiSelection.isActive
.materialCheckBox.multi-selection-checkbox.js-toggle-multi-selection(
class="{{#if MultiSelection.isSelected _id}}is-checked{{/if}}")
+minicard(this)
if (showSpinner (idOrNull ../../_id))
+spinnerList
if canSeeAddCard
+inlinedForm(autoclose=false position="bottom")
+addCardForm(listId=_id position="bottom")
else
a.open-minicard-composer.js-card-composer.js-open-inlined-form(title="{{_ 'add-card-to-bottom-of-list'}}")
i.fa.fa-plus
if canSeeAddCard
+inlinedForm(autoclose=false position="bottom")
+addCardForm(listId=_id position="bottom")
else
a.open-minicard-composer.js-card-composer.js-open-inlined-form(title="{{_ 'add-card-to-bottom-of-list'}}")
i.fa.fa-plus
template(name="spinnerList")
.sk-spinner.sk-spinner-list(

View file

@ -231,11 +231,6 @@ BlazeComponent.extendComponent({
);
},
isVerticalScrollbars() {
const user = ReactiveCache.getCurrentUser();
return user && user.isVerticalScrollbars();
},
cardDetailsPopup(event) {
if (!Popup.isOpen()) {
Popup.open("cardDetails")(event);

View file

@ -1,5 +1,5 @@
template(name="listHeader")
.list-header.js-list-header.nodragscroll(
.list-header.js-list-header(
class="{{#if limitToShowCardsCount}}list-header-card-count{{/if}}"
class=colorClass)
+inlinedForm
@ -8,40 +8,19 @@ template(name="listHeader")
if isMiniScreen
if currentList
a.list-header-left-icon.fa.fa-angle-left.js-unselect-list
else
if collapsed
a.js-collapse(title="{{_ 'uncollapse'}}")
i.fa.fa-arrow-left.list-header-uncollapse-left
i.fa.fa-arrow-right.list-header-uncollapse-right
if showCardsCountForList cards.length
br
span.cardCount {{cardsCount}}
if isMiniScreen
h2.list-header-name(
title="{{ moment modifiedAt 'LLL' }}"
class="{{#if currentUser.isBoardMember}}{{#unless currentUser.isCommentOnly}}{{#unless currentUser.isWorker}}js-open-inlined-form is-editable{{/unless}}{{/unless}}{{/if}}")
+viewer
= title
if wipLimit.enabled
|&nbsp;(
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
|/#{wipLimit.value})
if showCardsCountForList cards.length
span.cardCount {{cardsCount}} {{cardsCountForListIsOne cards.length}}
else
div(class="{{#if collapsed}}list-rotated{{/if}}")
h2.list-header-name(
title="{{ moment modifiedAt 'LLL' }}"
class="{{#if currentUser.isBoardMember}}{{#unless currentUser.isCommentOnly}}{{#unless currentUser.isWorker}}js-open-inlined-form is-editable{{/unless}}{{/unless}}{{/if}}")
+viewer
= title
if wipLimit.enabled
|&nbsp;(
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
|/#{wipLimit.value})
unless collapsed
if showCardsCountForList cards.length
span.cardCount {{cardsCount}} {{cardsCountForListIsOne cards.length}}
h2.list-header-name(
title="{{ moment modifiedAt 'LLL' }}"
class="{{#if currentUser.isBoardMember}}{{#unless currentUser.isCommentOnly}}{{#unless currentUser.isWorker}}js-open-inlined-form is-editable{{/unless}}{{/unless}}{{/if}}")
+viewer
= title
if wipLimit.enabled
|&nbsp;(
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
|/#{wipLimit.value})
if showCardsCountForList cards.length
span.cardCount {{cardsCount}} {{cardsCountForListIsOne cards.length}}
if isMiniScreen
if currentList
if isWatching
@ -57,20 +36,16 @@ template(name="listHeader")
else if currentUser.isBoardMember
if isWatching
i.list-header-watch-icon.fa.fa-eye
unless collapsed
div.list-header-menu
unless currentUser.isCommentOnly
//if isBoardAdmin
// a.fa.js-list-star.list-header-plus-top(class="fa-star{{#unless starred}}-o{{/unless}}")
if canSeeAddCard
a.js-add-card.fa.fa-plus.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}")
a.js-collapse(title="{{_ 'collapse'}}")
i.fa.fa-arrow-right.list-header-collapse-right
i.fa.fa-arrow-left.list-header-collapse-left
a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
if currentUser.isBoardAdmin
if isTouchScreenOrShowDesktopDragHandles
a.list-header-handle.handle.fa.fa-arrows.js-list-handle
div.list-header-menu
unless currentUser.isCommentOnly
//if isBoardAdmin
// a.fa.js-list-star.list-header-plus-top(class="fa-star{{#unless starred}}-o{{/unless}}")
if canSeeAddCard
a.js-add-card.fa.fa-plus.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}")
a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")
if currentUser.isBoardAdmin
if isTouchScreenOrShowDesktopDragHandles
a.list-header-handle.handle.fa.fa-arrows.js-list-handle
template(name="editListTitleForm")
.list-composer
@ -191,14 +166,8 @@ template(name="setListWidthPopup")
label {{_ 'set-list-width-value'}}
p
input.list-width-value(type="number" value="{{ listWidthValue }}" min="100")
input.list-constraint-value(type="number" value="{{ listConstraintValue }}" min="100")
input.list-width-apply(type="submit" value="{{_ 'apply'}}")
input.list-width-error
br
a.js-auto-width-board(
title="{{#if isAutoWidth}}{{_ 'click-to-disable-auto-width'}}{{else}}{{_ 'click-to-enable-auto-width'}}{{/if}}")
i.fa(class="fa-solid fa-{{#if isAutoWidth}}compress{{else}}expand{{/if}}")
span {{_ 'auto-list-width'}}
template(name="listWidthErrorPopup")
.list-width-invalid

View file

@ -1,6 +1,5 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
import dragscroll from '@wekanteam/dragscroll';
let listsColors;
Meteor.startup(() => {
@ -32,17 +31,6 @@ BlazeComponent.extendComponent({
return !status;
}
},
collapsed(check = undefined) {
const list = Template.currentData();
const status = list.isCollapsed();
if (check === undefined) {
// just check
return status;
} else {
list.collapse(!status);
return !status;
}
},
editTitle(event) {
event.preventDefault();
const newTitle = this.childComponents('inlinedForm')[0]
@ -116,10 +104,6 @@ BlazeComponent.extendComponent({
event.preventDefault();
this.starred(!this.starred());
},
'click .js-collapse'(event) {
event.preventDefault();
this.collapsed(!this.collapsed());
},
'click .js-open-list-menu': Popup.open('listAction'),
'click .js-add-card.list-header-plus-top'(event) {
const listDom = $(event.target).parents(
@ -156,7 +140,7 @@ Template.listActionPopup.helpers({
isWatching() {
return this.findWatcher(Meteor.userId());
}
},
});
Template.listActionPopup.events({
@ -348,20 +332,14 @@ BlazeComponent.extendComponent({
.val(),
10,
);
const constraint = parseInt(
Template.instance()
.$('.list-constraint-value')
.val(),
10,
);
// FIXME(mark-i-m): where do we put constants?
if (width < 100 || !width || constraint < 100 || !constraint) {
if (width < 100 || !width) {
Template.instance()
.$('.list-width-error')
.click();
} else {
Meteor.call('applyListWidth', board, list._id, width, constraint);
Meteor.call('applyListWidth', board, list._id, width);
Popup.back();
}
},
@ -369,28 +347,12 @@ BlazeComponent.extendComponent({
listWidthValue() {
const list = Template.currentData();
const board = list.boardId;
return ReactiveCache.getCurrentUser().getListWidth(board, list._id);
},
listConstraintValue() {
const list = Template.currentData();
const board = list.boardId;
return ReactiveCache.getCurrentUser().getListConstraint(board, list._id);
},
isAutoWidth() {
const boardId = Utils.getCurrentBoardId();
const user = ReactiveCache.getCurrentUser();
return user && user.isAutoWidth(boardId);
return Meteor.user().getListWidth(board, list._id);
},
events() {
return [
{
'click .js-auto-width-board'() {
dragscroll.reset();
ReactiveCache.getCurrentUser().toggleAutoWidth(Utils.getCurrentBoardId());
},
'click .list-width-apply': this.applyListWidth,
'click .list-width-error': Popup.open('listWidthError'),
},

View file

@ -1,74 +0,0 @@
.my-cards-board-wrapper {
border-radius: 0 0 4px 4px;
min-width: 400px;
margin-bottom: 2rem;
margin-right: auto;
margin-left: auto;
border-width: 2px;
border-style: solid;
border-color: #a2a2a2;
}
.my-cards-board-title {
font-size: 1.4rem;
font-weight: bold;
padding: 0.5rem;
background-color: #808080;
color: #fff;
}
.my-cards-swimlane-title {
font-size: 1.1rem;
font-weight: bold;
padding: 0.5rem;
padding-bottom: 0.4rem;
margin-top: 0;
margin-bottom: 0.5rem;
text-align: center;
}
.swimlane-default-color {
background-color: #d3d3d3;
}
.my-cards-list-title {
font-weight: bold;
font-size: 1.1rem;
text-align: center;
margin-bottom: 0.7rem;
}
.my-cards-list-wrapper {
margin: 1rem;
border-radius: 5px;
display: inline-grid;
min-width: 250px;
max-width: 350px;
}
.my-cards-card-wrapper {
margin-top: 0;
margin-bottom: 10px;
}
.my-cards-dueat-list-wrapper {
max-width: 500px;
margin-right: auto;
margin-left: auto;
}
.my-cards-board-table thead {
border-bottom: 3px solid #4d4d4d;
background-color: transparent;
}
.my-cards-board-table th,
.my-cards-board-table td {
border: 0;
}
.my-cards-board-table tr {
border-bottom: 2px solid #a2a2a2;
}
.my-cards-card-title-table {
font-weight: bold;
padding-left: 2px;
max-width: 243px;
}
.my-cards-board-badge {
width: 36px;
height: 24px;
float: left;
border-radius: 5px;
margin-right: 5px;
}

View file

@ -1,8 +0,0 @@
template(name="accessibilityHeaderBar")
if currentUser
h1
| {{_ 'accessibility-title'}}
template(name="accessibility")
if currentUser
| {{_ 'accessibility-content'}}

View file

@ -1,11 +0,0 @@
import { ReactiveCache } from '/imports/reactiveCache';
import { TAPi18n } from '/imports/i18n';
BlazeComponent.extendComponent({
onCreated() {
this.error = new ReactiveVar('');
this.loading = new ReactiveVar(false);
Meteor.subscribe('setting');
},
}).register('accessibility');

View file

@ -1,16 +1,16 @@
.new-comment a.fa.fa-brands.fa-markdown,
.inlined-form a.fa.fa-brands.fa-markdown {
float: right;
position: absolute;
top: -10px;
right: 60px;
position: relative;
top: 20px;
right: 56px;
}
.new-comment a.fa.fa-copy,
.inlined-form a.fa.fa-copy {
float: right;
position: relative;
top: -10px;
right: 5px;
top: 20px;
right: 6px;
}
.js-inlined-form.viewer.btn-sm {
position: absolute;

View file

@ -446,12 +446,6 @@ a:not(.disabled).is-active i.fa {
padding: 0;
padding-top: 15px;
}
.no-scrollbars {
scrollbar-width: none;
}
.no-scrollbars::-webkit-scrollbar {
display: none !important;
}
@media screen and (max-width: 800px) {
#content {
margin: 1px 0px 0px 0px;
@ -476,7 +470,6 @@ a:not(.disabled).is-active i.fa {
.select-authentication {
width: 100%;
}
.textBelowCustomLoginLogo,
.auth-layout {
display: flex;
flex-direction: column;

View file

@ -37,13 +37,10 @@ template(name="userFormsLayout")
else
img(src="{{pathFor '/wekan-logo.svg'}}" alt="" width="300" height="auto")
br
if currentSetting.textBelowCustomLoginLogo
hr
section.textBelowCustomLoginLogo
+viewer
| {{currentSetting.textBelowCustomLoginLogo}}
hr
section.auth-layout
if currentSetting.textBelowCustomLoginLogo
+viewer
| {{currentSetting.textBelowCustomLoginLogo}}
br
section.auth-dialog
if isLoading
+loader

View file

@ -58,20 +58,18 @@ template(name="rulesReport")
h1 {{_ 'rulesReportTitle'}}
if resultsCount
table
thead
tr
th Rule Title
th Board Title
th actionType
th activityType
tr
th Rule Title
th Board Title
th actionType
th activityType
each rule in results
tbody
tr
td {{ rule.title }}
td {{ rule.boardTitle }}
td {{ rule.action.actionType }}
td {{ rule.trigger.activityType }}
tr
td {{ rule.title }}
td {{ rule.boardTitle }}
td {{ rule.action.actionType }}
td {{ rule.trigger.activityType }}
else
div {{_ 'no-results' }}
@ -79,24 +77,22 @@ template(name="filesReport")
h1 {{_ 'filesReportTitle'}}
if resultsCount
table
thead
tr
th Filename
th.right Size (kB)
th MIME Type
th Attachment ID
th Board ID
th Card ID
tr
th Filename
th.right Size (kB)
th MIME Type
th Attachment ID
th Board ID
th Card ID
each att in results
tbody
tr
td {{ att.name }}
td.right {{ fileSize att.size }}
td {{ att.type }}
td {{ att._id }}
td {{ att.meta.boardId }}
td {{ att.meta.cardId }}
tr
td {{ att.name }}
td.right {{ fileSize att.size }}
td {{ att.type }}
td {{ att._id }}
td {{ att.meta.boardId }}
td {{ att.meta.cardId }}
else
div {{_ 'no-results' }}
@ -104,24 +100,22 @@ template(name="cardsReport")
h1 {{_ 'cardsReportTitle'}}
if resultsCount
table.table
thead
tr
th Card Title
th Board
th Swimlane
th List
th Members
th Assignees
tr
th Card Title
th Board
th Swimlane
th List
th Members
th Assignees
each card in results
tbody
tr
td {{abbreviate card.title }}
td {{abbreviate card.board.title }}
td {{abbreviate card.swimlane.title }}
td {{abbreviate card.list.title }}
td {{userNames card.members }}
td {{userNames card.assignees }}
tr
td {{abbreviate card.title }}
td {{abbreviate card.board.title }}
td {{abbreviate card.swimlane.title }}
td {{abbreviate card.list.title }}
td {{userNames card.members }}
td {{userNames card.assignees }}
else
div {{_ 'no-results' }}
@ -129,25 +123,22 @@ template(name="boardsReport")
h1 {{_ 'boardsReportTitle'}}
if resultsCount
table.table
thead
tr
th Title
th Id
th Permission
th Archived?
th Members
th Organizations
th Teams
tr
th Title
th Id
th Permission
th Archived?
th Members
th Organizations
th Teams
each board in results
tbody
tr
td {{abbreviate board.title }}
td {{abbreviate board._id }}
td {{ board.permission }}
td
= yesOrNo(board.archived)
td {{userNames board.members }}
td {{orgs board.orgs }}
td {{teams board.teams }}
tr
td {{abbreviate board.title }}
td {{abbreviate board._id }}
td {{ board.permission }}
td
= yesOrNo(board.archived)
td {{userNames board.members }}
else
div {{_ 'no-results' }}

View file

@ -170,27 +170,8 @@ class AdminReport extends BlazeComponent {
.join(", ");
return ret;
}
teams(memberTeams) {
const ret = (memberTeams || [])
.map(_memberTeam => {
const _ret = ReactiveCache.getTeam(_memberTeam.teamId)?.teamDisplayName || _memberTeam.teamId;
return _ret;
})
.join(", ");
return ret;
}
orgs(orgs) {
const ret = (orgs || [])
.map(_orgs => {
const _ret = ReactiveCache.getOrg(_orgs.orgId)?.orgDisplayName || _orgs.orgId;
return _ret;
})
.join(", ");
return ret;
}
}.register('boardsReport'));
(class extends AdminReport {
collection = Cards;

View file

@ -73,7 +73,7 @@ template(name="people")
template(name="orgGeneral")
table
thead
tbody
tr
th {{_ 'displayName'}}
th {{_ 'description'}}
@ -84,14 +84,12 @@ template(name="orgGeneral")
th {{_ 'active'}}
th
+newOrgRow
tbody
tr
each org in orgList
+orgRow(orgId=org._id)
template(name="teamGeneral")
table
thead
tbody
tr
th {{_ 'displayName'}}
th {{_ 'description'}}
@ -101,8 +99,6 @@ template(name="teamGeneral")
th {{_ 'active'}}
th
+newTeamRow
tbody
tr
each team in teamList
+teamRow(teamId=team._id)
@ -110,7 +106,7 @@ template(name="peopleGeneral")
#divAddOrRemoveTeamContainer
+modifyTeamsUsers
table
thead
tbody
tr
th
+selectAllUser
@ -128,8 +124,6 @@ template(name="peopleGeneral")
th {{_ 'teams'}}
th
+newUserRow
tbody
tr
each user in peopleList
+peopleRow(userId=user._id)
@ -500,9 +494,9 @@ template(name="modifyTeamsUsers")
| {{_ 'r-action'}}
.form-group.flex
input.wekan-form-control#addAction(type="radio" name="action" value="true" checked="checked")
label(for=addAction) {{_ 'add'}}
span {{_ 'add'}}
input.wekan-form-control#deleteAction(type="radio" name="action" value="false")
label(for=deleteAction) {{_ 'delete'}}
span {{_ 'delete'}}
div.buttonsContainer
input.primary.wide#addTeamBtn(type="submit" value="{{_ 'save'}}")
input.primary.wide#cancelBtn(type="submit" value="{{_ 'cancel'}}")

View file

@ -7,13 +7,11 @@
display: -moz-flex;
display: -ms-flexbox;
display: flex;
height: 100%;
}
.setting-content {
color: #727479;
background: #dedede;
width: 100%;
height: 100%;
position: absolute;
}
.setting-content .content-title {
@ -58,8 +56,6 @@
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
max-height: 100%;
overflow: auto;
}
.setting-content .content-body .main-body ul li {
padding: 0.5rem 0.5rem;
@ -72,31 +68,26 @@
padding: 0 0.5rem;
}
.setting-content .content-body .main-body ul li .admin-announcement,
.setting-content .content-body .main-body ul li .admin-accessibility,
.setting-content .content-body .main-body ul li .invite-people,
.setting-content .content-body .main-body ul li .layout {
padding-left: 20px;
}
.setting-content .content-body .main-body ul li .admin-announcement li,
.setting-content .content-body .main-body ul li .admin-accessibility li,
.setting-content .content-body .main-body ul li .invite-people li,
.setting-content .content-body .main-body ul li .layout li {
min-width: 500px;
}
.setting-content .content-body .main-body ul li .admin-announcement li ul.no-margin-bottom,
.setting-content .content-body .main-body ul li .admin-accessibility li ul.no-margin-bottom,
.setting-content .content-body .main-body ul li .invite-people li ul.no-margin-bottom,
.setting-content .content-body .main-body ul li .layout li ul.no-margin-bottom {
margin-bottom: 0;
}
.setting-content .content-body .main-body ul li .admin-announcement li .bg-white a,
.setting-content .content-body .main-body ul li .admin-accessibility li .bg-white a,
.setting-content .content-body .main-body ul li .invite-people li .bg-white a,
.setting-content .content-body .main-body ul li .layout li .bg-white a {
background: #f7f7f7;
}
.setting-content .content-body .main-body ul li .admin-announcement li .bg-white a.is-checked,
.setting-content .content-body .main-body ul li .admin-accessibility li .bg-white a.is-checked,
.setting-content .content-body .main-body ul li .invite-people li .bg-white a.is-checked,
.setting-content .content-body .main-body ul li .layout li .bg-white a.is-checked {
background: #fff;

View file

@ -30,10 +30,6 @@ template(name="setting")
a.js-setting-menu(data-id="announcement-setting")
i.fa.fa-bullhorn
| {{_ 'admin-announcement'}}
//li
// a.js-setting-menu(data-id="accessibility-setting")
// i.fa.fa-universal-access
// | {{_ 'accessibility'}}
li
a.js-setting-menu(data-id="layout-setting")
i.fa.fa-object-group
@ -56,8 +52,6 @@ template(name="setting")
+tableVisibilityModeSettings
else if announcementSetting.get
+announcementSettings
else if accessibilitySetting.get
+accessibilitySettings
else if layoutSetting.get
+layoutSettings
else if webhookSetting.get
@ -143,32 +137,34 @@ template(name='tableVisibilityModeSettings')
.title {{_ 'tableVisibilityMode-allowPrivateOnly'}}
.form-group.flex
input.wekan-form-control#accounts-allowPrivateOnly(type="radio" name="allowPrivateOnly" value="true" checked="{{#if allowPrivateOnly}}checked{{/if}}")
label {{_ 'yes'}}
span {{_ 'yes'}}
input.wekan-form-control#accounts-allowPrivateOnly(type="radio" name="allowPrivateOnly" value="false" checked="{{#unless allowPrivateOnly}}checked{{/unless}}")
label {{_ 'no'}}
span {{_ 'no'}}
button.js-tableVisibilityMode-save.primary {{_ 'save'}}
template(name='accountSettings')
ul#account-setting.setting-detail
li
button.js-all-hide-system-messages.primary {{_ 'hide-system-messages-of-all-users'}}
li.accounts-form
.title {{_ 'accounts-allowEmailChange'}}
.form-group.flex
input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="true" checked="{{#if allowEmailChange}}checked{{/if}}")
label {{_ 'yes'}}
span {{_ 'yes'}}
input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="false" checked="{{#unless allowEmailChange}}checked{{/unless}}")
label {{_ 'no'}}
span {{_ 'no'}}
.title {{_ 'accounts-allowUserNameChange'}}
.form-group.flex
input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="true" checked="{{#if allowUserNameChange}}checked{{/if}}")
label {{_ 'yes'}}
span {{_ 'yes'}}
input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="false" checked="{{#unless allowUserNameChange}}checked{{/unless}}")
label {{_ 'no'}}
span {{_ 'no'}}
.title {{_ 'accounts-allowUserDelete'}}
.form-group.flex
input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="true" checked="{{#if allowUserDelete}}checked{{/if}}")
label {{_ 'yes'}}
span {{_ 'yes'}}
input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="false" checked="{{#unless allowUserDelete}}checked{{/unless}}")
label {{_ 'no'}}
span {{_ 'no'}}
button.js-accounts-save.primary {{_ 'save'}}
template(name='announcementSettings')
@ -187,33 +183,8 @@ template(name='announcementSettings')
li
button.js-announcement-save.primary {{_ 'save'}}
template(name='accessibilitySettings')
ul#accessibility-setting.setting-detail
li
a.flex.js-toggle-accessibility
.materialCheckBox(class="{{#if currentAccessibility.enabled}}is-checked{{/if}}")
span {{_ 'admin-accessibility-active'}}
li
.title {{_ 'accessibility-title'}}
.form-group
input.wekan-form-control#accessibility-title(type="text", placeholder="" value="{{currentSetting.accessibilityTitle}}")
li
.accessibility-content(class="{{#if currentAccessibility.enabled}}{{else}}hide{{/if}}")
ul
li
.title {{_ 'admin-accessibility-title'}}
textarea#admin-accessibility.wekan-form-control= currentAccessibility.accessibilityTitle
li
.title {{_ 'admin-accessibility-content'}}
textarea#admin-accessibility.wekan-form-control= currentAccessibility.accessibilityContent
li
button.js-accessibility-save.primary {{_ 'save'}}
template(name='layoutSettings')
ul#layout-setting.setting-detail
li
button.js-all-boards-hide-activities.primary {{_ 'hide-activities-of-all-boards'}}
li.layout-form
.title {{_ 'oidc-button-text'}}
.form-group
@ -230,9 +201,9 @@ template(name='layoutSettings')
.title {{_ 'display-authentication-method'}}
.form-group.flex
input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="true" checked="{{#if currentSetting.displayAuthenticationMethod}}checked{{/if}}")
label {{_ 'yes'}}
span {{_ 'yes'}}
input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="false" checked="{{#unless currentSetting.displayAuthenticationMethod}}checked{{/unless}}")
label {{_ 'no'}}
span {{_ 'no'}}
li.layout-form
.title {{_ 'default-authentication-method'}}
+selectAuthenticationMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
@ -247,9 +218,9 @@ template(name='layoutSettings')
.title {{_ 'hide-logo'}}
.form-group.flex
input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}")
label {{_ 'yes'}}
span {{_ 'yes'}}
input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}")
label {{_ 'no'}}
span {{_ 'no'}}
li.layout-form
.title {{_ 'custom-login-logo-image-url'}}
.form-group
@ -286,16 +257,16 @@ template(name='layoutSettings')
.title {{_ 'hide-card-counter-list'}}
.form-group.flex
input.wekan-form-control#hide-card-counter-list(type="radio" name="hideCardCounterList" value="true" checked="{{#if currentSetting.hideCardCounterList}}checked{{/if}}")
label {{_ 'yes'}}
span {{_ 'yes'}}
input.wekan-form-control#hide-card-counter-list(type="radio" name="hideCardCounterList" value="false" checked="{{#unless currentSetting.hideCardCounterList}}checked{{/unless}}")
label {{_ 'no'}}
span {{_ 'no'}}
li.layout-form
.title {{_ 'hide-board-member-list'}}
.form-group.flex
input.wekan-form-control#hide-board-member-list(type="radio" name="hideBoardMemberList" value="true" checked="{{#if currentSetting.hideBoardMemberList}}checked{{/if}}")
label {{_ 'yes'}}
span {{_ 'yes'}}
input.wekan-form-control#hide-board-member-list(type="radio" name="hideBoardMemberList" value="false" checked="{{#unless currentSetting.hideBoardMemberList}}checked{{/unless}}")
label {{_ 'no'}}
span {{_ 'no'}}
li
button.js-save-layout.primary {{_ 'save'}}

View file

@ -89,9 +89,6 @@ BlazeComponent.extendComponent({
toggleHideBoardMemberList() {
$('#hide-board-member-list').toggleClass('is-checked');
},
toggleAccessibilityPageEnabled() {
$('#accessibility-page-enabled').toggleClass('is-checked');
},
toggleDisplayAuthenticationMethod() {
$('#display-authentication-method').toggleClass('is-checked');
},
@ -242,15 +239,7 @@ BlazeComponent.extendComponent({
const displayAuthenticationMethod =
$('input[name=displayAuthenticationMethod]:checked').val() === 'true';
const defaultAuthenticationMethod = $('#defaultAuthenticationMethod').val();
/*
const accessibilityPageEnabled = $('input[name=accessibilityPageEnabled]:checked').val() === 'true';
const accessibilityTitle = $('#accessibility-title')
.val()
.trim();
const accessibilityContent = $('#accessibility-content')
.val()
.trim();
*/
const spinnerName = $('#spinnerName').val();
try {
@ -276,11 +265,6 @@ BlazeComponent.extendComponent({
legalNotice,
},
});
/*
accessibilityPageEnabled,
accessibilityTitle,
accessibilityContent,
*/
} catch (e) {
return;
} finally {
@ -317,7 +301,6 @@ BlazeComponent.extendComponent({
'click a.js-toggle-hide-logo': this.toggleHideLogo,
'click a.js-toggle-hide-card-counter-list': this.toggleHideCardCounterList,
'click a.js-toggle-hide-board-member-list': this.toggleHideBoardMemberList,
'click a.js-toggle-accessibility-page-enabled': this.toggleAccessibilityPageEnabled,
'click button.js-save-layout': this.saveLayout,
'click a.js-toggle-display-authentication-method': this
.toggleDisplayAuthenticationMethod,
@ -353,12 +336,12 @@ BlazeComponent.extendComponent({
allowUserDelete() {
return AccountSettings.findOne('accounts-allowUserDelete').booleanValue;
},
allBoardsHideActivities() {
Meteor.call('setAllBoardsHideActivities', (err, ret) => {
allHideSystemMessages() {
Meteor.call('setAllUsersHideSystemMessages', (err, ret) => {
if (!err && ret) {
if (ret === true) {
const message = `${TAPi18n.__(
'now-activities-of-all-boards-are-hidden',
'now-system-messages-of-all-users-are-hidden',
)}`;
alert(message);
}
@ -376,7 +359,7 @@ BlazeComponent.extendComponent({
'click button.js-accounts-save': this.saveAccountsChange,
},
{
'click button.js-all-boards-hide-activities': this.allBoardsHideActivities,
'click button.js-all-hide-system-messages': this.allHideSystemMessages,
},
];
},
@ -393,12 +376,12 @@ BlazeComponent.extendComponent({
allowPrivateOnly() {
return TableVisibilityModeSettings.findOne('tableVisibilityMode-allowPrivateOnly').booleanValue;
},
allBoardsHideActivities() {
Meteor.call('setAllBoardsHideActivities', (err, ret) => {
allHideSystemMessages() {
Meteor.call('setAllUsersHideSystemMessages', (err, ret) => {
if (!err && ret) {
if (ret === true) {
const message = `${TAPi18n.__(
'now-activities-of-all-boards-are-hidden',
'now-system-messages-of-all-users-are-hidden',
)}`;
alert(message);
}
@ -416,7 +399,7 @@ BlazeComponent.extendComponent({
'click button.js-tableVisibilityMode-save': this.saveTableVisibilityChange,
},
{
'click button.js-all-boards-hide-activities': this.allBoardsHideActivities,
'click button.js-all-hide-system-messages': this.allHideSystemMessages,
},
];
},

View file

@ -34,14 +34,13 @@ template(name="translation")
template(name="translationGeneral")
table
thead
tbody
tr
th {{_ 'language'}}
th {{_ 'text'}}
th {{_ 'translation-text'}}
th
+newTranslationRow
tbody
each translation in translationList
+translationRow(translationId=translation._id)

View file

@ -3,31 +3,34 @@
top: 0;
bottom: 0;
right: 0;
overflow-y: scroll;
}
.sidebar {
.sidebar .sidebar-shadow {
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
background: #f7f7f7;
box-shadow: -10px 0px 5px -10px #b3b3b3;
z-index: 10;
}
.sidebar-xmark {
position: absolute;
right: 0px;
top: 0px;
right: 10px;
top: 5px;
font-size: 25px;
padding: 10px;
}
.sidebar-xmark:hover {
background: rgba(0,0,0,0.15);
}
.sidebar-actions {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 10px 10px 0px 10px;
}
.sidebar .sidebar-content {
padding: 0 12px;
padding: 12px;
margin-bottom: 1.6em;
position: absolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
overflow-x: hidden;
overflow-y: auto;
width: 90%;
}
.sidebar .sidebar-content .hide-btn {
display: none;
@ -103,23 +106,21 @@
margin-right: 10px;
}
.sidebar .sidebar-shortcuts {
position: absolute;
margin-left: 40%;
padding: 0;
top: 7px;
font-size: 1em;
font-size: 0.8em;
line-height: 1.6em;
color: #999;
}
.sidebar .sidebar-shortcuts .sidebar-btn {
margin-left: 3px;
margin-right: 3px;
}
.board-sidebar {
display: none;
width: 30vw;
z-index: 100;
width: 548px;
right: -548px;
transition: top 0.1s, right 0.1s, width 0.1s;
}
.board-sidebar.is-open {
display: block;
right: 0;
}
.board-widget h4 {
margin: 5px 0;
@ -177,7 +178,7 @@
@media screen and (max-width: 800px) {
.board-sidebar {
width: 100%;
left: 0;
right: -100%;
}
.board-sidebar .sidebar-content .hide-btn {
width: 40px;

View file

@ -1,61 +1,36 @@
template(name="sidebar")
.board-sidebar.sidebar(class="{{#if isOpen}}is-open{{/if}} {{#unless isVerticalScrollbars}}no-scrollbars{{/unless}}")
.board-sidebar.sidebar(class="{{#if isOpen}}is-open{{/if}}")
//a.sidebar-tongue.js-toggle-sidebar(
// class="{{#if isTongueHidden}}is-hidden{{/if}}",
// title="{{showTongueTitle}}")
// i.fa.fa-navicon
.sidebar-actions
.sidebar-shortcuts
a.sidebar-btn.js-shortcuts(title="{{_ 'keyboard-shortcuts' }}")
i.fa.fa-keyboard-o
span {{_ 'keyboard-shortcuts' }}
a.sidebar-btn.js-keyboard-shortcuts-toggle(
title="{{#if isKeyboardShortcuts}}{{_ 'keyboard-shortcuts-enabled'}}{{else}}{{_ 'keyboard-shortcuts-disabled'}}{{/if}}")
i.fa(class="fa-solid fa-{{#if isKeyboardShortcuts}}check-square-o{{else}}ban{{/if}}")
.sidebar-shadow
a.sidebar-xmark.js-close-sidebar &#10005;
.sidebar-content.js-board-sidebar-content
//a.hide-btn.js-hide-sidebar
// i.fa.fa-navicon
unless isDefaultView
h2
a.fa.fa-chevron-left.js-back-home
= getViewTitle
if isOpen
+Template.dynamic(template=getViewTemplate)
.sidebar-content.js-board-sidebar-content
//a.hide-btn.js-hide-sidebar
// i.fa.fa-navicon
unless isDefaultView
h2
a.fa.fa-chevron-left.js-back-home
= getViewTitle
if isOpen
+Template.dynamic(template=getViewTemplate)
template(name='homeSidebar')
hr
+membersWidget
hr
+labelsWidget
hr
ul#cards.label-text-hidden
a.flex.js-toggle-minicard-label-text(title="{{_ 'hide-minicard-label-text'}}")
span {{_ 'hide-minicard-label-text'}}
b &nbsp;
.materialCheckBox(class="{{#if hiddenMinicardLabelText}}is-checked{{/if}}")
ul#cards.vertical-scrollbars-toggle
a.flex.js-vertical-scrollbars-toggle(title="{{_ 'enable-vertical-scrollbars'}}")
span {{_ 'enable-vertical-scrollbars'}}
b &nbsp;
.materialCheckBox(class="{{#if isVerticalScrollbars}}is-checked{{/if}}")
ul#cards.show-week-of-year-toggle
a.flex.js-show-week-of-year-toggle(title="{{_ 'show-week-of-year'}}")
span {{_ 'show-week-of-year'}}
b &nbsp;
.materialCheckBox(class="{{#if isShowWeekOfYear}}is-checked{{/if}}")
hr
unless currentUser.isNoComments
h3.activity-title
h3
i.fa.fa-comments-o
| {{_ 'activities'}}
.material-toggle-switch(title="{{_ 'show-activities'}}")
if showActivities
input.toggle-switch(type="checkbox" id="toggleShowActivitiesBoard" checked="checked")
else
input.toggle-switch(type="checkbox" id="toggleShowActivitiesBoard")
label.toggle-label(for="toggleShowActivitiesBoard")
+activities(mode="board")
template(name="membersWidget")
@ -65,6 +40,11 @@ template(name="membersWidget")
a.board-header-btn.js-open-board-menu(title="{{_ 'boardMenuPopup-title'}}")
i.board-header-btn-icon.fa.fa-cog
| {{_ 'boardMenuPopup-title'}}
.board-widget.board-widget-members
.sidebar-shortcuts
a.board-header-btn.js-shortcuts(title="{{_ 'keyboard-shortcuts' }}")
i.fa.fa-keyboard-o
span {{_ 'keyboard-shortcuts' }}
hr
h3
i.fa.fa-users
@ -195,7 +175,7 @@ template(name="boardInfoOnMyBoardsPopup")
template(name="boardCardSettingsPopup")
form.board-card-settings
h3 {{_ 'show-on-card'}}, {{_ 'show-on-minicard'}}
h3 {{_ 'show-on-card'}}
div.check-div
a.flex.js-field-has-receiveddate(class="{{#if allowsReceivedDate}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsReceivedDate}}is-checked{{/if}}")
@ -226,18 +206,14 @@ template(name="boardCardSettingsPopup")
span
i.fa.fa-users
| {{_ 'members'}}
div.check-div
a.flex.js-field-has-creator(class="{{#if allowsCreator}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsCreator}}is-checked{{/if}}")
span
i.fa.fa-user
| {{_ 'creator'}}
div.check-div
a.flex.js-field-has-creator-on-minicard(class="{{#if allowsCreatorOnMinicard}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsCreatorOnMinicard}}is-checked{{/if}}")
span
i.fa.fa-user
| {{_ 'creator-on-minicard'}}
div.check-div
a.flex.js-field-has-assignee(class="{{#if allowsAssignee}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsAssignee}}is-checked{{/if}}")
@ -262,12 +238,6 @@ template(name="boardCardSettingsPopup")
span
i.fa.fa-sort
| {{_ 'card-sorting-by-number'}}
div.check-div
a.flex.js-field-has-card-sorting-by-number-on-minicard(class="{{#if allowsCardSortingByNumberOnMinicard}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsCardSortingByNumberOnMinicard}}is-checked{{/if}}")
span
i.fa.fa-sort
| {{_ 'card-sorting-by-number-on-minicard'}}
div.check-div
a.flex.js-field-has-card-show-lists(class="{{#if allowsShowLists}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsShowLists}}is-checked{{/if}}")
@ -301,12 +271,6 @@ template(name="boardCardSettingsPopup")
i.fa.fa-align-left
| {{_ 'description'}}
| {{_ 'custom-field-text'}}
div.check-div
a.flex.js-field-has-description-text-on-minicard(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
span
i.fa.fa-align-left
| {{_ 'description-on-minicard'}}
div.check-div
a.flex.js-field-has-checklists(class="{{#if allowsChecklists}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsChecklists}}is-checked{{/if}}")
@ -325,19 +289,6 @@ template(name="boardCardSettingsPopup")
span
i.fa.fa-paperclip
| {{_ 'attachments'}}
div.check-div
a.flex.js-field-has-badge-attachment-on-minicard(class="{{#if allowsBadgeAttachmentOnMinicard}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsBadgeAttachmentOnMinicard}}is-checked{{/if}}")
span
i.fa.fa-paperclip
| {{_ 'badge-attachment-on-minicard'}}
div.check-div
a.flex.js-field-has-cover-attachment-on-minicard(class="{{#if allowsCoverAttachmentOnMinicard}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsCoverAttachmentOnMinicard}}is-checked{{/if}}")
span
i.fa.fa-book
i.fa.fa-picture-o
| {{_ 'cover-attachment-on-minicard'}}
//div.check-div
// a.flex.js-field-has-comments(class="{{#if allowsComments}}is-checked{{/if}}")
// .materialCheckBox(class="{{#if allowsComments}}is-checked{{/if}}")
@ -351,6 +302,35 @@ template(name="boardCardSettingsPopup")
// i.fa.fa-history
// | {{_ 'activities'}}
template(name="boardMinicardSettingsPopup")
form.board-minicard-settings
h3 {{_ 'show-on-minicard'}}
div.check-div
a.flex.js-field-has-description-text-on-minicard(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsDescriptionTextOnMinicard}}is-checked{{/if}}")
span
i.fa.fa-align-left
| {{_ 'description-on-minicard'}}
div.check-div
a.flex.js-field-has-cover-attachment-on-minicard(class="{{#if allowsCoverAttachmentOnMinicard}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsCoverAttachmentOnMinicard}}is-checked{{/if}}")
span
i.fa.fa-book
i.fa.fa-picture-o
| {{_ 'cover-attachment-on-minicard'}}
div.check-div
a.flex.js-field-has-badge-attachment-on-minicard(class="{{#if allowsBadgeAttachmentOnMinicard}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsBadgeAttachmentOnMinicard}}is-checked{{/if}}")
span
i.fa.fa-paperclip
| {{_ 'badge-attachment-on-minicard'}}
div.check-div
a.flex.js-field-has-card-sorting-by-number-on-minicard(class="{{#if allowsCardSortingByNumberOnMinicard}}is-checked{{/if}}")
.materialCheckBox(class="{{#if allowsCardSortingByNumberOnMinicard}}is-checked{{/if}}")
span
i.fa.fa-sort
| {{_ 'card-sorting-by-number-on-minicard'}}
template(name="boardSubtaskSettingsPopup")
form.board-subtask-settings
h3 {{_ 'show-parent-in-minicard'}}
@ -493,6 +473,10 @@ template(name="boardMenuPopup")
a.js-card-settings
i.fa.fa-id-card-o
| {{_ 'card-settings'}}
li
a.js-minicard-settings
i.fa.fa-id-card-o
| {{_ 'minicard-settings'}}
li
a.js-subtask-settings
i.fa.fa-sitemap

View file

@ -105,16 +105,6 @@ BlazeComponent.extendComponent({
else return `${TAPi18n.__('sidebar-open')}`;
},
isKeyboardShortcuts() {
const user = ReactiveCache.getCurrentUser();
return user && user.isKeyboardShortcuts();
},
isVerticalScrollbars() {
const user = ReactiveCache.getCurrentUser();
return user && user.isVerticalScrollbars();
},
events() {
return [
{
@ -136,15 +126,6 @@ BlazeComponent.extendComponent({
'click .js-shortcuts'() {
FlowRouter.go('shortcuts');
},
'click .js-keyboard-shortcuts-toggle'() {
ReactiveCache.getCurrentUser().toggleKeyboardShortcuts();
},
'click .js-vertical-scrollbars-toggle'() {
ReactiveCache.getCurrentUser().toggleVerticalScrollbars();
},
'click .js-show-week-of-year-toggle'() {
ReactiveCache.getCurrentUser().toggleShowWeekOfYear();
},
'click .js-close-sidebar'() {
Sidebar.toggle()
},
@ -155,7 +136,7 @@ BlazeComponent.extendComponent({
Blaze.registerHelper('Sidebar', () => Sidebar);
BlazeComponent.extendComponent({
Template.homeSidebar.helpers({
hiddenMinicardLabelText() {
currentUser = ReactiveCache.getCurrentUser();
if (currentUser) {
@ -166,28 +147,7 @@ BlazeComponent.extendComponent({
return false;
}
},
isVerticalScrollbars() {
const user = ReactiveCache.getCurrentUser();
return user && user.isVerticalScrollbars();
},
isShowWeekOfYear() {
const user = ReactiveCache.getCurrentUser();
return user && user.isShowWeekOfYear();
},
showActivities() {
let ret = Utils.getCurrentBoard().showActivities ?? false;
return ret;
},
events() {
return [
{
'click #toggleShowActivitiesBoard'() {
Utils.getCurrentBoard().toggleShowActivities();
},
},
];
},
}).register('homeSidebar');
});
Template.boardInfoOnMyBoardsPopup.helpers({
hideCardCounterList() {
@ -276,6 +236,7 @@ Template.boardMenuPopup.events({
'click .js-import-board': Popup.open('chooseBoardSource'),
'click .js-subtask-settings': Popup.open('boardSubtaskSettings'),
'click .js-card-settings': Popup.open('boardCardSettings'),
'click .js-minicard-settings': Popup.open('boardMinicardSettings'),
'click .js-export-board': Popup.open('exportBoard'),
});
@ -953,11 +914,11 @@ BlazeComponent.extendComponent({
},
allowsCreator() {
return this.currentBoard.allowsCreator ?? false;
},
allowsCreatorOnMinicard() {
return this.currentBoard.allowsCreatorOnMinicard ?? false;
return (
this.currentBoard.allowsCreator === null ||
this.currentBoard.allowsCreator === undefined ||
this.currentBoard.allowsCreator
);
},
allowsMembers() {
@ -1023,22 +984,6 @@ BlazeComponent.extendComponent({
);
},
allowsDescriptionTextOnMinicard() {
return this.currentBoard.allowsDescriptionTextOnMinicard;
},
allowsCoverAttachmentOnMinicard() {
return this.currentBoard.allowsCoverAttachmentOnMinicard;
},
allowsBadgeAttachmentOnMinicard() {
return this.currentBoard.allowsBadgeAttachmentOnMinicard;
},
allowsCardSortingByNumberOnMinicard() {
return this.currentBoard.allowsCardSortingByNumberOnMinicard;
},
boards() {
const ret = ReactiveCache.getBoards(
{
@ -1161,19 +1106,6 @@ BlazeComponent.extendComponent({
this.currentBoard.allowsCreator,
);
},
'click .js-field-has-creator-on-minicard'(evt) {
evt.preventDefault();
this.currentBoard.allowsCreatorOnMinicard = !this.currentBoard.allowsCreatorOnMinicard;
this.currentBoard.setAllowsCreatorOnMinicard(this.currentBoard.allowsCreatorOnMinicard);
$(`.js-field-has-creator-on-minicard ${MCB}`).toggleClass(
CKCLS,
this.currentBoard.allowsCreatorOnMinicard,
);
$('.js-field-has-creator-on-minicard').toggleClass(
CKCLS,
this.currentBoard.allowsCreatorOnMinicard,
);
},
'click .js-field-has-members'(evt) {
evt.preventDefault();
this.currentBoard.allowsMembers = !this.currentBoard.allowsMembers;
@ -1309,22 +1241,6 @@ BlazeComponent.extendComponent({
this.currentBoard.allowsCardNumber,
);
},
'click .js-field-has-description-text-on-minicard'(evt) {
evt.preventDefault();
this.currentBoard.allowsDescriptionTextOnMinicard = !this.currentBoard
.allowsDescriptionTextOnMinicard;
this.currentBoard.setallowsDescriptionTextOnMinicard(
this.currentBoard.allowsDescriptionTextOnMinicard,
);
$(`.js-field-has-description-text-on-minicard ${MCB}`).toggleClass(
CKCLS,
this.currentBoard.allowsDescriptionTextOnMinicard,
);
$('.js-field-has-description-text-on-minicard').toggleClass(
CKCLS,
this.currentBoard.allowsDescriptionTextOnMinicard,
);
},
'click .js-field-has-description-text'(evt) {
evt.preventDefault();
this.currentBoard.allowsDescriptionText = !this.currentBoard
@ -1402,6 +1318,74 @@ BlazeComponent.extendComponent({
this.currentBoard.allowsActivities,
);
},
},
];
},
}).register('boardCardSettingsPopup');
BlazeComponent.extendComponent({
onCreated() {
this.currentBoard = Utils.getCurrentBoard();
},
allowsDescriptionTextOnMinicard() {
return this.currentBoard.allowsDescriptionTextOnMinicard;
},
allowsCoverAttachmentOnMinicard() {
return this.currentBoard.allowsCoverAttachmentOnMinicard;
},
allowsBadgeAttachmentOnMinicard() {
return this.currentBoard.allowsBadgeAttachmentOnMinicard;
},
allowsCardSortingByNumberOnMinicard() {
return this.currentBoard.allowsCardSortingByNumberOnMinicard;
},
lists() {
return ReactiveCache.getLists(
{
boardId: this.currentBoard._id,
archived: false,
},
{
sort: ['title'],
},
);
},
hasLists() {
return this.lists().length > 0;
},
isListSelected() {
return (
this.currentBoard.dateSettingsDefaultBoardId === this.currentData()._id
);
},
events() {
return [
{
'click .js-field-has-description-text-on-minicard'(evt) {
evt.preventDefault();
this.currentBoard.allowsDescriptionTextOnMinicard = !this.currentBoard
.allowsDescriptionTextOnMinicard;
this.currentBoard.setallowsDescriptionTextOnMinicard(
this.currentBoard.allowsDescriptionTextOnMinicard,
);
$(`.js-field-has-description-text-on-minicard ${MCB}`).toggleClass(
CKCLS,
this.currentBoard.allowsDescriptionTextOnMinicard,
);
$('.js-field-has-description-text-on-minicard').toggleClass(
CKCLS,
this.currentBoard.allowsDescriptionTextOnMinicard,
);
},
'click .js-field-has-cover-attachment-on-minicard'(evt) {
evt.preventDefault();
this.currentBoard.allowsCoverAttachmentOnMinicard = !this.currentBoard
@ -1453,7 +1437,7 @@ BlazeComponent.extendComponent({
},
];
},
}).register('boardCardSettingsPopup');
}).register('boardMinicardSettingsPopup');
BlazeComponent.extendComponent({
onCreated() {

View file

@ -24,17 +24,9 @@ template(name="swimlaneFixedHeader")
| {{isTitleDefault title}}
.swimlane-header-menu
unless currentUser.isCommentOnly
a.fa.fa-plus.js-open-add-swimlane-menu.swimlane-header-plus-icon(title="{{_ 'add-swimlane'}}")
if currentUser.isBoardAdmin
a.fa.fa-plus.js-open-add-swimlane-menu.swimlane-header-plus-icon(title="{{_ 'add-swimlane'}}")
a.fa.fa-navicon.js-open-swimlane-menu(title="{{_ 'swimlaneActionPopup-title'}}")
//// TODO: Collapse Swimlane: make button working, etc.
//unless collapsed
// a.js-collapse-swimlane(title="{{_ 'collapse'}}")
// i.fa.fa-arrow-down.swimlane-header-collapse-down
// i.fa.fa-arrow-up.swimlane-header-collapse-up
//if collapsed
// a.js-collapse-swimlane(title="{{_ 'uncollapse'}}")
// i.fa.fa-arrow-up.swimlane-header-collapse-up
// i.fa.fa-arrow-down.swimlane-header-collapse-down
unless isTouchScreen
if isShowDesktopDragHandles
a.swimlane-header-handle.handle.fa.fa-arrows.js-swimlane-header-handle

View file

@ -18,25 +18,10 @@ BlazeComponent.extendComponent({
swimlane.rename(newTitle.trim());
}
},
collapsed(check = undefined) {
const swimlane = Template.currentData();
const status = swimlane.isCollapsed();
if (check === undefined) {
// just check
return status;
} else {
swimlane.collapse(!status);
return !status;
}
},
events() {
return [
{
'click .js-collapse-swimlane'(event) {
event.preventDefault();
this.collapsed(!this.collapsed());
},
'click .js-open-swimlane-menu': Popup.open('swimlaneAction'),
'click .js-open-add-swimlane-menu': Popup.open('swimlaneAdd'),
submit: this.editTitle,
@ -143,7 +128,7 @@ BlazeComponent.extendComponent({
Swimlanes.insert({
title,
boardId: Session.get('currentBoard'),
sort: sortValue.base || 0,
sort: sortValue.base,
type: swimlaneType,
});
@ -224,7 +209,7 @@ BlazeComponent.extendComponent({
swimlaneHeightValue() {
const swimlane = this.currentData();
const board = swimlane.boardId;
return ReactiveCache.getCurrentUser().getSwimlaneHeight(board, swimlane._id);
return Meteor.user().getSwimlaneHeight(board, swimlane._id);
},
events() {

View file

@ -1,3 +1,43 @@
/*
// Minimize swimlanes start https://www.w3schools.com/howto/howto_js_accordion.asp
.accordion
cursor: pointer
width: 30px
height: 20px
border: none
outline: none
font-size: 18px
transition: 0.4s
padding-top: 0px
margin-top: 0px
.accordion:after
// Unicode triagle right:
content: '\25B6'
color: #777
font-weight: bold
float: left
.active:after
// Unicode triangle down:
content: '\25BC'
.panel
width: 100%
max-height: 0
overflow: hidden
transition: max-height 0.2s ease-out
margin: 0px
padding: 0px
// Minimize swimlanes end https://www.w3schools.com/howto/howto_js_accordion.asp
*/
@media screen and (min-width: 801px) {
.swimlane.ui-sortable {
width: max-content;
}
}
[class=swimlane] {
position: sticky;
left: 0;
@ -6,30 +46,7 @@
background: #dedede;
display: flex;
flex-direction: row;
overflow: auto;
max-height: 100%;
}
.swimlane-header-menu .swimlane-header-collapse-down {
font-size: 50%;
color: #a6a6a6;
position: absolute;
top: 5px;
left: 100px;
}
.swimlane-header-menu .swimlane-header-collapse-up {
font-size: 50%;
color: #a6a6a6;
position: absolute;
bottom: 5px;
left: 100px;
}
.swimlane-header-menu .swimlane-header-uncollapse-up {
font-size: 50%;
color: #a6a6a6;
}
.swimlane-header-menu .swimlane-header-uncollapse-down {
font-size: 50%;
color: #a6a6a6;
overflow: 0;
}
.swimlane.placeholder {
background-color: rgba(0,0,0,0.2);
@ -153,7 +170,7 @@
color: #4d4d4d !important;
}
.swimlane-silver {
background: #ccc !important;
background: unset !important;
color: #4d4d4d !important;
}
.swimlane-peachpuff {

View file

@ -1,8 +1,8 @@
template(name="swimlane")
.swimlane.nodragscroll
.swimlane
+swimlaneHeader
unless collapseSwimlane
.swimlane.js-lists.js-swimlane.dragscroll(id="swimlane-{{_id}}"
.swimlane.js-lists.js-swimlane(id="swimlane-{{_id}}"
style="height:{{swimlaneHeight}};")
if isMiniScreen
if currentListIsInThisSwimlane _id
@ -24,7 +24,7 @@ template(name="swimlane")
+cardDetails(currentCard)
template(name="listsGroup")
.swimlane.list-group.js-lists.dragscroll
.swimlane.list-group.js-lists
if isMiniScreen
if currentList
+list(currentList)
@ -46,8 +46,8 @@ template(name="listsGroup")
template(name="addListForm")
unless currentUser.isWorker
unless currentUser.isCommentOnly
.list.list-composer.js-list-composer(class="{{#if isMiniScreen}}mini-list{{/if}}")
.list.list-composer.js-list-composer(class="{{#if isMiniScreen}}mini-list{{/if}}")
if currentUser.isBoardAdmin
.list-header-add
+inlinedForm(autoclose=false)
input.list-name-input.full-line(type="text" placeholder="{{_ 'add-list'}}"

View file

@ -225,7 +225,7 @@ BlazeComponent.extendComponent({
},
swimlaneHeight() {
const user = ReactiveCache.getCurrentUser();
const user = Meteor.user();
const swimlane = Template.currentData();
const height = user.getSwimlaneHeight(swimlane.boardId, swimlane._id);
return height == -1 ? "auto" : (height + "px");
@ -288,7 +288,7 @@ BlazeComponent.extendComponent({
Template.swimlane.helpers({
canSeeAddList() {
return ReactiveCache.getCurrentUser().isBoardAdmin();
return Meteor.user().isBoardAdmin();
},
});

View file

@ -5,7 +5,6 @@
float: left;
height: 30px;
width: 30px;
margin: .3vh;
cursor: pointer;
user-select: none;
z-index: 1;

View file

@ -26,9 +26,9 @@ template(name="orgAvatar")
template(name="boardOrgRow")
tr
if orgData.orgIsActive
td {{ orgData.orgDisplayName }}
else
td <s>{{ orgData.orgDisplayName }}</s>
else
td {{ orgData.orgDisplayName }}
td
if currentUser.isBoardAdmin
a.member.orgOrTeamMember.add-member.js-manage-board-removeOrg(title="{{_ 'remove-from-board'}}")
@ -39,9 +39,9 @@ template(name="boardOrgRow")
template(name="boardTeamRow")
tr
if teamData.teamIsActive
td {{ teamData.teamDisplayName }}
else
td <s>{{ teamData.teamDisplayName }}</s>
else
td {{ teamData.teamDisplayName }}
td
if currentUser.isBoardAdmin
a.member.orgOrTeamMember.add-member.js-manage-board-removeTeam(title="{{_ 'remove-from-board'}}")

View file

@ -77,10 +77,6 @@ template(name="memberMenuPopup")
a.js-change-language
i.fa.fa-flag
| {{_ 'changeLanguagePopup-title'}}
//li
// a.js-support
// i.fa.fa-question-circle
// | {{_ 'support'}}
unless isSandstorm
hr
ul.pop-over-list
@ -143,12 +139,6 @@ template(name="editProfilePopup")
div
input#deleteButton.primary.wide(type="button" value="{{_ 'delete'}}")
template(name="supportPopup")
ul.pop-over-list
li
| Support popup text will be editable later.
template(name="changePasswordPopup")
+atForm(state='changePwd')
@ -163,6 +153,12 @@ template(name="changeLanguagePopup")
template(name="changeSettingsPopup")
ul.pop-over-list
//li
// a.js-toggle-system-messages
// i.fa.fa-comments-o
// | {{_ 'hide-system-messages'}}
// if hiddenSystemMessages
// i.fa.fa-check
//li
// a.js-toggle-desktop-drag-handles
// i.fa.fa-arrows

View file

@ -77,7 +77,6 @@ Template.memberMenuPopup.events({
'click .js-change-avatar': Popup.open('changeAvatar'),
'click .js-change-password': Popup.open('changePassword'),
'click .js-change-language': Popup.open('changeLanguage'),
'click .js-support': Popup.open('support'),
'click .js-logout'(event) {
event.preventDefault();
@ -284,6 +283,16 @@ Template.changeLanguagePopup.events({
});
Template.changeSettingsPopup.helpers({
hiddenSystemMessages() {
const currentUser = ReactiveCache.getCurrentUser();
if (currentUser) {
return (currentUser.profile || {}).hasHiddenSystemMessages;
} else if (window.localStorage.getItem('hasHiddenSystemMessages')) {
return true;
} else {
return false;
}
},
rescueCardDescription() {
const currentUser = ReactiveCache.getCurrentUser();
if (currentUser) {
@ -316,7 +325,7 @@ Template.changeSettingsPopup.helpers({
});
},
startDayOfWeek() {
currentUser = ReactiveCache.getCurrentUser();
currentUser = Meteor.user();
if (currentUser) {
return currentUser.getStartDayOfWeek();
} else {
@ -334,7 +343,7 @@ Template.changeSettingsPopup.events({
return ret;
},
'click .js-toggle-desktop-drag-handles'() {
const currentUser = ReactiveCache.getCurrentUser();
currentUser = Meteor.user();
if (currentUser) {
Meteor.call('toggleDesktopDragHandles');
} else if (window.localStorage.getItem('showDesktopDragHandles')) {
@ -343,6 +352,16 @@ Template.changeSettingsPopup.events({
window.localStorage.setItem('showDesktopDragHandles', 'true');
}
},
'click .js-toggle-system-messages'() {
currentUser = Meteor.user();
if (currentUser) {
Meteor.call('toggleSystemMessages');
} else if (window.localStorage.getItem('hasHiddenSystemMessages')) {
window.localStorage.removeItem('hasHiddenSystemMessages');
} else {
window.localStorage.setItem('hasHiddenSystemMessages', 'true');
}
},
'click .js-rescue-card-description'() {
Meteor.call('toggleRescueCardDescription')
},
@ -356,7 +375,7 @@ Template.changeSettingsPopup.events({
templateInstance.$('#start-day-of-week').val(),
10,
);
const currentUser = ReactiveCache.getCurrentUser();
const currentUser = Meteor.user();
if (isNaN(minLimit) || minLimit < -1) {
minLimit = -1;
}

View file

@ -47,7 +47,7 @@ Blaze.registerHelper('isTouchScreenOrShowDesktopDragHandles', () =>
Blaze.registerHelper('moment', (...args) => {
args.pop(); // hash
const [date, format] = args;
return moment(date).format(format ?? 'LLLL');
return moment(date).format(format);
});
Blaze.registerHelper('canModifyCard', () =>

View file

@ -6,11 +6,10 @@ import moment from 'moment/min/moment-with-locales';
function adjustedTimeFormat() {
return moment
.localeData()
.longDateFormat('LT');
.longDateFormat('LT')
.replace(/HH/i, 'H');
}
// .replace(/HH/i, 'H');
export class DatePicker extends BlazeComponent {
template() {
return 'datepicker';

View file

@ -123,7 +123,6 @@ EscapeActions = {
// the shortcut sould work on textarea and inputs as well.
Mousetrap.bindGlobal('esc', () => {
EscapeActions.executeLowest();
Sidebar.hide();
});
// On a left click on the document, we try to exectute one escape action (eg,

View file

@ -57,9 +57,6 @@ window.ExportHtml = Popup => {
Array.from(
document.querySelectorAll('#header-main-bar .board-header-btns'),
).forEach(elem => elem.remove());
Array.from(
document.querySelectorAll('.js-pop-over, .pop-over'),
).forEach(elem => elem.remove());
Array.from(document.querySelectorAll('.list-composer')).forEach(elem =>
elem.remove(),
);
@ -155,50 +152,6 @@ window.ExportHtml = Popup => {
);
};
const getWebFonts = () => {
fontUrls = [];
for (let sheet of document.styleSheets) {
// Get the base URL of the stylesheet
let baseUrl = sheet.href ? new URL(sheet.href).origin : window.location.origin;
try {
for (let rule of sheet.cssRules) {
if (rule.type === CSSRule.FONT_FACE_RULE) {
let src = rule.style.getPropertyValue('src');
let urlMatch = src.match(/url\(["']?(.+?)["']?\)/);
if (urlMatch) {
let fontUrl = urlMatch[1];
// Resolve the URL relative to the stylesheet's base URL
let resolvedUrl = new URL(fontUrl, baseUrl);
fontUrls.push(resolvedUrl.href); // Using .href to get the absolute URL
}
}
}
} catch (e) {
console.log('Access to stylesheet blocked:', e);
}
}
return fontUrls;
};
const downloadFonts = async(elements, zip) => {
await asyncForEach(elements, async elem => {
const response = await fetch(elem);
const responseBody = await response.blob();
const filename = elem.split('/')
.pop()
.split('?')
.shift()
.split('#')
.shift();
const fileFullPath = `webfonts/${filename}`;
zip.file(fileFullPath, responseBody);
});
}
const downloadCardCovers = async (elements, zip, boardSlug) => {
await asyncForEach(elements, async elem => {
const response = await fetch(
@ -241,7 +194,6 @@ window.ExportHtml = Popup => {
await downloadStylesheets(getStylesheetList(), zip);
await downloadSrcAttached(getSrcAttached(), zip, boardSlug);
await downloadCardCovers(getCardCovers(), zip, boardSlug);
await downloadFonts(getWebFonts(), zip);
addBoardHTMLToZip(boardSlug, zip);

View file

@ -237,6 +237,7 @@ class SetFilter {
if (this._indexOfVal(val) === -1) {
this._selectedElements.push(val);
this._dep.changed();
showFilterSidebar();
}
}

View file

@ -3,46 +3,6 @@ import { ReactiveCache } from '/imports/reactiveCache';
// XXX There is no reason to define these shortcuts globally, they should be
// attached to a template (most of them will go in the `board` template).
window.addEventListener('keydown', (e) => {
// Only handle event if coming from body
if (e.target !== document.body) return;
// Only handle event if it's in another language
if (String.fromCharCode(e.which).toLowerCase() === e.key) return;
// Trigger the corresponding action
Mousetrap.handleKey(String.fromCharCode(e.which).toLowerCase(), [], {type: "keypress"});
});
// Overwrite the stopCallback to allow for more keyboard shortcut customizations
Mousetrap.stopCallback = (event, element) => {
// Are shortcuts enabled for the user?
if (ReactiveCache.getCurrentUser() && !ReactiveCache.getCurrentUser().isKeyboardShortcuts())
return true;
// Always handle escape
if (event.keyCode === 27)
return false;
// Make sure there are no selected characters
if (window.getSelection().type === "Range")
return true;
// Decide what the current element is
const currentElement = event.target || document.activeElement;
// If the current element is editable, we don't want to trigger an event
if (currentElement.isContentEditable)
return true;
// Make sure we are not in an input element
if (currentElement instanceof HTMLInputElement || currentElement instanceof HTMLSelectElement || currentElement instanceof HTMLTextAreaElement)
return true;
// We can trigger events!
return false;
}
function getHoveredCardId() {
const card = $('.js-minicard:hover').get(0);
if (!card) return null;
@ -73,14 +33,6 @@ Mousetrap.bind('q', () => {
}
});
Mousetrap.bind('a', () => {
const currentBoardId = Session.get('currentBoard');
const currentUserId = Meteor.userId();
if (currentBoardId && currentUserId) {
Filter.assignees.toggle(currentUserId);
}
});
Mousetrap.bind('x', () => {
if (Filter.isActive()) {
Filter.reset();
@ -133,7 +85,7 @@ Mousetrap.bind(numbArray, (evt, key) => {
const cardIds = MultiSelection.getSelectedCardIds();
for (const cardId of cardIds)
{
card = Cards.findOne(cardId);
card = ReactiveCache.getCard(cardId);
if(num <= board.labels.length)
{
card.removeLabel(labels[num-1]["_id"]);
@ -157,7 +109,7 @@ Mousetrap.bind(numArray, (evt, key) => {
const cardIds = MultiSelection.getSelectedCardIds();
for (const cardId of cardIds)
{
card = Cards.findOne(cardId);
card = ReactiveCache.getCard(cardId);
if(num <= board.labels.length)
{
card.addLabel(labels[num-1]["_id"]);
@ -171,7 +123,7 @@ Mousetrap.bind(numArray, (evt, key) => {
return;
}
if (ReactiveCache.getCurrentUser().isBoardMember()) {
const card = Cards.findOne(cardId);
const card = ReactiveCache.getCard(cardId);
if(num <= board.labels.length)
{
card.toggleLabel(labels[num-1]["_id"]);
@ -179,57 +131,6 @@ Mousetrap.bind(numArray, (evt, key) => {
}
});
Mousetrap.bind(_.range(1, 10).map(x => `ctrl+alt+${x}`), (evt, key) => {
// Make sure the current user is defined
if (!ReactiveCache.getCurrentUser())
return;
// Make sure the current user is a board member
if (!ReactiveCache.getCurrentUser().isBoardMember())
return;
const memberIndex = parseInt(key.split("+").pop()) - 1;
const currentBoard = Utils.getCurrentBoard();
const validBoardMembers = currentBoard.memberUsers().filter(member => member.isBoardMember());
if (memberIndex >= validBoardMembers.length)
return;
const memberId = validBoardMembers[memberIndex]._id;
if (MultiSelection.isActive()) {
for (const cardId of MultiSelection.getSelectedCardIds())
Cards.findOne(cardId).toggleAssignee(memberId);
} else {
const cardId = getSelectedCardId();
if (!cardId)
return;
Cards.findOne(cardId).toggleAssignee(memberId);
}
});
Mousetrap.bind('m', evt => {
const cardId = getSelectedCardId();
if (!cardId) {
return;
}
const currentUserId = Meteor.userId();
if (currentUserId === null) {
return;
}
if (ReactiveCache.getCurrentUser().isBoardMember()) {
const card = Cards.findOne(cardId);
card.toggleAssignee(currentUserId);
// We should prevent scrolling in card when spacebar is clicked
// This should do it according to Mousetrap docs, but it doesn't
evt.preventDefault();
}
});
Mousetrap.bind('space', evt => {
const cardId = getSelectedCardId();
if (!cardId) {
@ -242,7 +143,7 @@ Mousetrap.bind('space', evt => {
}
if (ReactiveCache.getCurrentUser().isBoardMember()) {
const card = Cards.findOne(cardId);
const card = ReactiveCache.getCard(cardId);
card.toggleMember(currentUserId);
// We should prevent scrolling in card when spacebar is clicked
// This should do it according to Mousetrap docs, but it doesn't
@ -250,7 +151,7 @@ Mousetrap.bind('space', evt => {
}
});
const archiveCard = evt => {
Mousetrap.bind('c', evt => {
const cardId = getSelectedCardId();
if (!cardId) {
return;
@ -262,40 +163,8 @@ const archiveCard = evt => {
}
if (Utils.canModifyBoard()) {
const card = Cards.findOne(cardId);
const card = ReactiveCache.getCard(cardId);
card.archive();
// We should prevent scrolling in card when spacebar is clicked
// This should do it according to Mousetrap docs, but it doesn't
evt.preventDefault();
}
};
// Archive card has multiple shortcuts
Mousetrap.bind('c', archiveCard);
Mousetrap.bind('-', archiveCard);
// Same as above, this time for Persian keyboard.
// https://github.com/wekan/wekan/pull/5589#issuecomment-2516776519
Mousetrap.bind('÷', archiveCard);
Mousetrap.bind('n', evt => {
const cardId = getSelectedCardId();
if (!cardId) {
return;
}
const currentUserId = Meteor.userId();
if (currentUserId === null) {
return;
}
if (Utils.canModifyBoard()) {
// Find the current hovered card
const card = Cards.findOne(cardId);
// Find the button and click it
$(`#js-list-${card.listId} .list-body .minicards .open-minicard-composer`).click();
// We should prevent scrolling in card when spacebar is clicked
// This should do it according to Mousetrap docs, but it doesn't
evt.preventDefault();
@ -312,14 +181,6 @@ Template.keyboardShortcuts.helpers({
keys: ['q'],
action: 'shortcut-filter-my-cards',
},
{
keys: ['a'],
action: 'shortcut-filter-my-assigned-cards',
},
{
keys: ['n'],
action: 'add-card-to-bottom-of-list',
},
{
keys: ['f'],
action: 'shortcut-toggle-filterbar',
@ -346,14 +207,10 @@ Template.keyboardShortcuts.helpers({
},
{
keys: ['SPACE'],
action: 'shortcut-add-self',
},
{
keys: ['m'],
action: 'shortcut-assign-self',
},
{
keys: ['c', '÷', '-'],
keys: ['c'],
action: 'archive-card',
},
{
@ -364,9 +221,5 @@ Template.keyboardShortcuts.helpers({
keys: ['shift + number keys 1-9'],
action: 'remove-labels-multiselect'
},
{
keys: ['ctrl + alt + number keys 1-9'],
action: 'toggle-assignees'
},
],
});

View file

@ -4,11 +4,10 @@ Utils = {
setBackgroundImage(url) {
const currentBoard = Utils.getCurrentBoard();
if (currentBoard.backgroundImageURL !== undefined) {
$(".board-wrapper").css({"background":"url(" + currentBoard.backgroundImageURL + ")","background-size":"cover"});
$(".board-wrapper,.board-wrapper .board-canvas").css({"background":"url(" + currentBoard.backgroundImageURL + ")","background-size":"cover"});
$(".swimlane,.swimlane .list,.swimlane .list .list-body,.swimlane .list:first-child .list-body").css({"background-color":"transparent"});
$(".minicard").css({"opacity": "0.9"});
} else if (currentBoard["background-color"]) {
currentBoard.setColor(currentBoard["background-color"]);
} else if (currentBoard.color !== undefined) {
currentBoard.setColor(currentBoard.color);
}
},
/** returns the current board id

View file

@ -16,8 +16,6 @@ export const ALLOWED_BOARD_COLORS = [
'modern',
'moderndark',
'exodark',
'cleandark',
'cleanlight',
];
export const ALLOWED_COLORS = [
'white',

View file

@ -55,30 +55,6 @@ FlowRouter.route('/public', {
},
});
FlowRouter.route('/accessibility', {
name: 'accessibility',
triggersEnter: [AccountsTemplates.ensureSignedIn],
action() {
Session.set('currentBoard', null);
Session.set('currentList', null);
Session.set('currentCard', null);
Session.set('popupCardId', null);
Session.set('popupCardBoardId', null);
Filter.reset();
Session.set('sortBy', '');
EscapeActions.executeAll();
Utils.manageCustomUI();
Utils.manageMatomo();
BlazeLayout.render('defaultLayout', {
headerBar: 'accessibilityHeaderBar',
content: 'accessibility',
});
},
});
FlowRouter.route('/b/:id/:slug', {
name: 'board',
action(params) {

View file

@ -1,3 +1,5 @@
version: '2'
# Note: Do not add single quotes '' to variables. Having spaces still works without quotes where required.
#---------------------------------------------------------------------------------------------------------
# ==== CREATING USERS AND LOGGING IN TO WEKAN ====
@ -10,13 +12,13 @@
# NOTE: MongoDB has changed from 3.x to 4.x, in that case you need backup/restore with --noIndexRestore
# see https://github.com/wekan/wekan/wiki/Backup
# 1) Stop Wekan:
# docker compose stop
# docker-compose stop
# 2) Remove old Wekan app (wekan-app only, not that wekan-db container that has all your data)
# docker rm wekan-app
# 3) Get newest docker-compose.yml from https://github.com/wekan/wekan to have correct image,
# for example: "image: quay.io/wekan/wekan" or version tag "image: quay.io/wekan/wekan:v4.52"
# 4) Start Wekan:
# docker compose up -d
# docker-compose up -d
#----------------------------------------------------------------------------------
# ==== OPTIONAL: DEDICATED DOCKER USER ====
# 1) Optionally create a dedicated user for Wekan, for example:
@ -36,14 +38,14 @@
# ----------------------------------------------------------------------------------
# ==== USAGE OF THIS docker-compose.yml ====
# 1) For seeing does Wekan work, try this and check with your web browser:
# docker compose up
# docker-compose up
# 2) Stop Wekan and start Wekan in background:
# docker compose stop
# docker compose up -d
# docker-compose stop
# docker-compose up -d
# 3) See running Docker containers:
# docker ps
# 4) Stop Docker containers:
# docker compose stop
# docker-compose stop
# ----------------------------------------------------------------------------------
# ===== INSIDE DOCKER CONTAINERS, AND BACKUP/RESTORE ====
# https://github.com/wekan/wekan/wiki/Backup
@ -140,7 +142,7 @@ services:
- wekan-tier
#-------------------------------------------------------------------------------------
# ==== BUILD wekan-app DOCKER CONTAINER FROM SOURCE, if you uncomment these ====
# ==== and use commands: docker compose up -d --build
# ==== and use commands: docker-compose up -d --build
#build:
# context: .
# dockerfile: Dockerfile
@ -389,8 +391,6 @@ services:
#- OAUTH2_CA_CERT=ABCD1234
# Use OAuth2 ADFS additional changes. Also needs OAUTH2_ENABLED=true setting.
#- OAUTH2_ADFS_ENABLED=false
# Azure AD B2C. https://github.com/wekan/wekan/issues/5242
#- OAUTH2_B2C_ENABLED=false
# OAuth2 login style: popup or redirect.
#- OAUTH2_LOGIN_STYLE=redirect
# Application GUID captured during app registration:
@ -442,15 +442,11 @@ services:
# OAuth2 login style: popup or redirect.
#- OAUTH2_LOGIN_STYLE=redirect
#- OAUTH2_CLIENT_ID=<Keycloak create Client ID>
#- OAUTH2_SERVER_URL=<Keycloak server url - https://keycloak.example.com>
#- OAUTH2_SERVER_URL=<Keycloak server name>/auth
#- OAUTH2_AUTH_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/auth
#- OAUTH2_USERINFO_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/userinfo
#- OAUTH2_TOKEN_ENDPOINT=/realms/<keycloak realm>/protocol/openid-connect/token
#- OAUTH2_SECRET=<keycloak client secret>
#- OAUTH2_ID_MAP=sub
#- OAUTH2_USERNAME_MAP=preferred_username
#- OAUTH2_EMAIL_MAP=email
#- OAUTH2_FULLNAME_MAP=name
#-----------------------------------------------------------------
# ==== OAUTH2 DOORKEEPER ====
# https://github.com/wekan/wekan/issues/1874
@ -577,14 +573,10 @@ services:
# If the sync of the users should be done in the background
#- LDAP_BACKGROUND_SYNC=false
#
# LDAP_BACKGROUND_SYNC_INTERVAL : At which interval does the background task sync in milliseconds
# At which interval does the background task sync.
# The format must be as specified in:
# https://bunkat.github.io/later/parsers.html#text
#- LDAP_BACKGROUND_SYNC_INTERVAL=every 1 hours
# At which interval does the background task sync in milliseconds.
# Leave this unset, so it uses default, and does not crash.
# https://github.com/wekan/wekan/issues/2354#issuecomment-515305722
- LDAP_BACKGROUND_SYNC_INTERVAL=''
#- LDAP_BACKGROUND_SYNC_INTERVAL=every 1 hour
#
#- LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED=false
#
@ -593,7 +585,7 @@ services:
# If using LDAPS: LDAP_ENCRYPTION=ssl
#- LDAP_ENCRYPTION=false
#
# The certification for the LDAPS server. Certificate needs to be included in this docker compose.yml file.
# The certification for the LDAPS server. Certificate needs to be included in this docker-compose.yml file.
#- LDAP_CA_CERT=-----BEGIN CERTIFICATE-----MIIE+G2FIdAgIC...-----END CERTIFICATE-----
#
# Reject Unauthorized Certificate

View file

@ -575,14 +575,10 @@ services:
# If the sync of the users should be done in the background
#- LDAP_BACKGROUND_SYNC=false
#
# LDAP_BACKGROUND_SYNC_INTERVAL : At which interval does the background task sync in milliseconds
# At which interval does the background task sync.
# The format must be as specified in:
# https://bunkat.github.io/later/parsers.html#text
#- LDAP_BACKGROUND_SYNC_INTERVAL=every 1 hours
# At which interval does the background task sync in milliseconds.
# Leave this unset, so it uses default, and does not crash.
# https://github.com/wekan/wekan/issues/2354#issuecomment-515305722
- LDAP_BACKGROUND_SYNC_INTERVAL=''
#- LDAP_BACKGROUND_SYNC_INTERVAL=every 1 hour
#
#- LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED=false
#

View file

@ -1,41 +0,0 @@
Wekan provides a python script to ease the call of the REST API from command line interface.
# Context
- [API Login to get Bearer token](REST-API#example-call---as-form-data)
- [API docs and examples for various programming languages](https://wekan.github.io/api/), there is Boards / Export for exporting board with API
- In the right menu, scroll down REST API Docs etc links =====>
- Wekan-Gogs integration with Node.js https://github.com/wekan/wekan-gogs
# Install
You need python3.
Windows
```
choco install python3
# REBOOT
pip3 install pip --upgrade
pip3 install json
python3 wekan.py
```
Debian/Ubuntu
```
sudo apt-get -y install python3 python3-pip python3-simplejson
sudo pip3 install pip --upgrade
chmod +x wekan.py
./wekan.py
```
# Usage
Copy the api.py script to you machine. [Newest Wekan Python CLI api.py here](https://raw.githubusercontent.com/wekan/wekan/master/api.py).
Then, in this script, look for and change:
- wekanurl: https://boards.example.com => Your Wekan URL
- username (could be username or username@example.com)
- Only works with password login admin user. Does not work with LDAP, OAuth2 etc.
Keep in mind your Wekan credentials are potentially accessible in this file.
Then call it without any argument to see if everything is all right. You should just get usage examples.

View file

@ -1,56 +0,0 @@
# Disclaimer
This page tries to be as up to date as possible. If you see something wrong here, feel free to update the page and help other people like you, that greatly depends on our APIs. If you don't feel comfortable doing this kind of changes, please contact us by creating an [issue](https://github.com/wekan/wekan/issues/new).
## Information about boards of user
```
curl -H "Authorization: Bearer a6DM_gOPRwBdynfXaGBaiiEwTiAuigR_Fj_81QmNpnf" \
http://localhost:3000/api/users/XQMZgynx9M79qTtQc/boards
```
## Add/Remove Board Member and Change Role
[Add/Remove Board Member and Change Role admin/normal/nocomments/commentonly](REST-API-Role).
## The admin takes the ownership of ALL boards of the user (archived and not archived) where the user is admin on.
| URL | Requires Admin Auth | HTTP Method |
| :--- | :--- | :--- |
| `/api/users/:id` | `yes` | `PUT` |
```shell
curl -H "Authorization: Bearer t7iYB86mXoLfP_XsMegxF41oKT7iiA9lDYiKVtXcctl" \
-H "Content-type:application/json" \
-X PUT \
http://localhost:3000/api/users/ztKvBTzCqmyJ77on8 \
-d '{ "action": "takeOwnership" }'
```
## Create board
Required:
- "title":"Board title here"
- "owner":"ABCDE12345" <= User ID in Wekan. Not username or email.
Optional, and defaults:
- "isAdmin":"true"
- "isActive":"true"
- "isNoComments":"false"
- "isCommentOnly":"false"
- "permission":"private" <== Set to "public" if you want public Wekan board
- "color":"belize" <== Board color: belize, nephritis, pomegranate, pumpkin, wisteria, midnight.
<img src="https://wekan.github.io/board-colors.png" width="40%" alt="Wekan logo" />
Example:
```
curl -H "Authorization: Bearer t7iYB86mXoLfP_XsMegxF41oKT7iiA9lDYiKVtXcctl" \
-H "Content-type:application/json" \
-X POST \
http://localhost:3000/api/boards \
-d '{"title":"Board title here","owner":"ABCDE12345","permission":"private","color":"nephritis"}'
```
## In Wekan code
If you believe that code is the best documentation, be our guest: [models/cards.js](https://github.com/wekan/wekan/blob/main/models/boards.js "Board API code")

View file

@ -1,94 +0,0 @@
# Disclaimer
This page tries to be as up to date as possible. If you see something wrong here, feel free to update the page and help other people like you, that greatly depends on our APIs. If you don't feel comfortable doing this kind of changes, please contact us by creating an [issue](https://github.com/wekan/wekan/issues/new).
# Retrieve cards by swimlane id
| API URL / Code Link | Requires Admin Auth | HTTP Method |
| :--- | :--- | :--- |
| [/api/boards/:boardId/swimlanes/:swimlaneId/cards](https://github.com/wekan/wekan/blob/c115046a7c86b30ab5deb8762d3ef7a5ea3f4f90/models/cards.js#L487) | `yes` | `GET` |
```shell
curl -H "Authorization: Bearer t7iYB86mXoLfP_XsMegxF41oKT7iiA9lDYiKVtXcctl" \
-X GET \
http://localhost:3000/api/boards/YRgy7Ku6uLFv2pYwZ/swimlanes/PgTuf6sFJsaxto5dC/cards
```
## Result example
```shell
{
"_id": "AzEeHS7KAGeYZCcak",
"title": "Create Auth Code",
"description": "Create Auth Code for application.",
"listId": "RPRtDTQMKpShpgqoj"
},
{
...
```
# Add Card to List-Board-Swimlane
| API URL / Code Link | Requires Admin Auth | HTTP Method |
| :--- | :--- | :--- |
| [/api/boards/:boardId/lists/:listId/cards](https://github.com/wekan/wekan/blob/c115046a7c86b30ab5deb8762d3ef7a5ea3f4f90/models/cards.js#L487) | `yes` | `POST` |
```shell
curl -H "Authorization: Bearer t7iYB86mXoLfP_XsMegxF41oKT7iiA9lDYiKVtXcctl" \
-H "Content-type:application/json" \
-X POST \
http://localhost:3000/api/boards/YRgy7Ku6uLFv2pYwZ/lists/PgTuf6sFJsaxto5dC/cards \
-d '{ "title": "Card title text", "description": "Card description text", "authorId": "The appropriate existing userId", "swimlaneId": "The destination swimlaneId" }'
```
## Result example
The new card's ID is returned in the format:
```json
{
"_id": "W9m9YxQKT6zZrKzRW"
}
```
# Update a card
You can change (any of) the card's title, list, and description.
| API URL / Code Link | Requires Admin Auth | HTTP Method |
| :--- | :--- | :--- |
| [/api/boards/:boardId/lists/:fromListId/cards/:cardId](https://github.com/wekan/wekan/blob/c115046a7c86b30ab5deb8762d3ef7a5ea3f4f90/models/cards.js#L520) | `yes` | `PUT` |
```shell
curl -H "Authorization: Bearer t7iYB86mXoLfP_XsMegxF41oKT7iiA9lDYiKVtXcctl" \
-H "Content-type:application/json" \
-X PUT \
http://localhost:3000/api/boards/YRgy7Ku6uLFv2pYwZ/lists/PgTuf6sFJsaxto5dC/cards/ssrNX9CvXvPxuC5DE \
-d '{ "title": "New title text", "listId": "New destination listId", "description": "New description text" }'
```
## Result example
The card's ID is returned in the format:
```json
{
"_id": "W9m9YxQKT6zZrKzRW"
}
```
# Delete a card
| API URL / Code Link | Requires Admin Auth | HTTP Method |
| :--- | :--- | :--- |
| [/api/boards/:boardId/lists/:listId/cards/:cardId](https://github.com/wekan/wekan/blob/c115046a7c86b30ab5deb8762d3ef7a5ea3f4f90/models/cards.js#L554) | `yes` | `DELETE` |
```shell
curl -H "Authorization: Bearer t7iYB86mXoLfP_XsMegxF41oKT7iiA9lDYiKVtXcctl" \
-H "Content-type:application/json" \
-X DELETE \
http://localhost:3000/api/boards/YRgy7Ku6uLFv2pYwZ/lists/PgTuf6sFJsaxto5dC/cards/ssrNX9CvXvPxuC5DE \
-d '{ "authorId": "the appropriate existing userId"}'
```
## Result example
The card's ID is returned in the format:
```json
{
"_id": "W9m9YxQKT6zZrKzRW"
}
```
# In Wekan code
If you believe that code is the best documentation, be our guest: [models/cards.js](https://github.com/wekan/wekan/blob/main/models/cards.js "Card API code")

Some files were not shown because too many files have changed in this diff Show more