Merge remote-tracking branch 'mike/master' into dev

This commit is contained in:
Mario Vavti 2018-02-26 10:42:13 +01:00
commit 4781a8cb6b
11 changed files with 60 additions and 77 deletions

View File

@ -63,7 +63,9 @@ class Enotify {
$thanks = t('Thank You,'); $thanks = t('Thank You,');
$sitename = get_config('system','sitename'); $sitename = get_config('system','sitename');
$site_admin = sprintf( t('%s Administrator'), $sitename); $site_admin = sprintf( t('%s Administrator'), $sitename);
$opt_out1 = sprintf( t('This email was sent by %1$s at %2$s.'), t('$Projectname'), \App::get_hostname());
$opt_out2 = sprintf( t('To stop receiving these messages, please adjust your Notification Settings at %s'), z_root() . '/settings');
$hopt_out2 = sprintf( t('To stop receiving these messages, please adjust your %s.'), '<a href="' . z_root() . '/settings' . '">' . t('Notification Settings') . '</a>');
$sender_name = $product; $sender_name = $product;
$hostname = \App::get_hostname(); $hostname = \App::get_hostname();
if(strpos($hostname,':')) if(strpos($hostname,':'))
@ -613,6 +615,9 @@ class Enotify {
$datarray['titemlink'] = $itemlink; $datarray['titemlink'] = $itemlink;
$datarray['thanks'] = $thanks; $datarray['thanks'] = $thanks;
$datarray['site_admin'] = $site_admin; $datarray['site_admin'] = $site_admin;
$datarray['opt_out1'] = $opt_out1;
$datarray['opt_out2'] = $opt_out2;
$datarray['hopt_out2'] = $hopt_out2;
$datarray['title'] = stripslashes($title); $datarray['title'] = stripslashes($title);
$datarray['htmlversion'] = $htmlversion; $datarray['htmlversion'] = $htmlversion;
$datarray['textversion'] = $textversion; $datarray['textversion'] = $textversion;
@ -670,6 +675,8 @@ class Enotify {
'$hitemlink' => $datarray['hitemlink'], '$hitemlink' => $datarray['hitemlink'],
'$thanks' => $datarray['thanks'], '$thanks' => $datarray['thanks'],
'$site_admin' => $datarray['site_admin'], '$site_admin' => $datarray['site_admin'],
'$opt_out1' => $datarray['opt_out1'],
'$opt_out2' => $datarray['hopt_out2'],
'$title' => $datarray['title'], '$title' => $datarray['title'],
'$htmlversion' => $datarray['htmlversion'], '$htmlversion' => $datarray['htmlversion'],
)); ));
@ -690,6 +697,8 @@ class Enotify {
'$titemlink' => $datarray['titemlink'], '$titemlink' => $datarray['titemlink'],
'$thanks' => $datarray['thanks'], '$thanks' => $datarray['thanks'],
'$site_admin' => $datarray['site_admin'], '$site_admin' => $datarray['site_admin'],
'$opt_out1' => $datarray['opt_out1'],
'$opt_out2' => $datarray['opt_out2'],
'$title' => $datarray['title'], '$title' => $datarray['title'],
'$textversion' => $datarray['textversion'], '$textversion' => $datarray['textversion'],
)); ));

View File

@ -28,6 +28,7 @@ Options are:
[*= system.prevent_tag_hijacking ] Prevent foreign networks hijacking hashtags in your posts and directing them at its own resources. [*= system.prevent_tag_hijacking ] Prevent foreign networks hijacking hashtags in your posts and directing them at its own resources.
[*= system.startpage ] Another of those technically hidden configs made available by addons. Sets the default page to view when logging in. This is exposed to the UI by the startpage addon. [*= system.startpage ] Another of those technically hidden configs made available by addons. Sets the default page to view when logging in. This is exposed to the UI by the startpage addon.
[*= system.taganyone ] Requires the config of the same name to be enabled. Allow the @mention tagging of anyone, whether you are connected or not. This doesn't scale. [*= system.taganyone ] Requires the config of the same name to be enabled. Allow the @mention tagging of anyone, whether you are connected or not. This doesn't scale.
[*= system.anonymous_comments ] By default or if set to 1, custom permissions can be set to allow anonymous (moderated) comments like WordPress, moderated by the channel owner. If set to 0, no member of your site can select or enable this.
[*= system.user_scalable ] Determine if the app is scalable on touch screens. Defaults to on, to disable, set to zero - real zero, not just false. [*= system.user_scalable ] Determine if the app is scalable on touch screens. Defaults to on, to disable, set to zero - real zero, not just false.
[/dl] [/dl]
[h2]Site config[/h2][dl terms="mb"] [h2]Site config[/h2][dl terms="mb"]

