Skip to content

Commit

Permalink
Merge pull request #297 from fpcorso/release/4.5.5
Browse files Browse the repository at this point in the history
Release 4.5.5
  • Loading branch information
Frank Corso committed Sep 30, 2015
2 parents 40547bf + d7f4ae1 commit 94c7a31
Show file tree
Hide file tree
Showing 36 changed files with 2,743 additions and 639 deletions.
Binary file modified assets/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/screenshot-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/screenshot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/screenshot-8.png
Binary file not shown.
16 changes: 4 additions & 12 deletions css/qmn_quiz.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
.ui-tooltip
{
.ui-tooltip {
max-width: 500px !important;
}
.ui-tooltip-content
{
.ui-tooltip-content {
max-width: 500px !important;
}
.qmn_error
{
color: red;
}
.mlw_qmn_hint_link
{
.mlw_qmn_hint_link {
text-decoration:underline;
color:rgb(0,0,255);
}
.mlw_qmn_quiz_link
{
.mlw_qmn_quiz_link {
display: inline;
vertical-align:top !important;
text-decoration: none;
Expand Down
39 changes: 14 additions & 25 deletions js/qmn_pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,59 @@
//Function to validate the answers provided in quiz
function qmnValidatePage() {
var validated = true;
qmn_reset_error();
jQuery(".quiz_section.slide"+window.mlw_quiz_slide+' *').each(function(){
jQuery(this).css("outline", "");
if (jQuery(this).attr('class'))
{
if(jQuery(this).attr('class').indexOf('mlwEmail') > -1 && this.value != "")
{
if(jQuery(this).attr('class').indexOf('mlwEmail') > -1 && this.value != "") {
var x=this.value;
var atpos=x.indexOf('@');
var dotpos=x.lastIndexOf('.');
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
{
jQuery('.qmn_page_error_message').text('**'+email_error+'**');
qmn_display_error( email_error, jQuery(this) );
validated = false;
jQuery(this).css("outline", "2px solid red");
}
}
if(jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value == "" && +this.value != NaN)
{
jQuery('.qmn_page_error_message').text('**'+number_error+'**');
jQuery(this).css("outline", "2px solid red");
qmn_display_error( number_error, jQuery(this) );
validated = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredText') > -1 && this.value == "")
{
jQuery('.qmn_page_error_message').text('**'+empty_error+'**');
jQuery(this).css("outline", "2px solid red");
qmn_display_error( empty_error, jQuery(this) );
validated = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredCaptcha') > -1 && this.value != mlw_code)
{
jQuery('.qmn_page_error_message').text('**'+incorrect_error+'**');
jQuery(this).css("outline", "2px solid red");
qmn_display_error( incorrect_error, jQuery(this) );
validated = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredAccept') > -1 && !this.checked)
{
jQuery('.qmn_page_error_message').text('**'+empty_error+'**');
jQuery(this).css("outline", "2px solid red");
qmn_display_error( empty_error, jQuery(this) );
validated = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredRadio') > -1)
{
check_val = jQuery(this).find('input:checked').val();
if (check_val == "No Answer Provided")
{
jQuery('.qmn_page_error_message').text('**'+empty_error+'**');
jQuery(this).css("outline", "2px solid red");
qmn_display_error( empty_error, jQuery(this) );
validated = false;
}
}
if(jQuery(this).attr('class').indexOf('mlwRequiredCheck') > -1)
{
if (!jQuery(this).find('input:checked').length)
{
jQuery('.qmn_page_error_message').text('**'+empty_error+'**');
jQuery(this).css("outline", "2px solid red");
qmn_display_error( empty_error, jQuery(this) );
validated = false;
}
}
}
});
if (validated) {
jQuery('.qmn_page_error_message').text(' ');
}
return validated;
}

Expand Down Expand Up @@ -160,11 +149,11 @@ function qmn_return_to_top() {

jQuery( ".quiz_section" ).hide();
jQuery( ".quiz_section" ).append( "<br />" );
jQuery( ".mlw_qmn_quiz" ).append( '<a class="mlw_qmn_quiz_link mlw_previous" href="#">'+qmn_pagination_previous_text+'</a>' );
jQuery( ".mlw_qmn_quiz" ).append( '<span class="qmn_page_message"></span>' );
jQuery( ".mlw_qmn_quiz" ).append( '<span class="qmn_page_counter_message"></span>' );
jQuery( ".mlw_qmn_quiz" ).append( '<span class="qmn_page_error_message"></span>' );
jQuery( ".mlw_qmn_quiz" ).append( '<a class="mlw_qmn_quiz_link mlw_next" href="#">'+qmn_pagination_next_text+'</a>' );
jQuery( '.mlw_qmn_quiz' ).append( '<div class="qmn_pagination border margin-bottom"></div>' );
jQuery( ".qmn_pagination" ).append( '<a class="qmn_btn mlw_qmn_quiz_link mlw_previous" href="#">'+qmn_pagination_previous_text+'</a>' );
jQuery( ".qmn_pagination" ).append( '<span class="qmn_page_message"></span>' );
jQuery( ".qmn_pagination" ).append( '<div class="qmn_page_counter_message"></div>' );
jQuery( ".qmn_pagination" ).append( '<a class="qmn_btn mlw_qmn_quiz_link mlw_next" href="#">'+qmn_pagination_next_text+'</a>' );
window.mlw_quiz_slide = 0;
window.mlw_previous = 0;

Expand Down
115 changes: 45 additions & 70 deletions js/qmn_quiz.js
Original file line number Diff line number Diff line change
@@ -1,101 +1,68 @@
setTimeout(function(){
var $j = jQuery.noConflict();
// increase the default animation speed to exaggerate the effect
$j.fx.speeds._default = 1000;
$j(function() {
$j( ".mlw_qmn_quiz" ).tooltip();
});
}, 100);
setTimeout(function()
{
var $j = jQuery.noConflict();
$j('.mlw_qmn_quiz input').on('keypress', function (e) {
if (e.which === 13) {
e.preventDefault();
}
});
}, 100);
var myVar=setInterval("mlwQmnTimer();",1000);
function mlwQmnTimer()
{
function qmn_timer() {
var x = +document.getElementById("timer").value;
x = x + 1;
document.getElementById("timer").value = x;
}
function clear_field(field)
{
function clear_field(field) {
if (field.defaultValue == field.value) field.value = '';
}

function mlw_validateForm()
{
mlw_validateResult = true;
function qmn_display_error( message, field ) {
jQuery( '#mlw_error_message' ).addClass( 'qmn_error_message' );
jQuery( '#mlw_error_message_bottom' ).addClass( 'qmn_error_message' );
jQuery( '.qmn_error_message' ).text( message );
field.closest( '.quiz_section' ).addClass( 'qmn_error' );
}

function qmn_reset_error() {
jQuery( '.qmn_error_message' ).text( '' );
jQuery( '#mlw_error_message' ).removeClass( 'qmn_error_message' );
jQuery( '#mlw_error_message_bottom' ).removeClass( 'qmn_error_message' );
jQuery( '.quiz_section' ).removeClass( 'qmn_error' );
}

function mlw_validateForm() {
mlw_validateResult = true;
qmn_reset_error();
jQuery('#quizForm *').each(function(){
jQuery(this).css("outline", "");
if (jQuery(this).attr('class'))
{
if(jQuery(this).attr('class').indexOf('mlwEmail') > -1 && this.value != "")
{
if (jQuery(this).attr('class')) {
if(jQuery(this).attr('class').indexOf('mlwEmail') > -1 && this.value != "") {
var x=this.value;
var atpos=x.indexOf('@');
var dotpos=x.lastIndexOf('.');
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
{
document.getElementById('mlw_error_message').innerHTML = '**'+email_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+email_error+'**';
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) {
qmn_display_error( email_error, jQuery(this) );
mlw_validateResult = false;
jQuery(this).css("outline", "2px solid red");
}
}
if (window.sessionStorage.getItem('mlw_time_quiz'+qmn_quiz_id) == null || window.sessionStorage.getItem('mlw_time_quiz'+qmn_quiz_id) > 0.08) {

if(jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value == "" && +this.value != NaN)
{
document.getElementById('mlw_error_message').innerHTML = '**'+number_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+number_error+'**';
jQuery(this).css("outline", "2px solid red");
if(jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value == "" && +this.value != NaN) {
qmn_display_error( number_error, jQuery(this) );
mlw_validateResult = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredText') > -1 && this.value == "")
{
document.getElementById('mlw_error_message').innerHTML = '**'+empty_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+empty_error+'**';
jQuery(this).css("outline", "2px solid red");
if(jQuery(this).attr('class').indexOf('mlwRequiredText') > -1 && this.value == "") {
qmn_display_error( empty_error, jQuery(this) );
mlw_validateResult = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredCaptcha') > -1 && this.value != mlw_code)
{
document.getElementById('mlw_error_message').innerHTML = '**'+incorrect_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+incorrect_error+'**';
jQuery(this).css("outline", "2px solid red");
if(jQuery(this).attr('class').indexOf('mlwRequiredCaptcha') > -1 && this.value != mlw_code) {
qmn_display_error( incorrect_error, jQuery(this) );
mlw_validateResult = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredAccept') > -1 && !this.checked)
{
document.getElementById('mlw_error_message').innerHTML = '**'+empty_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+empty_error+'**';
jQuery(this).css("outline", "2px solid red");
if(jQuery(this).attr('class').indexOf('mlwRequiredAccept') > -1 && !this.checked) {
qmn_display_error( empty_error, jQuery(this) );
mlw_validateResult = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredRadio') > -1)
{
check_val = jQuery(this).find('input:checked').val();
if (check_val == "No Answer Provided")
{
document.getElementById('mlw_error_message').innerHTML = '**'+empty_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+empty_error+'**';
jQuery(this).css("outline", "2px solid red");
if(jQuery(this).attr('class').indexOf('mlwRequiredRadio') > -1) {
check_val = jQuery(this).find('input:checked').val();
if (check_val == "No Answer Provided") {
qmn_display_error( empty_error, jQuery(this) );
mlw_validateResult = false;
}
}
if(jQuery(this).attr('class').indexOf('mlwRequiredCheck') > -1)
{
if (!jQuery(this).find('input:checked').length)
{
document.getElementById('mlw_error_message').innerHTML = '**'+empty_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+empty_error+'**';
jQuery(this).css("outline", "2px solid red");
if(jQuery(this).attr('class').indexOf('mlwRequiredCheck') > -1) {
if (!jQuery(this).find('input:checked').length) {
qmn_display_error( empty_error, jQuery(this) );
mlw_validateResult = false;
}
}
Expand All @@ -112,6 +79,14 @@ function mlw_validateForm()
jQuery( '.mlw_answer_open_text' ).attr('disabled',false);
}

jQuery( '.mlw_qmn_quiz' ).tooltip();
jQuery( '.mlw_qmn_quiz input' ).on( 'keypress', function (e) {
if ( e.which === 13 ) {
e.preventDefault();
}
});
var myVar=setInterval("qmn_timer();",1000);

if (qmn_ajax_correct) {
jQuery('.qmn_quiz_radio').change(function() {
var chosen_answer = jQuery(this).val();
Expand Down
Binary file modified languages/quiz-master-next-da_DK.mo
Binary file not shown.
Loading

0 comments on commit 94c7a31

Please sign in to comment.