Skip to content

Commit

Permalink
Swap of align/valign/border/width for css
Browse files Browse the repository at this point in the history
Removal of type="text/javascript"
  • Loading branch information
torvista committed Jan 20, 2019
1 parent e122fa2 commit 07b2bb6
Show file tree
Hide file tree
Showing 13 changed files with 266 additions and 265 deletions.
2 changes: 1 addition & 1 deletion htdocs/bookmarks/bookmarks.lib.php
Expand Up @@ -116,7 +116,7 @@ function printBookmarksList($aDb, $aLangs)

$ret.=ajax_combobox('boxbookmark');

$ret.='<script type="text/javascript">
$ret.='<script>
$(document).ready(function () {';
$ret.=' jQuery("#boxbookmark").change(function() {
var urlselected = jQuery("#boxbookmark option:selected").attr("rel");
Expand Down
79 changes: 40 additions & 39 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -612,7 +612,8 @@ function getBannerAddress($htmlkey, $object)
}
if (! empty($this->url))
{
$out.=dol_print_url($this->url,'_goout',0,1);
//$out.=dol_print_url($this->url,'_goout',0,1);//steve changed to blank
$out.=dol_print_url($this->url,'_blank',0,1);
$outdone++;
}
$out.='<div style="clear: both;">';
Expand Down Expand Up @@ -3868,7 +3869,7 @@ function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0
print '<tr class="liste_titre nodrag nodrop">';

// Adds a line numbering column
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '<td class="linecolnum" align="center" width="5">&nbsp;</td>';
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '<td class="linecolnum center">&nbsp;</td>';

// Description
print '<td class="linecoldescription">'.$langs->trans('Description').'</td>';
Expand All @@ -3879,66 +3880,66 @@ function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0
}

// VAT
print '<td class="linecolvat" align="right" width="80">'.$langs->trans('VAT').'</td>';
print '<td class="linecolvat right" style="width: 80px">'.$langs->trans('VAT').'</td>';

// Price HT
print '<td class="linecoluht" align="right" width="80">'.$langs->trans('PriceUHT').'</td>';
print '<td class="linecoluht right" style="width: 80px">'.$langs->trans('PriceUHT').'</td>';

// Multicurrency
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print '<td class="linecoluht_currency" align="right" width="80">'.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).'</td>';
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print '<td class="linecoluht_currency right" style="width: 80px">'.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).'</td>';

if ($inputalsopricewithtax) print '<td align="right" width="80">'.$langs->trans('PriceUTTC').'</td>';
if ($inputalsopricewithtax) print '<td class="right" style="width: 80px">'.$langs->trans('PriceUTTC').'</td>';

// Qty
print '<td class="linecolqty" align="right">'.$langs->trans('Qty').'</td>';
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';

if($conf->global->PRODUCT_USE_UNITS)
{
print '<td class="linecoluseunit" align="left">'.$langs->trans('Unit').'</td>';
print '<td class="linecoluseunit left">'.$langs->trans('Unit').'</td>';
}

// Reduction short
print '<td class="linecoldiscount" align="right">'.$langs->trans('ReductionShort').'</td>';
print '<td class="linecoldiscount right">'.$langs->trans('ReductionShort').'</td>';

if ($this->situation_cycle_ref) {
print '<td class="linecolcycleref" align="right">' . $langs->trans('Progress') . '</td>';
print '<td class="linecolcycleref right">' . $langs->trans('Progress') . '</td>';
}

if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
{
if (!empty($user->rights->margins->creer))
{
if ($conf->global->MARGIN_TYPE == "1")
print '<td class="linecolmargin1 margininfos" align="right" width="80">'.$langs->trans('BuyingPrice').'</td>';
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('BuyingPrice').'</td>';
else
print '<td class="linecolmargin1 margininfos" align="right" width="80">'.$langs->trans('CostPrice').'</td>';
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('CostPrice').'</td>';
}

if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous)
print '<td class="linecolmargin2 margininfos" align="right" width="50">'.$langs->trans('MarginRate').'</td>';
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarginRate').'</td>';
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous)
print '<td class="linecolmargin2 margininfos" align="right" width="50">'.$langs->trans('MarkRate').'</td>';
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarkRate').'</td>';
}

// Total HT
print '<td class="linecolht" align="right">'.$langs->trans('TotalHTShort').'</td>';
print '<td class="linecolht right">'.$langs->trans('TotalHTShort').'</td>';

// Multicurrency
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print '<td class="linecoltotalht_currency" align="right">'.$langs->trans('TotalHTShortCurrency', $this->multicurrency_code).'</td>';
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print '<td class="linecoltotalht_currency right">'.$langs->trans('TotalHTShortCurrency', $this->multicurrency_code).'</td>';

if ($outputalsopricetotalwithtax) print '<td align="right" width="80">'.$langs->trans('TotalTTCShort').'</td>';
if ($outputalsopricetotalwithtax) print '<td class="right" style="width: 80px">'.$langs->trans('TotalTTCShort').'</td>';

print '<td class="linecoledit"></td>'; // No width to allow autodim

print '<td class="linecoldelete" width="10"></td>';
print '<td class="linecoldelete" style="width: 10px"></td>';

print '<td class="linecolmove" width="10"></td>';
print '<td class="linecolmove" style="width: 10px"></td>';

