Sha256: f5f92acb130ee37d6b625eb665d4aa3ceb16016bbd182b485c2af9d7c6de2aaf
Contents?: true
Size: 1.87 KB
Versions: 54
Compression:
Stored size: 1.87 KB
Contents
<style type="text/css"> .CodeMirror-line-numbers { padding: 6px 6px 0; line-height: 15px; font-size: 7pt; color: #777; } .CodeMirror-line-numbers div { text-align: right; } </style> <%= flash_message %> <h2>Edit Master <%= case params[:id] when 'template' then 'Template' when 'web_stylesheet' then 'Web Stylesheet' when 'print_stylesheet' then 'Print Stylesheet' end %></h2> <%= form_tag({}, { :onsubmit => "file_content.toggleEditor();" }) do -%> <table width="100%" height="100%"> <tr> <td> <%= text_area_tag :file_content, h(@file_content), :class => "codepress #{@file_type} autocomplete-off", :style => 'width: 100%; height: 600px;' %> <%- case params[:id] when 'template' -%> <%= javascript_tag "if (typeof(CodeMirror) == 'function') { var editor = CodeMirror.fromTextArea('file_content', { parserfile: ['parsexml.js', 'parsejavascript.js', 'tokenizejavascript.js', 'parsecss.js', 'parsehtmlmixed.js'], stylesheet: ['/javascripts/codemirror/css/xmlcolors.css', '/javascripts/codemirror/css/csscolors.css'], path: '/javascripts/codemirror/', lineNumbers: true, textWrapping: false, indentUnit: 2, tabMode: 'spaces', electricChars: false }); }" %> <%- when 'web_stylesheet', 'print_stylesheet' -%> <%= javascript_tag "if (typeof(CodeMirror) == 'function') { var editor = CodeMirror.fromTextArea('file_content', { parserfile: ['parsecss.js'], stylesheet: '/javascripts/codemirror/css/csscolors.css', path: '/javascripts/codemirror/', lineNumbers: true, textWrapping: false, indentUnit: 2, tabMode: 'spaces', electricChars: false }); }" %> <%- end -%> </td> </tr> <tr> <td> <%= submit_tag 'Save File', :class => 'form_button' %> <%= link_to 'Cancel', :action => 'index' %> </td> </tr> </table> <br/> <%= render :partial => 'template_reference' %> <%- end -%>
Version data entries
54 entries across 54 versions & 1 rubygems