Skip to content

Commit

Permalink
Add support for 12.0
Browse files Browse the repository at this point in the history
Updating to the build for 12.0 SP0.
  • Loading branch information
cgillis-aras committed Jul 30, 2019
1 parent 453ec29 commit 8a1e006
Show file tree
Hide file tree
Showing 22 changed files with 93 additions and 58 deletions.
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

ConflictsItemWindow.prototype = new DefaultItemWindowView();

// override default size of window, because it's very small
// ovveride default size of window, because it's very small
ConflictsItemWindow.prototype.getWindowProperties = function() {
var topWindow = aras.getMainWindow();
var screenHeight = topWindow.screen.availHeight;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ function(declare) {

if (!cachedForm) {
var formId = itemTypeName + '_' + formMode + (classification ? '_' + classification : '');
var formSrc = this.aras.getScriptsURL() + 'blank.html';

cachedForm = document.createElement('iframe');
cachedForm.setAttribute('id', formId);
cachedForm.setAttribute('src', formSrc);
cachedForm.setAttribute('frameBorder', '0');
cachedForm.setAttribute('width', '100%');
cachedForm.setAttribute('height', '100%');
Expand Down Expand Up @@ -103,7 +101,6 @@ function(declare) {

cachedForm = document.createElement('iframe');
cachedForm.setAttribute('id', formId);
cachedForm.setAttribute('src', this.aras.getScriptsURL() + 'blank.html');
cachedForm.setAttribute('frameBorder', '0');
cachedForm.setAttribute('width', formDisplay.getProperty('width') + 'px');
cachedForm.setAttribute('height', formDisplay.getProperty('height') + 'px');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function(declare, connect, ScaleSlider, Conflicts) {
}
}

// extract all conflict constants, grouped by variables
// extract all conflict contants, grouped by variables
var variableIds = Object.keys(variables);
for (var v = 0; v < variableIds.length; v++) {
var variableId = variableIds[v];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function(declare, connect, TreeGridAdapter, CFGTreeGridContainer, RenderUtils) {
gridStore.setValue(selectedChildItems[i], 'checked', false);
}

// uncheck parent items, if they have no other selected children
// uncheck parent items, if they have no other selected childs
if (parentId) {
var itemsByIdentity = gridStore._itemsByIdentity;
var parentItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ var itemId;
var scopeItem;
var allValues;
var selectedValues;
const cellAnchorsForAvailabilitySubs = new Set();

constantIdsHash = {
addConstantId: function(variableId, namedConstantId, namedConstantName) {
if (!this[namedConstantName]) {
Expand Down Expand Up @@ -66,6 +68,7 @@ reloadView = function(newGenericItemStructure) {

allValues = null;
selectedValues = null;
cellAnchorsForAvailabilitySubs.clear();
updateButtonsAvailability();
} else {
createUIControls();
Expand Down Expand Up @@ -607,29 +610,34 @@ refreshOptionsAvailability = function() {
var selectionCell = gridControl.grid_Experimental.layout.cells[2];
var cellLayout = selectionCell.cellLayoutLists;

if (!cellAnchorsForAvailabilitySubs.has(selectionCell)) {
// timeout is required here because 'widget' object is not loaded yet
setTimeout(function() {
selectionCell.widget.on('change', function(item) {
selectedValues = selectedValues || {};
var selectedVariableId = gridControl.getSelectedId();
selectedValues[selectedVariableId] = constantIdsHash.getConstantId(selectedVariableId, item);
updateButtonsAvailability();
if (!isConstantAvailable(selectedVariableId, item)) {
this.textbox.classList.add('disabledOption');
} else {
this.textbox.classList.remove('disabledOption');
}
});
selectionCell.widget.on('search', function() {
var menuItems = this.dropDown.domNode.getElementsByClassName('dijitMenuItem');
for (var itemIndex = 0, length = menuItems.length; itemIndex < length; itemIndex++) {
var menuItem = menuItems[itemIndex];
if (!isConstantAvailable(gridControl.getSelectedId(), menuItem.innerText)) {
menuItem.classList.add('disabledOption');
setTimeout(function() {
selectionCell.widget.on('change', function(item) {
selectedValues = selectedValues || {};
var selectedVariableId = gridControl.getSelectedId();
selectedValues[selectedVariableId] = constantIdsHash.getConstantId(selectedVariableId, item);
updateButtonsAvailability();
if (!isConstantAvailable(selectedVariableId, item)) {
this.textbox.classList.add('disabledOption');
} else {
this.textbox.classList.remove('disabledOption');
}
}
});
}, 0);
});
selectionCell.widget.on('search', function() {
var menuItems = this.dropDown.domNode.getElementsByClassName('dijitMenuItem');
for (var itemIndex = 0, length = menuItems.length; itemIndex < length; itemIndex++) {
var menuItem = menuItems[itemIndex];
if (!isConstantAvailable(gridControl.getSelectedId(), menuItem.innerText)) {
menuItem.classList.add('disabledOption');
}
}
});
}, 0);

cellAnchorsForAvailabilitySubs.add(selectionCell);
}

for (var i = 0; i < cellLayout.length; i++) {
var gridItem = familyGridData.gridItems[i];
var variableId = gridItem.uniqueId[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ function(declare, domConstruct) {
return window.html2canvas(nodeToConvert);
};
return new Promise(function(resolve) {
require(['../vendors/html2canvas.min.js',
'../vendors/html2canvas.svg.min.js'], function(html2canvas, html2canvasSvg) {
require(['../Modules/aras.innovator.Configurator/Scripts/3rdPartyLibs/html2canvas.min.js',
'../Modules/aras.innovator.Configurator/Scripts/3rdPartyLibs/html2canvas.svg.min.js'], function(html2canvas, html2canvasSvg) {
window.html2canvas = html2canvas;
window.html2canvas.svg = html2canvasSvg;
resolve();
});
}).then(getImageFromNode, getImageFromNode);
} else {
return window.ModulesManager.using(['aras.innovator.Printing/DomToSVG'], true).then(function(domToSVG) {
return window.ModulesManager.using(['aras.innovator.Printing/DomToSVG']).then(function(domToSVG) {
return domToSVG.toSVG(nodeToConvert, imageWidth, imageHeight);
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
window.ModulesManager = {
using: function(classes) {
return new Promise(function(resolve) {
require(classes, function(module) {
resolve(module);
});
});
},
define: function(classes, classFullName, callback) {
define(classFullName, classes, callback);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@section style
{
<style type="text/css">
@@import "@Url.ContentWithSalt("~/javascript/include.aspx?classes=variantsTree.css")";
@@import "@Url.ContentWithSalt("~/javascript/include.aspx?classes=common.min.css,variantsTree.css")";
@@import "@Url.ContentWithSalt("~/Modules/aras.innovator.Configurator/Styles/conflicts.css")";
#top {
display: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
text-align: center;
}
</style>
<script type="text/javascript" src="@Url.ContentWithSalt("~/javascript/include.aspx?classes=ArasModules,XmlDocument")"></script>
<script type="text/javascript" src="@Url.ContentWithSalt("~/javascript/include.aspx?classes=/dojo.js")" data-dojo-config="isDebug: false, parseOnLoad: false, baseUrl:'@Url.ContentWithSalt("~/javascript/dojo")'"></script>
<script type="text/javascript" src="@Url.ContentWithSalt("~/javascript/include.aspx?classes=XmlDocument")"></script>
<script type="text/javascript" src="@Url.ContentWithSalt("~/Modules/aras.innovator.Configurator/Scripts/RuleEditor/RuleEditorTabViewController.js")"></script>
</head>
<body class="claro ruleEditor">
Expand All @@ -108,15 +108,13 @@
<div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center', splitter:true, gutters:false" id="ruleEditorContainer" style="height:60%; width:70%;">
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'" id="ruleEditorToolbar" style="height:30px;"></div>
<div id="xmlExpressionContainer">
<iframe src="@Url.ContentWithSalt("~/scripts/blank.html")" frameborder="0"></iframe>
<iframe frameborder="0"></iframe>
</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" id="ruleEditorControl"></div>
<div id="editorMessageContainer"></div>
</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'right', splitter:true" id="ruleHelpersContainer" style="width:30%;">
<div id="tabs-container" class="aras-tabs aras-flex-grow">
<div></div>
</div>
<aras-tabs movable id="tabs-container" class="aras-flex-grow"></aras-tabs>
</div>
</div>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
text-align: center;
}
</style>
<script type="text/javascript" src="@Url.ContentWithSalt("~/javascript/include.aspx?classes=ArasModules,XmlDocument")"></script>
<script type="text/javascript" src="@Url.ContentWithSalt("~/javascript/include.aspx?classes=/dojo.js")" data-dojo-config="isDebug: false, parseOnLoad: false, baseUrl:'@Url.ContentWithSalt("~/javascript/dojo")'"></script>
<script type="text/javascript" src="@Url.ContentWithSalt("~/javascript/include.aspx?classes=XmlDocument")"></script>
<script type="text/javascript" src="@Url.ContentWithSalt("~/Modules/aras.innovator.Configurator/Scripts/Usages/UsagesTabViewController.js")"></script>
</head>
<body class="claro ruleEditor">
Expand All @@ -108,15 +108,13 @@
<div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center', splitter:true, gutters:false" id="ruleEditorContainer" style="height:60%; width:70%;">
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'" id="ruleEditorToolbar" style="height:30px;"></div>
<div id="xmlExpressionContainer">
<iframe src="@Url.ContentWithSalt("~/scripts/blank.html")" frameborder="0"></iframe>
<iframe frameborder="0"></iframe>
</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" id="ruleEditorControl"></div>
<div id="editorMessageContainer"></div>
</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'right', splitter:true" id="usageHelpersContainer" style="width:350px;">
<div id="tabs-container" class="aras-tabs aras-flex-grow">
<div></div>
</div>
<aras-tabs id="tabs-container" class="aras-flex-grow"></aras-tabs>
</div>
</div>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@
var relationshipsGrid = relationships.iframesCollection[relationships.currTabID].contentWindow.relationshipsGrid;
connect.connect(relationshipsGrid, 'updateControls', refreshViewTabsAvailability);
// at this point, iframes from UrlViewers already attached to document and shortcuts can be blocked
// at this point, iframes from UrlViewers allready attached to document and shortcuts can be blocked
returnBlockerHelper.blockInChildFrames(window, true);
viewsController.controls.tabViewContol = tabViewContol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Item type="CommandBarSection" id="F9B41F52101A6B3F3647267F1AC77491" action="add">
<classification>Data Model</classification>
<label xml:lang="en">Cs Sample Sidebar</label>
<location_name>ItemWindowSidebar</location_name>
<location keyed_name="ItemWindowSidebar" type="cui_Location">BC1CFDCECA434111B7A88A51EE430CC5</location>
<name>cs_sample_sidebar</name>
<Relationships>
<Item type="CommandBarSectionItem" id="BFF4800814592013C3B996CA43837D02" action="add">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<method_code><![CDATA[return ModulesManager.using(
['aras.innovator.Configurator/ConflictsItemWindow',
'aras.innovator.core.ItemWindow/DefaultItemWindowCreator'
]).then(function(View, Creator) {
], function(View, Creator) {
if (!inArgs) {
inArgs = {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<execution_allowed_to keyed_name="World" type="Identity">A73B655731924CD0B027E4F4D5FCC0A9</execution_allowed_to>
<method_code><![CDATA[return ModulesManager.using(
['aras.innovator.core.ItemWindow/CsSampleItemWindowView',
'aras.innovator.core.ItemWindow/DefaultItemWindowCreator']).then(function(View, Creator) {
'aras.innovator.core.ItemWindow/DefaultItemWindowCreator'], function(View, Creator) {
var view = new View(inDom, inArgs);
var creator = new Creator(view);
return creator.ShowView();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ BaseTreeGrid.prototype = {
if(this.controlGridMenuClickHandler){
this.controlGridMenuClickHandler(menuChoice);
}
//will be overridden in controlGridMenuInit;
//will be overrided in controlGridMenuInit;
},
controlGridKeyPress: function(key) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<is_list_type>0</is_list_type>
<is_released>0</is_released>
<keyed_name>cs_GenericItem FamilyTree</keyed_name>
<label xml:lang="en">Family Structure</label>
<label xml:lang="en">Family Stucture</label>
<new_show_related>0</new_show_related>
<new_version>1</new_version>
<not_lockable>0</not_lockable>
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

*This project may also be called the Configuration Services Sample Application.*

Aras Configurator Services has been developed to make Variant Management easier for customers by providing APIs that enable developers to create custom variant management applications. This sample application is designed to show developers how they can use the Configurator Services API to create custom applications. For more information on the Configurator Services API, check out the [Configurator Services Programmers Guide](./Documentation/Aras%20Innovator%2011.0%20-%20Configurator%20Services%20Programmers%20Guide.pdf)
Aras Configurator Services has been developed to make Variant Management easier for customers by providing APIs that enable developers to create custom variant management applications. This sample application is designed to show developers how they can use the Configurator Services API to create custom applications. For more information on the Configurator Services API, check out the [Configurator Services Programmers Guide](./Documentation/Aras%20Innovator%2012.0%20-%20Configurator%20Services%20Programmers%20Guide.pdf)

This sample application is an Aras Community Project. It is not a standard product, and should not be deployed to production as-is. The purpose of the sample application is to demonstrate the Configurator Services API capabilities so that custom applications can be built to address specific business requirements and processes.

Expand All @@ -12,6 +12,7 @@ Sample data is provided along with the sample application. Loading the sample da

Release | Notes
--------|--------
[12.0.0.1](https://github.com/ArasLabs/vm-sample-application/releases/tag/12.0.0.1) | Updated to support Aras 12.0 SP0.
[11.0.15.1](https://github.com/ArasLabs/vm-sample-application/releases/tag/11.0.15.1) | Updated to support Aras 11.0 SP15.
[11.0.14.1](https://github.com/ArasLabs/vm-sample-application/releases/tag/11.0.14.1) | Updated to support Aras 11.0 SP14.
[11.0.12.1](https://github.com/ArasLabs/vm-sample-application/releases/tag/11.0.12.1) | First release.
Expand All @@ -20,6 +21,7 @@ Release | Notes

Project | Aras
--------|------
[12.0.0.1](https://github.com/ArasLabs/vm-sample-application/releases/tag/12.0.0.1) | 12.0 SP0
[11.0.15.1](https://github.com/ArasLabs/vm-sample-application/releases/tag/11.0.15.1) | 11.0 SP15
[11.0.14.1](https://github.com/ArasLabs/vm-sample-application/releases/tag/11.0.14.1) | 11.0 SP14
[11.0.12.1](https://github.com/ArasLabs/vm-sample-application/releases/tag/11.0.12.1) | 11.0 SP12
Expand All @@ -31,8 +33,8 @@ Project | Aras

### Pre-requisites

1. Aras Innovator installed (version 11.0 SP15)
2. [Aras Update](http://www.aras.com/support/downloads/) installed (version 1.5+)
1. Aras Innovator installed (version 12.0 SP0)
2. [Aras Update](http://www.aras.com/support/downloads/) installed (version 1.6+)
3. Variant Management Sample Application package

### Install Steps
Expand All @@ -50,7 +52,7 @@ Project | Aras
6. Choose **Detailed Logging** and click **Next**.
7. Enter the required parameters for the target Aras Innovator instance. Which parameters are required varies based on which components you have selected to install.
* When selecting the install path for your Innovator instance, be sure to select the Innovator subfolder.
* Example: If your Innovator instance is installed in `C:\Program Files (x86)\Aras\11SP15`, select `C:\Program Files (x86)\Aras\11SP15\Innovator`.
* Example: If your Innovator instance is installed in `C:\Program Files (x86)\Aras\120SP0`, select `C:\Program Files (x86)\Aras\120SP0\Innovator`.
8. Click **Install** to begin installing the package.
9. When the package finishes installing, close Aras Update.

Expand Down
Binary file added SampleData/sample_data.xlsx
Binary file not shown.
Loading

0 comments on commit 8a1e006

Please sign in to comment.