Versions Compared

Key

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

...

Code Block
.settingsBackground
{
 background-image: url("settings.png");
 background-repeat: no-repeat;
 background-position: center;
 background-size: 16px;
}

 

Loading indicator 

By default NGClient will set the wait 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> showLoading(): Call this when the loading indicator should show.

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

A call too showLoading() should always be in sync 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 your own kind of loading (maybe a div) then you can add your own 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.

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"});
		},
	}
})