Attachment 'editor-interface.patch'

Download

   1 diff --git a/templates/modify_applet.html b/templates/modify_applet.html
   2 index 1027961..0158e0f 100644
   3 --- a/templates/modify_applet.html
   4 +++ b/templates/modify_applet.html
   5 @@ -1,22 +1,50 @@
   6  {% extends theme("layout.html") %}
   7 +{% block head_scripts %}
   8 +{{ super() }}
   9 +<script type="text/javascript">
  10 +var selectedTab;
  11 +
  12 +selectTab = function(tabId) {
  13 +    if (selectedTab)
  14 +        $('#' + selectedTab).hide();
  15 +
  16 +    if (selectedTab == tabId) {
  17 +        selectedTab = null;
  18 +        return;
  19 +    }
  20 +
  21 +    $('#' + tabId).show();
  22 +    selectedTab = tabId;
  23 +}
  24 +</script>
  25 +{% endblock %}
  26  {% block content %}
  27  <h1>{{ _("Modifying %(item_name)s", item_name=item_name) }}</h1>
  28  <div class="moin-form">
  29  <form action="" method="POST" enctype="multipart/form-data">
  30  <input type="hidden" name="action" value="modify" />
  31  <input type="hidden" name="rev" value="{{ revno }}" />
  32 -{% block extra_form %}{% endblock %}
  33 +{% block extra_form %}
  34 +<input class="button tab-button" type="button" name="button_upload" value="{{ _("Upload") }}" onclick="selectTab('tab_upload');" />
  35 +<input class="button tab-button" type="button" name="button_metadata" value="{{ _("Metadata") }}" onclick="selectTab('tab_metadata');" >
  36 +<input class="button tab-button" type="button" name="button_help" value="{{ _("Help") }}" onclick="selectTab('tab_help');" />
  37 +{% endblock %}
  38 +<div id="tabs">
  39 +    {% block extra_tabs %}{% endblock %}
  40 +    <div id="tab_upload" style="display: none;">
  41 +        <dl>
  42 +                <label for="data_file">{{ _("Upload file:") }}</label>
  43 +                <input type="file" id="data_file" name="data_file" />
  44 +        </dl>
  45 +    </div>
  46 +    <div id="tab_metadata" style="display: none;">
  47 +        <textarea name="meta_text" lang="en" dir="ltr" rows="{{ rows_meta }}" cols="{{ cols }}">{{ meta_text }}</textarea>
  48 +    </div>
  49 +    <div id="tab_help" style="display: none;">
  50 +        <pre>{{ help }}</pre>
  51 +    </div>
  52 +</div>
  53  {% block data_editor %}{% endblock %}
  54 -    <dl>
  55 -        <dt>
  56 -            <label for="data_file">{{ _("Upload file:") }}</label>
  57 -         </dt>
  58 -         <dd>
  59 -            <input type="file" id="data_file" name="data_file" />
  60 -        </dd>
  61 -    </dl>
  62 -<pre>{{ help }}</pre>
  63 -<textarea name="meta_text" lang="en" dir="ltr" rows="{{ rows_meta }}" cols="{{ cols }}">{{ meta_text }}</textarea>
  64  </form>
  65  </div>
  66  {% endblock %}
  67 diff --git a/templates/modify_binary.html b/templates/modify_binary.html
  68 index e3c06ca..a55dc39 100644
  69 --- a/templates/modify_binary.html
  70 +++ b/templates/modify_binary.html
  71 @@ -3,8 +3,13 @@
  72  {% block extra_form %}
  73  <input class="button" type="submit" name="button_save" value="{{ _("Save") }}" />
  74  <input class="button" type="submit" name="button_cancel" value="{{ _("Cancel") }}" />
  75 +<input class="button" type="button" name="button_comment" value="{{ _("Comment") }}" onclick="selectTab('tab_comment');" />
  76 +{{ super() }}
  77  {{ forms.render_textcha(gen, form) }}
  78  <br />
  79 -<label for="comment">{{ _("Comment:") }}</label><input type="text" id="comment" name="comment" size="80" maxlength="200" value="{{ comment }}" />
  80 -<br />
  81 +{% endblock %}
  82 +{% block extra_tabs %}
  83 +<div id="tab_comment" style="display: none;">
  84 +    <label for="comment">{{ _("Comment:") }}</label><input type="text" id="comment" name="comment" size="80" maxlength="200" value="{{ comment }}" />
  85 +</div>
  86  {% endblock %}

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2011-03-18 22:15:25, 3.3 KB) [[attachment:editor-interface.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.