From 993df89c979d8da28f76395d4711a145a54c0b5c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 14 Jan 2017 02:35:21 +0100 Subject: minor refactoring diff --git a/www/js/jingles.js b/www/js/jingles.js index 6b66ea4..6f4fb00 100644 --- a/www/js/jingles.js +++ b/www/js/jingles.js @@ -270,7 +270,7 @@ Rdxport.JingleCutView.prototype.render = function() { .append($('').append(status)) .append($('').text(this.model.name)) .append($('').text(this.model.description)) - .append($('').text(msToTimeString(this.model.length))) + .append($('').text(format_durationms(this.model.length))) .append($('').text(format_datetime(this.model.lastPlayDatetime))) .append( $('').addClass('text-center') diff --git a/www/js/musicpools.js b/www/js/musicpools.js index 383cf9e..7395ef6 100644 --- a/www/js/musicpools.js +++ b/www/js/musicpools.js @@ -268,7 +268,7 @@ Rdxport.MusicpoolCartView.prototype.render = function() { if (this.model.cuts.length > 0) { var cut = this.model.cuts[0]; - length = msToTimeString(Number(cut.length)); + length = format_durationms(Number(cut.length)); if (!isNaN(cut.originDatetime)) { imported = format_datetime(cut.originDatetime); } diff --git a/www/js/shows.js b/www/js/shows.js index 8a83057..b4687c3 100644 --- a/www/js/shows.js +++ b/www/js/shows.js @@ -370,7 +370,7 @@ Rdxport.ShowCartView.prototype.render = function() { var playCounter = '-'; var lastPlayDatetime = '-'; if (cut) { - length = msToTimeString(Number(cut.length)); + length = format_durationms(Number(cut.length)); originDatetime = format_datetime(cut.originDatetime); playCounter = cut.playCounter; lastPlayDatetime = format_datetime(cut.lastPlayDatetime); diff --git a/www/js/utils.js b/www/js/utils.js index c0b006e..6140254 100644 --- a/www/js/utils.js +++ b/www/js/utils.js @@ -81,7 +81,7 @@ function format_datetime(d) { return datetimestr; } -function msToTimeString(time) { +function format_durationms(time) { if(time == '-') return time; var h = Number(Math.floor(time / 3600000)); -- cgit v0.10.2