ns-export
Version:
Export Record Type metadata to JSON
478 lines (438 loc) • 18.5 kB
HTML
<html>
<head>
<link href="../../jquery-ui.css" rel="stylesheet">
<link href="../../schema-browser.css" rel="stylesheet">
<script src="../../javascript/jquery-1.10.2.min.js"></script>
<script src="../../javascript/jquery-ui.min.js"></script>
<script src="../../menudefs.js"></script>
<script src="../../javascript/menubuilder.js"></script>
<script>
(function( $ ){
//plugin buttonset vertical
$.fn.buttonsetv = function() {
$(':radio, :checkbox, :button', this).wrap('<div style="margin: 1px"/>');
$(this).buttonset();
$('label:first', this).removeClass('ui-corner-left').addClass('ui-corner-top');
$('label:last', this).removeClass('ui-corner-right').addClass('ui-corner-bottom');
mw = 0; // max witdh
$('label', this).each(function(index){
w = $(this).width();
if (w > mw) mw = w;
})
$('label', this).each(function(index){
$(this).width(mw);
})
};
})( jQuery );
function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null;
}
</script>
<style>
.custom-combobox {
position: relative;
display: inline-block;
}
.custom-combobox-toggle {
position: absolute;
top: 0;
bottom: 0;
margin-left: -1px;
padding: 0;
/* support: IE7 */
*height: 1.7em;
*top: 0.1em;
}
.custom-combobox-input {
margin: 0;
padding: 0.3em;
}
</style>
<script>
(function( $ ) {
$.widget( "custom.combobox_with_optgroup", {
_create: function() {
this.wrapper = $( "<span>" )
.addClass( "custom-combobox" )
.insertAfter( this.element );
this.element.hide();
this._createAutocomplete();
this._createShowAllButton();
},
_createAutocomplete: function() {
var selected = this.element.find( ":selected" ),
value = selected.val() ? selected.text() : "";
this.input = $( "<input>" )
.appendTo( this.wrapper )
.val( value )
.attr( "title", "" )
.addClass( "custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left" )
.autocomplete({
delay: 0,
minLength: 0,
source: $.proxy( this, "_source" )
})
.tooltip({
tooltipClass: "ui-state-highlight"
})
;
this._on( this.input, {
autocompleteselect: function( event, ui ) {
ui.item.option.selected = true;
window.location.href=ui.item.href;
// this._trigger( "select", event, {
// item: ui.item.option
// });
},
autocompletechange: "_removeIfInvalid"
});
this.input.data("uiAutocomplete")._renderMenu = function(ul, items) {
var self = this,
currentCategory = "";
var itemCounter=100;
$.each(items, function(index, item) {
itemCounter=itemCounter+1;
if (item.category != currentCategory) {
if (item.category) {
ul.append("<li class='custom-autocomplete-category'>" + item.category + "</li>");
}
currentCategory = item.category;
}
self._renderItem= function( ul, item ) {
return $( "<li>").attr("class",item.class)
.append( $( "<a>" ).attr("href",item.href).text( item.label ) )
.appendTo( ul );
};
self._renderItemData(ul, item);
});
};
},
_createShowAllButton: function() {
var input = this.input,
wasOpen = false;
$( "<a>" )
.attr( "tabIndex", -1 )
.attr( "title", "Show All" )
.tooltip()
.appendTo( this.wrapper )
.button({
/* icons: {
primary: "ui-icon-triangle-1-s"
},*/
text: false
})
.removeClass( "ui-corner-all" )
.addClass( "custom-combobox-toggle ui-corner-right" )
.mousedown(function() {
wasOpen = input.autocomplete( "widget" ).is( ":visible" );
})
.click(function() {
input.focus();
if ( wasOpen ) {
return;
}
input.autocomplete( "search", "" );
});
},
_source: function( request, response ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
response( this.element.find( "option" ).map(function() {
var text = $( this ).text();
if ( this.value && ( !request.term || matcher.test(text) ) )
return {
label: text,
value: text,
option: this,
class: $(this).attr("class"),
href: $(this).attr("href"),
category: $(this).closest("optgroup").attr("label")
};
}) );
},
_removeIfInvalid: function( event, ui ) {
if ( ui.item ) {
return;
}
var value = this.input.val(),
valueLowerCase = value.toLowerCase(),
valid = false;
this.element.find( "option" ).each(function() {
if ( $( this ).text().toLowerCase() === valueLowerCase ) {
this.selected = valid = true;
return false;
}
});
if ( valid ) {
return;
}
this.input
.val( "" )
.attr( "title", value + " not found" )
.tooltip( "open" );
this.element.val( "" );
this._delay(function() {
this.input.tooltip( "close" ).attr( "title", "" );
}, 2500 );
this.input.data( "ui-autocomplete" ).term = "";
},
_destroy: function() {
this.wrapper.remove();
this.element.show();
},
getInput: function(){
return this.input;
}
});
})( jQuery );
</script>
</head>
<body>
<div id='header'></div>
<script>
$(function() {
$('#header').html(createHeader('script','record__currency','../..'));
});
</script>
<div id='leftpanel'></div>
<script>
$(function() {
$('#leftpanel').html(createLeftPanel('script','record__currency','../..'));
});
</script>
<script type="text/javascript">
$().ready(function(){
$(".jtable th").each(function(){
$(this).addClass("ui-state-default");
});
$(".jtable td").each(function(){
$(this).addClass("ui-widget-content");
});
});
</script>
<div id="contentPanel">
<H1>Currency</H1>
<H3>Internal ID: currency</H3>
<H2>Fields</H2>
<table class="jtable">
<tr><th class="rt_fname">Internal ID</th><th class="rt_ftype">Type</th><th class="rt_fdle">nlapiSubmitField</th><th class="rt_flabel">Label</th><th class="rt_freq">Required</th><th class="rt_fhelp">Help</th></tr>
<tr id="field_currencyformatsample">
<td class="rt_fname">currencyformatsample</td>
<td class="rt_ftype">text</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">Format Sample</td>
<td class="rt_freq">false</td>
<td class="rt_fhelp"></td>
</tr>
<tr id="field_displaysymbol">
<td class="rt_fname">displaysymbol</td>
<td class="rt_ftype">text</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">Symbol</td>
<td class="rt_freq">false</td>
<td class="rt_fhelp"></td>
</tr>
<tr id="field_exchangerate">
<td class="rt_fname">exchangerate</td>
<td class="rt_ftype">currency2</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">Default Exchange Rate ( to root subsidiary currency )</td>
<td class="rt_freq">true</td>
<td class="rt_fhelp"></td>
</tr>
<tr id="field_externalid">
<td class="rt_fname">externalid</td>
<td class="rt_ftype">text</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">ExternalId</td>
<td class="rt_freq">false</td>
<td class="rt_fhelp"></td>
</tr>
<tr id="field_includeinfxrateupdates">
<td class="rt_fname">includeinfxrateupdates</td>
<td class="rt_ftype">checkbox</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">Automatic Update</td>
<td class="rt_freq">false</td>
<td class="rt_fhelp"></td>
</tr>
<tr id="field_isbasecurrency">
<td class="rt_fname">isbasecurrency</td>
<td class="rt_ftype">checkbox</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">Is Base Currency</td>
<td class="rt_freq">false</td>
<td class="rt_fhelp"></td>
</tr>
<tr id="field_isinactive">
<td class="rt_fname">isinactive</td>
<td class="rt_ftype">checkbox</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">Inactive</td>
<td class="rt_freq">false</td>
<td class="rt_fhelp"></td>
</tr>
<tr id="field_name">
<td class="rt_fname">name</td>
<td class="rt_ftype">text</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">Name</td>
<td class="rt_freq">true</td>
<td class="rt_fhelp">Enter a unique name for the currency. Because many countries use the same name for their currencies, you should use a combined name that includes the country name or abbreviation as well as the name of the currency. For example, pesos are the currency in the Philippines, Uruguay, and Mexico. In the Name field, you might enter &#x201c;Mexican peso.&#x201d; This name appears in the Currency field on records and transactions.</td>
</tr>
<tr id="field_overridecurrencyformat">
<td class="rt_fname">overridecurrencyformat</td>
<td class="rt_ftype">checkbox</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">Override Currency Format</td>
<td class="rt_freq">false</td>
<td class="rt_fhelp"></td>
</tr>
<tr id="field_symbol">
<td class="rt_fname">symbol</td>
<td class="rt_ftype">text</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">ISO Code</td>
<td class="rt_freq">true</td>
<td class="rt_fhelp">Determines the way currency figures appear on reports and printed transactions. Defaults to the symbol associated with the value set in the locale field.</td>
</tr>
<tr id="field_symbolplacement">
<td class="rt_fname">symbolplacement</td>
<td class="rt_ftype">select</td>
<td class="rt_fdle">false</td>
<td class="rt_flabel">Symbol Placement</td>
<td class="rt_freq">false</td>
<td class="rt_fhelp"></td>
</tr>
</table>
<H2>Search Filters</H2>
<table class="jtable">
<tr><th class="rt_iname">Internal ID</th><th class="rt_itype">Type</th><th class="rt_ilabel">Label</th></tr>
<tr>
<td class="rt_iname">exchangerate</td>
<td class="rt_itype">float</td>
<td class="rt_ilabel">Exchange Rate</td>
</tr>
<tr>
<td class="rt_iname">externalid</td>
<td class="rt_itype">select</td>
<td class="rt_ilabel">External ID</td>
</tr>
<tr>
<td class="rt_iname">externalidstring</td>
<td class="rt_itype">text</td>
<td class="rt_ilabel">External ID (Text)</td>
</tr>
<tr>
<td class="rt_iname">formuladate</td>
<td class="rt_itype">date</td>
<td class="rt_ilabel">Formula (Date)</td>
</tr>
<tr>
<td class="rt_iname">formulanumeric</td>
<td class="rt_itype">float</td>
<td class="rt_ilabel">Formula (Numeric)</td>
</tr>
<tr>
<td class="rt_iname">formulatext</td>
<td class="rt_itype">text</td>
<td class="rt_ilabel">Formula (Text)</td>
</tr>
<tr>
<td class="rt_iname">internalid</td>
<td class="rt_itype">select</td>
<td class="rt_ilabel">Internal ID</td>
</tr>
<tr>
<td class="rt_iname">internalidnumber</td>
<td class="rt_itype">integer</td>
<td class="rt_ilabel">Internal ID (Number)</td>
</tr>
<tr>
<td class="rt_iname">isinactive</td>
<td class="rt_itype">checkbox</td>
<td class="rt_ilabel">Inactive</td>
</tr>
<tr>
<td class="rt_iname">name</td>
<td class="rt_itype">text</td>
<td class="rt_ilabel">Name</td>
</tr>
<tr>
<td class="rt_iname">symbol</td>
<td class="rt_itype">text</td>
<td class="rt_ilabel">Symbol</td>
</tr>
</table>
<H2>Search Columns</H2>
<table class="jtable">
<tr><th class="rt_cname">Internal ID</th><th class="rt_ctype">Type</th><th class="rt_clabel">Label</th></tr>
<tr>
<td class="rt_cname">exchangerate</td>
<td class="rt_ctype">float</td>
<td class="rt_clabel">Exchange Rate</td>
</tr>
<tr>
<td class="rt_cname">externalid</td>
<td class="rt_ctype">select</td>
<td class="rt_clabel">External ID</td>
</tr>
<tr>
<td class="rt_cname">formulacurrency</td>
<td class="rt_ctype">currency</td>
<td class="rt_clabel">Formula (Currency)</td>
</tr>
<tr>
<td class="rt_cname">formuladate</td>
<td class="rt_ctype">date</td>
<td class="rt_clabel">Formula (Date)</td>
</tr>
<tr>
<td class="rt_cname">formuladatetime</td>
<td class="rt_ctype">datetime</td>
<td class="rt_clabel">Formula (Date/Time)</td>
</tr>
<tr>
<td class="rt_cname">formulanumeric</td>
<td class="rt_ctype">float</td>
<td class="rt_clabel">Formula (Numeric)</td>
</tr>
<tr>
<td class="rt_cname">formulapercent</td>
<td class="rt_ctype">percent</td>
<td class="rt_clabel">Formula (Percent)</td>
</tr>
<tr>
<td class="rt_cname">formulatext</td>
<td class="rt_ctype">text</td>
<td class="rt_clabel">Formula (Text)</td>
</tr>
<tr>
<td class="rt_cname">internalid</td>
<td class="rt_ctype">select</td>
<td class="rt_clabel">Internal ID</td>
</tr>
<tr>
<td class="rt_cname">isinactive</td>
<td class="rt_ctype">checkbox</td>
<td class="rt_clabel">Inactive</td>
</tr>
<tr>
<td class="rt_cname">name</td>
<td class="rt_ctype">text</td>
<td class="rt_clabel">Name</td>
</tr>
<tr>
<td class="rt_cname">symbol</td>
<td class="rt_ctype">text</td>
<td class="rt_clabel">Symbol</td>
</tr>
</table>
<p> </p>
</div>
<script>
$(function() {
wrapBodyDiv('script','contentPanel');
});
</script>
</body>
</html>