forked from philschatz/collab.demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
185 lines (144 loc) · 7.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>OER Editor Sandbox</title>
<!-- These CSS/javascript files depend on where Aloha is located -->
<link rel="stylesheet" type="text/css" href="../Aloha-Editor/src/css/aloha.css" />
<script type="text/javascript">
window.Aloha = window.Aloha || {};
Aloha.settings = Aloha.settings || {};
// In order to load the toolbar plugin Aloha needs to know where to look it up
// Since the toolbar plugin begins with "custom/" in @data-aloha-plugins
// This points Aloha to use the current directory to find toolba/lib/toolbar-plugin
Aloha.settings.bundles = {
'custom': document.location.href.replace(/[a-z]+\.html/, ''),
};
Aloha.settings.plugins = {
block: {
defaults : {
'.default-block': {
},
'figure': {
'aloha-block-type': 'FigureBlock'
},
}
}
}
</script>
<script src="../Aloha-Editor/src/lib/vendor/jquery-1.7.2.js"></script>
<script src="../Aloha-Editor/src/lib/require.js"></script>
<script>Aloha.settings.jQuery = jQuery;</script>
<!-- The first plugins are required but the rest are included for playing around with -->
<script src="../Aloha-Editor/src/lib/aloha.js" data-aloha-plugins="
common/ui,
custom/toolbar,
custom/figure,
common/dom-to-xhtml,
common/format,
common/table,
common/list,
common/link,
common/highlighteditables,
common/undo,
common/paste,
common/characterpicker,
common/commands,
common/block,
common/image,
common/abbr,
common/horizontalruler,
common/align,
extra/formatlesspaste,
extra/toc,
extra/listenforcer,
extra/metaview,
extra/ribbon,
extra/wai-lang,
extra/flag-icons,
extra/linkbrowser,
extra/imagebrowser,
extra/cite
"></script>
<!-- common/contenthandler, Warps figure tags into div tags -->
<!-- URL of the collaboration server (Comment to disable) -->
<script src="http://localhost:3001/socket.io/socket.io.js" async="async"></script>
<link rel="stylesheet" type="text/css" href="./collab.css" />
<script src="./collab.js"></script>
<!-- Provide a hotkey handler -->
<script src="lib/jquery.hotkeys.js"></script>
<!-- These are the CSS/Javascript files that aren't written as Aloha Plugins -->
<link rel="stylesheet" type="text/css" href="./page.css" />
</head>
<body>
<div class="header">
<div class="menubar"></div>
<div class="toolbar"></div>
</div>
<!-- This is the main editable document.
The only thing it needs is to be Aloha-activated $('.document').aloha()
-->
<div class="document">
<h1>Campaign Finance Reform</h1>
<h2>Current proposals for reform</h2>
<h3>Voting with dollars</h3>
<figure>
<img src="http://cnx.org/content/m9003/latest/lena.png"/>
<figcaption>This is a caption on a figure. Drag an image from your local filesystem onto the image to replace it!</figcaption>
</figure>
<p>Above is a figure wrapped in an aloha block</p>
<p>The voting with dollars plan would establish a system of modified public financing coupled with an anonymous campaign contribution process. It has two parts: patriot dollars and the secret donation booth. It was originally described in detail by Yale Law School professors Bruce Ackerman and Ian Ayres in their 2004 book Voting with Dollars: A new paradigm for campaign finance.[7] All voters would be given a $50 publicly funded voucher (Patriot dollars) to donate to federal political campaigns. All donations including both the $50 voucher and additional private contributions, must be made anonymously through the FEC. Ackerman and Ayres include model legislation in their book in addition to detailed discussion as to how such a system could be achieved and its legal basis.</p>
<h2>Matching Funds</h2>
<p>Of the Patriot dollars (e.g. $50 per voter) given to voters to allocate, they propose $25 going to presidential campaigns, $15 to Senate campaigns, and $10 to House campaigns. Within those restrictions the voucher can be split among any number of candidates for any federal race and between the primary and general elections. At the end of the current election cycle any unspent portions of this voucher would expire and could not be rolled over to subsequent elections for that voter. In the context of the 2004 election cycle $50 multiplied by the approximately 120 million people who voted would have yielded about $6 billion in “public financing” compared to the approximate $4 billion spent in 2004 for all federal elections (House, Senate and Presidential races) combined.[8] Ackerman and Ayres argue that this system would pool voter money and force candidates to address issues of importance to a broad spectrum of voters. Additionally they argue this public finance scheme would address taxpayers' concerns that they have "no say" in where public financing monies are spent, whereas in the Voting with dollars system each taxpayer who votes has discretion over their contribution.</p>
<h2>Proposals</h2>
</div>
<a class="github-ribbon" href="https://github.com/oerpub/oerpub.editor" target="_new">Fork me on Github</a>
<script>
// Make the document editable
Aloha.ready(function() {
var $document = Aloha.jQuery('.document');
$document.aloha();
});
</script>
<script>
// Add in some menus. Make menubar global so collab can hook in some buttons
/*
window.menubar = new appmenu.MenuBar([
new appmenu.MenuButton('File', new appmenu.Menu([
new appmenu.MenuItem('New', {subMenu: new appmenu.Menu([
new appmenu.MenuItem('Module', {accel: 'Ctrl+N', action: function() {alert("TODO: Create a new module"); } }),
new appmenu.MenuItem('Collection', {accel: 'Ctrl+Shift+N', disabled: true})
])}), // End "New"
new appmenu.Separator(),
new appmenu.MenuItem('Save', {disabled: true}),
new appmenu.MenuItem('Print', {accel: 'Ctrl+P', disabled: true})
]))
]);
// Then add in another menu
menubar.append(new appmenu.MenuButton('Edit', new appmenu.Menu([
new appmenu.MenuItem('Example buttons', {disabled: true}),
new appmenu.MenuItem('Not useful yet', {disabled: true}),
new appmenu.Separator(),
new appmenu.MenuItem('Cut', {accel: 'Ctrl+X'}),
new appmenu.MenuItem('Copy', {accel: 'Ctrl+C'}),
new appmenu.MenuItem('Paste', {accel: 'Ctrl+V'}),
new appmenu.Separator(),
new appmenu.MenuItem('Disabled Item', {disabled: true, iconCls: 'aloha-button aloha-button-b'}),
new appmenu.MenuItem('Checked Item', {checked: true}),
]) )); // End "Edit"
*/
// Make the document editable
Aloha.ready(function() {
var $document = Aloha.jQuery('.document');
$document.aloha();
// Every 30 seconds update the textarea with the HTML
setInterval(function() {
Aloha.jQuery('.source').val($document.html().trim());
}, 10000);
// Render the menu
//menubar.el.appendTo('.menubar');
});
</script>
<textarea class="source"></textarea>
</body>
</html>