summaryrefslogtreecommitdiffstats
path: root/public/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 1b6f2f601e..732beaca0c 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -404,15 +404,19 @@ function initRepository() {
$('.enable-system').change(function () {
if (this.checked) {
$($(this).data('target')).removeClass('disabled');
+ if (!$(this).data('context')) $($(this).data('context')).addClass('disabled');
} else {
$($(this).data('target')).addClass('disabled');
+ if (!$(this).data('context')) $($(this).data('context')).removeClass('disabled');
}
});
$('.enable-system-radio').change(function () {
if (this.value == 'false') {
$($(this).data('target')).addClass('disabled');
+ if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled');
} else if (this.value == 'true') {
$($(this).data('target')).removeClass('disabled');
+ if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled');
}
});
}
@@ -1826,3 +1830,20 @@ function initVueApp() {
},
});
}
+function timeAddManual() {
+ $('.mini.modal')
+ .modal({
+ duration: 200,
+ onApprove: function() {
+ $('#add_time_manual_form').submit();
+ }
+ }).modal('show')
+ ;
+}
+
+function toggleStopwatch() {
+ $("#toggle_stopwatch_form").submit();
+}
+function cancelStopwatch() {
+ $("#cancel_stopwatch_form").submit();
+}