Fix: Selection of choice in demo page
This commit is contained in:
parent
2bec26c32a
commit
1722d58196
@ -69,11 +69,6 @@ $parameters=array();
|
|||||||
$object=(object) 'nothing';
|
$object=(object) 'nothing';
|
||||||
$reshook=$hookmanager->executeHooks('addDemoProfile', $parameters, $object, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
$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;
|
$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
|
$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
|
$alwaysuncheckedmodules=array('paybox','paypal','google','scanner','workflow'); // Module we never want
|
||||||
@ -242,16 +237,21 @@ jQuery(document).ready(function () {
|
|||||||
jQuery('tr.moduleline').hide();
|
jQuery('tr.moduleline').hide();
|
||||||
// Enable this to allow personalized setup
|
// Enable this to allow personalized setup
|
||||||
jQuery('.modulelineshow').attr('href','#');
|
jQuery('.modulelineshow').attr('href','#');
|
||||||
|
jQuery('.cursorpointer').css('cursor','pointer');
|
||||||
jQuery(".modulelineshow").click(function() {
|
jQuery(".modulelineshow").click(function() {
|
||||||
var currentId = $(this).attr('id').substring(2);
|
var idstring=$(this).attr('id');
|
||||||
jQuery('tr.moduleline').hide();
|
if (typeof idstring != "undefined")
|
||||||
if (currentId != openedId)
|
|
||||||
{
|
{
|
||||||
openedId=currentId;
|
var currentId = idstring.substring(2);
|
||||||
jQuery("#tr1"+currentId).show();
|
jQuery('tr.moduleline').hide();
|
||||||
jQuery("#tr2"+currentId).show();
|
if (currentId != openedId)
|
||||||
|
{
|
||||||
|
openedId=currentId;
|
||||||
|
jQuery("#tr1"+currentId).show();
|
||||||
|
jQuery("#tr2"+currentId).show();
|
||||||
|
}
|
||||||
|
else openedId = '';
|
||||||
}
|
}
|
||||||
else openedId = '';
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -302,8 +302,8 @@ foreach ($demoprofiles as $profilearray)
|
|||||||
print '<table summary="Dolibarr online demonstration for profile '.$profilearray['label'].'" style="font-size:14px;" width="100%" class="CTable CTableRow'.($i%2==0?'1':'0').'">'."\n";
|
print '<table summary="Dolibarr online demonstration for profile '.$profilearray['label'].'" style="font-size:14px;" width="100%" class="CTable CTableRow'.($i%2==0?'1':'0').'">'."\n";
|
||||||
// Title
|
// Title
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="50"><a href="'.$urlwithmod.'" id="a1'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'"><img src="'.$profilearray['icon'].'" width="48" border="0" alt="Demo '.$profilearray['label'].'"></a></td>';
|
print '<td width="50" id="a1'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'"><img src="'.$profilearray['icon'].'" width="48" border="0" alt="Demo '.$profilearray['label'].'"></a></td>';
|
||||||
print '<td><a href="'.$urlwithmod.'" id="a2'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'">'.$langs->trans($profilearray['label']).'</a></td>';
|
print '<td id="a2'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'">'.$langs->trans($profilearray['label']).'</a></td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
// Modules
|
// Modules
|
||||||
if (empty($profilearray['url']))
|
if (empty($profilearray['url']))
|
||||||
@ -368,18 +368,8 @@ print '<tr><td>';
|
|||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Button
|
|
||||||
/*
|
|
||||||
print '<tr><td align="center">';
|
|
||||||
print '<input type="hidden" name="action" value="gotodemo">';
|
|
||||||
print '<input class="button" type="submit" value=" < '.$langs->trans("GoToDemo").' > ">';
|
|
||||||
print '</td></tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
// Google Adsense (need Google module)
|
// Google Adsense (need Google module)
|
||||||
if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))
|
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();
|
llxFooterVierge();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show header for demo
|
* Show header for demo
|
||||||
@ -449,11 +441,11 @@ border-radius: 8px;
|
|||||||
-webkit-box-shadow: 4px 4px 4px #EEE;
|
-webkit-box-shadow: 4px 4px 4px #EEE;
|
||||||
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: linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%);
|
||||||
background-image: -o-linear-gradient(bottom, rgb(246,248,250) 85%, 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) 85%, 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) 85%, 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) 85%, 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; }';
|
// print '.CTableRow1 { background: #f0f0f0; color: #000000; }';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user