Commit bd74529b authored by Jim Tittsler's avatar Jim Tittsler

Add user_registration button with no link.

The earlier courses presumed the user_registration button contained
a link. This removes that assumption and allows a button to contain
text only.

Resolves #28
parent 4ebba2c7
......@@ -2,7 +2,7 @@
/* jshint node: true, multistr: true, trailing: true, esnext: true */
"use strict";
const VERSION = '0.11.5',
const VERSION = '0.11.6',
JQUERY = 'http://code.jquery.com/jquery-2.1.1.min.js',
FILEPATH = '/home/www/www';
......@@ -413,10 +413,16 @@ function processPage(pi) {
$('div.WEbutton a').addClass('btn btn-primary');
// registration buttons are a special case
$('div.WEbutton').each(function() {
var $a;
if ($(this).hasClass('user_registration')) {
$(this).find('a').removeAttr('href')
.attr('data-toggle', 'modal')
.attr('data-target', '#userModal');
$a = $(this).find('a');
if ($a.length === 0) {
$(this).wrapInner('<a></a>');
$a = $(this).find('a');
}
$a.removeAttr('href')
.attr('data-toggle', 'modal')
.attr('data-target', '#userModal');
}
});
// turn WEbox with WEbox-header into a panel
......
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