PK
@fP4 4 Entrance4Std.ftl
PK
@fP{8 Entrance4Std.jsvar Entrance4Std = StudioWidgetWrapper.extend(
{
/*
* Triggered when initializing a widget and will have the code that invokes rendering of the widget
* setParentContainer(JQueryParentContainerDOM) - binds event to this container
* setItemContainer(JQueryItemContainerDOM) - binds studio item events for respective item containers
* bindEvents() - binds the studio event to this widget
*/
init: function () {
var thisObj = this;
thisObj._super.apply(thisObj, arguments);
thisObj.render();
if ((typeof (Studio) != "undefined") && Studio) {
Studio.registerEvents(thisObj, "goToPageX", "goToPageX", []);
}
thisObj.toPage();
},
/*
* Triggered from init method and is used to render the widget
*/
render: function () {
var thisObj = this;
var widgetProperties = thisObj.getProperties();
var elem = thisObj.getContainer();
var items = thisObj.getItems();
var connectorProperties = thisObj.getConnectorProperties();
/*
* API to get base path of your uploaded widget API file
*/
var widgetBasePath = thisObj.getWidgetBasePath();
if (elem) {
var containerDiv = $(".scfClientRenderedContainer", elem);
if (containerDiv.length) {
$(containerDiv).empty();
}
else {
containerDiv = document.createElement('div');
containerDiv.className = "scfClientRenderedContainer";
$(elem).append(containerDiv);
}
}
/*
* API to bind global events to the item DOM :
* thisObj.sksBindItemEvent();
*
* API to bind item events to the item DOM :
* thisObj.sksBindItemEvent(JQueryItemContainerSelector, ItemIdx);
* JQueryItemContainerSelector - A JQuery selector that returns an array of DOMs that represents the individual item inside the item container, to which the hotspot needs to be bound.
* ItemIdx (Optional) - To bind the item events to a specific item.
*/
thisObj.sksBindItemEvent();
/*
* API to refresh the previously bound events when a resize or orientation change occurs.
* thisObj.sksRefreshEvents(ItemIdx);
* ItemIdx (Optional) - To refresh events for a specific item. Default value is 0.
*/
$(window).resize(function () {
thisObj.sksRefreshEvents();
});
},
toPage: function () {
var thisObj = this;
$.ajax({
url: '/u-route/baas/sys/v1.0/verify',
type: 'get',
success: function (res) {
thisObj.triggerEvent("goToPageX");
},
error: function (err) {
console.log(err);
if (err.status == 401) {
location.reload();
}
}
})
}
});PK
@fP"Ϋ packageinfo.json{
"widgetApi": [
{
"name": "Entrance4Std"
}
],
"widgetDescription": "",
"authorName": "wotu2019",
"localFileBasePath": ""
}PK
@fP5' ' Entrance4Std.cssdiv[widgetType = Entrance4Std]
{
}
PK
@fP8
Entrance4Std.editor.jsEntrance4Std = Entrance4Std.extend({
/*
* Config to define Widget Properties
*/
propertiesConfig: [{
config: [
]
}],
/*
* Triggered when the user Creates a new widget and used to initialize the widget properties
*/
create: function (cbk) {
if (cbk) {
this._super();
cbk();
}
}
});
var params = {};
params.hasMultipleItems = false;
params.hasAreaSpecificEvents = false;
Studio.registerWidget("Entrance4Std", "", params);PK
@fP4 4 Entrance4Std.ftlPK
@fP{8 b Entrance4Std.jsPK
@fP"Ϋ s
packageinfo.jsonPK
@fP5' ' L Entrance4Std.cssPK
@fP8
Entrance4Std.editor.jsPK ;