プロジェクト

全般

プロフィール

Vote #80064

未完了

Formating toolbar : new color tools

Admin Redmine さんがほぼ4年前に追加. ほぼ4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
UI_10
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
32
issue_org_id:
31385
author_id:
36999
assigned_to_id:
0
comments:
13
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

This patch provides 2 new tools with a new color palette to change sélection color :

  • text color
  • background color

journals

The correct issue title should : Formating toolbar : new color tools

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Here is the patch, and the 2 new images to put in *public/images/jstoolbar/*

This patch does not manage the case when we want background an text color at the same time.

--------------------------------------------------------------------------------
!{border: 1px solid}text_color.png!

!{border: 1px solid}text_color_and_background.png!
--------------------------------------------------------------------------------
Here is a new patch managing some mixed cases of color / background color.

Detects if selected text already contains a css tag.
* If tag contains the css we want, replace the color.
* If not, add the css to the other tags.
--------------------------------------------------------------------------------
Fixed previous patch.

Managed more mixed color / background color tags.

@Go thanks to have renamed the issue subject
--------------------------------------------------------------------------------
The patch seems supports only Textile but Markdown. Since Redmine supports both Textile and Markdown, I think the patch should also support Markdown.
--------------------------------------------------------------------------------
Hi, I am going to provide the patch for <span style color="green">Markdown</span>

Now that %{color:green}Textile is OK%.
--------------------------------------------------------------------------------
Hi, here is a patch to apply after the previous patch.
It includes *code refactoring* and *Markdown support*.
For Markdown, *html filter* must be disabled (C.f. http://www.redmine.org/boards/2/topics/56096?r=57052#message-57052).

One remark about responsive design, the tools icons div has no horizontal scrollbar enabled. Thus some icons on the right can disappear with smaller window size.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Thanks Go to have proposed this for the next major release.
--------------------------------------------------------------------------------
Two latest patches don't work without:
<pre><code class="diff">
Index: public/javascripts/jstoolbar/jstoolbar.js
===================================================================
--- public/javascripts/jstoolbar/jstoolbar.js (date 1568621686000)
+++ public/javascripts/jstoolbar/jstoolbar.js (date 1568636186385)
@@ -373,12 +373,12 @@
}

if (typeof(fn) == 'function') {
- res = (sel) ? fn.call(this,sel) : fn('');
+ res = (sel) ? fn.call(this,sel,prefix,suffix) : fn('');
} else {
res = (sel) ? sel : '';
}

- subst = prefix + res + suffix;
+ subst = res;

if (typeof(document["selection"]) != "undefined") {
document.selection.createRange().text = subst;
</code></pre>

Am I missing something? That change have never been mentioned in any of related patches.
--------------------------------------------------------------------------------
Hello, you're right changes to jstoolbar.js were missing.

Here is the full SVN diff for this file.
--------------------------------------------------------------------------------

Admin Redmine さんがほぼ4年前に更新

  • カテゴリUI_10 にセット
  • 対象バージョンCandidate for next major release_32 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0