Commit aa6a2eb7 authored by Evan Goldenberg's avatar Evan Goldenberg
Browse files

use language strings for export view selection controls (bug #547407)


Signed-off-by: default avatarEvan Goldenberg <evang@catalyst.net.nz>
parent 7ff37f19
......@@ -8,6 +8,7 @@
*/
addLoadEvent(function() {
removeElementClass($('whatviewsselection'), 'hidden');
var container = $('whatviews');
var containerVisible = false;
var radios = [];
......@@ -58,7 +59,7 @@ addLoadEvent(function() {
var checkboxes = getElementsByTagAndClassName('input', 'checkbox', 'whatviews');
var checkboxHelperDiv = DIV();
var checkboxSelectAll = A({'href': ''}, 'Select all');
var checkboxSelectAll = $('selection_all');
connect(checkboxSelectAll, 'onclick', function(e) {
e.stop();
forEach(checkboxes, function(i) {
......@@ -66,7 +67,7 @@ addLoadEvent(function() {
});
});
var checkboxReverseSelection = A({'href': ''}, 'Reverse selection');
var checkboxReverseSelection = $('selection_reverse');
connect(checkboxReverseSelection, 'onclick', function(e) {
e.stop();
forEach(checkboxes, function(i) {
......@@ -74,8 +75,6 @@ addLoadEvent(function() {
});
});
appendChildNodes(checkboxHelperDiv, checkboxSelectAll, ' | ', checkboxReverseSelection);
insertSiblingNodesBefore(getFirstElementByTagAndClassName('table', null, container), checkboxHelperDiv);
});
......@@ -47,6 +47,8 @@ $string['generateexport'] = 'Generate export';
$string['noexportpluginsenabled'] = 'No export plugins have been enabled by the administrator, so you are unable to use this feature';
$string['justsomeviews'] = 'Just some of my Views';
$string['pleasewaitwhileyourexportisbeinggenerated'] = 'Please wait while your export is being generated...';
$string['reverseselection'] = 'Reverse selection';
$string['selectall'] = 'Select all';
$string['setupcomplete'] = 'Setup complete';
$string['Starting'] = 'Starting';
$string['unabletoexportportfoliousingoptions'] = 'Unable to export a portfolio using the chosen options';
......
......@@ -40,6 +40,9 @@ foreach ($elements as $key => $element) {
}
if ($body) {
echo '<div id="whatviewsselection" class="hidden"><a href="" id="selection_all">'
. get_string('selectall', 'export') . '</a> | <a href="" id="selection_reverse">'
. get_string('reverseselection', 'export') . '</a></div>';
echo "<table>\n";
foreach ($body as $rownum => $row) {
if ($rownum == 0) {
......
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