function body_script()
 {
     qa_html_theme_base::body_script();
     if ($this->jsTOS) {
         $error = qa_opt('tos_error');
         $this->output('<script type="text/javascript">', "\n\t\t\t\t\$(document).ready(function(e) {  \n\t\t\t\t\t\$('#register').click(function() {\n\t\t\t\t\t\tif (jQuery('#TOS').is(':checked')){\n\t\t\t\t\t\t\t\$('.qa-waiting').show();\n\t\t\t\t\t\t\t\$('#TOSvalidation').remove();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\$('#TOSvalidation').parent().parent().remove();\n\t\t\t\t\t\t\t\$('#TOS').parent().parent().append( '<tr><td class=\"qa-form-tall-data\"><div id=\"TOSvalidation\" class=\"qa-form-tall-error\">" . $error . "</div></td></tr>' );\n\t\t\t\t\t\t\t\$('.qa-waiting').hide();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t", '</script>');
     }
 }
示例#2
0
    function body_script()
    {
        if ($this->template == 'theme_options') {
            $this->output('<link rel="stylesheet" media="screen" type="text/css" href="' . $this->theme_url . 'includes/colorpicker.css" />');
            $this->output('<script src="' . $this->theme_url . 'includes/colorpicker.min.js"></script>');
            $this->output('<script type="text/javascript">
				$(document).ready(function() {
					$(\'#qat_bg_color_field\').ColorPicker({
						onShow: function (colpkr) {
							$(colpkr).fadeIn(500);
							return false;
						},
						onHide: function (colpkr) {
							$(colpkr).fadeOut(500);
							return false;
						},
						onChange: function (hsb, hex, rgb) {
							$(\'#qat_bg_color_field\').css(\'backgroundColor\', \'#\' + hex);
							$(\'#qat_bg_color_field\').val(\'#\' + hex);
							
						}
					}); 
				});
				</script>');
        }
        qa_html_theme_base::body_script();
    }