Skip to Content

Extending sap.ui.core.Icon

/wp-content/uploads/2014/04/screenshot_426180.png

CSS and Javascript are in github. Once again, this illustrates the power of OpenUI5 where we are created control with a few lines of code.

Here is an example of how they are created.


jQuery(function() {
  jQuery.sap.registerModulePath('sap.dennisseah', 'https://rawgithub.com/dennisseah/openui5/master/controls/sap/dennisseah');
  jQuery.sap.require('sap.dennisseah.IconNumIndicator');
  var ctrl = new sap.m.HBox({
    width: '500px',
    items: [
      new sap.dennisseah.IconNumIndicator({
        src: 'sap-icon://email',
        value: 10
      }),
      new sap.dennisseah.IconNumIndicator({
        src: 'sap-icon://task'
      }),
      new sap.dennisseah.IconNumIndicator({
        src: 'sap-icon://inbox',
        value: 15
      }),
      new sap.dennisseah.IconNumIndicator({
        src: 'sap-icon://action',
        value: 2
      }),
      new sap.dennisseah.IconNumIndicator({
        src: 'sap-icon://marketing-campaign',
        value: 4
      })
    ]
  });
  ctrl.placeAt('content');
});

-D

7 Comments
You must be Logged on to comment or reply to a post.