Browse Source

Add Feature: User can have richer formatted text into the comments (admin-panel fixed)

Sam X. Chen 6 năm trước cách đây
mục cha
commit
a5c1395c46

+ 2 - 2
client/components/main/editor.js

@@ -1,6 +1,6 @@
 Template.editor.onRendered(() => {
 Template.editor.onRendered(() => {
   const textareaSelector = 'textarea';
   const textareaSelector = 'textarea';
-  const disableRicherEditor = Meteor.settings.public.NO_RICHER_EDITOR;
+  const enableRicherEditor = Meteor.settings.public.RICHER_EDITOR || true;
   const mentions = [
   const mentions = [
     // User mentions
     // User mentions
     {
     {
@@ -31,7 +31,7 @@ Template.editor.onRendered(() => {
     autosize($textarea);
     autosize($textarea);
     $textarea.escapeableTextComplete(mentions);
     $textarea.escapeableTextComplete(mentions);
   };
   };
-  if (!disableRicherEditor) {
+  if (enableRicherEditor) {
     const isSmall = Utils.isMiniScreen();
     const isSmall = Utils.isMiniScreen();
     const toolbar = isSmall
     const toolbar = isSmall
       ? [
       ? [

+ 3 - 0
client/components/main/layouts.styl

@@ -6,6 +6,9 @@ global-reset()
   -webkit-box-sizing: unset
   -webkit-box-sizing: unset
   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
 html, body, input, select, textarea, button
   font: 14px Roboto, "Helvetica Neue", Arial, Helvetica, sans-serif
   font: 14px Roboto, "Helvetica Neue", Arial, Helvetica, sans-serif
   line-height: 18px
   line-height: 18px

+ 18 - 18
client/components/settings/settingBody.jade

@@ -44,7 +44,7 @@ template(name="general")
         ul
         ul
           li
           li
             .title {{_ 'invite-people'}}
             .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
           li
             .title {{_ 'to-boards'}}
             .title {{_ 'to-boards'}}
             .bg-white
             .bg-white
@@ -63,20 +63,20 @@ template(name='email')
       .title {{_ 'smtp-host'}}
       .title {{_ 'smtp-host'}}
       .description {{_ 'smtp-host-description'}}
       .description {{_ 'smtp-host-description'}}
       .form-group
       .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
     li.smtp-form
       .title {{_ 'smtp-port'}}
       .title {{_ 'smtp-port'}}
       .description {{_ 'smtp-port-description'}}
       .description {{_ 'smtp-port-description'}}
       .form-group
       .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
     li.smtp-form
       .title {{_ 'smtp-username'}}
       .title {{_ 'smtp-username'}}
       .form-group
       .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
     li.smtp-form
       .title {{_ 'smtp-password'}}
       .title {{_ 'smtp-password'}}
       .form-group
       .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
     li.smtp-form
       .title {{_ 'smtp-tls'}}
       .title {{_ 'smtp-tls'}}
       .form-group
       .form-group
@@ -88,7 +88,7 @@ template(name='email')
     li.smtp-form
     li.smtp-form
       .title {{_ 'send-from'}}
       .title {{_ 'send-from'}}
       .form-group
       .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
     li
       button.js-save.primary {{_ 'save'}}
       button.js-save.primary {{_ 'save'}}
@@ -101,17 +101,17 @@ template(name='accountSettings')
     li.accounts-form
     li.accounts-form
       .title {{_ 'accounts-allowEmailChange'}}
       .title {{_ 'accounts-allowEmailChange'}}
       .form-group.flex
       .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'}}
         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'}}
         span {{_ 'no'}}
     li
     li
     li.accounts-form
     li.accounts-form
       .title {{_ 'accounts-allowUserNameChange'}}
       .title {{_ 'accounts-allowUserNameChange'}}
       .form-group.flex
       .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'}}
         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'}}
         span {{_ 'no'}}
     li
     li
       button.js-accounts-save.primary {{_ 'save'}}
       button.js-accounts-save.primary {{_ 'save'}}
@@ -128,7 +128,7 @@ template(name='announcementSettings')
         ul
         ul
           li
           li
             .title {{_ 'admin-announcement-title'}}
             .title {{_ 'admin-announcement-title'}}
-            textarea#admin-announcement.form-control= currentSetting.body
+            textarea#admin-announcement.wekan-form-control= currentSetting.body
           li
           li
             button.js-announcement-save.primary {{_ 'save'}}
             button.js-announcement-save.primary {{_ 'save'}}
 
 
@@ -137,16 +137,16 @@ template(name='layoutSettings')
     //li.layout-form
     //li.layout-form
       .title {{_ 'hide-logo'}}
       .title {{_ 'hide-logo'}}
       .form-group.flex
       .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'}}
         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'}}
         span {{_ 'no'}}
     li.layout-form
     li.layout-form
       .title {{_ 'display-authentication-method'}}
       .title {{_ 'display-authentication-method'}}
       .form-group.flex
       .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'}}
         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'}}
         span {{_ 'no'}}
     li.layout-form
     li.layout-form
       .title {{_ 'default-authentication-method'}}
       .title {{_ 'default-authentication-method'}}
@@ -154,13 +154,13 @@ template(name='layoutSettings')
     li.layout-form
     li.layout-form
       .title {{_ 'custom-product-name'}}
       .title {{_ 'custom-product-name'}}
       .form-group
       .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
     li.layout-form
       .title {{_ 'add-custom-html-after-body-start'}}
       .title {{_ 'add-custom-html-after-body-start'}}
-      textarea#customHTMLafterBodyStart.form-control= currentSetting.customHTMLafterBodyStart
+      textarea#customHTMLafterBodyStart.wekan-form-control= currentSetting.customHTMLafterBodyStart
     li.layout-form
     li.layout-form
       .title {{_ 'add-custom-html-before-body-end'}}
       .title {{_ 'add-custom-html-before-body-end'}}
-      textarea#customHTMLbeforeBodyEnd.form-control= currentSetting.customHTMLbeforeBodyEnd
+      textarea#customHTMLbeforeBodyEnd.wekan-form-control= currentSetting.customHTMLbeforeBodyEnd
     li
     li
       button.js-save-layout.primary {{_ 'save'}}
       button.js-save-layout.primary {{_ 'save'}}
 
 

+ 2 - 2
client/components/settings/settingBody.styl

@@ -105,14 +105,14 @@
 .bg-white
 .bg-white
   background #f9fbfc;
   background #f9fbfc;
 
 
-.form-control.has-error
+.wekan-form-control.has-error
   border-color: #a94442;
   border-color: #a94442;
   box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
   box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
 
 
 li.has-error
 li.has-error
   color #a94442
   color #a94442
   .form-group
   .form-group
-    .form-control
+    .wekan-form-control
       border-color: #a94442;
       border-color: #a94442;
       box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
       box-shadow: inset 0 1px 1px rgba(0,0,0,.075);