From 4a10da821d96b8e462cc9db5e74e2507445eee76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Sun, 30 Jun 2013 23:41:03 +0200 Subject: [PATCH] Missing semicolons --- modules/data/data.js | 8 +++---- modules/data/saveDialog.js | 4 ++-- modules/diffViewer/diffViewer.js | 7 +++--- modules/documentCanvas/canvas.js | 6 ++--- modules/documentCanvas/canvasManager.js | 18 +++++++-------- modules/documentCanvas/canvasNode.js | 16 +++++++------- modules/documentCanvas/documentCanvas.js | 4 ++-- modules/documentCanvas/tests/canvas.test.js | 4 ++-- .../documentCanvas/tests/canvasNode.test.js | 2 +- modules/documentCanvas/tests/utils.js | 4 ++-- modules/documentCanvas/tests/utils.test.js | 8 +++---- modules/documentCanvas/transformations.js | 16 +++++++------- modules/documentHistory/documentHistory.js | 12 +++++----- modules/documentHistory/restoreDialog.js | 4 ++-- modules/documentToolbar/documentToolbar.js | 8 +++---- modules/indicator/indicator.js | 6 ++--- modules/mainBar/mainBar.js | 4 ++-- modules/metadataEditor/metadataEditor.js | 10 ++++----- modules/metadataEditor/transformations.js | 4 ++-- modules/nodeBreadCrumbs/nodeBreadCrumbs.js | 6 ++--- modules/nodeFamilyTree/nodeFamilyTree.js | 6 ++--- modules/nodePane/nodePane.js | 4 ++-- modules/rng/rng.js | 22 +++++++++---------- modules/sourceEditor/sourceEditor.js | 6 ++--- 24 files changed, 95 insertions(+), 94 deletions(-) diff --git a/modules/data/data.js b/modules/data/data.js index 108f2ea..51a4398 100644 --- a/modules/data/data.js +++ b/modules/data/data.js @@ -6,7 +6,7 @@ return function(sandbox) { var doc = sandbox.getBootstrappedData().document; var document_id = sandbox.getBootstrappedData().document_id; - var document_version = sandbox.getBootstrappedData().version + var document_version = sandbox.getBootstrappedData().version; var history = sandbox.getBootstrappedData().history; @@ -53,7 +53,7 @@ return function(sandbox) { sandbox.publish('historyItemAdded', data.slice(-1)[0]); }, }); - } + }; return { start: function() { @@ -100,7 +100,7 @@ return function(sandbox) { url: '/' + gettext('editor') + '/' + document_id + '/diff', data: {from: ver1, to: ver2}, success: function(data) { - sandbox.publish('diffFetched', {table: data, ver1: ver1, ver2: ver2}) + sandbox.publish('diffFetched', {table: data, ver1: ver1, ver2: ver2}); }, }); }, @@ -127,7 +127,7 @@ return function(sandbox) { getDocumentVersion: function() { return document_version; } - } + }; }; }); \ No newline at end of file diff --git a/modules/data/saveDialog.js b/modules/data/saveDialog.js index 2108276..0bdb718 100644 --- a/modules/data/saveDialog.js +++ b/modules/data/saveDialog.js @@ -30,7 +30,7 @@ define([ data: {description: view.$el.find('textarea').val()}, success: function() { view.actionsDisabled = false; view.close(); }, error: function() { view.actionsDisabled = false; view.close(); }, - }) + }); }, close: function(e) { if(e) @@ -51,6 +51,6 @@ define([ create: function() { return new DialogView(); } - } + }; }); \ No newline at end of file diff --git a/modules/diffViewer/diffViewer.js b/modules/diffViewer/diffViewer.js index ba88a48..12e022a 100644 --- a/modules/diffViewer/diffViewer.js +++ b/modules/diffViewer/diffViewer.js @@ -14,11 +14,12 @@ return function(sandbox) { dom.append(tabsView.getAsView()); var DiffView = function() { - this.dom = $(diffTemplateSrc) - } + this.dom = $(diffTemplateSrc); + }; + DiffView.prototype.setTable = function(table) { this.dom.append(table); - } + }; return { diff --git a/modules/documentCanvas/canvas.js b/modules/documentCanvas/canvas.js index 23cdf0a..94329a4 100644 --- a/modules/documentCanvas/canvas.js +++ b/modules/documentCanvas/canvas.js @@ -44,7 +44,7 @@ Canvas.prototype.findNodes = function(desc) { Canvas.prototype.getNodeById = function(id) { return canvasNode.create($(this.content.find('#' +id))); -} +}; Canvas.prototype.nodeAppend = function(options) { var element; // = $(this.content.find('#' + options.context.id).get(0)); @@ -129,7 +129,7 @@ Canvas.prototype.nodeSplit = function(options) { var newNode = canvasNode.create({tag: nodeToSplit.attr('wlxml-tag'), klass: nodeToSplit.attr('wlxml-class')}); newNode.dom.append(suffix); succeedingNodes.forEach(function(node) { - newNode.dom.append(node) + newNode.dom.append(node); }); nodeToSplit.after(newNode.dom); return newNode; @@ -222,7 +222,7 @@ Canvas.prototype.listRemove = function(options) { Canvas.prototype.getPrecedingNode = function(options) { var element = $(this.content.find('#' + options.node.getId()).get(0)); - var prev = element.prev() + var prev = element.prev(); if(prev.length === 0) prev = element.parent(); return canvasNode.create(prev); diff --git a/modules/documentCanvas/canvasManager.js b/modules/documentCanvas/canvasManager.js index 201394e..87fa834 100644 --- a/modules/documentCanvas/canvasManager.js +++ b/modules/documentCanvas/canvasManager.js @@ -16,7 +16,7 @@ var getCursorPosition = function() { parentNode: parent, focusNode: $(selection.focusNode).parent(), isAtEnd: selection.anchorOffset === anchorNode.text().length - } + }; }; var Manager = function(canvas, sandbox) { @@ -76,12 +76,12 @@ var Manager = function(canvas, sandbox) { }; canvas.dom.onHide = function() { manager.scrollbarPosition = canvas.dom.find('#rng-module-documentCanvas-contentWrapper').scrollTop(); - } + }; }; Manager.prototype.selectNode = function(cnode, options) { options = options || {}; - var nodeElement = this.getNodeElement(cnode) + var nodeElement = this.getNodeElement(cnode); this.dimNode(cnode); @@ -135,7 +135,7 @@ Manager.prototype.insertNewNode = function(wlxmlTag, wlxmlClass) { } -} +}; Manager.prototype.getNodeElement = function(cnode) { return this.canvas.dom.find('#'+cnode.getId()); @@ -167,9 +167,9 @@ Manager.prototype.selectFirstNode = function() { }).first(); var node; if(firstNodeWithText.length) - node = $(firstNodeWithText[0]) + node = $(firstNodeWithText[0]); else { - node = this.canvas.dom.find('[wlxml-class|="p"]') + node = this.canvas.dom.find('[wlxml-class|="p"]'); } this.selectNode(canvasNode.create(node), {movecaret: true}); }; @@ -185,7 +185,7 @@ Manager.prototype.movecaretToNode = function(nodeElement, where) { collapseArg = false; range.collapse(collapseArg); var selection = document.getSelection(); - selection.removeAllRanges() + selection.removeAllRanges(); selection.addRange(range); }; @@ -226,7 +226,7 @@ Manager.prototype.onBackspaceKey = function(e) { this.canvas.nodeRemove({node: toRemove}); // jesli nie ma tekstu, to anchor nie jest tex nodem this.selectNode(prevNode, {movecaret: 'end'}); } -} +}; Manager.prototype.command = function(command, meta) { var pos = getCursorPosition(); @@ -247,7 +247,7 @@ Manager.prototype.command = function(command, meta) { } } -} +}; return Manager; diff --git a/modules/documentCanvas/canvasNode.js b/modules/documentCanvas/canvasNode.js index d0e54ff..321a7ce 100644 --- a/modules/documentCanvas/canvasNode.js +++ b/modules/documentCanvas/canvasNode.js @@ -26,27 +26,27 @@ var CanvasNode = function(desc) { CanvasNode.prototype.getTag = function() { return this.dom.attr('wlxml-tag'); -} +}; CanvasNode.prototype.getClass = function() { return this.dom.attr('wlxml-class'); -} +}; CanvasNode.prototype.getId = function() { return this.dom.attr('id'); -} +}; CanvasNode.prototype.getContent = function() { return this.dom.text(); -} +}; CanvasNode.prototype.setContent = function(content) { this.dom.text(content); -} +}; CanvasNode.prototype.isSame = function(other) { return (other instanceof CanvasNode) && this.dom.get(0) === other.dom.get(0); -} +}; CanvasNode.prototype.children = function() { var list = []; @@ -75,14 +75,14 @@ CanvasNode.prototype.parents = function() { CanvasNode.prototype.isOfClass = function(klass) { return this.getClass() && this.getClass().substr(0, klass.length) === klass; -} +}; return { create: function(desc) { return new CanvasNode(desc); } -} +}; }); \ No newline at end of file diff --git a/modules/documentCanvas/documentCanvas.js b/modules/documentCanvas/documentCanvas.js index 4ca0a4d..37e8377 100644 --- a/modules/documentCanvas/documentCanvas.js +++ b/modules/documentCanvas/documentCanvas.js @@ -25,7 +25,7 @@ return function(sandbox) { sandbox.publish('documentSet'); }, getDocument: function() { - return transformations.toXML.getXML(canvas.getContent()) + return transformations.toXML.getXML(canvas.getContent()); }, modifyCurrentNode: function(attr, value) { if(manager.currentNode) { @@ -52,7 +52,7 @@ return function(sandbox) { command: function(command, meta) { manager.command(command, meta); } - } + }; }; diff --git a/modules/documentCanvas/tests/canvas.test.js b/modules/documentCanvas/tests/canvas.test.js index 12fb8a5..ac3e69a 100644 --- a/modules/documentCanvas/tests/canvas.test.js +++ b/modules/documentCanvas/tests/canvas.test.js @@ -57,7 +57,7 @@ define([ var c = canvas.create('
Header 1
'); var header = c.findNodes({tag: 'header'})[0]; var wrapper = canvasNode.create({tag: 'aside'}); - c.nodeWrap({inside: header, _with: wrapper, offsetStart: 1, offsetEnd: 6}) + c.nodeWrap({inside: header, _with: wrapper, offsetStart: 1, offsetEnd: 6}); assertDomEqual(c.getContent(), '
Header 1
'); }); @@ -73,7 +73,7 @@ define([ var c = canvas.create('
Alice has a small cat
'); var header = c.findNodes({tag: 'header'})[0]; var wrapper = canvasNode.create({tag: 'aside'}); - c.nodeWrap({inside: header, _with: wrapper, offsetStart: 6, offsetEnd: 4, textNodeIdx: [0,2]}) + c.nodeWrap({inside: header, _with: wrapper, offsetStart: 6, offsetEnd: 4, textNodeIdx: [0,2]}); assertDomEqual(c.getContent(), '
Alice has a small cat
'); }); diff --git a/modules/documentCanvas/tests/canvasNode.test.js b/modules/documentCanvas/tests/canvasNode.test.js index 5c55d9c..f9507d9 100644 --- a/modules/documentCanvas/tests/canvasNode.test.js +++ b/modules/documentCanvas/tests/canvasNode.test.js @@ -14,7 +14,7 @@ var assertDomEqual = function(lhs, rhs) { rhs.attr('id', ''); return assert.ok(lhs[0].isEqualNode(rhs[0]), 'nodes are equal'); -} +}; suite('Create canvas node', function() { test('from description', function() { diff --git a/modules/documentCanvas/tests/utils.js b/modules/documentCanvas/tests/utils.js index cf1f7c2..93d4c03 100644 --- a/modules/documentCanvas/tests/utils.js +++ b/modules/documentCanvas/tests/utils.js @@ -10,7 +10,7 @@ define(['libs/jquery-1.9.1.min', 'libs/chai'], function($, chai) { rmws(this); }); } - } + }; xml = $($.trim(xml)); xml.each(function() { @@ -45,5 +45,5 @@ define(['libs/jquery-1.9.1.min', 'libs/chai'], function($, chai) { rhs.find('*').each(function() {$(this).attr('id', '');}); return chai.assert.ok(lhs[0].isEqualNode(rhs[0]), 'nodes are equal'); } - } + }; }); \ No newline at end of file diff --git a/modules/documentCanvas/tests/utils.test.js b/modules/documentCanvas/tests/utils.test.js index d25b3d3..7001359 100644 --- a/modules/documentCanvas/tests/utils.test.js +++ b/modules/documentCanvas/tests/utils.test.js @@ -5,22 +5,22 @@ var assert = chai.assert; test('open+open', function() { assert.equal(utils.cleanUp('
\n
'), '
'); -}) +}); test('close+close', function() { assert.equal(utils.cleanUp('
\n
'), '
'); -}) +}); test('close+open', function() { assert.equal(utils.cleanUp('
\n
'), '
'); -}) +}); test('bug', function() { var txt = '\
\
Head
\
er 1
\ -
' + '; var txt2 = '
Head
er 1
'; assert.equal(utils.cleanUp(txt), txt2); }); diff --git a/modules/documentCanvas/transformations.js b/modules/documentCanvas/transformations.js index 2b5a5eb..79c28b6 100644 --- a/modules/documentCanvas/transformations.js +++ b/modules/documentCanvas/transformations.js @@ -26,19 +26,19 @@ define(['libs/jquery-1.9.1.min'], function($) { for(var i = 0; i < this.attributes.length; i++) { var attr = this.attributes.item(i); var value = attr.name === 'class' ? attr.value.replace(/\./g, '-') : attr.value; - toret.attr('wlxml-' + attr.name, value) + toret.attr('wlxml-' + attr.name, value); } toret.append(currentTag.contents()); return toret; }); }); - } + }; transform(toBlock, 'div'); transform(toInline, 'span'); toret.find(":not(iframe)").addBack().contents().filter(function() { - return this.nodeType == 3} ).each(function() { + return this.nodeType == 3;} ).each(function() { var n = $(this); var hasText = /\S/g.test(n.text()); if(!hasText) { @@ -58,16 +58,16 @@ define(['libs/jquery-1.9.1.min'], function($) { $(xml).find('metadata').children().each(function() { var node = $(this); toret[this.nodeName.split(':')[1].toLowerCase()] = node.text(); - }) + }); return toret; }, getDocumentDescription: function(xml) { return { HTMLTree: this.getHTMLTree(xml), metadata: this.getMetaData(xml) - } + }; } - } + }; transformations.toXML = { getXML: function(body) { @@ -83,7 +83,7 @@ define(['libs/jquery-1.9.1.min'], function($) { for(var i = 0; i < this.attributes.length; i++) { var attr = this.attributes.item(i); - var split = attr.name.split('-') + var split = attr.name.split('-'); console.log(split); if(split[0] !== 'wlxml' || (split.length > 1 && split[1] === 'tag')) continue; @@ -100,7 +100,7 @@ define(['libs/jquery-1.9.1.min'], function($) { return vkbeautify.xml(toret.html()); } - } + }; return transformations; diff --git a/modules/documentHistory/documentHistory.js b/modules/documentHistory/documentHistory.js index d435617..2647ee3 100644 --- a/modules/documentHistory/documentHistory.js +++ b/modules/documentHistory/documentHistory.js @@ -13,7 +13,7 @@ return function(sandbox) { var dom = $(_.template(mainTemplateSrc)()); var domNodes = { itemList: dom.find('.rng-module-documentHistory-itemsList'), - } + }; var itemViews = []; @@ -43,18 +43,18 @@ return function(sandbox) { if(options.animate) { view.dom.hide().slideDown(); } - } + }; var toggleItemViews = function(toggle) { itemViews.forEach(function(view) { if(!historyItems.isSelected(view.item)) view.toggle(toggle); }); - } + }; var toggleButton = function(btn, toggle) { dom.find('button.'+btn).toggleClass('disabled', !toggle); - } + }; var historyItems = { _itemsById: {}, @@ -140,7 +140,7 @@ return function(sandbox) { getView: function() { return dom; } - } -} + }; +}; }); \ No newline at end of file diff --git a/modules/documentHistory/restoreDialog.js b/modules/documentHistory/restoreDialog.js index 0110240..97ea2af 100644 --- a/modules/documentHistory/restoreDialog.js +++ b/modules/documentHistory/restoreDialog.js @@ -29,7 +29,7 @@ define([ data: {description: view.$el.find('textarea').val()}, success: function() { view.actionsDisabled = false; view.close(); }, error: function() { view.actionsDisabled = false; view.close(); }, - }) + }); }, close: function(e) { if(e) @@ -50,6 +50,6 @@ define([ create: function() { return new DialogView(); } - } + }; }); \ No newline at end of file diff --git a/modules/documentToolbar/documentToolbar.js b/modules/documentToolbar/documentToolbar.js index e364e99..a6dd0be 100644 --- a/modules/documentToolbar/documentToolbar.js +++ b/modules/documentToolbar/documentToolbar.js @@ -13,7 +13,7 @@ return function(sandbox) { e.stopPropagation(); var btn = $(e.currentTarget); if(btn.attr('data-btn-type') === 'toggle') { - btn.toggleClass('active') + btn.toggleClass('active'); var event; var btnId = btn.attr('data-btn'); if(btnId === 'grid') @@ -43,7 +43,7 @@ return function(sandbox) { getOption: function(option) { return this.node.find('.rng-module-documentToolbar-toolbarOption[data-option=' + option +']').val(); } - } + }; view.setup(); @@ -51,7 +51,7 @@ return function(sandbox) { start: function() { sandbox.publish('ready'); }, getView: function() { return view.node; }, getOption: function(option) { return view.getOption(option); } - } -} + }; +}; }); \ No newline at end of file diff --git a/modules/indicator/indicator.js b/modules/indicator/indicator.js index f395f83..007dcff 100644 --- a/modules/indicator/indicator.js +++ b/modules/indicator/indicator.js @@ -13,7 +13,7 @@ return function(sandbox) { setup: function() { } - } + }; return { start: function() { sandbox.publish('ready'); }, @@ -28,8 +28,8 @@ return function(sandbox) { } } - } + }; -} +}; }); diff --git a/modules/mainBar/mainBar.js b/modules/mainBar/mainBar.js index 084f675..6966e4a 100644 --- a/modules/mainBar/mainBar.js +++ b/modules/mainBar/mainBar.js @@ -11,7 +11,7 @@ return function(sandbox) { view.find('button').click(function(e) { e.preventDefault(); sandbox.publish('cmd.' + $(e.target).attr('data-cmd')); - }) + }); return { start: function() { sandbox.publish('ready'); }, @@ -22,7 +22,7 @@ return function(sandbox) { setVersion: function(version) { view.find('.version').text(version); } - } + }; }; diff --git a/modules/metadataEditor/metadataEditor.js b/modules/metadataEditor/metadataEditor.js index 79302bb..12578ba 100644 --- a/modules/metadataEditor/metadataEditor.js +++ b/modules/metadataEditor/metadataEditor.js @@ -35,7 +35,7 @@ return function(sandbox) { metaTable.find('.rng-module-metadataEditor-metaItemValue').focus(); } else { var input = $(''); - input.appendTo('body').focus() + input.appendTo('body').focus(); view.node.find('.rng-module-metadataEditor-addBtn').focus(); input.remove(); } @@ -47,7 +47,7 @@ return function(sandbox) { var onKeyUp = function(e) { if(e.which !== 13) sandbox.publish('metadataChanged', view.getMetadata()); - } + }; this.metaTable.on('keyup', '[contenteditable]', _.throttle(onKeyUp, 500)); }, getMetadata: function() { @@ -73,7 +73,7 @@ return function(sandbox) { newRow.appendTo(this.metaTable); return newRow; } - } + }; view.setup(); @@ -101,7 +101,7 @@ return function(sandbox) { var section = toret.find('section'); section = section.length ? $(section[0]) : null; if(section) { - section.prepend(meta) + section.prepend(meta); } } else { metadata.replaceWith(meta); @@ -110,6 +110,6 @@ return function(sandbox) { } }; -} +}; }); \ No newline at end of file diff --git a/modules/metadataEditor/transformations.js b/modules/metadataEditor/transformations.js index 8202a9f..ba7092e 100644 --- a/modules/metadataEditor/transformations.js +++ b/modules/metadataEditor/transformations.js @@ -8,7 +8,7 @@ define(['libs/jquery-1.9.1.min'], function($) { $(xml).find('metadata').children().each(function() { var node = $(this); toret[this.nodeName.split(':')[1].toLowerCase()] = node.text(); - }) + }); return toret; }, getXML: function(metadata) { @@ -19,6 +19,6 @@ define(['libs/jquery-1.9.1.min'], function($) { meta.append('\n'); return vkbeautify.xml(meta.html()); } - } + }; }); \ No newline at end of file diff --git a/modules/nodeBreadCrumbs/nodeBreadCrumbs.js b/modules/nodeBreadCrumbs/nodeBreadCrumbs.js index c147c09..7331def 100644 --- a/modules/nodeBreadCrumbs/nodeBreadCrumbs.js +++ b/modules/nodeBreadCrumbs/nodeBreadCrumbs.js @@ -47,7 +47,7 @@ return function(sandbox) { dimNode: function(node) { this.dom.find('a[data-id="'+node.id+'"]').removeClass('rng-common-hoveredNode'); } - } + }; view.setup(); @@ -61,7 +61,7 @@ return function(sandbox) { }, highlightNode: function(id) { view.highlightNode(id); }, dimNode: function(id) { view.dimNode(id); } - } -} + }; +}; }); \ No newline at end of file diff --git a/modules/nodeFamilyTree/nodeFamilyTree.js b/modules/nodeFamilyTree/nodeFamilyTree.js index b5cb56e..05d4aac 100644 --- a/modules/nodeFamilyTree/nodeFamilyTree.js +++ b/modules/nodeFamilyTree/nodeFamilyTree.js @@ -21,11 +21,11 @@ return function(sandbox) { this.dom.on('mouseenter', 'a', function(e) { var target = $(e.target); - sandbox.publish('nodeEntered', view.nodes[target.attr('data-id')]) + sandbox.publish('nodeEntered', view.nodes[target.attr('data-id')]); }); this.dom.on('mouseleave', 'a', function(e) { var target = $(e.target); - sandbox.publish('nodeLeft', view.nodes[target.attr('data-id')]) + sandbox.publish('nodeLeft', view.nodes[target.attr('data-id')]); }); }, setNode: function(node) { @@ -58,7 +58,7 @@ return function(sandbox) { dimNode: function(canvasNode) { this.dom.find('a[data-id="'+canvasNode.getId()+'"]').removeClass('rng-common-hoveredNode'); } - } + }; view.setup(); diff --git a/modules/nodePane/nodePane.js b/modules/nodePane/nodePane.js index b825b1b..cc71d35 100644 --- a/modules/nodePane/nodePane.js +++ b/modules/nodePane/nodePane.js @@ -28,8 +28,8 @@ return function(sandbox) { view.find('.rng-module-nodePane-tagSelect').val(canvasNode.getTag()); view.find('.rng-module-nodePane-classSelect').val(canvasNode.getClass()); } - } + }; -} +}; }); \ No newline at end of file diff --git a/modules/rng/rng.js b/modules/rng/rng.js index 4189902..191c449 100644 --- a/modules/rng/rng.js +++ b/modules/rng/rng.js @@ -47,19 +47,19 @@ return function(sandbox) { } sandbox.getModule('data').commitDocument(doc, reason); } - } + }; var commands = { highlightDocumentNode: function(canvasNode, origin) { ['documentCanvas', 'nodeBreadCrumbs', 'nodeFamilyTree'].forEach(function(moduleName) { if(!origin || moduleName != origin) - sandbox.getModule(moduleName).highlightNode(canvasNode) + sandbox.getModule(moduleName).highlightNode(canvasNode); }); }, dimDocumentNode: function(canvasNode, origin) { ['documentCanvas', 'nodeBreadCrumbs', 'nodeFamilyTree'].forEach(function(moduleName) { if(!origin || moduleName != origin) - sandbox.getModule(moduleName).dimNode(canvasNode) + sandbox.getModule(moduleName).dimNode(canvasNode); }); }, selectNode: function(canvasNode, origin) { @@ -82,7 +82,7 @@ return function(sandbox) { sandbox.getModule(moduleName).setDocument(document); }); } - } + }; var views = { @@ -92,7 +92,7 @@ return function(sandbox) { visualEditingSidebar: (new tabs.View({stacked: true})).render(), currentNodePaneLayout: new vbox.VBox(), diffLayout: new layout.Layout(diffLayoutTemplate) - } + }; views.visualEditing.setView('rightColumn', views.visualEditingSidebar.getAsView()); addMainTab('Edytor', 'editor', views.visualEditing.getAsView()); @@ -161,7 +161,7 @@ return function(sandbox) { sandbox.getModule('indicator').clearMessage({message:'Wersja ' + event.reverted_version + ' przywrócona'}); sandbox.getModule('mainBar').setVersion(event.current_version); } - } + }; eventHandlers.mainBar = { ready: function() { @@ -172,7 +172,7 @@ return function(sandbox) { synchronizeTab(views.mainTabs.getCurrentSlug()); sandbox.getModule('data').saveDocument(); } - } + }; eventHandlers.indicator = { ready: function() { @@ -274,7 +274,7 @@ return function(sandbox) { nodeSelected: function(canvasNode) { commands.selectNode(canvasNode); } - } + }; eventHandlers.documentHistory = { ready: function() { @@ -290,13 +290,13 @@ return function(sandbox) { displayVersion: function(event) { window.open('/' + gettext('editor') + '/' + sandbox.getModule('data').getDocumentId() + '?version=' + event.version, _.uniqueId()); } - } + }; eventHandlers.diffViewer = { ready: function() { views.diffLayout.setView('right', sandbox.getModule('diffViewer').getView()); } - } + }; /* api */ @@ -311,7 +311,7 @@ return function(sandbox) { eventHandlers[moduleName][eventName].apply(eventHandlers, args); } } - } + }; }; }); \ No newline at end of file diff --git a/modules/sourceEditor/sourceEditor.js b/modules/sourceEditor/sourceEditor.js index 431fcb8..1c18e75 100644 --- a/modules/sourceEditor/sourceEditor.js +++ b/modules/sourceEditor/sourceEditor.js @@ -15,7 +15,7 @@ return function(sandbox) { editor.getSession().on('change', function() { sandbox.publish('xmlChanged'); - }) + }); return { start: function() { sandbox.publish('ready'); @@ -25,13 +25,13 @@ return function(sandbox) { }, setDocument: function(document) { editor.setValue(document); - editor.gotoLine(0) + editor.gotoLine(0); sandbox.publish('documentSet'); }, getDocument: function() { return editor.getValue(); } - } + }; }; }); \ No newline at end of file -- 2.20.1