Просмотр исходного кода

- show big button on bottom form
- active button bottom if choise 'pracownicy' or 'kontrahenci'
- show info about count choise 'pracownicy' or 'kontrahenci'
- clear choise 'pracownicy' or 'kontrahenci' if press button 'generate
reaport'

dariusz.andryskowski 7 лет назад
Родитель
Сommit
668ffcb7f5

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
theme/assets/css/styles.css


+ 457 - 0
theme/assets/less/buttons.less

@@ -0,0 +1,457 @@
+
+.btn {
+  display: inline-block;
+  padding: 10px 15px;
+  margin-bottom: 0;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1.428571429;
+  text-align: center;
+  white-space: nowrap;
+  vertical-align: middle;
+  cursor: pointer;
+  background-image: none;
+  border: 1px solid transparent;
+  border-radius: 4px;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  -o-user-select: none;
+  user-select: none;
+}
+
+.btn:focus {
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}
+
+.btn:hover,
+.btn:focus {
+  color: #333333;
+  text-decoration: none;
+}
+
+.btn:active,
+.btn.active {
+  background-image: none;
+  outline: 0;
+  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+}
+
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+  pointer-events: none;
+  cursor: not-allowed;
+  opacity: 0.65;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+
+.btn-default {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+.btn-default:hover,
+.btn-default:focus,
+.btn-default:focus,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+  color: @brand-primary;
+  background-color: @brand-white;
+  border-color: @brand-primary;
+}
+
+/** pagination */
+ul.tblAjax__footer__toolbar__pagination {
+  list-style-type: none;
+
+  li {
+    display: inline-block;
+  }
+}
+ul.btn-group.tblAjax__footer__toolbar__pagination.smad-pagination  li:not(:nth-child(1)) a,
+ul.btn-group.tblAjax__footer__toolbar__pagination.smad-pagination  li:not(:nth-last-child(1)) a {
+  border-radius: 0;
+}
+ul.btn-group.tblAjax__footer__toolbar__pagination.smad-pagination  li:nth-last-child(1) a {
+  -webkit-border-top-right-radius: 4px;
+  -webkit-border-bottom-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  -moz-border-radius-bottomright: 4px;
+  border-top-right-radius: 4px;
+  border-bottom-right-radius: 4px;
+}
+ul.btn-group.tblAjax__footer__toolbar__pagination.smad-pagination  li:nth-child(1) a {
+
+  -webkit-border-top-left-radius: 4px;
+  -webkit-border-bottom-left-radius: 4px;
+  -moz-border-radius-topleft: 4px;
+  -moz-border-radius-bottomleft: 4px;
+  border-top-left-radius: 4px;
+  border-bottom-left-radius: 4px;
+}
+.tblAjax__footer__toolbar__pagination {
+  .btn-default {
+    color: @brand-primary;
+    background-color: @brand-white;
+    border-color: @brand-primary;
+  }
+
+  .btn-default:hover,
+  .btn-default:focus,
+  .btn-default:focus,
+  .btn-default.active,
+  .open .dropdown-toggle.btn-default {
+    color: @brand-white;
+    background-color: @brand-primary;
+    border-color: @brand-primary;
+  }
+
+  .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+    border-radius: 0;
+  }
+}
+.footer_pagination_menu_items {
+  display: inline-block;
+}
+.tblAjax__footer__toolbar__info {
+  p {
+    font-size: 12px;
+  }
+}
+/* end pagination*/
+
+.btn-default:active:hover {
+  color: @brand-primary;
+  background-color: @brand-white;
+  border-color: @brand-primary;
+}
+
+
+.btn-default:active,
+.btn-default.active,
+.open .dropdown-toggle.btn-default {
+  color: @brand-primary;
+  background-color: @brand-white;
+  border-color: @brand-primary;
+}
+
+
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus {
+  color: mix(@brand-white, @brand-primary, 50%);
+  background-color: @brand-white;
+  border-color: mix(@brand-white, @brand-primary, 50%);
+}
+
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+  color: @brand-primary;
+  background-color: @brand-white;
+  border-color: @brand-primary;
+}
+
+.btn-default .badge {
+  color: @brand-primary!important;
+  background-color: #fff;
+}
+
+.btn-primary {
+  color: @brand-primary;
+  background-color: @brand-white;
+  border-color: @brand-primary;
+}
+
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary:active,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+.btn-primary:active:hover {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+.btn-primary:active,
+.btn-primary:focus,
+.btn-primary.active,
+.open .dropdown-toggle.btn-primary {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+.btn-primary .badge {
+  color: #428bca;
+  background-color: #fff;
+}
+
+.btn-warning {
+  color: @brand-white;
+  background-color: @brand-grey;
+  border-color: @brand-grey;
+}
+
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning:active,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+  color: @brand-text;
+  background-color: @brand-grey;
+  border-color: @brand-grey;
+}
+
+.btn-warning:active:hover {
+  color: @brand-text;
+  background-color: @brand-grey;
+  border-color: @brand-grey;
+}
+
+.btn-warning:active,
+.btn-warning:focus,
+.btn-warning.active,
+.open .dropdown-toggle.btn-warning {
+  color: @brand-text;
+  background-color: @brand-grey;
+  border-color: @brand-grey;
+}
+
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+  color: @brand-text;
+  background-color: @brand-grey;
+  border-color: @brand-grey;
+}
+
+.btn-warning .badge {
+  color: #f0ad4e;
+  background-color: #fff;
+}
+
+.btn-danger {
+  color: #ffffff;
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+  color: #ffffff;
+  background-color: #d2322d;
+  border-color: #ac2925;
+}
+
+.btn-danger:active:hover {
+  color: #ffffff;
+  background-color: #d2322d;
+  border-color: #ac2925;
+}
+
+.btn-danger:active,
+.btn-danger.active,
+.open .dropdown-toggle.btn-danger {
+  background-image: none;
+}
+
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+  background-color: #d9534f;
+  border-color: #d43f3a;
+}
+
+.btn-danger .badge {
+  color: #d9534f;
+  background-color: #fff;
+}
+
+
+.btn-success {
+  color: @brand-text;
+  background-color: @brand-grey;
+  border-color: @brand-grey;
+}
+
+.btn-success:hover,
+.btn-success:focus,
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+.btn-success:active:hover {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+
+.btn-success:active,
+.btn-success.active,
+.open .dropdown-toggle.btn-success {
+  background-image: none;
+}
+
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+.btn-success .badge {
+  color: #5cb85c;
+  background-color: #fff;
+}
+
+
+.btn-info {
+  color: @brand-secondary!important;
+  background-color: @brand-white;
+  border-color: @brand-secondary;
+}
+
+.btn-info:hover,
+.btn-info:focus,
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+  color: @brand-white!important;
+  background-color: @brand-secondary;
+  border-color: @brand-secondary;
+}
+
+.btn-info:active:hover {
+  color: @brand-white!important;
+  background-color: @brand-secondary;
+  border-color: @brand-secondary;
+}
+
+.btn-info:active,
+.btn-info.active,
+.open .dropdown-toggle.btn-info {
+  color: @brand-white!important;
+  background-color: @brand-secondary;
+  border-color: @brand-secondary;
+}
+
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+  color: @brand-white!important;
+  background-color: @brand-secondary;
+  border-color: @brand-secondary;
+}
+
+.btn-info .badge {
+  color: #5bc0de;
+  background-color: #fff;
+}
+
+.btn.disabled, .btn[disabled], fieldset[disabled] .btn {
+  cursor: not-allowed;
+  filter: alpha(opacity=65);
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  opacity: .65;
+}

