File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed
Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ <AML >
2+ <Item type =" Action" id =" 2038F7D8D3024504B17B8D1867F9678D" action =" add" >
3+ <item_query />
4+ <label xml : lang =" en" >Call Date Dialog</label >
5+ <location >client</location >
6+ <method keyed_name =" labs_CallDateDialog" type =" Method" >
7+ <Item type =" Method" action =" get" select =" id" >
8+ <name >labs_CallDateDialog</name >
9+ </Item >
10+ </method >
11+ <target >none</target >
12+ <type >generic</type >
13+ <name >labs_DateDialogAction</name >
14+ </Item >
15+ </AML >
Original file line number Diff line number Diff line change 1+ <AML >
2+ <Item type =" Method" id =" AAD11A15D64648FEB5AA440AE4AD5388" action =" add" >
3+ <comments >Client-side method to call a datepicker dialog</comments >
4+ <execution_allowed_to keyed_name =" World" type =" Identity" >A73B655731924CD0B027E4F4D5FCC0A9</execution_allowed_to >
5+ <method_code ><![CDATA[ // Prompt the user for the baseline date
6+ var dateFormat = "yyyy-MM-dd HH:mm:ss";
7+ var baseDate = new Date().format(dateFormat);
8+
9+ params = {
10+ aras: top.aras,
11+ format: dateFormat,
12+ type: "Date",
13+ date: baseDate
14+ };
15+
16+ // call the date dialog with defined params
17+ return aras.getMainWindow().main.ArasModules.Dialog.show("iframe", params).promise.then(function(res) {
18+ // do something with the date on the dialog's callback
19+ return doSomethingWithTheDate(res);
20+ });
21+
22+ // write a function to do some logic with the date
23+ function doSomethingWithTheDate(dt) {
24+ alert(dt);
25+ }]]> </method_code >
26+ <method_type >JavaScript</method_type >
27+ <name >labs_CallDateDialog</name >
28+ </Item >
29+ </AML >
Original file line number Diff line number Diff line change 1+ <imports>
2+ <package name="aras.labs.CallDateDialog" path="CallDateDialog\Import" />
3+ </imports>
You can’t perform that action at this time.
0 commit comments