Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
73f264a734
@ -2997,7 +2997,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
|
||||
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
|
||||
* @param string $alt Force alt for bind people
|
||||
* @param string $morecss Add more class css on img tag (For example 'myclascss'). Work only if $moreatt is empty.
|
||||
* @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left maring on picto, 0 = No margin left. Works for fontawesome picto only.
|
||||
* @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No margin left. Works for fontawesome picto only.
|
||||
* @return string Return img tag
|
||||
* @see img_object(), img_picto_common()
|
||||
*/
|
||||
|
||||
@ -480,10 +480,15 @@ if ($dirins && $action == 'initcss' && !empty($module))
|
||||
'Mon module'=>$modulename,
|
||||
'mon module'=>$modulename,
|
||||
'htdocs/modulebuilder/template'=>strtolower($modulename),
|
||||
'---Put here your own copyright and developer email---'=>dol_print_date($now, '%Y').' '.$user->getFullName($langs).($user->email?' <'.$user->email.'>':'')
|
||||
'---Put here your own copyright and developer email---'=>dol_print_date($now, '%Y').' '.$user->getFullName($langs).($user->email?' <'.$user->email.'>':''),
|
||||
);
|
||||
|
||||
dolReplaceInFile($destfile, $arrayreplacement);
|
||||
|
||||
// Update descriptor file to uncomment file
|
||||
$srcfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php';
|
||||
$arrayreplacement = array('/\/\/\s*\''.preg_quote('/'.strtolower($module).'/css/'.strtolower($module).'.css.php', '/').'\'/' => '\'/'.strtolower($module).'/css/'.strtolower($module).'.css.php\'');
|
||||
dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -518,6 +523,11 @@ if ($dirins && $action == 'initjs' && !empty($module))
|
||||
);
|
||||
|
||||
dolReplaceInFile($destfile, $arrayreplacement);
|
||||
|
||||
// Update descriptor file to uncomment file
|
||||
$srcfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php';
|
||||
$arrayreplacement = array('/\/\/\s*\''.preg_quote('/'.strtolower($module).'/js/'.strtolower($module).'.js.php', '/').'\'/' => '\'/'.strtolower($module).'/js/'.strtolower($module).'.js.php\'');
|
||||
dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -635,6 +645,14 @@ if ($dirins && $action == 'confirm_removefile' && !empty($module))
|
||||
|
||||
$result = dol_delete_file($filetodelete);
|
||||
if (dol_is_dir_empty($dirtodelete)) dol_delete_dir($dirtodelete);
|
||||
|
||||
// Update descriptor file to comment file
|
||||
if (in_array($tab, array('css', 'js')))
|
||||
{
|
||||
$srcfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php';
|
||||
$arrayreplacement = array('/^\s*\''.preg_quote('/'.$relativefilename, '/').'\',*/m'=>' // \'/'.$relativefilename.'\',');
|
||||
dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1623,14 +1641,14 @@ elseif (! empty($module))
|
||||
$linktoenabledisable='';
|
||||
if (! empty($conf->global->$const_name)) // If module is already activated
|
||||
{
|
||||
$linktoenabledisable.='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->numero.'&action=reset&value=mod' . $module . $param . '">';
|
||||
$linktoenabledisable.=img_picto($langs->trans("Activated"), 'switch_on');
|
||||
$linktoenabledisable.='<a class="reposition asetresetmodule" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->numero.'&action=reset&value=mod' . $module . $param . '">';
|
||||
$linktoenabledisable.=img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', '', 1);
|
||||
$linktoenabledisable.='</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$linktoenabledisable.='<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->numero.'&action=set&value=mod' . $module . $param . '">';
|
||||
$linktoenabledisable.=img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
$linktoenabledisable.='<a class="reposition asetresetmodule" href="'.$_SERVER["PHP_SELF"].'?id='.$moduleobj->numero.'&action=set&value=mod' . $module . $param . '">';
|
||||
$linktoenabledisable.=img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', 1);
|
||||
$linktoenabledisable.="</a>\n";
|
||||
}
|
||||
if (! empty($conf->$modulelowercase->enabled))
|
||||
@ -1967,7 +1985,10 @@ elseif (! empty($module))
|
||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("DescriptorFile").' : <strong>'.$pathtofile.'</strong>';
|
||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=editfile&format=php&file='.urlencode($pathtofile).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
||||
print '<br>';
|
||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("LanguageFile").' :</span> <strong>'.$dicts['langs'].'</strong><br>';
|
||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("LanguageFile").' :</span> ';
|
||||
if (! is_array($dicts) || empty($dicts)) print '<span class="opacitymedium">'.$langs->trans("NoDictionaries").'</span>';
|
||||
else print '<strong>'.$dicts['langs'].'</strong>';
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("ListOfDictionariesEntries"), '', '');
|
||||
|
||||
|
||||
@ -521,7 +521,8 @@ body[class*="colorblind-"] .text-success{
|
||||
}
|
||||
|
||||
.fa-toggle-on, .fa-toggle-off { font-size: 2em; }
|
||||
.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off { font-size: 1.5em; vertical-align: text-bottom; }
|
||||
.websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off,
|
||||
.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off { font-size: 1.5em; vertical-align: text-bottom; }
|
||||
|
||||
/* Themes for badges */
|
||||
<?php include dol_buildpath($path.'/theme/'.$theme.'/badges.inc.php', 0); ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user