Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update the UI when inserting a chapter mark or output file (hotfix; n…

…eeds better solution)
  • Loading branch information...
commit 5436768355b3c7df72cd76de6d239667244553fb 1 parent 9b2412a
@cpojer cpojer authored
Showing with 4 additions and 5 deletions.
  1. +2 −2 JavaScript/App/Chapter.js
  2. +2 −3 JavaScript/App/OutputFiles.js
View
4 JavaScript/App/Chapter.js
@@ -17,8 +17,6 @@ var createUIElement = function(baseURL, store, content, id) {
}, content)
)).set('data-chapter-id', id).store('value', content);
- UI.update(element);
-
// Store for editing
var chapters = store.get('chapters', {});
chapters[id] = content;
@@ -58,6 +56,7 @@ var add = function(baseURL, store, container, chapter, id) {
if (!element.getParent())
element.inject(container);
+ UI.update();
store.fireEvent('update:' + exports.getType());
};
@@ -95,6 +94,7 @@ exports.setData = function(store, list, baseURL, object, immediate) {
var container = getContainer(object);
container.getElements('[data-chapter-id]').dispose();
container.adopt(elements);
+ UI.update();
};
if (immediate) fn();
View
5 JavaScript/App/OutputFiles.js
@@ -20,8 +20,6 @@ var createUIElement = function(href, store, content, id) {
})
)).set('data-output-file-id', id).store('value', content);
- UI.update(element);
-
// Store for editing
var outputFiles = store.get('output_files', {});
outputFiles[id] = content;
@@ -50,6 +48,7 @@ var add = function(baseURL, store, container, outputFile, id) {
if (previous) element.replaces(previous);
else element.inject(container);
+ UI.update();
store.fireEvent('update:' + exports.getType());
};
@@ -114,7 +113,7 @@ exports.setData = function(store, list, baseURL, object, immediate) {
var container = getContainer(object);
container.getElements('[data-output-file-id]').dispose();
container.adopt(elements);
-
+ UI.update();
setupIndicator(store, object);
};
Please sign in to comment.
Something went wrong with that request. Please try again.