As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
This article will show how to use the stencil feature in Alfresco Process Services powered by Activiti to implement a tooltip in forms. I'll be using the Tooltip directives from Angular UI Bootstrap component for this implementation.
<script src="../libs/ui-bootstrap-tpls-2.5.0/ui-bootstrap-tpls-2.5.0.min.js"></script>
for (var i = 0, il = res.length; i < il; i++) { load(res[i], resourceLoaderElement, function(){ loadedResources++; if (loadedResources == res.length) { // Let angular resume bootstrap var interval = window.setInterval(function(){ if (angular && typeof angular.bootstrap == 'function') { angular.element(document.body).ready(function() { // Add custom module dependencies if(angularModuleName == "activitiApp"){ angular.module(angularModuleName).requires.push("ui.bootstrap.tooltip"); } // angular, all of our resources & the document body are ready, lets bootstrap the app angular.bootstrap(document.body, [angularModuleName]); }); window.clearInterval(interval); } }, 20); } }); }
<div ng-switch-when="text" class="form-group {{field.className}}" ng-show="field.isVisible" ng-class="{'has-error': field.required && isEmpty(field)}"> <label class="control-label">{{field.name}}</label> <span class="marker" ng-if="field.required">*</span> <input id="{{activitiFieldIdPrefix + field.id}}" type="text" name="{{field.id}}" class="form-control" placeholder="{{field.placeholder}}" ng-model="field.value" ng-change="onFieldValueChange(field)" ng-blur="onFieldBlur(field)" ng-focus="onFieldFocus(field)" uib-tooltip="{{field.params.customProperties.tooltip}}" tooltip-placement="'top'" tooltip-trigger="'focus'" tooltip-enable="true" ng-required="field.required" ng-minlength="field.minLength || ''" ng-maxlength="field.maxLength || ''" maxlength="{{field.maxLength || ''}}" ng-pattern="field.regexPattern || ''" ng-model-options="{ allowInvalid: true }" masked-input="{{field.params.inputMask}}" masked-input-placeholder="{{field.params.inputMaskPlaceholder}}" masked-input-reversed="{{field.params.inputMaskReversed}}"> </div>
Stencil Configuration
Form Designtime
Form Runtime
In APS 1.8, this is broken as the version of angular used (1.3.13) is not compatible with the way ngRoute is invoked. On certain tabs in APS, IDM for example, a browser error around the resource loader is thrown, and an angular description of the error:
DescriptionThis error occurs when a module fails to load due to some exception. The error message above should provide additional context.Using ngRouteIn AngularJS 1.2.0 and later, ngRoute has been moved to its own module. If you are getting this error after upgrading to 1.2.x or later, be sure that you've installed ngRoute.
DescriptionThis error occurs when a module fails to load due to some exception. The error message above should provide additional context.
Using ngRouteIn AngularJS 1.2.0 and later, ngRoute has been moved to its own module. If you are getting this error after upgrading to 1.2.x or later, be sure that you've installed ngRoute.