-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from iCAPLyon1/master
Fixed plugin for Claroline's v8
- Loading branch information
Showing
19 changed files
with
161 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* This file is part of the Claroline Connect package | ||
* | ||
* (c) Claroline Consortium <[email protected]> | ||
* | ||
* Author: Panagiotis TSAVDARIS | ||
* | ||
* Date: 10/24/16 | ||
*/ | ||
|
||
namespace Inwicast\ClarolinePluginBundle\Listener; | ||
|
||
use JMS\DiExtraBundle\Annotation as DI; | ||
use Claroline\CoreBundle\Event\OpenAdministrationToolEvent; | ||
use Claroline\CoreBundle\Listener\AdministrationToolListener as BaseAdministrationToolListener; | ||
|
||
/** | ||
* Class AdministrationToolListener | ||
* @package Inwicast\ClarolinePluginBundle\Listener | ||
* | ||
* @DI\Service() | ||
*/ | ||
class AdministrationToolListener extends BaseAdministrationToolListener | ||
{ | ||
/** | ||
* @DI\Observe("administration_tool_inwicast_configuration") | ||
* | ||
* @param OpenAdministrationToolEvent $event | ||
*/ | ||
public function onOpenInwicastConfiguration(OpenAdministrationToolEvent $event) | ||
{ | ||
$this->redirect(['_controller' => 'InwicastClarolinePluginBundle:Mediacenter:configure'], $event); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import $ from 'jquery' | ||
|
||
(function($){ | ||
window.select = function(mediaTitle, mediaNb, mediaRef) { | ||
$('#inwicast_widget_name').val(mediaTitle) | ||
$('#inwicast_widget_submit').prop("disabled", false) | ||
var items = $('#inwicast-items .thumbnail.item-selected') | ||
$(items).each(function (index, element) { | ||
$(element).removeClass('item-selected') | ||
}) | ||
$('#inwicast-items .thumbnail').eq(mediaNb).addClass('item-selected') | ||
} | ||
|
||
window.setDisplay = function(type) { | ||
if (type == 'grid') { | ||
$(".list-media").css("display", "none") | ||
$(".media").css("display", "block") | ||
$("#setList").removeClass("active") | ||
$("#setGrid").addClass("active") | ||
searchForMedia(null) | ||
} | ||
else if (type == 'list') { | ||
$(".media").css("display", "none") | ||
$(".list-media").css("display", "block") | ||
$("#setList").addClass("active") | ||
$("#setGrid").removeClass("active") | ||
searchForMedia(null) | ||
} | ||
} | ||
|
||
window.getSelectedMediaIframe = function() | ||
{ | ||
var selectedMedia = $("input:radio[name='media_ref']:checked") | ||
if (selectedMedia.length > 0) { | ||
var path = window.inwicastMediaViewPath | ||
path = path.replace("_mediaRef_", selectedMedia.val()) | ||
return "<iframe src='"+path+"' width='"+selectedMedia.data('width')+"' height='"+selectedMedia.data('height')+"' frameborder='0' scrolling='no' marginwidth='0' marginheight='0'></iframe>" | ||
} | ||
|
||
return "" | ||
} | ||
|
||
function searchForMedia(event) { | ||
if (event!=null) event.preventDefault(); | ||
// Get value from input | ||
var value = $("#search-inwicast").val(); | ||
|
||
// Don't search if input is empty... | ||
if (value != '') { | ||
// AJAX request | ||
$.ajax({ | ||
url: "{{ path('inwicast_mediacenter_user_videos_search') }}?keywords=" + value, | ||
cache: false | ||
}) | ||
.done(function (json) { | ||
// Hide all items | ||
$(".thumbnail").css("display", "none"); | ||
$(json.videos).each(function (index, element) { | ||
// Display element matching with search | ||
$("#thumb-"+element.mediaRef).css("display", "block") | ||
}); | ||
}); | ||
} | ||
// But display all items! | ||
else { | ||
$(".thumbnail").css("display", "block"); | ||
} | ||
} | ||
|
||
$("#search-inwicast").on("keypress", function(ev){ | ||
var keycode = (ev.keyCode ? ev.keyCode : ev.which) | ||
if (keycode == 13) { | ||
searchForMedia(ev) | ||
ev.preventDefault() | ||
} | ||
}) | ||
|
||
})($) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
inwicast_portal: 'Mediacenter' | ||
inwicast_portal: 'Mediacenter' | ||
inwicast_configuration: 'Inwicast configuration' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
inwicast_portal: 'Mediacenter' | ||
inwicast_portal: 'Mediacenter' | ||
inwicast_configuration: 'Configuración Inwicast' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
inwicast_portal: 'Accès Mediacenter' | ||
inwicast_portal: 'Accès Mediacenter' | ||
inwicast_configuration: 'Configuration inwicast' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.