diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/css/mod_photos.css | 2 | ||||
-rw-r--r-- | view/js/mod_photos.js | 19 | ||||
-rwxr-xr-x | view/tpl/photos_upload.tpl | 9 |
3 files changed, 23 insertions, 7 deletions
diff --git a/view/css/mod_photos.css b/view/css/mod_photos.css index 7718289c3..ae250bc1c 100644 --- a/view/css/mod_photos.css +++ b/view/css/mod_photos.css @@ -33,4 +33,4 @@ position: absolute; left: -9999px; top: -9999px; -}
\ No newline at end of file +} diff --git a/view/js/mod_photos.js b/view/js/mod_photos.js index b254370c1..d371c3f2f 100644 --- a/view/js/mod_photos.js +++ b/view/js/mod_photos.js @@ -6,10 +6,9 @@ var ispublic = aStr.everybody; $(document).ready(function() { - $(document).ready(function() { - $("#photo-edit-newtag").contact_autocomplete(baseurl + '/acl', 'p', false, function(data) { - $("#photo-edit-newtag").val('@' + data.name); - }); + + $("#photo-edit-newtag").contact_autocomplete(baseurl + '/acl', 'p', false, function(data) { + $("#photo-edit-newtag").val('@' + data.name); }); $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { @@ -24,4 +23,14 @@ $(document).ready(function() { $('#jot-public').show(); } }).trigger('change'); -});
\ No newline at end of file + + showHideBodyTextarea(); + +}); + +function showHideBodyTextarea() { + if( $('#id_visible').is(':checked')) + $('#body-textarea').slideDown(); + else + $('#body-textarea').slideUp(); +} diff --git a/view/tpl/photos_upload.tpl b/view/tpl/photos_upload.tpl index bf02c614d..11a08204d 100755 --- a/view/tpl/photos_upload.tpl +++ b/view/tpl/photos_upload.tpl @@ -21,7 +21,11 @@ <div class="form-group"> <input id="photos-upload-choose" type="file" name="userfile" /> </div> + {{include file="field_input.tpl" field=$caption}} {{include file="field_checkbox.tpl" field=$visible}} + <div id="body-textarea"> + {{include file="field_textarea.tpl" field=$body}} + </div> <div class="pull-right btn-group form-group"> <div class="btn-group"> {{if $lockstate}} @@ -37,8 +41,11 @@ <div class="clear"></div> {{if $uploader}} - + {{include file="field_input.tpl" field=$caption}} {{include file="field_checkbox.tpl" field=$visible}} + <div id="body-textarea"> + {{include file="field_textarea.tpl" field=$body}} + </div> <div id="photos-upload-perms" class="btn-group pull-right"> {{if $lockstate}} <button class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;"> |