]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Fix delete buttons issues
authorArthurHoaro <arthur@hoa.ro>
Sat, 14 Jan 2017 13:15:00 +0000 (14:15 +0100)
committerArthurHoaro <arthur@hoa.ro>
Sat, 14 Jan 2017 13:15:00 +0000 (14:15 +0100)
tpl/default/changetag.html
tpl/default/css/shaarli.css
tpl/default/editlink.html
tpl/default/js/shaarli.js
tpl/default/linklist.html

index 4f98baec2286d85124217118d9fd38c162c6fd72..8d263a16df5bddb334a7daac16f29793d1694bb4 100644 (file)
@@ -28,7 +28,7 @@
       <input type="hidden" name="token" value="{$token}">
       <div>
         <input type="submit" value="{'Rename'|t}" name="renametag">
-        <input type="submit" value="{'Delete'|t}" name="deletetag" class="button-red">
+        <input type="submit" value="{'Delete'|t}" name="deletetag" class="button button-red confirm-delete">
       </div>
     </form>
   </div>
index 63cf68aceb298c8dde6137da0f2b05751161edf4..ed9a86caf0944b06f5674774bb760e74c3701c72 100644 (file)
@@ -760,6 +760,7 @@ pre {
     text-decoration: none;
     vertical-align: center;
     font-weight: normal;
+    display: inline-block;
 }
 
 
@@ -767,6 +768,10 @@ pre {
     background: #ac2925;
 }
 
+.page-form .submit-buttons {
+    margin-bottom: 10px;
+}
+
 @media screen and (min-width: 64em) {
     .page-form .submit-buttons {
         position: relative;
@@ -778,6 +783,13 @@ pre {
     }
 }
 
+@media screen and (max-width: 64em) {
+    .page-form .submit-buttons .button {
+        display: block;
+        margin: auto;
+    }
+}
+
 .page-form select {
     color: #252525;
 }
index b17d1038501e260e915f4542766bf9cc362b144f..4f10ffb2d5d8e9d26fda44ae3b466fdc7743eb57 100644 (file)
       </div>
 
 
-      <div class="submit-buttons">
-        <input type="submit" value="{'Save'|t}" name="save_edit">
+      <div class="submit-buttons center">
+        <input type="submit" value="{'Save'|t}" name="save_edit" class="">
         {if="!$link_is_new"}
         <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}"
-           title="" name="delete_link" class="button button-red">
+           title="" name="delete_link" class="button button-red confirm-delete">
           {'Delete'|t}
         </a>
         {/if}
index 925f6ce717280b7d656202a76c92155e0069a354..a3d40b0ddf32647006a8b5f3fcd4045d23594f84 100644 (file)
@@ -133,7 +133,7 @@ function toggleFold(button, description, thumb)
 /**
  * Confirmation message before deletion.
  */
-var deleteLinks = document.querySelectorAll('.delete-link');
+var deleteLinks = document.querySelectorAll('.confirm-delete');
 [].forEach.call(deleteLinks, function(deleteLink) {
     deleteLink.addEventListener('click', function(event) {
         if(! confirm('Are you sure you want to delete this link ?')) {
index 5a601d821b609385ebd564b2fe6389f093a03785..b490fe7c573c438fbca8eeed091a33f6d4ed675a 100644 (file)
                 </a>
                 {if="isLoggedIn()"}
                   <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}"
-                     title="{'Delete'|t}" class="delete-link pure-u-0 pure-u-lg-visible">
+                     title="{'Delete'|t}" class="delete-link pure-u-0 pure-u-lg-visible confirm-delete">
                     <i class="fa fa-trash"></i>
                   </a>
                 {/if}
                 {/if}
                 {if="isLoggedIn()"}
                   <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}"
-                     title="{'Delete'|t}" class="delete-link">
+                     title="{'Delete'|t}" class="delete-link confirm-delete">
                     <i class="fa fa-trash"></i>
                   </a>
                 {/if}