Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

StyleSheets for the Servoy Smart and Web Client could make use of Servoy specific type selectors. In the NGClient, where the stylesheets are interpreted by the browser, these Servoy specific type selectors are not available. Below a conversion table from the Servoy specific type selectors to their NGClient equivalent. 

Smart/Web Client Type SelectorNGClient Selector

body

.svy-body
button.svy-button
calendar.svy-calendar
check.svy-check
checkgroup.svy-checkgroup
htmlarea.svy-htmlarea
htmlview.svy-htmlview
imagemedia.svy-mediafield
combobox.svy-combobox
even.ui-grid-row:nth-child(even) .ui-grid-cell
field.svy-field
footer.svy-footer
form.svy-form
header.svy-header
label.svy-label
listbox.svy-listbox
odd.ui-grid-row:nth-child(odd) .ui-grid-cell
password.svy-password
portal.svy-portal
radio.svy-radio
radiogroup.svy-radiogroup
slider.svy-slider
spinner.svy-spinner
splitpane.svy-splitpane
tablesspanel.svy-tablesspanel
tabpanel.svy-tabpanel
textarea.svy-textarea
textfield.svy-textfield
typeahead.svy-typeahead
selected

.ui-grid-row-selected div.ui-grid-cell

(you have to use !important to override selected background color)

grid_header

.ui-grid-header-cell

grid_viewport

.ui-grid-header-viewport

title_header.svy-titleheader
title_footerN/A

Also NGClient will output special classes for default components that can be used from solution css to easily style all components of same time. The name of the class is svy-componentName (so svy-label, svy-button, svy-calendar, svy-textfield...). Also, in NGClient we added two new classes: svy-layoutcontainer (for responsive layout containers) and svy-wrapper for wrapper div of the component (used in absolute layout).

...

Tabpanel is based on Bootstrap nav-tabs. To target the tabs, the following classes are available:

SelectorTarget
.nav-tabsThe tabs container
.nav-tabs > li

All the tabs of all tabpanels

.nav-tabs > li.disabledDisabled tabs
.nav-tabs > li.activeThe currently active tab

2. Changes from previous version

...

The message is defined by key servoy.ngclient.reconnecting:

KeyDefault translation
servoy.ngclient.reconnecting 

Disconnected from server, Reconnecting....

Since Servoy 8.3.1 we added another class, svy-reconnecting-overlay, which is used to define the css transition. The transition also has a delay (default) half a second in order to avoid this message showing when there is a network hiccup. The delay can be changed from solution css:

...

By default NGClient will set the wait mouse cursor on the body and all its elements when a request to the server is done. This is done through the service: $sabloLoadingIndicator which can also be used by 3th party services (plugins) that want to set there own wait cursor. The service has 2 functions:1> showLoadingtakes a while. Starting with Servoy 2019.03 it will also show a default loading animation (bottom of page).

The default loading animation can be customized directly from the solution's .css (or .less) file. It is made up of a parent div (with class "loading-i-holder") and 5 child divs (with class "lii-shape" on all of them and then each with it's own class from "lii-1" up to "lii-5"). You can change colors, position, animation and whatever is supported by CSS. For example if you want to make the shapes blue instead of orange you just add this to the solution style sheet:

Code Block
languagecss
titlechanging default loading indicator color(s)
.lii-shape {
    background-color: blue;
}

If you want for example the animation to not be shown at all you could for example add this to solution .css:

Code Block
languagecss
titlechanging default loading indicator color(s)
.loading-i-holder {
    display: none;
}

The loading indicator is implemented through $sabloLoadingIndicator angular service - which also allows 3rd party ng service packages (that want to set their own 'loading' UI) to override default behavior. The $sabloLoadingIndicator service can also be called (as/if needed) by 3rd party ng service or component packages that know that a special operation can take a while to execute.

The $sabloLoadingIndicator service provides two functions:

  • showLoading(): Call this when the loading indicator should show.

...

  • hideLoading(): Call this when the loading indicator should be hidden.

A call too to showLoading() should always be in sync followed at some point with a call to hideLoading() - else the internal state will be wrong.

If you want to control what should be done when show/hide is called , so showing - so you want to show your own kind of loading (maybe a div) - then you can add your own angular/ng service with the name "loadingIndicator". This service should have those 2 functions, ; don't use this service directly to set or hide the indicator, always use the $sabloLoadingIndicator which will delegate to your "loadingIndicator".

Code Block
languagejs
titleCustom Loading Indicator
yourmodule.factory("loadingIndicator",function($window) 
{
	return {
		showLoading: function() {
			$($window.document.body).css({"cursor":"wait"});
		},
		hideLoading: function() {
			$($window.document.body).css({"cursor":"auto"});
		},
	}
})

...