aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-06-16 19:45:02 -0400
committerAndrew Manning <tamanning@zoho.com>2016-06-16 19:45:02 -0400
commite5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7 (patch)
tree3b46494707be3560c855e1b1a4cdcd329f7fa570 /view
parentf2dda646ecf1d11bf88c085d1174d3c147f799b1 (diff)
parentaa77b04860a68370d829f1081418e69777d0e1f9 (diff)
downloadvolse-hubzilla-e5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7.tar.gz
volse-hubzilla-e5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7.tar.bz2
volse-hubzilla-e5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'view')
-rw-r--r--view/css/mod_cal.css4
-rw-r--r--view/css/mod_events.css4
-rw-r--r--view/js/mod_cal.js22
-rw-r--r--view/js/mod_events.js18
-rw-r--r--view/php/theme_init.php1
-rw-r--r--view/tpl/wiki.tpl41
6 files changed, 89 insertions, 1 deletions
diff --git a/view/css/mod_cal.css b/view/css/mod_cal.css
index f0b5c0166..184227a91 100644
--- a/view/css/mod_cal.css
+++ b/view/css/mod_cal.css
@@ -1,3 +1,7 @@
+.fc-scroller {
+ overflow: hidden !important;
+}
+
/* fix borders */
.fc th:first-child,
diff --git a/view/css/mod_events.css b/view/css/mod_events.css
index f0b5c0166..184227a91 100644
--- a/view/css/mod_events.css
+++ b/view/css/mod_events.css
@@ -1,3 +1,7 @@
+.fc-scroller {
+ overflow: hidden !important;
+}
+
/* fix borders */
.fc th:first-child,
diff --git a/view/js/mod_cal.js b/view/js/mod_cal.js
new file mode 100644
index 000000000..0bf97fcf7
--- /dev/null
+++ b/view/js/mod_cal.js
@@ -0,0 +1,22 @@
+/**
+ * JavaScript for mod/cal
+ */
+
+$(document).ready( function() {
+ $(document).on('click','#fullscreen-btn', on_fullscreen);
+ $(document).on('click','#inline-btn', on_inline);
+});
+
+function on_fullscreen() {
+ var view = $('#events-calendar').fullCalendar('getView');
+ if(view.type === 'month') {
+ $('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (top and bottom) of .generic-content-wrapper
+ }
+}
+
+function on_inline() {
+ var view = $('#events-calendar').fullCalendar('getView');
+ if(view.type === 'month') {
+ $('#events-calendar').fullCalendar('option', 'height', 'auto');
+ }
+}
diff --git a/view/js/mod_events.js b/view/js/mod_events.js
index 74b811dd6..e67890b47 100644
--- a/view/js/mod_events.js
+++ b/view/js/mod_events.js
@@ -5,11 +5,29 @@
$(document).ready( function() {
enableDisableFinishDate();
$('#comment-edit-text-desc, #comment-edit-text-loc').bbco_autocomplete('bbcode');
+
+ $(document).on('click','#fullscreen-btn', on_fullscreen);
+ $(document).on('click','#inline-btn', on_inline);
});
+
function enableDisableFinishDate() {
if( $('#id_nofinish').is(':checked'))
$('#id_finish_text').prop("disabled", true);
else
$('#id_finish_text').prop("disabled", false);
}
+
+function on_fullscreen() {
+ var view = $('#events-calendar').fullCalendar('getView');
+ if(view.type === 'month') {
+ $('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (top and bottom) of .generic-content-wrapper
+ }
+}
+
+function on_inline() {
+ var view = $('#events-calendar').fullCalendar('getView');
+ if(view.type === 'month') {
+ $('#events-calendar').fullCalendar('option', 'height', 'auto');
+ }
+}
diff --git a/view/php/theme_init.php b/view/php/theme_init.php
index 648b144b3..e9ba2aa05 100644
--- a/view/php/theme_init.php
+++ b/view/php/theme_init.php
@@ -10,6 +10,7 @@ head_add_css('view/css/conversation.css');
head_add_css('view/css/widgets.css');
head_add_css('view/css/colorbox.css');
head_add_css('library/justifiedGallery/justifiedGallery.min.css');
+head_add_css('library/Text_Highlighter/sample.css');
head_add_js('jquery.js');
//head_add_js('jquery-migrate-1.1.1.js');
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index 1312f8518..dc78aad9f 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -25,7 +25,7 @@
<button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);
adjustInlineTopBarHeight();"><i class="fa fa-compress"></i></button>
</div>
- <h2>{{$wikiheader}}</h2>
+ <h2><span id="wiki-header-name">{{$wikiheaderName}}</span>: <span id="wiki-header-page">{{$wikiheaderPage}}</span></h2>
<div class="clear"></div>
</div>
<div id="new-wiki-form-wrapper" class="section-content-tools-wrapper" style="display:none;">
@@ -57,6 +57,17 @@
<hr>
</div>
+ <div id="rename-page-form-wrapper" class="section-content-tools-wrapper" style="display:none;">
+ <form id="rename-page-form" action="wiki/rename/page" method="post" >
+ <div class="clear"></div>
+ {{include file="field_input.tpl" field=$pageRename}}
+ <div class="btn-group pull-right">
+ <button id="rename-page-submit" class="btn btn-warning" type="submit" name="submit" >Rename Page</button>
+ </div>
+ </form> <div class="clear"></div>
+ <hr>
+ </div>
+
<div id="wiki-content-container" class="section-content-wrapper" {{if $hideEditor}}style="display: none;"{{/if}}>
<ul class="nav nav-tabs" id="wiki-nav-tabs">
<li><a data-toggle="tab" href="#edit-pane">Edit</a></li>
@@ -67,6 +78,7 @@
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Page <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a id="save-page" data-toggle="tab" href="#">Save</a></li>
+ <li><a id="rename-page" data-toggle="tab" href="#">Rename</a></li>
<li><a id="delete-page" data-toggle="tab" href="#">Delete</a></li>
</ul>
</li>
@@ -115,7 +127,34 @@
if (window.wiki_page_name === 'Home') {
$('#delete-page').hide();
+ $('#rename-page').hide();
}
+
+ $('#rename-page').click(function (ev) {
+ $('#rename-page-form-wrapper').show();
+ });
+
+ $( "#rename-page-form" ).submit(function( event ) {
+ $.post("wiki/{{$channel}}/rename/page",
+ {
+ oldName: window.wiki_page_name,
+ newName: $('#id_pageRename').val(),
+ resource_id: window.wiki_resource_id
+ },
+ function (data) {
+ if (data.success) {
+ $('#rename-page-form-wrapper').hide();
+ window.console.log('data: ' + JSON.stringify(data));
+ window.wiki_page_name = data.name.urlName;
+ $('#wiki-header-page').html(data.name.htmlName);
+ wiki_refresh_page_list();
+ } else {
+ window.console.log('Error renaming page.');
+ }
+ }, 'json');
+ event.preventDefault();
+ });
+
$(document).ready(function () {
wiki_refresh_page_list();
// Show Edit tab first. Otherwise the Ace editor does not load.