Skip to content

Commit

Permalink
Merge updates for v2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
EliJDonahue committed May 31, 2018
2 parents ab78f95 + e68a00e commit f18c19a
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 13 deletions.
15 changes: 15 additions & 0 deletions Import/CustomModalDialog/Import/Action/labs_OpenMaxModalDialog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<AML>
<Item type="Action" id="0807F3255CFD45C092B8CA16D69897E6" action="add">
<item_query />
<label xml:lang="en">Open Maximizable Modal Dialog</label>
<location>client</location>
<method keyed_name="labs_CallMaxModalDialog" type="Method">
<Item type="Method" action="get" select="id">
<name>labs_CallMaxModalDialog</name>
</Item>
</method>
<target>none</target>
<type>item</type>
<name>labs_OpenMaxModalDialog</name>
</Item>
</AML>
11 changes: 8 additions & 3 deletions Import/CustomModalDialog/Import/Fixes/AddActionToItemTypes.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<AML>
<Item type="Item Action" action="add" id="A3CB23B870D44D31A3BA9CF5C034DCC6">
<related_id keyed_name="labs_OpenCustomModalDialog" type="Action">A4CDEF0ABB314323BDE27F782C0DDA1C</related_id>
<source_id keyed_name="Part" type="ItemType" name="Part">4F1AC04A2B484F3ABA4E20DB63808A88</source_id>
</Item>
<related_id keyed_name="labs_OpenCustomModalDialog" type="Action">A4CDEF0ABB314323BDE27F782C0DDA1C</related_id>
<source_id keyed_name="Part" type="ItemType" name="Part">4F1AC04A2B484F3ABA4E20DB63808A88</source_id>
</Item>
<Item type="Item Action" action="add" id="82481AFB9AE84F23AA59C09B512ECA8A">
<related_id keyed_name="labs_OpenMaxModalDialog" type="Action">0807F3255CFD45C092B8CA16D69897E6</related_id>
<source_id keyed_name="Part" type="ItemType" name="Part">4F1AC04A2B484F3ABA4E20DB63808A88</source_id>
</Item>
</
</AML>
46 changes: 46 additions & 0 deletions Import/CustomModalDialog/Import/Method/labs_CallMaxModalDialog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<AML>
<Item type="Method" id="6AF7D8756C8C40BEB509F97E88DEAAD9" action="add">
<execution_allowed_to keyed_name="World" type="Identity">A73B655731924CD0B027E4F4D5FCC0A9</execution_allowed_to>
<method_code><![CDATA[// Aras Labs Project
// Eli Donahue - 5/31/18
//
// Based on labs_CallCustomModalDialog
// Call a custom form in a maximizable modal dialog
// Perform some action based on the values returned from dialog
var topWnd = aras.getMostTopWindowWithAras(window);
topWnd = topWnd.main || topWnd;
// get form
var formName = "labs_CustomModalDialogForm";
var fetchForm = this.getInnovator().newItem("Form","get");
fetchForm.setProperty("name",formName);
fetchForm = fetchForm.apply("get");
// check form for error
if (fetchForm.isError())
return alert("Can't find a form called " + formName);
// get form params
var params = {
title: 'Test Dialog Parameter Passing',
formId: fetchForm.getID(), // put your form's id here
aras: aras,
dialogWidth: 800, // set width int
dialogHeight: 400, // set height int
content: 'ShowFormAsADialog.html'
};
var callback = function(res) {
//Perform logic using dialog result here
return alert("Param 1: " + res["param1"] + " ... Param 2: " + res["param2"] + " ... Param 3: " + res["searchResult"]);
}
// call form in dialog
topWnd.ArasModules.MaximazableDialog.show("iframe", params).promise.then(callback);
return null;]]></method_code>
<method_type>JavaScript</method_type>
<name>labs_CallMaxModalDialog</name>
</Item>
</AML>
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ This project and the following release notes have been migrated from the old Ara

