diff --git a/app/main.js b/app/main.js
index e07c848..23656f6 100644
--- a/app/main.js
+++ b/app/main.js
@@ -5,10 +5,11 @@ requirejs.config({
'plugins' : '../lib/durandal/js/plugins',
'transitions' : '../lib/durandal/js/transitions',
'knockout' : '../lib/knockout.js/knockout',
- 'knockout.mapping' : '../lib/bower-knockout-mapping/dist/knockout.mapping.min',
- 'knockout.validation': '../lib/knockout-validation/dist/knockout.validation.min',
- 'jquery' : '../lib/jquery/jquery.min',
- 'perfect.scrollbar' : '../lib/perfect-scrollbar/js/perfect-scrollbar.jquery'
+ 'knockout.mapping' : '../lib/bower-knockout-mapping/dist/knockout.mapping.min',
+ 'knockout.validation' : '../lib/knockout-validation/dist/knockout.validation.min',
+ 'jquery' : '../lib/jquery/jquery.min',
+ 'perfect.scrollbar' : '../lib/perfect-scrollbar/js/perfect-scrollbar.jquery',
+ 'highlightjs' : '../lib/highlightjs/highlight.pack'
},
shim: {
'knockout.mapping': {
diff --git a/app/shell.html b/app/shell.html
index 8a29c5c..3052ed0 100644
--- a/app/shell.html
+++ b/app/shell.html
@@ -1,13 +1,15 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+ Open file to view it.
+
+
+
\ No newline at end of file
diff --git a/app/shell.js b/app/shell.js
index 367ab7f..e7a553b 100644
--- a/app/shell.js
+++ b/app/shell.js
@@ -1,7 +1,26 @@
-define(function (require) {
- var app = require('durandal/app'),
- ko = require('knockout');
-
- return {
- };
+define(['durandal/app', 'knockout', 'highlightjs'], function (app, ko) {
+ var type = ko.observable(),
+ content = ko.observable();
+
+ var sub = app.on('filebrowser:open_file').then(function(message) {
+ type(message.type);
+ if( message.type === "json" ) {
+ content(ko.utils.stringifyJson(message.content));
+ } else {
+ content(message.content);
+ }
+ hljs.highlightBlock($('#editor')[0]);
+ }, this);
+
+
+ return {
+ attached: function () {
+ hljs.configure({
+ tabReplace: ' '
+ });
+ hljs.initHighlighting();
+ },
+ type: type,
+ content: content
+ };
});
\ No newline at end of file
diff --git a/app/widgets/filebrowser/view.html b/app/widgets/filebrowser/view.html
index 1413e51..35da6d4 100644
--- a/app/widgets/filebrowser/view.html
+++ b/app/widgets/filebrowser/view.html
@@ -3,7 +3,8 @@
-
+
+ Loading workspace...
-
+
+
+
+
+
+
+
+
-
+
-
-
Filebrowser Durandal widget
-
-
+
+
Filebrowser Durandal widget
+
+
-
-
-
+
+
+