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