Release | Notes
--------|--------
[v2.2](https://github.com/ArasLabs/custom-model-dialog/releases/tag/v2.2) | Added field to demonstrate use of search dialog. Clicking the "Search Parameter 3" button programmatically calls the default Aras search dialog. Allows the user to search for a Part and populate the "Parameter 3" field with their selection.
[v2.1](https://github.com/ArasLabs/custom-model-dialog/releases/tag/v2.1) | Removed item_info from dialog form
[v2.0](https://github.com/ArasLabs/custom-model-dialog/releases/tag/v2.0) | Updated to work with the Aras 11.0 SP9+ tabbed client.
[v1.0](https://github.com/ArasLabs/custom-model-dialog/releases/tag/v1.0) | First release. Though built and tested using Aras 11.0 SP7, this project may function in older releases of Aras 11.0 and Aras 10.0.
[v2.3](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v2.3) | Added a new action/method to demonstrate how to call a dialog that can be maximized. Tested in 11 SP12, but may work in 11 SP9-11.
[v2.2](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v2.2) | Added field to demonstrate use of search dialog. Clicking the "Search Parameter 3" button programmatically calls the default Aras search dialog. Allows the user to search for a Part and populate the "Parameter 3" field with their selection.
[v2.1](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v2.1) | Removed item_info from dialog form
[v2.0](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v2.0) | Updated to work with the Aras 11.0 SP9+ tabbed client.
[v1.0](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v1.0) | First release. Though built and tested using Aras 11.0 SP7, this project may function in older releases of Aras 11.0 and Aras 10.0.

#### Supported Aras Versions

Project | Aras
--------|------
[v2.2](https://github.com/ArasLabs/custom-model-dialog/releases/tag/v2.2) | 11.0 SP9
[v2.1](https://github.com/ArasLabs/custom-model-dialog/releases/tag/v2.1) | 11.0 SP9
[v2.0](https://github.com/ArasLabs/custom-model-dialog/releases/tag/v2.0) | 11.0 SP9
[v1.0](https://github.com/ArasLabs/custom-model-dialog/releases/tag/v1.0) | 11.0 SP7
[v2.3](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v2.3) | 11.0 SP12
[v2.2](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v2.2) | 11.0 SP9, 11.0 SP12
[v2.1](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v2.1) | 11.0 SP9
[v2.0](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v2.0) | 11.0 SP9
[v1.0](https://github.com/ArasLabs/custom-modal-dialog/releases/tag/v1.0) | 11.0 SP7

## Installation

Expand Down Expand Up @@ -51,7 +53,9 @@ You are now ready to login to Aras and try out a custom modal dialog.

## Usage

![Custom model dialog](./Screenshots/dialog.png)
### Sample 1: Aras Modal Dialog

![Custom modal dialog](./Screenshots/dialog.png)

1. Login to Aras.
2. Navigate to **Design > Parts** in the table of contents (TOC).
Expand All @@ -61,10 +65,21 @@ You are now ready to login to Aras and try out a custom modal dialog.
* Optional: Click the **Search Parameter 3** button and choose a Part item for the Parameter 3 field.
5. Click **Submit**.

![Custom model dialog](./Screenshots/result.png)
![Custom modal dialog](./Screenshots/result.png)

The modal dialog will close and an alert will appear, showing the values of param1, param2, and param3 that were returned by the modal dialog.

### Sample 2: Aras Maximizable Modal Dialog

![Custom modal dialog](./Screenshots/max-dialog.gif)

1. Login to Aras.
2. Navigate to **Design > Parts** in the table of contents (TOC).
3. Right click on a Part item in the main grid and select **Open Maximizable Modal Dialog**.
4. To maximize the modal dialog, click the square icon in the top right corner of the dialog. Click it again to return the dialog to its original size.

This sample uses the same form and logic as the first sample, so everything other than the resizing behavior is the same. The only difference is that the method `labs_CallMaxModalDialog` calls `topWnd.ArasModules.MaximazableDialog.show()` instead of the usual `topWnd.ArasModules.Dialog.show()`.

## Contributing

1. Fork it!
Expand Down
Binary file added Screenshots/max-dialog.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f18c19a

Please sign in to comment.