UNPKG

ent-portlet

Version:

Componente responsável pelo encapsulamento e gestão de portlets

1 lines 1.21 kB
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();!function(e,t,r){var n=function(){function e(r){_classCallCheck(this,e),this._selector=r,this._portlet=t().one(r)}return _createClass(e,[{key:"getPortletId",value:function(){return r.Util.getPortletId(this._portlet.get("id"))}},{key:"getFieldId",value:function(e){return"#_"+this.getPortletId()+"_"+e}},{key:"getFieldName",value:function(e){return"_"+this.getPortletId()+"_"+e}},{key:"refresh",value:function(e){r.Portlet.refresh(this._selector,e)}},{key:"onRefreshed",value:function(e){r.on(this.getPortletId()+":portletRefreshed",e)}},{key:"createResourceUrl",value:function(e){var t=r.PortletURL.createResourceURL();return t.setPortletId(this.getPortletId()),t.setResourceId(e),t.toString()}}]),e}();e.add("ent-portlet",function(e){e.Portlet=n},"1.0.1",{requires:["liferay-portlet-url"]})}(window.YUI,window.AUI,window.Liferay);