mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
TopMenu update for mobile
This commit is contained in:
parent
e2e7711439
commit
5a9be90a0a
15 changed files with 96 additions and 40 deletions
|
@ -1001,9 +1001,15 @@ if (typeof gtag !== \"function\") {
|
|||
}
|
||||
}
|
||||
|
||||
public static function isLogged() {
|
||||
public static function isLogged($checkForRequestLogin=false) {
|
||||
self::recreateLoginFromCookie();
|
||||
return !empty($_SESSION['user']['id']);
|
||||
$isLogged = !empty($_SESSION['user']['id']);
|
||||
if(empty($isLogged) && $checkForRequestLogin){
|
||||
self::loginFromRequest();
|
||||
return !empty($_SESSION['user']['id']);
|
||||
}else{
|
||||
return $isLogged;
|
||||
}
|
||||
}
|
||||
|
||||
public static function isVerified() {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<span class="label label-danger liveNow faa-flash faa-slow animated">LIVE NOW</span>
|
||||
</div>
|
||||
</a>
|
||||
<a class="h6 galleryLink " href="_link_" title="_title_" >
|
||||
<a class="h6 galleryLink " href="_link_" >
|
||||
<strong class="title">_title_</strong>
|
||||
</a>
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
</li>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#liveLink_unique_id_').tooltip();
|
||||
$('#liveLink_unique_id_').tooltip({html:true});
|
||||
});
|
||||
</script>
|
|
@ -213,7 +213,7 @@ if (!User::canCreateMeet()) {
|
|||
],
|
||||
select: true,
|
||||
"initComplete": function (settings, json) {
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body', html:true});
|
||||
}
|
||||
});
|
||||
<?php
|
||||
|
@ -368,7 +368,7 @@ if ($manageMeetings) {
|
|||
|
||||
});
|
||||
setTimeout(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body', html:true});
|
||||
}, 500);
|
||||
});
|
||||
</script>
|
|
@ -15,4 +15,25 @@ if(!empty($obj->YPTSocket)){
|
|||
$obj->webSocketTypes = json_encode($refl->getConstants());
|
||||
$obj->webSocketURL = addQueryStringParameter(YPTSocket::getWebSocketURL(true), 'page_title', 'Mobile APP');
|
||||
}
|
||||
if(AVideoPlugin::isEnabledByName("TopMenu")){
|
||||
$obj->tabMenuItems = array();
|
||||
$obj->leftMenuItems = array();
|
||||
if(empty($_POST['sort'])){
|
||||
$_POST['sort'] = array('item_order'=>"ASC");
|
||||
}
|
||||
$tabMenu = Menu::getAllActive(Menu::$typeMobileTabMenu);
|
||||
foreach ($tabMenu as $key => $value) {
|
||||
$menuItems = MenuItem::getAllFromMenu($value['id'], true);
|
||||
foreach ($menuItems as $value2) {
|
||||
$obj->tabMenuItems[] = $value2;
|
||||
}
|
||||
}
|
||||
$tabMenu = Menu::getAllActive(Menu::$typeMobileLeftMenu);
|
||||
foreach ($tabMenu as $key => $value) {
|
||||
$menuItems = MenuItem::getAllFromMenu($value['id'], true);
|
||||
foreach ($menuItems as $value2) {
|
||||
$obj->leftMenuItems[] = $value2;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo json_encode($obj);
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
currentTime{uid}++;
|
||||
{implode}
|
||||
}, 1000);
|
||||
$('div[data-toggle="tooltip"]').tooltip({container: '#EPGProgress{uid}'});
|
||||
$('div[data-toggle="tooltip"]').tooltip({container: '#EPGProgress{uid}', html:true});
|
||||
});
|
||||
</script>
|
|
@ -23,7 +23,7 @@
|
|||
});
|
||||
return false;
|
||||
});
|
||||
$('#{btnId},#{btnId}Live').tooltip();
|
||||
$('#{btnId},#{btnId}Live').tooltip({html:true});
|
||||
});
|
||||
function toogle{btnId}isLive(){
|
||||
if({btnId}isLive){
|
||||
|
|
|
@ -13,6 +13,8 @@ class Menu extends ObjectYPT {
|
|||
static $typeActionMenuCustomURLForLoggedUsers = 5;
|
||||
static $typeActionMenuCustomURLForUsersThatCanWatchVideo = 6;
|
||||
static $typeActionMenuCustomURLForUsersThatCanNotWatchVideo = 7;
|
||||
static $typeMobileTabMenu = 8;
|
||||
static $typeMobileLeftMenu = 9;
|
||||
|
||||
static $typeName = array(
|
||||
1=>'Left',
|
||||
|
@ -21,7 +23,9 @@ class Menu extends ObjectYPT {
|
|||
4=>'Action Per Video',
|
||||
5=>'Action Per Video For Logged Users Only',
|
||||
6=>'Action Per Video For Users That can Watch Video',
|
||||
7=>'Action Per Video For Users That can NOT Watch Video');
|
||||
7=>'Action Per Video For Users That can NOT Watch Video',
|
||||
8=>'Mobile Tab Menu',
|
||||
9=>'Mobile Left Menu');
|
||||
|
||||
protected $id, $menuName, $categories_id, $users_groups_id, $menu_order, $status, $position, $type, $icon, $menuSeoUrl;
|
||||
|
||||
|
|
|
@ -25,6 +25,10 @@ $menu->setUrl($_POST['url']);
|
|||
$menu->setIcon($_POST['icon']);
|
||||
$menu->setMenuSeoUrlItem($_POST['menuSeoUrlItem']);
|
||||
|
||||
if(!empty($_POST['mobileicon'])){
|
||||
$menu->setIcon($_POST['mobileicon']);
|
||||
}
|
||||
|
||||
$obj->error = $menu->save();
|
||||
|
||||
echo json_encode($obj); ?>
|
||||
|
|
|
@ -199,7 +199,7 @@ $groups = UserGroups::getAllUsersGroups();
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6" id="menuItemIconDiv">
|
||||
<div class="form-group">
|
||||
<label>Icon:</label><br>
|
||||
<div>
|
||||
|
@ -209,6 +209,13 @@ $groups = UserGroups::getAllUsersGroups();
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" id="menuItemIconMobileDiv">
|
||||
<div class="form-group">
|
||||
<label>Icon:</label><br>
|
||||
<input type="text" class="form-control" id="menuItemIconMobile">
|
||||
Get the icon name from <a href="https://ionicframework.com/docs/v3/ionicons/" target="_blank">here</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="col-md-12">
|
||||
<div id="divURL" class="divType" style="display: none;">
|
||||
|
@ -307,6 +314,7 @@ $groups = UserGroups::getAllUsersGroups();
|
|||
$('#menuSeoUrlItem').val("");
|
||||
$('iframe').contents().find('.wysihtml5-editor').html('');
|
||||
$("#menuItemIcon").val("");
|
||||
$("#menuItemIconMobile").val("");
|
||||
$("#menuItemIcon").trigger('change');
|
||||
}
|
||||
|
||||
|
@ -415,6 +423,7 @@ $groups = UserGroups::getAllUsersGroups();
|
|||
$('#text').val(item.text);
|
||||
$('#menuSeoUrlItem').val(item.menuSeoUrlItem);
|
||||
$("#menuItemIcon").val(item.icon);
|
||||
$("#menuItemIconMobile").val(item.icon);
|
||||
$("#menuItemIcon").trigger('change');
|
||||
$('iframe').contents().find('.wysihtml5-editor').html(item.text);
|
||||
if (item.url.length > 0) {
|
||||
|
@ -490,6 +499,13 @@ $groups = UserGroups::getAllUsersGroups();
|
|||
$('#users_groups_id').val(data.users_groups_id);
|
||||
$("#menuIcon").val(data.icon);
|
||||
$("#menuIcon").trigger('change');
|
||||
if(data.type == 8){
|
||||
$("#menuItemIconDiv").hide();
|
||||
$("#menuItemIconMobileDiv").show();
|
||||
}else{
|
||||
$("#menuItemIconDiv").show();
|
||||
$("#menuItemIconMobileDiv").hide();
|
||||
}
|
||||
checkIfHasId();
|
||||
loadItems(data.id);
|
||||
});
|
||||
|
@ -536,7 +552,8 @@ $groups = UserGroups::getAllUsersGroups();
|
|||
"item_order": $('#item_order').val(),
|
||||
"item_status": $('#item_status').val(),
|
||||
"text": $('#pageType').val() == 'page' ? $('#text').val() : '',
|
||||
"icon": $("#menuItemIcon").val()
|
||||
"icon": $("#menuItemIcon").val(),
|
||||
"mobileicon": $("#menuItemIconMobile").val()
|
||||
},
|
||||
type: 'post',
|
||||
success: function (response) {
|
||||
|
|
|
@ -75,7 +75,7 @@ function jsonToForm(json, helper) {
|
|||
$('#inputData').val(json);
|
||||
});
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body', html:true});
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -840,7 +840,7 @@ function showMuteTooltip() {
|
|||
$("#mainVideo .vjs-volume-panel").attr("data-toggle", "tooltip");
|
||||
$("#mainVideo .vjs-volume-panel").attr("data-placement", "top");
|
||||
$("#mainVideo .vjs-volume-panel").attr("title", "Click to activate the sound");
|
||||
$('#mainVideo .vjs-volume-panel[data-toggle="tooltip"]').tooltip({container: '.vjs-control-bar'});
|
||||
$('#mainVideo .vjs-volume-panel[data-toggle="tooltip"]').tooltip({container: '.vjs-control-bar', html:true});
|
||||
$('#mainVideo .vjs-volume-panel[data-toggle="tooltip"]').tooltip('show');
|
||||
$("#mainVideo .vjs-volume-panel").click(function () {
|
||||
console.log("remove unmute tooltip");
|
||||
|
@ -1403,7 +1403,7 @@ function avideoTooltip(selector, text) {
|
|||
$(selector).attr('title', text);
|
||||
$(selector).attr('data-toggle', 'tooltip');
|
||||
$(selector).attr('data-original-title', text);
|
||||
$(selector).tooltip();
|
||||
$(selector).tooltip({html:true});
|
||||
}
|
||||
|
||||
function fixAdSize() {
|
||||
|
@ -1949,7 +1949,7 @@ async function setToolTips() {
|
|||
if (!$('[data-toggle="tooltip"]').not('.alreadyTooltip').length) {
|
||||
return false;
|
||||
}
|
||||
$('[data-toggle="tooltip"]').not('.alreadyTooltip').tooltip({container: 'body'});
|
||||
$('[data-toggle="tooltip"]').not('.alreadyTooltip').tooltip({container: 'body', html:true});
|
||||
$('[data-toggle="tooltip"]').not('.alreadyTooltip').on('click', function () {
|
||||
var t = this;
|
||||
setTimeout(function () {
|
||||
|
|
|
@ -524,7 +524,7 @@ $uuidJSCondition = implode(" && ", $rowId);
|
|||
}).on("loaded.rs.jquery.bootgrid", function () {
|
||||
$('[data-toggle="tooltip"], .tooltip').tooltip("hide");
|
||||
setTimeout(function(){
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body',html:true});
|
||||
},500);
|
||||
/* Executes after data is loaded and rendered */
|
||||
grid.find(".pluginSwitch").on("change", function (e) {
|
||||
|
|
|
@ -39,25 +39,28 @@ foreach ($tags as $value) {
|
|||
if (User::isLogged()) {
|
||||
$user = new User("");
|
||||
$user->loadSelfUser();
|
||||
?>
|
||||
<div class="row">
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading tabbable-line">
|
||||
<div class="pull-right">
|
||||
<?php echo $tagsStr; ?>
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#basicInfo" id="aBasicInfo"><?php echo __("Basic Info") ?></a></li>
|
||||
if (!empty($_REQUEST['basicInfoOnly'])) {
|
||||
include $global['systemRootPath'] . './view/userBasicInfo.php';
|
||||
} else {
|
||||
?>
|
||||
<div class="row">
|
||||
<div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading tabbable-line">
|
||||
<div class="pull-right">
|
||||
<?php echo $tagsStr; ?>
|
||||
</div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#basicInfo" id="aBasicInfo"><?php echo __("Basic Info") ?></a></li>
|
||||
|
||||
<?php if (empty($advancedCustomUser->disablePersonalInfo)) { ?>
|
||||
<li><a data-toggle="tab" href="#personalInfo" id="aPersonalInfo"><?php echo __("Personal Info") ?></a></li>
|
||||
<?php } ?>
|
||||
<?php echo AVideoPlugin::profileTabName($user->getId()); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="tab-content">
|
||||
<?php if (empty($advancedCustomUser->disablePersonalInfo)) { ?>
|
||||
<li><a data-toggle="tab" href="#personalInfo" id="aPersonalInfo"><?php echo __("Personal Info") ?></a></li>
|
||||
<?php } ?>
|
||||
<?php echo AVideoPlugin::profileTabName($user->getId()); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="tab-content">
|
||||
<div id="basicInfo" class="tab-pane fade in active" style="padding: 10px 0;">
|
||||
<?php
|
||||
include $global['systemRootPath'] . './view/userBasicInfo.php';
|
||||
|
@ -71,15 +74,16 @@ foreach ($tags as $value) {
|
|||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php echo AVideoPlugin::profileTabContent($user->getId()); ?>
|
||||
<?php echo AVideoPlugin::profileTabContent($user->getId()); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
include $global['systemRootPath'] . './view/userLogin.php';
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@
|
|||
"about": $('#textAbout').val(),
|
||||
"channelName": $('#channelName').val(),
|
||||
"donationLink": $('#donationLink').val(),
|
||||
"analyticsCode": $('#analyticsCode').val()
|
||||
"analyticsCode": $('#analyticsCode').val(),
|
||||
},
|
||||
type: 'post',
|
||||
success: function (response) {
|
||||
|
@ -270,7 +270,7 @@
|
|||
type: "POST",
|
||||
url: "<?php echo $global['webSiteRootURL']; ?>objects/userSavePhoto.php",
|
||||
data: {
|
||||
imgBase64: resp
|
||||
imgBase64: resp,
|
||||
},
|
||||
success: function (response) {
|
||||
modal.hidePleaseWait();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue