fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Saving and restoring local draft of a document
[fnpeditor.git]
/
src
/
editor
/
modules
/
rng
/
rng.js
diff --git
a/src/editor/modules/rng/rng.js
b/src/editor/modules/rng/rng.js
index
fc97f99
..
801473b
100644
(file)
--- a/
src/editor/modules/rng/rng.js
+++ b/
src/editor/modules/rng/rng.js
@@
-43,6
+43,7
@@
return function(sandbox) {
sandbox.getModule('nodeFamilyTree').setElement(nodeElement);
sandbox.getModule('nodeBreadCrumbs').setNodeElement(nodeElement);
sandbox.getModule('documentToolbar').setNodeElement(nodeElement);
sandbox.getModule('nodeFamilyTree').setElement(nodeElement);
sandbox.getModule('nodeBreadCrumbs').setNodeElement(nodeElement);
sandbox.getModule('documentToolbar').setNodeElement(nodeElement);
+ sandbox.getModule('metadataEditor').setNodeElement(nodeElement);
},
updateCurrentTextElement: function(textElement) {
sandbox.getModule('nodeFamilyTree').setElement(textElement);
},
updateCurrentTextElement: function(textElement) {
sandbox.getModule('nodeFamilyTree').setElement(textElement);
@@
-98,15
+99,23
@@
return function(sandbox) {
documentIsDirty = true;
});
},
documentIsDirty = true;
});
},
- savingStarted: function() {
+ savingStarted: function(what) {
+ var msg = {
+ remote: gettext('Saving document'),
+ local: gettext('Saving local copy')
+ };
sandbox.getModule('mainBar').setCommandEnabled('save', false);
sandbox.getModule('mainBar').setCommandEnabled('save', false);
- sandbox.getModule('indicator').showMessage(
gettext('Saving...')
);
+ sandbox.getModule('indicator').showMessage(
msg[what] + '...'
);
},
},
- savingEnded: function(status, current_version) {
+ savingEnded: function(status,
what,
current_version) {
void(status);
void(status);
+ var msg = {
+ remote: gettext('Document saved'),
+ local: gettext('Local copy saved')
+ };
documentIsDirty = false;
sandbox.getModule('mainBar').setCommandEnabled('save', true);
documentIsDirty = false;
sandbox.getModule('mainBar').setCommandEnabled('save', true);
- sandbox.getModule('indicator').clearMessage({message:
'Dokument zapisany'
});
+ sandbox.getModule('indicator').clearMessage({message:
msg[what]
});
sandbox.getModule('mainBar').setVersion(current_version);
},
restoringStarted: function(event) {
sandbox.getModule('mainBar').setVersion(current_version);
},
restoringStarted: function(event) {