-
-
Notifications
You must be signed in to change notification settings - Fork 941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAK-50454 Polls improve voting ui responsiveness #12856
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,120 +1,122 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html rsf:id="polls-html" xmlns="http://www.w3.org/1999/xhtml" xmlns:rsf="http://ponder.org.uk/rsf"> | ||
<head > | ||
<title>Polls</title> | ||
<link rsf:id="scr=portal-matter" href="https://vula.uct.ac.za/library/skin/tool_base.css" type="text/css" rel="stylesheet" media="all"/> | ||
<link href="https://vula.uct.ac.za/library/skin/default-skin/tool.css" type="text/css" rel="stylesheet" media="all" rsf:id="scr=portal-matter" /> | ||
<script rsf:id="scr=portal-matter" type="text/javascript" src="/library/js/headscripts.js"></script> | ||
<script type="text/javascript">includeLatestJQuery('polls');</script> | ||
<script type="text/javascript">includeWebjarLibrary('jquery.tablesorter');</script> | ||
<script type="text/javascript" src="../js/polls.js"></script> | ||
</head> | ||
|
||
<body rsf:id="scr=sakai-body"> | ||
<div class="portletBody"> | ||
|
||
<ul rsf:id="actions:" class="navIntraTool"> | ||
<li><span class="current" rsf:id="actions-main">Polls</span></li> | ||
<li><span><a href="voteAdd.html" rsf:id="actions-add">Add</a></span></li> | ||
<li><span><a href="votePermissions.html" rsf:id="actions-permissions">Permissions</a></span></li> | ||
</ul> | ||
|
||
<div class ="page-header"> | ||
<h1 rsf:id="poll-list-title">Polls</h1> | ||
</div> | ||
|
||
<div rsf:id="message-for:*" class="alertMessage"> | ||
<span>Message for user here</span> | ||
</div> | ||
<div class="sak-banner-info" rsf:id="no-polls">No polls have been created yet.</div> | ||
<div class="addItem" rsf:id="add-poll-icon"> | ||
<a href="voteAdd.html" rsf:id="add-poll">Add</a> | ||
</div> | ||
|
||
<div rsf:id="poll_list_remove_confirm" id="poll_list_remove_confirm"></div> | ||
<div rsf:id="poll_list_reset_confirm" id="poll_list_reset_confirm"></div> | ||
|
||
<script type="text/javascript"> | ||
$(document).ready(function () { | ||
|
||
$('#remove-all').change(function () { | ||
|
||
var isChecked = $(this).is(':checked'); | ||
$('.checkbox-cell input').prop('checked', isChecked); | ||
$('#delete-polls').prop('disabled', !isChecked); | ||
$('#reset-polls-votes').prop('disabled', !isChecked); | ||
}); | ||
|
||
$('.checkbox-cell input').change(function () { | ||
|
||
var someChecked = $('.checkbox-cell input:checked').length; | ||
$('#delete-polls').prop('disabled', !someChecked); | ||
$('#reset-polls-votes').prop('disabled', !someChecked); | ||
|
||
if (!someChecked) { | ||
$('#remove-all').prop('checked', false); | ||
} | ||
}); | ||
|
||
$('#delete-polls').click(function () { | ||
|
||
var removeMessage = $('#poll_list_remove_confirm').text(); | ||
return confirm(removeMessage); | ||
}); | ||
|
||
$('#reset-polls-votes').click(function () { | ||
|
||
var resetMessage = $('#poll_list_reset_confirm').text(); | ||
return confirm(resetMessage); | ||
}); | ||
}); | ||
</script> | ||
|
||
<form rsf:id="delete-poll-form"> | ||
<!-- This span is needed here to guide the renderer away to the checkboxes --> | ||
<span rsf:id="delete-poll"/> | ||
|
||
<table id="sortableTable" class="listHier lines nolines table table table-bordered table-striped table-hover" border="0" cellspacing="0"> | ||
<caption class="skip"><span class="skip" rsf:id="msg=poll_list_summary"></span></caption> | ||
<thead> | ||
<tr> | ||
<th><a rsf:id="poll-question-title" title="Sort by Question" href="#" onclick="return false;">Question</a></th> | ||
<th><a rsf:id="poll-open-title" title=" Sort by Opening Date" href="#" onclick="return false;">Opening</a></th> | ||
<th><a rsf:id="poll-close-title" title="Sort by Closing Date" href="#" onclick="return false;">Closing</a></th> | ||
<th><label rsf:id="poll-result-title"> Results</label></th> | ||
<th ><input type="checkbox" rsf:id="remove-all" id="remove-all" title="Select to remove"/> <label for="remove-all" rsf:id="poll_select_title_all">Select all</label></th> | ||
</tr> | ||
</thead> | ||
<tbody id="tasks:polllist:tbody_element"> | ||
|
||
<tr rsf:id="poll-row:votable"> | ||
<td><a href="voteQuestion.html" target="_self" rsf:id="poll-vote">Votable Poll Question</a> | ||
<div class="itemAction"><a href="voteAdd.html" target="_self" rsf:id="poll-revise">Edit</a></div> | ||
</td> | ||
<td rsf:id="poll-open-date">opening date</td> | ||
<td rsf:id="poll-close-date">closing date</td> | ||
<td><a rsf:id="poll-results">Results</a></td> | ||
<td class="checkbox-cell"><label rsf:id="delete-label" id="check-2" class="skip">Label for element</label><input rsf:id="poll-select" title="Select to remove" type="checkbox" id="check-2" name="deletePoll" value="" /> | ||
</td> | ||
</tr> | ||
<tr rsf:id="poll-row:nonvotable"> | ||
<td><span rsf:id="poll-text">Non Votable Question</span> | ||
<div class="itemAction"><a href="voteAdd.html" target="_self" rsf:id="poll-revise">Edit</a></div> | ||
</td> | ||
<td rsf:id="poll-open-date">opening date</td> | ||
<td rsf:id="poll-close-date">closing date</td> | ||
<td><a href="voteResults.html" target="_self" rsf:id="poll-results">Results</a></td> | ||
<td class="checkbox-cell"><label rsf:id="delete-label" id="check-2" class="skip">Label for element</label><input rsf:id="poll-select" title="Select to remove" type="checkbox" id="check-2" name="deletePoll" value="" /> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<p class="act"> | ||
<input type="submit" rsf:id="delete-polls" id="delete-polls" name="deleteSelectPoll" value="Update" accesskey="s" disabled="disabled" /> | ||
<input type="submit" rsf:id="reset-polls-votes" id="reset-polls-votes" name="resetSelectPoll" value="Reset" accesskey="r" disabled="disabled" /> | ||
</p> | ||
</form> | ||
</div> | ||
</body> | ||
</html> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html rsf:id="polls-html" xmlns="http://www.w3.org/1999/xhtml" xmlns:rsf="http://ponder.org.uk/rsf"> | ||
<head > | ||
<title>Polls</title> | ||
<link rsf:id="scr=portal-matter" href="https://vula.uct.ac.za/library/skin/tool_base.css" type="text/css" rel="stylesheet" media="all"/> | ||
<link href="https://vula.uct.ac.za/library/skin/default-skin/tool.css" type="text/css" rel="stylesheet" media="all" rsf:id="scr=portal-matter" /> | ||
<script rsf:id="scr=portal-matter" src="/library/js/headscripts.js"></script> | ||
<script>includeLatestJQuery('polls');</script> | ||
<script>includeWebjarLibrary('jquery.tablesorter');</script> | ||
<script src="../js/polls.js"></script> | ||
ern marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</head> | ||
|
||
<body rsf:id="scr=sakai-body"> | ||
<div class="portletBody"> | ||
|
||
<ul rsf:id="actions:" class="navIntraTool"> | ||
<li><span class="current" rsf:id="actions-main">Polls</span></li> | ||
<li><span><a href="voteAdd.html" rsf:id="actions-add">Add</a></span></li> | ||
<li><span><a href="votePermissions.html" rsf:id="actions-permissions">Permissions</a></span></li> | ||
</ul> | ||
|
||
<div class ="page-header"> | ||
<h1 rsf:id="poll-list-title">Polls</h1> | ||
</div> | ||
|
||
<div rsf:id="message-for:*" class="alertMessage"> | ||
<span>Message for user here</span> | ||
</div> | ||
<div class="sak-banner-info" rsf:id="no-polls">No polls have been created yet.</div> | ||
<div class="addItem" rsf:id="add-poll-icon"> | ||
<a href="voteAdd.html" rsf:id="add-poll">Add</a> | ||
</div> | ||
|
||
<div rsf:id="poll_list_remove_confirm" id="poll_list_remove_confirm"></div> | ||
<div rsf:id="poll_list_reset_confirm" id="poll_list_reset_confirm"></div> | ||
|
||
<script> | ||
$(document).ready(function () { | ||
|
||
$('#remove-all').change(function () { | ||
|
||
var isChecked = $(this).is(':checked'); | ||
$('.checkbox-cell input').prop('checked', isChecked); | ||
$('#delete-polls').prop('disabled', !isChecked); | ||
$('#reset-polls-votes').prop('disabled', !isChecked); | ||
}); | ||
|
||
$('.checkbox-cell input').change(function () { | ||
|
||
var someChecked = $('.checkbox-cell input:checked').length; | ||
$('#delete-polls').prop('disabled', !someChecked); | ||
$('#reset-polls-votes').prop('disabled', !someChecked); | ||
|
||
if (!someChecked) { | ||
$('#remove-all').prop('checked', false); | ||
} | ||
}); | ||
|
||
$('#delete-polls').click(function () { | ||
|
||
var removeMessage = $('#poll_list_remove_confirm').text(); | ||
return confirm(removeMessage); | ||
}); | ||
|
||
$('#reset-polls-votes').click(function () { | ||
|
||
var resetMessage = $('#poll_list_reset_confirm').text(); | ||
return confirm(resetMessage); | ||
}); | ||
}); | ||
</script> | ||
|
||
<form rsf:id="delete-poll-form"> | ||
<!-- This span is needed here to guide the renderer away to the checkboxes --> | ||
<span rsf:id="delete-poll"/> | ||
|
||
<div class="table-responsive"> | ||
<table id="sortableTable" class="listHier lines nolines table table table-bordered table-striped table-hover" border="0" cellspacing="0"> | ||
<caption class="skip"><span class="skip" rsf:id="msg=poll_list_summary"></span></caption> | ||
<thead> | ||
<tr> | ||
<th><a rsf:id="poll-question-title" title="Sort by Question" href="#" onclick="return false;">Question</a></th> | ||
<th><a rsf:id="poll-open-title" title=" Sort by Opening Date" href="#" onclick="return false;">Opening</a></th> | ||
<th><a rsf:id="poll-close-title" title="Sort by Closing Date" href="#" onclick="return false;">Closing</a></th> | ||
<th><label rsf:id="poll-result-title"> Results</label></th> | ||
<th ><input type="checkbox" rsf:id="remove-all" id="remove-all" title="Select to remove"/> <label for="remove-all" rsf:id="poll_select_title_all">Select all</label></th> | ||
</tr> | ||
</thead> | ||
<tbody id="tasks:polllist:tbody_element"> | ||
|
||
<tr rsf:id="poll-row:votable"> | ||
<td><a href="voteQuestion.html" target="_self" rsf:id="poll-vote">Votable Poll Question</a> | ||
<div class="itemAction"><a href="voteAdd.html" target="_self" rsf:id="poll-revise">Edit</a></div> | ||
</td> | ||
<td rsf:id="poll-open-date">opening date</td> | ||
<td rsf:id="poll-close-date">closing date</td> | ||
<td><a rsf:id="poll-results">Results</a></td> | ||
<td class="checkbox-cell"><label rsf:id="delete-label" id="check-2" class="skip">Label for element</label><input rsf:id="poll-select" title="Select to remove" type="checkbox" id="check-2" name="deletePoll" value="" /> | ||
</td> | ||
</tr> | ||
<tr rsf:id="poll-row:nonvotable"> | ||
<td><span rsf:id="poll-text">Non Votable Question</span> | ||
<div class="itemAction"><a href="voteAdd.html" target="_self" rsf:id="poll-revise">Edit</a></div> | ||
</td> | ||
<td rsf:id="poll-open-date">opening date</td> | ||
<td rsf:id="poll-close-date">closing date</td> | ||
<td><a href="voteResults.html" target="_self" rsf:id="poll-results">Results</a></td> | ||
<td class="checkbox-cell"><label rsf:id="delete-label" id="check-2" class="skip">Label for element</label><input rsf:id="poll-select" title="Select to remove" type="checkbox" id="check-2" name="deletePoll" value="" /> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<p class="act flex-nowrap"> | ||
<input type="submit" rsf:id="delete-polls" id="delete-polls" name="deleteSelectPoll" value="Update" accesskey="s" disabled="disabled" /> | ||
<input type="submit" rsf:id="reset-polls-votes" id="reset-polls-votes" name="resetSelectPoll" value="Reset" accesskey="r" disabled="disabled" /> | ||
</p> | ||
</form> | ||
</div> | ||
</body> | ||
</html> |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.