]> git.mxchange.org Git - friendica.git/commitdiff
Frio - fix missing modal for editing albums
authorrabuzarus <rabuzarus@t-online.de>
Wed, 5 Sep 2018 16:24:04 +0000 (18:24 +0200)
committerrabuzarus <rabuzarus@t-online.de>
Wed, 5 Sep 2018 16:24:04 +0000 (18:24 +0200)
view/theme/frio/js/mod_photos.js
view/theme/frio/templates/album_edit.tpl
view/theme/frio/templates/photo_album.tpl

index b8d03b5db91feda7e6e7f6c5e99af9d8903e8075..77173385b192ddf27bd6f555c934a126a6348dab 100644 (file)
@@ -15,7 +15,14 @@ $(document).ready(function() {
 
        }).trigger('change');
 
+       // Click event listener for the album edit link/button.
+       $("body").on('click', '#album-edit-link', function() {
+               var modalUrl = $(this).attr("data-modal-url");
 
+               if (typeof modalUrl !== "undefined") {
+                       addToModal(modalUrl, 'photo-album-edit-wrapper');
+               }
+       });
 });
 
 $(window).load(function() {
index 583eb6d1b7154e2c0e8ce0dff30fc79144e1d662..f4a60b7d038716e5933959ae5f2039b6d78a7067 100644 (file)
@@ -1,14 +1,15 @@
 <div id="photo-album-edit-wrapper">
-<form name="photo-album-edit-form" id="photo-album-edit-form" action="photos/{{$nickname}}/album/{{$hexalbum}}" method="post" >
-       <label id="photo-album-edit-name-label" for="photo-album-edit-name" >{{$nametext}}</label>
-       <div class="pull-left photo-album-edit-name">
-       <input class="form-control" type="text" size="64" name="albumname" value="{{$album|escape:'html'}}" id="photo-album-edit-name" style="width: 100%;">
-       </div>
-       
-       <div class="pull-right">
-       <input class="btn-primary btn btn-small" id="photo-album-edit-submit" type="submit" name="submit" value="{{$submit|escape:'html'}}" />
-       <input class="btn-primary btn btn-small" id="photo-album-edit-drop" type="submit" name="dropalbum" value="{{$dropsubmit|escape:'html'}}" onclick="return confirmDelete();" />
-       </div>
-</form>
+       <form name="photo-album-edit-form" id="photo-album-edit-form" action="photos/{{$nickname}}/album/{{$hexalbum}}" method="post" >
+               <label id="photo-album-edit-name-label" for="photo-album-edit-name" >{{$nametext}}</label>
+               <div class="pull-left photo-album-edit-name">
+                       <input class="form-control" type="text" size="64" name="albumname" value="{{$album|escape:'html'}}" id="photo-album-edit-name">
+               </div>
+
+               <div class="pull-right">
+                       <input class="btn-primary btn btn-small" id="photo-album-edit-submit" type="submit" name="submit" value="{{$submit|escape:'html'}}" />
+                       <input class="btn-primary btn btn-small" id="photo-album-edit-drop" type="submit" name="dropalbum" value="{{$dropsubmit|escape:'html'}}" onclick="return confirmDelete();" />
+               </div>
+       </form>
+       <div class="clear"></div>
 </div>
 <div class="clear"></div>
index c991b03cfc949afff607506eeab44d8b51d6c642..235b9c46db65968485b746913bfe61299ec10d71 100644 (file)
@@ -12,9 +12,9 @@
 
                {{if $edit}}
                <span class="icon-padding"> </span>
-               <a id="album-edit-link" class="page-action faded-icon" href="{{$edit.1}}" title="{{$edit.0}}" data-toggle="tooltip">
+               <button id="album-edit-link" class="btn-link page-action faded-icon" type="button" data-modal-url="{{$edit.1}}" title="{{$edit.0}}" data-toggle="tooltip">
                        <i class="fa fa-pencil"></i>
-               </a>
+               </button>
                {{/if}}
 
                {{if ! $noorder}}