diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index ec32ee9978d..af18a72b881 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -69,11 +69,6 @@ $parameters=array(); $object=(object) 'nothing'; $reshook=$hookmanager->executeHooks('addDemoProfile', $parameters, $object, $tmpaction); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=$hookmanager->errors; -/* -$demoprofiles[]=array('default'=>'0', 'key'=>'profdemomed', 'lang'=>'cabinetmed@cabinetmed', 'label'=>'DemoCabinetMed', 'url'=>'http://demodolimed.dolibarr.org', - 'disablemodules'=>'adherent,boutique,don,externalsite', - 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png'); -*/ $alwayscheckedmodules=array('barcode','bookmark','externalrss','fckeditor','geoipmaxmind','gravatar','memcached','syslog','user','webservices'); // Technical module we always want $alwaysuncheckedmodules=array('paybox','paypal','google','scanner','workflow'); // Module we never want @@ -242,16 +237,21 @@ jQuery(document).ready(function () { jQuery('tr.moduleline').hide(); // Enable this to allow personalized setup jQuery('.modulelineshow').attr('href','#'); + jQuery('.cursorpointer').css('cursor','pointer'); jQuery(".modulelineshow").click(function() { - var currentId = $(this).attr('id').substring(2); - jQuery('tr.moduleline').hide(); - if (currentId != openedId) + var idstring=$(this).attr('id'); + if (typeof idstring != "undefined") { - openedId=currentId; - jQuery("#tr1"+currentId).show(); - jQuery("#tr2"+currentId).show(); + var currentId = idstring.substring(2); + jQuery('tr.moduleline').hide(); + if (currentId != openedId) + { + openedId=currentId; + jQuery("#tr1"+currentId).show(); + jQuery("#tr2"+currentId).show(); + } + else openedId = ''; } - else openedId = ''; }); }); @@ -302,8 +302,8 @@ foreach ($demoprofiles as $profilearray) print ''."\n"; // Title print ''; - print ''; - print ''; + print ''; + print ''; print ''."\n"; // Modules if (empty($profilearray['url'])) @@ -368,18 +368,8 @@ print ''; -// Button -/* -print ''; -*/ - print '
Demo '.$profilearray['label'].''.$langs->trans($profilearray['label']).'Demo '.$profilearray['label'].''.$langs->trans($profilearray['label']).'
'; print '
'; -print ''; -print ' ">'; -print '
'; -$db->close(); - // Google Adsense (need Google module) if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT)) { @@ -399,6 +389,8 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN llxFooterVierge(); +$db->close(); + /** * Show header for demo @@ -449,11 +441,11 @@ border-radius: 8px; -webkit-box-shadow: 4px 4px 4px #EEE; box-shadow: 4px 4px 4px #EEE; -background-image: linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%); -background-image: -o-linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%); -background-image: -moz-linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%); -background-image: -webkit-linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%); -background-image: -ms-linear-gradient(bottom, rgb(246,248,250) 85%, rgb(235,235,238) 100%); +background-image: linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); +background-image: -o-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); +background-image: -moz-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); +background-image: -webkit-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); +background-image: -ms-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); }'; // print '.CTableRow1 { background: #f0f0f0; color: #000000; }';