Commit 2b79140a authored by Xiaowu Zhang's avatar Xiaowu Zhang
Browse files

erp5_travel_expense: available to change language

parent 93066800
...@@ -125,8 +125,6 @@ gadget_erp5.css\n ...@@ -125,8 +125,6 @@ gadget_erp5.css\n
gadget_global.js\n gadget_global.js\n
gadget_jio.html\n gadget_jio.html\n
gadget_jio.js\n gadget_jio.js\n
gadget_translate.html\n
gadget_translate.js\n
handlebars.js\n handlebars.js\n
jiodev.js\n jiodev.js\n
jquery.js\n jquery.js\n
...@@ -140,7 +138,7 @@ gadget_officejs_page_add_document.html\n ...@@ -140,7 +138,7 @@ gadget_officejs_page_add_document.html\n
gadget_officejs_page_login.html\n gadget_officejs_page_login.html\n
gadget_officejs_page_logout.html\n gadget_officejs_page_logout.html\n
gadget_officejs_page_sync.html\n gadget_officejs_page_sync.html\n
gadget_translation.html\n gadget_hr_translation.html\n
gadget_officejs_widget_listbox.html\n gadget_officejs_widget_listbox.html\n
gadget_erp5_editor_panel.html\n gadget_erp5_editor_panel.html\n
gadget_erp5_editor_panel.js\n gadget_erp5_editor_panel.js\n
...@@ -151,8 +149,8 @@ gadget_officejs_page_login.js\n ...@@ -151,8 +149,8 @@ gadget_officejs_page_login.js\n
gadget_officejs_page_logout.js\n gadget_officejs_page_logout.js\n
gadget_officejs_page_sync.js\n gadget_officejs_page_sync.js\n
gadget_officejs_router.js\n gadget_officejs_router.js\n
gadget_translation.js\n gadget_hr_translation.js\n
gadget_translation_data.js\n gadget_hr_translation_data.js\n
gadget_officejs_widget_listbox.js\n gadget_officejs_widget_listbox.js\n
erp5_launcher.js\n erp5_launcher.js\n
erp5_launcher.html\n erp5_launcher.html\n
...@@ -350,7 +348,7 @@ NETWORK:\n ...@@ -350,7 +348,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.54357.20081.48708</string> </value> <value> <string>956.54751.3513.37683</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -368,7 +366,7 @@ NETWORK:\n ...@@ -368,7 +366,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1485185223.06</float> <float>1486474400.78</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -114,6 +114,7 @@ gadget_officejs_calendar.html/renderjs.js\n ...@@ -114,6 +114,7 @@ gadget_officejs_calendar.html/renderjs.js\n
gadget_officejs_calendar.html/jquery.js\n gadget_officejs_calendar.html/jquery.js\n
gadget_officejs_calendar.html/fullcalendar.min.js\n gadget_officejs_calendar.html/fullcalendar.min.js\n
gadget_officejs_calendar.html/fullcalendar.min.css\n gadget_officejs_calendar.html/fullcalendar.min.css\n
gadget_officejs_calendar.html/locale-all.js\n
\n \n
NETWORK:\n NETWORK:\n
*</string> </value> *</string> </value>
...@@ -251,7 +252,7 @@ NETWORK:\n ...@@ -251,7 +252,7 @@ NETWORK:\n
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.35742.5405.23739</string> </value> <value> <string>956.44329.14852.21316</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -269,7 +270,7 @@ NETWORK:\n ...@@ -269,7 +270,7 @@ NETWORK:\n
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1484044752.92</float> <float>1486481468.06</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<script src='jquery.js'></script> <script src='jquery.js'></script>
<script src='moment.min.js'></script> <script src='moment.min.js'></script>
<script src='fullcalendar.min.js'></script> <script src='fullcalendar.min.js'></script>
<script src='locale-all.js'></script>
<script src="gadget_officejs_calendar.js" type="text/javascript"></script> <script src="gadget_officejs_calendar.js" type="text/javascript"></script>
</head> </head>
<body> <body>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.35778.19451.60962</string> </value> <value> <string>957.10458.912.55483</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1484052072.72</float> <float>1486464485.44</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -13,13 +13,23 @@ ...@@ -13,13 +13,23 @@
// Acquired methods // Acquired methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareAcquiredMethod("changeUrl", "changeUrl") .declareAcquiredMethod("changeUrl", "changeUrl")
.declareAcquiredMethod("getSetting", "getSetting")
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) { .declareMethod("render", function (options) {
var gadget = this; var gadget = this,
$('#calendar').fullCalendar({ data = {
fr: {
listDay: 'Jour',
listWeek:'Semaine'},
en: {
listDay: 'Day',
listWeek:'Week'
}
},
calendar_options = {
header: { header: {
left: 'prev,next today', left: 'prev,next today',
center: 'title', center: 'title',
...@@ -31,8 +41,8 @@ ...@@ -31,8 +41,8 @@
// customize the button names, // customize the button names,
// otherwise they'd all just say "list" // otherwise they'd all just say "list"
views: { views: {
listDay: { buttonText: 'list day' }, listDay: { buttonText: 'listDay' },
listWeek: { buttonText: 'list week' } listWeek: { buttonText: 'listWeek' }
}, },
eventClick: function(event) { eventClick: function(event) {
if (event.url) { if (event.url) {
...@@ -47,6 +57,12 @@ ...@@ -47,6 +57,12 @@
editable: true, editable: true,
eventLimit: true, // allow "more" link when too many events eventLimit: true, // allow "more" link when too many events
events: options.events events: options.events
};
return gadget.getSetting('selected_language')
.push(function (lang) {
calendar_options.locale = lang;
calendar_options.buttonText = data[lang] || data.en;
$('#calendar').fullCalendar(calendar_options);
}); });
}); });
}(window, rJS, RSVP)); }(window, rJS, RSVP));
\ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.35891.33118.11844</string> </value> <value> <string>957.10550.15266.24593</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1484054059.9</float> <float>1486465349.95</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
} else { } else {
ops.state = state.sync_state; ops.state = state.sync_state;
} }
return template(ops); return gadget.translateHtml(template(ops));
}) })
.push(function (html) { .push(function (html) {
var discussion_div; var discussion_div;
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>supercedriclen</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.57543.33928.60006</string> </value> <value> <string>956.58658.21925.32853</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1485352808.19</float> <float>1486473658.84</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
select_options: select_options, select_options: select_options,
not_readonly: !state.readonly not_readonly: !state.readonly
}; };
return template(ops); return gadget.translateHtml(template(ops));
}) })
.push(function (html) { .push(function (html) {
gadget.props.element.innerHTML = html; gadget.props.element.innerHTML = html;
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>supercedriclen</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.57517.36246.49305</string> </value> <value> <string>956.58658.21925.32853</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1485352429.99</float> <float>1486473882.26</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Web Script" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Anonymous</string>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/javascript</string> </value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>locale-all.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_hr_locale-all_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
<value> <string>en</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>3.1.0</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>document_publication_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>edit_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>processing_status_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>publish_alive</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1486459590.22</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>published_alive</string> </value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>edit</string> </value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>957.10457.11412.46882</string> </value>
</item>
<item>
<key> <string>state</string> </key>
<value> <string>current</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1486464501.78</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>error_message</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_processing_state</string> </key>
<value> <string>empty</string> </value>
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>0.0.0.0</string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1486459512.7</float>
<string>UTC</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
} else { } else {
ops.state = state.sync_state; ops.state = state.sync_state;
} }
return template(ops); return gadget.translateHtml(template(ops));
}) })
.push(function (html) { .push(function (html) {
var discussion_div; var discussion_div;
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>supercedriclen</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.57502.32307.34304</string> </value> <value> <string>956.58658.21925.32853</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1485351571.43</float> <float>1486473814.12</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -8,13 +8,12 @@ ...@@ -8,13 +8,12 @@
<!-- renderjs --> <!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script> <script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script> <script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<!-- custom script --> <!-- custom script -->
<script src="gadget_officejs_page_hr_front.js" type="text/javascript"></script> <script src="gadget_officejs_page_hr_front.js" type="text/javascript"></script>
</head> <script class="front-template" type="text/x-handlebars-template">
<body>
<article class="ui-body-c document-access"> <article class="ui-body-c document-access">
<section class="ui-body-c ui-content-section"> <section class="ui-body-c ui-content-section">
<div class="ui-controlgroup ui-controlgroup-horizontal"> <div class="ui-controlgroup ui-controlgroup-horizontal">
...@@ -22,7 +21,7 @@ ...@@ -22,7 +21,7 @@
<div class="ui-block-a"> <div class="ui-block-a">
<form class="synchro-form view-web-page-form"> <form class="synchro-form view-web-page-form">
<button type="submit" data-i18n="Send & Receive" data-theme="c" class=" ui-btn ui-btn-c ui-shadow ui-corner-all">Send & Receive</button> <button type="submit" data-i18n="Send & Receive" data-theme="c" class=" ui-btn ui-btn-c ui-shadow ui-corner-all">Send & Receive</button>
<span>Last Synchronization Date:</span> <span data-i18n='Last Synchronization Date:'>Last Synchronization Date:</span>
<span class="last_sync_date" style='color: red;'></span> <span class="last_sync_date" style='color: red;'></span>
</form> </form>
</div> </div>
...@@ -33,7 +32,7 @@ ...@@ -33,7 +32,7 @@
<section class=""> <section class="">
<h3 class="ui-body-c"> <h3 class="ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-plus">&nbsp;</span> <span class="ui-icon ui-icon-custom ui-icon-plus">&nbsp;</span>
Add <span data-i18n='Add'>Add</span>
</h3> </h3>
</section> </section>
<section class="ui-body-c ui-content-section"> <section class="ui-body-c ui-content-section">
...@@ -54,22 +53,26 @@ ...@@ -54,22 +53,26 @@
<section class=""> <section class="">
<h3 class="ui-body-c"> <h3 class="ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-exchange">&nbsp;</span> <span class="ui-icon ui-icon-custom ui-icon-exchange">&nbsp;</span>
Elements to Answer <span data-i18n='Elements to Answer'>Elements to Answer</span>
</h3> </h3>
</section> </section>
<section class="ui-body-c ui-content-section"> <section class="ui-body-c ui-content-section">
<div data-gadget-url="gadget_officejs_widget_listbox.html" data-gadget-scope="listbox-suspended"></div> <div class="listbox-suspended"></div>
</section> </section>
<section class=""> <section class="">
<h3 class="ui-body-c"> <h3 class="ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-exchange">&nbsp;</span> <span class="ui-icon ui-icon-custom ui-icon-exchange">&nbsp;</span>
Elements to Post <span data-i18n='Elements to Post'>Elements to Post</span>
</h3> </h3>
</section> </section>
<section class="ui-body-c ui-content-section"> <section class="ui-body-c ui-content-section">
<div data-gadget-url="gadget_officejs_widget_listbox.html" data-gadget-scope="listbox-draft"></div> <div class="listbox-draft"></div>
</section> </section>
</article> </article>
</script>
</head>
<body>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>supercedriclen</string> </value> <value> <string>zope</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.57534.1636.37307</string> </value> <value> <string>957.10731.56466.35430</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1485352210.95</float> <float>1486476459.13</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -2,8 +2,12 @@ ...@@ -2,8 +2,12 @@
/*jslint indent: 2, nomen: true, maxlen: 80*/ /*jslint indent: 2, nomen: true, maxlen: 80*/
(function (window, RSVP, rJS) { (function (window, RSVP, rJS) {
"use strict"; "use strict";
var gadget_klass = rJS(window),
rJS(window) source = gadget_klass.__template_element
.querySelector(".front-template")
.innerHTML,
template = Handlebars.compile(source);
gadget_klass
.ready(function (g) { .ready(function (g) {
g.props = {}; g.props = {};
return g.getElement() return g.getElement()
...@@ -31,6 +35,7 @@ ...@@ -31,6 +35,7 @@
}); });
}) })
.declareAcquiredMethod("translate", "translate") .declareAcquiredMethod("translate", "translate")
.declareAcquiredMethod("translateHtml", "translateHtml")
.declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("updateHeader", "updateHeader") .declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod('getSetting', 'getSetting') .declareAcquiredMethod('getSetting', 'getSetting')
...@@ -60,6 +65,10 @@ ...@@ -60,6 +65,10 @@
var gadget = this; var gadget = this;
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
return gadget.translateHtml(template());
})
.push(function (html) {
gadget.props.element.innerHTML = html;
return gadget.getSetting('last_sync_date'); return gadget.getSetting('last_sync_date');
}) })
.push(function (result) { .push(function (result) {
...@@ -67,8 +76,8 @@ ...@@ -67,8 +76,8 @@
gadget.props.portal_type = "Expense Record"; gadget.props.portal_type = "Expense Record";
gadget.props.document_title_plural = "Expense Requests"; gadget.props.document_title_plural = "Expense Requests";
return RSVP.all([ return RSVP.all([
gadget.getDeclaredGadget("listbox-suspended"), gadget.declareGadget("gadget_officejs_widget_listbox.html", {element: gadget.props.element.querySelector(".listbox-suspended")}),
gadget.getDeclaredGadget("listbox-draft") gadget.declareGadget("gadget_officejs_widget_listbox.html", {element: gadget.props.element.querySelector(".listbox-draft")})
]); ]);
}) })
.push(function (listbox_gadget_list) { .push(function (listbox_gadget_list) {
......
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.58972.41616.25838</string> </value> <value> <string>957.10736.21518.26248</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1485438762.42</float> <float>1486476551.71</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
<li><a href="#page=localisation" data-i18n="Map">Map</a></li> <li><a href="#page=localisation" data-i18n="Map">Map</a></li>
<li><a href="#page=expense_report" data-i18n="Reports">Reports</a></li> <li><a href="#page=expense_report" data-i18n="Reports">Reports</a></li>
<!-- li><a href="#page=jio_configurator" data-i18n="Storage Configuration">Storage Configuration</a></li --> <!-- li><a href="#page=jio_configurator" data-i18n="Storage Configuration">Storage Configuration</a></li -->
<li><a href="#page=preference" data-i18n="Preferences">PReferences</a></li>
<li><a href="#page=sync&auto_repair=true" data-i18n="Synchronize">Synchronize</a></li> <li><a href="#page=sync&auto_repair=true" data-i18n="Synchronize">Synchronize</a></li>
</ul> </ul>
</div> </div>
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.58658.21925.32853</string> </value> <value> <string>957.9325.31917.28330</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1486391849.21</float> <float>1486477634.11</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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