2016-04-29 15:30:50 +00:00
|
|
|
{{* The button to open the jot - in This theme we move the button with js to the second nav bar *}}
|
2022-10-16 15:49:27 +00:00
|
|
|
<a class="btn btn-sm btn-primary pull-right{{if !$always_open_compose}} modal-open{{/if}}" id="jotOpen" href="compose/{{$posttype}}{{if $content}}?body={{$content}}{{/if}}" aria-label="{{$new_post}}" title="{{$new_post}}"><i class="fa fa-pencil-square-o fa-2x"></i></a>
|
2016-04-29 15:30:50 +00:00
|
|
|
|
2016-03-28 14:29:05 +00:00
|
|
|
<div id="jot-content">
|
2016-08-04 12:33:08 +00:00
|
|
|
<div id="jot-sections">
|
2016-06-27 08:33:20 +00:00
|
|
|
<div class="modal-header">
|
2020-04-20 22:09:49 +00:00
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="float: right;">×</button>
|
2016-06-27 08:33:20 +00:00
|
|
|
|
2020-04-01 14:10:57 +00:00
|
|
|
<a href="/compose" class="btn compose-link" title="{{$compose_link_title}}" aria-label="{{$compose_link_title}}">
|
|
|
|
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
|
|
|
</a>
|
|
|
|
|
2017-03-25 22:33:53 +00:00
|
|
|
{{* The Jot navigation menu for desktop user (text input, permissions, preview, filebrowser) *}}
|
2017-04-05 09:46:42 +00:00
|
|
|
<ul class="nav nav-tabs hidden-xs jot-nav" role="tablist" data-tabs="tabs">
|
2016-06-27 08:33:20 +00:00
|
|
|
{{* Mark the first list entry as active because it is the first which is active after opening
|
|
|
|
the modal. Changing of the activity status is done by js in jot.tpl-header *}}
|
2017-04-05 09:46:42 +00:00
|
|
|
<li class="active" role="presentation">
|
2020-04-01 14:10:57 +00:00
|
|
|
<a href="#profile-jot-wrapper" class="jot-text-lnk jot-nav-lnk" id="jot-text-lnk" role="tab" aria-controls="profile-jot-wrapper">
|
|
|
|
<i class="fa fa-file-text-o" aria-hidden="true"></i>
|
|
|
|
{{$message}}
|
|
|
|
</a>
|
2017-03-15 03:47:02 +00:00
|
|
|
</li>
|
|
|
|
{{if $acl}}
|
2017-04-05 09:46:42 +00:00
|
|
|
<li role="presentation">
|
2020-04-01 14:10:57 +00:00
|
|
|
<a href="#profile-jot-acl-wrapper" class="jot-perms-lnk jot-nav-lnk" id="jot-perms-lnk" role="tab" aria-controls="profile-jot-acl-wrapper">
|
|
|
|
<i class="fa fa-shield" aria-hidden="true"></i>
|
|
|
|
{{$shortpermset}}
|
|
|
|
</a>
|
2017-03-15 03:47:02 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{if $preview}}
|
2017-04-05 09:46:42 +00:00
|
|
|
<li role="presentation">
|
2020-04-01 14:10:57 +00:00
|
|
|
<a href="#jot-preview-content" class="jot-preview-lnk jot-nav-lnk" id="jot-preview-lnk" role="tab" aria-controls="jot-preview-content">
|
|
|
|
<i class="fa fa-eye" aria-hidden="true"></i>
|
|
|
|
{{$preview}}
|
|
|
|
</a>
|
2017-03-15 03:47:02 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
2017-04-05 09:46:42 +00:00
|
|
|
<li role="presentation">
|
2020-04-01 14:10:57 +00:00
|
|
|
<a href="#jot-fbrowser-wrapper" class="jot-browser-lnk jot-nav-lnk" id="jot-browser-link" role="tab" aria-controls="jot-fbrowser-wrapper">
|
|
|
|
<i class="fa fa-picture-o" aria-hidden="true"></i>
|
|
|
|
{{$browser}}
|
|
|
|
</a>
|
2017-03-15 03:47:02 +00:00
|
|
|
</li>
|
2016-06-27 08:33:20 +00:00
|
|
|
</ul>
|
2016-03-28 14:29:05 +00:00
|
|
|
|
2017-03-25 22:33:53 +00:00
|
|
|
{{* The Jot navigation menu for small displays (text input, permissions, preview, filebrowser) *}}
|
2016-06-27 08:33:20 +00:00
|
|
|
<div class="dropdown dropdown-head dropdown-mobile-jot jot-nav hidden-lg hidden-md hidden-sm" role="menubar" data-tabs="tabs" style="float: left;">
|
2017-04-05 09:46:42 +00:00
|
|
|
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true">{{$message}} <span class="caret"></span></button>
|
|
|
|
<ul class="dropdown-menu nav nav-pills" aria-label="submenu">
|
2016-06-27 08:33:20 +00:00
|
|
|
{{* mark the first list entry as active because it is the first which is active after opening
|
|
|
|
the modal. Changing of the activity status is done by js in jot.tpl-header *}}
|
2017-04-05 09:46:42 +00:00
|
|
|
<li role="presentation" style="display: none;">
|
2017-10-20 13:21:42 +00:00
|
|
|
<button class="jot-text-lnk btn-link jot-nav-lnk jot-nav-lnk-mobile" id="jot-text-lnk-mobile" aria-controls="profile-jot-wrapper" role="menuitem">{{$message}}</button>
|
2017-03-15 03:47:02 +00:00
|
|
|
</li>
|
|
|
|
{{if $acl}}
|
2017-04-05 09:46:42 +00:00
|
|
|
<li role="presentation">
|
2017-10-20 13:21:42 +00:00
|
|
|
<button class="jot-perms-lnk btn-link jot-nav-lnk jot-nav-lnk-mobile" id="jot-perms-lnk-mobile" aria-controls="profile-jot-acl-wrapper" role="menuitem">{{$shortpermset}}</button>
|
2017-03-15 03:47:02 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
{{if $preview}}
|
2017-04-05 09:46:42 +00:00
|
|
|
<li role="presentation">
|
2017-10-20 13:21:42 +00:00
|
|
|
<button class="jot-preview-lnk btn-link jot-nav-lnk jot-nav-lnk-mobile" id="jot-preview-lnk-mobile" aria-controls="jot-preview-content" role="menuitem">{{$preview}}</button>
|
2017-03-15 03:47:02 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
2017-04-05 09:46:42 +00:00
|
|
|
<li role="presentation">
|
2017-10-20 13:21:42 +00:00
|
|
|
<button class="jot-browser-lnk-mobile btn-link jot-nav-lnk jot-nav-lnk-mobile" id="jot-browser-lnk-mobile" aria-controls="jot-fbrowser-wrapper" role="menuitem">{{$browser}}</button>
|
2017-04-03 00:04:13 +00:00
|
|
|
</li>
|
2016-06-27 08:33:20 +00:00
|
|
|
</ul>
|
2016-03-28 14:29:05 +00:00
|
|
|
</div>
|
2016-06-27 08:33:20 +00:00
|
|
|
</div>
|
|
|
|
|
2023-03-13 21:50:59 +00:00
|
|
|
<div id="jot-modal-body" class="modal-body">
|
2016-08-04 12:33:08 +00:00
|
|
|
<form id="profile-jot-form" action="{{$action}}" method="post">
|
2017-04-05 09:46:42 +00:00
|
|
|
<div id="profile-jot-wrapper" aria-labelledby="jot-text-lnk" role="tabpanel" aria-hidden="false">
|
2016-08-04 12:33:08 +00:00
|
|
|
<div>
|
|
|
|
<!--<div id="profile-jot-desc" class="jothidden pull-right"> </div>-->
|
|
|
|
</div>
|
2016-03-28 14:29:05 +00:00
|
|
|
|
2016-08-04 12:33:08 +00:00
|
|
|
<div id="profile-jot-banner-end"></div>
|
|
|
|
|
|
|
|
{{* The hidden input fields which submit important values with the post *}}
|
2018-07-19 13:52:05 +00:00
|
|
|
<input type="hidden" name="jot" value="{{$jot}}" />
|
2018-08-04 14:06:36 +00:00
|
|
|
<input type="hidden" name="wall" value="{{$wall}}" />
|
2018-07-19 13:52:05 +00:00
|
|
|
<input type="hidden" name="post_type" value="{{$posttype}}" />
|
2016-08-04 12:33:08 +00:00
|
|
|
<input type="hidden" name="profile_uid" value="{{$profile_uid}}" />
|
|
|
|
<input type="hidden" name="return" value="{{$return_path}}" />
|
|
|
|
<input type="hidden" name="location" id="jot-location" value="{{$defloc}}" />
|
|
|
|
<input type="hidden" name="coord" id="jot-coord" value="" />
|
|
|
|
<input type="hidden" name="post_id" value="{{$post_id}}" />
|
|
|
|
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
|
|
|
<input type="hidden" name="post_id_random" value="{{$rand_num}}" />
|
|
|
|
{{if $notes_cid}}
|
|
|
|
<input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
|
|
|
|
{{/if}}
|
2021-05-20 12:37:45 +00:00
|
|
|
<div id="jot-title-wrap"><input name="title" id="jot-title" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdertitle}}" title="{{$placeholdertitle}}" value="{{$title}}" style="display:block;" dir="auto" /></div>
|
2016-08-04 12:33:08 +00:00
|
|
|
{{if $placeholdercategory}}
|
2021-05-20 12:37:45 +00:00
|
|
|
<div id="jot-category-wrap"><input name="category" id="jot-category" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" dir="auto" /></div>
|
2016-08-04 12:33:08 +00:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{* The jot text field in which the post text is inserted *}}
|
2023-03-14 09:38:03 +00:00
|
|
|
<div id="dropzone-jot" class="dropzone">
|
|
|
|
<div id="jot-text-wrap">
|
|
|
|
<textarea rows="2" cols="64" class="profile-jot-text form-control text-autosize" id="profile-jot-text" name="body" placeholder="{{$share}}" onFocus="jotTextOpenUI(this);" onBlur="jotTextCloseUI(this);" style="min-width:100%; max-width:100%;" dir="auto">{{if $content}}{{$content nofilter}}{{/if}}</textarea>
|
|
|
|
</div>
|
2016-08-04 12:33:08 +00:00
|
|
|
</div>
|
2016-03-28 14:29:05 +00:00
|
|
|
|
2016-08-04 12:33:08 +00:00
|
|
|
<ul id="profile-jot-submit-wrapper" class="jothidden nav nav-pills">
|
2018-09-21 15:46:39 +00:00
|
|
|
<li role="presentation"><button type="button" class="hidden-xs btn-link icon underline" style="cursor: pointer;" aria-label="{{$eduline}}" title="{{$eduline}}" onclick="insertFormattingToPost('u');"><i class="fa fa-underline"></i></button></li>
|
|
|
|
<li role="presentation"><button type="button" class="hidden-xs btn-link icon italic" style="cursor: pointer;" aria-label="{{$editalic}}" title="{{$editalic}}" onclick="insertFormattingToPost('i');"><i class="fa fa-italic"></i></button></li>
|
|
|
|
<li role="presentation"><button type="button" class="hidden-xs btn-link icon bold" style="cursor: pointer;" aria-label="{{$edbold}}" title="{{$edbold}}" onclick="insertFormattingToPost('b');"><i class="fa fa-bold"></i></button></li>
|
|
|
|
<li role="presentation"><button type="button" class="hidden-xs btn-link icon quote" style="cursor: pointer;" aria-label="{{$edquote}}" title="{{$edquote}}" onclick="insertFormattingToPost('quote');"><i class="fa fa-quote-left"></i></button></li>
|
2018-10-24 14:20:10 +00:00
|
|
|
<li role="presentation"><button type="button" class="btn-link icon" style="cursor: pointer;" aria-label="{{$edurl}}" title="{{$edurl}}" onclick="insertFormattingToPost('url');"><i class="fa fa-link"></i></button></li>
|
2018-10-24 16:09:54 +00:00
|
|
|
<li role="presentation"><button type="button" class="btn-link" id="profile-attach" ondragenter="return linkDropper(event);" ondragover="return linkDropper(event);" ondrop="linkDrop(event);" onclick="jotGetLink();" title="{{$edattach}}"><i class="fa fa-paperclip"></i></button></li>
|
2017-10-20 13:21:42 +00:00
|
|
|
<li role="presentation"><button type="button" class="btn-link" id="profile-location" onclick="jotGetLocation();" title="{{$setloc}}"><i class="fa fa-map-marker" aria-hidden="true"></i></button></li>
|
2017-01-07 14:49:13 +00:00
|
|
|
<!-- TODO: waiting for a better placement
|
2017-03-24 02:45:40 +00:00
|
|
|
<li><button type="button" class="btn-link" id="profile-nolocation" onclick="jotClearLocation();" title="{{$noloc}}">{{$shortnoloc}}</button></li>
|
2016-08-04 12:33:08 +00:00
|
|
|
-->
|
|
|
|
|
2020-01-30 03:50:10 +00:00
|
|
|
<li role="presentation" class="pull-right">
|
|
|
|
<button class="btn btn-primary" type="submit" id="profile-jot-submit" name="submit" data-loading-text="{{$loading}}">
|
|
|
|
<i class="fa fa-paper-plane fa-fw" aria-hidden="true"></i> {{$share}}
|
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-15 01:28:39 +00:00
|
|
|
<li id="character-counter" class="grey jothidden text-info pull-right"></li>
|
2021-05-19 21:47:15 +00:00
|
|
|
<li role="presentation" id="profile-rotator-wrapper" class="pull-right" style="display: {{$visitor}};">
|
2018-12-14 03:28:12 +00:00
|
|
|
<img role="presentation" id="profile-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
|
2017-10-20 13:21:42 +00:00
|
|
|
</li>
|
|
|
|
<li role="presentation" id="profile-jot-plugin-wrapper">
|
2018-12-21 13:43:06 +00:00
|
|
|
{{$jotplugins nofilter}}
|
2017-10-20 13:21:42 +00:00
|
|
|
</li>
|
2016-08-04 12:33:08 +00:00
|
|
|
</ul>
|
2016-06-27 08:33:20 +00:00
|
|
|
|
2016-08-04 12:33:08 +00:00
|
|
|
</div>
|
2016-03-28 14:29:05 +00:00
|
|
|
|
2017-04-05 09:46:42 +00:00
|
|
|
<div id="profile-jot-acl-wrapper" class="minimize" aria-labelledby="jot-perms-lnk" role="tabpanel" aria-hidden="true">
|
2018-12-15 01:42:24 +00:00
|
|
|
{{$acl nofilter}}
|
2021-08-01 13:01:31 +00:00
|
|
|
{{if $scheduled_at}}{{$scheduled_at nofilter}}{{/if}}
|
2022-04-13 05:31:32 +00:00
|
|
|
{{if $created_at}}{{$created_at nofilter}}{{/if}}
|
2016-08-04 12:33:08 +00:00
|
|
|
</div>
|
2016-06-27 08:33:20 +00:00
|
|
|
|
2018-09-20 14:50:58 +00:00
|
|
|
<div id="jot-preview-content" class="minimize" aria-labelledby="jot-preview-lnk" role="tabpanel" aria-hidden="true"></div>
|
|
|
|
|
2018-09-20 15:09:39 +00:00
|
|
|
<div id="jot-preview-share" class="minimize" aria-labelledby="jot-preview-lnk" role="tabpanel" aria-hidden="true">
|
2018-09-21 09:12:20 +00:00
|
|
|
<ul id="profile-jot-preview-submit-wrapper" class="jothidden nav nav-pills">
|
2020-01-30 03:50:10 +00:00
|
|
|
<li role="presentation" class="pull-right">
|
|
|
|
<button class="btn btn-primary" type="submit" id="profile-jot-preview-submit" name="submit" data-loading-text="{{$loading}}">
|
|
|
|
<i class="fa fa-paper-plane fa-fw" aria-hidden="true"></i> {{$share}}
|
|
|
|
</button>
|
|
|
|
</li>
|
2018-09-20 14:20:33 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2019-11-30 15:48:23 +00:00
|
|
|
<div id="jot-fbrowser-wrapper" class="minimize" aria-labelledby="jot-browser-link" role="tabpanel" aria-hidden="true"></div>
|
2016-03-28 14:29:05 +00:00
|
|
|
|
2019-11-30 15:48:23 +00:00
|
|
|
</form>
|
2023-03-13 09:37:12 +00:00
|
|
|
<div id="dz-preview-jot" class="dropzone-preview"></div>
|
2016-05-09 19:08:11 +00:00
|
|
|
|
2017-10-20 13:21:42 +00:00
|
|
|
{{if $content}}<script type="text/javascript">initEditor();</script>{{/if}}
|
2016-06-27 08:33:20 +00:00
|
|
|
</div>
|
2016-08-04 12:33:08 +00:00
|
|
|
</div>
|
2016-03-28 14:29:05 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2016-06-25 10:21:13 +00:00
|
|
|
{{* The jot modal - We use a own modal for the jot and not the standard modal
|
|
|
|
from the page template. This is because the special structure of the jot
|
|
|
|
(e.g.jot navigation tabs in the modal titel area).
|
2023-03-13 21:50:59 +00:00
|
|
|
Then in the frio theme the jot will loaded regulary and is hidden by default.)
|
2016-06-25 10:21:13 +00:00
|
|
|
The js function jotShow() loads the jot into the modal. With this structure we
|
2023-03-13 21:50:59 +00:00
|
|
|
can load different content into the jot modal (e.g. the item edit jot)
|
2016-06-25 10:21:13 +00:00
|
|
|
*}}
|
2016-03-28 14:29:05 +00:00
|
|
|
<div id="jot-modal" class="modal fade" role="dialog">
|
|
|
|
<div class="modal-dialog">
|
2023-03-14 09:38:03 +00:00
|
|
|
<div id="jot-modal-content" class="modal-content"></div>
|
2016-03-28 14:29:05 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-10-20 13:21:42 +00:00
|
|
|
<script type="text/javascript">
|
2016-05-09 19:08:11 +00:00
|
|
|
$('iframe').load(function() {
|
|
|
|
this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
|
|
|
|
});
|
|
|
|
</script>
|
2023-03-13 21:50:59 +00:00
|
|
|
|
2023-03-13 02:32:28 +00:00
|
|
|
<script>
|
2023-03-13 23:34:50 +00:00
|
|
|
// getMByte() is from view/theme/frio/js/dropzone-frio.js
|
|
|
|
// to workaround dysfunctional php Strings:getBytesFromShorthand
|
2023-03-13 09:37:12 +00:00
|
|
|
Dropzone.autoDiscover = false;
|
2023-03-14 09:38:03 +00:00
|
|
|
var dropzoneJot = new Dropzone( '#dropzone-jot', {
|
2023-03-13 09:37:12 +00:00
|
|
|
paramName: "userfile", // The name that will be used to transfer the file
|
2023-03-13 23:34:50 +00:00
|
|
|
maxFilesize: getMBytes('{{$max_imagesize}}'), // MB
|
2023-03-13 09:37:12 +00:00
|
|
|
url: "/media/photo/upload?response=url&album=",
|
|
|
|
accept: function(file, done) {
|
2023-03-13 13:02:30 +00:00
|
|
|
done();
|
2023-03-13 09:37:12 +00:00
|
|
|
},
|
|
|
|
init: function() {
|
|
|
|
this.on("success", function(file, serverResponse) {
|
|
|
|
var target = $('#profile-jot-text')
|
|
|
|
var resp = $(serverResponse).find('div#content').text()
|
|
|
|
if (target.setRangeText) {
|
|
|
|
//if setRangeText function is supported by current browser
|
|
|
|
target.setRangeText(" " + $.trim(resp) + " ")
|
|
|
|
} else {
|
|
|
|
target.focus()
|
|
|
|
document.execCommand('insertText', false /*no UI*/, " " + $.trim(resp) + " ");
|
|
|
|
}
|
|
|
|
});
|
2023-03-14 09:38:03 +00:00
|
|
|
this.on("complete", function(file) {
|
|
|
|
// Remove just uploaded file from dropzone, makes interface more clear.
|
|
|
|
// Image can be seen in posting-preview
|
|
|
|
// We need preview to get optical feedback about upload-progress.
|
|
|
|
// you see success, when the bb-code link for image is inserted
|
|
|
|
this.removeFile(file);
|
|
|
|
});
|
2023-03-13 09:37:12 +00:00
|
|
|
},
|
|
|
|
});
|
2023-03-13 02:32:28 +00:00
|
|
|
|
2023-03-14 09:38:03 +00:00
|
|
|
// Enables Copy&Paste for this dropzone
|
|
|
|
$('#dropzone-jot').on('paste', function(event){
|
2023-03-13 09:37:12 +00:00
|
|
|
const items = (event.clipboardData || event.originalEvent.clipboardData).items;
|
|
|
|
items.forEach((item) => {
|
|
|
|
if (item.kind === 'file') {
|
|
|
|
// adds the file to your dropzone instance
|
|
|
|
dropzoneJot.addFile(item.getAsFile())
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
2023-03-13 02:32:28 +00:00
|
|
|
</script>
|