Move takepos.php file into index.php to match other dir structure

This commit is contained in:
Laurent Destailleur 2020-03-16 15:41:21 +01:00
parent 41ae8f6f68
commit 4b1dd27c5f
7 changed files with 18 additions and 16 deletions

View File

@ -217,7 +217,7 @@ class modTakePos extends DolibarrModules
'titre'=>'PointOfSaleShort',
'mainmenu'=>'takepos',
'leftmenu'=>'',
'url'=>'/takepos/takepos.php',
'url'=>'/takepos/index.php',
'langs'=>'cashdesk', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000 + $r,
'enabled'=>'$conf->takepos->enabled', // Define condition to show or hide menu entry. Use '$conf->takepos->enabled' if entry must be visible if module is enabled.

View File

@ -58,8 +58,9 @@ TakeposNeedsCategories=TakePOS needs product categories to work
OrderNotes=Order Notes
CashDeskBankAccountFor=Default account to use for payments in
NoPaimementModesDefined=No paiment mode defined in TakePOS configuration
TicketVatGrouped=Group VAT by rate in tickets
AutoPrintTickets=Automatically print tickets
TicketVatGrouped=Group VAT by rate in tickets|receipts
AutoPrintTickets=Automatically print tickets|receipts
PrintCustomerOnReceipts=Print customer on tickets|receipts
EnableBarOrRestaurantFeatures=Enable features for Bar or Restaurant
ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ?
ConfirmDiscardOfThisPOSSale=Do you want to discard this current sale ?

View File

@ -207,7 +207,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P
// Customer information
print '<tr class="oddeven"><td>';
print $langs->trans('ShowCustomer');
print $langs->trans('PrintCustomerOnReceipts');
print '<td colspan="2">';
print $form->selectyesno("TAKEPOS_SHOW_CUSTOMER", $conf->global->TAKEPOS_SHOW_CUSTOMER, 1);
print "</td></tr>\n";

View File

@ -59,9 +59,11 @@ if ($resql) {
$action = GETPOST('action', 'alpha');
/*
* Actions
*/
$error = 0;
if ($action == 'set')
@ -186,8 +188,7 @@ foreach ($dirmodels as $reldir)
if ($module->isEnabled())
{
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
print $module->info();
print '</td>';
@ -313,7 +314,7 @@ $htmltext .= '</i>';
print '<tr class="oddeven"><td>';
print $langs->trans("ColorTheme");
print '<td colspan="2">';
$array = array(0=>"eldy", 1=>$langs->trans("Colorful"));
$array = array(0=>"Eldy", 1=>$langs->trans("Colorful"));
print $form->selectarray('TAKEPOS_COLOR_THEME', $array, (empty($conf->global->TAKEPOS_COLOR_THEME) ? '0' : $conf->global->TAKEPOS_COLOR_THEME), 0);
print "</td></tr>\n";

View File

@ -132,7 +132,7 @@ function updatename(rowid) {
}
function LoadPlace(place){
parent.location.href='takepos.php?place='+place;
parent.location.href='index.php?place='+place;
}

View File

@ -17,7 +17,7 @@
*/
/**
* \file htdocs/takepos/takepos.php
* \file htdocs/takepos/index.php
* \ingroup takepos
* \brief Main TakePOS screen
*/
@ -48,7 +48,7 @@ if ($setterminal > 0)
$_SESSION["takeposterminal"] = $setterminal;
}
$_SESSION["urlfrom"] = '/takepos/takepos.php';
$_SESSION["urlfrom"] = '/takepos/index.php';
$langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter"));
@ -179,7 +179,7 @@ function ClearSearch() {
// Set the focus on search field but only on desktop. On tablet or smartphone, we don't to avoid to have the keyboard open automatically
function setFocusOnSearchField() {
console.log("Call setFocusOnSearchField in page takepos.php");
console.log("Call setFocusOnSearchField in page index.php");
<?php if ($conf->browser->layout == 'classic') { ?>
console.log("has keyboard from localStorage, so we can force focus on search field");
$("#search").focus();
@ -636,14 +636,14 @@ function TerminalsDialog()
modal: true,
buttons: {
'<?php echo dol_escape_js($langs->trans("Terminal")) ?> 1': function() {
location.href='takepos.php?setterminal=1';
location.href='index.php?setterminal=1';
}
<?php
for ($i = 2; $i <= $conf->global->TAKEPOS_NUM_TERMINALS; $i++)
{
print ",
'".dol_escape_js($langs->trans("Terminal"))." ".$i."': function() {
location.href='takepos.php?setterminal=".$i."';
location.href='index.php?setterminal=".$i."';
}
";
}

View File

@ -53,7 +53,7 @@ if ($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout ==
if ($conf->global->TAKEPOS_NUM_TERMINALS == "1") $_SESSION["takeposterminal"] = 1;
else
{
header("Location: takepos.php");
header("Location: ".DOL_URL_ROOT."/takepos/index.php");
exit;
}
}
@ -746,7 +746,7 @@ $( document ).ready(function() {
</script>
<?php
// Add again js for footer because this content is injected into takepos.php page so all init
// Add again js for footer because this content is injected into index.php page so all init
// for tooltip and other js beautifiers must be reexecuted too.
if (!empty($conf->use_javascript_ajax))
{
@ -754,7 +754,7 @@ if (!empty($conf->use_javascript_ajax))
print '<script src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.($ext ? '&'.$ext : '').'"></script>'."\n";
}
print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilepage='.$mobilepage.' $_SESSION["basiclayout"]='.$_SESSION["basiclayout"].' conf->global->TAKEPOS_BAR_RESTAURANT='.$conf->global->TAKEPOS_BAR_RESTAURANT.' -->'."\n";
print '<div class="div-table-responsive-no-min invoice">';
print '<table id="tablelines" class="noborder noshadow postablelines" width="100%">';
print '<tr class="liste_titre nodrag nodrop">';