Skip to content

Commit

Permalink
Merge branch 'MDL-57527-master' of git://github.com/danpoltawski/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Feb 21, 2017
2 parents 5c73061 + e46b11a commit 492099d
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 193 deletions.
9 changes: 7 additions & 2 deletions portfolio/download/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
$returnurl = $exporter->get('caller')->get_return_url();
echo $OUTPUT->notification('<a href="' . $returnurl . '">' . get_string('returntowhereyouwere', 'portfolio') . '</a><br />');

$PAGE->requires->js('/portfolio/download/helper.js');
$PAGE->requires->js_function_call('submit_download_form', null, true);

// if they don't have javascript, they can submit the form here to get the file.
// if they do, it does it nicely for them.
Expand All @@ -35,6 +33,13 @@
<input type="submit" value="' . get_string('downloadfile', 'portfolio_download') . '" />
</form>
';

$PAGE->requires->js_amd_inline("
require(['jquery'], function($) {
$('#redirectform').submit(function() {
$('#redirect').addClass('hide');
}).submit();
});");
echo $OUTPUT->footer();


7 changes: 0 additions & 7 deletions portfolio/download/helper.js

This file was deleted.

7 changes: 2 additions & 5 deletions report/completion/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,6 @@

echo $OUTPUT->header();

$PAGE->requires->js('/report/completion/textrotate.js');
$PAGE->requires->js_function_call('textrotate_init', null, true);

// Handle groups (if enabled)
groups_print_course_menu($course, $CFG->wwwroot.'/report/completion/?course='.$course->id);
}
Expand Down Expand Up @@ -417,13 +414,13 @@
// Get criteria details
$details = $criterion->get_title_detailed();
print '<th scope="col" class="colheader criterianame">';
print '<span class="completion-criterianame">'.$details.'</span>';
print '<div class="rotated-text-container"><span class="rotated-text">'.$details.'</span></div>';
print '</th>';
}

// Overall course completion status
print '<th scope="col" class="colheader criterianame">';
print '<span class="completion-criterianame">'.get_string('coursecomplete', 'completion').'</span>';
print '<div class="rotated-text-container"><span class="rotated-text">'.get_string('coursecomplete', 'completion').'</span></div>';
print '</th></tr>';
}

Expand Down
31 changes: 28 additions & 3 deletions report/completion/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,32 @@
text-align: center;
list-style: none;
}
/*rtl:ignore*/
#page-report-completion-index #completion-progress th svg {
direction: ltr;

#page-report-completion-index .criterianame,
#page-report-completion-index .criteriaicon,
#page-report-completion-index .completion-progresscell {
text-align: center;
}

/* Custom CSS for rotated header.. */
#page-report-completion-index .rotated-text-container {
display: inline-block;
width: 16px;
}

/*rtl:begin:ignore*/
#page-report-completion-index .rotated-text {
display: inline-block;
white-space: nowrap;

transform: translate(0, 100%) rotate(-90deg);
transform-origin: 0 0;
vertical-align: middle;
}

#page-report-completion-index .rotated-text:after {
content: "";
float: left;
margin-top: 100%;
}
/*rtl:end:ignore*/
72 changes: 0 additions & 72 deletions report/completion/textrotate.js

This file was deleted.

11 changes: 5 additions & 6 deletions report/progress/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ function csv_quote($value) {
$PAGE->set_title($strcompletion);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
$PAGE->requires->js('/report/progress/textrotate.js');
$PAGE->requires->js_function_call('textrotate_init', null, true);

// Handle groups (if enabled)
groups_print_course_menu($course,$CFG->wwwroot.'/report/progress/?course='.$course->id);
Expand Down Expand Up @@ -323,13 +321,14 @@ function csv_quote($value) {
print $sep.csv_quote($displayname).$sep.csv_quote($datetext);
} else {
$shortenedname = shorten_text($displayname);
print '<th scope="col" class="'.$datepassedclass.'">'.
print '<th scope="col" class="completion-header '.$datepassedclass.'">'.
'<a href="'.$CFG->wwwroot.'/mod/'.$activity->modname.
'/view.php?id='.$activity->id.'" title="' . s($displayname) . '">'.
'<img src="'.$OUTPUT->pix_url('icon', $activity->modname).'" alt="'.
'<div class="rotated-text-container"><span class="rotated-text">'.$shortenedname.'</span></div>'.
'<div class="modicon"><img src="'.$OUTPUT->pix_url('icon', $activity->modname).'" alt="'.
s(get_string('modulename', $activity->modname)).
'" /> <span class="completion-activityname">'.
$shortenedname.'</span></a>';
'" /></div></a>';

if ($activity->completionexpected) {
print '<div class="completion-expected"><span>'.$datetext.'</span></div>';
}
Expand Down
36 changes: 32 additions & 4 deletions report/progress/styles.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#page-report-progress-index #completion-progress th,
#page-report-progress-index #completion-progress td {
padding: 2px 4px;
padding: 2px 2px;
font-weight: normal;
border-right: 1px solid #eee;
}
Expand Down Expand Up @@ -28,7 +28,35 @@
display: inline;
margin-left: 2em;
}
/*rtl:ignore*/
#page-report-progress-index #completion-progress th svg {
direction: ltr;

#page-report-progress-index .completion-header,
#page-report-progress-index .completion-progresscell {
text-align: center;
}

/* Custom CSS for rotated header.. */
#page-report-progress-index .rotated-text-container {
display: inline-block;
width: 16px;
}

/*rtl:begin:ignore*/
#page-report-progress-index .rotated-text {
display: inline-block;
white-space: nowrap;

transform: translate(0, 100%) rotate(-90deg);
transform-origin: 0 0;
vertical-align: middle;
}

#page-report-progress-index .rotated-text:after {
content: "";
float: left;
margin-top: 100%;
}

#page-report-progress-index .modicon {
padding-top: 5px;
}
/*rtl:end:ignore*/
94 changes: 0 additions & 94 deletions report/progress/textrotate.js

This file was deleted.

0 comments on commit 492099d

Please sign in to comment.