Skip to content

Commit 482747c

Browse files
committed
v2.49
1 parent 311a0e2 commit 482747c

4 files changed

Lines changed: 54 additions & 22 deletions

File tree

concord.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (!Array.prototype.indexOf) {
2020
}
2121
}
2222
var concord = {
23-
version: "2.48",
23+
version: "2.49",
2424
mobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),
2525
ready: false,
2626
handleEvents: true,
@@ -2449,7 +2449,12 @@ function ConcordOp(root, concordInstance, _cursor) {
24492449
this.setCursor(node);
24502450
this.markChanged();
24512451
};
2452-
this.xmlToOutline = function(xmlText) {
2452+
this.xmlToOutline = function(xmlText, flSetFocus) { //2/22/14 by DW -- new param, flSetFocus
2453+
2454+
if (flSetFocus == undefined) { //2/22/14 by DW
2455+
flSetFocus = true;
2456+
}
2457+
24532458
var doc = null;
24542459
if(typeof xmlText == "string") {
24552460
doc = $($.parseXML(xmlText));
@@ -2503,7 +2508,11 @@ function ConcordOp(root, concordInstance, _cursor) {
25032508
} while(cursor!=null);
25042509
}
25052510
this.setTextMode(false);
2506-
this.setCursor(root.find(".concord-node:first"));
2511+
2512+
if (flSetFocus) {
2513+
this.setCursor(root.find(".concord-node:first"));
2514+
}
2515+
25072516
root.data("currentChange", root.children().clone(true, true));
25082517
return true;
25092518
};

opml/concord.opml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
2-
<!-- OPML generated by OPML Editor v11.0.6 on Sun, 15 Sep 2013 13:16:05 GMT -->
2+
<!-- OPML generated by OPML Editor v10.1a16 on Sat, 22 Feb 2014 23:31:27 GMT -->
33
<opml version="2.0">
44
<head>
55
<title>Concord on Github</title>
6-
<dateCreated>Sat, 14 Sep 2013 14:39:17 GMT</dateCreated>
7-
<dateModified>Sun, 15 Sep 2013 13:16:05 GMT</dateModified>
8-
<ownerName>admin</ownerName>
9-
<ownerEmail></ownerEmail>
10-
<expansionState>1, 13, 35, 58, 83</expansionState>
11-
<vertScrollState>1</vertScrollState>
12-
<windowTop>271</windowTop>
13-
<windowLeft>385</windowLeft>
14-
<windowBottom>1333</windowBottom>
15-
<windowRight>1489</windowRight>
6+
<dateCreated>Sat, 22 Feb 2014 22:47:50 GMT</dateCreated>
7+
<dateModified>Sat, 22 Feb 2014 23:31:27 GMT</dateModified>
8+
<ownerName></ownerName>
9+
<ownerId>http://davewiner.com/</ownerId>
10+
<expansionState>1, 6, 26, 42, 52, 57, 58, 71, 94, 119, 159, 190, 192, 212</expansionState>
11+
<vertScrollState>167</vertScrollState>
12+
<windowTop>155</windowTop>
13+
<windowLeft>819</windowLeft>
14+
<windowBottom>1217</windowBottom>
15+
<windowRight>1923</windowRight>
1616
</head>
1717
<body>
1818
<outline text="concord.js" content-type="text/javascript" domain="concordjs.blorkmark.com" name="concordjs" type="html">
@@ -46,7 +46,7 @@
4646
<outline text="}"/>
4747
</outline>
4848
<outline text="var concord = {" created="Mon, 11 Mar 2013 15:05:35 GMT" pgfnum="322">
49-
<outline text="version: &quot;2.48&quot;," created="Mon, 11 Mar 2013 15:05:42 GMT" pgfnum="323"/>
49+
<outline text="version: &quot;2.49&quot;," created="Mon, 11 Mar 2013 15:05:42 GMT" pgfnum="323"/>
5050
<outline text="mobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)," created="Thu, 28 Mar 2013 16:02:36 GMT" pgfnum="1044"/>
5151
<outline text="ready: false," created="Fri, 15 Mar 2013 22:01:31 GMT" pgfnum="527"/>
5252
<outline text="handleEvents: true," created="Mon, 11 Mar 2013 15:09:43 GMT" pgfnum="327"/>
@@ -3146,7 +3146,13 @@
31463146
<outline text="this.markChanged();"/>
31473147
<outline text="};"/>
31483148
</outline>
3149-
<outline text="this.xmlToOutline = function(xmlText) {">
3149+
<outline text="this.xmlToOutline = function(xmlText, flSetFocus) { //2/22/14 by DW -- new param, flSetFocus">
3150+
<outline text="" created="Sat, 22 Feb 2014 22:50:19 GMT" pgfnum="37853"/>
3151+
<outline text="if (flSetFocus == undefined) { //2/22/14 by DW" created="Sat, 22 Feb 2014 22:50:19 GMT" pgfnum="37854">
3152+
<outline text="flSetFocus = true;" created="Sat, 22 Feb 2014 22:50:27 GMT" pgfnum="37857"/>
3153+
<outline text="}" created="Sat, 22 Feb 2014 22:50:30 GMT" pgfnum="37858"/>
3154+
</outline>
3155+
<outline text="" created="Sat, 22 Feb 2014 22:50:19 GMT" pgfnum="37856"/>
31503156
<outline text="var doc = null;"/>
31513157
<outline text="if(typeof xmlText == &quot;string&quot;) {" collapse="true">
31523158
<outline text="doc = $($.parseXML(xmlText));"/>
@@ -3214,7 +3220,12 @@
32143220
<outline text="}" created="Sat, 02 Feb 2013 00:04:35 GMT" pgfnum="815"/>
32153221
</outline>
32163222
<outline text="this.setTextMode(false);" created="Mon, 28 Jan 2013 16:52:16 GMT" pgfnum="503"/>
3217-
<outline text="this.setCursor(root.find(&quot;.concord-node:first&quot;));" created="Mon, 28 Jan 2013 16:50:25 GMT" pgfnum="502"/>
3223+
<outline text="" created="Sat, 22 Feb 2014 22:51:18 GMT" pgfnum="37859"/>
3224+
<outline text="if (flSetFocus) {" created="Sat, 22 Feb 2014 22:51:18 GMT" pgfnum="37860">
3225+
<outline text="this.setCursor(root.find(&quot;.concord-node:first&quot;));" created="Mon, 28 Jan 2013 16:50:25 GMT" pgfnum="502"/>
3226+
<outline text="}" created="Sat, 22 Feb 2014 22:51:23 GMT" pgfnum="37861"/>
3227+
</outline>
3228+
<outline text="" created="Sat, 22 Feb 2014 22:51:33 GMT" pgfnum="37862"/>
32183229
<outline text="root.data(&quot;currentChange&quot;, root.children().clone(true, true));" created="Wed, 23 Jan 2013 15:24:57 GMT" pgfnum="179"/>
32193230
<outline text="return true;"/>
32203231
<outline text="};"/>

opml/worknotes.opml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
2-
<!-- OPML generated by OPML Editor v11.0.6 on Fri, 20 Sep 2013 13:45:51 GMT -->
2+
<!-- OPML generated by OPML Editor v10.1a16 on Sat, 22 Feb 2014 23:36:37 GMT -->
33
<opml version="2.0">
44
<head>
55
<title>Worknotes for GitHub project</title>
6-
<dateCreated>Fri, 20 Sep 2013 13:18:13 GMT</dateCreated>
7-
<dateModified>Fri, 20 Sep 2013 13:45:51 GMT</dateModified>
6+
<dateCreated>Sat, 22 Feb 2014 23:29:32 GMT</dateCreated>
7+
<dateModified>Sat, 22 Feb 2014 23:36:37 GMT</dateModified>
88
<ownerName></ownerName>
9-
<ownerEmail></ownerEmail>
10-
<expansionState>1, 2, 3, 7, 10, 13, 16</expansionState>
9+
<ownerId>http://davewiner.com/</ownerId>
10+
<expansionState>1, 2</expansionState>
1111
<vertScrollState>1</vertScrollState>
1212
<windowTop>138</windowTop>
1313
<windowLeft>1187</windowLeft>
@@ -16,6 +16,10 @@
1616
</head>
1717
<body>
1818
<outline text="Worknotes" created="Thu, 19 Sep 2013 12:07:43 GMT" pgfnum="30470">
19+
<outline text="2/22/14 by DW" created="Sat, 22 Feb 2014 23:29:34 GMT" pgfnum="37867">
20+
<outline text="v2.49 -- xmlToOutline takes a new optional param, flSetFocus. Defaults true. If false, we don't set the focus in the outline. This is useful when using the outliner to display text in a web page. If the outline is two screens down, you don't want the page to scroll down to it on reload. " created="Sat, 22 Feb 2014 23:29:35 GMT" pgfnum="37868"/>
21+
<outline text="Thanks to &lt;a href=&quot;http://k4shif.blogspot.com/&quot;&gt;Kashif Khan&lt;/a&gt; for finding this fix. ;-)" created="Sat, 22 Feb 2014 23:35:51 GMT" pgfnum="37869"/>
22+
</outline>
1923
<outline text="9/20/13 by DW" created="Fri, 20 Sep 2013 13:18:15 GMT" pgfnum="30559">
2024
<outline text="Example1 -- Hello Outliner" created="Fri, 20 Sep 2013 13:20:32 GMT" pgfnum="30563">
2125
<outline text="Change the initial value of renderMode from false to true." created="Fri, 20 Sep 2013 13:18:15 GMT" pgfnum="30560"/>

worknotes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
### 2/22/14 by DW
2+
3+
v2.49 -- xmlToOutline takes a new optional param, flSetFocus. Defaults true. If false, we don't set the focus in the outline. This is useful when using the outliner to display text in a web page. If the outline is two screens down, you don't want the page to scroll down to it on reload.
4+
5+
Thanks to <a href="http://k4shif.blogspot.com/">Kashif Khan</a> for finding this fix. ;-)
6+
7+
8+
19
### 9/20/13 by DW
210

311
Example1 -- Hello Outliner

0 commit comments

Comments
 (0)