Skip to content

Instantly share code, notes, and snippets.

View EliJDonahue's full-sized avatar
😃
Working on exciting new projects for the Aras Community!

Eli J. Donahue EliJDonahue

😃
Working on exciting new projects for the Aras Community!
View GitHub Profile
@EliJDonahue
EliJDonahue / aras_labs_custom_icon.html
Created November 2, 2016 23:41
[ArasLabs/custom-form-css] Show contents of custom_icon form field
<img id="myIcon" name="myIcon" src="../customer/svg/package.svg" vspace="20" hspace="20" />
<script>
chooseIcon = function()
{
var icn = "../customer/svg/";
// get classification, gets "none" if getProperty returns null
var thisItem = document.thisItem;
var classification = thisItem.getProperty("classification","none");
@EliJDonahue
EliJDonahue / aras_labs_form_body.css
Created November 3, 2016 00:11
[ArasLabs/custom-form-css] Import a custom CSS file for a form
@import url("../styles/default.css");
@import url("../customer/myStyles.css");
@EliJDonahue
EliJDonahue / aras_labs_myicon.css
Created November 3, 2016 00:16
[ArasLabs/custom-form-css] Snippet from myStyles.css, showing style applied to myIcon
/* Style for custom icons added by CustomFormCSS import package */
#myIcon {
height: 80px;
width: 80px;
position:absolute;
top:40px;
left:10px;
z-index:2;
}
@EliJDonahue
EliJDonahue / aras_labs_custom_item_info.html
Created November 3, 2016 14:30
[ArasLabs/custom-form-css] Customized contents of item_info field
<span id="ITEM_INFO_INTERNAL_SPAN" class="info_group" style="display:block;"></span>
<script>
populate_ITEM_INFO_INTERNAL_SPAN = function()
{
document.getElementById("ITEM_INFO_INTERNAL_SPAN").innerHTML = top.aras.uiDrawItemInfoTable(document.itemType);
top.aras.uiPopulateInfoTableWithItem(document.item, document);
// apply customizations in separate function
style_ITEM_INFO_INTERNAL_SPAN();
@EliJDonahue
EliJDonahue / aras_labs_item_info.css
Last active November 3, 2016 15:45
[ArasLabs/custom-form-css] CSS for customizing the item_info field contents
/* Style for new state element */
.my_state {
display: block;
margin-left: 15px;
margin-bottom: 30px;
font-size: 16px;
font-weight: bold;
}
/* Style for default form title */
@EliJDonahue
EliJDonahue / aras_labs_fieldset_style.css
Created November 3, 2016 16:00
[ArasLabs/custom-form-css] Define style for fieldsets
.info_group {
background: #E8EEEF;
color: #000;
height: 330px;
width: 185px;
display: inline-block;
margin-left: 10px;
margin-top: 15px;
border-radius: 15px 15px 15px 0px;
border: 1px solid #D9DEDF;
@EliJDonahue
EliJDonahue / aras_labs_struct_browser_2.cs
Created November 3, 2016 23:11
[ArasLabs/override-default-structure-browser] Adds the classification property to the items of the same type as the context item
XmlElement inItem = (XmlElement)this.dom.SelectSingleNode("//Item[@type='Method' and @action='GetItemsForStructureBrowser']/Item");
if (inItem != null)
{
XmlDocument resDOM = Aras.Server.Core.XmlProxy.CreateNewXMLDocument();
XmlElement result = Aras.Server.Core.XmlProxy.MakeBorders(resDOM);
//Comment out call to standard structure browser
//Aras.Server.Core.StructureBrowser sb = new Aras.Server.Core.StructureBrowser(ref CCO);
@EliJDonahue
EliJDonahue / aras_labs_struct_browser_3.cs
Created November 3, 2016 23:41
[ArasLabs/override-default-structure-browser] Display the classification property for Part, Document, and CAD
XmlElement inItem = (XmlElement)this.dom.SelectSingleNode("//Item[@type='Method' and @action='GetItemsForStructureBrowser']/Item");
if (inItem != null)
{
XmlDocument resDOM = Aras.Server.Core.XmlProxy.CreateNewXMLDocument();
XmlElement result = Aras.Server.Core.XmlProxy.MakeBorders(resDOM);
// Comment out call to standard structure browser
// Aras.Server.Core.StructureBrowser sb = new Aras.Server.Core.StructureBrowser(ref CCO);
@EliJDonahue
EliJDonahue / aras_labs_numbering_sections.css
Created November 28, 2016 20:33
Use CSS counters to auto-number Aras Tech Doc sections
/* Set a CSS counter using counter-reset (starts at 0) */
body {
counter-reset: sectionNum;
}
/* Increment sectionNum counter at each .Section element */
.Section {
counter-increment: sectionNum;
}
@EliJDonahue
EliJDonahue / aras_labs_add_section_subtitles_to_schema.xml
Created November 28, 2016 20:45
Use CSS counters to auto-number specific child elements within Aras Tech Doc sections
<!-- Add subtitles to Section definition in Document Type schema -->
<xs:element name="Section">
<xs:complexType>
<xs:sequence>
<xs:element ref="Title" minOccurs="1" maxOccurs="1"/>
<xs:choice maxOccurs="unbounded">
<xs:element ref="Subtitle"/>
<xs:element ref="Text"/>
<xs:element ref="List"/>
<xs:element ref="Table"/>