示例#1
0
         // Selected fields
         print '<td>&nbsp;</td>';
         print '<td align="center"><a href="' . $_SERVER["PHP_SELF"] . '?step=2&datatoexport=' . $datatoexport . '&action=unselectfield&field=' . $code . '">' . img_left('default', 0, 'style="max-width: 20px"') . '</a></td>';
         print '<td>';
         //print $text.'-'.$htmltext."<br>";
         print $form->textwithpicto($text, $htmltext);
         //print ' ('.$code.')';
         print '</td>';
     } else {
         // Fields not selected
         print '<td>';
         //print $text.'-'.$htmltext."<br>";
         print $form->textwithpicto($text, $htmltext);
         //print ' ('.$code.')';
         print '</td>';
         print '<td align="center"><a href="' . $_SERVER["PHP_SELF"] . '?step=2&datatoexport=' . $datatoexport . '&action=selectfield&field=' . $code . '">' . img_right('default', 0, 'style="max-width: 20px"') . '</a></td>';
         print '<td>&nbsp;</td>';
     }
     print '</tr>';
 }
 print '</table>';
 print '</div>';
 /*
  * Barre d'action
  *
  */
 print '<div class="tabsAction">';
 if (count($array_selected)) {
     // If filters exist
     if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) {
         print '<a class="butAction" href="export.php?step=3&datatoexport=' . $datatoexport . '">' . $langs->trans("NextStep") . '</a>';
示例#2
0
         print '<td>&nbsp;</td>';
         print '<td align="center"><a href="' . $_SERVER["PHP_SELF"] . '?step=2&datatoexport=' . $datatoexport . '&action=unselectfield&field=' . $code . '">' . img_left() . '</a></td>';
         print '<td>';
         //print $text.'-'.$htmltext."<br>";
         print $form->textwithpicto($text, $htmltext);
         //print ' ('.$code.')';
         print '</td>';
         $bit = 1;
     } else {
         // Fields not selected
         print '<td>';
         //print $text.'-'.$htmltext."<br>";
         print $form->textwithpicto($text, $htmltext);
         //print ' ('.$code.')';
         print '</td>';
         print '<td align="center"><a href="' . $_SERVER["PHP_SELF"] . '?step=2&datatoexport=' . $datatoexport . '&action=selectfield&field=' . $code . '">' . img_right() . '</a></td>';
         print '<td>&nbsp;</td>';
         $bit = 0;
     }
     print '</tr>';
     $save_select .= $bit;
 }
 print '</table>';
 print '</div>';
 if ($mesg) {
     print $mesg;
 }
 /*
  * Barre d'action
  *
  */
} else {
    echo $langs->trans('NothingHere');
}
?>
</li>');
		}
		else {
			$.each(data.TCategory,function(i,item) {
				spc_line_class = (spc_line_class == 'even') ? 'odd' : 'even';
				$ul.append('<li class="category '+spc_line_class+'" catid="'+item.id+'"><a href="javascript:getArboSPC('+item.id+', $(\'li[catid='+item.id+']\') )">'+item.label+'</a></li>');
			});
			
			$.each(data.TProduct,function(i,item) {
				spc_line_class = (spc_line_class == 'even') ? 'odd' : 'even';
				$li = $('<li class="product '+spc_line_class+'" productid="'+item.id+'"><input type="checkbox" value="1" name="TProductSPCtoAdd['+item.id+']" fk_product="'+item.id+'" class="checkSPC" /> <a class="checkIt" href="javascript:;" onclick="checkProductSPC('+item.id+')" >'+item.label+'</a> <a class="addToForm" href="javascript:;" onclick="addProductSPC('+item.id+',\''+item.label.replace(/\'/g, "&quot;")+'\', \''+item.ref+'\')"><?php 
echo img_right($langs->trans('SelectThisProduct'));
?>
</a></li>');
				
				<?php 
if ($conf->global->SPC_DISPLAY_DESC_OF_PRODUCT) {
    ?>
					var desc = item.description.replace(/'/g, "\\'");
					var bubble = $("<?php 
    echo addslashes(img_help());
    ?>
");
					bubble.attr('title', desc);
					$li.append(bubble);
				<?php 
}
function _fiche_ligne_asset(&$PDOdb, &$form, &$of, &$assetOFLine, $type = 'NEEDED')
{
    global $conf;
    if (empty($conf->global->USE_LOT_IN_OF) || empty($conf->asset->enabled)) {
        return '';
    }
    $TAsset = $assetOFLine->getAssetLinked($PDOdb);
    $r = '<div>';
    if ($of->status == 'DRAFT' && $form->type_aff == 'edit' && $type == 'NEEDED') {
        $url = dol_buildpath('/of/fiche_of.php?id=' . $of->getId() . '&idLine=' . $assetOFLine->getId() . '&action=addAssetLink&idAsset=', 2);
        // Pour le moment au limite au besoin, la création reste en dure, à voir
        $r .= $form->texte('', 'TAssetOFLine[' . $assetOFLine->getId() . '][new_asset]', '', 10, 255, ' title="Ajouter un équipement" fk_product="' . $assetOFLine->fk_product . '" rel="add-asset" fk-asset-of-line="' . $assetOFLine->getId() . '" ') . '<a href="" base-href="' . $url . '">' . img_right('lier') . '</a>' . '<br/>';
    }
    foreach ($TAsset as &$asset) {
        $r .= $asset->getNomUrl(1, 1);
        if ($of->status == 'DRAFT' && $form->type_aff == 'edit' && $type == 'NEEDED') {
            $r .= ' <a href="?id=' . $of->getId() . '&idLine=' . $assetOFLine->getId() . '&idAsset=' . $asset->getId() . '&action=deleteAssetLink">' . img_delete('Suppresion du lien') . '</a>';
        }
    }
    $r .= '</div>';
    return $r;
}