123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- <!-- start: home -->
- <!--
- <ul class="nav nav-tabs" style="margin-bottom: 20px">
- <li class="nav-item">
- <a id="oip" class="nav-link active" href="#">OSOBY I PODMIOTY</a>
- </li>
- <li class="nav-item">
- <a id="obz" class="nav-link" href="#">OPER. BAZA ZGŁOSZEŃ</a>
- </li>
- </ul>
- -->
- <div id="smad-page-home" class="container-fluid">
- <div>
- <div>
- <div id="smad-menu-form-section">
- <div id="OIP">
- <div class="col-md-6 padding-lr-0 smad-border-col">
- <div class="menu-items text-center">
- <div class="menu-item">
- <a href="index.php?_route=UrlAction_Anton1#PRACOWNICY" title="Pracownicy">
- <div>Pracownicy</div>
- <img src="<?= $this->asset("assets/images/button-red.png"); ?>"
- alt="Pracownicy"
- onmouseover="this.src='<?= $this->asset("assets/images/button-red-border.png"); ?>'"
- onmouseout="this.src='<?= $this->asset("assets/images/button-red.png"); ?>'" />
- </a>
- </div>
- </div>
- </div>
- <div class="col-md-6 padding-lr-0">
- <div class="menu-items text-center">
- <div class="menu-item">
- <a href="index.php?_route=UrlAction_Anton1#KONTRAHENCI" title="Kontrahenci">
- <div>Kontrahenci</div>
- <img src="<?= $this->asset("assets/images/button-red.png"); ?>"
- alt="Kontrahenci"
- onmouseover="this.src='<?= $this->asset("assets/images/button-red-border.png"); ?>'"
- onmouseout="this.src='<?= $this->asset("assets/images/button-red.png"); ?>'" />
- </a>
- </div>
- </div>
- </div>
- </div>
- <div id="OBZ" style="display:none">
- <div id="smad-menu-form-section">
- <div class="col-md-12 padding-lr-0 smad-border-col">
- <div class="menu-items text-center">
- <div class="container-fluid">
- <ul class="breadcrumb">
- <li>
- <a href="#" onclick="">Operacyjna baza zgłoszeń</a>
- </li>
- <li>
- <a href="index.php?_route=UrlAction_Anton1#KONTRAHENCI">
- <span class="glyphicon glyphicon-plus"></span>
- Dodaj nowy rekord
- </a>
- </li>
- </ul>
- <div class="padding-0 smad-employees-obz-head" style="background-color:lightgrey;">
- <div class "col-md-6">
- <h2 class="title" style="padding: 30px"> Operacyjna baza zgłoszeń</h2>
- </div>
- <div class="container-fluid">
- <div class="table-responsive padding-0" id="smad-table-obz">
- <table class="table table-responsive table-bordered table-hover table-striped" height="5">
- <thead>
- </thead>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-12 border-top-grey border-bottom-grey">
- <div class="menu-form-input text-center">
- <div class="menu-item smad-heder-title">głębokość powiązań:</div>
- <div class="menu-item">
- <input type="text" class="form-control smad-depth" placeholder="1-16" value="6" />
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div id="smad-generate-link" class="container-fluid">
- <div>
- <div class="text-center">
- <?php //todo: ukrycie przycisku generownia raportów powiazan ?>
- <!-- <a href="#" title="GENERUJ RAPORT POWIĄZAŃ" class="btn btn-primary font-weight-700">GENERUJ RAPORT POWIĄZAŃ</a> -->
- </div>
- </div>
- </div>
- <script type="text/javascript">
- if (localStorage.getItem("Anton1.biAuditForm.depth") === null) {
- localStorage.setItem('Anton1.biAuditForm.depth', 6);
- }
- $(document).ready(function() {
- clearBIAuditFormLocalStorage();
- loadCurrentDepthInInput('.smad-depth');
- updateLocalStorageBiAuditDepth('.smad-depth');
- setItemLocalStorage('Anton1.biAuditForm.smadReaportTitle', 'Nazwa raportu');
- $("#oip").click(function(){
- $("#OIP").show();
- $("#OBZ").hide();
- });
- $("#obz").click(function(){
- $("#OBZ").show();
- $("#OIP").hide();
- });
- });
- /**
- * Load data default title reaport in storage
- */
- function loadCurrentReaportTitleInInput(idInput) {
- var reaportTitleValue = getItemLocalStorage("Anton1.biAuditForm.smadReaportTitle");
- if ( getItemLocalStorage('Anton1.biAuditForm.smadReaportTitle') === null ) {
- reaportTitleValue = setItemLocalStorage('Anton1.biAuditForm.smadReaportTitle', 'Nazwa raportu');
- }
- $(idInput).val(function() {
- return reaportTitleValue;
- });
- }
- /**
- * Load data default depth in storage
- */
- function loadCurrentDepthInInput(idInput) {
- var depthValue = getItemLocalStorage("Anton1.biAuditForm.depth");
- if ( getItemLocalStorage('Anton1.biAuditForm.depth') === null ) {
- depthValue = setItemLocalStorage('Anton1.biAuditForm.depth', 6);
- }
- $(idInput).val(function() {
- return depthValue;
- });
- }
- /**
- * Update data default depth in storage
- */
- function updateLocalStorageBiAuditDepth(idInput) {
- $(idInput).keyup(function() {
- delayUpdate(function(){
- var newValue = $(idInput).val();
- var responseValue = validateValueDepth(parseInt(newValue));
- setItemLocalStorage('Anton1.biAuditForm.depth', responseValue);
- loadCurrentDepthInInput('.smad-depth');
- }, 1000 );
- });
- }
- function validateValueDepth(newValue) {
- var value = null;
- value = newValue;
- if (parseInt(newValue) < 0) {
- value = 1;
- }
- if (parseInt(newValue) > 16) {
- value = 16;
- }
- return value;
- }
- var delayUpdate = (function() {
- var timer = 0;
- return function(callback, ms) {
- clearTimeout (timer);
- timer = setTimeout(callback, ms);
- };
- })();
- // Local storage
- function setItemLocalStorage(key, array) {
- localStorage.setItem(key, JSON.stringify(array));
- }
- function getItemLocalStorage(key) {
- var retrievedData = localStorage.getItem(key);
- var response = JSON.parse(retrievedData);
- return response;
- }
- function clearBIAuditFormLocalStorage() {
- var arrayValue = [];
- setItemLocalStorage('Anton1.biAuditForm.pracownicyIds', arrayValue);
- setItemLocalStorage('Anton1.biAuditForm.kontrahenciIds', arrayValue);
- setItemLocalStorage('Anton1.biAuditForm.pracownicy.filterIdGroup', 0);
- setItemLocalStorage('Anton1.biAuditForm.kontrahenci.filterIdGroup', 0);
- setItemLocalStorage('Anton1.biAuditForm.analizaOnlyTargets', 'y');
- }
- window.delayUpdate = delayUpdate;
- </script>
- <!-- end:home -->
|