Usability Improvement

This commit is contained in:
Prav-Hugo 2012-09-13 15:14:39 -03:00
parent f7b9534974
commit 877286a116
5 changed files with 86 additions and 12 deletions

View File

@ -131,7 +131,8 @@ bbb.desktopView.fitToWindow = Fit to Window
bbb.desktopView.actualSize = Display actual size
bbb.toolbar.phone.toolTip.start = Share My Microphone
bbb.toolbar.phone.toolTip.stop = Stop Sharing My Microphone
bbb.toolbar.deskshare.toolTip = Share My Desktop
bbb.toolbar.deskshare.toolTip.start = Share My Desktop
bbb.toolbar.deskshare.toolTip.stop = Stop Sharing My Desktop
bbb.toolbar.video.toolTip.start = Share My Camera
bbb.toolbar.video.toolTip.stop = Stop Sharing My Camera
bbb.highlighter.toolbar.pencil = Highlighter

View File

@ -87,15 +87,17 @@ package org.bigbluebutton.modules.deskshare.managers
public function handleStartSharingEvent(autoStart:Boolean):void {
LogUtil.debug("DeskshareManager::handleStartSharingEvent");
toolbarButtonManager.disableToolbarButton();
//toolbarButtonManager.disableToolbarButton();
toolbarButtonManager.startedSharing();
publishWindowManager.startSharing(module.getCaptureServerUri(), module.getRoom(), autoStart);
sharing = true;
}
public function handleShareWindowCloseEvent():void {
toolbarButtonManager.enableToolbarButton();
//toolbarButtonManager.enableToolbarButton();
publishWindowManager.handleShareWindowCloseEvent();
sharing = false;
toolbarButtonManager.stopedSharing();
}
public function handleViewWindowCloseEvent():void {
@ -109,4 +111,4 @@ package org.bigbluebutton.modules.deskshare.managers
viewWindowManager.startViewing(module.getRoom(), videoWidth, videoHeight);
}
}
}
}

View File

@ -65,14 +65,22 @@ package org.bigbluebutton.modules.deskshare.managers
buttonShownOnToolbar = false;
}
}
//OLD - CAN BE DELETED
public function enableToolbarButton():void {
button.enabled = true;
button.stopDeskshare();
}
//OLD - CAN BE DELETED
public function disableToolbarButton():void {
button.enabled = false;
}
public function startedSharing():void {
button.deskshareStatus(button.START_SHARING);
}
public function stopedSharing():void {
button.deskshareStatus(button.STOP_SHARING);
}
}
}
}

View File

@ -39,6 +39,7 @@
<mate:Listener type="{ViewStreamEvent.STOP}" method="closePublishWindow" />
<mate:Listener type="{LocaleChangeEvent.LOCALE_CHANGED}" method="localeChanged" />
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;

View File

@ -25,6 +25,8 @@
icon="{deskShareIcon}"
toolTip="{ResourceUtil.getInstance().getString('bbb.toolbar.deskshare.toolTip')}"
click="startDeskShare()"
mouseOver = "mouseOverHandler(event)"
mouseOut = "mouseOutHandler(event)"
implements="org.bigbluebutton.common.IBbbToolbarComponent">
<mx:Script>
<![CDATA[
@ -33,21 +35,81 @@
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.views.MainToolbar;
import org.bigbluebutton.modules.deskshare.events.ShareEvent;
import org.bigbluebutton.modules.deskshare.events.ShareWindowEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
private var images:Images = new Images();
[Bindable] public var deskShareIcon:Class = images.deskShareIcon;
private function startDeskShare():void {
deskShareIcon = images.deskShareIcon;
this.enabled = false;
dispatchEvent(new ShareEvent(ShareEvent.START_SHARING));
}
public const OFF_STATE:Number = 0;
public const ON_STATE:Number = 1;
public const STOP_SHARING:Number = 0;
public const START_SHARING:Number = 1;
private var _currentState:Number = OFF_STATE;
public function deskshareStatus(status:Number):void {
if(status == START_SHARING) {
_currentState = ON_STATE;
this.selected = true;
this.enabled = true;
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.deskshare.toolTip.stop');
deskShareIcon = images.deskShareIconOn;
}
else {
_currentState = OFF_STATE;
this.selected = false;
this.enabled = true;
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.deskshare.toolTip.start');
deskShareIcon = images.deskShareIcon;
}
}
private function startDeskShare():void {
if(_currentState == OFF_STATE) {
this.selected = true;
this.enabled = true;
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.deskshare.toolTip.stop');
deskShareIcon = images.deskShareIconOn;
_currentState = ON_STATE;
dispatchEvent(new ShareEvent(ShareEvent.START_SHARING));
}
else {
this.selected = false;
this.enabled = true;
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.deskshare.toolTip.start');
deskShareIcon = images.deskShareIcon;
_currentState = ON_STATE;
dispatchEvent(new ShareEvent(ShareWindowEvent.CLOSE));
}
}
//OLD - CAN BE DELETED
public function stopDeskshare():void {
deskShareIcon = images.deskShareIcon;
}
private function mouseOverHandler(event:MouseEvent):void {
if(_currentState == ON_STATE)
deskShareIcon = images.deskshareClose;
else
deskShareIcon = images.deskShareIconOn;
}
private function mouseOutHandler(event:MouseEvent):void {
if(_currentState == ON_STATE)
deskShareIcon = images.deskShareIconOn;
else
deskShareIcon = images.deskShareIcon;
}
public function getAlignment():String{
return MainToolbar.ALIGN_LEFT;