aboutsummaryrefslogtreecommitdiff
path: root/htdocs/js/mathy.js
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2017-11-08 00:21:59 -0500
committerPaul Duncan <pabs@pablotron.org>2017-11-08 00:21:59 -0500
commit6d7868815ce731b4445b9f87afa09f98be280797 (patch)
tree85b25b68339d19ba380c301e84dc660388b92cda /htdocs/js/mathy.js
parent67325e338ac7d2def8743581b8cbbc4d7cb327bd (diff)
downloadmathy-6d7868815ce731b4445b9f87afa09f98be280797.tar.bz2
mathy-6d7868815ce731b4445b9f87afa09f98be280797.zip
add stub about and config dialogs
Diffstat (limited to 'htdocs/js/mathy.js')
-rw-r--r--htdocs/js/mathy.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/htdocs/js/mathy.js b/htdocs/js/mathy.js
index 500f677..7acd7ab 100644
--- a/htdocs/js/mathy.js
+++ b/htdocs/js/mathy.js
@@ -28,12 +28,21 @@ jQuery(function($) {
help: [
"<li class='dropdown-header'>",
- " Examples",
+ "Examples",
"</li>",
"%{examples}",
- "<li class='divider'>",
+ "<li class='divider'></li>",
+ "<li>",
+ "<a ",
+ "href='#' ",
+ "title='Show about dialog.' ",
+ "data-toggle='modal' ",
+ "data-target='#about-dialog' ",
+ ">",
+ "About Mathy",
+ "</a>",
"</li>",
],
@@ -42,6 +51,7 @@ jQuery(function($) {
"<a ",
"href='#' ",
"class='example' ",
+ "title='Load example \"%{name|h}\".' ",
"data-text='%{text|h}' ",
">",
"%{num|h}. %{name|h}",
@@ -239,7 +249,7 @@ jQuery(function($) {
text: row.text.join('\n'),
}));
}).join(''),
- })).on('click', 'a', function() {
+ })).on('click', 'a.example', function() {
var text = $(this).data('text');
// hide dropdown