Browse Source

Uspójnienie linków do nowej wersji projekt-bocian(inne położenie katalogu projektów)

dariusz.andryskowski 7 years ago
parent
commit
1029af6d04
3 changed files with 24 additions and 27 deletions
  1. 5 3
      theme/view/footer.php
  2. 9 14
      tools/Bocian.php
  3. 10 10
      tools/Bocian.php.view.js

+ 5 - 3
theme/view/footer.php

@@ -44,9 +44,11 @@ setTimeout(searchColumnWithHref, 2000);
  * Funkcja przeszukuje td i pobiera dane na podstawie znalezionego adresu url
  */
 function searchColumnWithHref() {
+  return false; // todo: usunc
+
   console.log('START searchColumnWithHref');
 
-  $("table tr").each(function () {
+  $(".AjaxTableCont table tr").each(function () {
     var tableRow = $(this);
 
       tableRow.find('td').each(function ( indexTd, valueTd ) {
@@ -76,7 +78,7 @@ function getDataByUrl( paramUrl, urlNamespaceParams = [] ) {
   if ( !paramUrl ) {
     return;
   }
-
+  // dodanie tego zapisu pozwala na zwrócenie danych w formacie JSON posortowanego
   var jsonFormatParam = '&_task=loadDataAjax&currSortCol=ID&currSortFlip=desc';
   window.fetch(paramUrl + jsonFormatParam, {
 
@@ -86,7 +88,7 @@ function getDataByUrl( paramUrl, urlNamespaceParams = [] ) {
         return response.json()
       })
       .then(function(data) {
-        //todo: odebrane dane
+        //todo: odebrane daneFVFF
         //data.body.items
 console.log(data);
           if (data.rows === null) {

File diff suppressed because it is too large
+ 9 - 14
tools/Bocian.php


+ 10 - 10
tools/Bocian.php.view.js

@@ -461,6 +461,7 @@ function rootChangeForm() {
 urlFetchKontrahenciPowiazania();
 	var valueUrl = global.location.hash;
 
+console.log('URL', valueUrl);
 	switch (valueUrl) {
 		case '#KONTRAHENCI':
 			$( ".container-bi_audit_form_kontrahenci_raport" ).html( VIEW_KONTRAHENCI );
@@ -471,23 +472,22 @@ urlFetchKontrahenciPowiazania();
 			break;
 
 		case '#PRACOWNICY':
-			$( ".container-bi_audit_form_pracownicy_raport" ).html( VIEW_PRACOWNICY );
+		$( ".container-bi_audit_form_pracownicy_raport" ).html( VIEW_PRACOWNICY );
 			urlFetchPracownicy(1);
 			fetchGroupPracownicy()
 			$( ".container-bi_audit_form_kontrahenci_raport" ).hide();
 			$( ".container-bi_audit_form_pracownicy_raport" ).show();
 		break;
 
-		case '#REAPORT':
-			$( ".container-bi_audit_form_raport_data" ).html( VIEW_TREE_REAPORT );
-			urlFetchKontrahenciPowiazania();
-			$( ".container-bi_audit_form_kontrahenci_raport" ).hide();
-			$( ".container-bi_audit_form_pracownicy_raport" ).hide();
-			$( ".container-bi_audit_form_raport_data" ).show();
-		break;
+		// case '#REAPORT':
+		// 	$( ".container-bi_audit_form_raport_data" ).html( VIEW_TREE_REAPORT );
+		// 	urlFetchKontrahenciPowiazania();
+		// 	$( ".container-bi_audit_form_kontrahenci_raport" ).hide();
+		// 	$( ".container-bi_audit_form_pracownicy_raport" ).hide();
+		// 	$( ".container-bi_audit_form_raport_data" ).show();
+		// break;
 
 		default:
-			$( ".container-bi_audit_form_pracownicy_raport" ).html( VIEW_PRACOWNICY );
 			urlFetchPracownicy(1);
 			fetchGroupPracownicy()
 			$( ".container-bi_audit_form_kontrahenci_raport" ).hide();
@@ -542,7 +542,7 @@ function urlFetchKontrahenci(page) {
 				var filterIdGroup = filterIdGroup || getItemLocalStorage('Bocian.biAuditForm.kontrahenci.filterIdGroup');
 						})
 				.then(function(data) {
-
+console.log('kkontrahenci data', data);
 						var listItemsKontrahenci = null;
 						data.body.items.forEach (function(row) {
 							listItemsKontrahenci += '<tr><td><input type="checkbox" name="kontrID[]" value="'+row['ID']+'" /></td>'+

Some files were not shown because too many files changed in this diff