@@ -1,52 +1,50 | |||
|
1 | 1 | # Redmine - project management software |
|
2 |
# Copyright (C) 2006-20 |
|
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | module Redmine |
|
19 | 19 | module WikiFormatting |
|
20 | 20 | module Textile |
|
21 | 21 | module Helper |
|
22 | 22 | def wikitoolbar_for(field_id) |
|
23 | 23 | heads_for_wiki_formatter |
|
24 | 24 | # Is there a simple way to link to a public resource? |
|
25 | 25 | url = "#{Redmine::Utils.relative_url_root}/help/wiki_syntax.html" |
|
26 | ||
|
27 | help_link = l(:setting_text_formatting) + ': ' + | |
|
28 | link_to(l(:label_help), url, | |
|
26 | help_link = link_to(l(:setting_text_formatting), url, | |
|
29 | 27 |
|
|
30 | 28 | |
|
31 | 29 | javascript_tag("var wikiToolbar = new jsToolBar($('#{field_id}')); wikiToolbar.setHelpLink('#{help_link}'); wikiToolbar.draw();") |
|
32 | 30 | end |
|
33 | 31 | |
|
34 | 32 | def initial_page_content(page) |
|
35 | 33 | "h1. #{@page.pretty_title}" |
|
36 | 34 | end |
|
37 | 35 | |
|
38 | 36 | def heads_for_wiki_formatter |
|
39 | 37 | unless @heads_for_wiki_formatter_included |
|
40 | 38 | content_for :header_tags do |
|
41 | 39 | javascript_include_tag('jstoolbar/jstoolbar') + |
|
42 | 40 | javascript_include_tag('jstoolbar/textile') + |
|
43 | 41 | javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language.to_s.downcase}") + |
|
44 | 42 | stylesheet_link_tag('jstoolbar') |
|
45 | 43 | end |
|
46 | 44 | @heads_for_wiki_formatter_included = true |
|
47 | 45 | end |
|
48 | 46 | end |
|
49 | 47 | end |
|
50 | 48 | end |
|
51 | 49 | end |
|
52 | 50 | end |
@@ -1,95 +1,96 | |||
|
1 | 1 | .jstEditor { |
|
2 | 2 | padding-left: 0px; |
|
3 | 3 | } |
|
4 | 4 | .jstEditor textarea, .jstEditor iframe { |
|
5 | 5 | margin: 0; |
|
6 | 6 | } |
|
7 | 7 | |
|
8 | 8 | .jstHandle { |
|
9 | 9 | height: 10px; |
|
10 | 10 | font-size: 0.1em; |
|
11 | 11 | cursor: s-resize; |
|
12 | 12 | /*background: transparent url(img/resizer.png) no-repeat 45% 50%;*/ |
|
13 | 13 | } |
|
14 | 14 | |
|
15 | 15 | .jstElements { |
|
16 | 16 | padding: 3px 3px; |
|
17 | 17 | } |
|
18 | 18 | |
|
19 | 19 | .jstElements button { |
|
20 | 20 | margin-right : 6px; |
|
21 | 21 | width : 24px; |
|
22 | 22 | height: 24px; |
|
23 | 23 | padding: 4px; |
|
24 | 24 | border-style: solid; |
|
25 | 25 | border-width: 1px; |
|
26 | 26 | border-color: #ddd; |
|
27 | 27 | background-color : #f7f7f7; |
|
28 | 28 | background-position : 50% 50%; |
|
29 | 29 | background-repeat: no-repeat; |
|
30 | 30 | } |
|
31 | 31 | .jstElements button:hover { |
|
32 | 32 | border-color : #000; |
|
33 | 33 | } |
|
34 | 34 | .jstElements button span { |
|
35 | 35 | display : none; |
|
36 | 36 | } |
|
37 | 37 | .jstElements span { |
|
38 | 38 | display : inline; |
|
39 | 39 | } |
|
40 | 40 | |
|
41 | 41 | .jstSpacer { |
|
42 | 42 | width : 0px; |
|
43 | 43 | font-size: 1px; |
|
44 | 44 | margin-right: 4px; |
|
45 | 45 | } |
|
46 | 46 | |
|
47 |
.jstElements .help { float: right; margin-right: |
|
|
47 | .jstElements .help { float: right; margin-right: 0.5em; padding-top: 8px; font-size: 0.9em; } | |
|
48 | .jstElements .help a {padding: 2px 0 2px 20px; background: url(../images/help.png) no-repeat 0 50%;} | |
|
48 | 49 | |
|
49 | 50 | /* Buttons |
|
50 | 51 | -------------------------------------------------------- */ |
|
51 | 52 | .jstb_strong { |
|
52 | 53 | background-image: url(../images/jstoolbar/bt_strong.png); |
|
53 | 54 | } |
|
54 | 55 | .jstb_em { |
|
55 | 56 | background-image: url(../images/jstoolbar/bt_em.png); |
|
56 | 57 | } |
|
57 | 58 | .jstb_ins { |
|
58 | 59 | background-image: url(../images/jstoolbar/bt_ins.png); |
|
59 | 60 | } |
|
60 | 61 | .jstb_del { |
|
61 | 62 | background-image: url(../images/jstoolbar/bt_del.png); |
|
62 | 63 | } |
|
63 | 64 | .jstb_code { |
|
64 | 65 | background-image: url(../images/jstoolbar/bt_code.png); |
|
65 | 66 | } |
|
66 | 67 | .jstb_h1 { |
|
67 | 68 | background-image: url(../images/jstoolbar/bt_h1.png); |
|
68 | 69 | } |
|
69 | 70 | .jstb_h2 { |
|
70 | 71 | background-image: url(../images/jstoolbar/bt_h2.png); |
|
71 | 72 | } |
|
72 | 73 | .jstb_h3 { |
|
73 | 74 | background-image: url(../images/jstoolbar/bt_h3.png); |
|
74 | 75 | } |
|
75 | 76 | .jstb_ul { |
|
76 | 77 | background-image: url(../images/jstoolbar/bt_ul.png); |
|
77 | 78 | } |
|
78 | 79 | .jstb_ol { |
|
79 | 80 | background-image: url(../images/jstoolbar/bt_ol.png); |
|
80 | 81 | } |
|
81 | 82 | .jstb_bq { |
|
82 | 83 | background-image: url(../images/jstoolbar/bt_bq.png); |
|
83 | 84 | } |
|
84 | 85 | .jstb_unbq { |
|
85 | 86 | background-image: url(../images/jstoolbar/bt_bq_remove.png); |
|
86 | 87 | } |
|
87 | 88 | .jstb_pre { |
|
88 | 89 | background-image: url(../images/jstoolbar/bt_pre.png); |
|
89 | 90 | } |
|
90 | 91 | .jstb_link { |
|
91 | 92 | background-image: url(../images/jstoolbar/bt_link.png); |
|
92 | 93 | } |
|
93 | 94 | .jstb_img { |
|
94 | 95 | background-image: url(../images/jstoolbar/bt_img.png); |
|
95 | 96 | } |
General Comments 0
You need to be logged in to leave comments.
Login now