View File

@ -27,13 +27,7 @@
if (typeof($(image).parent()[0]) !== 'undefined') { if (typeof($(image).parent()[0]) !== 'undefined') {
var imageparent = document.getElementById($(image).parent()[0].id); var imageparent = document.getElementById($(image).parent()[0].id);
$(imageparent).toggleClass('embed-photo-selected-photo'); $(imageparent).toggleClass('embed-photo-selected-photo');
} var href = $(imageparent).attr('href');
});
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
$('#embed-photo-OKButton').click(function () {
$('.embed-photo-selected-photo').each(function (index) {
var href = $(this).attr('href');
$.post("embedphotos/photolink", {href: href}, $.post("embedphotos/photolink", {href: href},
function(ddata) { function(ddata) {
if (ddata['status']) { if (ddata['status']) {
@ -42,13 +36,16 @@
window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']);
} }
return false; return false;
}, },
'json'); 'json');
}); $('#embedPhotoModalBodyAlbumDialog').html('');
$('#embedPhotoModalBodyAlbumDialog').html(''); $('#embedPhotoModalBodyAlbumDialog').off('click');
$('#embedPhotoModalBodyAlbumDialog').off('click'); $('#embedPhotoModal').modal('hide');
$('#embedPhotoModal').modal('hide'); }
}); });
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
} else { } else {
window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']);
} }

View File

@ -27,13 +27,7 @@
if (typeof($(image).parent()[0]) !== 'undefined') { if (typeof($(image).parent()[0]) !== 'undefined') {
var imageparent = document.getElementById($(image).parent()[0].id); var imageparent = document.getElementById($(image).parent()[0].id);
$(imageparent).toggleClass('embed-photo-selected-photo'); $(imageparent).toggleClass('embed-photo-selected-photo');
} var href = $(imageparent).attr('href');
});
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
$('#embed-photo-OKButton').click(function () {
$('.embed-photo-selected-photo').each(function (index) {
var href = $(this).attr('href');
$.post("embedphotos/photolink", {href: href}, $.post("embedphotos/photolink", {href: href},
function(ddata) { function(ddata) {
if (ddata['status']) { if (ddata['status']) {
@ -44,13 +38,16 @@
window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']);
} }
return false; return false;
}, },
'json'); 'json');
}); $('#embedPhotoModalBodyAlbumDialog').html('');
$('#embedPhotoModalBodyAlbumDialog').html(''); $('#embedPhotoModalBodyAlbumDialog').off('click');
$('#embedPhotoModalBodyAlbumDialog').off('click'); $('#embedPhotoModal').modal('hide');
$('#embedPhotoModal').modal('hide'); }
}); });
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
} else { } else {
window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']);
} }

View File

@ -41,10 +41,6 @@
</div> </div>
<div id="embedPhotoModalBodyAlbumDialog" class="d-none"></div> <div id="embedPhotoModalBodyAlbumDialog" class="d-none"></div>
</div> </div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{$embedPhotosModalCancel}}</button>
<button id="embed-photo-OKButton" type="button" class="btn btn-primary">{{$embedPhotosModalOK}}</button>
</div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->

View File

@ -21,6 +21,9 @@
<tr><td style="padding:11px 0;" colspan="2">{{$hitemlink}}</td></tr> <tr><td style="padding:11px 0;" colspan="2">{{$hitemlink}}</td></tr>
<tr><td></td><td>{{$thanks}}</td></tr> <tr><td></td><td>{{$thanks}}</td></tr>
<tr><td></td><td>{{$site_admin}}</td></tr> <tr><td></td><td>{{$site_admin}}</td></tr>
<tr><td style="font-size: 12px; color: #444444; padding-top: 18px;" colspan="2">{{$opt_out1}}</td></tr>
<tr><td style="font-size: 12px; color: #444444;" colspan="2">{{$opt_out2}}</td></tr>
</tbody> </tbody>
</table> </table>
</body> </body>

View File

@ -11,3 +11,4 @@
{{$thanks}} {{$thanks}}
{{$site_admin}} {{$site_admin}}
{{$opt_out1}} {{$opt_out2}}

View File

