Chronoforms and admin tools

deef73 25 Nov, 2013
Hi All,

I'm using chronoforms on several sites. Only when I combine the javascript files with admin tools professional, chronoforms output is buggy.

I found in the page source this:

<script src="http://www.mydomain.be/components/com_chronoforms/js/formcheck/formcheck-yui.js" type="text/javascript"></script>
  <script src="http://www.mydomain.be/components/com_chronoforms/js/formcheck/formcheck-max.js" type="text/javascript"></script>
  <script src="http://www.mydomain.be/components/com_chronoforms/js/formcheck/lang/nl.js" type="text/javascript"></script>


So I added this lines to the skip addonn in chronoforms (do you see also that the javascript is linking directly to the domain, why is it not relative ?)

This is for 40% the solution... After this I got a following problem, the output is still buggy. But now there is a javascript directly in the page source. (why is this not in a seperate file ?

It's about:

  <script type="text/javascript">

		window.addEvent('domready', function() {

			SqueezeBox.initialize({});
			SqueezeBox.assign($$('a.modal'), {
				parse: 'rel'
			});
		});
//<![CDATA[
			window.addEvent('domready', function() {
				$('chronoform_offerte_myform_01').addClass('hasValidation');
								formCheck_offerte_myform_01 = new FormCheckMax('chronoform_offerte_myform_01', {
									onValidateSuccess: $empty,
					display : {
						showErrors : 0,
						errorsLocation: 1					}
				});										
			});
			
//]]>
//<![CDATA[
			window.addEvent('domready', function(){
				//create the tooltips
				var tipz = new Tips($$('div.tooltipimg'),{
					className: 'tooltipbox',
					fixed: true,
					hideDelay: 0,
					showDelay: 0
				});
			});
		
//]]>
	window.addEvent('domready', function(){ $$('dl.tabs').each(function(tabs){ new JTabs(tabs, {}); }); });
		window.addEvent('domready', function() {

			SqueezeBox.initialize({});
			SqueezeBox.assign($$('a.modal-button'), {
				parse: 'rel'
			});
		});
			function isBrowserIE() {
				return navigator.appName=="Microsoft Internet Explorer";
			}

			function jInsertEditorText( text, editor ) {
				if (isBrowserIE()) {
					if (window.parent.tinyMCE) {
						window.parent.tinyMCE.selectedInstance.selection.moveToBookmark(window.parent.global_ie_bookmark);
					}
				}
				tinyMCE.execInstanceCommand(editor, 'mceInsertContent',false,text);
			}

			var global_ie_bookmark = false;

			function IeCursorFix() {
				if (isBrowserIE()) {
					tinyMCE.execCommand('mceInsertContent', false, '');
					global_ie_bookmark = tinyMCE.activeEditor.selection.getBookmark(false);
				}
				return true;
			}
if (typeof RokBoxSettings == 'undefined') RokBoxSettings = {pc: '100'};
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-45933079-1']);
	_gaq.push(['_trackPageview']);

	(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	})();
	

  </script>
  <script type="text/javascript" src="http://www.mydomain.be/media/editors/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
	<script type="text/javascript">
				tinyMCE.init({
					// General
					dialog_type : "modal",
					directionality: "ltr",
					editor_selector : "mce_editable",
					language : "nl",
					mode : "specific_textareas",
					plugins : "paste,searchreplace,insertdatetime,table,emotions,media,advhr, directionality,fullscreen,layer,style,xhtmlxtras,visualchars,visualblocks, nonbreaking,wordcount,template,advimage,advlink,advlist,autosave,contextmenu, inlinepopups",
					skin : "default",
					theme : "advanced",
					// Cleanup/Output
					inline_styles : true,
					gecko_spellcheck : true,
					entity_encoding : "raw",
					extended_valid_elements : "hr[id|title|alt|class|width|size|noshade|style], img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style], a[id|class|name|href|hreflang|target|title|onclick|rel|style]",
					force_br_newlines : false, force_p_newlines : true, forced_root_block : 'p',
					invalid_elements : "script,applet,iframe",
					// URL
					relative_urls : true,
					remove_script_host : false,
					document_base_url : "http://www.mydomain.be/",
					//Templates
					template_external_list_url :  "http://www.mydomain.be/media/editors/tinymce/templates/template_list.js",
					// Layout
					content_css : "http://www.mydomain.be/templates/system/css/editor.css",
					// Advanced theme
					theme_advanced_toolbar_location : "top",
					theme_advanced_toolbar_align : "left",
					theme_advanced_source_editor_height : "550",
					theme_advanced_source_editor_width : "750",
					theme_advanced_resizing : true,
					theme_advanced_resize_horizontal : false,
					theme_advanced_statusbar_location : "bottom", theme_advanced_path : true,
					theme_advanced_buttons1_add_before : "",
					theme_advanced_buttons2_add_before : "search,replace,|",
					theme_advanced_buttons3_add_before : "tablecontrols",
					theme_advanced_buttons1_add : "fontselect,fontsizeselect",
					theme_advanced_buttons2_add : "insertdate,inserttime,forecolor,backcolor,fullscreen",
					theme_advanced_buttons3_add : "emotions,media,advhr,ltr,rtl",
					theme_advanced_buttons4 : "cut,copy,paste,pastetext,pasteword,selectall,|, insertlayer,moveforward,movebackward,absolute,styleprops,cite,abbr,acronym,ins, del,attribs,visualchars,visualblocks,nonbreaking,blockquote,template",
					plugin_insertdate_dateFormat : "%Y-%m-%d",
					plugin_insertdate_timeFormat : "%H:%M:%S",
					fullscreen_settings : {
						theme_advanced_path_location : "top"
					}
				});
				</script>


Is there a solution for this problem ? So I can combine my javascript files ? It's better for the loading time of the site !

cheers,

Thanx,

deef
GreyHead 26 Nov, 2013
Hi deef73,

I don't see any bugs here - what exactly is the problem?

Bob
deef73 26 Nov, 2013
Like you say🙂

There is no problem when I don't combine the javascript.

Look at this example:
http://www.urlgone.com/e8d788/

However, when I combine the javascript, things are buggy:

http://www.urlgone.com/2ba6f2/

(the problem is on the latest site)

I have combined javascript files with Admin tools (seo and link tools)
Look at the tooltips, look at the panels, they are underneath each other, ....
And there are more problems I Guess ?

I wish to combine the javascript so the site is loading faster!
GreyHead 27 Nov, 2013
Hi deef73,

The problem with the JavaScript zippers and combiners is that they often seem to change the order of scripts and thus break them. They also won't work with any 'dynamic' scripts that include PH variables.

Looks like you have a choice, get faster loading pages that are broken or pages that work but take a little longer to load.

Bob
This topic is locked and no more replies can be posted.