Class Index | File Index

Classes


Built-In Namespace _global_

Field Summary
Field Attributes Field Name and Description
 
************************************************************* Copyright (C) 2011 United Planet GmbH, Freiburg All rights reserved.
 
Encapsulates crossbrowser methods and auxiliary functions for intrexx.
 
Helper provides several auxiliary functions for intrexx
Method Summary
Method Attributes Method Name and Description
 
ajaxAppVTL(vtlFile, settingsAjax, appContext,)
Sends a request to the provided application resource vtl-file underneath internal/application/resource/APPGUID/.
 
ajaxVTL(vtlFile, settingsAjax, appContext,)
Sends a request to the provided vtl-file.
 
autostartgallery(p_iStartId, p_strGalleryId)
Start the gallery at the image with given RecId
 
calculate(oHtml1, oHtml2, strOp, oHtmlResult)
Calculates a result of values from two html controls with an operator and writes it into a html control.
 
checkRequired(oHtml, strMessage)
Checks a html control, as if "entry required" has been set OR checks all controls of a form, where "entry required" was set.
 
COOKIEVARIsEncoded(p_strParam)
Is the cookie variable p_strParam hexEncodeStringd?
 
dateAdd(interval, number, date)
Adds or subtracts a interval to/from a given JavaScript date object.
 
Compares a value of a date control with the current date.
 
evalInGlobalContext(strCode, isFile, id)
Evaluates javascript code in global context.
 
Parses a local formatted string representing a currency value and returns a JavaScript number object.
 
Parses a local formatted string representing a currency value.
 
Creates an JavaScript date object from a html control.
 
Parses a local formatted string representing a double value and returns a JavaScript number object.
 
Parses a local formatted string representing a double value.
 
getElement(guid)
Returns a html object by its guid.
 
get Informations on the current page and AppGuid from the functional part
 
Parses a local formatted string representing an integer value and returns a JavaScript number object.
 
Parses a local formatted string representing an integer value.
 
getLocalDurationString(oHtmlDateFrom, oHtmlDateTo)
Calculates the difference of values from two html controls of type "date & time" and returns it as string formatted as "2 days 3 minutes"
 
Creates an JavaScript number object from a html control.
 
Get the shaped table which the given element belongs to.
 
Get the shaped table record which the given element belongs to.
 
getTextValue(oHtml)
Reads a value from a viewcontrol or static textcontrol.
 
Reads a value from a viewcontrol or static textcontrol.
 
inking(control, op, comp, color, colored)
Inks rows and cells in a viewtablecontrol depending on a number value.
 
inkingDate(type, op, type, color, colored)
Inks date or datetime values in a viewtablecontrol depending on a number value.
 
inkingString(control, op, comp, color, colored)
Inks strings in a viewtablecontrol depending on a number value.
 
isOnElement(the, If, if)
checks if an event was fired in the rage of an elements coordinates.
 
detaches *all* JQuery-Events from an Element that were attached via bind(), on(), live()
 
makeAppRequest(p_strApp, p_strTarget, p_strRecId, p_bClosePopup, p_bChangeParent, p_bNewWindow)
Executes an application-request.
 
QSVARIsEncoded(p_strParam)
Is the querystring variable p_strParam hexencoded?
 
setFullDays(oHtmlCheck, oHtmlFrom, oHtmlTo)
Sets two datafields on a duration of a whole day: dateFrom 00:00 a.m.
 
setTextValue(oHtml, strValue)
Writes a value in a viewcontrol or static textcontrol.
 
setTextValueById(id, strValue)
Writes a value in a viewcontrol or static textcontrol.
 
startSlideShow(p_iSpeed)
Start the slideshow iff inactive
 
Stop the slideshow iff active
 
toLocalString(oHtml, strValue)
Creates a local formatted string from an number string or a datetime string.
 
triggerUserWorkflowEvent(eventGuid, urlParameters)
Triggers an User Workflow Event.
 
hides action panel elements on page load on mobile non-webkit Browsers
 
writeLocalString(oHtml, strValue)
Creates a local formatted string from an number string or a datetime string and writes it as value into a html control.
Field Detail
bGalleryIsActive
************************************************************* Copyright (C) 2011 United Planet GmbH, Freiburg All rights reserved. ***************************************************************
Defined in: <gallery.js>.

{upBrowser} Browser
Encapsulates crossbrowser methods and auxiliary functions for intrexx.
Defined in: <browser_base.js>.
See:
upBrowser

