From f0c3916b97d9855b30129076651739d4280e6d39 Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Thu, 23 Jan 2014 12:11:50 +0200 Subject: [PATCH] Fix video code duplication. rangeParams returned from getRangeParams() function is already an object that contains the left and width properties. It can be passed directly to the jQuery css() function. --- .../xmodule/js/src/video/06_video_progress_slider.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js b/common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js index 6bc00de4ca..bd9c71e623 100644 --- a/common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js +++ b/common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js @@ -156,19 +156,13 @@ function () { 'ui-widget-header ' + 'ui-corner-all ' + 'slider-range' - }).css({ - left: rangeParams.left, - width: rangeParams.width - }); + }).css(rangeParams); this.videoProgressSlider.sliderProgress .after(this.videoProgressSlider.sliderRange); } else { this.videoProgressSlider.sliderRange - .css({ - left: rangeParams.left, - width: rangeParams.width - }); + .css(rangeParams); } }