Skip to content

Commit 900f416

Browse files
committed
Merge branch 'master' of github.com:ajaxorg/ace
2 parents 07d910b + 9a81a98 commit 900f416

26 files changed

+1005
-353
lines changed

demo/kitchen-sink/docs/haml.haml

+52-13
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,46 @@
11
!!!5
22

3-
# <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
4-
# <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
5-
# <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
6-
# <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
3+
/[if IE]
4+
%a{ :href => 'http://www.mozilla.com/en-US/firefox/' }
5+
%h1 Get Firefox
76

7+
-# This is a HAML comment. It will not show in the output HTML
8+
9+
-#
10+
This is a HAML multiline comment
11+
This won't be displayed
12+
Nor will this
13+
Nor will this.
14+
15+
/ This is a HTML comment. It will be rendered as HTML
16+
17+
/
18+
%p This doesn't render...
19+
%div
20+
%h1 Because it's commented out!
21+
22+
.row
23+
.col-md-6
24+
25+
.col-md-6
26+
27+
28+
#users.row.green
29+
#articles{:style => "border: 5px;"}
30+
#lists.list-inline
31+
32+
%div#todos.bg-green{:id => "#{@item.type}_#{@item.number}", :class => '#{@item.type} #{@item.urgency}', :phoney => `asdasdasd`}
833

9-
/adasdasdad
10-
%div{:id => "#{@item.type}_#{@item.number}", :class => '#{@item.type} #{@item.urgency}', :phoney => `asdasdasd`}
1134
/ file: app/views/movies/index.html.haml
12-
\d
35+
1336
%ads:{:bleh => 33}
14-
%p==ddd==
37+
%p
1538
Date/Time:
16-
- now = DateTime.now
39+
- now = DateTime.now
1740
%strong= now
18-
= if now DateTime.parse("December 31, 2006")
41+
= if now DateTime.parse("December 31, 2006")
1942
= "Happy new " + "year!"
43+
2044
%sfd.dfdfg
2145
#content
2246
.title
@@ -29,8 +53,23 @@
2953
%div.article.title Blah
3054
%div.article.date 2006-11-05
3155
%div.article.entry
32-
Neil Patrick Harris
56+
Neil Patrick Harris
3357

3458
%div[@user, :greeting]
35-
%bar[290]/
36-
==Hello!==
59+
%bar[290]
60+
61+
/ This is a comment
62+
63+
/ This is another comment with line break above
64+
65+
.row
66+
.col-md-6
67+
.col-md-6
68+
69+
.col-md-6
70+
71+
.row
72+
.col-md-6
73+
74+
75+
.col-md-6

demo/kitchen-sink/docs/pig.pig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
A = load 'mobydick.txt';
2+
B = foreach A generate flatten(TOKENIZE((chararray)$0)) as word;
3+
C = filter B by word matches '\\w+';
4+
D = group C by word;
5+
E = foreach D generate COUNT(C) as count, group as word;
6+
F = order E by count desc;
7+
-- one comment
8+
/* another comment */
9+
dump F;

doc/site/js/main.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ $(function() {
5050
}
5151
});
5252

