|
|
|
|
Json MetaData Commented { "Caption" : "{{name}}", /* Template defining the caption of the object */ "IDProperty" : "name", /* The property to use as the identifier */ /* The sections and the properties order. The character @ define section, the character # define an action to use as a button */ "DisplayOrder" : "name,Quantity,Unit,@Order,QuantityRequested,OrderID,OrderDate,DeviceID,#Order,@Product Information,Description,WebSite", "Sort" : "name", /* The property to use to sort the objects */ "GroupBy" : null, /* The property to use to group the object into sections */ "NewProperties" : [ /* Properties to add the first time or each time the object is opened */ { "Name" : "QuantityRequested", "Value" : 0, "AutoReset" : true /* Re initialize the value each time the dialog is opened */ }, { "Name" : "DeviceName", "Value" : "$DeviceName" /* $DeviceName macro */ }, { "Name" : "DeviceID", "Value" : "$DeviceID" /* $DeviceID macro */ }, { "Name" : "OrderDate", "Value" : "$Now", /* $Now macro */ "AutoReset" : true }, { "Name" : "OrderID", "Value" : "$Guid", /* $Guid macro */ "AutoReset" : true }, { "Name" : "WebSite", /* Link to a website page */ "Value" : "http://www.freebase.com/view/en/{{name.lower()}}" } ], "Actions" : [ { "Name" : "Order", /* Name of the action */ "Type" : "Button", /* Button, ActionSheet(Default) */ "Method" : "Post", /* Http (Post, Get, Delete, Put) or EMail */ "Url" : "http://fredericaltorres.jsonbdemos.jit.su/vegetables/update", "Parameters" : "name={{name}}&QuantityRequested={{QuantityRequested}}&DeviceName={{DeviceName}}&DeviceID={{DeviceID}}&OrderID={{OrderID}}&OrderDate={{OrderDate}}", "ContentType" : "application/x-www-form-urlencoded", "AutoPop" : true, /* Pop up back to the parent after the action is completed */ "AutoReload" : "Data", /* Reload after the action is completed: Data, MetaData, All. */ "Success" : "{{QuantityRequested}} {{name}} ordered", /* Message to display after the action is completed successfully */ "Failure" : "Order failed"/* Message to display after the action failed */ } ], "Properties" : [ /* More info about the properties of the object */ { "Name" : "name", "Attr":"READONLY", "Caption":"Name" }, { "Name" : "Quantity", "Attr":"READONLY" }, { "Name" : "QuantityRequested", "Attr":"EDITABLE", "Range":[0, 100] }, { "Name" : "OrderDate", "Attr":"DATE", "Format":"MM/DD/YYYY HH:mm:SS" }, { "Name" : "WebSite", "Attr":"HTML", "Caption":"WebSite about {{name}}" } ] } |
|
|
Json MetaData Commented { "Caption" : "{{PatientName}} - {{VisitStatus}}", /* Template defining the caption of the object */ "IDProperty" : "ID", /* The property to use as the identifier */ /* The sections and the properties order. */ "DisplayOrder" : "Sexe,Age,@Visit,ScheduledTime,StartTime,EndTime,VisitStatus,@Address,Address,Location", "Sort" : "ScheduledTime", /* The property to use to sort the objects */ "NewProperties" : [ /* Properties to add the first time or each time the dialog is opened */ { "Name" : "StartTime",/* Set this property with the current time */ "Value" : "$Now", /* the first time the object is displayed */ "AutoReset" : false }, { "Name" : "EndTime",/* Set this property with the current time */ "Value" : "$Now", /* every time the object is displayed */ "AutoReset" : true } ], "Actions" : [ { "Name" : "Start", /* Name of the action */ "Visible" : "$.VisitStatus=='Scheduled'", /* Rule defining if the button is visible */ "Method" : "Post", /* Http method */ "Url" : "http://fredericaltorres.jsonbdemos.jit.su/patientvisits/update", /* Url */ /* Http post body */ "Parameters" : "ID={{ID}}&StartTime={{StartTime}}&EndTime={{EndTime}}&VisitStatus=Started", "ContentType" : "application/x-www-form-urlencoded", /* Expected content type */ "AutoPop" : true, /* Pop up back to the parent after the action is completed */ "AutoReload" : "Data", /* Reload after the action is completed */ "Success" : null, /* Message to display after the action is completed successfully */ "Failure" : "Operation Failed\n{{$HttpResponse}}"/* Message to display after the action failed */ }, { "Name" : "Done", "Visible" : "$.VisitStatus=='Started'", "Method" : "Post", "Url" : "http://fredericaltorres.jsonbdemos.jit.su/patientvisits/update", "Parameters" : "ID={{ID}}&StartTime={{StartTime}}&EndTime={{EndTime}}&VisitStatus=Done", "ContentType" : "application/x-www-form-urlencoded", "AutoPop" : true, "AutoReload" : "Data", "Success" : null, "Failure" : "Operation Failed\n{{$HttpResponse}}" } ], "Properties" : [ /* More info about the properties of the object */ { "Name":"ScheduledTime", "Attr":",DATE", "Format": "DAY DD-MM HH:mm" }, { "Name":"StartTime", "Attr":"DATE", "Format": "DAY DD-MM HH:mm" }, { "Name":"EndTime", "Attr":"DATE", "Format": "DAY DD-MM HH:mm" }, { "Name":"Sexe", "Attr":"EDITABLE,MONOSELECT", "Values":["Male", "Female"] }, { "Name":"Phone", "Attr":"PHONE" }, { "Name":"Location", "Attr":"GEOLOCATION", "Caption":"Map" }, { "Name":"Comment", "Attr":"EDITABLE" }, { "Name":"VisitStatus", "Attr":"READONLY", "Caption":"Status" } ] } |