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_Bocian#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_Bocian#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_Bocian#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("Bocian.biAuditForm.depth") === null) {
- localStorage.setItem('Bocian.biAuditForm.depth', 6);
- }
- $(document).ready(function() {
- clearBIAuditFormLocalStorage();
- loadCurrentDepthInInput('.smad-depth');
- updateLocalStorageBiAuditDepth('.smad-depth');
- setItemLocalStorage('Bocian.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("Bocian.biAuditForm.smadReaportTitle");
- if ( getItemLocalStorage('Bocian.biAuditForm.smadReaportTitle') === null ) {
- reaportTitleValue = setItemLocalStorage('Bocian.biAuditForm.smadReaportTitle', 'Nazwa raportu');
- }
- $(idInput).val(function() {
- return reaportTitleValue;
- });
- }
- /**
- * Load data default depth in storage
- */
- function loadCurrentDepthInInput(idInput) {
- var depthValue = getItemLocalStorage("Bocian.biAuditForm.depth");
- if ( getItemLocalStorage('Bocian.biAuditForm.depth') === null ) {
- depthValue = setItemLocalStorage('Bocian.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('Bocian.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('Bocian.biAuditForm.pracownicyIds', arrayValue);
- setItemLocalStorage('Bocian.biAuditForm.kontrahenciIds', arrayValue);
- setItemLocalStorage('Bocian.biAuditForm.pracownicy.filterIdGroup', 0);
- setItemLocalStorage('Bocian.biAuditForm.kontrahenci.filterIdGroup', 0);
- setItemLocalStorage('Bocian.biAuditForm.analizaOnlyTargets', 'y');
- }
- window.delayUpdate = delayUpdate;
- </script>
- <!-- end:home -->
|