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