From 780f83a118146cf67509574ac88024c2cb03cf3a Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 25 Jun 2016 06:27:14 -0500 Subject: Post generation about new wiki is optional, default is NOT to post. Fixed bug in wiki creation. Added embed image dialog and album browser. --- view/tpl/wiki.tpl | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 130 insertions(+), 1 deletion(-) (limited to 'view/tpl') diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index aa0b88545..11c12e628 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -32,8 +32,20 @@
{{include file="field_input.tpl" field=$wikiName}} + +
+ Send notification post? +
+ + +
+
+
-
+
@@ -80,6 +92,9 @@
  • Save
  • Rename
  • Delete
  • +
  • +
  • Embed image
  • + {{/if}} @@ -111,6 +126,29 @@ {{$wikiModal}} + + + -- cgit v1.2.3 From 241b257556826e172707689b89e6f07687f8f556 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 25 Jun 2016 06:50:24 -0500 Subject: Insert image links wherever cursor is in the editor --- view/tpl/wiki.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 11c12e628..d0744009d 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -423,8 +423,8 @@ function wiki_delete_wiki(wikiHtmlName, resource_id) { $.post("embedphotos/photolink", {href: href}, function(ddata) { if (ddata['status']) { - var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '![image]($1)' ) - editor.getSession().setValue(editor.getValue() + imgURL); + var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '\n![image]($1)' ) + editor.getSession().insert(editor.getCursorPosition(), imgURL) } else { window.console.log('{{$modalerrorlink}}' + ':' + ddata['errormsg']); } -- cgit v1.2.3 From 0df3978cc5891f1383dd0dbcdc1c6b4c0010e645 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 25 Jun 2016 14:29:52 -0500 Subject: A page name wrapped in double brackets is converted into a link to another page in the current wiki --- view/tpl/wiki.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/tpl') diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index d0744009d..1d8570828 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -200,7 +200,7 @@ editor.getSession().setValue(window.wiki_page_content); $('#wiki-get-preview').click(function (ev) { - $.post("wiki/{{$channel}}/preview", {content: editor.getValue()}, function (data) { + $.post("wiki/{{$channel}}/preview", {content: editor.getValue(), resource_id: window.wiki_resource_id}, function (data) { if (data.success) { $('#wiki-preview').html(data.html); } else { -- cgit v1.2.3