mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +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();
|
self::recreateLoginFromCookie();
|
||||||
|
$isLogged = !empty($_SESSION['user']['id']);
|
||||||
|
if(empty($isLogged) && $checkForRequestLogin){
|
||||||
|
self::loginFromRequest();
|
||||||
return !empty($_SESSION['user']['id']);
|
return !empty($_SESSION['user']['id']);
|
||||||
|
}else{
|
||||||
|
return $isLogged;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function isVerified() {
|
public static function isVerified() {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<span class="label label-danger liveNow faa-flash faa-slow animated">LIVE NOW</span>
|
<span class="label label-danger liveNow faa-flash faa-slow animated">LIVE NOW</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a class="h6 galleryLink " href="_link_" title="_title_" >
|
<a class="h6 galleryLink " href="_link_" >
|
||||||
<strong class="title">_title_</strong>
|
<strong class="title">_title_</strong>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,6 @@
|
||||||
</li>
|
</li>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#liveLink_unique_id_').tooltip();
|
$('#liveLink_unique_id_').tooltip({html:true});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
|
@ -213,7 +213,7 @@ if (!User::canCreateMeet()) {
|
||||||
],
|
],
|
||||||
select: true,
|
select: true,
|
||||||
"initComplete": function (settings, json) {
|
"initComplete": function (settings, json) {
|
||||||
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
|
$('[data-toggle="tooltip"]').tooltip({container: 'body', html:true});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
<?php
|
<?php
|
||||||
|
@ -368,7 +368,7 @@ if ($manageMeetings) {
|
||||||
|
|
||||||
});
|
});
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
|
$('[data-toggle="tooltip"]').tooltip({container: 'body', html:true});
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
|
@ -15,4 +15,25 @@ if(!empty($obj->YPTSocket)){
|
||||||
$obj->webSocketTypes = json_encode($refl->getConstants());
|
$obj->webSocketTypes = json_encode($refl->getConstants());
|
||||||
$obj->webSocketURL = addQueryStringParameter(YPTSocket::getWebSocketURL(true), 'page_title', 'Mobile APP');
|
$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);
|
echo json_encode($obj);
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
currentTime{uid}++;
|
currentTime{uid}++;
|
||||||
{implode}
|
{implode}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
$('div[data-toggle="tooltip"]').tooltip({container: '#EPGProgress{uid}'});
|
$('div[data-toggle="tooltip"]').tooltip({container: '#EPGProgress{uid}', html:true});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
|
@ -23,7 +23,7 @@
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#{btnId},#{btnId}Live').tooltip();
|
$('#{btnId},#{btnId}Live').tooltip({html:true});
|
||||||
});
|
});
|
||||||
function toogle{btnId}isLive(){
|
function toogle{btnId}isLive(){
|
||||||
if({btnId}isLive){
|
if({btnId}isLive){
|
||||||
|
|
|
@ -13,6 +13,8 @@ class Menu extends ObjectYPT {
|
||||||
static $typeActionMenuCustomURLForLoggedUsers = 5;
|
static $typeActionMenuCustomURLForLoggedUsers = 5;
|
||||||
static $typeActionMenuCustomURLForUsersThatCanWatchVideo = 6;
|
static $typeActionMenuCustomURLForUsersThatCanWatchVideo = 6;
|
||||||
static $typeActionMenuCustomURLForUsersThatCanNotWatchVideo = 7;
|
static $typeActionMenuCustomURLForUsersThatCanNotWatchVideo = 7;
|
||||||
|
static $typeMobileTabMenu = 8;
|
||||||
|
static $typeMobileLeftMenu = 9;
|
||||||
|
|
||||||
static $typeName = array(
|
static $typeName = array(
|
||||||
1=>'Left',
|
1=>'Left',
|
||||||
|
@ -21,7 +23,9 @@ class Menu extends ObjectYPT {
|
||||||
4=>'Action Per Video',
|
4=>'Action Per Video',
|
||||||
5=>'Action Per Video For Logged Users Only',
|
5=>'Action Per Video For Logged Users Only',
|
||||||
6=>'Action Per Video For Users That can Watch Video',
|
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;
|
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->setIcon($_POST['icon']);
|
||||||
$menu->setMenuSeoUrlItem($_POST['menuSeoUrlItem']);
|
$menu->setMenuSeoUrlItem($_POST['menuSeoUrlItem']);
|
||||||
|
|
||||||
|
if(!empty($_POST['mobileicon'])){
|
||||||
|
$menu->setIcon($_POST['mobileicon']);
|
||||||
|
}
|
||||||
|
|
||||||
$obj->error = $menu->save();
|
$obj->error = $menu->save();
|
||||||
|
|
||||||
echo json_encode($obj); ?>
|
echo json_encode($obj); ?>
|
||||||
|
|
|
@ -199,7 +199,7 @@ $groups = UserGroups::getAllUsersGroups();
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6" id="menuItemIconDiv">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Icon:</label><br>
|
<label>Icon:</label><br>
|
||||||
<div>
|
<div>
|
||||||
|
@ -209,6 +209,13 @@ $groups = UserGroups::getAllUsersGroups();
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
<hr>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div id="divURL" class="divType" style="display: none;">
|
<div id="divURL" class="divType" style="display: none;">
|
||||||
|
@ -307,6 +314,7 @@ $groups = UserGroups::getAllUsersGroups();
|
||||||
$('#menuSeoUrlItem').val("");
|
$('#menuSeoUrlItem').val("");
|
||||||
$('iframe').contents().find('.wysihtml5-editor').html('');
|
$('iframe').contents().find('.wysihtml5-editor').html('');
|
||||||
$("#menuItemIcon").val("");
|
$("#menuItemIcon").val("");
|
||||||
|
$("#menuItemIconMobile").val("");
|
||||||
$("#menuItemIcon").trigger('change');
|
$("#menuItemIcon").trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,6 +423,7 @@ $groups = UserGroups::getAllUsersGroups();
|
||||||
$('#text').val(item.text);
|
$('#text').val(item.text);
|
||||||
$('#menuSeoUrlItem').val(item.menuSeoUrlItem);
|
$('#menuSeoUrlItem').val(item.menuSeoUrlItem);
|
||||||
$("#menuItemIcon").val(item.icon);
|
$("#menuItemIcon").val(item.icon);
|
||||||
|
$("#menuItemIconMobile").val(item.icon);
|
||||||
$("#menuItemIcon").trigger('change');
|
$("#menuItemIcon").trigger('change');
|
||||||
$('iframe').contents().find('.wysihtml5-editor').html(item.text);
|
$('iframe').contents().find('.wysihtml5-editor').html(item.text);
|
||||||
if (item.url.length > 0) {
|
if (item.url.length > 0) {
|
||||||
|
@ -490,6 +499,13 @@ $groups = UserGroups::getAllUsersGroups();
|
||||||
$('#users_groups_id').val(data.users_groups_id);
|
$('#users_groups_id').val(data.users_groups_id);
|
||||||
$("#menuIcon").val(data.icon);
|
$("#menuIcon").val(data.icon);
|
||||||
$("#menuIcon").trigger('change');
|
$("#menuIcon").trigger('change');
|
||||||
|
if(data.type == 8){
|
||||||
|
$("#menuItemIconDiv").hide();
|
||||||
|
$("#menuItemIconMobileDiv").show();
|
||||||
|
}else{
|
||||||
|
$("#menuItemIconDiv").show();
|
||||||
|
$("#menuItemIconMobileDiv").hide();
|
||||||
|
}
|
||||||
checkIfHasId();
|
checkIfHasId();
|
||||||
loadItems(data.id);
|
loadItems(data.id);
|
||||||
});
|
});
|
||||||
|
@ -536,7 +552,8 @@ $groups = UserGroups::getAllUsersGroups();
|
||||||
"item_order": $('#item_order').val(),
|
"item_order": $('#item_order').val(),
|
||||||
"item_status": $('#item_status').val(),
|
"item_status": $('#item_status').val(),
|
||||||
"text": $('#pageType').val() == 'page' ? $('#text').val() : '',
|
"text": $('#pageType').val() == 'page' ? $('#text').val() : '',
|
||||||
"icon": $("#menuItemIcon").val()
|
"icon": $("#menuItemIcon").val(),
|
||||||
|
"mobileicon": $("#menuItemIconMobile").val()
|
||||||
},
|
},
|
||||||
type: 'post',
|
type: 'post',
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
|
|
|
@ -75,7 +75,7 @@ function jsonToForm(json, helper) {
|
||||||
$('#inputData').val(json);
|
$('#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-toggle", "tooltip");
|
||||||
$("#mainVideo .vjs-volume-panel").attr("data-placement", "top");
|
$("#mainVideo .vjs-volume-panel").attr("data-placement", "top");
|
||||||
$("#mainVideo .vjs-volume-panel").attr("title", "Click to activate the sound");
|
$("#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[data-toggle="tooltip"]').tooltip('show');
|
||||||
$("#mainVideo .vjs-volume-panel").click(function () {
|
$("#mainVideo .vjs-volume-panel").click(function () {
|
||||||
console.log("remove unmute tooltip");
|
console.log("remove unmute tooltip");
|
||||||
|
@ -1403,7 +1403,7 @@ function avideoTooltip(selector, text) {
|
||||||
$(selector).attr('title', text);
|
$(selector).attr('title', text);
|
||||||
$(selector).attr('data-toggle', 'tooltip');
|
$(selector).attr('data-toggle', 'tooltip');
|
||||||
$(selector).attr('data-original-title', text);
|
$(selector).attr('data-original-title', text);
|
||||||
$(selector).tooltip();
|
$(selector).tooltip({html:true});
|
||||||
}
|
}
|
||||||
|
|
||||||
function fixAdSize() {
|
function fixAdSize() {
|
||||||
|
@ -1949,7 +1949,7 @@ async function setToolTips() {
|
||||||
if (!$('[data-toggle="tooltip"]').not('.alreadyTooltip').length) {
|
if (!$('[data-toggle="tooltip"]').not('.alreadyTooltip').length) {
|
||||||
return false;
|
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 () {
|
$('[data-toggle="tooltip"]').not('.alreadyTooltip').on('click', function () {
|
||||||
var t = this;
|
var t = this;
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|
|
@ -524,7 +524,7 @@ $uuidJSCondition = implode(" && ", $rowId);
|
||||||
}).on("loaded.rs.jquery.bootgrid", function () {
|
}).on("loaded.rs.jquery.bootgrid", function () {
|
||||||
$('[data-toggle="tooltip"], .tooltip').tooltip("hide");
|
$('[data-toggle="tooltip"], .tooltip').tooltip("hide");
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
|
$('[data-toggle="tooltip"]').tooltip({container: 'body',html:true});
|
||||||
},500);
|
},500);
|
||||||
/* Executes after data is loaded and rendered */
|
/* Executes after data is loaded and rendered */
|
||||||
grid.find(".pluginSwitch").on("change", function (e) {
|
grid.find(".pluginSwitch").on("change", function (e) {
|
||||||
|
|
|
@ -39,6 +39,9 @@ foreach ($tags as $value) {
|
||||||
if (User::isLogged()) {
|
if (User::isLogged()) {
|
||||||
$user = new User("");
|
$user = new User("");
|
||||||
$user->loadSelfUser();
|
$user->loadSelfUser();
|
||||||
|
if (!empty($_REQUEST['basicInfoOnly'])) {
|
||||||
|
include $global['systemRootPath'] . './view/userBasicInfo.php';
|
||||||
|
} else {
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div>
|
<div>
|
||||||
|
@ -80,6 +83,7 @@ foreach ($tags as $value) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
include $global['systemRootPath'] . './view/userLogin.php';
|
include $global['systemRootPath'] . './view/userLogin.php';
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,7 +256,7 @@
|
||||||
"about": $('#textAbout').val(),
|
"about": $('#textAbout').val(),
|
||||||
"channelName": $('#channelName').val(),
|
"channelName": $('#channelName').val(),
|
||||||
"donationLink": $('#donationLink').val(),
|
"donationLink": $('#donationLink').val(),
|
||||||
"analyticsCode": $('#analyticsCode').val()
|
"analyticsCode": $('#analyticsCode').val(),
|
||||||
},
|
},
|
||||||
type: 'post',
|
type: 'post',
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
|
@ -270,7 +270,7 @@
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo $global['webSiteRootURL']; ?>objects/userSavePhoto.php",
|
url: "<?php echo $global['webSiteRootURL']; ?>objects/userSavePhoto.php",
|
||||||
data: {
|
data: {
|
||||||
imgBase64: resp
|
imgBase64: resp,
|
||||||
},
|
},
|
||||||
success: function (response) {
|
success: function (response) {
|
||||||
modal.hidePleaseWait();
|
modal.hidePleaseWait();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue