aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-04 11:43:27 -0800
committerzotlabs <mike@macgirvin.com>2016-12-04 11:43:27 -0800
commit16e48a859cffb0f81f19dc847210c98ac32d8d09 (patch)
tree09da7eda944892f4faaaa87700f212bcbcb13b69 /view
parent6346c005278d83df3b6b6ae0880ee48f4b5c936e (diff)
parent3f6fe4f2be18dd99f30a2cd5e47fb3aaeee4b0b7 (diff)
downloadvolse-hubzilla-16e48a859cffb0f81f19dc847210c98ac32d8d09.tar.gz
volse-hubzilla-16e48a859cffb0f81f19dc847210c98ac32d8d09.tar.bz2
volse-hubzilla-16e48a859cffb0f81f19dc847210c98ac32d8d09.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'view')
-rw-r--r--view/css/conversation.css13
-rw-r--r--view/css/mod_wiki.css8
-rw-r--r--view/js/main.js1
-rw-r--r--view/tpl/wiki.tpl5
-rw-r--r--view/tpl/wikilist.tpl4
5 files changed, 23 insertions, 8 deletions
diff --git a/view/css/conversation.css b/view/css/conversation.css
index 0b6674b15..aec457302 100644
--- a/view/css/conversation.css
+++ b/view/css/conversation.css
@@ -336,6 +336,19 @@ a.wall-item-name-link {
/* bb-code */
+/* prevent [toc] bbcode links to scroll the titles behind the navbar */
+.section-content-wrapper h1,
+.section-content-wrapper h2,
+.section-content-wrapper h3,
+.section-content-wrapper h4 {
+ padding-top: 60px;
+ margin-top: -40px;
+}
+
+.toc {
+ margin-top: 1em;
+}
+
code {
font-family: Courier, monospace;
font-size: 1em;
diff --git a/view/css/mod_wiki.css b/view/css/mod_wiki.css
index b29957090..30cbe0896 100644
--- a/view/css/mod_wiki.css
+++ b/view/css/mod_wiki.css
@@ -29,13 +29,13 @@
padding: 7px 3px 7px 10px;
}
-#wikis-index th:nth-child(2),
-#wikis-index td:nth-child(2){
+#wikis-index th:nth-child(3),
+#wikis-index td:nth-child(3){
padding: 7px 10px 7px 7px;
}
-#wikis-index th:nth-child(3),
-#wikis-index td:nth-child(3){
+#wikis-index th:nth-child(4),
+#wikis-index td:nth-child(4){
padding: 7px 10px 7px 7px;
}
diff --git a/view/js/main.js b/view/js/main.js
index e78725931..3981d4266 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1315,7 +1315,6 @@ $(document).ready(function() {
numbers : aStr['t17'],
};
- $("#toc").toc();
});
function zFormError(elm,x) {
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index cf4144357..7d698b493 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -184,7 +184,9 @@
function (data) {
if (data.success) {
$('#wiki-preview').html(data.html);
+ {{if !$mimeType || $mimeType == 'text/markdown'}}
$("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
+ {{/if}}
$('#page-tools').hide();
} else {
window.console.log('Error previewing page.');
@@ -418,13 +420,12 @@
$(document).ready(function () {
wiki_refresh_page_list();
- $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
-
// This seems obsolete
// Show Edit tab first. Otherwise the Ace editor does not load.
//$("#wiki-nav-tabs li:eq(1) a").tab('show');
{{if !$mimeType || $mimeType == 'text/markdown'}}
+ $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
window.editor.on("input", function() {
if(window.editor.getSession().getUndoManager().isClean()) {
$('#save-page').addClass('disabled');
diff --git a/view/tpl/wikilist.tpl b/view/tpl/wikilist.tpl
index 68aa41e7c..1fb7dbec1 100644
--- a/view/tpl/wikilist.tpl
+++ b/view/tpl/wikilist.tpl
@@ -27,7 +27,8 @@
<div class="section-content-wrapper-np">
<table id="wikis-index">
<tr>
- <th width="98%">{{$name}}</th>
+ <th width="97%">{{$name}}</th>
+ <th width="1%">{{$type}}</th>
<th width="1%" class="wikis-index-tool"></th>
{{if $owner}}
<th width="1%"></th>
@@ -36,6 +37,7 @@
{{foreach $wikis as $wiki}}
<tr class="wikis-index-row">
<td><a href="/wiki/{{$channel}}/{{$wiki.urlName}}/Home" title="{{$view}}"{{if $wiki.active}} class="active"{{/if}}>{{$wiki.title}}</a></td>
+ <td>{{$wiki.mimeType}}</td>
<td class="wiki-index-tool"><i class="fa fa-download fakelink" onclick="wiki_download_wiki('{{$wiki.resource_id}}'); return false;"></i></td>
{{if $owner}}
<td><i class="fa fa-trash-o drop-icons" onclick="wiki_delete_wiki('{{$wiki.title}}', '{{$wiki.resource_id}}'); return false;"></i></td>