if($action == 'selectlines')
{
print '<td class="linecolcheckall" align="center">';
print '<td class="linecolcheckall center">';
print '<input type="checkbox" class="linecheckboxtoggle" />';
print '<script type="text/javascript">$(document).ready(function() {$(".linecheckboxtoggle").click(function() {var checkBoxes = $(".linecheckbox");checkBoxes.prop("checked", this.checked);})});</script>';
print '<script>$(document).ready(function() {$(".linecheckboxtoggle").click(function() {var checkBoxes = $(".linecheckbox");checkBoxes.prop("checked", this.checked);})});</script>';
print '</td>';
}

Expand Down Expand Up @@ -4120,15 +4121,15 @@ function printOriginLinesList($restrictlist='')
print '<tr class="liste_titre">';
print '<td>'.$langs->trans('Ref').'</td>';
print '<td>'.$langs->trans('Description').'</td>';
print '<td align="right">'.$langs->trans('VATRate').'</td>';
print '<td align="right">'.$langs->trans('PriceUHT').'</td>';
if (!empty($conf->multicurrency->enabled)) print '<td align="right">'.$langs->trans('PriceUHTCurrency').'</td>';
print '<td align="right">'.$langs->trans('Qty').'</td>';
print '<td class="right">'.$langs->trans('VATRate').'</td>';
print '<td class="right">'.$langs->trans('PriceUHT').'</td>';
if (!empty($conf->multicurrency->enabled)) print '<td class="right">'.$langs->trans('PriceUHTCurrency').'</td>';
print '<td class="right">'.$langs->trans('Qty').'</td>';
if($conf->global->PRODUCT_USE_UNITS)
{
print '<td align="left">'.$langs->trans('Unit').'</td>';
print '<td class="left">'.$langs->trans('Unit').'</td>';
}
print '<td align="right">'.$langs->trans('ReductionShort').'</td></tr>';
print '<td class="right">'.$langs->trans('ReductionShort').'</td></tr>';

$var = true;
$i = 0;
Expand Down Expand Up @@ -5869,7 +5870,7 @@ function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keypr

if(! empty($conf->use_javascript_ajax)) {
$out.= '
<script type="text/javascript">
<script>
$(document).ready(function() {
$("a#'.dol_escape_js($keyprefix.$key.$keysuffix).'_add").click(function() {
$("'.dol_escape_js($newInput).'").insertBefore(this);
Expand Down Expand Up @@ -6422,7 +6423,7 @@ function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='',
// Add code to manage list depending on others
if (! empty($conf->use_javascript_ajax)) {
$out .= '
<script type="text/javascript">
<script>
jQuery(document).ready(function() {
function showOptions(child_list, parent_list)
{
Expand Down Expand Up @@ -6687,10 +6688,10 @@ function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfil

if ($nbbyrow > 0)
{
if ($nbphoto == 1) $return.= '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">';
if ($nbphoto == 1) $return.= '<table class="valigntop center centpercent" style="border: 0; padding: 2; border-spacing: 2px; border-collapse: separate;">';

if ($nbphoto % $nbbyrow == 1) $return.= '<tr align=center valign=middle border=1>';
$return.= '<td width="'.ceil(100/$nbbyrow).'%" class="photo">';
if ($nbphoto % $nbbyrow == 1) $return.= '<tr class="center valignmiddle" style="border: 1px">';
$return.= '<td style="width: '.ceil(100/$nbbyrow).'%" class="photo">';
}
else if ($nbbyrow < 0) $return .= '<div class="inline-block">';

Expand All @@ -6717,29 +6718,29 @@ function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfil
if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight)
{
$return.= '<!-- Show original file (thumb not yet available with shared links) -->';
$return.= '<img class="photo photowithmargin" border="0" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">';
$return.= '<img class="photo photowithmargin" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">';
}
else {
$return.= '<!-- Show original file -->';
$return.= '<img class="photo photowithmargin" border="0" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">';
$return.= '<img class="photo photowithmargin" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">';
}
}
else
{
$return.= '<!-- Show nophoto file (because file is not shared) -->';
$return.= '<img class="photo photowithmargin" border="0" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png" title="'.dol_escape_htmltag($alt).'">';
$return.= '<img class="photo photowithmargin" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png" title="'.dol_escape_htmltag($alt).'">';
}
}
else
{
if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight)
{
$return.= '<!-- Show thumb -->';
$return.= '<img class="photo photowithmargin" border="0" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">';
$return.= '<img class="photo photowithmargin" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">';
}
else {
$return.= '<!-- Show original file -->';
$return.= '<img class="photo photowithmargin" border="0" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">';
$return.= '<img class="photo photowithmargin" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">';
}
}

Expand Down Expand Up @@ -6777,7 +6778,7 @@ function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfil
}

if (empty($size)) { // Format origine
$return.= '<img class="photo photowithmargin" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'">';
$return.= '<img class="photo photowithmargin" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'">';

if ($showfilename) $return.= '<br>'.$viewfilename;
if ($showaction)
Expand Down Expand Up @@ -6807,7 +6808,7 @@ function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfil
// Ferme tableau
while ($nbphoto % $nbbyrow)
{
$return.= '<td width="'.ceil(100/$nbbyrow).'%">&nbsp;</td>';
$return.= '<td style="width: '.ceil(100/$nbbyrow).'%">&nbsp;</td>';
$nbphoto++;
}

Expand Down

0 comments on commit 07b2bb6

Please sign in to comment.