Skip to content

Commit 50d5c54

Browse files
onStart method & immediately display progress bar
* ADDED: onStart method to BackgroundTaskViewBridge * ADDED: OnStart client event raised after onStart is called in BackgroundTaskViewBridge * UPDATED: onStart in BackgroundTaskProgressViewBridge: Immediately display progress at 0% with text "Please Wait ..."
1 parent f804cb7 commit 50d5c54

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change log
2-
### 2.0
2+
3+
### 2.0.1
4+
5+
* ADDED: onStart method to BackgroundTaskViewBridge
6+
* ADDED: OnStart client event raised after onStart is called in BackgroundTaskViewBridge
7+
* UPDATED: onStart in BackgroundTaskProgressViewBridge: Immediately display progress at 0% with text "Please Wait ..."
8+
9+
### 2.0.0
310

411
* CHANGED: Moved to using ajax trigger with JSON streaming instead of process forking.
512

src/Leaves/BackgroundTaskProgressViewBridge.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ bridge.prototype.onReady = function ()
1313
this.messageNode = this.viewNode.querySelector( '.message' );
1414
};
1515

16+
bridge.prototype.onStart = function()
17+
{
18+
this.viewNode.style.display = 'block';
19+
20+
this.progressNode.style.width = "0%";
21+
this.messageNode.innerHTML = 'Please wait...';
22+
};
23+
1624
bridge.prototype.onProgressReported = function(progress)
1725
{
1826
this.viewNode.style.display = 'block';

src/Leaves/BackgroundTaskViewBridge.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ bridge.prototype.onComplete = function (result) {
1414
bridge.prototype.onFailed = function () {
1515
};
1616

17+
bridge.prototype.onStart = function () {
18+
};
19+
1720
bridge.prototype.start = function(){
1821

22+
this.onStart();
23+
this.raiseClientEvent("OnStart");
24+
1925
var argumentsArray = [];
2026

2127
// Get the arguments into a proper array while stripping any closure found to become a callback.

0 commit comments

Comments
 (0)