Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customization toolbar and menu #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Imports/TGV_Sample/Import/CommandBarItem/rb_CustomButton.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<AML>
<Item type="CommandBarButton" id="2D026309286640FFB9B227F48F2F1FF3" action="add">
<image>../Images/Waiver.svg</image>
<include_events>SelectInGrid</include_events>
<on_click_handler keyed_name="rb_CustomButtonHandler" type="Method">57C18A0B2EF6470587D6DF8166CCF4F9</on_click_handler>
<name>rb_CustomButton</name>
</Item>
</AML>
6 changes: 6 additions & 0 deletions Imports/TGV_Sample/Import/CommandBarItem/rb_CustomMenu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<AML>
<Item type="CommandBarMenu" id="2872D43D48D043869DE0C3E28B3BCC4F" action="add">
<label xml:lang="en">CustomMenu</label>
<name>rb_CustomMenu</name>
</Item>
</AML>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<AML>
<Item type="CommandBarMenuButton" id="AD2F456C45044E27BEE32A0B31F222D5" action="add">
<include_events>SelectInToc</include_events>
<label xml:lang="en">CustomMenuButton - Open Package Element for View</label>
<on_click_handler keyed_name="rb_CustomMenuButtonHandler" type="Method">C9FFF0C6A35B40458E9ED4689139C56A</on_click_handler>
<parent_menu keyed_name="rb_CustomMenu" type="CommandBarMenu">2872D43D48D043869DE0C3E28B3BCC4F</parent_menu>
<name>rb_CustomMenuButton</name>
</Item>
</AML>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<AML>
<Item type="CommandBarSeparator" id="154D19A9EF7942F18F5380BD6DE92E62" action="add">
<name>rb_Separator_CustomToolbar</name>
</Item>
</AML>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<AML>
<Item type="CommandBarSection" id="08F023D47559406AAFE28352ECABC443" action="add">
<classification>Data Model</classification>
<label xml:lang="en">Package Structure TGV Context Menu</label>
<location keyed_name="TGV_ContextMenu" type="cui_Location">74A9BC1F2EB94331986E0642834369FA</location>
<name>com.aras.innovator.tgv.viewer.package_structure.context_menu</name>
<Relationships>
<Item type="CommandBarSectionItem" id="53B4F33DB477499C9697F19DCFA9D6B4" action="add">
<action>Add</action>
<related_id keyed_name="rb_CustomMenuButton" type="CommandBarItem">AD2F456C45044E27BEE32A0B31F222D5</related_id>
<role keyed_name="World" type="Identity">A73B655731924CD0B027E4F4D5FCC0A9</role>
<sort_order>128</sort_order>
<source_id keyed_name="com.aras.innovator.tgv.viewer.package_structure.context_menu" type="CommandBarSection">08F023D47559406AAFE28352ECABC443</source_id>
</Item>
<Item type="CommandBarSectionItem" id="E8F91C20E0454515AE9904FE1EECDD0A" action="add">
<action>Add</action>
<related_id keyed_name="rb_CustomMenu" type="CommandBarItem">2872D43D48D043869DE0C3E28B3BCC4F</related_id>
<role keyed_name="World" type="Identity">A73B655731924CD0B027E4F4D5FCC0A9</role>
<sort_order>256</sort_order>
<source_id keyed_name="com.aras.innovator.tgv.viewer.package_structure.context_menu" type="CommandBarSection">08F023D47559406AAFE28352ECABC443</source_id>
</Item>
</Relationships>
</Item>
</AML>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<AML>
<Item type="CommandBarSection" id="0E811C3E9F6D40809E088719B7627CF7" action="add">
<classification>Data Model</classification>
<label xml:lang="en">Package Structure TGV Toolbar</label>
<location keyed_name="TGV_Toolbar" type="cui_Location">5D6FD242D261409E8141F3ED06807868</location>
<name>com.aras.innovator.tgv.viewer.package_structure.toolbar</name>
<Relationships>
<Item type="CommandBarSectionItem" id="4FF286C68D294C93B77F782C425B986C" action="add">
<action>Add</action>
<related_id keyed_name="rb_Separator_CustomToolbar" type="CommandBarItem">154D19A9EF7942F18F5380BD6DE92E62</related_id>
<role keyed_name="World" type="Identity">A73B655731924CD0B027E4F4D5FCC0A9</role>
<sort_order>128</sort_order>
<source_id keyed_name="com.aras.innovator.tgv.viewer.package_structure.toolbar" type="CommandBarSection">0E811C3E9F6D40809E088719B7627CF7</source_id>
</Item>
<Item type="CommandBarSectionItem" id="F1C3AFD087AA4167A1432ABF8809F424" action="add">
<action>Add</action>
<related_id keyed_name="rb_CustomButton" type="CommandBarItem">2D026309286640FFB9B227F48F2F1FF3</related_id>
<role keyed_name="World" type="Identity">A73B655731924CD0B027E4F4D5FCC0A9</role>
<sort_order>256</sort_order>
<source_id keyed_name="com.aras.innovator.tgv.viewer.package_structure.toolbar" type="CommandBarSection">0E811C3E9F6D40809E088719B7627CF7</source_id>
</Item>
</Relationships>
</Item>
</AML>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<AML>
<Item type="ItemPresentationConfiguration" id="EB3E6259CC734EBA8E5AEF8BEC705281" action="add">
<client_type>js</client_type>
<item_id keyed_name="Package Structure" type="PresentableItems">643BBFE7BAD046AE8B393BC54920CD88</item_id>
<item_type_id keyed_name="rb_TreeGridViewDefinition" type="ItemType" name="rb_TreeGridViewDefinition">6AFE8A9127ED48FFB2F9183B9922981B</item_type_id>
<presentation_config_id keyed_name="Package Structure" type="PresentationConfiguration">585A82F59CB34D2BBFF3F3A556D7A65E</presentation_config_id>
</Item>
</AML>
8 changes: 8 additions & 0 deletions Imports/TGV_Sample/Import/Method/rb_CustomButtonHandler.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<AML>
<Item type="Method" id="57C18A0B2EF6470587D6DF8166CCF4F9" action="add">
<execution_allowed_to keyed_name="Administrators" type="Identity">2618D6F5A90949BAA7E920D1B04C7EE1</execution_allowed_to>
<method_code><![CDATA[aras.AlertSuccess("Called from custom toolbar button");]]></method_code>
<method_type>JavaScript</method_type>
<name>rb_CustomButtonHandler</name>
</Item>
</AML>
17 changes: 17 additions & 0 deletions Imports/TGV_Sample/Import/Method/rb_CustomMenuButtonHandler.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<AML>
<Item type="Method" id="C9FFF0C6A35B40458E9ED4689139C56A" action="add">
<execution_allowed_to keyed_name="Administrators" type="Identity">2618D6F5A90949BAA7E920D1B04C7EE1</execution_allowed_to>
<method_code><![CDATA[var gridData = inArgs.contextParams.tgvContext.getGridData();
var idCell = gridData.selection.rows[0].cells[1];
var id = idCell.text;

if(!idCell.text || ! idCell.data)
{
aras.AlertWarning("Please select a Package Element");
}

aras.uiShowItem(idCell.data, idCell.text);]]></method_code>
<method_type>JavaScript</method_type>
<name>rb_CustomMenuButtonHandler</name>
</Item>
</AML>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<AML>
<Item type="PresentationConfiguration" id="585A82F59CB34D2BBFF3F3A556D7A65E" action="add">
<name>Package Structure</name>
<Relationships>
<Item type="PresentationCommandBarSection" id="68F8F43FA8E54EF58BF76A9256CFDB4F" action="add">
<related_id keyed_name="com.aras.innovator.tgv.viewer.package_structure.toolbar" type="CommandBarSection">0E811C3E9F6D40809E088719B7627CF7</related_id>
<role keyed_name="World" type="Identity">A73B655731924CD0B027E4F4D5FCC0A9</role>
<sort_order>128</sort_order>
<source_id keyed_name="Package Structure" type="PresentationConfiguration">585A82F59CB34D2BBFF3F3A556D7A65E</source_id>
</Item>
<Item type="PresentationCommandBarSection" id="1994A773A1CE4C44A637814F02594E07" action="add">
<related_id keyed_name="com.aras.innovator.tgv.viewer.package_structure.context_menu" type="CommandBarSection">08F023D47559406AAFE28352ECABC443</related_id>
<role keyed_name="World" type="Identity">A73B655731924CD0B027E4F4D5FCC0A9</role>
<sort_order>256</sort_order>
<source_id keyed_name="Package Structure" type="PresentationConfiguration">585A82F59CB34D2BBFF3F3A556D7A65E</source_id>
</Item>
</Relationships>
</Item>
</AML>
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,60 @@
<name>Query Package Definitions</name>
<Relationships>
<Item type="qry_QueryItem" id="9521E2E00C7B4B0783CFEE8CF3914853" action="add">
<alias>PackageDefinition</alias>
<item_type keyed_name="PackageDefinition" type="ItemType" name="PackageDefinition">F312562D6AD948DCBCCCCF6A615EE0EA</item_type>
<ref_id>B140E1D29C954B93912CEDD4A6DA210A</ref_id>
<sort_order>128</sort_order>
<source_id keyed_name="Query Package Definitions" type="qry_QueryDefinition">124F907FB9B7435B988B8E9AE0071F3C</source_id>
<alias>PackageDefinition</alias>
<Relationships>
<Item type="qry_QueryItemSelectProperty" id="8B43C51A8FA647ABA65B39566CDEBD6D" action="add">
<property_name>name</property_name>
<sort_order>128</sort_order>
<source_id keyed_name="9521E2E00C7B4B0783CFEE8CF3914853" type="qry_QueryItem">9521E2E00C7B4B0783CFEE8CF3914853</source_id>
<source_id keyed_name="PackageDefinition" type="qry_QueryItem">9521E2E00C7B4B0783CFEE8CF3914853</source_id>
</Item>
</Relationships>
</Item>
<Item type="qry_QueryItem" id="3FA2CBCFFB044FCC81BD55D8C3E8EFCB" action="add">
<alias>PackageGroup</alias>
<item_type keyed_name="PackageGroup" type="ItemType" name="PackageGroup">51CE2CDC8D3F49C7BF707B8E0A4BD15F</item_type>
<ref_id>7900FE01FCC64B2AAA548AE4AC606CC9</ref_id>
<sort_order>256</sort_order>
<source_id keyed_name="Query Package Definitions" type="qry_QueryDefinition">124F907FB9B7435B988B8E9AE0071F3C</source_id>
<alias>PackageGroup</alias>
<Relationships>
<Item type="qry_QueryItemSelectProperty" id="EFBB79E539F844AE95857879EBEDBADD" action="add">
<property_name>name</property_name>
<sort_order>128</sort_order>
<source_id keyed_name="3FA2CBCFFB044FCC81BD55D8C3E8EFCB" type="qry_QueryItem">3FA2CBCFFB044FCC81BD55D8C3E8EFCB</source_id>
<source_id keyed_name="PackageGroup" type="qry_QueryItem">3FA2CBCFFB044FCC81BD55D8C3E8EFCB</source_id>
</Item>
<Item type="qry_QueryItemSortProperty" id="63C822AB33914487828EA688A0773D02" action="add">
<property_name>name</property_name>
<sort_order>128</sort_order>
<sort_order_direction>asc</sort_order_direction>
<source_id keyed_name="3FA2CBCFFB044FCC81BD55D8C3E8EFCB" type="qry_QueryItem">3FA2CBCFFB044FCC81BD55D8C3E8EFCB</source_id>
<source_id keyed_name="PackageGroup" type="qry_QueryItem">3FA2CBCFFB044FCC81BD55D8C3E8EFCB</source_id>
</Item>
</Relationships>
</Item>
<Item type="qry_QueryItem" id="77027B4180BA467B9DCAA275C7FEF4CB" action="add">
<alias>PackageElement</alias>
<item_type keyed_name="PackageElement" type="ItemType" name="PackageElement">D1AEF724041942BCAAC8CADBBDFD5EF4</item_type>
<ref_id>7F84997CDFF944A4B3136326DE80B6B4</ref_id>
<sort_order>384</sort_order>
<source_id keyed_name="Query Package Definitions" type="qry_QueryDefinition">124F907FB9B7435B988B8E9AE0071F3C</source_id>
<alias>PackageElement</alias>
<Relationships>
<Item type="qry_QueryItemSelectProperty" id="DA20D2581DA34394815E6230EB49146E" action="add">
<property_name>element_type</property_name>
<sort_order>128</sort_order>
<source_id keyed_name="77027B4180BA467B9DCAA275C7FEF4CB" type="qry_QueryItem">77027B4180BA467B9DCAA275C7FEF4CB</source_id>
<source_id keyed_name="PackageElement" type="qry_QueryItem">77027B4180BA467B9DCAA275C7FEF4CB</source_id>
</Item>
<Item type="qry_QueryItemSelectProperty" id="F33DB682E05945C2B69BE6BD133E1381" action="add">
<property_name>element_id</property_name>
<sort_order>256</sort_order>
<source_id keyed_name="77027B4180BA467B9DCAA275C7FEF4CB" type="qry_QueryItem">77027B4180BA467B9DCAA275C7FEF4CB</source_id>
<source_id keyed_name="PackageElement" type="qry_QueryItem">77027B4180BA467B9DCAA275C7FEF4CB</source_id>
</Item>
<Item type="qry_QueryItemSelectProperty" id="68E1C2AF879F450F9A0F2FC7FB9DCB74" action="add">
<property_name>name</property_name>
<sort_order>384</sort_order>
<source_id keyed_name="77027B4180BA467B9DCAA275C7FEF4CB" type="qry_QueryItem">77027B4180BA467B9DCAA275C7FEF4CB</source_id>
<source_id keyed_name="PackageElement" type="qry_QueryItem">77027B4180BA467B9DCAA275C7FEF4CB</source_id>
</Item>
</Relationships>
</Item>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<AML>
<Item type="rb_TreeGridViewDefinition" id="643BBFE7BAD046AE8B393BC54920CD88" action="add">
<description>Display a tree grid view of a PackageDefinition's contents</description>
<max_child_items>100</max_child_items>
<max_query_depth>2</max_query_depth>
<query_definition keyed_name="Query Package Definitions" type="qry_QueryDefinition">124F907FB9B7435B988B8E9AE0071F3C</query_definition>
<name>Package Structure</name>
<Relationships>
Expand Down Expand Up @@ -50,7 +52,7 @@
<Relationships>
<Item type="rb_ColumnMapping" id="30FDCEE107B841459CBD2918F81E62C9" action="add">
<cell_view_type>Item</cell_view_type>
<data_template />
<data_template>{PackageElement.element_type}</data_template>
<sort_order>128</sort_order>
<source_id keyed_name="9FB168EC5A1844988D4D0E8F47CCD2B9" type="rb_ColumnDefinition">9FB168EC5A1844988D4D0E8F47CCD2B9</source_id>
<template>{"text_template":"{PackageElement.element_id}","item_type_name":"{PackageElement.element_type}","item_id":"{PackageElement.element_id}"}</template>
Expand Down
Binary file modified Screenshots/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.