diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 83e5b4d4bea..230fb005dc5 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -61,8 +61,8 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update') dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_CONFIRM_AJAX", $_POST["main_confirm_ajax"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["main_popup_calendar"],'chaine',0,'',$conf->entity); + //dolibarr_set_const($db, "MAIN_CONFIRM_AJAX", $_POST["main_confirm_ajax"],'chaine',0,'',$conf->entity); + //dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["main_popup_calendar"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity); @@ -191,7 +191,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit print ''; // Use Ajax popups for confirmation - $var=!$var; + /*$var=!$var; print ''.$langs->trans("ConfirmAjax").''; print $html->selectyesno('main_confirm_ajax',isset($conf->global->MAIN_CONFIRM_AJAX)?$conf->global->MAIN_CONFIRM_AJAX:0,1); print ' ('.$langs->trans("AvailableOnlyIfJavascriptAndAjaxNotDisabled").')'; @@ -200,9 +200,10 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit //print $html->textwithpicto('',$langs->trans("FeatureDevelopment")); print ' '; print ''; + */ // Desactiver le calendrier popup - $var=!$var; + /*$var=!$var; print ''.$langs->trans("UsePopupCalendar").''; $liste_popup_calendar=array( '0'=>$langs->trans("No"), @@ -215,6 +216,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit print ''; print ' '; print ''; + */ // Activate preview tab on element card if (class_exists("Imagick")) @@ -401,21 +403,23 @@ else // Show print ""; // Confirm ajax - $var=!$var; + /*$var=!$var; print ''.$langs->trans("ConfirmAjax").''; if ($conf->global->MAIN_DISABLE_JAVASCRIPT) print $langs->trans("No").' ('.$langs->trans("JavascriptDisabled").')'; else print yn(isset($conf->global->MAIN_CONFIRM_AJAX)?$conf->global->MAIN_CONFIRM_AJAX:0).""; print ' '; print ""; + */ // Calendrier en popup - $var=!$var; + /*$var=!$var; print ''.$langs->trans("UsePopupCalendar").''; if ($conf->global->MAIN_DISABLE_JAVASCRIPT) print $langs->trans("No").' ('.$langs->trans("JavascriptDisabled").')'; else print ($conf->global->MAIN_POPUP_CALENDAR?$langs->trans("Yes"):$langs->trans("No")); print ""; print ' '; print ""; + */ // Activate preview tab on element card if (class_exists("Imagick")) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index b5b3b508bde..83f1528fa70 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -317,10 +317,6 @@ class Conf $this->global->MAIN_CONFIRM_AJAX=0; } - // conf->use_popup_calendar - $this->use_popup_calendar=""; // Pas de date popup par defaut - if (isset($this->global->MAIN_POPUP_CALENDAR)) $this->use_popup_calendar=$this->global->MAIN_POPUP_CALENDAR; - // conf->monnaie if (empty($this->global->MAIN_MONNAIE)) $this->global->MAIN_MONNAIE='EUR'; $this->monnaie=$this->global->MAIN_MONNAIE; // TODO deprecated diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 075de81629a..fc37aaa0635 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2061,7 +2061,7 @@ class Form var $inputarray='.json_encode($inputarray).'; var button=\''.$button.'\'; var dialogconfirm=\''.$dialogconfirm.'\'; - + $( "#" + dialogconfirm ).dialog({ autoOpen: '.($autoOpen?'true':'false').', resizable: false, @@ -2095,7 +2095,7 @@ class Form } } }); - + if (button.length > 0) { $( "#" + button ).click(function() { $( "#" + dialogconfirm ).dialog( \'open\' ); @@ -2871,7 +2871,7 @@ class Form if ($d) { // Show date with popup - if ($conf->use_javascript_ajax && $conf->use_popup_calendar) + if ($conf->use_javascript_ajax && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) { //print "e".$set_time." t ".$conf->format_date_short; if (strval($set_time) != '' && $set_time != -1) @@ -2881,7 +2881,7 @@ class Form } // Calendrier popup version eldy - if ("$conf->use_popup_calendar" == "eldy") // Laisser conf->use_popup_calendar entre quote + if (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR == "eldy") { // Zone de saisie manuelle de la date $retstring.='use_javascript_ajax || ! $conf->use_popup_calendar) + if (empty($conf->use_javascript_ajax) || $conf->global->MAIN_POPUP_CALENDAR == "none") { // Jour $retstring.=''; @@ -3031,7 +3031,7 @@ class Form $reset_scripts = ""; // Generate the date part, depending on the use or not of the javascript calendar - if ($conf->use_popup_calendar) + if (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR == "eldy") { $base=DOL_URL_ROOT.'/lib/'; $reset_scripts .= 'resetDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJava").'\',\''.$langs->defaultlang.'\');'; diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql index acfd83d1396..ef08abbde14 100644 --- a/htdocs/install/mysql/data/llx_const.sql +++ b/htdocs/install/mysql/data/llx_const.sql @@ -36,9 +36,7 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_NOT_INSTALLED','1','chaine','Setup is running',1,0); insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_FEATURES_LEVEL','0','chaine','Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development',1,0); --- Hidden and common to entities -insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_POPUP_CALENDAR','eldy','chaine','Popup calendar module',0,0); - +-- Hidden and common to all entities insert into llx_const (name, value, type, note, visible, entity) values ('SYSLOG_FILE','DOL_DATA_ROOT/dolibarr.log','chaine','Directory where to write log file',0,0); insert into llx_const (name, value, type, note, visible, entity) values ('SYSLOG_LEVEL','7','chaine','Level of debug info to show',0,0); diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql index 53d49471dd0..ee60b6ff2a0 100755 --- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql +++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql @@ -41,6 +41,8 @@ DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_MENUFRONT_BARRETOP'; DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_MENU_BARRELEFT'; DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_MENUFRONT_BARRELEFT'; +DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_POPUP_CALENDAR' and value in ('1','eldy'); + ALTER TABLE llx_facture_fourn ADD COLUMN ref_ext varchar(30) AFTER entity; ALTER TABLE llx_commande_fournisseur ADD COLUMN ref_ext varchar(30) AFTER entity; ALTER TABLE llx_commande ADD COLUMN fk_demand_reason int(11) AFTER fk_availability;