aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes
diff options
context:
space:
mode:
Diffstat (limited to 'admin/themes')
-rw-r--r--admin/themes/default/template/album_notification.tpl103
-rw-r--r--admin/themes/default/template/picture_modify.tpl1
-rw-r--r--admin/themes/default/template/user_list.tpl58
-rw-r--r--admin/themes/default/theme.css15
4 files changed, 134 insertions, 43 deletions
diff --git a/admin/themes/default/template/album_notification.tpl b/admin/themes/default/template/album_notification.tpl
index 32aa8e414..8573cf16e 100644
--- a/admin/themes/default/template/album_notification.tpl
+++ b/admin/themes/default/template/album_notification.tpl
@@ -1,3 +1,59 @@
+{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
+{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
+
+{footer_script}
+jQuery(document).ready(function() {
+ jQuery("select[name=who]").change(function () {
+ checkWhoOptions();
+ });
+
+ checkWhoOptions();
+
+ function checkWhoOptions() {
+ var option = jQuery("select[name=who] option:selected").val();
+ jQuery(".who_option").hide();
+ jQuery(".who_" + option).show();
+ }
+
+ jQuery(".who_option select").selectize({
+ plugins: ['remove_button']
+ });
+
+ jQuery("form#categoryNotify").submit(function(e) {
+ var who_selected = false;
+ var who_option = jQuery("select[name=who] option:selected").val();
+
+ if (jQuery(".who_" + who_option + " select").length > 0) {
+ if (jQuery(".who_" + who_option + " select option:selected").length > 0) {
+ who_selected = true;
+ }
+ }
+
+ if (!who_selected) {
+ jQuery(".actionButtons .errors").show();
+ e.preventDefault();
+ }
+ else {
+ jQuery(".actionButtons .errors").hide();
+ console.log("form can be submited");
+ }
+ });
+});
+{/footer_script}
+
+{html_style}
+.who_option {
+ margin-top:5px;
+}
+
+span.errors {
+ background-image:none;
+ padding:2px 5px;
+ margin:0;
+ border-radius:5px;
+}
+{/html_style}
+
<div class="titrePage">
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
</div>
@@ -5,36 +61,51 @@
<form action="{$F_ACTION}" method="post" id="categoryNotify">
<fieldset id="emailCatInfo">
- <legend>{'Send an information email to group members'|@translate}</legend>
-
-{if isset($group_mail_options)}
+ <legend>{'Send mail to users'|@translate}</legend>
<p>
- <strong>{'Group'|@translate}</strong>
- <br>
- <select name="group">
- {html_options options=$group_mail_options}
+ <strong>{'Recipients'|@translate}</strong>
+ <select name="who">
+ <option value="group">{'Group'|translate}</option>
+ <option value="users">{'Users'|translate}</option>
</select>
</p>
+ <p class="who_option who_group">
+{if isset($group_mail_options)}
+ <select name="group" placeholder="{'Type in a search term'|translate}" style="width:524px;">
+ {html_options options=$group_mail_options}
+ </select>
+{elseif isset($no_group_in_gallery) and $no_group_in_gallery}
+ {'There is no group in this gallery.'|@translate} <a href="admin.php?page=group_list" class="externalLink">{'Group management'|@translate}</a>
+{else}
+ {'No group is permitted to see this private album'|@translate}.
+ <a href="{$permission_url}" class="externalLink">{'Permission management'|@translate}</a>
+{/if}
+ </p>
+
+ <p class="who_option who_users">
+{if isset($user_options)}
+ <select name="users[]" multiple placeholder="{'Type in a search term'|translate}" style="width:524px;">
+ {html_options options=$user_options selected=$user_options_selected}
+ </select>
+{else}
+ {'No user is permitted to see this private album'|@translate}.
+ <a href="{$permission_url}" class="externalLink">{'Permission management'|@translate}</a>
+{/if}
+ </p>
+
<p>
<strong>{'Complementary mail content'|@translate}</strong>
<br>
<textarea cols="50" rows="5" name="mail_content" id="mail_content" class="description">{$MAIL_CONTENT}</textarea>
</p>
- <p>
+ <p class="actionButtons">
<input class="submit" type="submit" value="{'Send'|@translate}" name="submitEmail">
+ <span class="errors" style="display:none">&#x2718; {'No recipient selected'|translate}</span>
</p>
-{elseif isset($no_group_in_gallery) and $no_group_in_gallery}
- <p>{'There is no group in this gallery.'|@translate} <a href="admin.php?page=group_list" class="externalLink">{'Group management'|@translate}</a></p>
-{else}
- <p>
- {'No group is permitted to see this private album'|@translate}.
- <a href="{$permission_url}" class="externalLink">{'Permission management'|@translate}</a>
- </p>
-{/if}
</fieldset>
</form>
diff --git a/admin/themes/default/template/picture_modify.tpl b/admin/themes/default/template/picture_modify.tpl
index aeba2dd6f..71b3d2ba4 100644
--- a/admin/themes/default/template/picture_modify.tpl
+++ b/admin/themes/default/template/picture_modify.tpl
@@ -63,6 +63,7 @@ jQuery("a.preview-box").colorbox({
<li>{$INTRO.add_date}</li>
<li>{$INTRO.added_by}</li>
<li>{$INTRO.size}</li>
+ <li>{$INTRO.formats}</li>
<li>{$INTRO.stats}</li>
<li>{$INTRO.id}</li>
</ul>
diff --git a/admin/themes/default/template/user_list.tpl b/admin/themes/default/template/user_list.tpl
index 39e3318b9..6744f6f69 100644
--- a/admin/themes/default/template/user_list.tpl
+++ b/admin/themes/default/template/user_list.tpl
@@ -1,3 +1,4 @@
+{include file='include/colorbox.inc.tpl'}
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{combine_script id='jquery.dataTables' load='footer' path='themes/default/js/plugins/jquery.dataTables.js'}
@@ -274,7 +275,7 @@ jQuery(document).ready(function() {
jQuery("script.userDetails").html()
);
- jQuery("#user"+userId).append(template(user));
+ jQuery("#user"+userId).html(template(user));
/* groups select */
jQuery('[data-selectize=groups]').selectize({
@@ -339,10 +340,19 @@ jQuery(document).ready(function() {
console.log('technical error loading user details');
}
});
-
- return '<div id="user'+userId+'" class="userProperties"><img class="loading" src="themes/default/images/ajax-loader-small.gif"></div>';
+
+ jQuery(".user_form_popin")
+ .attr("id", "user"+userId)
+ .html('<div class="popinWait"><span><img class="loading" src="themes/default/images/ajax-loader-small.gif"> {/literal}{'Loading...'|translate|escape:'javascript'}{literal}</span></div>')
+ ;
}
+jQuery(document).on('click', '.close-user-details', function(e) {
+ jQuery('.user_form_popin').colorbox.close();
+ e.preventDefault();
+});
+
+
/* change password */
jQuery(document).on('click', '.changePasswordOpen', function() {
var userId = jQuery(this).parentsUntil('form').parent().find('input[name=user_id]').val();
@@ -474,7 +484,7 @@ jQuery(document).ready(function() {
jQuery('#user'+userId+' .userDelete .loading').show();
},
success:function(data) {
- oTable.fnDraw();
+ jQuery('.user_form_popin').colorbox.close();
jQuery('#showAddUser .infos').html('&#x2714; User '+username+' deleted').show();
},
error:function(XMLHttpRequest, textStatus, errorThrows) {
@@ -537,28 +547,17 @@ jQuery(document).ready(function() {
*/
jQuery(document).on('click', '#userList tbody td .openUserDetails', function() {
var nTr = this.parentNode.parentNode;
- if (jQuery(this).hasClass('icon-cancel-circled')) {
- /* This row is already open - close it */
- jQuery(this)
- .removeClass('icon-cancel-circled')
- .addClass('icon-pencil')
- .attr('title', "{/literal}{'Open user details'|translate|escape:'javascript'}{literal}")
- .html("{/literal}{'edit'|translate|escape:'javascript'}{literal}")
- ;
-
- oTable.fnClose( nTr );
- }
- else {
- /* Open this row */
- jQuery(this)
- .removeClass('icon-pencil')
- .addClass('icon-cancel-circled')
- .attr('title', "{/literal}{'Close user details'|translate|escape:'javascript'}{literal}")
- .html("{/literal}{'close'|translate|escape:'javascript'}{literal}")
- ;
-
- oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
- }
+
+ jQuery.colorbox({
+ inline:true,
+ title:"{/literal}{'Edit user'|translate}{literal}",
+ href:".user_form_popin",
+ onClosed: function() {
+ oTable.fnDraw();
+ }
+ });
+
+ fnFormatDetails(oTable, nTr);
});
@@ -1153,7 +1152,12 @@ span.infos, span.errors {background-image:none; padding:2px 5px; margin:0;border
<span class="infos propertiesUpdateDone" style="display:none">&#x2714; <%- user.updateString %></span>
- <input type="submit" value="{'Update user'|translate|escape:html}" style="display:none;" data-user_id="<%- user.id %>">
+ <input type="submit" value="{'Update user'|translate|escape:html}" data-user_id="<%- user.id %>">
<img class="submitWait" src="themes/default/images/ajax-loader-small.gif" style="display:none">
+ <a href="#close" class="icon-cancel-circled close-user-details" title="{'Close user details'|translate}">{'close'|translate}</a>
</form>
</script>
+
+<div style="display:none">
+ <div class="user_form_popin userProperties"></div>
+</div> \ No newline at end of file
diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css
index 509aff377..0aa0dba1a 100644
--- a/admin/themes/default/theme.css
+++ b/admin/themes/default/theme.css
@@ -1228,6 +1228,21 @@ a.group_perm {
.userProperty {width:340px;float:left;margin-bottom:15px;}
.userActions {float:right;text-align:right;}
+.user_form_popin {
+ width:750px;
+ height:430px;
+ padding:20px;
+}
+
+.userProperties form {
+ text-align:left;
+}
+
+.popinWait {
+ padding-top:200px;
+}
+
+
.preview-box.icon-zoom-in {
display:block;
position:relative;