@extends('BaseSistemaWeb') @section('CSS') {{ HTML::style('WebPro/plugins/bootstrap-fileupload/bootstrap-fileupload.min.css') }} {{ HTML::style('WebPro/plugins/dropzone/dropzone.css') }} {{-- HTML::style('VideoJS/video-js.css') --}} {{-- HTML::script('VideoJS/videojs-ie8.min.js') --}} @stop @section('Contenido')

Video Tutoriales

Editar video del módulo

{{ Form::open(array('route' => array('SysWebVTutorialesModulosVideosEditar', $Modulo->id), 'method' => 'post', 'class' => 'form-horizontal row-border', 'id' => 'frmEditar', 'files' => true, 'target' => 'upload_iframe')) }}
{{ Form::text('titulo', $Video->titulo, array('class' => 'form-control', 'placeholder' => '')) }}
{{ Form::textarea('descripcion', $Video->descripcion, array('class' => 'form-control', 'rows' => '6', 'id' => 'descripcion')) }}
{{ Form::text('ruta', $Video->ruta, array('class' => 'form-control', 'placeholder' => '')) }}
{{--
{{ Form::input('number', 'orden', '', array('class' => 'form-control', 'min' => '1', 'max' => '100')) }}
--}}
{{ Form::button('Editar', array('class' => 'btn btn-warning', 'id' => 'btnEditar', 'type' => 'submit')) }}
{{ Form::close() }}
@stop @section('JS') {{ HTML::script('WebPro/plugins/ckeditor-new/ckeditor.js') }} {{ HTML::script('WebPro/plugins/bootstrap-fileupload/bootstrap-fileupload.min.js') }} {{ HTML::script('WebPro/plugins/dropzone/dropzone.min.js') }} {{-- HTML::script('VideoJS/video.js') --}} @stop @section('JSOr') CKEDITOR.replace("descripcion", { language: "es", }); $("#frmEditar").submit(function(e){ e.preventDefault(); for(instance in CKEDITOR.instances){ CKEDITOR.instances[instance].updateElement(); } $("#btnEditar").prop("disabled", true).html(' Cargando'); var frmEditar = new FormData(document.getElementById("frmEditar")); if( $("#imagen").val() != "" ){ $("#imgimagen").show(); } $.ajax({ type: "POST", url: "{{ URL::route('SysWebVTutorialesModulosVideosEditar', array($Modulo->id, $Video->id)) }}", data: frmEditar, cache: false, contentType: false, processData: false, dataType: "json", success: function(data){ $("#btnEditar").prop("disabled", false).html("Editar"); $("#imgimagen").hide(); if(data.success){ new PNotify({ title: "Realizado", text: data.mensaje, type: "success" }); setTimeout( function(){ window.location.href = "{{ URL::route('SysWebVTutorialesModulosVideos', array($Modulo->id)) }}"; }, 3000 ); } else{ if(data.mensaje != ''){ new PNotify({ title: "Error", text: data.mensaje, type: "error" }); } $.each(data.errMensajes, function(key, value){ if(value != ''){ $("#err"+key).html(value); } else{ $("#err"+key).html(""); } }); } }, error: function(jqXHR, textStatus, errorThrown){ new PNotify({ title: "Error", text: textStatus + " " + errorThrown, type: "error" }); } }); }); @stop