Remove poke feature
This commit is contained in:
parent
119da8b58b
commit
4a885a13a6
27 changed files with 46 additions and 526 deletions
|
@ -443,23 +443,6 @@ $(document).ready(function () {
|
|||
});
|
||||
});
|
||||
|
||||
$body.on("submit", ".modal-body #poke-wrapper", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
let $form = $(this);
|
||||
let $pokeSubmit = $form.find("button[type=submit]").button("loading");
|
||||
|
||||
$.post($form.attr("action"), $form.serialize(), "json")
|
||||
.then(function (data) {
|
||||
if (data.success) {
|
||||
$("#modal").modal("hide");
|
||||
}
|
||||
})
|
||||
.always(function () {
|
||||
$pokeSubmit.button("reset");
|
||||
});
|
||||
});
|
||||
|
||||
if (!navigator.canShare || !navigator.canShare()) {
|
||||
$('.button-browser-share').hide();
|
||||
}
|
||||
|
|
|
@ -68,20 +68,20 @@ function is_modal() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Array with modalpages
|
||||
* Array with modal pages
|
||||
*
|
||||
* The array contains the page names of the pages
|
||||
* which should displayed as modals
|
||||
*
|
||||
* @return array Pagenames as path
|
||||
* @return array Page names as path
|
||||
*/
|
||||
function get_modalpage_list() {
|
||||
//Arry of pages wich getting bootstrap modal dialogs
|
||||
$modalpages = ['poke/',
|
||||
'message/new',
|
||||
'settings/oauth/add',
|
||||
'events/new',
|
||||
// 'fbrowser/image/'
|
||||
//Array of pages which getting bootstrap modal dialogs
|
||||
$modalpages = [
|
||||
'message/new',
|
||||
'settings/oauth/add',
|
||||
'events/new',
|
||||
// 'fbrowser/image/'
|
||||
];
|
||||
|
||||
return $modalpages;
|
||||
|
|
|
@ -50,11 +50,6 @@
|
|||
<i class="fa fa-envelope" aria-hidden="true"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $contact.photo_menu.poke}}
|
||||
<button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.poke.1}}'); return false;" data-toggle="tooltip" title="{{$contact.photo_menu.poke.0}}">
|
||||
<i class="fa fa-heartbeat" aria-hidden="true"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $contact.photo_menu.network}}
|
||||
<a class="contact-action-link btn-link" href="{{$contact.photo_menu.network.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.network.0}}">
|
||||
<i class="fa fa-cloud" aria-hidden="true"></i>
|
||||
|
@ -178,11 +173,6 @@ We use this part to filter the contacts with jquery.textcomplete *}}
|
|||
<i class="fa fa-envelope" aria-hidden="true"></i>
|
||||
</button>
|
||||
{/if}
|
||||
{if $photo_menu.poke}
|
||||
<button type="button" class="contact-action-link btn-link" onclick="addToModal('{$photo_menu.poke.1}')" data-toggle="tooltip" title="{$photo_menu.poke.0}">
|
||||
<i class="fa fa-heartbeat" aria-hidden="true"></i>
|
||||
</button>
|
||||
{/if}
|
||||
{if $photo_menu.network}
|
||||
<a class="contact-action-link btn-link" href="{$photo_menu.network.1}" data-toggle="tooltip" title="{$photo_menu.network.0}">
|
||||
<i class="fa fa-cloud" aria-hidden="true"></i>
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
|
||||
<div id="poke-wrapper">
|
||||
|
||||
<h3 class="heading">{{$title}}</h3>
|
||||
<div id="poke-desc">{{$desc nofilter}}</div>
|
||||
|
||||
<form id="poke-form" action="poke" method="get">
|
||||
|
||||
<div id="poke-content-wrapper">
|
||||
|
||||
{{* The input field with the recipient name*}}
|
||||
<div id="poke-recip-wrapper" class="form-group">
|
||||
<label for="poke-recip">{{$clabel}}</label>
|
||||
<input id="poke-recip" class="form-control" type="text" size="64" maxlength="255" value="{{$name}}" name="pokename" autocomplete="off" />
|
||||
<input id="poke-recip-complete" type="hidden" value="{{$id}}" name="cid" />
|
||||
<input id="poke-parent" type="hidden" value="{{$parent}}" name="parent" />
|
||||
</div>
|
||||
|
||||
{{* The drop-down list with different actions *}}
|
||||
<div id="poke-action-wrapper" class="form-group">
|
||||
<label for="poke-verb-select">{{$choice}}</label>
|
||||
<select name="verb" id="poke-verb-select" class="form-control">
|
||||
{{foreach $verbs as $v}}
|
||||
<option value="{{$v.0}}">{{$v.1}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{* The checkbox to select if the "poke message" should be private *}}
|
||||
<div id="poke-private-desc" class="checkbox">
|
||||
<input type="checkbox" id=poke-private-desc-checkbox" name="private" {{if $parent}}disabled="disabled"{{/if}} value="1" />
|
||||
<label for="poke-private-desc-checkbox">{{$prv_desc}}</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="poke-content-wrapper-end"></div>
|
||||
|
||||
<div id="poke-submit-wrapper">
|
||||
<button class="btn btn-primary pull-right" type="submit" name="submit" value="{{$submit}}"><i class="fa fa-slideshare"></i> {{$submit}}</button>
|
||||
</div>
|
||||
|
||||
<div id="poke-submit-wrapper-end"></div>
|
||||
|
||||
</form>
|
||||
<div id="poke-wrapper-end"></div>
|
||||
|
||||
</div>
|
|
@ -152,7 +152,6 @@
|
|||
{{include file="field_intcheckbox.tpl" field=$notify5}}
|
||||
{{include file="field_intcheckbox.tpl" field=$notify6}}
|
||||
{{include file="field_intcheckbox.tpl" field=$notify7}}
|
||||
{{include file="field_intcheckbox.tpl" field=$notify8}}
|
||||
</div>
|
||||
|
||||
<div id="settings-notify-desc">{{$lbl_notify}}</div>
|
||||
|
|
|
@ -1,10 +1,26 @@
|
|||
<?php
|
||||
/*
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2022, the Friendica project
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Name: frio
|
||||
* Description: Bootstrap V3 theme. The theme is currently under construction, so it is far from finished. For further information have a look at the <a href="https://github.com/friendica/friendica/tree/develop/view/theme/frio/README.md">ReadMe</a>.
|
||||
* Version: V.0.8.5
|
||||
* Author: Rabuzarus <https://friendica.kommune4.de/profile/rabuzarus>
|
||||
*
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
|
@ -105,7 +121,7 @@ function frio_item_photo_links(App $a, &$body_info)
|
|||
/**
|
||||
* Replace links of the item_photo_menu hook
|
||||
*
|
||||
* This function replaces the original poke and the message links
|
||||
* This function replaces the original message links
|
||||
* to call the addToModal javascript function so this pages can
|
||||
* be loaded in a bootstrap modal
|
||||
*
|
||||
|
@ -115,7 +131,7 @@ function frio_item_photo_links(App $a, &$body_info)
|
|||
function frio_item_photo_menu(App $a, &$arr)
|
||||
{
|
||||
foreach ($arr['menu'] as $k => $v) {
|
||||
if (strpos($v, '/poke') === 0 || strpos($v, 'message/new/') === 0) {
|
||||
if (strpos($v, 'message/new/') === 0) {
|
||||
$v = 'javascript:addToModal(\'' . $v . '\'); return false;';
|
||||
$arr['menu'][$k] = $v;
|
||||
}
|
||||
|
@ -125,7 +141,7 @@ function frio_item_photo_menu(App $a, &$arr)
|
|||
/**
|
||||
* Replace links of the contact_photo_menu
|
||||
*
|
||||
* This function replaces the original poke and the message links
|
||||
* This function replaces the original message link
|
||||
* to call the addToModal javascript function so this pages can
|
||||
* be loaded in a bootstrap modal
|
||||
* Additionally the profile, status and photo page links will be changed
|
||||
|
@ -138,13 +154,7 @@ function frio_contact_photo_menu(App $a, &$args)
|
|||
{
|
||||
$cid = $args['contact']['id'];
|
||||
|
||||
if (!empty($args['menu']['poke'])) {
|
||||
$pokelink = $args['menu']['poke'][1];
|
||||
} else {
|
||||
$pokelink = '';
|
||||
}
|
||||
|
||||
if (!empty($args['menu']['poke'])) {
|
||||
if (!empty($args['menu']['pm'])) {
|
||||
$pmlink = $args['menu']['pm'][1];
|
||||
} else {
|
||||
$pmlink = '';
|
||||
|
@ -166,13 +176,9 @@ function frio_contact_photo_menu(App $a, &$args)
|
|||
}
|
||||
}
|
||||
|
||||
// Add to pm and poke links a new key with the value 'modal'.
|
||||
// Later we can make conditions in the corresponing templates (e.g.
|
||||
// Add to pm link a new key with the value 'modal'.
|
||||
// Later we can make conditions in the corresponding templates (e.g.
|
||||
// contact_template.tpl)
|
||||
if (strpos($pokelink, $cid . '/poke') !== false) {
|
||||
$args['menu']['poke'][3] = 'modal';
|
||||
}
|
||||
|
||||
if (strpos($pmlink, 'message/new/' . $cid) !== false) {
|
||||
$args['menu']['pm'][3] = 'modal';
|
||||
}
|
||||
|
|
|
@ -2721,13 +2721,6 @@ margin-left: 0px;
|
|||
border: 1px solid #7C7D7B;
|
||||
}
|
||||
|
||||
/* ========== */
|
||||
/* = Poke = */
|
||||
/* ========== */
|
||||
#poke-recip {
|
||||
float: none;
|
||||
}
|
||||
|
||||
/* ================= */
|
||||
/* = Notifications = */
|
||||
/* ================= */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue