Skip to content

Commit

Permalink
Broke each OPML source file out separately
Browse files Browse the repository at this point in the history
  • Loading branch information
scripting committed Sep 14, 2013
1 parent 81a8919 commit dccb0a8
Show file tree
Hide file tree
Showing 7 changed files with 4,132 additions and 4,027 deletions.
6 changes: 0 additions & 6 deletions concord.js
Original file line number Diff line number Diff line change
Expand Up @@ -1449,15 +1449,9 @@ function ConcordOp(root, concordInstance, _cursor) {
this.cursorToXml = function(){
return concordInstance.editor.opml(this.getCursor());
};



this.cursorToXmlSubsOnly = function(){ //8/5/13 by DW
return concordInstance.editor.opml(this.getCursor(), true);
};



this.cut = function(){
if(!this.inTextMode()){
this.copy();
Expand Down
38 changes: 37 additions & 1 deletion example1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@
"version": "0.42"
}
var appPrefs = {
"outlineFont": "Courier", "outlineFontSize": 14, "outlineLineHeight": 22,
"outlineFont": "Arial", "outlineFontSize": 16, "outlineLineHeight": 24,
"authorName": "", "authorEmail": ""
};
var whenLastKeystroke = new Date (), whenLastAutoSave = new Date ();
var flReadOnly = false, flRenderMode = false;
var cmdKeyPrefix = "Ctrl+";

var urlConcordSource = "http://static.smallpicture.com/tacoma/wo/admin/2013/09/11/archive048.opml";
var urlConcordCssSource = "http://static.smallpicture.com/tacoma/wo/admin/2013/09/14/archive052.opml";
var urlConcordDocs = "http://static.smallpicture.com/tacoma/wo/admin/2013/09/14/archive050.opml"
var urlConcordUtilsSource = "http://static.smallpicture.com/tacoma/wo/admin/2013/09/14/archive051.opml";
var urlHelloOutliner = "http://static.smallpicture.com/tacoma/wo/admin/2013/09/12/archive049.opml";

function opVisitAll (callback) {
Expand All @@ -36,6 +41,28 @@
}
return (theString);
}
function multipleReplaceAll (s, adrTable, flCaseSensitive, startCharacters, endCharacters) {
if(flCaseSensitive===undefined){
flCaseSensitive = false;
}
if(startCharacters===undefined){
startCharacters="";
}
if(endCharacters===undefined){
endCharacters="";
}
for( var item in adrTable){
var replacementValue = adrTable[item];
var regularExpressionModifier = "g";
if(!flCaseSensitive){
regularExpressionModifier = "gi";
}
var regularExpressionString = (startCharacters+item+endCharacters).replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
var regularExpression = new RegExp(regularExpressionString, regularExpressionModifier);
s = s.replace(regularExpression, replacementValue);
}
return s;
};

function setInclude () {
opSetOneAtt ("type", "include");
Expand Down Expand Up @@ -63,6 +90,11 @@
}
};
summit.visitLevel (visitSub);

var t = new Object ();
t.text = summit.getLineText ();
htmltext = multipleReplaceAll (htmltext, t, false, "<" + "%", "%" + ">");