{HelperMain} Helper
Helper provides several auxiliary functions for intrexx
Defined in: <helper_base.js>.
See:
HelperMain
Method Detail
{Deferred} ajaxAppVTL(vtlFile, settingsAjax, appContext,)
Sends a request to the provided application resource vtl-file underneath internal/application/resource/APPGUID/.
Defined in: <api.js>.
ajaxAppVTL("test.vm", {
   dataType: "json",
   success: function(dataJSON){
      //e.g. dataJSON response is:
      //{"myobject":{"property1":"propertyValue1"}}
      alert(dataJSON.myobject.property1);
  }
}, getElement(GUID));

ajaxAppVTL("test.vm", {
   dataType: 'text',
   data: {
          fr_param1: Browser.getValue(getElement("GUID_FORM_FIELD"))
   },
   success: function(data){
      Browser.setValue(getElement("GUID_STATIC_TEXTFIELD"), data);
   }
}, getElement("GUID_FORM_ANY_FIELD"));
Parameters:
{string} vtlFile
path to the application resource vtl-file ("internal/application/resource/[APPGUID]/" will be added automatically)
{object} settingsAjax
ajax settings e.g. {dataType: 'json'}, http://api.jquery.com/jQuery.ajax/, additional intrexx properties: urlParameters
{object} appContext,
object {upFuncPart} or any html element of the application page. Parameter can also be null.
Returns:
{Deferred} jQuery deferred, http://api.jquery.com/category/deferred-object/

{Deferred} ajaxVTL(vtlFile, settingsAjax, appContext,)
Sends a request to the provided vtl-file.
Defined in: <api.js>.
ajaxVTL("internal/system/vm/custom/test.vm", {
    dataType: "json",
    urlParameters: {
        "rq_Name1": "value1",
        "rq_Name2": "value2"
    },
    success: function(dataJSON){
        //e.g. dataJSON response is:
        //{"myobject":{"property1":"propertyValue1"}}
        alert(dataJSON.myobject.property1);
    }
});
Parameters:
{string} vtlFile
path to the vtl-file (e.g. internal/system/vm/html/include/sample.vm)
{object} settingsAjax
ajax settings e.g. {dataType: 'json'}, http://api.jquery.com/jQuery.ajax/, additional intrexx properties: urlParameters
{object} appContext,
object {upFuncPart} or any html element of the application page. Parameter can also be null.
Returns:
{Deferred} jQuery deferred, http://api.jquery.com/category/deferred-object/

autostartgallery(p_iStartId, p_strGalleryId)
Start the gallery at the image with given RecId
Defined in: <gallery.js>.
	autostartgallery(5,"ID_gallerygroupcontrol74B213FA")
Parameters:
{Integer} p_iStartId
- Image RecId
{String} p_strGalleryId
- Gallery Id

{boolean} calculate(oHtml1, oHtml2, strOp, oHtmlResult)
Calculates a result of values from two html controls with an operator and writes it into a html control.
Defined in: <api.js>.
calculate(getElement("F28BA7351E3C8F5123880548CFA72B64566A1421"), getElement("80467069EA61BD786CFFEB508786723D6451F2F5"), "+", getElement("B52A9E9FC555A820984E63DECF13BCAA33E308CD"));
Parameters:
{object} oHtml1
Reference to a html control of type "integer", "double", "currency"
{object} oHtml2
Reference to a html control of type "integer", "double", "currency"
{string} strOp
Operator
{object} oHtmlResult
Result; Reference to a html control of type "integer", "double", "currency"
Returns:
{boolean}

{boolean} checkRequired(oHtml, strMessage)
Checks a html control, as if "entry required" has been set OR checks all controls of a form, where "entry required" was set.
Defined in: <api.js>.
checkRequired(getElement("E94A9FBDADD46039BB62F76870E1EC57C226C6DC"), "An alternative text!");
Parameters:
{object} oHtml
Reference to a html input control or to a form control ("FormGroup")
{string} strMessage
(OPTIONAL) Text to show, if checkRequired returns false. If not set, value of FORM_CONSTR_REQUIRED from "preset texts" will be displayed.
Returns:
{boolean}

COOKIEVARIsEncoded(p_strParam)
Is the cookie variable p_strParam hexEncodeStringd?
Defined in: <mobile_common.js>.
Parameters:
p_strParam
Name of a cookie variable as string
Returns:
true if the cookie variable p_strParam is encoded or false otherwise.

