Adding refresh button files
This commit is contained in:
parent
d2cda28761
commit
e8456c7ce5
@ -0,0 +1,7 @@
|
||||
package org.bigbluebutton.clientcheck.view.mainview
|
||||
{
|
||||
public interface IRefreshButton
|
||||
{
|
||||
function dispose(): void;
|
||||
}
|
||||
}
|
@ -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
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user