Adding refresh button files

This commit is contained in:
Pedro Beschorner Marin 2014-11-13 15:48:40 -02:00
parent d2cda28761
commit e8456c7ce5
4 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,7 @@
package org.bigbluebutton.clientcheck.view.mainview
{
public interface IRefreshButton
{
function dispose(): void;
}
}

View File

@ -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
{
}
}
}

View File

@ -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);
}
}
}

View File

@ -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");
}
}
}