Show moving buttons for images, too
[Sone.git] / src / main / resources / templates / imageBrowser.html
index c49cead..c705a2c 100644 (file)
@@ -61,7 +61,7 @@
                 * Prepare all images for inline editing.
                 */
                function prepareImages() {
-                       $(".image").each(function() {
+                       $(".image-in-album").each(function() {
                                imageId = $(this).closest(".image-in-album").find(".image-id").text();
                                (function(element, imageId) {
                                        $("button[name='moveLeft'], button[name='moveRight']", element).click(function() {
                                                });
                                                $("#edit-album label").hide();
 
-                                               /* hide non-js image move buttons. */
-                                               $(".move-buttons").hide();
-
                                                hideAndShowBlock("div.edit-album", ".show-edit-album", ".hide-edit-album");
                                                hideAndShowBlock("div.create-album", ".show-create-album", ".hide-create-album");
                                                hideAndShowBlock("div.upload-image", ".show-upload-image", ".hide-upload-image");
                                                <div id="image-<% image.id|html>" class="image-in-album">
                                                        <div class="image-id hidden"><% image.id|html></div>
                                                        <%include include/viewImage.html>
-                                                       <%if album.sone.local>
-                                                       <form class="edit-image" action="editImage.html" method="post">
-                                                               <input type="hidden" name="formPassword" value="<%formPassword|html>" />
-                                                               <input type="hidden" name="returnPage" value="<%request.uri|html>" />
-                                                               <input type="hidden" name="image" value="<%image.id|html>" />
-
-                                                               <div class="move-buttons">
-                                                                       <button <%if loop.first>class="hidden" <%/if>type="submit" name="moveLeft" value="true"><%= Page.ImageBrowser.Image.Button.MoveLeft|l10n|html></button>
-                                                                       <button <%if loop.last>class="hidden" <%/if>type="submit" name="moveRight" value="true"><%= Page.ImageBrowser.Image.Button.MoveRight|l10n|html></button>
-                                                               </div>
-
-                                                               <div class="edit-data hidden">
-                                                                       <div>
-                                                                               <input type="text" name="title" value="<%image.title|html>" />
-                                                                       </div>
-                                                                       <div>
-                                                                               <textarea name="description"><%image.description|html></textarea>
-                                                                       </div>
-                                                                       <div>
-                                                                               <button <%if loop.first>class="hidden" <%/if>type="submit" name="moveLeft" value="true"><%= Page.ImageBrowser.Image.Button.MoveLeft|l10n|html></button>
-                                                                               <button type="submit" name="submit"><%= Page.ImageBrowser.Image.Button.Save|l10n|html></button>
-                                                                               <button <%if loop.last>class="hidden" <%/if>type="submit" name="moveRight" value="true"><%= Page.ImageBrowser.Image.Button.MoveRight|l10n|html></button>
-                                                                       </div>
-                                                               </div>
-                                                       </form>
-                                                       <%/if>
                                                </div>
                                                <%= false|store key==endRow>
                                                <%if loop.odd><%= true|store key==endRow><%/if>