From a5c1395c46a2682f4e9c2cb1f2b36dd6aa930151 Mon Sep 17 00:00:00 2001 From: "Sam X. Chen" Date: Wed, 24 Jul 2019 11:01:30 -0400 Subject: Add Feature: User can have richer formatted text into the comments (admin-panel fixed) --- client/components/main/editor.js | 4 ++-- client/components/main/layouts.styl | 3 +++ client/components/settings/settingBody.jade | 36 ++++++++++++++--------------- client/components/settings/settingBody.styl | 4 ++-- 4 files changed, 25 insertions(+), 22 deletions(-) (limited to 'client') diff --git a/client/components/main/editor.js b/client/components/main/editor.js index 9c1ad7a8..0a6db12c 100755 --- a/client/components/main/editor.js +++ b/client/components/main/editor.js @@ -1,6 +1,6 @@ Template.editor.onRendered(() => { const textareaSelector = 'textarea'; - const disableRicherEditor = Meteor.settings.public.NO_RICHER_EDITOR; + const enableRicherEditor = Meteor.settings.public.RICHER_EDITOR || true; const mentions = [ // User mentions { @@ -31,7 +31,7 @@ Template.editor.onRendered(() => { autosize($textarea); $textarea.escapeableTextComplete(mentions); }; - if (!disableRicherEditor) { + if (enableRicherEditor) { const isSmall = Utils.isMiniScreen(); const toolbar = isSmall ? [ diff --git a/client/components/main/layouts.styl b/client/components/main/layouts.styl index cc8be6af..dafff251 100644 --- a/client/components/main/layouts.styl +++ b/client/components/main/layouts.styl @@ -6,6 +6,9 @@ global-reset() -webkit-box-sizing: unset box-sizing: unset +.note-popover .popover-content .note-color-palette div .note-color-btn, .panel-heading.note-toolbar .note-color-palette div .note-color-btn + background: none + html, body, input, select, textarea, button font: 14px Roboto, "Helvetica Neue", Arial, Helvetica, sans-serif line-height: 18px diff --git a/client/components/settings/settingBody.jade b/client/components/settings/settingBody.jade index 89911e09..43836b2b 100644 --- a/client/components/settings/settingBody.jade +++ b/client/components/settings/settingBody.jade @@ -44,7 +44,7 @@ template(name="general") ul li .title {{_ 'invite-people'}} - textarea#email-to-invite.form-control(rows='5', placeholder="{{_ 'email-addresses'}}") + textarea#email-to-invite.wekan-form-control(rows='5', placeholder="{{_ 'email-addresses'}}") li .title {{_ 'to-boards'}} .bg-white @@ -63,20 +63,20 @@ template(name='email') .title {{_ 'smtp-host'}} .description {{_ 'smtp-host-description'}} .form-group - input.form-control#mail-server-host(type="text", placeholder="smtp.domain.com" value="{{currentSetting.mailServer.host}}") + input.wekan-form-control#mail-server-host(type="text", placeholder="smtp.domain.com" value="{{currentSetting.mailServer.host}}") li.smtp-form .title {{_ 'smtp-port'}} .description {{_ 'smtp-port-description'}} .form-group - input.form-control#mail-server-port(type="text", placeholder="25" value="{{currentSetting.mailServer.port}}") + input.wekan-form-control#mail-server-port(type="text", placeholder="25" value="{{currentSetting.mailServer.port}}") li.smtp-form .title {{_ 'smtp-username'}} .form-group - input.form-control#mail-server-username(type="text", placeholder="{{_ 'username'}}" value="{{currentSetting.mailServer.username}}") + input.wekan-form-control#mail-server-username(type="text", placeholder="{{_ 'username'}}" value="{{currentSetting.mailServer.username}}") li.smtp-form .title {{_ 'smtp-password'}} .form-group - input.form-control#mail-server-password(type="password", placeholder="{{_ 'password'}}" value="{{currentSetting.mailServer.password}}") + input.wekan-form-control#mail-server-password(type="password", placeholder="{{_ 'password'}}" value="{{currentSetting.mailServer.password}}") li.smtp-form .title {{_ 'smtp-tls'}} .form-group @@ -88,7 +88,7 @@ template(name='email') li.smtp-form .title {{_ 'send-from'}} .form-group - input.form-control#mail-server-from(type="email", placeholder="no-reply@domain.com" value="{{currentSetting.mailServer.from}}") + input.wekan-form-control#mail-server-from(type="email", placeholder="no-reply@domain.com" value="{{currentSetting.mailServer.from}}") li button.js-save.primary {{_ 'save'}} @@ -101,17 +101,17 @@ template(name='accountSettings') li.accounts-form .title {{_ 'accounts-allowEmailChange'}} .form-group.flex - input.form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="true" checked="{{#if allowEmailChange}}checked{{/if}}") + input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="true" checked="{{#if allowEmailChange}}checked{{/if}}") span {{_ 'yes'}} - input.form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="false" checked="{{#unless allowEmailChange}}checked{{/unless}}") + input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="false" checked="{{#unless allowEmailChange}}checked{{/unless}}") span {{_ 'no'}} li li.accounts-form .title {{_ 'accounts-allowUserNameChange'}} .form-group.flex - input.form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="true" checked="{{#if allowUserNameChange}}checked{{/if}}") + input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="true" checked="{{#if allowUserNameChange}}checked{{/if}}") span {{_ 'yes'}} - input.form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="false" checked="{{#unless allowUserNameChange}}checked{{/unless}}") + input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="false" checked="{{#unless allowUserNameChange}}checked{{/unless}}") span {{_ 'no'}} li button.js-accounts-save.primary {{_ 'save'}} @@ -128,7 +128,7 @@ template(name='announcementSettings') ul li .title {{_ 'admin-announcement-title'}} - textarea#admin-announcement.form-control= currentSetting.body + textarea#admin-announcement.wekan-form-control= currentSetting.body li button.js-announcement-save.primary {{_ 'save'}} @@ -137,16 +137,16 @@ template(name='layoutSettings') //li.layout-form .title {{_ 'hide-logo'}} .form-group.flex - input.form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}") + input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="true" checked="{{#if currentSetting.hideLogo}}checked{{/if}}") span {{_ 'yes'}} - input.form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}") + input.wekan-form-control#hide-logo(type="radio" name="hideLogo" value="false" checked="{{#unless currentSetting.hideLogo}}checked{{/unless}}") span {{_ 'no'}} li.layout-form .title {{_ 'display-authentication-method'}} .form-group.flex - input.form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="true" checked="{{#if currentSetting.displayAuthenticationMethod}}checked{{/if}}") + input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="true" checked="{{#if currentSetting.displayAuthenticationMethod}}checked{{/if}}") span {{_ 'yes'}} - input.form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="false" checked="{{#unless currentSetting.displayAuthenticationMethod}}checked{{/unless}}") + input.wekan-form-control#display-authentication-method(type="radio" name="displayAuthenticationMethod" value="false" checked="{{#unless currentSetting.displayAuthenticationMethod}}checked{{/unless}}") span {{_ 'no'}} li.layout-form .title {{_ 'default-authentication-method'}} @@ -154,13 +154,13 @@ template(name='layoutSettings') li.layout-form .title {{_ 'custom-product-name'}} .form-group - input.form-control#product-name(type="text", placeholder="" value="{{currentSetting.productName}}") + input.wekan-form-control#product-name(type="text", placeholder="" value="{{currentSetting.productName}}") li.layout-form .title {{_ 'add-custom-html-after-body-start'}} - textarea#customHTMLafterBodyStart.form-control= currentSetting.customHTMLafterBodyStart + textarea#customHTMLafterBodyStart.wekan-form-control= currentSetting.customHTMLafterBodyStart li.layout-form .title {{_ 'add-custom-html-before-body-end'}} - textarea#customHTMLbeforeBodyEnd.form-control= currentSetting.customHTMLbeforeBodyEnd + textarea#customHTMLbeforeBodyEnd.wekan-form-control= currentSetting.customHTMLbeforeBodyEnd li button.js-save-layout.primary {{_ 'save'}} diff --git a/client/components/settings/settingBody.styl b/client/components/settings/settingBody.styl index dbf91a6c..b9300782 100644 --- a/client/components/settings/settingBody.styl +++ b/client/components/settings/settingBody.styl @@ -105,14 +105,14 @@ .bg-white background #f9fbfc; -.form-control.has-error +.wekan-form-control.has-error border-color: #a94442; box-shadow: inset 0 1px 1px rgba(0,0,0,.075); li.has-error color #a94442 .form-group - .form-control + .wekan-form-control border-color: #a94442; box-shadow: inset 0 1px 1px rgba(0,0,0,.075); -- cgit v1.2.3-1-g7c22