fbuilderjQuery = (typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQuery; fbuilderjQuery(function(){ (function($) { // Namespace of fbuilder $.fbuilder = $.fbuilder || {}; $.fbuilder[ 'objName' ] = 'fbuilderjQuery'; read() ) ) { if ( strlen( $entry ) > 3 && is_dir( $md->path.'/'.$entry ) ) { if ( file_exists( $md->path.'/'.$entry.'/public' ) ) { $m = dir( $md->path.'/'.$entry.'/public' ); while( false !== ( $mentry = $m->read() ) ) { if( strlen( $mentry ) > 3 && strtolower( substr( $mentry, strlen( $mentry ) - 3 ) ) == '.js' ) { $modules_files[] = $m->path.'/'.$mentry; } } } } } sort( $modules_files ); foreach( $modules_files as $file ) { require $file; } } catch (Exception $e) { // ignore the error } // Load Control files require 'fbuilder-pro-public.jquery.js'; try { $d = dir( dirname( __FILE__ )."/fields-public" ); $controls_files = array(); while (false !== ($entry = $d->read())) { if (strlen($entry) > 3 && strtolower(substr($entry,strlen($entry)-3)) == '.js') if ( file_exists( $d->path.'/'.$entry ) ) $controls_files[] = $d->path.'/'.$entry; } sort( $controls_files ); foreach( $controls_files as $file ) { require $file; } } catch (Exception $e) { // ignore the error } ?> var fcount = 1; var fcount_tags = 1; var fnum = "_"+fcount; while (20>fcount || eval("typeof cp_appbooking_fbuilder_config"+fnum+" != 'undefined'")) { try { var cp_appbooking_fbuilder_config = eval("cp_appbooking_fbuilder_config"+fnum); while (20>fcount_tags && !$("#fbuilder_"+fcount_tags).length) fcount_tags++; cp_appbooking_fbuilder_config = $.parseJSON(cp_appbooking_fbuilder_config.obj); cp_appbooking_fbuilder_config.identifier = "_"+fcount_tags; var f = $("#fbuilder_"+fcount_tags).fbuilder(cp_appbooking_fbuilder_config); f.fBuild.loadData("form_structure_"+fcount_tags); $("#cp_appbooking_pform_"+fcount_tags).validate({ ignore:".ignore,.ignorepb", errorElement: "div", errorPlacement: function(e, element) { if (element.hasClass('group')) element = element.parent(); e.insertBefore(element); e.addClass('message'); // add a class to the wrapper e.css('position', 'absolute'); e.css('left',0 ); e.css('top',element.parent().outerHeight(true)); } }); } catch (e) {} fcount++; fcount_tags++; fnum = "_"+fcount; } })(fbuilderjQuery); });