{date} dateAdd(interval, number, date)
Adds or subtracts a interval to/from a given JavaScript date object.
Defined in: <api.js>.
var dtNow = new Date();
var dtAdd1 = dateAdd("d", 1,  dtNow); // adds 1 day to current date.
var dtAdd2 = dateAdd("h", -2, dtNow); // subtracts 2 hours from current date.
Parameters:
{string} interval
Possible values: "ms" - for milliseconds; "s" - for seconds; "mi" - for minutes; "h" - for hours; "d" - for days; "mo" - for months; "y" - for years;
{integer} number
value for given interval, that should be added to date. Negative values are also possible.
{date} date
JavaScript date object.
Returns:
{date} JavaScript date object.

{number} dateComparedToNow(p_oDate)
Compares a value of a date control with the current date. Imperative for input and view controls (for view controls the expert attribute jsobject = true (Boolean) has to be set.)
Defined in: <api.js>.
dateComparedToNow(getElement("5F7S5E7F9EA9ED1A829DB98DBF5459F59961FA3B"));
Parameters:
p_oDate
Reference to an html input control of type "date", "time" or "datetime"
Returns:
{number} JavaScript number object.

evalInGlobalContext(strCode, isFile, id)
Evaluates javascript code in global context. Variables are declared inside the window namespace and not only in the eval namespace.
Defined in: <mobile_common.js>.
Parameters:
strCode
Javascript code as string.
isFile
True, if the code is the content of a file, which was loaded by ajax.
id
id if appended script block, if isFile = true.

{number} getCurrencyByLocalString(strValue)
Parses a local formatted string representing a currency value and returns a JavaScript number object.
Defined in: <api.js>.
getCurrencyByLocalString("1.234");
Parameters:
{string} strValue
Local formatted currency string.
Returns:
{number} JavaScript number object.

{string} getCurrencyStringByLocal(strValue)
Parses a local formatted string representing a currency value. (for example 3.215,20 -> 3215.20)
Defined in: <api.js>.
getCurrencyStringByLocal("1.234");
Parameters:
{string} strValue
Local formatted currency string.
Returns:
{string} double as formatted string.

{date} getDateObject(oHtml)
Creates an JavaScript date object from a html control.
Defined in: <api.js>.
getDateObject(getElement("A84E5E7F9EA9ED1A829DB98DBF5459F59961FA3B"));
Parameters:
{object} oHtml
Reference to a html input control of types "date", "time" or "date & time".
Returns:
{date} JavaScript date object

{number} getDoubleByLocalString(strValue)
Parses a local formatted string representing a double value and returns a JavaScript number object.
Defined in: <api.js>.
getDoubleByLocalString("1.234");
Parameters:
{string} strValue
Local formatted string.
Returns:
{number} JavaScript number object.

{string} getDoubleStringByLocal(strValue)
Parses a local formatted string representing a double value. (for example 3.215,20 -> 3215.20)
Defined in: <api.js>.
getDoubleStringByLocal("1.234");
Parameters:
{string} strValue
Local formatted double string.
Returns:
{string} double as formatted string.

getElement(guid)
Returns a html object by its guid.
Defined in: <mobile_common.js>.
Parameters:
guid

{Object} getFuncPart()
get Informations on the current page and AppGuid from the functional part
Defined in: <mobile_common.js>.
Returns:
{Object} Object holding Information on the current AppGuid and PageGuid

{number} getIntegerByLocalString(strValue)
Parses a local formatted string representing an integer value and returns a JavaScript number object.
Defined in: <api.js>.
getIntegerByLocalString("1.234");
Parameters:
{string} strValue
Local formatted integer string.
Returns:
{number} JavaScript number object.

{string} getIntegerStringByLocal(strValue)
Parses a local formatted string representing an integer value.
Defined in: <api.js>.
getIntegerStringByLocal("1.234");
Parameters:
{string} strValue
Local formatted integer string.
Returns:
{string} Integer formatted string.

{string} getLocalDurationString(oHtmlDateFrom, oHtmlDateTo)
Calculates the difference of values from two html controls of type "date & time" and returns it as string formatted as "2 days 3 minutes"
Defined in: <api.js>.
getLocalDurationString(getElement("4E48F310711C446B4B04752A6B3239900D49F3A0"),getElement("E13A41C114E8754574DEA9767F505DDE3491C89A"));
Parameters:
{object} oHtmlDateFrom
Reference to a html control of type "date & time"
{object} oHtmlDateTo
Reference to a html control of type "date & time"
Returns:
{string} string formatted as "2 days 3 minutes".

