1
1
Fork 0

Replace obsolete calls to $APP->is_mobile in templates

This commit is contained in:
Hypolite Petovan 2020-12-23 03:25:55 -05:00
parent 586fb10176
commit 241cd32b14
5 changed files with 19 additions and 15 deletions

View file

@ -1177,7 +1177,8 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
'$term' => DI::l10n()->t('Tag term:'),
'$fileas' => DI::l10n()->t('Save to Folder:'),
'$whereareu' => DI::l10n()->t('Where are you right now?'),
'$delitems' => DI::l10n()->t("Delete item\x28s\x29?")
'$delitems' => DI::l10n()->t("Delete item\x28s\x29?"),
'$is_mobile' => DI::mode()->isMobile(),
]);
$jotplugins = '';

View file

@ -66,7 +66,8 @@ function editpost_content(App $a)
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$ispublic' => '&nbsp;', // DI::l10n()->t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $a->user['nickname']
'$nickname' => $a->user['nickname'],
'$is_mobile' => DI::mode()->isMobile(),
]);
if (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) {

View file

@ -112,6 +112,7 @@ class Introductions extends BaseNotifications
'$note' => $notification->getNote(),
'$ignore' => DI::l10n()->t('Ignore'),
'$discard' => DI::l10n()->t('Discard'),
'$is_mobile' => DI::mode()->isMobile(),
]);
break;
@ -190,6 +191,7 @@ class Introductions extends BaseNotifications
'$ignore' => DI::l10n()->t('Ignore'),
'$discard' => $discard,
'$action' => $action,
'$is_mobile' => DI::mode()->isMobile(),
]);
break;
}

View file

@ -8,7 +8,7 @@ var textlen = 0;
function initEditor(callback) {
if (editor == false) {
var colorbox_options = {
{{if $APP->is_mobile}}
{{if $is_mobile}}
'width' : '100%',
'height' : '100%',
{{/if}}

View file

@ -36,6 +36,17 @@
<div class="intro-note intro-note-{{$intro_id}}">{{$note}}</div>
</div>
{{* On mobile touch devices we use buttons for approve, ingnore && discard to have a better UX *}}
{{if $is_mobile}}
<div class="intro-action-buttons">
<form class="intro-form pull-left" action="notification/{{$intro_id}}" method="post">
<button class="btn btn-small btn-default intro-submit-ignore" type="submit" name="submit" value="{{$ignore}}">{{$ignore}}</button>
{{if $discard}}<button class="btn btn-small btn-default intro-submit-discard" type="submit" name="submit" value="{{$discard}}">{{$discard}}</button>&nbsp;{{/if}}
</form>
<button class="btn btn-small btn-primary intro-submit-approve pull-right" onclick="addElmToModal('#intro-approve-wrapper-{{$intro_id}}')">{{$approve}}</button>
</div>
<div class="clear"></div>
{{else}}
{{* The intro actions like approve, ignore, discard intro*}}
<div class="intro-actions pull-right nav-pills preferences">
<button class="btn-link intro-action-link" onclick="addElmToModal('#intro-approve-wrapper-{{$intro_id}}');" aria-label="{{$approve}}" title="{{$approve}}" data-toggle="tooltip"><i class="fa fa-check" aria-hidden="true"></i></button>
@ -45,6 +56,7 @@
{{if $discard}}<button class="btn-link intro-submit-discard intro-action-link" type="submit" name="submit" value="{{$discard}}" aria-label="{{$discard}}" title="{{$discard}}" data-toggle="tooltip"><i class="fa fa-trash-o" aria-hidden="true"></i></button>{{/if}}
</form>
</div>
{{/if}}
{{* This sections contains special settings for contact approval. We hide it by default and load this section in
a bootstrap modal in the case of approval *}}
@ -74,17 +86,5 @@
</form>
</div>
</div>
{{* On mobile touch devices we use buttons for approve, ingnore && discard to have a better UX *}}
{{if $APP->is_mobile}}
<div class="intro-action-buttons">
<form class="intro-form pull-left" action="notification/{{$intro_id}}" method="post">
<button class="btn btn-small btn-default intro-submit-ignore" type="submit" name="submit" value="{{$ignore}}">{{$ignore}}</button>
{{if $discard}}<button class="btn btn-small btn-default intro-submit-discard" type="submit" name="submit" value="{{$discard}}">{{$discard}}</button>&nbsp;{{/if}}
</form>
<button class="btn btn-small btn-primary intro-submit-approve pull-right" onclick="addElmToModal('#intro-approve-wrapper-{{$intro_id}}')">{{$approve}}</button>
</div>
<div class="clear"></div>
{{/if}}
</div>
<div class="intro-end"></div>