Debug for smartphone

This commit is contained in:
Laurent Destailleur 2021-05-19 13:21:09 +02:00
parent 58ffee193f
commit 026cc1b35a
4 changed files with 42 additions and 34 deletions

View File

@ -487,8 +487,10 @@ print load_fiche_titre($title);
$infoarray = dol_getImageSize($dir."/".GETPOST("file", 'alpha'));
$height = $infoarray['height'];
$width = $infoarray['width'];
print '<span class="opacitymedium">'.$langs->trans("CurrentInformationOnImage").': ';
print $langs->trans("Width").': <strong>'.$width.'</strong> x '.$langs->trans("Height").': <strong>'.$height.'</strong></span><br>';
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("CurrentInformationOnImage").': </span>';
print '<span class="opacitymedium">';
print $langs->trans("Width").': <strong>'.$width.'</strong> x '.$langs->trans("Height").': <strong>'.$height.'</strong>';
print '</span><br>';
print '<br>'."\n";
@ -546,36 +548,42 @@ if (!empty($conf->use_javascript_ajax)) {
print '<legend>'.$langs->trans("Recenter").'</legend>';
print $langs->trans("DefineNewAreaToPick").'...<br>';
print '<br><div class="center">';
print '<div style="border: 1px solid #888888; width: '.$widthforcrop.'px;">';
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$object->entity.'&file='.urlencode($original_file).'" alt="" id="cropbox" width="'.$widthforcrop.'px"/>';
print '</div>';
print '</div><br>';
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.($num ? '&num='.$num : '').'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '
<div class="jc_coords">
'.$langs->trans("NewSizeAfterCropping").':
<label>X1 <input type="number" class="flat maxwidth50" id="x" name="x" /></label>
<label>Y1 <input type="number" class="flat maxwidth50" id="y" name="y" /></label>
<label>X2 <input type="number" class="flat maxwidth50" id="x2" name="x2" /></label>
<label>Y2 <input type="number" class="flat maxwidth50" id="y2" name="y2" /></label>
<label>W <input type="number" class="flat maxwidth50" id="w" name="w" /></label>
<label>H <input type="number" class="flat maxwidth50" id="h" name="h" /></label>
</div>
if (empty($conf->dol_no_mouse_hover)) {
print '<div style="border: 1px solid #888888; width: '.$widthforcrop.'px;">';
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$object->entity.'&file='.urlencode($original_file).'" alt="" id="cropbox" width="'.$widthforcrop.'px"/>';
print '</div>';
print '</div><br>';
<input type="hidden" id="file" name="file" value="'.dol_escape_htmltag($original_file).'" />
<input type="hidden" id="action" name="action" value="confirm_crop" />
<input type="hidden" id="product" name="product" value="'.dol_escape_htmltag($id).'" />
<input type="hidden" id="refsizeforcrop" name="refsizeforcrop" value="'.$refsizeforcrop.'" />
<input type="hidden" id="ratioforcrop" name="ratioforcrop" value="'.$ratioforcrop.'" /><!-- field used by core/lib/lib_photoresize.js -->
<input type="hidden" name="modulepart" value="'.dol_escape_htmltag($modulepart).'" />
<input type="hidden" name="id" value="'.dol_escape_htmltag($id).'" />
<br>
<input type="submit" id="submitcrop" name="submitcrop" class="button" value="'.dol_escape_htmltag($langs->trans("Recenter")).'" />
&nbsp;
<input type="submit" id="cancelcrop" name="cancel" class="button button-cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'" />
</form>'."\n";
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.($num ? '&num='.$num : '').'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '
<div class="jc_coords">
'.$langs->trans("NewSizeAfterCropping").':
<label>X1 <input type="number" class="flat maxwidth50" id="x" name="x" /></label>
<label>Y1 <input type="number" class="flat maxwidth50" id="y" name="y" /></label>
<label>X2 <input type="number" class="flat maxwidth50" id="x2" name="x2" /></label>
<label>Y2 <input type="number" class="flat maxwidth50" id="y2" name="y2" /></label>
<label>W <input type="number" class="flat maxwidth50" id="w" name="w" /></label>
<label>H <input type="number" class="flat maxwidth50" id="h" name="h" /></label>
</div>
<input type="hidden" id="file" name="file" value="'.dol_escape_htmltag($original_file).'" />
<input type="hidden" id="action" name="action" value="confirm_crop" />
<input type="hidden" id="product" name="product" value="'.dol_escape_htmltag($id).'" />
<input type="hidden" id="refsizeforcrop" name="refsizeforcrop" value="'.$refsizeforcrop.'" />
<input type="hidden" id="ratioforcrop" name="ratioforcrop" value="'.$ratioforcrop.'" /><!-- field used by core/lib/lib_photoresize.js -->
<input type="hidden" name="modulepart" value="'.dol_escape_htmltag($modulepart).'" />
<input type="hidden" name="id" value="'.dol_escape_htmltag($id).'" />
<br>
<input type="submit" id="submitcrop" name="submitcrop" class="button" value="'.dol_escape_htmltag($langs->trans("Recenter")).'" />
&nbsp;
<input type="submit" id="cancelcrop" name="cancel" class="button button-cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'" />
</form>'."\n";
} else {
$langs->load("other");
print '<div class="opacitymedium">'.$langs->trans("FeatureNotAvailableOnDevicesWithoutMouse").'</div>';
}
print '</fieldset>'."\n";
print '<br>';
}

View File

@ -2103,7 +2103,6 @@ PDF_SHOW_PROJECT=Show project on document
ShowProjectLabel=Project Label
PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF.
FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book.
FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled
RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard
JumpToBoxes=Jump to Setup -> Widgets
MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time"

View File

@ -129,6 +129,7 @@ ClosedByLogin=User login who closed
FileWasRemoved=File %s was removed
DirWasRemoved=Directory %s was removed
FeatureNotYetAvailable=Feature not yet available in the current version
FeatureNotAvailableOnDevicesWithoutMouse=Feature not available on devices without mouse
FeaturesSupported=Supported features
Width=Width
Height=Height

View File

@ -206,15 +206,15 @@ while ($i <= $MAXAGENDA) {
print '<td class="maxwidth50onsmartphone">'.$langs->trans("AgendaExtNb", $key)."</td>";
// Name
$name_value = (GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key) ?GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key) : (empty($object->conf->$name) ? '' : $object->conf->$name));
print '<td class="maxwidth50onsmartphone"><input type="text" class="flat hideifnotset minwidth100" name="AGENDA_EXT_NAME_'.$id.'_'.$key.'" value="'.$name_value.'"></td>';
print '<td><input type="text" class="flat hideifnotset minwidth100 maxwidth100onsmartphone" name="AGENDA_EXT_NAME_'.$id.'_'.$key.'" value="'.$name_value.'"></td>';
// URL
$src_value = (GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key) ?GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key) : (empty($object->conf->$src) ? '' : $object->conf->$src));
print '<td class="maxwidth50onsmartphone"><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC_'.$id.'_'.$key.'" value="'.$src_value.'"></td>';
print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC_'.$id.'_'.$key.'" value="'.$src_value.'"></td>';
// Offset TZ
$offsettz_value = (GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key) ? GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key) : (empty($object->conf->$offsettz) ? 0 : $object->conf->$offsettz));
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key.'" value="'.$offsettz_value.'" size="1"></td>';
// Color (Possible colors are limited by Google)
print '<td class="nowrap right">';
print '<td class="nowraponall right">';
//print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist);
$color_value = (GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) ?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key) : (empty($object->conf->$color) ? 'ffffff' : $object->conf->$color));
print $formother->selectColor($color_value, "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset');