mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Some general cleaning up in the menu's and the various controllers. Added a new class (yet to be tested) and removed most of the "piggy bank"-implementation in anticipation of the ideas from issue #6. Fixed a bug in the default user seeder.
This commit is contained in:
25
app/assets/javascripts/firefly/piggybanks-create.js
Normal file
25
app/assets/javascripts/firefly/piggybanks-create.js
Normal file
@@ -0,0 +1,25 @@
|
||||
$(function () {
|
||||
|
||||
updatePiggyFields();
|
||||
$('input[name="repeats"]').on('change',updatePiggyFields);
|
||||
|
||||
});
|
||||
|
||||
function updatePiggyFields() {
|
||||
//var val = $('input[name="repeats"]').checked;
|
||||
|
||||
console.log('Repeating elements: ' + $('.repeat-piggy').length);
|
||||
console.log('Non-repeating elements: ' + $('.no-repeat-piggy').length);
|
||||
|
||||
if($('input[name="repeats"]').prop( "checked" )) {
|
||||
// checked, repeats!
|
||||
console.log('repeats!');
|
||||
$('.repeat-piggy').show();
|
||||
$('.no-repeat-piggy').hide();
|
||||
} else {
|
||||
console.log('no repeats!');
|
||||
// unchecked, does not repeat!
|
||||
$('.no-repeat-piggy').show();
|
||||
$('.repeat-piggy').hide();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user