From 0c7d39e7920d8cdf4b50dbe025486a5c2bcf472c Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Fri, 12 Sep 2008 03:22:20 +0000 Subject: [PATCH] API CHANGE Moved ProgressBar and support files to newsletter/trunk module, as this is the module where it's used git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@62309 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- css/ProgressBar.css | 23 ----------------- forms/ProgressBar.php | 19 -------------- javascript/ProgressBar.js | 53 --------------------------------------- templates/ProgressBar.ss | 10 -------- 4 files changed, 105 deletions(-) delete mode 100644 css/ProgressBar.css delete mode 100755 forms/ProgressBar.php delete mode 100755 javascript/ProgressBar.js delete mode 100755 templates/ProgressBar.ss diff --git a/css/ProgressBar.css b/css/ProgressBar.css deleted file mode 100644 index 4e57cf616..000000000 --- a/css/ProgressBar.css +++ /dev/null @@ -1,23 +0,0 @@ -div.ProgressBar { - text-align: center; - display: none; -} - - div.ProgressBar p.text { - text-align: center; - margin-left: auto; - margin-right: auto; - } - - div.ProgressBar div.BarHolder { - width: 100%; - border: solid 1px #777; - background-color: #FFF; - padding: 2px; - text-align: left; - } - - div.ProgressBar div.BarHolder div.Bar { - width: 0%; - background-color: #0074C6; - } \ No newline at end of file diff --git a/forms/ProgressBar.php b/forms/ProgressBar.php deleted file mode 100755 index bb3486f4c..000000000 --- a/forms/ProgressBar.php +++ /dev/null @@ -1,19 +0,0 @@ -renderWith('ProgressBar'); - } - -} -?> diff --git a/javascript/ProgressBar.js b/javascript/ProgressBar.js deleted file mode 100755 index aca3ed31b..000000000 --- a/javascript/ProgressBar.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Create a progress bar that can be updated clientside - * - */ -ProgressBar = Class.create(); -ProgressBar.applyTo('div.ProgressBar'); -ProgressBar.prototype = { - initialize: function() { - this.statusText = this.getElementsByTagName('p')[0]; - this.progressBar = this.getElementsByTagName('div')[0].getElementsByTagName('div')[0]; - this.progress = 0; - this.startTime = 0; - this.lastProgressUpdate = 0; - this.defaultText = this.statusText.innerHTML; - this.defaultDisplay = this.style.display; - }, - - setProgress: function( progress ) { - this.progress = progress; - this.progressBar.style.width = '' + parseInt( progress ) + '%'; - this.progressBar.width = '' + parseInt( progress ) + '%'; - var now = new Date(); - this.lastProgressUpdate = now.getTime(); - }, - - setText: function( text ) { - this.statusText.innerHTML = text; - }, - - reset: function() { - this.setProgress(0); - this.setText( this.defaultText ); - this.style.display = this.defaultDisplay; - }, - - estimateTime: function() { - var time = ( this.lastProgressUpdate - this.startTime ) * ( ( 100 - this.progress ) / this.progress ); - - if( time < 60000 ) - return Math.round( time / 1000 ) + ' seconds'; - - if( time < 3600000 ) - return Math.round( time / 60000 ) + ' minutes'; - - return Math.round( time / 3600000 ) + ' hours'; - }, - - start: function() { - var now = new Date(); - this.startTime = now.getTime(); - this.style.display = 'block'; - } -} \ No newline at end of file diff --git a/templates/ProgressBar.ss b/templates/ProgressBar.ss deleted file mode 100755 index 5db095545..000000000 --- a/templates/ProgressBar.ss +++ /dev/null @@ -1,10 +0,0 @@ -
-

- $Title -

-
-
-   -
-
-
\ No newline at end of file