fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
integration wip: removing unused code
[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
3621050
..
b1e091c
100644
(file)
--- a/
src/editor/modules/rng/rng.js
+++ b/
src/editor/modules/rng/rng.js
@@
-48,16
+48,9
@@
return function(sandbox) {
},
resetDocument: function(document, reason) {
var modules = [];
},
resetDocument: function(document, reason) {
var modules = [];
- if(reason === 'source_edit') {
- modules = ['documentCanvas', 'metadataEditor'];
- }
- else if (reason === 'edit') {
- modules = ['sourceEditor'];
- }
- else if (reason === 'revert') {
+ if (reason === 'revert') {
modules = ['documentCanvas', 'metadataEditor', 'sourceEditor'];
}
modules = ['documentCanvas', 'metadataEditor', 'sourceEditor'];
}
-
modules.forEach(function(moduleName) {
sandbox.getModule(moduleName).setDocument(document);
});
modules.forEach(function(moduleName) {
sandbox.getModule(moduleName).setDocument(document);
});
@@
-103,9
+96,6
@@
return function(sandbox) {
sandbox.getModule(moduleName).start();
});
},
sandbox.getModule(moduleName).start();
});
},
- documentChanged: function(document, reason) {
- commands.resetDocument(document, reason);
- },
savingStarted: function() {
sandbox.getModule('mainBar').setCommandEnabled('save', false);
sandbox.getModule('indicator').showMessage(gettext('Saving...'));
savingStarted: function() {
sandbox.getModule('mainBar').setCommandEnabled('save', false);
sandbox.getModule('indicator').showMessage(gettext('Saving...'));