MDL-23870: Replace flash and mp3 multimedia filter with flowplayer.
This commit is contained in:
+79
-10
@@ -960,7 +960,7 @@ function openpopup(event, args) {
|
||||
event.returnValue = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var fullurl = args.url;
|
||||
if (!args.url.match(/https?:\/\//)) {
|
||||
fullurl = M.cfg.wwwroot + args.url;
|
||||
@@ -974,7 +974,7 @@ function openpopup(event, args) {
|
||||
windowobj.resizeTo(screen.availWidth,screen.availHeight);
|
||||
}
|
||||
windowobj.focus();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1176,21 +1176,21 @@ M.util.help_icon = {
|
||||
headerContent: closebtn,
|
||||
bodyContent: '',
|
||||
id: 'helppopupbox',
|
||||
width:'400px',
|
||||
width:'400px',
|
||||
visible : false,
|
||||
constrain : true
|
||||
constrain : true
|
||||
});
|
||||
this.overlay.render(Y.one(document.body));
|
||||
|
||||
closebtn.on('click', this.overlay.hide, this.overlay);
|
||||
|
||||
|
||||
var boundingBox = this.overlay.get("boundingBox");
|
||||
|
||||
// Hide the menu if the user clicks outside of its content
|
||||
boundingBox.get("ownerDocument").on("mousedown", function (event) {
|
||||
var oTarget = event.target;
|
||||
var menuButton = Y.one("#"+args.id);
|
||||
|
||||
|
||||
if (!oTarget.compareTo(menuButton) &&
|
||||
!menuButton.contains(oTarget) &&
|
||||
!oTarget.compareTo(boundingBox) &&
|
||||
@@ -1261,8 +1261,8 @@ M.util.help_icon = {
|
||||
M.util.help_icon.instance.display(event, args);
|
||||
}
|
||||
},
|
||||
init : function(Y) {
|
||||
this.Y = Y;
|
||||
init : function(Y) {
|
||||
this.Y = Y;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1273,7 +1273,7 @@ M.core_custom_menu = {
|
||||
/**
|
||||
* This method is used to initialise a custom menu given the id that belongs
|
||||
* to the custom menu's root node.
|
||||
*
|
||||
*
|
||||
* @param {YUI} Y
|
||||
* @param {string} nodeid
|
||||
*/
|
||||
@@ -1340,7 +1340,7 @@ M.form.init_smartselect = function(Y, id, options) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Display a loading message first up
|
||||
this.nodes.select = nodes.select;
|
||||
|
||||
@@ -1501,4 +1501,73 @@ M.form.init_smartselect = function(Y, id, options) {
|
||||
}
|
||||
smartselect.init(Y, id, options, {select:select});
|
||||
});
|
||||
}
|
||||
|
||||
M.util.init_flvflowplayer = function (id, playerpath, fileurl) {
|
||||
$f(id, playerpath, {
|
||||
plugins: {
|
||||
controls: {
|
||||
autoHide: true
|
||||
}
|
||||
},
|
||||
clip: {
|
||||
url: fileurl,
|
||||
autoPlay: false,
|
||||
autoBuffering: true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
M.util.init_mp3flowplayer = function (id, playerpath, audioplayerpath, fileurl, color) {
|
||||
|
||||
$f(id, playerpath, {
|
||||
|
||||
plugins: {
|
||||
controls: {
|
||||
fullscreen: false,
|
||||
height: 25,
|
||||
autoHide: false,
|
||||
background: '#'+color['bgColour'],
|
||||
buttonColor: '#'+color['btnColour'],
|
||||
sliderColor: '#'+color['handleColour'],
|
||||
volumeSliderColor: '#'+color['handleColour'],
|
||||
volumeColor: '#'+color['trackColour'],
|
||||
durationColor: '#'+color['fontColour'],
|
||||
buttonOverColor: '#'+color['iconOverColour'],
|
||||
progressColor: '#'+color['handleColour']
|
||||
},
|
||||
audio: {url: audioplayerpath}
|
||||
},
|
||||
clip: { url: fileurl,
|
||||
provider: "audio",
|
||||
autoPlay: false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
M.util.init_mp3flowplayerplugin = function (id, playerpath, audioplayerpath, fileurl, color) {
|
||||
$f(id, playerpath, {
|
||||
plugins: {
|
||||
controls: {
|
||||
all: false,
|
||||
play: true,
|
||||
pause: true,
|
||||
scrubber: true,
|
||||
autoHide: false,
|
||||
height: 15,
|
||||
background: '#'+color['bgColour'],
|
||||
buttonColor: '#'+color['btnColour'],
|
||||
sliderColor: '#'+color['handleColour'],
|
||||
volumeSliderColor: '#'+color['handleColour'],
|
||||
progressColor: '#'+color['handleColour'],
|
||||
volumeColor: '#'+color['trackColour'],
|
||||
buttonOverColor: '#'+color['iconOverColour']
|
||||
},
|
||||
audio: {url: audioplayerpath}
|
||||
},
|
||||
clip: { url: fileurl,
|
||||
provider: "audio",
|
||||
autoPlay: false
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user