{object} getNumberObject(oHtml)
Creates an JavaScript number object from a html control.
Defined in: <api.js>.
getNumberObject(getElement("5F7S5E7F9EA9ED1A829DB98DBF5459F59961FA3B"));
Parameters:
{object} oHtml
Reference to a html input control of types "integer", "double" or "currency".
Returns:
{object} JavaScript number object.

{upShapedTable} getTableByRecordHtml(oHtml)
Get the shaped table which the given element belongs to.
Defined in: <datarange.js>.
Parameters:
oHtml
{object} Reference to a html control within the table record
Returns:
{upShapedTable} table object

{upShapedTableRecord} getTableRecordByRecordHtml(oHtml)
Get the shaped table record which the given element belongs to.
Defined in: <datarange.js>.
// Button onclick-event inside a table record
alert(getTableRecordByRecordHtml(this).getRecId())

// Example 2 with jQuery
alert($(this).getTableRecord().getRecId())
Parameters:
oHtml
{object} Reference to a html control within the table record
Returns:
{upShapedTableRecord} Table record

{string} getTextValue(oHtml)
Reads a value from a viewcontrol or static textcontrol.
Defined in: <api.js>.
getTextValue(getElement("F28BA7351E3C8F5123880548CFA72B64566A1433"));
Parameters:
{object} oHtml
Reference to a html input control.
Returns:
{string} Value from viewcontrol or static textcontrol.

{string} getTextValueById(id)
Reads a value from a viewcontrol or static textcontrol.
Defined in: <api.js>.
getTextValueById("ID_labelcontrol900CB1AB");
Parameters:
{string} id
DOM id of the element; equivalent to the id-attribute value of the html element.
Returns:
{string} Value from viewcontrol or static textcontrol.

inking(control, op, comp, color, colored)
Inks rows and cells in a viewtablecontrol depending on a number value.
Defined in: <api.js>.
inking("viewcontrolD54BA2DD", ">", 10, "#008000", "row");
Parameters:
{string} control
Name of control, whose value should be checked (name from expert page of the column).
{string} op
Operator
{string} comp
Value to compare with.
{string} color
Value of color (hexadecimal or name)
{string} colored
Possible values: "row" = whole row (tr), "cell" = whole cell (td), "span" = text of cell (span).

inkingDate(type, op, type, color, colored)
Inks date or datetime values in a viewtablecontrol depending on a number value.
Defined in: <api.js>.
Parameters:
{string} type
Possible values: "date" = date, "datetime" = date & time.
op
type
color
colored
See:
#inking

inkingString(control, op, comp, color, colored)
Inks strings in a viewtablecontrol depending on a number value.
Defined in: <api.js>.
Parameters:
control
op
comp
color
colored
See:
#inking

