forked from bigbluebutton/bigbluebutton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2cda28
commit e8456c7
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
labs/bbb-client-check/src/org/bigbluebutton/clientcheck/view/mainview/IRefreshButton.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.bigbluebutton.clientcheck.view.mainview | ||
{ | ||
public interface IRefreshButton | ||
{ | ||
function dispose(): void; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
labs/bbb-client-check/src/org/bigbluebutton/clientcheck/view/mainview/RefreshButton.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.bigbluebutton.clientcheck.view.mainview | ||
{ | ||
import spark.components.Button; | ||
|
||
public class RefreshButton extends Button implements IRefreshButton | ||
{ | ||
public function RefreshButton() | ||
{ | ||
super(); | ||
} | ||
|
||
public function dispose():void | ||
{ | ||
|
||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
labs/bbb-client-check/src/org/bigbluebutton/clientcheck/view/mainview/RefreshButtonConfig.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.bigbluebutton.clientcheck.view.mainview | ||
{ | ||
import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap; | ||
import robotlegs.bender.framework.api.IConfig; | ||
import robotlegs.bender.framework.api.IInjector; | ||
|
||
public class RefreshButtonConfig implements IConfig | ||
{ | ||
[Inject] | ||
public var injector:IInjector; | ||
|
||
[Inject] | ||
public var mediatorMap:IMediatorMap; | ||
|
||
public function configure():void | ||
{ | ||
configureMediators(); | ||
} | ||
|
||
private function configureMediators():void | ||
{ | ||
mediatorMap.map(IRefreshButton).toMediator(RefreshButtonMediator); | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...bbb-client-check/src/org/bigbluebutton/clientcheck/view/mainview/RefreshButtonMediator.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.bigbluebutton.clientcheck.view.mainview | ||
{ | ||
import flash.events.MouseEvent; | ||
import flash.external.ExternalInterface; | ||
import flash.net.URLRequest; | ||
import flash.net.navigateToURL; | ||
|
||
import robotlegs.bender.bundles.mvcs.Mediator; | ||
|
||
public class RefreshButtonMediator extends Mediator | ||
{ | ||
[Inject] | ||
public var view: IRefreshButton; | ||
|
||
/** | ||
* Initialize listener | ||
*/ | ||
override public function initialize():void | ||
{ | ||
(view as RefreshButton).addEventListener(MouseEvent.CLICK, mouseClickHandler); | ||
} | ||
|
||
/** | ||
* Handle events to refresh web page | ||
*/ | ||
private function mouseClickHandler(e:MouseEvent):void | ||
{ | ||
var pageURL:String = ExternalInterface.call('window.location.href.toString'); | ||
navigateToURL(new URLRequest(pageURL), "_self"); | ||
} | ||
} | ||
} |