+ 15 - 0
theme/assets/less/styles.less

@@ -653,6 +653,21 @@ footer {
   }
 }
 
+/**
+ * Section button generate reaport
+ */
+.smad-generate-reaport {
+  padding: 50px 0;
+
+  .smad-generate-reaport-button {
+    padding: 20px 45px;
+    font-size: 20px;
+    font-weight: 900;
+  }
+  .smad-generate-reaport-info {
+    padding: 10px 0;
+  }
+}
 
 /**
  * Login

+ 1 - 1
theme/assets/less/variables.less

@@ -4,7 +4,7 @@
 @font-primary: 'Roboto', sans-serif;
 
 @brand-primary: #d7142d;
-@brand-secondary: #cdcccc;
+@brand-secondary: #a9a9a9;
 
 @brand-white: #fff;
 @brand-grey: @brand-secondary;

+ 16 - 1
tools/Bocian.php

@@ -1440,7 +1440,7 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
 					$buttonMoveToGroup = '<a title="DODAJ WYBRANE DO GRUPY" onClick="addKontrahenciToGroup(event)" class="btn btn-info">DODAJ WYBRANE DO GRUPY</a>';
 					$buttonMoveToGroup .= '<a title="DODAJ WSZYSTKIE DO GRUPY" onClick="addKontrahenciAllToGroup(event)" class="btn btn-info" style="margin-left:12px">DODAJ WSZYSTKIE DO GRUPY</a>';
 
-					$showButtonNextStep = '<button type="button" class="btn btn-primary" onClick="generateBiAuditRaport(event)" id="button-generate-reaport">SZUKAJ POWIĄZAŃ</button>';
+					$showButtonNextStep = '';
 
 					$pagination_form = '<div id="pagination-kontrahenci"></div>';
 
@@ -1645,6 +1645,21 @@ public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
 			<!-- end:bottom buttons -->
 	</div>
 	<!-- start:employees-section -->
+
+	<!-- START:bottom generate reaport-->
+<div class="container-fluid smad-generate-reaport">
+    <div class="row">
+        <div class="container text-center">
+            <button type="button" class="btn btn-default smad-generate-reaport-button" onclick="generateBiAuditRaport(event)" id="button-generate-reaport" >GENERUJ RAPORT POWIĄZAŃ</button>
+        </div>
+        <div class="container smad-generate-reaport-info text-center">
+            <div class="step-title"><span class="bottom--count-selected-item-kontrahenci"></span></div>
+            <div class="step-title"><span class="bottom--count-selected-item-pracownicy"></span></div>
+        </div>
+    </div>
+</div>
+<!-- end:bottom generate reaport -->
+
 			';
 			return $view;
 		}

+ 11 - 6
tools/Bocian.php.view.js

@@ -100,12 +100,11 @@ function loadCurrentOnlyTargetsSelect() {
  * Załadowanie do storage informacji czy zwracać wyniki tylko z obiektami docelowymi
  */
 function updateLocalStorageBiAuditOnlyTargets(idSelect) {
-	console.log('updateLocalStorageBiAuditOnlyTargets zaladowanie');
   $(idSelect).change(function() {
 
       var newValue = $(idSelect).val();
       var responseValue = newValue;
-console.log('updateLocalStorageBiAuditOnlyTargets zaladowanie newValue:', newValue);
+
       setItemLocalStorage('Bocian.biAuditForm.analizaOnlyTargets', responseValue);
 
 			$('#smad-select-target').val(newValue).attr("selected", "selected");
@@ -335,6 +334,7 @@ function generateBiAuditRaport(event) {
 
 						p5UI__notifyAjaxCallback(result);
 						defaultBIAuditLocalStorage();
+						updateTopCounters();
 						window.setTimeout(URL_TABLE_POWIAZANIA, 6000);
 						resolve(result.msg);
 
@@ -788,7 +788,6 @@ function createGroupPracownicy(event) {
 				.then(function(result) {
 
 					if (result.type == 'success') {
-						console.log('grupa prac1: ', result);
 						p5UI__notifyAjaxCallback(result);
 						resolve(result.body);
 					} else {
@@ -818,7 +817,6 @@ 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 );
@@ -1658,8 +1656,15 @@ function updateTopCounters() {
 	console.warn({totalPracownicy: totalPracownicy, totalKontrahenci: totalKontrahenci})
 	$('.top--count-selected-item-pracownicy').text(totalPracownicy ? '('+totalPracownicy+')' : '');
 	$('.top--count-selected-item-kontrahenci').text(totalKontrahenci ? '('+totalKontrahenci+')' : '');
-	$('.top--count-selected-item-pracownicy').attr('title', totalPracownicy ? "Wybrano: " + totalPracownicy + " pracowników" : '');
-	$('.top--count-selected-item-kontrahenci').attr('title', totalKontrahenci ? "Wybrano: " + totalKontrahenci + " kontrahentów" : '');
+	$('.bottom--count-selected-item-pracownicy').text(totalPracownicy ? "Wybrano: (" + totalPracownicy + ") pracownika/ów" : '');
+	$('.bottom--count-selected-item-kontrahenci').text(totalKontrahenci ? "Wybrano: (" + totalKontrahenci + ") kontrahenta/ów" : '');
+
+// disable button generate reaport if not choise 'praconwicy' or 'kontrahenci'
+	if ( totalPracownicy === 0 && totalKontrahenci === 0 ) {
+		$('.smad-generate-reaport-button').addClass('disabled');
+	} else {
+		$('.smad-generate-reaport-button').removeClass('disabled');
+	}
 }
 
 

Некоторые файлы не были показаны из-за большого количества измененных файлов