{Boolean} isOnElement(the, If, if)
checks if an event was fired in the rage of an elements coordinates.
Defined in: <upTooltips.js>.
Author: Peter Siebold.
		
			1:
				$(document).on("click", function(e){
					if(isOnElement($('#div1'), e){
						alert("on Element");
					}
				});
			2:
				document.body.addEventListener('click', function(e){
					if(isOnElement(document.getElementById("div1"), e.pageX, e.pageY)){
						alert("on Element");
					}
				},false);
		
Parameters:
{JQuery Object or HTML Element} the
Element which coordinates are to be checked, can be a jQuery Object or a DOM Node
{Integer or Event} If
only two Arguments are passed, the second Argument is assumed to be an event (JQuery or native). Else this second argument is used to represent the x coordinates of the event
{Integer} if
present, this argument is used as the y coordinate of the event
Returns:
{Boolean} true, if the events coordinates are whithin the elements coordinates

killAllEvents()
detaches *all* JQuery-Events from an Element that were attached via bind(), on(), live()
Defined in: <upTooltips.js>.
Parameters:
{JQuery Object or HTML Element}

makeAppRequest(p_strApp, p_strTarget, p_strRecId, p_bClosePopup, p_bChangeParent, p_bNewWindow)
Executes an application-request.
Defined in: <api.js>.
// opens page 3B8501CD6DFE930F85CC6305C4BDA16D95BC9F59 of application 77C4E95D8F1EEC234D308C2C8C15CB63A97F7ABA in an new window
makeAppRequest("77C4E95D8F1EEC234D308C2C8C15CB63A97F7ABA", "3B8501CD6DFE930F85CC6305C4BDA16D95BC9F59", false, false, true);
Parameters:
{string} p_strApp
Application GUID
{string} p_strTarget
Page GUID
{string} p_strRecId
Record Id
{boolean} p_bClosePopup
Close popup (if current page in popup).
{boolean} p_bChangeParent
Set request into main window (if current page in popup).
{boolean} p_bNewWindow
Set request into a new popup window.

QSVARIsEncoded(p_strParam)
Is the querystring variable p_strParam hexencoded?
Defined in: <mobile_common.js>.
Parameters:
p_strParam
Name of querystring variable as string.
Returns:
true if the querystring variable p_strParam is encoded or false otherwise.

setFullDays(oHtmlCheck, oHtmlFrom, oHtmlTo)
Sets two datafields on a duration of a whole day: dateFrom 00:00 a.m., dateTo 00:00 a.m. next day.
Defined in: <api.js>.
// Example usage (executable on an checkbox onclick() event):
setFullDays(getElement("123401F1E55C9A193BE6EC4091B45C6A5A6C8154"), getElement("DD2E01F1E55C9A193BE6EC4091B45C6A5A6C8154"), getElement("4D0708BDECC7D088613F818CE1B09B8D812F5750") );
Parameters:
{object} oHtmlCheck
Reference to a checkbox input control
{object} oHtmlFrom
Reference to a html input control (date from)
{object} oHtmlTo
Reference to a html input control (date to)

{boolean} setTextValue(oHtml, strValue)
Writes a value in a viewcontrol or static textcontrol.
Defined in: <api.js>.
setTextValue(getElement("F28BA7351E3C8F5123880548CFA72B64566A1433"), "Some text");
Parameters:
{object} oHtml
Reference to a html input control.
{string} strValue
Value to write.
Returns:
{boolean}

{boolean} setTextValueById(id, strValue)
Writes a value in a viewcontrol or static textcontrol.
Defined in: <api.js>.
setTextValueById("ID_labelcontrol900CB1AB", "Some text");
Parameters:
{string} id
DOM id of the element; equivalent to the id-attribute value of the html element.
{string} strValue
Value to write.
Returns:
{boolean}

startSlideShow(p_iSpeed)
Start the slideshow iff inactive
Defined in: <gallery.js>.
Parameters:
{Integer} p_iSpeed
- slideshow speed

stopSlideShow()
Stop the slideshow iff active
Defined in: <gallery.js>.

{string} toLocalString(oHtml, strValue)
Creates a local formatted string from an number string or a datetime string.
Defined in: <api.js>.
toLocalString(getElement("DDB279D4974A17DB27A89F58DB36F7BF4E10DA13"),"123.45");
Parameters:
{object} oHtml
Reference to a html input control of types "integer", "double", "currency" (format settings can be appended here, too).
{string} strValue
Number string or date string.
Returns:
{string} Local formatted number as string or local formatted datetime as string

triggerUserWorkflowEvent(eventGuid, urlParameters)
Triggers an User Workflow Event.
Defined in: <api.js>.
// Example 1
// Trigger event with guid . Define a generic event handler with the class "de.uplanet.lucy.server.workflow.eventhandler.UserWorkflowEventHandler" before.
triggerUserWorkflowEvent("", {"param1":"value1","param2":"value2"}); 

// Example 2
$.when(triggerUserWorkflowEvent("", {"param1":"value1","param2":"value2"}))
.done(function() {
   alert("done")
})
.fail(function() {
   alert("failed :(")
});
Parameters:
{string} eventGuid
The paramter "eventGuid" of the generic event handler.
{object} urlParameters
Map containing name value pairs, which will be part of the querystring.

uplActionPanelHideOnLoad()
hides action panel elements on page load on mobile non-webkit Browsers
Defined in: <mobile_common.js>.
Author: Peter Siebold.

{boolean} writeLocalString(oHtml, strValue)
Creates a local formatted string from an number string or a datetime string and writes it as value into a html control.
Defined in: <api.js>.
writeLocalString(getElement("DDB279D4974A17DB27A89F58DB36F7BF4E10DA13"),"123.45");
Parameters:
{object} oHtml
Reference to a html input control of types "date", "time", "date & time", "integer", "double", "currency" (format settings can be appended here, too).
{string} strValue
Value to localize.
Returns:
{boolean}

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Nov 23 2012 12:16:41 GMT+0100 (MEZ)