mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
#714: localization of the date picker calendar. Get rid of the old jquery.datepicker.js file since iTop now relies on the built-in jQuery UI date picker widget.
SVN:trunk[3629]
This commit is contained in:
@@ -123,7 +123,12 @@ EOF;
|
||||
$sJSTitle = json_encode(Dict::S('UI:DisconnectedDlgTitle'));
|
||||
$sJSLoginAgain = json_encode(Dict::S('UI:LoginAgain'));
|
||||
$sJSStayOnThePage = json_encode(Dict::S('UI:StayOnThePage'));
|
||||
|
||||
$sJSDaysMin = json_encode(array(Dict::S('DayOfWeek-Sunday-Min'), Dict::S('DayOfWeek-Monday-Min'), Dict::S('DayOfWeek-Tuesday-Min'), Dict::S('DayOfWeek-Wednesday-Min'),
|
||||
Dict::S('DayOfWeek-Thursday-Min'), Dict::S('DayOfWeek-Friday-Min'), Dict::S('DayOfWeek-Saturday-Min')));
|
||||
$sJSMonthsShort = json_encode(array(Dict::S('Month-01-Short'), Dict::S('Month-02-Short'), Dict::S('Month-03-Short'), Dict::S('Month-04-Short'), Dict::S('Month-05-Short'), Dict::S('Month-06-Short'),
|
||||
Dict::S('Month-07-Short'), Dict::S('Month-08-Short'), Dict::S('Month-09-Short'), Dict::S('Month-10-Short'), Dict::S('Month-11-Short'), Dict::S('Month-12-Short')));
|
||||
$iFirstDayOfWeek = (int) Dict::S('Calendar-FirstDayOfWeek');
|
||||
|
||||
$this->m_sInitScript =
|
||||
<<< EOF
|
||||
try
|
||||
@@ -367,7 +372,10 @@ EOF
|
||||
dateFormat: 'yy-mm-dd',
|
||||
constrainInput: false,
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
changeYear: true,
|
||||
dayNamesMin: $sJSDaysMin,
|
||||
monthNamesShort: $sJSMonthsShort,
|
||||
firstDay: $iFirstDayOfWeek
|
||||
});
|
||||
$(".datetime-pick").datepicker({
|
||||
showOn: 'button',
|
||||
@@ -376,7 +384,10 @@ EOF
|
||||
dateFormat: 'yy-mm-dd 00:00:00',
|
||||
constrainInput: false,
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
changeYear: true,
|
||||
dayNamesMin: $sJSDaysMin,
|
||||
monthNamesShort: $sJSMonthsShort,
|
||||
firstDay: $iFirstDayOfWeek
|
||||
});
|
||||
|
||||
// Make sortable, everything that claims to be sortable
|
||||
|
||||
@@ -97,6 +97,11 @@ class PortalWebPage extends NiceWebPage
|
||||
$sJSTitle = json_encode(Dict::S('UI:DisconnectedDlgTitle'));
|
||||
$sJSLoginAgain = json_encode(Dict::S('UI:LoginAgain'));
|
||||
$sJSStayOnThePage = json_encode(Dict::S('UI:StayOnThePage'));
|
||||
$sJSDaysMin = json_encode(array(Dict::S('DayOfWeek-Sunday-Min'), Dict::S('DayOfWeek-Monday-Min'), Dict::S('DayOfWeek-Tuesday-Min'), Dict::S('DayOfWeek-Wednesday-Min'),
|
||||
Dict::S('DayOfWeek-Thursday-Min'), Dict::S('DayOfWeek-Friday-Min'), Dict::S('DayOfWeek-Saturday-Min')));
|
||||
$sJSMonthsShort = json_encode(array(Dict::S('Month-01-Short'), Dict::S('Month-02-Short'), Dict::S('Month-03-Short'), Dict::S('Month-04-Short'), Dict::S('Month-05-Short'), Dict::S('Month-06-Short'),
|
||||
Dict::S('Month-07-Short'), Dict::S('Month-08-Short'), Dict::S('Month-09-Short'), Dict::S('Month-10-Short'), Dict::S('Month-11-Short'), Dict::S('Month-12-Short')));
|
||||
$iFirstDayOfWeek = (int) Dict::S('Calendar-FirstDayOfWeek');
|
||||
|
||||
$this->add_ready_script(
|
||||
<<<EOF
|
||||
@@ -139,14 +144,17 @@ try
|
||||
});
|
||||
|
||||
$(".date-pick").datepicker({
|
||||
showOn: 'button',
|
||||
buttonImage: '../images/calendar.png',
|
||||
buttonImageOnly: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
constrainInput: false,
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
});
|
||||
showOn: 'button',
|
||||
buttonImage: '../images/calendar.png',
|
||||
buttonImageOnly: true,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
constrainInput: false,
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
dayNamesMin: $sJSDaysMin,
|
||||
monthNamesShort: $sJSMonthsShort,
|
||||
firstDay: $iFirstDayOfWeek
|
||||
});
|
||||
|
||||
$(".datetime-pick").datepicker({
|
||||
showOn: 'button',
|
||||
@@ -155,8 +163,11 @@ try
|
||||
dateFormat: 'yy-mm-dd 00:00:00',
|
||||
constrainInput: false,
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
});
|
||||
changeYear: true,
|
||||
dayNamesMin: $sJSDaysMin,
|
||||
monthNamesShort: $sJSMonthsShort,
|
||||
firstDay: $iFirstDayOfWeek
|
||||
});
|
||||
|
||||
//$('.resizable').resizable(); // Make resizable everything that claims to be resizable !
|
||||
$('.caselog_header').click( function () { $(this).toggleClass('open').next('.caselog_entry').toggle(); });
|
||||
|
||||
@@ -163,6 +163,12 @@ class UILinksWidget
|
||||
$aFieldsMap[$sFieldCode] = $sSafeId;
|
||||
}
|
||||
$sState = '';
|
||||
$sJSDaysMin = json_encode(array(Dict::S('DayOfWeek-Sunday-Min'), Dict::S('DayOfWeek-Monday-Min'), Dict::S('DayOfWeek-Tuesday-Min'), Dict::S('DayOfWeek-Wednesday-Min'),
|
||||
Dict::S('DayOfWeek-Thursday-Min'), Dict::S('DayOfWeek-Friday-Min'), Dict::S('DayOfWeek-Saturday-Min')));
|
||||
$sJSMonthsShort = json_encode(array(Dict::S('Month-01-Short'), Dict::S('Month-02-Short'), Dict::S('Month-03-Short'), Dict::S('Month-04-Short'), Dict::S('Month-05-Short'), Dict::S('Month-06-Short'),
|
||||
Dict::S('Month-07-Short'), Dict::S('Month-08-Short'), Dict::S('Month-09-Short'), Dict::S('Month-10-Short'), Dict::S('Month-11-Short'), Dict::S('Month-12-Short')));
|
||||
$iFirstDayOfWeek = (int) Dict::S('Calendar-FirstDayOfWeek');
|
||||
|
||||
$oP->add_script(
|
||||
<<<EOF
|
||||
$(".date-pick").datepicker({
|
||||
@@ -172,8 +178,11 @@ $(".date-pick").datepicker({
|
||||
dateFormat: 'yy-mm-dd',
|
||||
constrainInput: false,
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
});
|
||||
changeYear: true,
|
||||
dayNamesMin: $sJSDaysMin,
|
||||
monthNamesShort: $sJSMonthsShort,
|
||||
firstDay: $iFirstDayOfWeek
|
||||
});
|
||||
$(".datetime-pick").datepicker({
|
||||
showOn: 'button',
|
||||
buttonImage: '../images/calendar.png',
|
||||
@@ -181,7 +190,10 @@ $(".datetime-pick").datepicker({
|
||||
dateFormat: 'yy-mm-dd 00:00:00',
|
||||
constrainInput: false,
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
changeYear: true,
|
||||
dayNamesMin: $sJSDaysMin,
|
||||
monthNamesShort: $sJSMonthsShort,
|
||||
firstDay: $iFirstDayOfWeek
|
||||
});
|
||||
EOF
|
||||
);
|
||||
|
||||
@@ -986,6 +986,29 @@ Wenn Aktionen mit Trigger verknüpft sind, bekommt jede Aktion eine Auftragsnumm
|
||||
'Month-10' => 'Oktober',
|
||||
'Month-11' => 'November',
|
||||
'Month-12' => 'Dezember',
|
||||
|
||||
// Short version for the DatePicker
|
||||
'DayOfWeek-Sunday-Min' => 'So',
|
||||
'DayOfWeek-Monday-Min' => 'Mo',
|
||||
'DayOfWeek-Tuesday-Min' => 'Di',
|
||||
'DayOfWeek-Wednesday-Min' => 'Mi',
|
||||
'DayOfWeek-Thursday-Min' => 'Do',
|
||||
'DayOfWeek-Friday-Min' => 'Fr',
|
||||
'DayOfWeek-Saturday-Min' => 'Sa',
|
||||
'Month-01-Short' => 'Jan',
|
||||
'Month-02-Short' => 'Feb',
|
||||
'Month-03-Short' => 'Mär',
|
||||
'Month-04-Short' => 'Apr',
|
||||
'Month-05-Short' => 'Mai',
|
||||
'Month-06-Short' => 'Juni',
|
||||
'Month-07-Short' => 'Juli',
|
||||
'Month-08-Short' => 'Aug',
|
||||
'Month-09-Short' => 'Sept',
|
||||
'Month-10-Short' => 'Okt',
|
||||
'Month-11-Short' => 'Nov',
|
||||
'Month-12-Short' => 'Dez',
|
||||
'Calendar-FirstDayOfWeek' => 1, // 0 = Sunday, 1 = Monday, etc...
|
||||
|
||||
'UI:FillAllMandatoryFields' => 'Bitte füllen Sie alle Pflichtfelder',
|
||||
'UI:DisconnectedDlgMessage' => 'You are disconnected. You must identify yourself to continue using the application.~~',
|
||||
'UI:DisconnectedDlgTitle' => 'Warning!~~',
|
||||
|
||||
@@ -1197,7 +1197,29 @@ When associated with a trigger, each action is given an "order" number, specifyi
|
||||
'Month-10' => 'October',
|
||||
'Month-11' => 'November',
|
||||
'Month-12' => 'December',
|
||||
|
||||
|
||||
// Short version for the DatePicker
|
||||
'DayOfWeek-Sunday-Min' => 'Su',
|
||||
'DayOfWeek-Monday-Min' => 'Mo',
|
||||
'DayOfWeek-Tuesday-Min' => 'Tu',
|
||||
'DayOfWeek-Wednesday-Min' => 'We',
|
||||
'DayOfWeek-Thursday-Min' => 'Th',
|
||||
'DayOfWeek-Friday-Min' => 'Fr',
|
||||
'DayOfWeek-Saturday-Min' => 'Sa',
|
||||
'Month-01-Short' => 'Jan',
|
||||
'Month-02-Short' => 'Feb',
|
||||
'Month-03-Short' => 'Mar',
|
||||
'Month-04-Short' => 'Apr',
|
||||
'Month-05-Short' => 'May',
|
||||
'Month-06-Short' => 'Jun',
|
||||
'Month-07-Short' => 'Jul',
|
||||
'Month-08-Short' => 'Aug',
|
||||
'Month-09-Short' => 'Sep',
|
||||
'Month-10-Short' => 'Oct',
|
||||
'Month-11-Short' => 'Nov',
|
||||
'Month-12-Short' => 'Dec',
|
||||
'Calendar-FirstDayOfWeek' => 0, // 0 = Sunday, 1 = Monday, etc...
|
||||
|
||||
'UI:Menu:ShortcutList' => 'Create a Shortcut...',
|
||||
'UI:ShortcutRenameDlg:Title' => 'Rename the shortcut',
|
||||
'UI:ShortcutListDlg:Title' => 'Create a shortcut for the list',
|
||||
|
||||
@@ -1040,6 +1040,28 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
|
||||
'Month-11' => 'Novembre',
|
||||
'Month-12' => 'Décembre',
|
||||
|
||||
// Short version for the DatePicker
|
||||
'DayOfWeek-Sunday-Min' => 'Di',
|
||||
'DayOfWeek-Monday-Min' => 'Lu',
|
||||
'DayOfWeek-Tuesday-Min' => 'Ma',
|
||||
'DayOfWeek-Wednesday-Min' => 'Me',
|
||||
'DayOfWeek-Thursday-Min' => 'Je',
|
||||
'DayOfWeek-Friday-Min' => 'Ve',
|
||||
'DayOfWeek-Saturday-Min' => 'Sa',
|
||||
'Month-01-Short' => 'Jan',
|
||||
'Month-02-Short' => 'Fév',
|
||||
'Month-03-Short' => 'Mar',
|
||||
'Month-04-Short' => 'Avr',
|
||||
'Month-05-Short' => 'Mai',
|
||||
'Month-06-Short' => 'Juin',
|
||||
'Month-07-Short' => 'Juil',
|
||||
'Month-08-Short' => 'Août',
|
||||
'Month-09-Short' => 'Sept',
|
||||
'Month-10-Short' => 'Oct',
|
||||
'Month-11-Short' => 'Nov',
|
||||
'Month-12-Short' => 'Déc',
|
||||
'Calendar-FirstDayOfWeek' => 1, // 0 = Sunday, 1 = Monday, etc...
|
||||
|
||||
'UI:Menu:ShortcutList' => 'Créer un Raccourci...',
|
||||
'UI:ShortcutListDlg:Title' => 'Créer un raccourci pour la liste',
|
||||
'UI:ShortcutRenameDlg:Title' => 'Renommer le raccourci',
|
||||
@@ -1103,7 +1125,7 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
|
||||
'UI:CurrentObjectIsLockedBy_User' => 'L\'objet est verrouillé car il est en train d\'être modifié par %1$s.',
|
||||
'UI:CurrentObjectIsLockedBy_User_Explanation' => 'L\'objet est en train d\'être modifié par %1$s. Vos modifications ne peuvent pas être acceptées car elles risquent d\'être écrasées.',
|
||||
'UI:CurrentObjectLockExpired' => 'Le verrouillage interdisant les modifications concurrentes a expiré.',
|
||||
'UI:CurrentObjectLockExpired_Explanation' => 'Le verrouillage interdisant les modifications concurrentes à expiré. Vos modifications ne peuvent pas être acceptées car d\'autres utilisateurs peuvent modifier cet objet.',
|
||||
'UI:CurrentObjectLockExpired_Explanation' => 'Le verrouillage interdisant les modifications concurrentes a expiré. Vos modifications ne peuvent pas être acceptées car d\'autres utilisateurs peuvent modifier cet objet.',
|
||||
'UI:ConcurrentLockKilled' => 'Le verrouillage en édition de l\'objet courant a été supprimé.',
|
||||
'UI:Menu:KillConcurrentLock' => 'Supprimer le verrouillage !',
|
||||
));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -53,7 +53,10 @@ if ($sPage == '')
|
||||
}
|
||||
$sPage = basename($sPage); // protect against ../.. ...
|
||||
|
||||
$sEnvironment = utils::ReadParam('exec_env', 'production');
|
||||
session_name('itop-'.md5(APPROOT));
|
||||
session_start();
|
||||
$sEnvironment = utils::ReadParam('exec_env', utils::GetCurrentEnvironment());
|
||||
session_write_close();
|
||||
|
||||
$sTargetPage = APPROOT.'env-'.$sEnvironment.'/'.$sModule.'/'.$sPage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user