Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge

This commit is contained in:
redmatrix 2016-05-01 19:20:09 -07:00
commit 23bb4e8e15
7 changed files with 35 additions and 14 deletions

View File

@ -114,6 +114,9 @@ class Editlayout extends \Zotlabs\Web\Controller {
'hide_voting' => true, 'hide_voting' => true,
'hide_future' => true, 'hide_future' => true,
'hide_expire' => true, 'hide_expire' => true,
'hide_location' => true,
'hide_weblink' => true,
'hide_attach' => true,
'hide_preview' => true, 'hide_preview' => true,
'ptyp' => $itm[0]['obj_type'], 'ptyp' => $itm[0]['obj_type'],
'body' => undo_post_tagging($itm[0]['body']), 'body' => undo_post_tagging($itm[0]['body']),

View File

@ -117,11 +117,13 @@ class Layouts extends \Zotlabs\Web\Controller {
'is_owner' => true, 'is_owner' => true,
'nickname' => \App::$profile['channel_address'], 'nickname' => \App::$profile['channel_address'],
'showacl' => false, 'showacl' => false,
'visitor' => false,
'hide_voting' => true, 'hide_voting' => true,
'hide_future' => true, 'hide_future' => true,
'hide_expire' => true, 'hide_expire' => true,
'hide_preview'=> true, 'hide_location' => true,
'hide_weblink' => true,
'hide_attach' => true,
'hide_preview' => true,
'ptlabel' => t('Layout Name'), 'ptlabel' => t('Layout Name'),
'profile_uid' => intval($owner), 'profile_uid' => intval($owner),
'expanded' => true, 'expanded' => true,

View File

@ -1138,6 +1138,14 @@ function status_editor($a, $x, $popup = false) {
if(x($x, 'hide_location')) if(x($x, 'hide_location'))
$geotag = $setloc = $clearloc = ''; $geotag = $setloc = $clearloc = '';
$weblink = t('Insert web link');
if(x($x, 'hide_weblink'))
$weblink = '';
$writefiles = perm_is_allowed($x['profile_uid'], get_observer_hash(), 'write_storage');
if(x($x, 'hide_attach'))
$writefiles = false;
$mimeselect = ''; $mimeselect = '';
if(array_key_exists('mimetype', $x) && $x['mimetype']) { if(array_key_exists('mimetype', $x) && $x['mimetype']) {
if($x['mimetype'] != 'text/bbcode') if($x['mimetype'] != 'text/bbcode')
@ -1213,14 +1221,14 @@ function status_editor($a, $x, $popup = false) {
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''), '$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
'$id_select' => $id_select, '$id_select' => $id_select,
'$id_seltext' => t('Post as'), '$id_seltext' => t('Post as'),
'$writefiles' => perm_is_allowed($x['profile_uid'], get_observer_hash(), 'write_storage'), '$writefiles' => $writefiles,
'$bold' => t('Bold'), '$bold' => t('Bold'),
'$italic' => t('Italic'), '$italic' => t('Italic'),
'$underline' => t('Underline'), '$underline' => t('Underline'),
'$quote' => t('Quote'), '$quote' => t('Quote'),
'$code' => t('Code'), '$code' => t('Code'),
'$attach' => t('Attach file'), '$attach' => t('Attach file'),
'$weblink' => t('Insert web link'), '$weblink' => $weblink,
'$setloc' => $setloc, '$setloc' => $setloc,
'$voting' => t('Toggle voting'), '$voting' => t('Toggle voting'),
'$feature_voting' => $feature_voting, '$feature_voting' => $feature_voting,

View File

@ -143,8 +143,11 @@ function listNewLineAutocomplete(id) {
if (word != null) { if (word != null) {
var textBefore = text.value.substring(0, caretPos); var textBefore = text.value.substring(0, caretPos);
var textAfter = text.value.substring(caretPos, text.length); var textAfter = text.value.substring(caretPos, text.length);
$('#' + id).val(textBefore + '\r\n[*] ' + textAfter); var textInsert = (word.indexOf('[/dl]') > 0) ? '\r\n[*=] ' : '\r\n[*] ';
setCaretPosition(text, caretPos + 5); var caretPositionDiff = (word.indexOf('[/dl]') > 0) ? 3 : 1;
$('#' + id).val(textBefore + textInsert + textAfter);
setCaretPosition(text, caretPos + (textInsert.length - caretPositionDiff));
return true; return true;
} }
else { else {
@ -296,10 +299,11 @@ function string2bb(element) {
replace: function (element) { replace: function (element) {
element = string2bb(element); element = string2bb(element);
if(open_elements.indexOf(element) < 0) { if(open_elements.indexOf(element) < 0) {
if(element === 'list' || element === 'ol' || element === 'ul' || element === 'dl') { if(element === 'list' || element === 'ol' || element === 'ul') {
return ['\[' + element + '\]' + '\n\[*\] ', '\n\[/' + element + '\]']; return ['\[' + element + '\]' + '\n\[*\] ', '\n\[/' + element + '\]'];
} } else if (element === 'dl') {
else if(element === 'table') { return ['\[' + element + '\]' + '\n\[*=Item name\] ', '\n\[/' + element + '\]'];
} else if(element === 'table') {
return ['\[' + element + '\]' + '\n\[tr\]', '\[/tr\]\n\[/' + element + '\]']; return ['\[' + element + '\]' + '\n\[tr\]', '\[/tr\]\n\[/' + element + '\]'];
} }
else { else {

View File

@ -1681,9 +1681,7 @@ nav .badge.mail-update:hover {
.navbar-inverse .navbar-nav > li > a { .navbar-inverse .navbar-nav > li > a {
font-size: 12px;
color: $nav_icon_colour; color: $nav_icon_colour;
text-shadow: 0px 0px 0px;
} }
.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:hover,

View File

@ -20,7 +20,7 @@
{{/if}} {{/if}}
{{foreach $entries as $item}} {{foreach $entries as $item}}
<tr id="cloud-index-{{$item.attachId}}"> <tr id="cloud-index-{{$item.attachId}}">
<td><i class="{{$item.iconFromType}}" title="{{$item.type}}"></i></td> <td><i class="fa {{$item.iconFromType}}" title="{{$item.type}}"></i></td>
<td><a href="{{$item.fullPath}}">{{$item.displayName}}</a></td> <td><a href="{{$item.fullPath}}">{{$item.displayName}}</a></td>
{{if $item.is_owner}} {{if $item.is_owner}}
<td class="cloud-index-tool">{{$item.attachIcon}}</td> <td class="cloud-index-tool">{{$item.attachIcon}}</td>

View File

@ -138,6 +138,9 @@
{{if $feature_expire}} {{if $feature_expire}}
<li><a href="#" onclick="jotGetExpiry(); return false;"><i class="fa fa-eraser"></i>&nbsp;{{$expires}}</a></li> <li><a href="#" onclick="jotGetExpiry(); return false;"><i class="fa fa-eraser"></i>&nbsp;{{$expires}}</a></li>
{{/if}} {{/if}}
{{if $feature_future}}
<li><a href="#" onclick="jotGetPubDate();return false;"><i class="fa fa-clock-o"></i>&nbsp;{{$future_txt}}</a></li>
{{/if}}
{{if $feature_encrypt}} {{if $feature_encrypt}}
<li><a href="#" onclick="red_encrypt('{{$cipher}}','#profile-jot-text',$('#profile-jot-text').val());return false;"><i class="fa fa-key"></i>&nbsp;{{$encrypt}}</a></li> <li><a href="#" onclick="red_encrypt('{{$cipher}}','#profile-jot-text',$('#profile-jot-text').val());return false;"><i class="fa fa-key"></i>&nbsp;{{$encrypt}}</a></li>
{{/if}} {{/if}}
@ -176,6 +179,7 @@
<div id="jot-preview-content" style="display:none;"></div> <div id="jot-preview-content" style="display:none;"></div>
{{if $feature_expire}}
<!-- Modal for item expiry--> <!-- Modal for item expiry-->
<div class="modal" id="expiryModal" tabindex="-1" role="dialog" aria-labelledby="expiryModalLabel" aria-hidden="true"> <div class="modal" id="expiryModal" tabindex="-1" role="dialog" aria-labelledby="expiryModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
@ -196,7 +200,9 @@
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->
{{/if}}
{{if $feature_future}}
<!-- Modal for item created--> <!-- Modal for item created-->
<div class="modal" id="createdModal" tabindex="-1" role="dialog" aria-labelledby="createdModalLabel" aria-hidden="true"> <div class="modal" id="createdModal" tabindex="-1" role="dialog" aria-labelledby="createdModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
@ -217,7 +223,7 @@
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->
{{/if}}
{{if $content || $attachment || $expanded}} {{if $content || $attachment || $expanded}}
<script>initEditor();</script> <script>initEditor();</script>