Work on modulebuilder
This commit is contained in:
parent
bfa50b8d1d
commit
9e629bdb02
@ -76,14 +76,14 @@ class Interfaces
|
|||||||
global $db;
|
global $db;
|
||||||
$user = new User($db);
|
$user = new User($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
$nbfile = $nbtotal = $nbok = $nbko = 0;
|
$nbfile = $nbtotal = $nbok = $nbko = 0;
|
||||||
|
|
||||||
$files = array();
|
$files = array();
|
||||||
$modules = array();
|
$modules = array();
|
||||||
$orders = array();
|
$orders = array();
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
||||||
$dirtriggers=array_merge(array('/core/triggers'),$conf->modules_parts['triggers']);
|
$dirtriggers=array_merge(array('/core/triggers'),$conf->modules_parts['triggers']);
|
||||||
foreach($dirtriggers as $reldir)
|
foreach($dirtriggers as $reldir)
|
||||||
{
|
{
|
||||||
@ -106,7 +106,7 @@ class Interfaces
|
|||||||
$part3=$reg[3];
|
$part3=$reg[3];
|
||||||
|
|
||||||
$nbfile++;
|
$nbfile++;
|
||||||
|
|
||||||
// Check if trigger file is disabled by name
|
// Check if trigger file is disabled by name
|
||||||
if (preg_match('/NORUN$/i',$file)) continue;
|
if (preg_match('/NORUN$/i',$file)) continue;
|
||||||
// Check if trigger file is for a particular module
|
// Check if trigger file is for a particular module
|
||||||
@ -132,7 +132,7 @@ class Interfaces
|
|||||||
dol_syslog(get_class($this)."::run_triggers action=".$action." ".$langs->trans("ErrorDuplicateTrigger", $newdir."/".$file, $fullpathfiles[$modName]), LOG_WARNING);
|
dol_syslog(get_class($this)."::run_triggers action=".$action." ".$langs->trans("ErrorDuplicateTrigger", $newdir."/".$file, $fullpathfiles[$modName]), LOG_WARNING);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//print 'Todo for '.$modName." : ".$newdir.'/'.$file."\n";
|
//print 'Todo for '.$modName." : ".$newdir.'/'.$file."\n";
|
||||||
include_once $newdir.'/'.$file;
|
include_once $newdir.'/'.$file;
|
||||||
@ -142,7 +142,7 @@ class Interfaces
|
|||||||
{
|
{
|
||||||
dol_syslog('ko for '.$modName." ".$e->getMessage()."\n", LOG_ERR);
|
dol_syslog('ko for '.$modName." ".$e->getMessage()."\n", LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
$modules[$i] = $modName;
|
$modules[$i] = $modName;
|
||||||
$files[$i] = $file;
|
$files[$i] = $file;
|
||||||
$fullpathfiles[$modName] = $newdir.'/'.$file;
|
$fullpathfiles[$modName] = $newdir.'/'.$file;
|
||||||
@ -155,7 +155,7 @@ class Interfaces
|
|||||||
}
|
}
|
||||||
|
|
||||||
asort($orders);
|
asort($orders);
|
||||||
|
|
||||||
// Loop on each trigger
|
// Loop on each trigger
|
||||||
foreach ($orders as $key => $value)
|
foreach ($orders as $key => $value)
|
||||||
{
|
{
|
||||||
@ -246,7 +246,7 @@ class Interfaces
|
|||||||
{
|
{
|
||||||
$dirtriggers=$forcedirtriggers;
|
$dirtriggers=$forcedirtriggers;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($dirtriggers as $reldir)
|
foreach($dirtriggers as $reldir)
|
||||||
{
|
{
|
||||||
$dir=dol_buildpath($reldir,0);
|
$dir=dol_buildpath($reldir,0);
|
||||||
|
|||||||
@ -2556,6 +2556,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
$picto = $regs[1];
|
$picto = $regs[1];
|
||||||
$path = $regs[2]; // $path is $mymodule
|
$path = $regs[2]; // $path is $mymodule
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto .= '.png';
|
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto .= '.png';
|
||||||
// If alt path are defined, define url where img file is, according to physical path
|
// If alt path are defined, define url where img file is, according to physical path
|
||||||
|
|||||||
BIN
htdocs/modulebuilder/template/img/object_mytest.png
Normal file
BIN
htdocs/modulebuilder/template/img/object_mytest.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 360 B |
@ -2850,7 +2850,7 @@ span.dashboardlineko {
|
|||||||
padding: 1px 2px 1px 2px;
|
padding: 1px 2px 1px 2px;
|
||||||
border-radius: .25em;
|
border-radius: .25em;
|
||||||
|
|
||||||
background-color: #af4705;
|
background-color: #9f4705;
|
||||||
padding: 0px 5px 0px 5px;
|
padding: 0px 5px 0px 5px;
|
||||||
top: -26px;
|
top: -26px;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user