File: _custom_css.html.erb

package info (click to toggle)
redmine-plugin-custom-css 0.1.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 488 kB
  • ctags: 3
  • sloc: ruby: 22; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 778 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<%= stylesheet_link_tag 'codemirror', :plugin => :redmine_custom_css %>
<%= javascript_include_tag 'codemirror', :plugin => :redmine_custom_css %>

<style type="text/css">
    .CodeMirror {
        height: auto;
        min-height: 300px;
    }

    .CodeMirror-scroll {
        min-height: 300px;
    }
</style>

<p>
  <label><%= l(:label_cf_custom_css) %></label>
  <%= text_area_tag 'settings[css]', @settings[:css] %>
  <em class="info"> <%= l(:help_cf_css) %></em>
</p>

<script type="text/javascript">
    var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("settings_css"), {
        mode: "css",
        smartIndent: true,
        lineNumbers: true,
        matchBrackets: true,
        autofocus: true,
        viewportMargin: Infinity
    });
</script>