Commit 2b8ef361 authored by Yusei Tahara's avatar Yusei Tahara

Initial version of HTML5 offline support travel expense app.

parent 487001ac
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>100.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_viewAsJio</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>100.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Currency_viewAsJio</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>100.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_viewAsJio</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_list</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ExpenseRecordModule_viewExpenseRecordList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>jio_view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>100.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ExpenseRecord_viewAsJio</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ExpenseRecord_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_list</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ExpenseValidationItemModule_viewExpenseValidationItemList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ExpenseValidationItem_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<module>
<id>expense_record_module</id>
<permission_list>
<permission type='tuple'>
<name>Access Transient Objects</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access contents information</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access session data</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal content</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal folders</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Change local roles</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Copy or Move</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Delete objects</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>List folder contents</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Modify portal content</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View History</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
</permission_list>
<portal_type>Expense Record Module</portal_type>
<title>Expense Records</title>
</module>
\ No newline at end of file
<module>
<id>expense_validation_item_module</id>
<permission_list>
<permission type='tuple'>
<name>Access Transient Objects</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access contents information</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access session data</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal content</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal folders</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Change local roles</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Copy or Move</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Delete objects</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>List folder contents</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Modify portal content</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View History</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
</permission_list>
<portal_type>Expense Validation Item Module</portal_type>
<title>Expense Validation Items</title>
</module>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_createExpenseValidationItem</string> </value>
</item>
<item>
<key> <string>automatic_solve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>travel_expense_create_validation_item</string> </value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>periodicity_month</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1435665600.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Create Expense Validation Item</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Jio Gadget</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="travel_expense_renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_travel_expense_jio.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="gadget_jio.html"
data-gadget-scope="jio_gadget"
data-gadget-sandbox="public"></div>
</body>
</html>
\ No newline at end of file
/*global window, rJS, FormData, document, RSVP, console */
/*jslint indent: 2, maxerr: 3 */
(function (window, rJS) {
"use strict";
var timeout = 10000;
function S4() {
return ('0000' + Math.floor(
Math.random() * 0x10000 /* 65536 */
).toString(16)).slice(-4);
}
function UUID() {
return S4() + S4() + "-" +
S4() + "-" +
S4() + "-" +
S4() + "-" +
S4() + S4() + S4();
}
function wrapManagerJioAccess(gadget, method_name, argument_list) {
return gadget.getDeclaredGadget('jio_gadget')
.push(function (jio_gadget) {
return jio_gadget[method_name].apply(jio_gadget, argument_list);
});
}
function wrapJioAccess(gadget, method_name, argument_list) {
if (gadget.state_parameter_dict.user_type === "manager") {
return wrapManagerJioAccess(gadget, method_name, argument_list);
}
if (gadget.state_parameter_dict.user_type === "user") {
return gadget.getDeclaredGadget('gadget_webrtc_datachannel.html')
.push(function (rtc_gadget) {
gadget.state_parameter_dict.message_count += 1;
gadget.state_parameter_dict.message_dict[gadget.state_parameter_dict.message_count] = RSVP.defer();
return RSVP.all([
rtc_gadget.send(JSON.stringify({
id: gadget.state_parameter_dict.message_count,
type: "jio_query",
method_name: method_name,
argument_list: Array.prototype.slice.call(argument_list)
})),
RSVP.any([
RSVP.timeout(timeout),
gadget.state_parameter_dict.message_dict[gadget.state_parameter_dict.message_count].promise
])
]);
})
.push(function (result_list) {
return result_list[1];
});
}
throw new Error("NotImplemented wrapJioAccess for: " + gadget.state_parameter_dict.user_type);
}
function declareSubGadget(gadget, url) {
var container_element = gadget.state_parameter_dict.element.querySelector("." + url.split(".")[0]),
element = document.createElement("div");
container_element.innerHTML = "";
container_element.appendChild(element);
return gadget.declareGadget(url, {
element: element,
scope: url,
sandbox: "public"
});
}
rJS(window)
.ready(function (gadget) {
// Initialize the gadget local parameters
gadget.state_parameter_dict = {
websocket_initialized: false,
user_type: null
};
return gadget.getElement()
.push(function (element) {
gadget.state_parameter_dict.element = element;
});
})
.allowPublicAcquisition('notifyDataChannelClosed', function () {
return;
})
.allowPublicAcquisition("notifyDataChannelMessage", function (argument_list, scope) {
var json = JSON.parse(argument_list[0]),
rtc_gadget,
context = this;
if (context.state_parameter_dict.user_type === "manager") {
return context.getDeclaredGadget(scope)
.push(function (g) {
rtc_gadget = g;
// XXX Propagate arguments
return wrapManagerJioAccess(context, json.method_name, json.argument_list);
})
.push(function (result) {
return rtc_gadget.send(JSON.stringify({
id: json.id,
result: result,
type: "jio_response"
}));
}, function (error) {
return rtc_gadget.send(JSON.stringify({
id: json.id,
result: error,
type: "error"
}));
});
}
if (context.state_parameter_dict.user_type === "user") {
if (json.type === "jio_response") {
context.state_parameter_dict.message_dict[json.id].resolve(json.result);
} else {
context.state_parameter_dict.message_dict[json.id].reject(json.result);
}
} else {
throw new Error("Unexpected WebRTC message");
}
})
.allowPublicAcquisition("notifyWebSocketClosed", function () {
if (this.state_parameter_dict.user_type !== "user") {
throw new Error("Unexpected Web Socket connection close");
}
})
.allowPublicAcquisition("notifyWebSocketMessage", function (argument_list) {
var json = JSON.parse(argument_list[0]),
rtc_gadget,
socket_gadget,
gadget = this;
if ((json.action === "offer") && (gadget.state_parameter_dict.user_type === "manager")) {
return gadget.getDeclaredGadget("gadget_websocket.html")
.push(function (gg) {
gadget.state_parameter_dict.counter += 1;
socket_gadget = gg;
var new_element = document.createElement("div");
gadget.state_parameter_dict.element.querySelector(".gadget_webrtc_datachannel").appendChild(new_element);
return gadget.declareGadget("gadget_webrtc_datachannel.html", {
scope: "webrtc" + gadget.state_parameter_dict.counter,
element: new_element
});
})
.push(function (gg) {
rtc_gadget = gg;
return rtc_gadget.createAnswer(json.from, json.data);
})
.push(function (local_connection) {
return socket_gadget.send(JSON.stringify({to: json.from, action: "answer", data: local_connection}));
})
.push(function () {
return rtc_gadget.waitForConnection();
})
.push(undefined, function (error) {
console.error(error);
throw error;
});
}
if ((json.action === "answer") && (gadget.state_parameter_dict.user_type === "user")) {
if (json.to === gadget.state_parameter_dict.uuid) {
gadget.state_parameter_dict.answer_defer.resolve(json.data);
}
}
})
.declareMethod('createJio', function (jio_options) {
var context = this,
socket_gadget,
rtc_gadget;
return declareSubGadget(context, 'gadget_websocket.html')
.push(function (gadget) {
socket_gadget = gadget;
// Check if this is a manager access
return socket_gadget.createSocket("ws://127.0.0.1:9999/")
.push(function () {
// Nothing to do except waiting for new webrtc offer
context.state_parameter_dict.user_type = "manager";
context.state_parameter_dict.counter = 0;
return context.getDeclaredGadget('jio_gadget')
.push(function (jio_gadget) {
return jio_gadget.createJio(jio_options);
});
}, function () {
// XXX Catch right type of error
context.state_parameter_dict.user_type = "user";
context.state_parameter_dict.uuid = UUID();
context.state_parameter_dict.answer_defer = RSVP.defer();
context.state_parameter_dict.message_count = 0;
context.state_parameter_dict.message_dict = {};
return declareSubGadget(context, 'gadget_websocket.html')
.push(function (gadget) {
socket_gadget = gadget;
// XXX Drop hardcoded URL
return socket_gadget.createSocket("ws://192.168.242.76:9999/");
})
.push(function () {
return declareSubGadget(context, 'gadget_webrtc_datachannel.html');
})
.push(function (gadget) {
rtc_gadget = gadget;
return rtc_gadget.createOffer(context.state_parameter_dict.uuid);
})
.push(function (description) {
// Send offer and expect answer in less than XXXms (arbitrary value...)
return RSVP.any([
RSVP.timeout(timeout),
RSVP.all([
socket_gadget.send(JSON.stringify({from: context.state_parameter_dict.uuid, action: "offer", data: description})),
context.state_parameter_dict.answer_defer.promise
])
]);
})
.push(function (response_list) {
return rtc_gadget.registerAnswer(response_list[1]);
})
.push(function () {
return socket_gadget.close();
});
});
});
})
.declareMethod('allDocs', function () {
return wrapJioAccess(this, 'allDocs', arguments);
})
.declareMethod('get', function () {
return wrapJioAccess(this, 'get', arguments);
})
.declareMethod('put', function () {
return wrapJioAccess(this, 'put', arguments);
})
.declareMethod('post', function () {
return wrapJioAccess(this, 'post', arguments);
})
.declareMethod('remove', function () {
return wrapJioAccess(this, 'remove', arguments);
})
/*
.declareMethod('allAttachments', function () {
return wrapJioAccess(this, 'allAttachments', arguments);
})
.declareMethod('getAttachment', function () {
return wrapJioAccess(this, 'getAttachment', arguments);
})
.declareMethod('putAttachment', function () {
return wrapJioAccess(this, 'putAttachment', arguments);
})
.declareMethod('removeAttachment', function () {
return wrapJioAccess(this, 'removeAttachment', arguments);
})
*/
.declareMethod('repair', function () {
return wrapJioAccess(this, 'repair', arguments);
});
}(window, rJS));
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Expense Record Module Add Expense Record</title>
<script src="rsvp.js"></script>
<script src="travel_expense_renderjs.js"></script>
<script src="gadget_global.js" ></script>
<script src="handlebars.js"></script>
<script src="gadget_travel_expense_jio_expense_record_module_add_expense_record.js"></script>
<script class="new-expense-record-template" type="text/x-handlebars-template">
<form class="new-expense-record-form">
<div class="ui-field-contain">
<label data-i18n="Photo">Photo</label>
<input name="photo" type="file" accept="image/*" capture="camera">
<canvas style="display:none" name="photo_data" />
</div>
<div class="ui-field-contain">
<label data-i18n="Preview">Preview</label>
<img name="preview" style="width:300px" />
</div>
<div class="ui-field-contain">
<label data-i18n="Currency">Currency</label>
<select class="new-performed-task" name="resource" required>
<option value=""></option>
</select>
</div>
<div class="ui-field-contain">
<label data-i18n="Total Price">Total Price</label>
<input type="number" name="quantity" value="" step="0.01" required>
</div>
<div class="ui-field-contain">
<label data-i18n="Input Date">Input Date</label>
<input type="date" name="date" value="{{date}}" required>
</div>
<div class="ui-field-contain">
<label data-i18n="Comment">Comment</label>
<input type="text" name="comment">
</div>
<div class="ui-field-contain">
<label data-i18n="Sync Method">Sync Method</label>
<div>
<input type="radio" id="sync_flag_yes" name="sync_flag" value="1">
<label for="sync_flag_yes" data-i18n="Ready To Sync">Ready To Sync</label>
<input type="radio" id="sync_flag_no" name="sync_flag" value="" checked>
<label for="sync_flag_no" data-i18n="Do Not Sync">Do Not Sync</label>
</div>
</div>
<div data-role="popup" name="large_preview" data-position-to="window" data-theme="a" data-overlay-theme="a" data-corners="false"><img></div>
<input data-inline="true" type="submit" value="Add" data-theme="b" data-i18n="[value]Add">
</form>
</script>
</head>
<body>
</body>
</html>
/*globals window, document, RSVP, rJS, Handlebars, promiseEventListener, loopEventListener, jQuery*/
/*jslint indent: 2, nomen: true, maxlen: 200*/
(function (window, document, RSVP, rJS, Handlebars, promiseEventListener, loopEventListener, $, MegaPixImage) {
"use strict";
var gadget_klass = rJS(window),
source = gadget_klass.__template_element
.querySelector(".new-expense-record-template")
.innerHTML,
template = Handlebars.compile(source);
gadget_klass
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
g.props.deferred = RSVP.defer();
});
})
.declareAcquiredMethod("post", "jio_post")
.declareAcquiredMethod('allDocs', 'jio_allDocs')
.declareAcquiredMethod('get', 'jio_get')
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareAcquiredMethod('jio_remove', 'jio_remove')
.declareMethod("render", function (options) {
var gadget = this;
gadget.props.options = options;
return gadget.translateHtml(template({
date: new Date().toISOString().split('T')[0]
}))
.push(function (html) {
gadget.props.element.innerHTML = html;
return gadget.updateHeader({
title: "New Expense Record"
});
})
.push(function () {
gadget.props.deferred.resolve();
});
})
/////////////////////////////////////////
// Form submit
/////////////////////////////////////////
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.promise;
})
.push(function () {
return promiseEventListener(
gadget.props.element.querySelector('form.new-expense-record-form'),
'submit',
false
);
})
.push(function (submit_event) {
var i,
doc = {
// XXX Hardcoded
parent_relative_url: "expense_record_module",
portal_type: "Expense Record",
doc_id: getSequentialID('EXP'),
visible_in_html5_app_flag: 1,
record_revision: 1,
};
gadget.props.element.querySelector("input[type=submit]")
.disabled = true;
for (i = 0; i < submit_event.target.length; i += 1) {
// XXX Should check input type instead
if (submit_event.target[i].name) {
if ((submit_event.target[i].type == "radio" || submit_event.target[i].type == "checkbox") && !submit_event.target[i].checked){
continue
}
if (submit_event.target[i].name=="photo") {
if (submit_event.target[i].files.length > 0){
var photo_data = gadget.props.element.querySelector('canvas[name="photo_data"]')
doc['photo_data'] = photo_data.toDataURL()
}else{
doc['photo_data'] = ''
}
continue
}
doc[submit_event.target[i].name] = submit_event.target[i].value;
}
}
if (doc.sync_flag != "1"){
doc.portal_type = 'Expense Record Temp' // For to avoid sync
}
return gadget.post(doc);
})
.push(function () {
return gadget.redirect({
jio_key: gadget.props.options.jio_key,
page: "view"
});
});
})
/////////////////////////////////////////
// Fill currencies
/////////////////////////////////////////
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.promise;
})
.push(function(){createResourceSelection(gadget, my_resource)})
})
/////////////////////////////////////////
// Photo changed.
/////////////////////////////////////////
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.promise;
})
.push(function () {
return loopEventListener(
gadget.props.element.querySelector('input[name="photo"]'),
"change",
false,
function (evt) {
return new RSVP.Queue()
.push(function () {
// Wait for user to finish typing
return RSVP.delay(100);
})
.push(function () {
var file = gadget.props.element.querySelector('input[name="photo"]').files[0];
var photo_data = gadget.props.element.querySelector('canvas[name="photo_data"]');
new MegaPixImage(file).render(photo_data, { width: 600 }, function(){gadget.props.element.querySelector('img[name="preview"]').src = photo_data.toDataURL();});
});
}
);
});
})
/////////////////////////////////////////
// Preview clicked.
/////////////////////////////////////////
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.props.deferred.promise;
})
.push(function () {
return loopEventListener(
gadget.props.element.querySelector('img[name="preview"]'),
"click",
false,
function (evt) {
return new RSVP.Queue()
.push(function () {
// Wait for user to finish typing
return RSVP.delay(100);
})
.push(function () {
$('div[name=large_preview]').popup('open', 0, 0, 'slidedown', 'window');
$('div[name=large_preview] img').attr('src', gadget.props.element.querySelector('canvas[name=photo_data]').toDataURL());
});
}
);
});
});
}(window, document, RSVP, rJS, Handlebars, promiseEventListener, loopEventListener, jQuery, MegaPixImage));
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Expense Record Module View</title>
<script src="rsvp.js"></script>
<script src="travel_expense_renderjs.js"></script>
<script src="gadget_global.js" ></script>
<script src="gadget_travel_expense_jio_expense_record_module_view.js"></script>
</head>
<body>
<div data-gadget-url="gadget_travel_expense_widget_listbox.html" data-gadget-scope="listbox"></div>
</body>
</html>
/*globals window, RSVP, rJS*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, RSVP, rJS) {
"use strict";
rJS(window)
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
.declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this;
return this.jio_allDocs.apply(this, param_list)
.push(function (result) {
var i,
len;
for (i = 0, len = result.data.total_rows; i < len; i += 1) {
// XXX jIO does not create UUID with module inside
result.data.rows[i].value.state = getWorkflowState(result.data.rows[i].value.portal_type, result.data.rows[i].id, result.data.rows[i].value.sync_flag);
}
return result;
});
})
.declareMethod("render", function (options) {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return gadget.getUrlFor({jio_key: options.jio_key,
page: "add_expense_record"});
})
.push(function (url) {
return gadget.updateHeader({
title: "Expense Record",
right_url: url,
right_title: "New"
});
})
.push(function () {
return gadget.getDeclaredGadget("listbox");
})
.push(function (listbox) {
return listbox.render({
jio_key: options.jio_key,
search: options.search,
begin_from: options.begin_from,
column_list: [{
select: 'comment',
title: 'Comment'
}, {
select: 'quantity',
title: 'Total Price'
}, {
select: 'resource',
title: 'Currency'
}, {
select: 'date',
title: 'Input Date'
}, {
select: 'doc_id',
title: 'ID'
}, {
select: 'state',
title: 'State'
}],
query: {
query: 'visible_in_html5_app_flag:1 AND portal_type:("Expense Record" OR "Expense Record Temp")',
select_list: ['doc_id', 'quantity', 'resource',
'comment', 'date', 'portal_type', 'sync_flag'],
sort_on: [["doc_id", "descending"]]
}
});
});
});
}(window, RSVP, rJS));
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Expense Record Module View Expense Record</title>
<script src="rsvp.js"></script>
<script src="travel_expense_renderjs.js"></script>
<script src="gadget_global.js" ></script>
<script src="handlebars.js"></script>
<script class="view-expense-record-template" type="text/x-handlebars-template">
<form class="view-expense-record-form">
<div class="ui-field-contain">
<label data-i18n="State">State</label>
<div id="state">{{state}}</div>
</div>
<div class="ui-field-contain">
<label data-i18n="Photo">Photo</label>
<input name="photo" type="file" accept="image/*" capture="camera">
<canvas style="display:none" name="photo_data" />
</div>
<div class="ui-field-contain">
<label data-i18n="Preview">Preview</label>
<img name="preview" style="width:300px" />
</div>
<div class="ui-field-contain">
<label data-i18n="Currency">Currency</label>
<select class="new-performed-task" name="resource" required>
<option value=""></option>
</select>
</div>
<div class="ui-field-contain">
<label data-i18n="Total Price">Total Price</label>
<input type="number" name="quantity" value="{{quantity}}" step="0.01" required>
</div>
<div class="ui-field-contain">
<label data-i18n="Input Date">Input Date</label>
<input type="date" name="date" value="{{date}}" required>
</div>
<div class="ui-field-contain">
<label data-i18n="Comment">Comment</label>
<input type="text" name="comment" value="{{comment}}">
</div>
<div class="ui-field-contain">
<label data-i18n="Sync Method">Sync Method</label>
<div>
<input type="radio" id="sync_flag_yes" name="sync_flag" value="1">
<label for="sync_flag_yes" data-i18n="Ready To Sync">Ready To Sync</label>
<input type="radio" id="sync_flag_no" name="sync_flag" value="">
<label for="sync_flag_no" data-i18n="Do Not Sync">Do Not Sync</label>
</div>
</div>
<input data-inline="true" type="submit" name="save" value="Save" data-theme="b" data-i18n="[value]Save">
<div data-role="popup" id="saveMessage" class="ui-content" data-theme="a" data-i18n="Saved changes">Saved changes</div>
<div data-role="popup" name="large_preview" data-position-to="window" data-theme="a" data-overlay-theme="a" data-corners="false"><img></div>
<input data-inline="true" type="button" name="create_new_version" value="Update Data" data-theme="b" data-i18n="[value]Update Data">
<input type="hidden" name="copy_of" value="{{copy_of}}">
</form>
</script>
<script src="gadget_travel_expense_jio_expense_record_view.js"></script>
</head>
<body>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Travel Expense App Login Page</title>
<script src="rsvp.js"></script>
<script src="travel_expense_renderjs.js"></script>
<script src="handlebars.js"></script>
<script src="gadget_global.js" ></script>
<script id="page-template" type="text/x-handlebars-template">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"></div>
<div class="ui-block-b">
<form class="login-form">
<div class="ui-field-contain">
<label data-i18n="Login">Login</label>
<input type="text" name="jid" value="" required>
</div>
<div class="ui-field-contain">
<label data-i18n="Password">Password</label>
<input type="password" name="passwd" value="" required>
</div>
<input data-inline="true" type="submit" data-i18n="[value]Log In" value="Log In" data-theme="b">
</form>
</div>
<div class="ui-block-c"></div>
</div>
</script>
<script src="gadget_travel_expense_page_login.js"></script>
</head>
<body>
</body>
</html>
/*globals window, document, RSVP, rJS, promiseEventListener, Handlebars*/
/*jslint indent: 2, maxlen: 80, nomen: true*/
(function (window, document, RSVP, rJS, promiseEventListener, Handlebars) {
"use strict";
/////////////////////////////////////////////////////////////////
// templates
/////////////////////////////////////////////////////////////////
var gadget_klass = rJS(window),
templater = gadget_klass.__template_element,
template = Handlebars.compile(
templater.getElementById("page-template").innerHTML
);
gadget_klass
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareMethod("render", function () {
var gadget = this;
return gadget.updateHeader({
title: "Connect"
})
.push(function () {
return gadget.translateHtml(template());
})
.push(function (html) {
gadget.props.element.innerHTML = html;
});
})
.declareAcquiredMethod("redirect", "redirect")
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
gadget.props.element.querySelector("input[type=text]")
.focus();
return promiseEventListener(
gadget.props.element.querySelector('form.login-form'),
'submit',
false
);
})
.push(function (evt) {
gadget.props.element.querySelector("input[type=submit]")
.disabled = true;
var login = evt.target.elements[0].value,
passwd = evt.target.elements[1].value;
Cookies.remove('__ac');
Cookies.remove('__ac', {path:''});
Cookies.remove('__ac', {path:'/'});
Cookies.remove('jid');
Cookies.remove('jid', {path:''});
Cookies.remove('jid', {path:'/'});
Cookies.set('__ac', window.btoa(login + ":" + passwd), {expires:36500, path:'/', secure:true})
Cookies.set('jid', login, {expires:36500, path:'/', secure:true})
return gadget.redirect({});
});
});
}(window, document, RSVP, rJS, promiseEventListener, Handlebars));
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Travel Expense App Setting</title>
<script src="rsvp.js"></script>
<script src="travel_expense_renderjs.js"></script>
<script src="gadget_global.js" ></script>
<script src="handlebars.js"></script>
<script class="view-setting-template" type="text/x-handlebars-template">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"></div>
<div class="ui-block-b">
<form class="view-setting-form">
<div class="ui-field-contain">
<label data-i18n="Login">Login</label>
<input type="text" name="jid" value="{{jid}}">
</div>
<div class="ui-field-contain">
<label data-i18n="Password">Password</label>
<input type="password" name="passwd" value="">
</div>
<div class="ui-field-contain">
<label data-i18n="Language">Language</label>
<div>
<input type="radio" id="language_en" name="language" value="en">
<label for="language_en" data-i18n="English">English</label>
</div>
</div>
<input data-inline="true" type="submit" name="save" value="Save" data-theme="b" data-i18n="[value]Save">
</form>
<form class="view-advanced-setting-form">
<input data-inline="true" type="button" name="reset_database" value="Reset Database" data-theme="b" data-i18n="[value]Reset Database">
<input data-inline="true" type="button" name="update_application" value="Update Application" data-theme="b" data-i18n="[value]Update Application">
</form>
</div>
<div class="ui-block-c"></div>
</div>
</script>
<script src="gadget_travel_expense_page_setting.js"></script>
</head>
<body>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Travel Expense App Sync Page</title>
<script src="rsvp.js"></script>
<script src="travel_expense_renderjs.js"></script>
<script src="handlebars.js"></script>
<script src="gadget_global.js" ></script>
<script id="page-template" type="text/x-handlebars-template">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"></div>
<div class="ui-block-b">
<form class="synchro-form">
<input data-inline="true" type="submit" value="Launch Synchronisation" data-i18n="[value]Launch Synchronisation" data-theme="b">
</form>
</div>
<div class="ui-block-c"></div>
</div>
</script>
<script src="gadget_travel_expense_page_sync.js"></script>
</head>
<body>
</body>
</html>
/*globals window, RSVP, rJS, promiseEventListener, Handlebars*/
/*jslint indent: 2, maxlen: 80, nomen: true*/
(function (window, RSVP, rJS, promiseEventListener, Handlebars) {
"use strict";
var gadget_klass = rJS(window),
templater = gadget_klass.__template_element,
template = Handlebars.compile(
templater.getElementById("page-template").innerHTML
);
gadget_klass
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
.declareAcquiredMethod('allDocs', 'jio_allDocs')
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareMethod("render", function () {
var gadget = this;
return gadget.updateHeader({
title: "Synchronisation"
})
.push(function () {
return gadget.translateHtml(template());
})
.push(function (html) {
gadget.props.element.innerHTML = html;
});
})
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("repair", "jio_repair")
.declareAcquiredMethod("post", "jio_post")
.declareService(function () {
var gadget = this;
return new RSVP.Queue()
.push(function () {
return promiseEventListener(
gadget.props.element.querySelector('form.synchro-form'),
'submit',
false
);
})
.push(function () {
gadget.props.element.querySelector("input[type=submit]")
.disabled = true;
})
.push(function () {
return gadget.repair();
})
.push(function () {
alert(translateString('Synchronisation Finished'));
return;
});
});
}(window, RSVP, rJS, promiseEventListener, Handlebars));
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Jio Gadget</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="travel_expense_renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="travel_expense_jiodev_renderjs_storage.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_travel_expense_standalone_jio.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>Translation Gadget</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="travel_expense_renderjs.js" type="text/javascript"></script>
<script src="i18next.js"></script>
<script src="travel_expense_js_cookie.js"></script>
<!-- custom script -->
<script src="gadget_global.js"></script>
<script src="gadget_travel_expense_translation_data.js" type="text/javascript"></script>
<script src="gadget_travel_expense_translation.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
/*globals window*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window) {
"use strict";
window.translation_data = {
fr: {
"Login":"Connexion",
},
en: {
},
};
}(window));
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment