fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring
[fnpeditor.git]
/
modules
/
rng
/
rng.js
diff --git
a/modules/rng/rng.js
b/modules/rng/rng.js
index
deda771
..
992d601
100644
(file)
--- a/
modules/rng/rng.js
+++ b/
modules/rng/rng.js
@@
-14,14
+14,6
@@
return function(sandbox) {
views.mainTabs.addTab(title, slug, view);
\r
}
\r
\r
views.mainTabs.addTab(title, slug, view);
\r
}
\r
\r
- function tabIsDirty(slug) {
\r
- if(slug === 'editor' && (dirty.documentCanvas || dirty.metadataEditor))
\r
- return true;
\r
- if(slug === 'sourceEditor' && dirty.sourceEditor)
\r
- return true;
\r
- return false;
\r
- }
\r
-
\r
var dirty = {
\r
sourceEditor: false,
\r
documentCanvas: false,
\r
var dirty = {
\r
sourceEditor: false,
\r
documentCanvas: false,
\r
@@
-29,6
+21,14
@@
return function(sandbox) {
};
\r
\r
var synchronizeTab = function(slug) {
\r
};
\r
\r
var synchronizeTab = function(slug) {
\r
+ function tabIsDirty(slug) {
\r
+ if(slug === 'editor' && (dirty.documentCanvas || dirty.metadataEditor))
\r
+ return true;
\r
+ if(slug === 'sourceEditor' && dirty.sourceEditor)
\r
+ return true;
\r
+ return false;
\r
+ }
\r
+
\r
if(tabIsDirty(slug)) {
\r
if(slug === 'sourceEditor') {
\r
sandbox.getModule('data').commitDocument(sandbox.getModule('sourceEditor').getDocument(), 'source_edit');
\r
if(tabIsDirty(slug)) {
\r
if(slug === 'sourceEditor') {
\r
sandbox.getModule('data').commitDocument(sandbox.getModule('sourceEditor').getDocument(), 'source_edit');
\r