Cancel out unwanted editor's css for autocomplete dialog
This commit is contained in:
parent
e06a14ab92
commit
889e9248f8
1 changed files with 18 additions and 13 deletions
|
|
@ -43,7 +43,7 @@ var $singleLineEditor = function(el) {
|
||||||
var renderer = new Renderer(el);
|
var renderer = new Renderer(el);
|
||||||
|
|
||||||
renderer.$maxLines = 4;
|
renderer.$maxLines = 4;
|
||||||
|
|
||||||
var editor = new Editor(renderer);
|
var editor = new Editor(renderer);
|
||||||
|
|
||||||
editor.setHighlightActiveLine(false);
|
editor.setHighlightActiveLine(false);
|
||||||
|
|
@ -59,13 +59,13 @@ var $singleLineEditor = function(el) {
|
||||||
var AcePopup = function(parentNode) {
|
var AcePopup = function(parentNode) {
|
||||||
var el = dom.createElement("div");
|
var el = dom.createElement("div");
|
||||||
var popup = new $singleLineEditor(el);
|
var popup = new $singleLineEditor(el);
|
||||||
|
|
||||||
if (parentNode)
|
if (parentNode)
|
||||||
parentNode.appendChild(el);
|
parentNode.appendChild(el);
|
||||||
el.style.display = "none";
|
el.style.display = "none";
|
||||||
popup.renderer.content.style.cursor = "default";
|
popup.renderer.content.style.cursor = "default";
|
||||||
popup.renderer.setStyle("ace_autocomplete");
|
popup.renderer.setStyle("ace_autocomplete");
|
||||||
|
|
||||||
popup.setOption("displayIndentGuides", false);
|
popup.setOption("displayIndentGuides", false);
|
||||||
|
|
||||||
var noop = function(){};
|
var noop = function(){};
|
||||||
|
|
@ -155,11 +155,11 @@ var AcePopup = function(parentNode) {
|
||||||
popup.getHoveredRow = function() {
|
popup.getHoveredRow = function() {
|
||||||
return hoverMarker.start.row;
|
return hoverMarker.start.row;
|
||||||
};
|
};
|
||||||
|
|
||||||
event.addListener(popup.container, "mouseout", hideHoverMarker);
|
event.addListener(popup.container, "mouseout", hideHoverMarker);
|
||||||
popup.on("hide", hideHoverMarker);
|
popup.on("hide", hideHoverMarker);
|
||||||
popup.on("changeSelection", hideHoverMarker);
|
popup.on("changeSelection", hideHoverMarker);
|
||||||
|
|
||||||
popup.session.doc.getLength = function() {
|
popup.session.doc.getLength = function() {
|
||||||
return popup.data.length;
|
return popup.data.length;
|
||||||
};
|
};
|
||||||
|
|
@ -203,7 +203,7 @@ var AcePopup = function(parentNode) {
|
||||||
};
|
};
|
||||||
bgTokenizer.$updateOnChange = noop;
|
bgTokenizer.$updateOnChange = noop;
|
||||||
bgTokenizer.start = noop;
|
bgTokenizer.start = noop;
|
||||||
|
|
||||||
popup.session.$computeWidth = function() {
|
popup.session.$computeWidth = function() {
|
||||||
return this.screenWidth = 0;
|
return this.screenWidth = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -211,7 +211,7 @@ var AcePopup = function(parentNode) {
|
||||||
// public
|
// public
|
||||||
popup.isOpen = false;
|
popup.isOpen = false;
|
||||||
popup.isTopdown = false;
|
popup.isTopdown = false;
|
||||||
|
|
||||||
popup.data = [];
|
popup.data = [];
|
||||||
popup.setData = function(list) {
|
popup.setData = function(list) {
|
||||||
popup.data = list || [];
|
popup.data = list || [];
|
||||||
|
|
@ -236,7 +236,7 @@ var AcePopup = function(parentNode) {
|
||||||
popup._signal("select");
|
popup._signal("select");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
popup.on("changeSelection", function() {
|
popup.on("changeSelection", function() {
|
||||||
if (popup.isOpen)
|
if (popup.isOpen)
|
||||||
popup.setRow(popup.selection.lead.row);
|
popup.setRow(popup.selection.lead.row);
|
||||||
|
|
@ -268,22 +268,22 @@ var AcePopup = function(parentNode) {
|
||||||
|
|
||||||
el.style.display = "";
|
el.style.display = "";
|
||||||
this.renderer.$textLayer.checkForSizeChanges();
|
this.renderer.$textLayer.checkForSizeChanges();
|
||||||
|
|
||||||
var left = pos.left;
|
var left = pos.left;
|
||||||
if (left + el.offsetWidth > screenWidth)
|
if (left + el.offsetWidth > screenWidth)
|
||||||
left = screenWidth - el.offsetWidth;
|
left = screenWidth - el.offsetWidth;
|
||||||
|
|
||||||
el.style.left = left + "px";
|
el.style.left = left + "px";
|
||||||
|
|
||||||
this._signal("show");
|
this._signal("show");
|
||||||
lastMouseEvent = null;
|
lastMouseEvent = null;
|
||||||
popup.isOpen = true;
|
popup.isOpen = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
popup.getTextLeftOffset = function() {
|
popup.getTextLeftOffset = function() {
|
||||||
return this.$borderSize + this.renderer.$padding + this.$imageSize;
|
return this.$borderSize + this.renderer.$padding + this.$imageSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
popup.$imageSize = 0;
|
popup.$imageSize = 0;
|
||||||
popup.$borderSize = 1;
|
popup.$borderSize = 1;
|
||||||
|
|
||||||
|
|
@ -304,6 +304,11 @@ dom.importCssString("\
|
||||||
position: absolute;\
|
position: absolute;\
|
||||||
z-index: 2;\
|
z-index: 2;\
|
||||||
}\
|
}\
|
||||||
|
.ace_editor.ace_autocomplete .ace_scroller {\
|
||||||
|
background: none;\
|
||||||
|
border: none;\
|
||||||
|
box-shadow: none;\
|
||||||
|
}\
|
||||||
.ace_rightAlignedText {\
|
.ace_rightAlignedText {\
|
||||||
color: gray;\
|
color: gray;\
|
||||||
display: inline-block;\
|
display: inline-block;\
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue