Skip to content

Commit

Permalink
Bug #6, JS + LESS styles to make alert-links bolder [iet:10264876]
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Nov 9, 2017
1 parent e802393 commit b538c50
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
3 changes: 2 additions & 1 deletion js/src/ouop-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@ function replace_object (str, mapObj) {

function alert (msg, id, cls) {
return '<div id="' + (id || 'oua') + '" class="ouop alert ' +
(cls || 'alert-info') + '" role="alert">' + msg + '</div>';
(cls || 'alert-warning') + '" role="alert">' +
msg.replace(/href=/g, 'class="alert-link" href=') + '</div>';
}
4 changes: 2 additions & 2 deletions js/src/survey-embed-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function generic_embeds ($, resp) {
var $link = $(el);
var url = util.replace($link.attr('href'), { '{oucu}': resp.profile.ouop_oucu });
var m_height = url.match(/height=(\d+\w+);?/);
var height = 'height: ' + (m_height ? m_height[ 1 ] : '1000px;');
var height = 'height: ' + (m_height ? m_height[ 1 ] : '1050px;');

$link.replaceWith(util.replace('<iframe src="{u}" style="{h}" class="ouop-generic-ifr" id="ifr-{i}"></iframe>', {
'{u}': url, '{h}': height, '{i}': idx
Expand All @@ -48,7 +48,7 @@ function embed_pilot_surveys ($, resp) {
var survey_urls = resp.survey_urls;
var survey_url = url.match(/-pre-survey-/) ? survey_urls.pre : survey_urls.post;
var m_height = url.match(/height=(\d+\w+);?/);
var height = 'height: ' + (m_height ? m_height[ 1 ] : '1000px;');
var height = 'height: ' + (m_height ? m_height[ 1 ] : '1050px;');

survey_url = survey_url.replace(/\{?OUCU\}?/, resp.profile.ouop_oucu).replace(/\{COURSE\}/gi, resp.course_code);

Expand Down
38 changes: 37 additions & 1 deletion style/ouop-styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ body {
background-color: #f9f9f9;
}

.alert {
font-size: 1.15rem;
text-align: center;

a {
// display: inline-block;
font-size: 1.2rem;
// font-weight: bold;
// text-decoration: underline;
padding-bottom: 2px;
border-bottom: 1px dotted rgb(220, 165, 65);
}

a:focus,
a:hover {
outline: 2px solid darkorange;
outline-offset: 6px;
transition: all 2s;
}

&.alert-warning {
border-color: rgb(220, 165, 65); // orange;
}
}

div[ data-region = drawer ] {
background-color: transparent;
}
Expand Down Expand Up @@ -87,6 +112,11 @@ div[ data-region = drawer ] {
}
// }

.ouop-pilot-survey-ifr {
min-width: 560px;
max-width: 820px;
}

iframe.ouop-consent-doc {
height: 52em;
}
Expand Down Expand Up @@ -120,7 +150,7 @@ iframe.ouop-consent-doc {
}
}

// ----------------------------------------
// --------------------------------------------
// Simplify the Moodle user-interface (Boost theme)

.ouop-hide-unused-ui {
Expand Down Expand Up @@ -246,6 +276,12 @@ iframe.ouop-consent-doc {
border-color: green;
}
}

&#page-mod-quiz-view {
h3 {
font-size: 1.5rem;
}
}
}


Expand Down

0 comments on commit b538c50

Please sign in to comment.