diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-11-25 15:14:20 -0800 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-11-25 15:14:20 -0800 |
commit | 192e85ffa45916ea631ac3c2c59dc264249f537e (patch) | |
tree | b24e8610a19ec757ae4e44a1ab5b914dc87312d1 /view/tpl/event_head.tpl | |
parent | b33420179712c0ba5dce484e63e7a9a0201daab1 (diff) | |
parent | 3ea84d7eab20947ac52dc7e6c205252f0a76c047 (diff) | |
download | volse-hubzilla-192e85ffa45916ea631ac3c2c59dc264249f537e.tar.gz volse-hubzilla-192e85ffa45916ea631ac3c2c59dc264249f537e.tar.bz2 volse-hubzilla-192e85ffa45916ea631ac3c2c59dc264249f537e.zip |
Merge https://github.com/redmatrix/hubzilla into pending_merge
Diffstat (limited to 'view/tpl/event_head.tpl')
-rwxr-xr-x | view/tpl/event_head.tpl | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index d193696b7..ec43d7ab7 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -97,7 +97,7 @@ } } - }) + }); // center on date var args=location.href.replace(baseurl,"").split("/"); @@ -113,6 +113,20 @@ var view = $('#events-calendar').fullCalendar('getView'); $('#title').text(view.title); + // shift the finish time date on start time date change automagically + var origsval = $('#id_start_text').val(); + $('#id_start_text').change(function() { + var origfval = $('#id_finish_text').val(); + if(origfval) { + var sval = $('#id_start_text').val(); + var diff = moment(sval).diff(origsval); + var fval = moment(origfval).add(diff, 'millisecond').format("YYYY-MM-DD HH:mm"); + $('#id_finish_text').val(fval); + origsval = sval; + } + }); + + // ACL $('#id_share').change(function() { if ($('#id_share').is(':checked')) { @@ -123,7 +137,6 @@ } }).trigger('change'); - $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { var selstr; $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { |