Permalink
Browse files

MDL-41050 Progress bar: Width parameter does not work

  • Loading branch information...
1 parent 3155dcf commit 1a9dc90313bc49dd79989977d9cba85c64cb966d @sammarshallou sammarshallou committed with Sam Hemelryk Aug 6, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/weblib.php
View
@@ -3042,11 +3042,12 @@ public function create() {
if (CLI_SCRIPT) {
return; // temporary solution for cli scripts
}
+ $widthplusborder = $this->width + 2;
$htmlcode = <<<EOT
- <div style="text-align:center;width:{$this->width}px;clear:both;padding:0;margin:0 auto;">
+ <div style="text-align:center;width:{$widthplusborder}px;clear:both;padding:0;margin:0 auto;">
<h2 id="status_{$this->html_id}" style="text-align: center;margin:0 auto"></h2>
<p id="time_{$this->html_id}"></p>
- <div id="bar_{$this->html_id}" style="border-style:solid;border-width:1px;width:500px;height:50px;">
+ <div id="bar_{$this->html_id}" style="border-style:solid;border-width:1px;width:{$this->width}px;height:50px;">
<div id="progress_{$this->html_id}"
style="text-align:center;background:#FFCC66;width:4px;border:1px
solid gray;height:38px; padding-top:10px;">&nbsp;<span id="pt_{$this->html_id}"></span>

0 comments on commit 1a9dc90

Please sign in to comment.