X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/195a1011a3ac43b5ff7cec4346b87e7453cee16a..b60fde6f2bb4d1e10bd4187d54601315aa2e3435:/modules/diffViewer/diffViewer.js
diff --git a/modules/diffViewer/diffViewer.js b/modules/diffViewer/diffViewer.js
index ba88a48..be0e431 100644
--- a/modules/diffViewer/diffViewer.js
+++ b/modules/diffViewer/diffViewer.js
@@ -1,37 +1,38 @@
-define([
-'libs/jquery-1.9.1.min',
-'libs/underscore-min',
-'views/tabs/tabs',
-'libs/text!./diff.html'
-], function($, _, tabs, diffTemplateSrc) {
-
-'use strict';
-
-return function(sandbox) {
-
- var dom = $('
').addClass('rng-module-diffViewer');
- var tabsView = (new tabs.View({position: 'right'})).render();
- dom.append(tabsView.getAsView());
-
- var DiffView = function() {
- this.dom = $(diffTemplateSrc)
- }
- DiffView.prototype.setTable = function(table) {
- this.dom.append(table);
- }
-
-
- return {
- start: function() {sandbox.publish('ready');},
- getView: function() {return dom;},
- setDiff: function(diff) {
- var diffView = new DiffView();
- diffView.setTable(diff.table);
- var slug = diff.ver1 + '-' + diff.ver2;
- tabsView.addTab(diff.ver1 + '->' + diff.ver2, slug, diffView.dom);
- tabsView.selectTab(slug);
- }
- };
-};
-
+define([
+'libs/jquery-1.9.1.min',
+'libs/underscore-min',
+'views/tabs/tabs',
+'libs/text!./diff.html'
+], function($, _, tabs, diffTemplateSrc) {
+
+'use strict';
+
+return function(sandbox) {
+
+ var dom = $('
').addClass('rng-module-diffViewer');
+ var tabsView = (new tabs.View({position: 'right'})).render();
+ dom.append(tabsView.getAsView());
+
+ var DiffView = function() {
+ this.dom = $(diffTemplateSrc);
+ };
+
+ DiffView.prototype.setTable = function(table) {
+ this.dom.append(table);
+ };
+
+
+ return {
+ start: function() {sandbox.publish('ready');},
+ getView: function() {return dom;},
+ setDiff: function(diff) {
+ var diffView = new DiffView();
+ diffView.setTable(diff.table);
+ var slug = diff.ver1 + '-' + diff.ver2;
+ tabsView.addTab(diff.ver1 + '->' + diff.ver2, slug, diffView.dom);
+ tabsView.selectTab(slug);
+ }
+ };
+};
+
});
\ No newline at end of file