diff options
Diffstat (limited to 'templates/offline.html')
-rw-r--r-- | templates/offline.html | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/templates/offline.html b/templates/offline.html index bba1075..214170e 100644 --- a/templates/offline.html +++ b/templates/offline.html @@ -1,7 +1,7 @@ <div data-role="header" data-position="fixed"> <a id="offline-prev-btn" class="ui-btn-left">[% loc('Try Again') %]</a> <h1>[% loc('Offline') %]</h1> - <a id="offline-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right">[% loc('Skip') %]</a> + <a id="offline-next-btn" data-icon="arrow-r" data-iconpos="right" class="ui-btn-right"><%= files.length == 0 ? "[% loc('Skip') %]" : "[% loc('Next') %]" %></a> </div> <div id="locating" class="nodisplay"> <div class="radar"></div> @@ -42,30 +42,25 @@ </div> <div> - <textarea data-role="none" rows="7" cols="26" name="detail" id="form_detail" placeholder="Please fill in details of the problem." required><%= details %></textarea> + <textarea data-role="none" rows="2" cols="26" name="detail" id="form_detail" placeholder="Please fill in details of the problem." required><%= details %></textarea> </div> </div> - <% if ( files.length > 0 ) { %> - <div id="add_photo" style="display: none"> - <% } else { %> - <div id="add_photo"> + <% if ( files.length < CONFIG.MAX_PHOTOS ) { %> + <div id="add_photo"> + <input data-icon="fms-photo-new" value="[% loc('Take a new photo') %]" type="button" name="photo_button" id="id_photo_button" data-role="button" data-theme="a"> + <input data-icon="fms-photo-existing" value="[% loc('Add an existing photo') %]" type="button" name="existing" id="id_existing" data-role="button" data-theme="c"> + </div> <% } %> - <label>[% loc('Add a Photo ') %]<em>[% loc('(optional)') %]</em></label> - <input data-icon="fms-photo-new" value="[% loc('Take a new photo') %]" type="button" name="photo_button" id="id_photo_button" data-role="button" data-theme="a"> - <input data-icon="fms-photo-existing" value="[% loc('Add an existing photo') %]" type="button" name="existing" id="id_existing" data-role="button" data-theme="c"> - </div> - <% if ( files.length == 0 ) { %> - <div id="display_photo" style="display: none"> - <% } else { %> - <div id="display_photo"> - <% } %> - <label>[% loc('Your Photo') %]</label> - <div class="photo"> - <img class="small" id="photo" src="<%= files[0] %>" /> + <% if ( files.length > 0 ) { %> + <div class="photo-wrapper"> + <% _.each(files, function(file, index) { %> + <div class="photo" style="background-image: url('<%= file %>');"> + <a data-role="none" class="photo-corner-button del_photo_button" data-file-index="<%= index %>">X</a> + </div> + <% }); %> </div> - <input value="[% loc('Remove Photo') %]" type="button" name="del_photo_button" class="del_photo_button" data-role="button" data-theme="a"> - </div> + <% } %> </div> </div> |