53-
$("ul.menu-list li").click(function(e) {
53+
$("ul.menu-list li").click("click auxclick", function(e) {
5454
if (e.target.tagName !== "A") {
5555
var href = $(this).find("a").attr("href");
56-
if (e.button == 1)
56+
if (e.originalEvent.button == 1)
5757
window.open(href, "_blank");
58-
else
58+
else if (e.originalEvent.button == 0)
5959
window.location = href;
6060
}
6161
});
@@ -138,7 +138,9 @@ $(function() {
138138

139139
var state = {};
140140
state.nav = $(this).attr("href").substr(1);
141-
$.bbq.pushState(state);
141+
var oldState = $.bbq.getState("nav") || "about";
142+
if (state.nav != oldState)
143+
$.bbq.pushState(state);
142144
});
143145

144146
$('#tabnav a[data-toggle="tab"]').on('shown', function (e) {

doc/site/style.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ UL.menu-footer LI A:hover {
375375
.nav-pills > .active > a, .nav-pills > .active > a:hover {
376376
color: white;
377377
background-color: #555;
378-
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8);
378+
box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8)!important;
379379
text-shadow: 0px 0px 3px #000;
380380
}
381381

index.html

+68-116
Large diffs are not rendered by default.

kitchen-sink.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</head>
1919
<body>
2020
<div id="optionsPanel" style="position:absolute;height:100%;width:260px">
21-
<a href="http://c9.io" title="Cloud9 IDE | Your code anywhere, anytime">
21+
<a href="https://c9.io" title="Cloud9 IDE | Your code anywhere, anytime">
2222
<img id="c9-logo" src="demo/kitchen-sink/logo.png" style="width: 172px;margin: -9px 30px -12px 51px;">
2323
</a>
2424
<div style="position: absolute; overflow: hidden; top:100px; bottom:0">
@@ -261,7 +261,7 @@
261261
</td></tr>
262262
</table>
263263

264-
<a href="http://ace.c9.io">
264+
<a href="https://ace.c9.io">
265265
<img id="ace-logo" src="doc/site/images/ace-logo.png" style="width: 134px;margin: 46px 0px 4px 66px;">
266266
</a>
267267
<div><a target="_test" href="./lib/ace/test/tests.html"

lib/ace/autocomplete.js

+14-7
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,11 @@ var Autocomplete = function() {
139139
};
140140

141141
this.blurListener = function(e) {
142-
// If the user clicked on an anchor in the tooltip, open that before
143-
// we close the tooltip
144-
if (e.relatedTarget && e.relatedTarget.nodeName == "A" && e.relatedTarget.href) {
145-
window.open(e.relatedTarget.href, "_blank");
146-
}
147-
148142
// we have to check if activeElement is a child of popup because
149143
// on IE preventDefault doesn't stop scrollbar from being focussed
150144
var el = document.activeElement;
151145
var text = this.editor.textInput.getElement();
152-
var fromTooltip = e.relatedTarget && e.relatedTarget == this.tooltipNode;
146+
var fromTooltip = e.relatedTarget && this.tooltipNode.contains(e.relatedTarget);
153147
var container = this.popup && this.popup.container;
154148
if (el != text && el.parentNode != container && !fromTooltip
155149
&& el != this.tooltipNode && e.relatedTarget != text
@@ -371,6 +365,7 @@ var Autocomplete = function() {
371365
this.tooltipNode.style.pointerEvents = "auto";
372366
this.tooltipNode.tabIndex = -1;
373367
this.tooltipNode.onblur = this.blurListener.bind(this);
368+
this.tooltipNode.onclick = this.onTooltipClick.bind(this);
374369
}
375370

376371
var tooltipNode = this.tooltipNode;
@@ -407,6 +402,18 @@ var Autocomplete = function() {
407402
if (el.parentNode)
408403
el.parentNode.removeChild(el);
409404
};
405+
406+
this.onTooltipClick = function(e) {
407+
var a = e.target;
408+
while (a && a != this.tooltipNode) {
409+
if (a.nodeName == "A" && a.href) {
410+
a.rel = "noreferrer";
411+
a.target = "_blank";
412+
break;
413+
}
414+
a = a.parentNode;
415+
}
416+
}
410417

411418
}).call(Autocomplete.prototype);
412419

lib/ace/ext/modelist.js

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ var supportedModes = {
134134
Perl: ["pl|pm"],
135135
pgSQL: ["pgsql"],
136136
PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
137+
Pig: ["pig"],
137138
Powershell: ["ps1"],
138139
Praat: ["praat|praatscript|psc|proc"],
139140
Prolog: ["plg|prolog"],

lib/ace/ext/textarea.js

+1
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ function setupSettingPanel(settingDiv, settingOpener, editor) {
405405
cobalt: "Cobalt",
406406
crimson_editor: "Crimson Editor",
407407
dawn: "Dawn",
408+
gob: "Green on Black",
408409
eclipse: "Eclipse",
409410
idle_fingers: "Idle Fingers",
410411
kr_theme: "Kr Theme",

lib/ace/ext/themelist.js

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ var themeData = [
6464
["Clouds Midnight" ,"clouds_midnight" , "dark"],
6565
["Cobalt" ,"cobalt" , "dark"],
6666
["Gruvbox" ,"gruvbox" , "dark"],
67+
["Green on Black" ,"gob" , "dark"],
6768
["idle Fingers" ,"idle_fingers" , "dark"],
6869
["krTheme" ,"kr_theme" , "dark"],
6970
["Merbivore" ,"merbivore" , "dark"],

lib/ace/keyboard/textinput.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,12 @@ var TextInput = function(parentNode, host) {
375375
if (e.type == "compositionend" && c.range) {
376376
host.selection.setRange(c.range);
377377
}
378-
// Workaround for #3027, #3045, #3097, #3100
379-
if (useragent.isChrome && useragent.isChrome >= 53) {
378+
// Workaround for #3027, #3045, #3097, #3100, #3249
379+
var needsOnInput =
380+
(!!useragent.isChrome && useragent.isChrome >= 53) ||
381+
(!!useragent.isWebKit && useragent.isWebKit >= 603);
382+
383+
if (needsOnInput) {
380384
onInput();
381385
}
382386
};

lib/ace/layer/gutter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ var Gutter = function(parentEl) {
205205
var text = lastLineNumber = gutterRenderer
206206
? gutterRenderer.getText(session, row)
207207
: row + firstLineNumber;
208-
if (text != cell.textNode.data)
208+
if (text !== cell.textNode.data)
209209
cell.textNode.data = text;
210210

211211
row++;

0 commit comments

Comments
 (0)