]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/jot.tpl
839cba5837d094ffcf491d93c71ba3d1e49f8e61
[friendica.git] / view / theme / frio / templates / jot.tpl
1 {{* The button to open the jot - in This theme we move the button with js to the second nav bar *}}
2 <button class="btn btn-sm btn-main pull-right" id="jotOpen" aria-label="{{$new_post}}" title="{{$new_post}}" onclick="jotShow();"><i class="fa fa-pencil-square-o fa-2x"></i></button>
3
4
5 <div id="jot-content">
6         <div id="jot-sections">
7                 <div class="modal-header">
8                         {{* Note: We need 2 modal close buttons here to bypass a bug in bootstrap.
9                         The second is for mobile view. The first one doesnt work with dropdowns. To get a working close button
10                         in with dropdows the close button needs to be inserted after the dropdown. *}}
11                         <button type="button" class="close hidden-xs" data-dismiss="modal" aria-label="Close" style="float: right;">&times;</button>
12
13                         {{* The Jot navigation menu for desktop user (text input, permissions, preview, filebrowser) *}}
14                         <ul class="nav nav-tabs hidden-xs jot-nav" role="tablist" data-tabs="tabs">
15                                 {{* Mark the first list entry as active because it is the first which is active after opening
16                                         the modal. Changing of the activity status is done by js in jot.tpl-header *}}
17                                 <li class="active" role="presentation">
18                                         <a href="#profile-jot-wrapper" class="jot-text-lnk jot-nav-lnk" id="jot-text-lnk" role="tab" aria-controls="profile-jot-wrapper">{{$message}}</a>
19                                 </li>
20                                 {{if $acl}}
21                                 <li role="presentation">
22                                         <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">{{$shortpermset}}</a>
23                                 </li>
24                                 {{/if}}
25                                 {{if $preview}}
26                                 <li role="presentation">
27                                         <a href="#jot-preview-content" class="jot-preview-lnk jot-nav-lnk" id="jot-preview-lnk" role="tab" aria-controls="jot-preview-content">{{$preview}}</a>
28                                 </li>
29                                 {{/if}}
30                                 <li role="presentation">
31                                         <a href="#jot-fbrowser-wrapper" class="jot-browser-lnk jot-nav-lnk" id="jot-browser-link" role="tab" aria-controls="jot-fbrowser-wrapper">{{$browser}}</a>
32                                 </li>
33                         </ul>
34
35                         {{* The Jot navigation menu for small displays (text input, permissions, preview, filebrowser) *}}
36                         <div class="dropdown dropdown-head dropdown-mobile-jot jot-nav hidden-lg hidden-md hidden-sm" role="menubar" data-tabs="tabs" style="float: left;">
37                                 <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true">{{$message}}&nbsp;<span class="caret"></span></button>
38                                 <ul class="dropdown-menu nav nav-pills" aria-label="submenu">
39                                         {{* mark the first list entry as active because it is the first which is active after opening
40                                         the modal. Changing of the activity status is done by js in jot.tpl-header *}}
41                                         <li role="presentation" style="display: none;">
42                                                 <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>
43                                         </li>
44                                         {{if $acl}}
45                                         <li role="presentation">
46                                                 <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>
47                                         </li>
48                                         {{/if}}
49                                         {{if $preview}}
50                                         <li role="presentation">
51                                                 <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>
52                                         </li>
53                                         {{/if}}
54                                         <li role="presentation">
55                                                 <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>
56                                         </li>
57                                 </ul>
58                         </div>
59                         <button type="button" class="close hidden-lg hidden-md hidden-sm" data-dismiss="modal" style="float: right;">&times;</button>
60                 </div>
61
62                 <div id="jot-modal-body" class="modal-body">
63                         <form id="profile-jot-form" action="{{$action}}" method="post">
64                                 <div id="profile-jot-wrapper" aria-labelledby="jot-text-lnk" role="tabpanel" aria-hidden="false">
65                                         <div>
66                                                 <!--<div id="profile-jot-desc" class="jothidden pull-right">&nbsp;</div>-->
67                                         </div>
68
69                                         <div id="profile-jot-banner-end"></div>
70
71                                         {{* The hidden input fields which submit important values with the post *}}
72                                         <input type="hidden" name="jot" value="{{$jot}}" />
73                                         <input type="hidden" name="wall" value="{{$wall}}" />
74                                         <input type="hidden" name="post_type" value="{{$posttype}}" />
75                                         <input type="hidden" name="profile_uid" value="{{$profile_uid}}" />
76                                         <input type="hidden" name="return" value="{{$return_path}}" />
77                                         <input type="hidden" name="location" id="jot-location" value="{{$defloc}}" />
78                                         <input type="hidden" name="coord" id="jot-coord" value="" />
79                                         <input type="hidden" name="post_id" value="{{$post_id}}" />
80                                         <input type="hidden" name="preview" id="jot-preview" value="0" />
81                                         <input type="hidden" name="post_id_random" value="{{$rand_num}}" />
82                                         {{if $notes_cid}}
83                                         <input type="hidden" name="contact_allow[]" value="<{{$notes_cid}}>" />
84                                         {{/if}}
85                                         <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;" /></div>
86                                         {{if $placeholdercategory}}
87                                         <div id="jot-category-wrap"><input name="category" id="jot-category" class="jothidden jotforms form-control" type="text" placeholder="{{$placeholdercategory}}" title="{{$placeholdercategory}}" value="{{$category}}" /></div>
88                                         {{/if}}
89
90                                         {{* The jot text field in which the post text is inserted *}}
91                                         <div id="jot-text-wrap">
92                                                 <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%;">{{if $content}}{{$content}}{{/if}}</textarea>
93                                         </div>
94
95                                         <ul id="profile-jot-submit-wrapper" class="jothidden nav nav-pills">
96                                                 <li role="presentation"><button type="button" class="btn-link icon underline" style="cursor: pointer;" aria-label="{{$eduline}}" title="{{$eduline}}" onclick="insertFormatting('u',{{$id}});"><i class="fa fa-underline"></i></button></li>
97                                                 <li role="presentation"><button type="button" class="btn-link icon italic" style="cursor: pointer;" aria-label="{{$editalic}}" title="{{$editalic}}" onclick="insertFormatting('i',{{$id}});"><i class="fa fa-italic"></i></button></li>                                                
98                                                 <li role="presentation"><button type="button" class="btn-link icon bold" style="cursor: pointer;" aria-label="{{$edbold}}" title="{{$edbold}}" onclick="insertFormatting('b',{{$id}});"><i class="fa fa-bold"></i></button></li>                                                
99                                                 <li role="presentation"><button type="button" class="btn-link icon quote" style="cursor: pointer;" aria-label="{{$edquote}}" title="{{$edquote}}" onclick="insertFormatting('quote',{{$id}});"><i class="fa fa-quote-left"></i></button></li>
100
101                                                 <li role="presentation"><button type="button" class="btn-link" id="profile-link"  ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink();" title="{{$weblink}}"><i class="fa fa-link"></i></button></li>
102                                                 <li role="presentation"><button type="button" class="btn-link" id="profile-video" onclick="jotVideoURL();" title="{{$video}}"><i class="fa fa-film" aria-hidden="true"></i></button></li>
103                                                 <li role="presentation"><button type="button" class="btn-link" id="profile-audio" onclick="jotAudioURL();" title="{{$audio}}"><i class="fa fa-music" aria-hidden="true"></i></button></li>
104                                                 <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>
105                                                 <!-- TODO: waiting for a better placement
106                                                 <li><button type="button" class="btn-link" id="profile-nolocation" onclick="jotClearLocation();" title="{{$noloc}}">{{$shortnoloc}}</button></li>
107                                                 -->
108
109                                                 <li role="presentation" class="pull-right"><button class="btn btn-primary" type="submit" id="profile-jot-submit" name="submit" ><i class="fa fa-slideshare fa-fw" aria-hidden="true"></i> {{$share}}</button></li>
110                                                 <li role="presentation" id="character-counter" class="grey jothidden text-info pull-right"></li>
111                                                 <li role="presentation" id="profile-rotator-wrapper" class="pull-right" style="display: {{$visitor}};" >
112                                                         <img role="presentation" id="profile-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />
113                                                 </li>
114                                                 <li role="presentation" id="profile-jot-plugin-wrapper">
115                                                         {{$jotplugins}}
116                                                 </li>
117                                         </ul>
118
119                                 </div>
120
121                                 <div id="profile-jot-acl-wrapper" class="minimize" aria-labelledby="jot-perms-lnk" role="tabpanel" aria-hidden="true">
122                                         {{$acl}}
123                                 </div>
124
125                                 <div id="jot-preview-content" class="minimize" aria-labelledby="jot-preview-lnk" role="tabpanel" aria-hidden="true"></div>
126
127                                 <!-- TODO: better workaround than using id multiple for share button in preview-->
128                                 <div id="jot-preview-share" class="minimize" aria-labelledby="jot-preview-lnk" role="tabpanel" aria-hidden="true">
129                                         <ul id="profile-jot-submit-wrapper" class="jothidden nav nav-pills">
130                                                 <li role="presentation" class="pull-right"><button class="btn btn-primary" type="submit" id="profile-jot-submit" name="submit" ><i class="fa fa-slideshare fa-fw" aria-hidden="true"></i> {{$share}}</button></li>
131                                         </ul>
132                                 </div>
133
134                         </form>
135
136                         <div id="jot-fbrowser-wrapper" class="minimize" aria-labelledby="jot-browser-link" role="tabpanel" aria-hidden="true"></div>
137
138                         {{if $content}}<script type="text/javascript">initEditor();</script>{{/if}}
139                 </div>
140         </div>
141 </div>
142
143
144 {{* The jot modal - We use a own modal for the jot and not the standard modal
145 from the page template. This is because the special structure of the jot
146 (e.g.jot navigation tabs in the modal titel area).
147 The in the frio theme the jot will loaded regulary and is hidden by default.)
148 The js function jotShow() loads the jot into the modal. With this structure we
149 can load different content into the jot moadl (e.g. the item edit jot)
150 *}}
151 <div id="jot-modal" class="modal fade" role="dialog">
152         <div class="modal-dialog">
153                 <div id="jot-modal-content" class="modal-content"></div>
154         </div>
155 </div>
156
157
158 <script type="text/javascript">
159         $('iframe').load(function() {
160                 this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
161         });
162 </script>