| 1 | <script> |
|---|
| 2 | {APP_NAME}expandRow = function(trg) { |
|---|
| 3 | var td = trg.parentNode; |
|---|
| 4 | var table = DOMO.GFP(td, 'tagName', 'TABLE'); |
|---|
| 5 | var th = table.getElementsByTagName('TH')[td.cellIndex]; |
|---|
| 6 | var cell = null; |
|---|
| 7 | var i = 0; |
|---|
| 8 | var row = table.insertRow(td.parentNode.rowIndex + 1); |
|---|
| 9 | row.className = 'l-ex-r'; |
|---|
| 10 | while (i <= td.cellIndex) cell = row.insertCell(i++); |
|---|
| 11 | cell.colSpan = td.parentNode.cells.length - i + 1; |
|---|
| 12 | cell.style.padding = '8px 8px 20px 8px'; |
|---|
| 13 | cell.innerHTML = '<div style="padding-left:20px; line-height:20px; background:transparent url({IMG_PATH}loading2.gif) no-repeat center left;">Czekaj...</div>'; |
|---|
| 14 | asyncLibrary.execute('./modules/Reports/beans/HTMLReportOutput.inc', 'HTMLReportOutput', {WPISZ_REP_ID_TWOJEGO_RAPORU}, 'toHTML', 1, '$(\'output\').innerHTML = text', null); |
|---|
| 15 | } |
|---|
| 16 | |
|---|
| 17 | {APP_NAME}collapseRow = function(trg) { |
|---|
| 18 | DOMO.remove(trg.parentNode.parentNode.nextSibling); |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | {APP_NAME}handleDEvents = function(event) { |
|---|
| 22 | try { |
|---|
| 23 | var trg = getTarget(event); |
|---|
| 24 | if (!/^plu2|minu2$/.test(trg.className)) return true; |
|---|
| 25 | |
|---|
| 26 | if (event.type == 'mousedown') { |
|---|
| 27 | if (trg.className == 'minu2') { |
|---|
| 28 | trg.title = 'Pokaż'; |
|---|
| 29 | {APP_NAME}collapseRow(trg); |
|---|
| 30 | |
|---|
| 31 | } else if (trg.className == 'plu2') { |
|---|
| 32 | trg.title = 'Zamknij podgląd'; |
|---|
| 33 | {APP_NAME}expandRow(trg); |
|---|
| 34 | } |
|---|
| 35 | toggleClass(trg, 'plu2', 'minu2'); |
|---|
| 36 | |
|---|
| 37 | return doNil(event); |
|---|
| 38 | } |
|---|
| 39 | }catch(e){} |
|---|
| 40 | } |
|---|
| 41 | |
|---|
| 42 | {APP_NAME}loadReport = function() { |
|---|
| 43 | asyncLibrary.execute('./modules/Reports/beans/HTMLReportOutput.inc', 'HTMLReportOutput', {WPISZ_REP_ID_TWOJEGO_RAPORU}, 'toHTML', 1, '$(\'output\').innerHTML = text', null); |
|---|
| 44 | } |
|---|
| 45 | |
|---|
| 46 | </script> |
|---|
| 47 | <div id="output"></div> |
|---|