Commit 1e33ce13 authored by François Billioud's avatar François Billioud

change the date management

parent ec46cb0a
...@@ -46,7 +46,7 @@ JSONIllustrationDocument.prototype = new JSONDocument();//inherits methods from ...@@ -46,7 +46,7 @@ JSONIllustrationDocument.prototype = new JSONDocument();//inherits methods from
JSONIllustrationDocument.prototype.saveEdition = function(content) { JSONIllustrationDocument.prototype.saveEdition = function(content) {
this.setLastUser(getCurrentUser().getName()); this.setLastUser(getCurrentUser().getName());
this.setContent(content); this.setContent(content);
this.setLastModification(currentTime()); this.setLastModification(getCurrentTime());
this.setAsCurrentDocument(); this.setAsCurrentDocument();
} }
JSONIllustrationDocument.prototype.setAsCurrentDocument = function() { JSONIllustrationDocument.prototype.setAsCurrentDocument = function() {
......
...@@ -39,7 +39,7 @@ JSONSheetDocument.prototype.load({ ...@@ -39,7 +39,7 @@ JSONSheetDocument.prototype.load({
saveEdition: function(content) { saveEdition: function(content) {
this.setLastUser(getCurrentUser()); this.setLastUser(getCurrentUser());
this.setContent(content); this.setContent(content);
this.setLastModification(currentTime()); this.setLastModification(getCurrentTime());
this.setAsCurrentDocument(); this.setAsCurrentDocument();
}, },
......
...@@ -137,7 +137,7 @@ JSONTextDocument.prototype = new JSONDocument();//inherits methods from JSONDocu ...@@ -137,7 +137,7 @@ JSONTextDocument.prototype = new JSONDocument();//inherits methods from JSONDocu
JSONTextDocument.prototype.saveEdition = function(content) { JSONTextDocument.prototype.saveEdition = function(content) {
this.setLastUser(getCurrentUser().getName()); this.setLastUser(getCurrentUser().getName());
this.setContent(content); this.setContent(content);
this.setLastModification(currentTime()); this.setLastModification(getCurrentTime());
this.setAsCurrentDocument(); this.setAsCurrentDocument();
} }
JSONTextDocument.prototype.setAsCurrentDocument = function() { JSONTextDocument.prototype.setAsCurrentDocument = function() {
......
...@@ -369,9 +369,10 @@ var JSONDocument = function(arg) { ...@@ -369,9 +369,10 @@ var JSONDocument = function(arg) {
this.lastUser=getCurrentUser().getName(); this.lastUser=getCurrentUser().getName();
this.title="Untitled"; this.title="Untitled";
this.content=""; this.content="";
this.creation=currentTime(); this.creation=getCurrentTime();
this.lastModification=currentTime(); this.lastModification=getCurrentTime();
this.state=JSONDocument.prototype.states.draft; this.state=JSONDocument.prototype.states.draft;
this.label = {};
} }
} }
JSONDocument.prototype = new UngObject();//inherits from UngObject JSONDocument.prototype = new UngObject();//inherits from UngObject
...@@ -450,7 +451,7 @@ supportedDocuments = {"text":{editorPage:"text-editor",icon:"images/icons/docume ...@@ -450,7 +451,7 @@ supportedDocuments = {"text":{editorPage:"text-editor",icon:"images/icons/docume
undefined:{editorPage:null,icon:"images/icons/other.gif"} undefined:{editorPage:null,icon:"images/icons/other.gif"}
} }
getDocumentAddress = function(doc) { getDocumentAddress = function(doc) {
return getCurrentStorage().getType()=="local" ? doc.getCreation() : "http://"+getCurrentUser().getIDProvider()+"/ungdav/"+doc.getCreation(); return doc.getCreation();
} }
/************************************************* /*************************************************
......
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