Skip to content

Commit

Permalink
Merge pull request #109 from fpcorso/4.0.0
Browse files Browse the repository at this point in the history
Version 4.0.0
  • Loading branch information
fpcorso committed Jan 13, 2015
2 parents 8ada308 + 6274adf commit 3f6c18b
Show file tree
Hide file tree
Showing 65 changed files with 8,336 additions and 5,301 deletions.
Binary file modified assets/screenshot-2.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-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions includes/css/qmn_addons_page.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.qmn_addons
{
float: left;
width: 300px;
height: 300px;
border: 1px solid #ccc;
padding: 10px;
margin: 10px;
position: relative;
}
.qmn_addons_title
{
font-size: 15px;
}
.qmn_addons_desc
{

}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
53 changes: 37 additions & 16 deletions includes/qmn_quiz.js → includes/js/qmn_quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ function clear_field(field)
function mlw_validateForm()
{
mlw_validateResult = true;
jQuery('#quizForm *').filter(':input').each(function(){

jQuery('#quizForm *').each(function(){
jQuery(this).css("outline", "");
if (jQuery(this).attr('class'))
{
Expand All @@ -42,48 +42,69 @@ function mlw_validateForm()
var dotpos=x.lastIndexOf('.');
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
{
document.getElementById('mlw_error_message').innerHTML = '**Not a valid e-mail address!**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**Not a valid e-mail address!**';
document.getElementById('mlw_error_message').innerHTML = '**'+email_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+email_error+'**';
mlw_validateResult = false;
jQuery(this).css("outline", "2px solid red");
}
}
if(jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value == "" && +this.value != NaN)
{
document.getElementById('mlw_error_message').innerHTML = '**This field must be a number!**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**This field must be a number!**';
document.getElementById('mlw_error_message').innerHTML = '**'+number_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+number_error+'**';
jQuery(this).css("outline", "2px solid red");
mlw_validateResult = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredText') > -1 && this.value == "")
{
document.getElementById('mlw_error_message').innerHTML = '**Please complete all required fields!**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**Please complete all required fields!**';
document.getElementById('mlw_error_message').innerHTML = '**'+empty_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+empty_error+'**';
jQuery(this).css("outline", "2px solid red");
mlw_validateResult = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredCaptcha') > -1 && this.value != mlw_code)
{
document.getElementById('mlw_error_message').innerHTML = '**The entered text is not correct!**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**The entered text is not correct!**';
document.getElementById('mlw_error_message').innerHTML = '**'+incorrect_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+incorrect_error+'**';
jQuery(this).css("outline", "2px solid red");
mlw_validateResult = false;
}
if(jQuery(this).attr('class').indexOf('mlwRequiredCheck') > -1 && !this.checked)
if(jQuery(this).attr('class').indexOf('mlwRequiredAccept') > -1 && !this.checked)
{
document.getElementById('mlw_error_message').innerHTML = '**Please complete all required fields!**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**Please complete all required fields!**';
document.getElementById('mlw_error_message').innerHTML = '**'+empty_error+'**';
document.getElementById('mlw_error_message_bottom').innerHTML = '**'+empty_error+'**';
jQuery(this).css("outline", "2px solid red");
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");
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");
mlw_validateResult = false;
}
}
}
});

if (!mlw_validateResult) {return mlw_validateResult;}

jQuery( '.mlw_qmn_quiz input:radio' ).attr('disabled',false);
jQuery( '.mlw_qmn_quiz input:checkbox' ).attr('disabled',false);
jQuery( '.mlw_qmn_quiz select' ).attr('disabled',false);
jQuery( '.mlw_qmn_question_comment' ).attr('disabled',false);
jQuery( '.mlw_answer_open_text' ).attr('disabled',false);
}
}
File renamed without changes.
7 changes: 4 additions & 3 deletions includes/qmn_timer.js → includes/js/qmn_timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function timer()
window.amount=window.amount-1;
if (window.amount < 0)
{
window.amount = 0;
window.amount = 0;
}
window.sessionStorage.setItem('mlw_time_quiz'+qmn_quiz_id, window.amount/60);
window.sessionStorage.setItem('mlw_started_quiz'+qmn_quiz_id, "yes");
Expand All @@ -32,6 +32,7 @@ function timer()
jQuery( ".mlw_qmn_quiz select" ).attr('disabled',true);
jQuery( ".mlw_qmn_question_comment" ).attr('disabled',true);
jQuery( ".mlw_answer_open_text" ).attr('disabled',true);
jQuery( ".mlw_answer_number" ).attr('disabled',true);
//document.quizForm.submit();
return;
}
Expand Down Expand Up @@ -66,8 +67,8 @@ function minToSec(amount)
timer_display = timer_display + minutes + ":";
}
var seconds = Math.floor(amount % 60);
if (seconds == '0')
{
if (seconds == '0')
{
timer_display = timer_display +"00";
}
else if (seconds < 10)
Expand Down
File renamed without changes.
Loading

0 comments on commit 3f6c18b

Please sign in to comment.