Commit 9f33e24e authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Intermediate merge.

parents cca2323c e2e13113
......@@ -132,13 +132,13 @@ define(["jquery", "emitter"], function($, Emitter) {
//key == file name
getCookieKey: function() {
var key = this.view.editor.path;
var key = this.view.getState("path");
return key ? key.split("/").pop() : null;
},
setDefault: function() {
if (this.view.editor && this.view.editor.path) {
var fileExtension = this.view.editor.path.match(/\.(.+?)$/);
if (this.view.editor && this.view.getState("path")) {
var fileExtension = this.view.getState("path").match(/\.(.+?)$/);
if (fileExtension) {
fileExtension = fileExtension[1];
for (var i in this.commandlineTemplates) {
......
......@@ -23,7 +23,7 @@ define(["jquery", "emitter", "./action", "require"], function($, Emitter, CodeEd
this.view.on("stateChange", function(key) {
if (key == "path") {
if (!self.node) return;
if (!self.ace) return;
var path = this.getState("path");
if (!path) return;
if (self.path == path) return;
......@@ -35,17 +35,13 @@ define(["jquery", "emitter", "./action", "require"], function($, Emitter, CodeEd
self.actions.save(function() {
self.actions.loadContent(path);
});
} else {
self.path = path;
} else
self.actions.loadContent(path);
}
} else if (key == "line") {
if (!self.path) return;
self.ace.gotoLine(this.getState("line"));
}
});
require(["ace/ace", "ace/ext/language_tools"]);
},
setup: function(node) {
......@@ -64,7 +60,6 @@ define(["jquery", "emitter", "./action", "require"], function($, Emitter, CodeEd
self.keyupMaxTimeout = self.keyupMaxTimeout || setTimeout(check, 1000);
});
ace.require("ace/ext/language_tools");
self.ace = ace.edit($(self.node).get(0));
self.ace.setOptions({
enableBasicAutocompletion: true,
......
......@@ -126,3 +126,8 @@ nav > .navbar-nav > li.active > a > b.caret {
.vispa-zeroheight {
height: 0px !important;
}
body > .blocker {
visibility: hidden !important;
opacity: 0 !important;
}
......@@ -16,6 +16,7 @@ ul.dropdown-menu>li.divider:first-child{display:none}
.vispa-rtl-fix-hidden{color:transparent;font-size:0;display:none}
.vispa-caret-trans{border-top-color:transparent!important;border-bottom-color:transparent!important}
.vispa-zeroheight{height:0!important}
body>.blocker{visibility:hidden!important;opacity:0!important}
.vispa-nav{z-index:1;border-radius:0}
.vispa-header-logo{margin:0 10px}
.vispa-body{position:absolute;top:50px;right:0;bottom:0;left:0;z-index:0}
......
......@@ -16,6 +16,7 @@ ul.dropdown-menu>li.divider:first-child{display:none}
.vispa-rtl-fix-hidden{color:transparent;font-size:0;display:none}
.vispa-caret-trans{border-top-color:transparent!important;border-bottom-color:transparent!important}
.vispa-zeroheight{height:0!important}
body>.blocker{visibility:hidden!important;opacity:0!important}
body{padding-top:20px;padding-bottom:20px}
.vispa-header-logo{margin-right:15px}
.tab-content{margin-top:20px}
......
......@@ -16,6 +16,7 @@ ul.dropdown-menu>li.divider:first-child{display:none}
.vispa-rtl-fix-hidden{color:transparent;font-size:0;display:none}
.vispa-caret-trans{border-top-color:transparent!important;border-bottom-color:transparent!important}
.vispa-zeroheight{height:0!important}
body>.blocker{visibility:hidden!important;opacity:0!important}
body{padding-top:20px;padding-bottom:20px}
.vispa-header-logo{margin-right:15px}
.tab-content{margin-top:20px}
......
......@@ -15,7 +15,7 @@
</%block>
<%block name="js_imports_pre">
<script src="${base_static}/vendor/requirejs/require.js"></script>
<script src="${base_static}vendor/requirejs/require.js"></script>
</%block>
<%block name="js_inline_post">
......@@ -85,4 +85,19 @@
});
</%block>
<%block name="css_inline">
body > div.blocker {
position: absolute;
height: 100%;
width: 100%;
background-color: white;
z-index: 100;
visibility: visible;
opacity: 1;
transition: visibility 0s linear 0.05s, opacity 0.05s linear;
}
</%block>
<div class="blocker"></div>
${next.body()}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment