-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
322 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
$("input[name=all_actions]").click(function(){ | ||
const scope = $(this).closest("tr").find("input:not(:first)") | ||
$('input[name=all_actions]').click(function () { | ||
const scope = $(this).closest('tr').find('input:not(:first)') | ||
scope.prop('checked', this.checked) | ||
}) | ||
const column_check = (index) => { | ||
const column_check = index => { | ||
return () => { | ||
const checked = $("table").find(`tr:first-child th:nth-child(${index+2}) input[type=checkbox]`).get(0).checked | ||
const scope = $("table").find(`td:nth-child(${index+3}) input[type=checkbox]`) | ||
const checked = $('table') | ||
.find(`tr:first-child th:nth-child(${index + 2}) input[type=checkbox]`) | ||
.get(0).checked | ||
const scope = $('table').find( | ||
`td:nth-child(${index + 3}) input[type=checkbox]` | ||
) | ||
scope.prop('checked', checked) | ||
} | ||
} | ||
["create", "read", "update", "delete"].forEach((action, index) => $(`input[name=${action}_all]`).click(column_check(index))) | ||
;['create', 'read', 'update', 'delete'].forEach((action, index) => | ||
$(`input[name=${action}_all]`).click(column_check(index)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
$('#cancel_tip').on('ajax:complete', (et, e) => { | ||
if (!JSON.parse(e.responseText)) return | ||
$("#welcome-modal .modal-footer").html("<p class='alert alert-info'>Okay, tips will not appear anymore</p>") | ||
setTimeout(() => $("#welcome-modal").modal('hide'), 1500) | ||
$('#welcome-modal .modal-footer').html( | ||
"<p class='alert alert-info'>Okay, tips will not appear anymore</p>" | ||
) | ||
setTimeout(() => $('#welcome-modal').modal('hide'), 1500) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.