/[webpac2]/Webpacus/root/editor/template.tt
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /Webpacus/root/editor/template.tt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 175 - (hide annotations)
Sun Nov 27 04:45:56 2005 UTC (18 years, 5 months ago) by dpavlin
File size: 1255 byte(s)
 r11186@llin:  dpavlin | 2005-11-27 05:48:19 +0100
 first try at implementing decent text-only editor, based on quicktags
 added tab support and dynamic creation of toolbars

1 dpavlin 137
2 dpavlin 170 [% c.prototype.form_remote_tag(
3     url => base _ 'editor/template',
4     update => 'div_template_status',
5     loading => 'show_working();',
6     loaded => 'reload_rec(); hide_working();',
7     html_options => {
8     name => 'form_editor_css',
9     }
10     ) %]
11 dpavlin 169 <div id="div_template_form">
12 dpavlin 167
13 dpavlin 175 <script type="text/javascript">edToolbar();</script>
14    
15 dpavlin 134 <form name="form_editor_template" action="[% base %]" method="post">
16    
17 dpavlin 175 <div id="template_content_toolbar">
18     <span class="notice">...not changed yet...</span>
19     </div>
20    
21     <textarea name="template_content" id="template_content" cols="80" rows="10"
22     onkeydown="return edTab(event);"
23     onfocus="return edFocus('template_content');"
24     onblur="_ts('not saved'); return edBlur();"
25     >
26 dpavlin 134 [% template_content %]
27     </textarea>
28    
29 dpavlin 165 <div class="edit_bar">
30    
31 dpavlin 172 <input type="submit" name="save_template" value="Save" />
32 dpavlin 164 <span id="div_template_status" class="notice">idle</span>
33 dpavlin 134
34     <input type="hidden" name="template_filename" value="[% template_filename %]" />
35    
36 dpavlin 165 </div>
37    
38 dpavlin 134 </form>
39 dpavlin 137
40     </div>
41 dpavlin 169
42     <div id="div_template_list">
43    
44     Templates:
45    
46     <ul>
47     [% FOREACH t IN template_list %]
48     [% IF t == template_filename %]
49     <li id="template_list_selected">[% t %]</li>
50     [% ELSE %]
51     <li><a href="#" onclick="return switch_template('[% t %]');">[% t %]</a></li>
52     [% END %]
53     [% END %]
54     </ul>
55    
56     </div>

  ViewVC Help
Powered by ViewVC 1.1.26