Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/survey_client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-03-27 17:44:59 +0300
committerJulius Härtl <jus@bitgrid.net>2018-04-05 11:56:58 +0300
commit724c992b5c4a23e91d08dc9ff9c51830ede3f43d (patch)
treecc6ce68f4b8612f94615535de924ed30d7082561 /js/admin.js
parent7c77955484675de6470b3f9e158ebb9741817986 (diff)
Hide last report by default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'js/admin.js')
-rw-r--r--js/admin.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/js/admin.js b/js/admin.js
index cb928f3..2899c6c 100644
--- a/js/admin.js
+++ b/js/admin.js
@@ -39,10 +39,10 @@ $(document).ready(function() {
$button.attr('disabled', false);
$section.find('.last_report').text(JSON.stringify(response.ocs.data, undefined, 4));
- $section.find('.last_sent').text(t('survey_client', 'Sent on: {on}', {
+ $section.find('.last_sent').text(t('survey_client', 'Last report sent on: {on}', {
on: moment().format('LL')
}));
- $section.find('.last_report').closest('div').removeClass('hidden');
+ $section.find('.last_report').closest('div').removeClass('empty');
},
error: function(xhr) {
$button.attr('disabled', false);
@@ -53,4 +53,11 @@ $(document).ready(function() {
}
});
});
+
+ $('#last_report h3').on('click', function(e) {
+ if (!$(this).parent().hasClass('empty')) {
+ $(this).parent().find('p').toggleClass('hidden');
+ $(this).find('.icon').toggleClass('icon-triangle-s');
+ }
+ });
});