Events can now be changed in overview page. issue 5

Former-commit-id: 31060a25e584ab277f222dae21bc7a938ec83b1b
This commit is contained in:
Ziver Koc 2016-01-22 15:46:09 +01:00
parent 87913dfd28
commit da24ffb822
9 changed files with 1028 additions and 6 deletions

View file

@ -23,9 +23,9 @@
<input type="hidden" name="id" value="{{.getId()}}">
<div class="btn-toolbar pull-right">
<button type="submit" class="btn btn-danger btn-xs">
<span class="glyphicon glyphicon-trash"></span>
</button>
<input class="toggle-switch" type="checkbox" name="data"
data-size="mini" data-on-color="danger"
{{#.getData()}}checked{{/.getData()}} >
</div>
</form>
</td>
@ -35,3 +35,11 @@
</div>
</div>
</div>
<script>
$(function (){
$(".toggle-switch").on("switchChange.bootstrapSwitch", function (event, state) {
$(this).closest('form').submit();
});
});
</script>