@ -459,13 +459,7 @@ var activeCommentText = '';
if (typeof($(image).parent()[0]) !== 'undefined') { if (typeof($(image).parent()[0]) !== 'undefined') {
var imageparent = document.getElementById($(image).parent()[0].id); var imageparent = document.getElementById($(image).parent()[0].id);
$(imageparent).toggleClass('embed-photo-selected-photo'); $(imageparent).toggleClass('embed-photo-selected-photo');
} var href = $(imageparent).attr('href');
});
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
$('#embed-photo-OKButton').click(function () {
$('.embed-photo-selected-photo').each(function (index) {
var href = $(this).attr('href');
$.post("embedphotos/photolink", {href: href}, $.post("embedphotos/photolink", {href: href},
function(ddata) { function(ddata) {
if (ddata['status']) { if (ddata['status']) {
@ -476,12 +470,14 @@ var activeCommentText = '';
} }
return false; return false;
}, },
'json'); 'json');
}); $('#embedPhotoModalBodyAlbumDialog').html('');
$('#embedPhotoModalBodyAlbumDialog').html(''); $('#embedPhotoModalBodyAlbumDialog').off('click');
$('#embedPhotoModalBodyAlbumDialog').off('click'); $('#embedPhotoModal').modal('hide');
$('#embedPhotoModal').modal('hide'); }
}); });
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
} else { } else {
window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']);
} }

View File

@ -293,10 +293,6 @@
</div> </div>
<div id="embedPhotoModalBodyAlbumDialog" class="d-none"></div> <div id="embedPhotoModalBodyAlbumDialog" class="d-none"></div>
</div> </div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{$embedPhotosModalCancel}}</button>
<button id="embed-photo-OKButton" type="button" class="btn btn-primary">{{$embedPhotosModalOK}}</button>
</div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->

View File

@ -35,8 +35,6 @@
<br /> <br />
{{/if}} {{/if}}
<div id="profile-photo-submit-wrapper"> <div id="profile-photo-submit-wrapper">
<input type="submit" name="submit" id="profile-photo-submit" value="{{$submit}}"> <input type="submit" name="submit" id="profile-photo-submit" value="{{$submit}}">
</div> </div>
@ -65,10 +63,6 @@
</div> </div>
<div id="embedPhotoModalBodyAlbumDialog" class="d-none"></div> <div id="embedPhotoModalBodyAlbumDialog" class="d-none"></div>
</div> </div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{$embedPhotosModalCancel}}</button>
<button id="embed-photo-OKButton" type="button" class="btn btn-primary">{{$embedPhotosModalOK}}</button>
</div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->

View File

@ -91,10 +91,6 @@
</div> </div>
<div id="embedPhotoModalBodyAlbumDialog" class="d-none"></div> <div id="embedPhotoModalBodyAlbumDialog" class="d-none"></div>
</div> </div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">{{$embedPhotosModalCancel}}</button>
<button id="embed-photo-OKButton" type="button" class="btn btn-primary">{{$embedPhotosModalOK}}</button>
</div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
</div><!-- /.modal --> </div><!-- /.modal -->
@ -391,16 +387,10 @@
if (typeof($(image).parent()[0]) !== 'undefined') { if (typeof($(image).parent()[0]) !== 'undefined') {
var imageparent = document.getElementById($(image).parent()[0].id); var imageparent = document.getElementById($(image).parent()[0].id);
$(imageparent).toggleClass('embed-photo-selected-photo'); $(imageparent).toggleClass('embed-photo-selected-photo');
} var href = $(imageparent).attr('href');
}); $.post("embedphotos/photolink", {href: href},
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); function(ddata) {
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); if (ddata['status']) {
$('#embed-photo-OKButton').click(function () {
$('.embed-photo-selected-photo').each(function (index) {
var href = $(this).attr('href');
$.post("embedphotos/photolink", {href: href},
function(ddata) {
if (ddata['status']) {
{{if !$mimeType || $mimeType == 'text/markdown'}} {{if !$mimeType || $mimeType == 'text/markdown'}}
var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '\n![image]($1)' ) var imgURL = ddata['photolink'].replace( /\[.*\]\[.*\](.*)\[.*\]\[.*\]/, '\n![image]($1)' )
editor.getSession().insert(editor.getCursorPosition(), imgURL) editor.getSession().insert(editor.getCursorPosition(), imgURL)
@ -408,17 +398,20 @@
var currentContent = $('#editor').val(); var currentContent = $('#editor').val();
$('#editor').val(currentContent + ddata['photolink']); $('#editor').val(currentContent + ddata['photolink']);
{{/if}} {{/if}}
} else { } else {
window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']);
} }
return false; return false;
}, },
'json'); 'json');
}); $('#embedPhotoModalBodyAlbumDialog').html('');
$('#embedPhotoModalBodyAlbumDialog').html(''); $('#embedPhotoModalBodyAlbumDialog').off('click');
$('#embedPhotoModalBodyAlbumDialog').off('click'); $('#embedPhotoModal').modal('hide');
$('#embedPhotoModal').modal('hide'); }
}); });
$('#embedPhotoModalBodyAlbumListDialog').addClass('d-none');
$('#embedPhotoModalBodyAlbumDialog').removeClass('d-none');
} else { } else {
window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']);
} }