Skip to content

Commit

Permalink
Adding refresh button files
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobmarin committed Nov 13, 2014
1 parent d2cda28 commit e8456c7
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
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;
}
}
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
{

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

0 comments on commit e8456c7

Please sign in to comment.