File: print.js

package info (click to toggle)
ocsinventory-server 2.8.1%2Bdfsg1-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,684 kB
  • sloc: php: 37,167; javascript: 28,347; perl: 8,234; sql: 2,725; sh: 1,636; xml: 1,071; python: 77; makefile: 29
file content (24 lines) | stat: -rwxr-xr-x 681 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
function imprime_zone(titre, obj)

{
// Définie la zone à imprimer
    var zi = document.getElementById(obj).innerHTML;

// Ouvre une nouvelle fenetre
    var f = window.open("", "ZoneImpr", "height=800, width=800, toolbar=0, menubar=0, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10");

// Définit le Style de la page
    f.document.body.style.color = '#000000';
    f.document.body.style.backgroundColor = '#FFFFFF';
    f.document.body.style.padding = "10px";

// Ajoute les Données
    f.document.title = titre;
    f.document.body.innerHTML += "" + zi + "";

// Imprime et ferme la fenetre
    f.window.print();
    f.window.close();
    return true;
}