Commit 7409d541 authored by Yusei Tahara's avatar Yusei Tahara

[erp5_officejs] Add drive app to officejs appstore.

parent 47a8c892
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="">
<link rel="shortcut icon" href="favicon.ico">
<title>Drive App</title>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="jquerymobile.css">
<link rel="stylesheet" href="gadget_erp5.css">
<script data-renderjs-configuration="application_title" type="text/x-renderjs-configuration">Drive App</script>
<script data-renderjs-configuration="panel_gadget" type="text/x-renderjs-configuration">gadget_officejs_drive_app_application_panel.html</script>
<script data-renderjs-configuration="action_view" type="text/x-renderjs-configuration">object_view</script>
<script data-renderjs-configuration="default_view_reference" type="text/x-renderjs-configuration">view</script>
<script data-renderjs-configuration="hateoas_url" type="text/x-renderjs-configuration">hateoas/</script>
<script src="jquery.js"></script>
<script src="jquerymobile.js"></script>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_global.js" ></script>
<script src="erp5_launcher.js"></script>
</head>
<body>
<div data-role="page">
<div data-gadget-url="gadget_jio.html"
data-gadget-scope="setting_gadget"
data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_officejs_drive_app_router.html"
data-gadget-scope="router"
data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_translation.html"
data-gadget-scope="translation_gadget"
data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_officejs_header.html"
data-gadget-scope="header"
data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_officejs_jio.html"
data-gadget-scope="jio_gadget"
data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_erp5_editor_panel.html"
data-gadget-scope="editor_panel"
data-gadget-sandbox="public"></div>
<div data-gadget-url="gadget_officejs_application_panel.html"
data-gadget-scope="panel"
data-gadget-sandbox="public"></div>
<div role="main" class="ui-content gadget-content"></div>
</div>
<!-- This is a new dev version -->
</body>
</html>
\ 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>OfficeJS Router Gadget</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_officejs_router.js" type="text/javascript"></script>
</head>
<body>
<script data-renderjs-configuration="portal_type" type="text/x-renderjs-configuration">Drive Record</script>
<script data-renderjs-configuration="document_title" type="text/x-renderjs-configuration">Drive Record</script>
<script data-renderjs-configuration="document_title_plural" type="text/x-renderjs-configuration">Drive Records</script>
<script data-renderjs-configuration="parent_relative_url" type="text/x-renderjs-configuration">drive_record_module</script>
<script data-renderjs-configuration="erp5_attachment_synchro" type="text/x-renderjs-configuration"></script>
<script data-renderjs-configuration="dropbox_app_key" type="text/x-renderjs-configuration">n692ixxhyg9zhqs</script>
<div data-gadget-url="gadget_erp5_router.html" data-gadget-scope="erp5_router"></div>
</body>
</html>
\ 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>OfficeJS Jio Drive Record View</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="handlebars.js"></script>
<script src="gadget_officejs_jio_drive_record_view.js"></script>
</head>
<body>
<form class="save_form ui-body-c" novalidate>
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("getUrlParameter", "getUrlParameter")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_put", "jio_put")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
return this.changeState({
jio_key: options.jio_key,
doc: options.doc
});
})
.onEvent('change', function (event) {
var gadget = this;
if (event.target.getAttribute('name') === 'start' || event.target.getAttribute('name') === 'end') {
var start_input = gadget.element.querySelector('input[name=start]');
var end_input = gadget.element.querySelector('input[name=end]');
var distance_value = 0;
if (start_input.value && end_input.value) {
distance_value = parseInt(end_input.value, 10) - parseInt(start_input.value, 10);
}
var distance_input = gadget.element.querySelector('input[name=distance]');
distance_input.value = distance_value;
}
})
.onEvent('submit', function () {
var gadget = this;
return gadget.notifySubmitting()
.push(function () {
return gadget.getDeclaredGadget('form_view');
})
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (content) {
var doc;
doc = gadget.state.doc;
doc.start = parseInt(content.start, 10);
doc.end = parseInt(content.end, 10);
doc.distance = 0;
if (content.start && content.end) {
doc.distance = parseInt(content.end, 10) - parseInt(content.start, 10);
}
doc.drive_hour = parseInt(content.drive_hour, 10);
doc.comment = content.comment;
doc.modification_date = (new Date()).toISOString();
doc.sync_flag = content.sync_flag;
if (content.sync_flag === "1") {
doc.portal_type = "Drive Record";
doc.parent_relative_url = "drive_record_module";
} else {
doc.portal_type = "Drive Record Temp";
doc.parent_relative_url = "";
}
// XXXX I don't know why it is here.
delete doc.default_sync_flag;
return gadget.jio_put(gadget.state.jio_key, doc);
})
.push(function () {
return RSVP.all([
gadget.notifySubmitted('Data Updated')
]);
});
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
.onStateChange(function () {
var gadget = this;
return gadget.getDeclaredGadget('form_view')
.push(function (form_gadget) {
var editable = gadget.state.editable;
var car_title = gadget.state.doc.car_title;
var start = gadget.state.doc.start.toString();
var end = gadget.state.doc.end.toString();
var distance = gadget.state.doc.distance.toString();
var drive_hour = (gadget.state.doc.drive_hour || "0").toString();
var comment = gadget.state.doc.comment || "";
return form_gadget.render({
erp5_document: {
"_embedded": {"_view": {
"my_start": {
"description": "",
"title": "Start",
"default": start,
"css_class": "",
"required": 0,
"editable": 1,
"key": "start",
"hidden": 0,
"type": "IntegerField"
},
"my_end": {
"description": "",
"title": "End",
"default": end,
"css_class": "",
"required": 0,
"editable": 1,
"key": "end",
"hidden": 0,
"type": "IntegerField"
},
"my_distance": {
"description": "",
"title": "Distance",
"default": distance,
"css_class": "",
"required": 0,
"editable": 1,
"key": "distance",
"hidden": 0,
"type": "IntegerField"
},
"my_drive_hour": {
"description": "",
"title": "Drive Hours",
"default": drive_hour,
"css_class": "",
"required": 0,
"editable": 1,
"key": "drive_hour",
"hidden": 0,
"type": "IntegerField"
},
"my_comment": {
"description": "",
"title": "Comment",
"default": comment,
"css_class": "",
"required": 0,
"editable": 1,
"key": "comment",
"hidden": 0,
"type": "TextAreaField"
},
"my_drive_date": {
"description": "",
"title": "Drive Date",
"default": gadget.state.doc.drive_date,
"css_class": "",
"required": 0,
"editable": 0,
"key": "drive_date",
"hidden": 0,
"type": "StringField"
},
"my_car_title": {
"description": "",
"title": "Car",
"default": car_title,
"css_class": "",
"required": 0,
"editable": 0,
"key": "car_title",
"hidden": 0,
"type": "StringField"
},
"my_sync_flag": {
"description": "",
"title": "Sync?",
"default": gadget.state.doc.sync_flag,
"items": [["YES", "1"], ["NO", "0"]],
"css_class": "",
"required": 0,
"editable": 1,
"key": "sync_flag",
"hidden": 0,
"type": "RadioField"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["my_end"], ["my_start"], ["my_distance"], ["my_drive_hour"], ["my_comment"], ["my_drive_date"], ["my_car_title"], ["my_sync_flag"] ]
]]
}
});
})
.push(function () {
gadget.element.querySelector('input[name=distance]').readOnly = true;
return new RSVP.Queue();
})
.push(function () {
return RSVP.all([
gadget.getUrlFor({command: 'history_previous'}),
gadget.getUrlFor({command: 'selection_previous'}),
gadget.getUrlFor({command: 'selection_next'})
]);
})
.push(function (url_list) {
var save_action = true;
if (gadget.state.jio_key.lastIndexOf("drive_record_module/") === 0) {
save_action = false;
gadget.element.querySelectorAll('input').forEach(function (item) {item.readOnly = true; });
}
var header_dict = {
page_title: gadget.state.doc.jio_key,
selection_url: url_list[0],
previous_url: url_list[1],
next_url: url_list[2]
};
if (save_action) {
header_dict.save_action = true;
}
return gadget.updateHeader(header_dict);
});
});
}(window, rJS, RSVP));
<!DOCTYPE html>
<html>
<!--
data-i18n=Worklist
-->
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 Page Worklist</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_drive_app_configurator_access.js" type="text/javascript"></script>
<!-- XXX must set theme here! -->
<script id="table-template" type="text/x-handlebars-template">
<article class="ui-content ui-body-c document-access">
<section class="ui-content-header-plain">
<h3 class="ui-content-title ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-file-text-o">&nbsp;</span>
Your Documents
</h3>
</section>
<section class="ui-body-c ui-content-section">
<ul data-role="listview" class="document-listview">
<li>
<a href="{{sync_href}}" data-i18n="Synchronize">Synchronize</a>
</li><li>
<a href="{{document_list_href}}" data-i18n="Go to document List">Go to Document List</a>
</li>
</ul>
</section>
</article>
</script>
</head>
<body>
<section class="document_list"></section>
</body>
</html>
\ No newline at end of file
/*global window, rJS, RSVP, Handlebars */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Handlebars) {
"use strict";
/////////////////////////////////////////////////////////////////
// Handlebars
/////////////////////////////////////////////////////////////////
// Precompile the templates while loading the first gadget instance
var gadget_klass = rJS(window),
source = gadget_klass.__template_element
.getElementById("table-template")
.innerHTML,
table_template = Handlebars.compile(source);
gadget_klass
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("getSetting", "getSetting")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (storage_name) {
var gadget = this;
return gadget.getSetting("jio_storage_name", undefined)
.push(function (name) {
if (name === storage_name) {
return RSVP.all([
gadget.getUrlFor({command: "display", options: {page: "drive_app_document_list"}}),
gadget.getUrlFor(
{command: "display", options: {page: "ojs_sync", auto_repair: true}}
),
gadget.getSetting("jio_storage_name", false)
]);
}
return [];
})
.push(function (result) {
if (result[2]) {
return gadget.element.querySelector('.document_list').innerHTML =
table_template({document_list_href: result[0], sync_href: result[1]});
}
});
});
}(window, rJS, RSVP, Handlebars, URI));
\ 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="renderjs.js" type="text/javascript"></script>
<script src="jiodev.js" type="text/javascript"></script>
<script src="jio_mappingstorage.js" type="text/javascript"></script>
<script src="jio_fixstorage.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_drive_app_jio.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
/*global window, rJS, jIO, FormData, UriTemplate */
/*jslint indent: 2, maxerr: 3 */
(function (window, rJS, jIO) {
"use strict";
// jIO call wrapper for redirection to authentication page if needed
function wrapJioCall(gadget, method_name, argument_list) {
var storage = gadget.state_parameter_dict.jio_storage;
if (storage === undefined) {
return gadget.redirect({command: 'display', options: {page: 'drive_app_configurator'}});
}
return storage[method_name].apply(storage, argument_list)
.push(undefined, function (error) {
if ((error.target !== undefined) && (error.target.status === 401)) {
var regexp,
site,
login_page;
if (gadget.state_parameter_dict.jio_storage_name === "ERP5") {
regexp = /^X-Delegate uri=\"(http[s]?:\/\/[\/\-\[\]{}()*+=:?&.,\\\^$|#\s\w%]+)\"$/;
login_page = error.target.getResponseHeader('WWW-Authenticate');
if (regexp.test(login_page)) {
return gadget.getUrlFor({
command: 'login',
absolute_url: true
})
.push(function (came_from) {
return gadget.redirect({
command: 'raw',
options: {
url: UriTemplate.parse(regexp.exec(login_page)[1]).expand({came_from: came_from})
}
});
});
}
}
if (gadget.state_parameter_dict.jio_storage_name === "DAV") {
regexp = /^Nayookie login_url=(http[s]?:\/\/[\/\-\[\]{}()*+=:?&.,\\\^$|#\s\w%]+)$/;
login_page = error.target.getResponseHeader('WWW-Authenticate');
if (regexp.test(login_page)) {
site = UriTemplate.parse(
regexp.exec(login_page)[1]
).expand({
back_url: window.location.href,
origin: window.location.origin
});
}
}
if (site) {
return gadget.redirect({ command: "row", url: site});
}
}
throw error;
});
}
rJS(window)
.ready(function (gadget) {
// Initialize the gadget local parameters
gadget.state_parameter_dict = {};
})
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod('getUrlFor', 'getUrlFor')
.declareMethod('createJio', function (jio_options) {
var gadget = this;
if (jio_options === undefined) {
return;
}
this.state_parameter_dict.jio_storage = jIO.createJIO(jio_options);
return this.getSetting("jio_storage_name")
.push(function (jio_storage_name) {
gadget.state_parameter_dict.jio_storage_name = jio_storage_name;
});
})
.declareMethod('allDocs', function () {
return wrapJioCall(this, 'allDocs', arguments);
})
.declareMethod('allAttachments', function () {
return wrapJioCall(this, 'allAttachments', arguments);
})
.declareMethod('get', function () {
return wrapJioCall(this, 'get', arguments);
})
.declareMethod('put', function () {
return wrapJioCall(this, 'put', arguments);
})
.declareMethod('post', function () {
return wrapJioCall(this, 'post', arguments);
})
.declareMethod('remove', function () {
return wrapJioCall(this, 'remove', arguments);
})
.declareMethod('getAttachment', function () {
return wrapJioCall(this, 'getAttachment', arguments);
})
.declareMethod('putAttachment', function () {
return wrapJioCall(this, 'putAttachment', arguments);
})
.declareMethod('removeAttachment', function () {
return wrapJioCall(this, 'removeAttachment', arguments);
})
.declareMethod('repair', function () {
return wrapJioCall(this, 'repair', arguments);
});
}(window, rJS, jIO));
\ 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>ERP5 Panel</title>
<!--
data-i18n=Editable
-->
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<script src="gadget_global.js" type="text/javascript"></script>
<script id="panel-template-header" type="text/x-handlebars-template">
<div data-role="header" class="ui-bar-inherit">
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">
<div class="ui-controlgroup-controls">
<button data-i18n="Close" class="ui-btn ui-btn-icon-notext ui-icon-delete">Close</button>
</div>
</div>
</div>
</script>
<script id="panel-template-body" type="text/x-handlebars-template">
<div class="ui-content">
<form class="dialog_form">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-action ui-btn-icon-right ui-screen-hidden">Submit</button>
<div data-gadget-url="gadget_erp5_searchfield.html"
data-gadget-scope="erp5_searchfield"
data-gadget-sandbox="public"></div>
</form>
<ul data-role="listview" class="ui-listview" data-enhanced="true"></ul>
<div data-gadget-url="gadget_erp5_field_checkbox.html"
data-gadget-scope="erp5_checkbox"
data-gadget-sandbox="public"></div>
<dl></dl>
</div>
</script>
<script id="panel-template-body-list" type="text/x-handlebars-template">
<li class="ui-first-child"><a href="{{document_list_href}}" class="ui-btn ui-btn-icon-left ui-icon-search" data-i18n="Record" accesskey="s">Record</a></li>
<li class="ui-first-child"><a href="{{car_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="Car" accesskey="s">Car</a></li>
<li class="ui-last-child"><a href="{{storage_href}}" class="ui-btn ui-btn-icon-left ui-icon-gear" data-i18n="Storages">Storages</a></li>
</script>
<script id="panel-template-body-desktop" type="text/x-handlebars-template">
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-eye" data-i18n="Views">Views</dt>
{{#each view_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview">
<a data-i18n="{{title}}" class="ui-body-inherit" href="{{href}}">{{title}}</a>
</dd>
{{/each}}
<dt class="ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-cogs" data-i18n="Decisions">Decisions</dt>
{{#each workflow_list}}
<dd data-role="listview" data-theme="c" data-inset="true" class="document-listview">
<a data-i18n="{{title}}" class="ui-body-inherit" href="{{href}}">{{title}}</a>
</dd>
{{/each}}
</script>
<!-- custom script -->
<script src="gadget_erp5_drive_app_panel.js" type="text/javascript"></script>
</head>
<body>
<div class="jqm-navmenu-panel"></div>
</body>
</html>
\ 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>OfficeJS Add Drive App</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_erp5_page_drive_app_add_document.js"></script>
</head>
<body>
<form class="save_form ui-body-c" novalidate>
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OfficeJS Add Drive App</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_erp5_page_drive_app_car.js"></script>
</head>
<body>
<form class="save_form ui-body-c" novalidate>
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"></button>
<div data-gadget-url="gadget_erp5_form.html"
data-gadget-scope="form_view"
data-gadget-sandbox="public">
</div>
</form>
</body>
</html>
/*global window, rJS, RSVP */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
"use strict";
rJS(window)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.declareAcquiredMethod("updateHeader", "updateHeader")
.declareAcquiredMethod("setSetting", "setSetting")
.declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("redirect", "redirect")
.declareAcquiredMethod("jio_post", "jio_post")
.declareAcquiredMethod("notifySubmitting", "notifySubmitting")
.declareAcquiredMethod("notifySubmitted", 'notifySubmitted')
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.onEvent('submit', function () {
var gadget = this;
return gadget.notifySubmitting()
.push(function () {
return gadget.getDeclaredGadget('form_view');
})
.push(function (form_gadget) {
return form_gadget.getContent();
})
.push(function (content) {
return gadget.setSetting('car', content.car);
})
.push(function () {
return RSVP.all([
gadget.notifySubmitted('Data Updated')
]);
})
.push(function () {
// Workaround, find a way to open document without break gadget.
return gadget.redirect({"command": "change", "options": {"page": "drive_app_add_document"}});
});
})
.declareMethod("triggerSubmit", function () {
return this.element.querySelector('button[type="submit"]').click();
})
.declareMethod("render", function () {
var gadget = this;
return RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getDeclaredGadget('form_view'),
gadget.getSetting('car'),
]);
})
.push(function (result) {
var item_list = [["Car1", "1#Car1"], ["Car2", "2#Car2"], ["Car3", "3#Car3"]];
return result[0].render({
erp5_document: {
"_embedded": {"_view": {
"my_car": {
"description": "",
"title": "Car",
"default": result[1] || "",
"css_class": "",
"required": 0,
"editable": 1,
"key": "car",
"hidden": 0,
"items": [["", ""]].concat(item_list),
"type": "ListField"
}
}},
"_links": {
"type": {
// form_list display portal_type in header
name: ""
}
}
},
form_definition: {
group_list: [[
"left",
[["my_car"]]
]]
}
});
})
.push(function () {
return gadget.getSetting('document_title');
})
.push(function (document_title) {
return gadget.updateHeader({
page_title: document_title,
save_action: true
});
});
});
}(window, rJS, RSVP));
\ 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>OfficeJS Router Gadget</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<script src="handlebars.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_page_drive_app_configurator.js" type="text/javascript"></script>
<script id="storage-selection" type="text/x-handlebars-template">
<br>
<ul data-role="listview" data-theme="c" class="document-listview ui-listview-inset ui-corner-all">
{{#each documentlist}}
<li><a class="ui-body-inherit" href="{{link}}">{{title}}</a></li>
{{/each}}
</ul>
</script>
</head>
<body>
<div data-gadget-url="gadget_drive_app_configurator_access.html" data-gadget-scope="access"></div>
<br>
<article class="ui-content ui-body-c">
<section class="ui-content-header-plain">
<h3 class="ui-content-title ui-body-c">
<span class="ui-icon ui-icon-custom ui-icon-database">&nbsp;</span>
Your Storage Choice
</h3>
</section>
<section class="ui-body-c ui-content-section">
<p>Select a storage to synchronize your data with</p>
<div class="storage-selection">
</div>
</section>
</article>
<br>
</body>
</html>
\ 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>OfficeJS Text Editor List</title>
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_erp5_page_drive_app_document_list.js"></script>
</head>
<body>
<div data-gadget-url="gadget_erp5_pt_form_list.html" data-gadget-scope="form_list"></div>
</body>
</html>
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