2
0
forked from Wavyzz/dolibarr

Fix conflict with the div #dialog used for popup cut and paste of

address.
This commit is contained in:
Laurent Destailleur
2016-01-02 00:27:14 +01:00
parent a7b2f000d8
commit 1ae4bef04b
6 changed files with 18 additions and 16 deletions

View File

@@ -173,7 +173,8 @@ class box_actions extends ModeleBoxes
{ {
global $langs, $conf; global $langs, $conf;
parent::showBox($this->info_box_head, $this->info_box_contents); parent::showBox($this->info_box_head, $this->info_box_contents);
if ($conf->global->SHOW_DIALOG_HOMEPAGE) { if (! empty($conf->global->SHOW_DIALOG_HOMEPAGE))
{
$actioncejour=false; $actioncejour=false;
$contents=$this->info_box_contents; $contents=$this->info_box_contents;
$nblines=count($contents); $nblines=count($contents);
@@ -182,7 +183,7 @@ class box_actions extends ModeleBoxes
$bcx[1] = 'class="box_impair"'; $bcx[1] = 'class="box_impair"';
if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo")) if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo"))
{ {
print '<div id="dialog" title="'.$nblines." ".$langs->trans("ActionsToDo").'">'; print '<div id="dialogboxaction" title="'.$nblines." ".$langs->trans("ActionsToDo").'">';
print '<table width=100%>'; print '<table width=100%>';
for ($line=0, $n=$nblines; $line < $n; $line++) for ($line=0, $n=$nblines; $line < $n; $line++)
{ {
@@ -219,11 +220,11 @@ class box_actions extends ModeleBoxes
if ($actioncejour) if ($actioncejour)
{ {
print '<script>'; print '<script>';
print '$( "#dialog" ).dialog({ autoOpen: true });'; print '$("#dialogboxaction").dialog({ autoOpen: true });';
if ($conf->global->SHOW_DIALOG_HOMEPAGE > 1) if ($conf->global->SHOW_DIALOG_HOMEPAGE > 1) // autoclose after this delay
{ {
print 'setTimeout(function(){'; print 'setTimeout(function(){';
print '$("#dialog").dialog("close");'; print '$("#dialogboxaction").dialog("close");';
print '}, '.($conf->global->SHOW_DIALOG_HOMEPAGE*1000).');'; print '}, '.($conf->global->SHOW_DIALOG_HOMEPAGE*1000).');';
} }
print '</script>'; print '</script>';
@@ -231,7 +232,7 @@ class box_actions extends ModeleBoxes
else else
{ {
print '<script>'; print '<script>';
print '$( "#dialog" ).dialog({ autoOpen: false });'; print '$("#dialogboxaction").dialog({ autoOpen: false });';
print '</script>'; print '</script>';
} }
} }

View File

@@ -940,10 +940,11 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton,
function copyToClipboard(text,text2) function copyToClipboard(text,text2)
{ {
text = text.replace(/<br>/g,"\n"); text = text.replace(/<br>/g,"\n");
var newElem = '<textarea id="coords" style="border: none; width: 90%; height: 120px;">'+text+'</textarea><br><br>'+text2; var newElem = '<textarea id="coordsforpopup" style="border: none; width: 90%; height: 120px;">'+text+'</textarea><br><br>'+text2;
$("#dialog").html(newElem); /* alert(newElem); */
$("#dialog").dialog(); $("#dialogforpopup").html(newElem);
$("#coords").select(); $("#dialogforpopup").dialog();
$("#coordsforpopup").select();
return false; return false;
} }

View File

@@ -767,9 +767,6 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print '</form>'."\n"; print '</form>'."\n";
// A div for the address popup
print '<div id="dialog" title="'.dol_escape_htmltag($langs->trans('Address')).'" style="display: none;"></div>';
return $i; return $i;
} }

View File

@@ -1953,6 +1953,9 @@ if (! function_exists("llxFooter"))
}); });
</script>' . "\n"; </script>' . "\n";
// A div for the address popup
print "\n<!-- A div to allow dialog popup -->\n";
print '<div id="dialogforpopup" style="display: none;"></div>'."\n";
print "</body>\n"; print "</body>\n";
print "</html>\n"; print "</html>\n";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

After

Width:  |  Height:  |  Size: 374 B

View File

@@ -80,7 +80,7 @@ $dol_use_jmobile=$conf->dol_use_jmobile;
//var_dump($user->conf->THEME_ELDY_RGB); //var_dump($user->conf->THEME_ELDY_RGB);
// Colors // Colors
$colorbackhmenu1='0,0,0'; // topmenu $colorbackhmenu1='0,0,80'; // topmenu
$colorbackvmenu1='255,255,255'; // vmenu $colorbackvmenu1='255,255,255'; // vmenu
$colorbacktitle1='230,230,230'; // title of array $colorbacktitle1='230,230,230'; // title of array
$colorbacktabcard1='255,255,255'; // card $colorbacktabcard1='255,255,255'; // card
@@ -102,7 +102,7 @@ $useboldtitle=1;
// Case of option always editable // Case of option always editable
if (! isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY=$colorbackbody; if (! isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY=$colorbackbody;
if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1='0,0,0'; if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1='50,50,60';
if (! isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1=$colorbacktitle1; if (! isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1=$colorbacktitle1;
if (! isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER=='238,246,252'; if (! isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER=='238,246,252';
if (! isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) $conf->global->THEME_ELDY_TEXTTITLENOTAB=$colortexttitlenotab; if (! isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) $conf->global->THEME_ELDY_TEXTTITLENOTAB=$colortexttitlenotab;