Merge branch '2.1.x' into devel
Conflicts: airtime_mvc/application/controllers/ApiController.php airtime_mvc/application/controllers/LibraryController.php airtime_mvc/application/controllers/PlaylistController.php airtime_mvc/application/models/Playlist.php python_apps/media-monitor/airtimefilemonitor/airtimemediamonitorbootstrap.py python_apps/media-monitor/airtimefilemonitor/airtimemetadata.py
This commit is contained in:
commit
4ebcb1b1f9
23 changed files with 233 additions and 124 deletions
|
@ -118,6 +118,14 @@ function stringToColor(s)
|
|||
return intToRGB(hashCode(s));
|
||||
}
|
||||
|
||||
function getContrastYIQ(hexcolor){
|
||||
var r = parseInt(hexcolor.substr(0,2),16);
|
||||
var g = parseInt(hexcolor.substr(2,2),16);
|
||||
var b = parseInt(hexcolor.substr(4,2),16);
|
||||
var yiq = ((r*299)+(g*587)+(b*114))/1000;
|
||||
return (yiq >= 128) ? '000000' : 'ffffff';
|
||||
}
|
||||
|
||||
|
||||
function setAddShowEvents() {
|
||||
|
||||
|
@ -578,9 +586,11 @@ function setAddShowEvents() {
|
|||
}
|
||||
|
||||
var bgColorEle = $("#add_show_background_color");
|
||||
var textColorEle = $("#add_show_color");
|
||||
$('#add_show_name').bind('input', 'change', function(){
|
||||
var colorCode = stringToColor($(this).val());
|
||||
bgColorEle.val(colorCode);
|
||||
textColorEle.val(getContrastYIQ(colorCode));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ function findViewportDimensions() {
|
|||
|
||||
return {
|
||||
width: viewportwidth,
|
||||
height: viewportheight
|
||||
height: viewportheight-45
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1136,13 +1136,11 @@ var AIRTIME = (function(AIRTIME){
|
|||
if (oItems.del !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
if (confirm("Delete selected item?")) {
|
||||
AIRTIME.showbuilder.fnRemove([{
|
||||
id: data.id,
|
||||
timestamp: data.timestamp,
|
||||
instance: data.instance
|
||||
}]);
|
||||
}
|
||||
AIRTIME.showbuilder.fnRemove([{
|
||||
id: data.id,
|
||||
timestamp: data.timestamp,
|
||||
instance: data.instance
|
||||
}]);
|
||||
};
|
||||
|
||||
oItems.del.callback = callback;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue