Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
4 data/templates/edit-add.htm
@@ -5,7 +5,7 @@
</a>
</div>
- {% include 'edit-file.htm' with {'file': null, 'fileid': 'new'} %}
+ {% include 'edit-file.htm' with {'file': null, 'fileid': 'new', 'newfile': true} %}
<script type="application/javascript">
$(document).ready(function() {
@@ -13,7 +13,7 @@
$('#filegroupnew').hide();
$('#add-button a').bind('click', function() {
$('#add-button').before("{% filter escape('js') %}
- {% include 'edit-file.htm' with {'file': null, 'fileid': '###'} %}
+ {% include 'edit-file.htm' with {'file': null, 'fileid': '###', 'newfile': true} %}
{% endfilter %}"
.replace(/###/g, $('.filegroup').length)
);
View
10 data/templates/edit-file.htm
@@ -1,13 +1,11 @@
<div class="well filegroup" id="filegroup{{fileid}}">
<div class="row-fluid">
<div class="span6">
- <label for="filename_1">Filename</label>
<input type="hidden" name="files[{{fileid}}][original_name]" value="{{file.getFilename}}"/>
- <input type="text" name="files[{{fileid}}][name]" id="filename_{{fileid}}" value="{{file.getFilename}}"/>
+ <input type="text" name="files[{{fileid}}][name]" id="filename_{{fileid}}" value="{{file.getFilename}}" placeholder="Filename"/>
</div>
- <div class="span6" style="text-align: right">
- <label for="type_{{fileid}}">Type</label>
- <!-- fixme: preselect -->
+ <div class="span6 typeselect" style="text-align: right" id="typeselect_{{fileid}}">
+ <label for="type_{{fileid}}" class="inline">Type</label>
<select name="files[{{fileid}}][type]" id="type_{{fileid}}">
{{htmlhelper.getLanguageOptions(file)|raw}}
</select>
@@ -22,10 +20,12 @@
<input type="file" name="files[{{fileid}}][upload]" id="upload_{{fileid}}" class="btn"/>
-->
</div>
+ {% if not newfile %}
<div class="span3" style="text-align: right">
<input type="checkbox" name="files[{{fileid}}][delete]" value="1" id="delete_{{fileid}}"/>
<label for="delete_{{fileid}}" class="inline">delete file</label>
</div>
+ {% endif %}
</div>
</div>
View
2  data/templates/edit.htm
@@ -9,7 +9,7 @@
</div>
{% for fileid, file in repo.getFiles %}
- {% include 'edit-file.htm' with {'file': file, 'fileid': fileid} %}
+ {% include 'edit-file.htm' with {'file': file, 'fileid': fileid, 'newfile': false} %}
{% endfor %}
{% include 'edit-add.htm' %}
View
2  data/templates/index.htm
@@ -8,7 +8,7 @@
<input type="text" name="description" id="description" value="{{description}}"/>
</div>
- {% include 'edit-file.htm' with {'file': file[1], 'fileid': 0} %}
+ {% include 'edit-file.htm' with {'file': file[1], 'fileid': 0, 'newfile': true} %}
{% include 'edit-add.htm' %}

No commit comments for this range

Something went wrong with that request. Please try again.