document.open ();
document.write (htmltext);
document.close ();
Expand Down Expand Up @@ -311,7 +343,11 @@
<li class="dropdown" id="idSourceMenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Source&nbsp;<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a onclick="editSource (urlConcordSource);">Concord</a></li>
<li><a onclick="editSource (urlHelloOutliner);">Hello Outliner</a></li>
<li><a onclick="editSource (urlConcordCssSource);">Concord CSS</a></li>
<li><a onclick="editSource (urlConcordUtilsSource);">Concord Utils</a></li>
<li><a onclick="editSource (urlConcordDocs);">Concord Docs</a></li>
<li class="divider"></li>
<li><a onclick="nukeDom ();">Nuke the DOM</a></li>
</ul>
Expand Down
76 changes: 53 additions & 23 deletions example1/source.opml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- OPML generated by OPML Editor v11.0.6 on Fri, 13 Sep 2013 22:17:08 GMT -->
<!-- OPML generated by OPML Editor v11.0.6 on Sat, 14 Sep 2013 14:42:44 GMT -->
<opml version="2.0">
<head>
<title>Hello Outliner for GitHub</title>
<dateCreated>Thu, 12 Sep 2013 20:16:33 GMT</dateCreated>
<dateModified>Fri, 13 Sep 2013 22:17:08 GMT</dateModified>
<ownerName>admin</ownerName>
<dateCreated>Sat, 14 Sep 2013 13:18:23 GMT</dateCreated>
<dateModified>Sat, 14 Sep 2013 14:42:44 GMT</dateModified>
<ownerName></ownerName>
<ownerEmail></ownerEmail>
<expansionState>1, 2, 3, 14, 22, 25, 27, 35, 37, 63, 65, 81, 83, 84, 85, 86, 87, 89, 90, 92, 119, 121, 135, 138, 144, 147</expansionState>
<vertScrollState>103</vertScrollState>
<windowTop>66</windowTop>
<windowLeft>982</windowLeft>
<windowBottom>1099</windowBottom>
<windowRight>2399</windowRight>
<expansionState>1, 2, 3, 14, 16, 54, 56, 57, 58, 59, 60, 62, 64, 66</expansionState>
<vertScrollState>1</vertScrollState>
<windowTop>52</windowTop>
<windowLeft>915</windowLeft>
<windowBottom>1085</windowBottom>
<windowRight>2332</windowRight>
</head>
<body>
<outline text="Hello outliner" created="Wed, 11 Sep 2013 23:48:55 GMT" domain="hello.blorkmark.com" name="helloWorldOutliner" pgfnum="30144" type="html">
Expand All @@ -37,13 +37,18 @@
<outline text="}" created="Sun, 06 Jan 2013 16:22:26 GMT" pgfnum="16753"/>
</outline>
<outline text="var appPrefs = {" created="Fri, 04 Jan 2013 13:52:28 GMT" pgfnum="16628">
<outline text="&quot;outlineFont&quot;: &quot;Courier&quot;, &quot;outlineFontSize&quot;: 14, &quot;outlineLineHeight&quot;: 22," created="Fri, 04 Jan 2013 22:10:41 GMT" pgfnum="16699"/>
<outline text="&quot;outlineFont&quot;: &quot;Arial&quot;, &quot;outlineFontSize&quot;: 16, &quot;outlineLineHeight&quot;: 24," created="Fri, 04 Jan 2013 22:10:41 GMT" pgfnum="16699"/>
<outline text="&quot;authorName&quot;: &quot;&quot;, &quot;authorEmail&quot;: &quot;&quot;" created="Fri, 22 Mar 2013 17:27:06 GMT" pgfnum="21119"/>
<outline text="};" created="Fri, 04 Jan 2013 22:10:46 GMT" pgfnum="16700"/>
</outline>
<outline text="var whenLastKeystroke = new Date (), whenLastAutoSave = new Date (); " created="Fri, 01 Feb 2013 00:29:18 GMT" pgfnum="18027"/>
<outline text="var flReadOnly = false, flRenderMode = false;" created="Sat, 17 Aug 2013 17:23:00 GMT" pgfnum="29108"/>
<outline text="var cmdKeyPrefix = &quot;Ctrl+&quot;; " created="Mon, 25 Mar 2013 22:54:43 GMT" pgfnum="21400"/>
<outline text="" created="Sat, 14 Sep 2013 14:31:15 GMT" pgfnum="30257"/>
<outline text="var urlConcordSource = &quot;http://static.smallpicture.com/tacoma/wo/admin/2013/09/11/archive048.opml&quot;;" created="Sat, 14 Sep 2013 14:31:15 GMT" pgfnum="30259"/>
<outline text="var urlConcordCssSource = &quot;http://static.smallpicture.com/tacoma/wo/admin/2013/09/14/archive052.opml&quot;;" created="Sat, 14 Sep 2013 14:32:16 GMT" pgfnum="30261"/>
<outline text="var urlConcordDocs = &quot;http://static.smallpicture.com/tacoma/wo/admin/2013/09/14/archive050.opml&quot;" created="Sat, 14 Sep 2013 14:33:00 GMT" pgfnum="30262"/>
<outline text="var urlConcordUtilsSource = &quot;http://static.smallpicture.com/tacoma/wo/admin/2013/09/14/archive051.opml&quot;;" created="Sat, 14 Sep 2013 14:31:49 GMT" pgfnum="30260"/>
<outline text="var urlHelloOutliner = &quot;http://static.smallpicture.com/tacoma/wo/admin/2013/09/12/archive049.opml&quot;;" created="Fri, 13 Sep 2013 15:33:11 GMT" pgfnum="30221"/>
<outline text="" created="Fri, 29 Mar 2013 22:08:39 GMT" pgfnum="21671"/>
<outline text="function opVisitAll (callback) {" created="Fri, 13 Sep 2013 01:18:52 GMT" pgfnum="30210">
Expand All @@ -59,6 +64,34 @@
<outline text="return (theString);" created="Fri, 01 Feb 2013 23:51:24 GMT" pgfnum="18107"/>
<outline text="}" created="Wed, 24 Jul 2013 20:47:33 GMT" pgfnum="28253"/>
</outline>
<outline text="function multipleReplaceAll (s, adrTable, flCaseSensitive, startCharacters, endCharacters) {">
<outline text="if(flCaseSensitive===undefined){">
<outline text="flCaseSensitive = false;"/>
<outline text="}"/>
</outline>
<outline text="if(startCharacters===undefined){">
<outline text="startCharacters=&quot;&quot;;"/>
<outline text="}"/>
</outline>
<outline text="if(endCharacters===undefined){">
<outline text="endCharacters=&quot;&quot;;"/>
<outline text="}"/>
</outline>
<outline text="for( var item in adrTable){">
<outline text="var replacementValue = adrTable[item];"/>
<outline text="var regularExpressionModifier = &quot;g&quot;;"/>
<outline text="if(!flCaseSensitive){">
<outline text="regularExpressionModifier = &quot;gi&quot;;"/>
<outline text="}"/>
</outline>
<outline text="var regularExpressionString = (startCharacters+item+endCharacters).replace(/([.?*+^$[\]\\(){}|-])/g, &quot;\\$1&quot;); "/>
<outline text="var regularExpression = new RegExp(regularExpressionString, regularExpressionModifier);"/>
<outline text="s = s.replace(regularExpression, replacementValue);"/>
<outline text="}"/>
</outline>
<outline text="return s;"/>
<outline text="};"/>
</outline>
<outline text="" created="Fri, 13 Sep 2013 01:18:52 GMT" pgfnum="30212"/>
<outline text="function setInclude () {" created="Fri, 13 Sep 2013 01:23:09 GMT" pgfnum="30215">
<outline text="opSetOneAtt (&quot;type&quot;, &quot;include&quot;);" created="Fri, 13 Sep 2013 01:23:16 GMT" pgfnum="30216"/>
Expand Down Expand Up @@ -93,6 +126,11 @@
<outline text="};"/>
</outline>
<outline text="summit.visitLevel (visitSub);"/>
<outline text="" created="Sat, 14 Sep 2013 12:33:24 GMT" pgfnum="30246"/>
<outline text="var t = new Object ();" created="Sat, 14 Sep 2013 12:33:25 GMT" pgfnum="30247"/>
<outline text="t.text = summit.getLineText ();" created="Sat, 14 Sep 2013 12:33:38 GMT" pgfnum="30251"/>
<outline text="htmltext = multipleReplaceAll (htmltext, t, false, &quot;&lt;&quot; + &quot;%&quot;, &quot;%&quot; + &quot;&gt;&quot;);" created="Sat, 14 Sep 2013 12:33:47 GMT" pgfnum="30252"/>
<outline text="" created="Sat, 14 Sep 2013 12:33:25 GMT" pgfnum="30250"/>
<outline text="document.open ();"/>
<outline text="document.write (htmltext);"/>
<outline text="document.write (&quot;&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi mom!&lt;/body&gt;&lt;/html&gt;&quot;);" isComment="true"/>
Expand Down Expand Up @@ -422,7 +460,11 @@
<outline text="&lt;li class=&quot;dropdown&quot; id=&quot;idSourceMenu&quot;&gt; ">
<outline text="&lt;a href=&quot;#&quot; class=&quot;dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;Source&amp;nbsp;&lt;b class=&quot;caret&quot;&gt;&lt;/b&gt;&lt;/a&gt;"/>
<outline text="&lt;ul class=&quot;dropdown-menu&quot;&gt;">
<outline text="&lt;li&gt;&lt;a onclick=&quot;editSource (urlConcordSource);&quot;&gt;Concord&lt;/a&gt;&lt;/li&gt;"/>
<outline text="&lt;li&gt;&lt;a onclick=&quot;editSource (urlHelloOutliner);&quot;&gt;Hello Outliner&lt;/a&gt;&lt;/li&gt;"/>
<outline text="&lt;li&gt;&lt;a onclick=&quot;editSource (urlConcordCssSource);&quot;&gt;Concord CSS&lt;/a&gt;&lt;/li&gt;"/>
<outline text="&lt;li&gt;&lt;a onclick=&quot;editSource (urlConcordUtilsSource);&quot;&gt;Concord Utils&lt;/a&gt;&lt;/li&gt;"/>
<outline text="&lt;li&gt;&lt;a onclick=&quot;editSource (urlConcordDocs);&quot;&gt;Concord Docs&lt;/a&gt;&lt;/li&gt;"/>
<outline text="&lt;li class=&quot;divider&quot;&gt;&lt;/li&gt;"/>
<outline text="&lt;li&gt;&lt;a onclick=&quot;nukeDom ();&quot;&gt;Nuke the DOM&lt;/a&gt;&lt;/li&gt;"/>
<outline text="&lt;/ul&gt;"/>
Expand Down Expand Up @@ -478,17 +520,5 @@
<outline text="&lt;/html&gt;" created="Fri, 17 Aug 2012 02:09:49 GMT" pgfnum="11873"/>
</outline>
</outline>
<outline text="" created="Fri, 13 Sep 2013 01:00:34 GMT" pgfnum="30204"/>
<outline text="Concord docs" domain="concorddocs.blorkmark.com" name="concordDocs" type="blogpost">
<outline text="&lt;rules (blogSectionsRules)&gt;"/>
<outline text="What is Concord?" created="Wed, 11 Sep 2013 23:43:11 GMT" pgfnum="30136">
<outline text="Concord is the outline editor engine that's at the core of Small Picture's Fargo outliner. " created="Wed, 11 Sep 2013 23:44:02 GMT" pgfnum="30138"/>
<outline text="It's a jQuery plug-in that implements a full-featured outliner that you can drop into other applications with a minimum of work. " created="Wed, 11 Sep 2013 23:43:14 GMT" pgfnum="30137"/>
<outline text="It's licensed under the GPL because we want outliners are an incredibly useful way to edit structured information, and we want Concord to fill every conceivable niche that an outliner can help. " created="Wed, 11 Sep 2013 23:44:29 GMT" pgfnum="30139"/>
</outline>
<outline text="Hello World outliner" created="Wed, 11 Sep 2013 23:45:31 GMT" pgfnum="30140">
<outline text="A very basic outliner." created="Wed, 11 Sep 2013 23:45:45 GMT" pgfnum="30141"/>
</outline>
</outline>
</body>
</opml>
Loading

0 comments on commit dccb0a8

Please sign in to comment.