clipbucket/upload/styles/cbv3/layout/functions_admin.js
Arslan Hassan 43cbad25be Added : Video Menu
Added : Watch later and other Built-in Playlists for users
Updated : Processing Thumb on Ruman's Request
Added : Admin controls on front-end to moderate video easily
Updated  : video block design
Added :  functions_admin.js
2012-12-27 15:16:44 +00:00

56 lines
No EOL
1.4 KiB
JavaScript

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
var admin_ajax_url = baseurl+"/admin_area/ajax/";
amplify.request.define( "admin_video", "ajax", {
url: admin_ajax_url+"/videos.php",
type: "POST",
dataType: "json",
decoder: function( data, status, xhr, success, error ) {
if ( status === "success" ) {
success( data );
} else {
error( data );
}
}
});
function video_action(vid,action)
{
var mode='';
if(action=='activate')
{
$('#video-active-'+vid)
.addClass('label-success')
.removeClass('label-important')
.text('Active');
mode ='activate_video';
$('#video-menu-'+vid+' li[data-key=deactivate]').show();
$('#video-menu-'+vid+' li[data-key=activate]').hide();
}
if(action=='deactivate')
{
$('#video-active-'+vid)
.removeClass('label-success')
.addClass('label-important')
.text('Inactive');
mode ='deactivate_video';
$('#video-menu-'+vid+' li[data-key=deactivate]').hide();
$('#video-menu-'+vid+' li[data-key=activate]').show();
}
amplify.request('admin_video',{
mode : mode,
videoid : vid
},function(data){ /** Add more stuff here **/ });
return true;
}