This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/Office.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div> | |
This is a test add-in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
root <%= @application[:absolute_document_root] %>; | |
index index.html index.htm index.php; | |
try_files $uri$args $uri$args/ /index.html; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asset.renderer = function (ctx){ | |
return { | |
pageDecorators: { | |
navigationBar: function(page) { | |
return require('/extensions/app/mycustom-store/modules/decorators.js').api.navigationBar(ctx, page, this); | |
} | |
} | |
}; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var api; | |
(function(api) { | |
var storeConstants = require('store').storeConstants; | |
var tenantApi = require('/modules/tenant-api.js').api; | |
var permissionsAPI = require('rxt').permissions; | |
var log = new Log('decorators'); | |
api.navigationBar = function(ctx, page, utils) { | |
var app = require('rxt').app; | |
//Change the context to support cross tenant views | |
var tenantAppResources = tenantApi.createTenantAwareAppResources(ctx.session); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pageDecorators.navigationBar = function(ctx, page, utils) { | |
var app = require('rxt').app; | |
//Change the context to support cross tenant views | |
var tenantAppResources = tenantApi.createTenantAwareAppResources(ctx.session); | |
//Support for cross tenant views | |
ctx = tenantAppResources.context; | |
var rxtManager = ctx.rxtManager; | |
//Obtain all of the available rxt types | |
var availableTypes = app.getUIActivatedAssets(ctx.tenantId); | |
var types = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.renderer = function(ctx) { | |
var decoratorApi = require('/modules/page-decorators.js').pageDecorators; | |
return { | |
pageDecorators: { | |
navigationBar: function(page) { | |
return require('/extensions/app/mycustom-store/modules/decorators.js').api.navigationBar(ctx, page, this); ///decoratorApi.navigationBar(ctx, page, this); | |
}, | |
searchBar: function(page) { | |
return decoratorApi.searchBar(ctx, page, this); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jsonFormatter: function (page) { | |
if (page.meta.pageName === 'details') { | |
var contacts = page.assets.attributes.contacts_entry; | |
if (contacts) { | |
var contacts_entry = []; | |
if (contacts.constructor === Array) { | |
for (var index in contacts) { | |
var contact = contacts[index].split(':'); | |
var contact_entry = {}; | |
contact_entry.name = contact[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Following is to remove the edit button in the detail page since for asset types | |
// wsdl, wadl, swagger, policy, schema, the edit operations are not allowed | |
for(var index = 0; index < page.leftNav.length; index++) { | |
var button = page.leftNav[index]; | |
if(button.iconClass === "btn-edit") { | |
page.leftNav.splice(index, 1); | |
index--; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Following is to remove the edit button in the detail page since for asset types | |
// wsdl, wadl, swagger, policy, schema, the edit operations are not allowed | |
for(var index = 0; index < page.leftNav.length; index++) { | |
var button = page.leftNav[index]; | |
// if(button.iconClass === "btn-edit") { | |
// page.leftNav.splice(index, 1); | |
// index--; | |
// } |
NewerOlder