Commit cb341972 authored by Dave Lane's avatar Dave Lane

add link to blog feed finder on enrolled menu. Fixes #12. Need make...

add link to blog feed finder on enrolled menu. Fixes #12. Need make conditional on blog feed finder being installed
parent 824660c5
......@@ -154,8 +154,9 @@ article.ore-form .container .entry-content > div.ore {
margin-top: 8px;
margin-bottom: 0;
}
.ore-trigger {
}
.ore-trigger { }
.ore-extra { margin-left: 1em; }
.ore-extra a { font-weight: bold; }
#ore-container .ore-enrolled, #ore-container .ore-unenrolled {
left: 0;
......
......@@ -97,11 +97,13 @@ jQuery(document).ready(function() {
login_text = '<p>You are logged in as '+user.display_name+' ('+user.username+').</p>';
button_text = '<span id="ore-edit-profile-button" class="button ore-button" data-toggle="modal" data-target="#ore-modal">Edit Profile</span>&nbsp;<span id="ore-update-password-button" class="button ore-button">Update Password</span>&nbsp;&nbsp;&nbsp;<span id="ore-log-out-button" class="button ore-button">Log Out</span>';
course = false;
var cat, label, extra = "", course_text;
if (user.hasOwnProperty('course') && user.course != null) {
course = true;
if (user.course.enrolled) {
cat = 'leave';
label = 'Leave '+user.course.course_tag;
extra = '<span class="ore-extra">Add your <a target="_blank" title="Opens the Blog Feed Finder in a new tab or window!" href="/blog-feed-finder">blog feed</a> for scanning!</span>';
course_text = '<p>You are <strong>enrolled</strong> in "'+user.course.course_title+'"</p>';
} else {
cat = 'enrol';
......@@ -115,7 +117,7 @@ jQuery(document).ready(function() {
text += '<div class="ore-menu-block '+extra_class+' ore-first">'+login_text+button_text+'</div>';
if (course) {
// course enrollment status
text += '<div class="ore-menu-block '+extra_class+' ore-second">'+course_text+'<span id="ore-'+cat+'-button" class="button ore-button" data-toggle="modal" data-target="#ore-modal">'+label+'</span></div>';
text += '<div class="ore-menu-block '+extra_class+' ore-second">'+course_text+'<span id="ore-'+cat+'-button" class="button ore-button" data-toggle="modal" data-target="#ore-modal">'+label+'</span>'+extra+'</div>';
}
LOG('new text: '+text);
// enable menus
......@@ -1045,9 +1047,12 @@ if (user_status()) {
}
// on a click outside the menu, close the menu
$(document).click(function(){
LOG('closing menus!');
LOG('document click - closing menus: '+menu);
//$("."+menu).hide();
$("."+menu).remove();
/* if (menu == )
$("#"+menu).remove();
*/
});
// set this up to submit on 'enter'
$('input').keypress( function (e) {
......
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