Commit 4288793a by Christina Roberts Committed by GitHub

Merge pull request #13497 from edx/release

Merge release into master
parents c90186f8 c248417d
......@@ -1272,7 +1272,6 @@ base_application_js = [
'js/src/utility.js',
'js/src/logger.js',
'js/my_courses_dropdown.js',
'js/dialog_tab_controls.js',
'js/src/string_utils.js',
'js/form.ext.js',
'js/src/ie_shim.js',
......
var DialogTabControls = (function() {
'use strict';
var focusableChildren,
numElements,
currentIndex,
initializeTabKeyValues = function(elementName, $closeButton) {
focusableChildren = $(elementName).find(
'a, input[type=text], input[type=submit], select, textarea, button'
);
if ($closeButton) {
focusableChildren = focusableChildren.add($closeButton);
}
numElements = focusableChildren.length;
currentIndex = 0;
focusableChildren[currentIndex].focus();
},
focusElement = function() {
var focusableElement = focusableChildren[currentIndex];
if (focusableElement) {
focusableElement.focus();
}
},
focusPrevious = function() {
currentIndex--;
if (currentIndex < 0) {
currentIndex = numElements - 1;
}
focusElement();
return false;
},
focusNext = function() {
currentIndex++;
if (currentIndex >= numElements) {
currentIndex = 0;
}
focusElement();
return false;
},
setKeydownListner = function($modal, $closeButton) {
$modal.on('keydown', function(e) {
var keyCode = e.keyCode || e.which,
escapeKeyCode = 27,
tabKeyCode = 9;
if (keyCode === escapeKeyCode) {
e.preventDefault();
$closeButton.click();
}
if (keyCode === tabKeyCode && e.shiftKey) {
e.preventDefault();
focusPrevious();
} else if (keyCode === tabKeyCode) {
e.preventDefault();
focusNext();
}
});
};
return {
initializeTabKeyValues: initializeTabKeyValues,
setKeydownListner: setKeydownListner
};
}());
......@@ -561,14 +561,6 @@ html.video-fullscreen {
}
}
section.xqa-modal, section.staff-modal, section.history-modal {
width: 80%;
height: 80%;
left: left(20%);
overflow: auto;
display: none;
}
div.staff_info {
display: none;
@include clearfix();
......
......@@ -372,7 +372,7 @@ $body-line-height: golden-ratio(.875em, 1) !default;
$base-font-color: rgb(60,60,60) !default;
$baseFontColor: $base-font-color;
$lighter-base-font-color: rgb(100,100,100) !default;
$lighter-base-font-color: rgb(100,100,100) $base-font-color;
$very-light-text: rgb(255,255,255) !default;
$text-color: rgb(51, 51, 51) !default;
......
......@@ -5,19 +5,11 @@
<script type="text/javascript">
function setup_debug(element_id, edit_link, staff_context){
var staffDebugTrigger = $('#' + element_id + '_trig'),
xqaLogTrigger = $('#' + element_id + '_xqa_log'),
historyTrigger = $("#" + element_id + "_history_trig"),
debugModalSelector = '#' + element_id + '_debug',
historyModalSelector = '#' + element_id + '_history',
xqaModalSelector = '#' + element_id + '_xqa-modal',
leanOverlaySelector = $('#lean_overlay');
staffDebugTrigger.leanModal();
xqaLogTrigger.leanModal();
$('#' + element_id + '_trig').leanModal();
$('#' + element_id + '_xqa_log').leanModal();
$('#' + element_id + '_xqa_form').submit(function () {sendlog(element_id, edit_link, staff_context);});
historyTrigger.leanModal();
$("#" + element_id + "_history_trig").leanModal();
$('#' + element_id + '_history_form').submit(
function () {
......@@ -29,31 +21,6 @@ function setup_debug(element_id, edit_link, staff_context){
return false;
}
);
DialogTabControls.setKeydownListner($(debugModalSelector), leanOverlaySelector);
DialogTabControls.setKeydownListner($(historyModalSelector), leanOverlaySelector);
DialogTabControls.setKeydownListner($(xqaModalSelector), leanOverlaySelector);
staffDebugTrigger.on('click', function() {
DialogTabControls.initializeTabKeyValues(debugModalSelector);
$(debugModalSelector).attr("aria-hidden", "false");
});
historyTrigger.on('click', function() {
DialogTabControls.initializeTabKeyValues(historyModalSelector);
$(historyModalSelector).attr("aria-hidden", "false");
});
xqaLogTrigger.on('click', function() {
DialogTabControls.initializeTabKeyValues(xqaModalSelector);
$(xqaModalSelector).attr("aria-hidden", "false");
});
leanOverlaySelector.click(function () {
$(xqaModalSelector).attr("aria-hidden", "true");
$(historyModalSelector).attr("aria-hidden", "true");
$(debugModalSelector).attr("aria-hidden", "true");
})
}
function sendlog(element_id, edit_link, staff_context){
......
......@@ -31,7 +31,7 @@ ${block_content}
</div>
% endif
<section aria-hidden="true" role="dialog" tabindex="-1" id="${element_id}_xqa-modal" class="modal xqa-modal">
<section aria-hidden="true" id="${element_id}_xqa-modal" class="modal xqa-modal" style="width:80%; left:20%; height:80%; overflow:auto" >
<div class="inner-wrapper">
<header>
<h2>${_("{platform_name} Content Quality Assessment").format(platform_name=settings.PLATFORM_NAME)}</h2>
......@@ -39,7 +39,7 @@ ${block_content}
<form id="${element_id}_xqa_form" class="xqa_form">
<label for="${element_id}_xqa_entry">${_("Comment")}</label>
<input tabindex="0" id="${element_id}_xqa_entry" type="text" placeholder="${_('comment')}">
<input id="${element_id}_xqa_entry" type="text" placeholder="${_('comment')}">
<label for="${element_id}_xqa_tag">${_("Tag")}</label>
<span style="color:black;vertical-align: -10pt">${_('Optional tag (eg "done" or "broken"):') + '&nbsp; '} </span>
<input id="${element_id}_xqa_tag" type="text" placeholder="${_('tag')}" style="width:80px;display:inline">
......@@ -53,8 +53,8 @@ ${block_content}
</div>
</section>
<section aria-hidden="true" role="dialog" tabindex="-1" class="modal staff-modal" id="${element_id}_debug" >
<div class="inner-wrapper">
<section aria-hidden="true" class="modal staff-modal" id="${element_id}_debug" style="width:80%; left:20%; height:80%; overflow:auto; display:none" >
<div class="inner-wrapper" style="color:black">
<header>
<h2>${_('Staff Debug')}</h2>
</header>
......@@ -64,7 +64,7 @@ ${block_content}
<h3>${_('Actions')}</h3>
<div>
<label for="sd_fu_${location.name | h}">${_('Username')}:</label>
<input type="text" tabindex="0" id="sd_fu_${location.name | h}" placeholder="${user.username}"/>
<input type="text" id="sd_fu_${location.name | h}" placeholder="${user.username}"/>
</div>
<div data-location="${location | h}" data-location-name="${location.name | h}">
[
......@@ -108,14 +108,14 @@ category = ${category | h}
</div>
</section>
<section aria-hidden="true" role="dialog" tabindex="-1" class="modal history-modal" id="${element_id}_history">
<div class="inner-wrapper">
<section aria-hidden="true" class="modal history-modal" id="${element_id}_history" style="width:80%; left:20%; height:80%; overflow:auto;" >
<div class="inner-wrapper" style="color:black">
<header>
<h2>${_("Submission History Viewer")}</h2>
</header>
<form id="${element_id}_history_form">
<label for="${element_id}_history_student_username">${_("User:")}</label>
<input tabindex="0" id="${element_id}_history_student_username" type="text" placeholder=""/>
<input id="${element_id}_history_student_username" type="text" placeholder=""/>
<input type="hidden" id="${element_id}_history_location" value="${location | h}"/>
<div class="submit">
<button name="submit" type="submit">${_("View History")}</button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment