From: rabuzarus Date: Mon, 20 Aug 2018 04:29:50 +0000 (+0200) Subject: Frio: new photos upload template (#5637) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dd2d680258e1c594cc585fa31108da5a151a6e47;p=friendica.git Frio: new photos upload template (#5637) * frio - add missing page template to various photo pages (fix missing background) * frio - rework photo upload album selection * frio - rework photo upload button * frio - fix photo upload button and acl --- diff --git a/mod/photos.php b/mod/photos.php index e2682498be..e246c98c3d 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1093,6 +1093,12 @@ function photos_content(App $a) '$albumselect' => $albumselect, '$permissions' => L10n::t('Permissions'), '$aclselect' => $aclselect_e, + '$lockstate' => is_array($a->user) + && (strlen($a->user['allow_cid']) + || strlen($a->user['allow_gid']) + || strlen($a->user['deny_cid']) + || strlen($a->user['deny_gid']) + ) ? 'lock' : 'unlock', '$alt_uploader' => $ret['addon_text'], '$default_upload_box' => ($ret['default_upload'] ? $default_upload_box : ''), '$default_upload_submit' => ($ret['default_upload'] ? $default_upload_submit : ''), diff --git a/view/js/ajaxupload.js b/view/js/ajaxupload.js index 1c34b11b9e..131ab078e6 100644 --- a/view/js/ajaxupload.js +++ b/view/js/ajaxupload.js @@ -380,7 +380,8 @@ 'cursor' : 'pointer' }); - var div = document.createElement("div"); + var div = document.createElement("div"); + div.setAttribute('class', 'ajaxbutton-wrapper'); addStyles(div, { 'display' : 'block', 'position' : 'absolute', diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index f626af8864..b96e53fa1a 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -1422,6 +1422,15 @@ section #jotOpen { color: #fff; } +.fa.lock:before { + font-family: FontAwesome; + content: "\f023"; +} +.fa.unlock:before { + font-family: FontAwesome; + content: "\f09c"; +} + /* Filebrowser */ .fbrowser .breadcrumb { margin-bottom: 0px; diff --git a/view/theme/frio/js/modal.js b/view/theme/frio/js/modal.js index 46bb1e5143..2b3059eaf1 100644 --- a/view/theme/frio/js/modal.js +++ b/view/theme/frio/js/modal.js @@ -12,7 +12,7 @@ $(document).ready(function(){ // with AjaxUpload. $(".fbrowser").remove(); // Remove the AjaxUpload element. - $("[name=userfile]").parent().remove(); + $(".ajaxbutton-wrapper").remove(); }); // Clear bs modal on close. diff --git a/view/theme/frio/templates/photos_default_uploader_box.tpl b/view/theme/frio/templates/photos_default_uploader_box.tpl new file mode 100644 index 0000000000..2f1f69a50d --- /dev/null +++ b/view/theme/frio/templates/photos_default_uploader_box.tpl @@ -0,0 +1 @@ + diff --git a/view/theme/frio/templates/photos_default_uploader_submit.tpl b/view/theme/frio/templates/photos_default_uploader_submit.tpl new file mode 100644 index 0000000000..73d5e50645 --- /dev/null +++ b/view/theme/frio/templates/photos_default_uploader_submit.tpl @@ -0,0 +1,2 @@ + + diff --git a/view/theme/frio/templates/photos_upload.tpl b/view/theme/frio/templates/photos_upload.tpl index 1162dc3ac6..f02246c5c7 100644 --- a/view/theme/frio/templates/photos_upload.tpl +++ b/view/theme/frio/templates/photos_upload.tpl @@ -5,49 +5,68 @@
{{$usage}}
-
-
- -
- -
-
+
+ -
-
- -
- + + {{$albumselect}}
-
+
-
+
- -
- -
-
- {{$aclselect}} + {{if $alt_uploader}} +
+
-
+
+ +
-
+ {{$alt_uploader}} + {{/if}} - {{$alt_uploader}} - {{$default_upload_box}} - {{$default_upload_submit}} + {{if $default_upload_submit}} +
-
+
+ +
+
+ + + {{$default_upload_submit}} +
+ {{$default_upload_box}} +
+
+ {{/if}} + +
+ + {{* The modal for advanced-expire *}} +