mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 10:19:24 +02:00
Add option to swap video content.
Basically it changes the filename of 2 videos.
This commit is contained in:
parent
08b49d1601
commit
3693b8ecaa
18 changed files with 423 additions and 80 deletions
|
@ -73,7 +73,7 @@ abstract class ObjectYPT implements ObjectInterface {
|
|||
//current=1&rowCount=10&sort[sender]=asc&searchPhrase=
|
||||
global $global;
|
||||
if (!static::isTableInstalled()) {
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
$sql = "SELECT id FROM " . static::getTableName() . " WHERE 1=1 ";
|
||||
$sql .= self::getSqlSearchFromPost();
|
||||
|
|
|
@ -2497,7 +2497,7 @@ function get_browser_name($user_agent = "") {
|
|||
strpos($t, 'bot') || strpos($t, 'archive') ||
|
||||
strpos($t, 'info') || strpos($t, 'data'))
|
||||
return '[Bot] Other';
|
||||
_error_log($t);
|
||||
_error_log("Unknow user agent ($t)");
|
||||
return 'Other (Unknown)';
|
||||
}
|
||||
|
||||
|
|
|
@ -1301,11 +1301,19 @@ if (typeof gtag !== \"function\") {
|
|||
return $this->recoverPass;
|
||||
}
|
||||
|
||||
static function canUpload() {
|
||||
global $global, $config;
|
||||
static function canUpload($doNotCheckPlugins=false) {
|
||||
global $global, $config, $advancedCustomUser;
|
||||
if (User::isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
if(empty($doNotCheckPlugins) && !AVideoPlugin::userCanUpload(User::getId())){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isset($advancedCustomUser->onlyVerifiedEmailCanUpload) && $advancedCustomUser->onlyVerifiedEmailCanUpload && !User::isVerified()){
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($config->getAuthCanUploadVideos()) {
|
||||
return self::isLogged();
|
||||
}
|
||||
|
|
|
@ -2303,8 +2303,8 @@ if (!class_exists('Video')) {
|
|||
$this->title = substr($this->title, 0, 187) . '...';
|
||||
}
|
||||
|
||||
function setFilename($filename) {
|
||||
if (empty($this->filename)) {
|
||||
function setFilename($filename, $force=false) {
|
||||
if ($force || empty($this->filename)) {
|
||||
$this->filename = $filename;
|
||||
}
|
||||
return $this->filename;
|
||||
|
|
52
objects/videoSwap.json.php
Normal file
52
objects/videoSwap.json.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
global $global, $config;
|
||||
if (!isset($global['systemRootPath'])) {
|
||||
require_once '../videos/configuration.php';
|
||||
}
|
||||
|
||||
$obj = new stdClass();
|
||||
$obj->msg = "";
|
||||
$obj->error = true;
|
||||
|
||||
|
||||
if (!User::canUpload()) {
|
||||
$obj->msg = __("Permission denied");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
|
||||
if (empty($_POST['videos_id_1']) || empty($_POST['videos_id_2'])) {
|
||||
$obj->msg = __("Mou MUST select 2 videos to swap");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
|
||||
$video1 = new Video("", "", $_POST['videos_id_1']);
|
||||
if (!$video1->userCanManageVideo()) {
|
||||
$obj->msg = __("You can not Manage This Video 1");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
|
||||
$video2 = new Video("", "", $_POST['videos_id_2']);
|
||||
if (!$video2->userCanManageVideo()) {
|
||||
$obj->msg = __("You can not Manage This Video 2");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
|
||||
$video1Filename = $video1->getFilename();
|
||||
$video2Filename = $video2->getFilename();
|
||||
|
||||
$video1->setFilename($video2Filename, true);
|
||||
$video2->setFilename($video1Filename, true);
|
||||
$global['mysqli']->autocommit(false);
|
||||
if(!$video1->save()){
|
||||
$obj->msg = __("Error on save video 1");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
if(!$video2->save()){
|
||||
$obj->msg = __("Error on save video 2");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
$global['mysqli']->commit();
|
||||
$obj->error = false;
|
||||
die(json_encode($obj));
|
|
@ -858,6 +858,34 @@ class AVideoPlugin {
|
|||
return $array;
|
||||
}
|
||||
|
||||
public static function userCanUpload($users_id){
|
||||
if(empty($users_id)){
|
||||
return false;
|
||||
}
|
||||
$resp = true;
|
||||
$plugins = Plugin::getAllEnabled();
|
||||
foreach ($plugins as $value) {
|
||||
self::YPTstart();
|
||||
$p = static::loadPlugin($value['dirName']);
|
||||
if (is_object($p)) {
|
||||
$can = $p->userCanUpload($users_id);
|
||||
if(!empty($can)){
|
||||
if($can < 0){
|
||||
_error_log("userCanUpload: DENIED The plugin {$value['dirName']} said the user ({$users_id}) can NOT upload a video ");
|
||||
|
||||
$resp = false;
|
||||
}
|
||||
if($can>0){
|
||||
_error_log("userCanUpload: SUCCESS The plugin {$value['dirName']} said the user ({$users_id}) can upload a video ");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
self::YPTend("{$value['dirName']}::".__FUNCTION__);
|
||||
}
|
||||
return $resp;
|
||||
}
|
||||
|
||||
public static function userCanWatchVideo($users_id, $videos_id){
|
||||
$plugins = Plugin::getAllEnabled();
|
||||
$resp = Video::userGroupAndVideoGroupMatch($users_id, $videos_id);;
|
||||
|
|
|
@ -37,6 +37,7 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
$obj->encoderNetworkLabel = "";
|
||||
$obj->doNotShowUploadMP4Button = true;
|
||||
$obj->disablePDFUpload = false;
|
||||
$obj->disableMP4Upload = false;
|
||||
$obj->uploadMP4ButtonLabel = "";
|
||||
$obj->doNotShowImportMP4Button = true;
|
||||
$obj->importMP4ButtonLabel = "";
|
||||
|
@ -110,6 +111,7 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
$obj->doNotDisplayGroupsTags = false;
|
||||
$obj->doNotDisplayPluginsTags = false;
|
||||
$obj->showNotRatedLabel = false;
|
||||
$obj->showShareMenuOpenByDefault = false;
|
||||
$obj->askRRatingConfirmationBeforePlay_G = false;
|
||||
$obj->askRRatingConfirmationBeforePlay_PG = false;
|
||||
$obj->askRRatingConfirmationBeforePlay_PG13 = false;
|
||||
|
@ -144,6 +146,7 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
$obj->enableOldPassHashCheck = true;
|
||||
$obj->disableHTMLDescription = false;
|
||||
$obj->disableTopMenusInsideIframe = true;
|
||||
$obj->disableVideoSwap = false;
|
||||
|
||||
return $obj;
|
||||
}
|
||||
|
|
|
@ -342,6 +342,15 @@ abstract class PluginAbstract {
|
|||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type $users_id
|
||||
* @return 0 = I dont know, -1 = can not upload, 1 = can upload
|
||||
*/
|
||||
public function userCanUpload($users_id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type $users_id
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# How to become a contributor and submit your own code
|
||||
|
||||
## Contributor License Agreements
|
||||
|
||||
We'd love to accept your code patches! However, before we can take them, we have to jump a couple of legal hurdles.
|
||||
|
||||
Please fill out either the individual or corporate Contributor License Agreement (CLA).
|
||||
|
||||
* If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](http://code.google.com/legal/individual-cla-v1.0.html).
|
||||
* If you work for a company that wants to allow you to contribute your work to this client library, then you'll need to sign a[corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html).
|
||||
|
||||
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll add you to the official list of contributors and be able to accept your patches.
|
||||
|
||||
## Submitting Patches
|
||||
|
||||
1. Fork the PHP client library on GitHub
|
||||
1. Decide which code you want to submit. A submission should be a set of changes that addresses one issue in the issue tracker. Please file one change per issue, and address one issue per change. If you want to make a change that doesn't have a corresponding issue in the issue tracker, please file a new ticket!
|
||||
1. Ensure that your code adheres to standard PHP conventions, as used in the rest of the library.
|
||||
1. Ensure that there are unit tests for your code.
|
||||
1. Sign a Contributor License Agreement (see above).
|
||||
1. Submit a pull request with your patch on Github.
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/*
|
||||
* Copyright 2016 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
|
||||
class Google_Service_AndroidPublisher_InappproductsBatchResponse extends Google_Collection
|
||||
{
|
||||
protected $collection_key = 'entrys';
|
||||
protected $entrysType = 'Google_Service_AndroidPublisher_InappproductsBatchResponseEntry';
|
||||
protected $entrysDataType = 'array';
|
||||
public $kind;
|
||||
|
||||
public function setEntrys($entrys)
|
||||
{
|
||||
$this->entrys = $entrys;
|
||||
}
|
||||
public function getEntrys()
|
||||
{
|
||||
return $this->entrys;
|
||||
}
|
||||
public function setKind($kind)
|
||||
{
|
||||
$this->kind = $kind;
|
||||
}
|
||||
public function getKind()
|
||||
{
|
||||
return $this->kind;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
/*
|
||||
* Copyright 2016 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
|
||||
class Google_Service_ServiceManagement_MediaUpload extends Google_Model
|
||||
{
|
||||
public $enabled;
|
||||
public $uploadService;
|
||||
|
||||
public function setEnabled($enabled)
|
||||
{
|
||||
$this->enabled = $enabled;
|
||||
}
|
||||
public function getEnabled()
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
public function setUploadService($uploadService)
|
||||
{
|
||||
$this->uploadService = $uploadService;
|
||||
}
|
||||
public function getUploadService()
|
||||
{
|
||||
return $this->uploadService;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
/*
|
||||
* Copyright 2016 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations under
|
||||
* the License.
|
||||
*/
|
||||
|
||||
class Google_Service_ServiceManagement_Rule extends Google_Collection
|
||||
{
|
||||
protected $collection_key = 'permissions';
|
||||
public $action;
|
||||
protected $conditionsType = 'Google_Service_ServiceManagement_Condition';
|
||||
protected $conditionsDataType = 'array';
|
||||
public $description;
|
||||
public $in;
|
||||
protected $logConfigType = 'Google_Service_ServiceManagement_LogConfig';
|
||||
protected $logConfigDataType = 'array';
|
||||
public $notIn;
|
||||
public $permissions;
|
||||
|
||||
public function setAction($action)
|
||||
{
|
||||
$this->action = $action;
|
||||
}
|
||||
public function getAction()
|
||||
{
|
||||
return $this->action;
|
||||
}
|
||||
public function setConditions($conditions)
|
||||
{
|
||||
$this->conditions = $conditions;
|
||||
}
|
||||
public function getConditions()
|
||||
{
|
||||
return $this->conditions;
|
||||
}
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
public function setIn($in)
|
||||
{
|
||||
$this->in = $in;
|
||||
}
|
||||
public function getIn()
|
||||
{
|
||||
return $this->in;
|
||||
}
|
||||
public function setLogConfig($logConfig)
|
||||
{
|
||||
$this->logConfig = $logConfig;
|
||||
}
|
||||
public function getLogConfig()
|
||||
{
|
||||
return $this->logConfig;
|
||||
}
|
||||
public function setNotIn($notIn)
|
||||
{
|
||||
$this->notIn = $notIn;
|
||||
}
|
||||
public function getNotIn()
|
||||
{
|
||||
return $this->notIn;
|
||||
}
|
||||
public function setPermissions($permissions)
|
||||
{
|
||||
$this->permissions = $permissions;
|
||||
}
|
||||
public function getPermissions()
|
||||
{
|
||||
return $this->permissions;
|
||||
}
|
||||
}
|
|
@ -6,9 +6,15 @@ $extraPluginFile = $global['systemRootPath'] . 'plugin/Customize/Objects/ExtraCo
|
|||
|
||||
$custom = "";
|
||||
|
||||
if (file_exists($extraPluginFile) && AVideoPlugin::isEnabled("c4fe1b83-8f5a-4d1b-b912-172c608bf9e3")) {
|
||||
require_once $extraPluginFile;
|
||||
$ec = new ExtraConfig();
|
||||
$custom = $ec->getDescription();
|
||||
}
|
||||
|
||||
if (!empty($poster)) {
|
||||
$subTitle = str_replace(array('"', "\n", "\r"), array("", "", ""), strip_tags($video['description']));
|
||||
$custom .= " {$subTitle}";
|
||||
$custom = "{$subTitle} - {$video["category"]}";
|
||||
}
|
||||
|
||||
if (!empty($_GET['catName'])) {
|
||||
|
@ -17,11 +23,6 @@ if (!empty($_GET['catName'])) {
|
|||
$custom = " {$description} - {$custom}";
|
||||
}
|
||||
|
||||
if (file_exists($extraPluginFile) && AVideoPlugin::isEnabled("c4fe1b83-8f5a-4d1b-b912-172c608bf9e3")) {
|
||||
require_once $extraPluginFile;
|
||||
$ec = new ExtraConfig();
|
||||
$custom .= $ec->getDescription();
|
||||
}
|
||||
|
||||
$theme = $config->getTheme();
|
||||
?>
|
||||
|
|
|
@ -520,7 +520,7 @@ if (((empty($advancedCustomUser->userMustBeLoggedIn) && empty($advancedCustom->d
|
|||
</li>
|
||||
|
||||
<?php
|
||||
if (User::canUpload()) {
|
||||
if (User::canUpload(true)) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>mvideos">
|
||||
|
|
|
@ -551,3 +551,12 @@ function playerPlay(currentTime) {
|
|||
console.log("playerPlay: Player is Undefined");
|
||||
}
|
||||
}
|
||||
|
||||
function formatBytes(bytes,decimals) {
|
||||
if(bytes == 0) return '0 Bytes';
|
||||
var k = 1024,
|
||||
dm = decimals <= 0 ? 0 : decimals || 2,
|
||||
sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
||||
i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||
}
|
|
@ -11,7 +11,7 @@ if(!User::isLogged()) {
|
|||
exit;
|
||||
}
|
||||
|
||||
if (!User::canUpload()) {
|
||||
if (!User::canUpload(true)) {
|
||||
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not manage videos"));
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,9 @@
|
|||
array_multisort(array_column($categories, 'hierarchyAndName'), SORT_ASC, $categories);
|
||||
if (User::canUpload()) {
|
||||
if (empty($advancedCustom->doNotShowEncoderButton)) {
|
||||
if (!empty($config->getEncoderURL())) {}
|
||||
if (!empty($config->getEncoderURL())) {
|
||||
|
||||
}
|
||||
?>
|
||||
<form id="formEncoder" method="post" action="<?php echo $config->getEncoderURL(); ?>" target="encoder">
|
||||
<input type="hidden" name="webSiteRootURL" value="<?php echo $global['webSiteRootURL']; ?>" />
|
||||
|
@ -78,7 +80,6 @@
|
|||
<span class="fa fa-cog"></span> <?php echo __("Encode video and audio"); ?>
|
||||
</a>
|
||||
<?php
|
||||
|
||||
}
|
||||
if (empty($advancedCustom->doNotShowUploadMP4Button)) {
|
||||
?>
|
||||
|
@ -223,6 +224,13 @@
|
|||
</div>
|
||||
<?php
|
||||
}
|
||||
if (empty($advancedCustom->disableVideoSwap)) {
|
||||
?>
|
||||
<button class="btn btn-primary" id="swapBtn">
|
||||
<i class="fas fa-random"></i> <?php echo __('Swap Video File'); ?>
|
||||
</button>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<button class="btn btn-danger" id="deleteBtn">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i> <?php echo __('Delete'); ?>
|
||||
|
@ -718,14 +726,19 @@ if (empty($advancedCustom->disableHTMLDescription)) {
|
|||
});
|
||||
}
|
||||
|
||||
function changeStatus(status) {
|
||||
modal.showPleaseWait();
|
||||
function getSelectedVideos() {
|
||||
var vals = [];
|
||||
$(".checkboxVideo").each(function (index) {
|
||||
if ($(this).is(":checked")) {
|
||||
vals.push($(this).val());
|
||||
}
|
||||
});
|
||||
return vals;
|
||||
}
|
||||
|
||||
function changeStatus(status) {
|
||||
modal.showPleaseWait();
|
||||
var vals = getSelectedVideos();
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/videoStatus.json.php',
|
||||
data: {"id": vals, "status": status},
|
||||
|
@ -748,12 +761,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
|
|||
}
|
||||
function changeCategory(category_id) {
|
||||
modal.showPleaseWait();
|
||||
var vals = [];
|
||||
$(".checkboxVideo").each(function (index) {
|
||||
if ($(this).is(":checked")) {
|
||||
vals.push($(this).val());
|
||||
}
|
||||
});
|
||||
var vals = getSelectedVideos();
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/videoCategory.json.php',
|
||||
data: {"id": vals, "category_id": category_id},
|
||||
|
@ -780,12 +788,7 @@ if (empty($advancedCustomUser->userCanNotChangeUserGroup) || User::isAdmin()) {
|
|||
?>
|
||||
function userGroupSave(users_groups_id, add) {
|
||||
modal.showPleaseWait();
|
||||
var vals = [];
|
||||
$(".checkboxVideo").each(function (index) {
|
||||
if ($(this).is(":checked")) {
|
||||
vals.push($(this).val());
|
||||
}
|
||||
});
|
||||
var vals = getSelectedVideos();
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/userGroupSave.json.php',
|
||||
data: {"id": vals, "users_groups_id": users_groups_id, "add": add},
|
||||
|
@ -1614,12 +1617,7 @@ echo AVideoPlugin::getManagerVideosReset();
|
|||
<?php if (!$config->getDisable_youtubeupload()) { ?>
|
||||
$("#uploadYouTubeBtn").click(function () {
|
||||
modal.showPleaseWait();
|
||||
var vals = [];
|
||||
$(".checkboxVideo").each(function (index) {
|
||||
if ($(this).is(":checked")) {
|
||||
vals.push($(this).val());
|
||||
}
|
||||
});
|
||||
var vals = getSelectedVideos();
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/youtubeUpload.json.php',
|
||||
data: {"id": vals},
|
||||
|
@ -1659,15 +1657,55 @@ echo AVideoPlugin::getManagerVideosReset();
|
|||
function () {
|
||||
swal.close();
|
||||
modal.showPleaseWait();
|
||||
var vals = [];
|
||||
$(".checkboxVideo").each(function (index) {
|
||||
if ($(this).is(":checked")) {
|
||||
vals.push($(this).val());
|
||||
}
|
||||
});
|
||||
var vals = getSelectedVideos();
|
||||
deleteVideo(vals);
|
||||
});
|
||||
});
|
||||
<?php
|
||||
if (empty($advancedCustom->disableVideoSwap)) {
|
||||
?>
|
||||
|
||||
$("#swapBtn").click(function () {
|
||||
var vals = getSelectedVideos();
|
||||
if (vals.length !== 2) {
|
||||
swal({
|
||||
title: "<?php echo __("Sorry!"); ?>",
|
||||
text: "<?php echo __("Mou MUST select 2 videos to swap"); ?>",
|
||||
type: "error",
|
||||
html: true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
modal.showPleaseWait();
|
||||
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/videoSwap.json.php',
|
||||
data: {"users_id": <?php echo User::getId(); ?>, "videos_id_1": vals[0], "videos_id_2": vals[1]},
|
||||
type: 'post',
|
||||
success: function (response) {
|
||||
modal.hidePleaseWait();
|
||||
if (response.error) {
|
||||
swal({
|
||||
title: "<?php echo __("Sorry!"); ?>",
|
||||
text: response.error,
|
||||
type: "error",
|
||||
html: true
|
||||
});
|
||||
} else {
|
||||
swal({
|
||||
title: "<?php echo __("Success!"); ?>",
|
||||
text: "<?php echo __("Video Swaped!"); ?>",
|
||||
type: "success",
|
||||
html: true
|
||||
});
|
||||
$("#grid").bootgrid("reload");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
$('.datepicker').datetimepicker({
|
||||
format: 'yyyy-mm-dd hh:ii',
|
||||
autoclose: true
|
||||
|
|
|
@ -408,7 +408,13 @@ if (empty($video) && !empty($_GET['videos_id'])) {
|
|||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
<?php
|
||||
if(empty($advancedCustom->showShareMenuOpenByDefault)){
|
||||
?>
|
||||
$("#shareDiv").slideUp();
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
$("#shareBtn").click(function () {
|
||||
$(".menusDiv").not("#shareDiv").slideUp();
|
||||
$("#shareDiv").slideToggle();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue