removed the whiteboard button code

This commit is contained in:
Chad Pilkey 2013-05-17 14:26:08 -07:00
parent 96355ebf56
commit c9bb5aa985
5 changed files with 1 additions and 149 deletions

View File

@ -1,30 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.modules.present.api
{
import org.bigbluebutton.modules.present.ui.views.PresentationWindow;
public interface IPresentationButton
{
function buttonAdded(buttonParent:PresentationWindow):void;
function setButtonVisibility(visible:Boolean):void;
function setComponentEnabled(enabled:Boolean):void;
function presenterChanged(isPresenter:Boolean, presenterName:String):void;
}
}

View File

@ -90,7 +90,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.present.api.IPresentationButton;
import org.bigbluebutton.modules.present.events.AddOverlayCanvasEvent;
import org.bigbluebutton.modules.present.events.DisplaySlideEvent;
import org.bigbluebutton.modules.present.events.MoveEvent;

View File

@ -473,10 +473,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
}
public function showOverlayCanvas(show:Boolean):void{
whiteboardCanvas.showCanvas(show);
}
public function showCanvas(show:Boolean):void{
}

View File

@ -36,7 +36,6 @@ package org.bigbluebutton.modules.whiteboard.managers
import org.bigbluebutton.modules.whiteboard.events.WhiteboardButtonEvent;
import org.bigbluebutton.modules.whiteboard.events.WhiteboardUpdate;
import org.bigbluebutton.modules.whiteboard.models.WhiteboardModel;
import org.bigbluebutton.modules.whiteboard.views.WhiteboardButton;
import org.bigbluebutton.modules.whiteboard.views.WhiteboardCanvas;
import org.bigbluebutton.modules.whiteboard.views.WhiteboardTextToolbar;
import org.bigbluebutton.modules.whiteboard.views.WhiteboardToolbar;
@ -50,7 +49,7 @@ package org.bigbluebutton.modules.whiteboard.managers
private var highlighterCanvas:WhiteboardCanvas;
private var highlighterToolbar:WhiteboardToolbar;
private var textToolbar:WhiteboardTextToolbar;
private var whiteboardButton:WhiteboardButton;
private var model:WhiteboardCanvasModel = new WhiteboardCanvasModel();
private var displayModel:WhiteboardCanvasDisplayModel = new WhiteboardCanvasDisplayModel();
@ -82,9 +81,6 @@ package org.bigbluebutton.modules.whiteboard.managers
textToolbar.init();
highlighterCanvas.textToolbar = textToolbar;
if (whiteboardButton != null) return;
whiteboardButton = new WhiteboardButton();
//Necessary now because of module loading race conditions
var t:Timer = new Timer(1000, 1);
t.addEventListener(TimerEvent.TIMER, addHighlighterCanvas);

View File

@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
This program is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free Software
Foundation; either version 3.0 of the License, or (at your option) any later
version.
BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
-->
<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml" icon="{whiteboard_icon}" width="25" height="25" click="toggleWhiteboard()" visible="false"
implements="org.bigbluebutton.modules.present.api.IPresentationButton" xmlns:mate="http://mate.asfusion.com/" toggle="true" creationComplete="toggleWhiteboard()">
<mx:Script>
<![CDATA[
import mx.core.Application;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.modules.present.ui.views.PresentationWindow;
import org.bigbluebutton.modules.whiteboard.events.WhiteboardButtonEvent;
import org.bigbluebutton.modules.whiteboard.events.WhiteboardPresenterEvent;
import org.bigbluebutton.modules.whiteboard.events.WhiteboardUpdate;
import org.bigbluebutton.util.i18n.ResourceUtil;
private var images:Images = new Images();
[Bindable] private var whiteboard_icon:Class = images.whiteboard;
private var whiteboardEnabled:Boolean = false;
private var isPresenter:Boolean = false;
private function toggleWhiteboard():void{
this.whiteboardEnabled = !this.whiteboardEnabled;
if (this.whiteboardEnabled) this.selected = true;
else if (!this.whiteboardEnabled) this.selected = false;
if (whiteboardEnabled) sendEnableWhiteboardEvent();
else if (!whiteboardEnabled) sendDisableWhiteboardEvent();
}
private function sendEnableWhiteboardEvent():void{
dispatchEvent(new WhiteboardButtonEvent(WhiteboardButtonEvent.ENABLE_WHITEBOARD));
this.toolTip = ResourceUtil.getInstance().getString('bbb.highlighter.button.toolTipHide');
}
private function sendDisableWhiteboardEvent():void{
dispatchEvent(new WhiteboardButtonEvent(WhiteboardButtonEvent.DISABLE_WHITEBOARD));
this.toolTip = ResourceUtil.getInstance().getString('bbb.highlighter.button.toolTipShow');
}
public function buttonAdded(buttonParent:PresentationWindow):void {
var e:WhiteboardButtonEvent = new WhiteboardButtonEvent(WhiteboardButtonEvent.WHITEBOARD_ADDED_TO_PRESENTATION);
e.window = buttonParent;
dispatchEvent(e);
// buttonParent.addEventListener(KeyboardEvent.KEY_UP, checkWhiteboardKeyCombo);
}
private function checkWhiteboardKeyCombo(e:KeyboardEvent):void{
if (this.visible) takeActionOnKeyPressed(e.keyCode);
}
private function takeActionOnKeyPressed(key:int):void{
if (key == 87){ //W
toggleWhiteboard();
} else if (key == 68){ //D
this.whiteboardEnabled = true;
this.selected = true;
sendEnableWhiteboardEvent();
dispatchEvent(new WhiteboardButtonEvent(WhiteboardButtonEvent.CHANGE_TO_PENCIL));
}
}
public function setButtonVisibility(visibility:Boolean):void{
// this.visible = visibility;
//if (visibility) sendEnableWhiteboardEvent();
//else if (!visibility) sendDisableWhiteboardEvent();
}
public function setComponentEnabled(enabled:Boolean):void{
if (enabled && whiteboardEnabled) sendEnableWhiteboardEvent();
else if (!enabled) sendDisableWhiteboardEvent();
}
public function presenterChanged(isPresenter:Boolean, presenterName:String):void{
setComponentEnabled(isPresenter);
this.isPresenter = isPresenter;
if(isPresenter) {
LogUtil.debug("MADE PRESENTER ENABLING WHITEBOARD");
sendEnableWhiteboardEvent();
}
}
]]>
</mx:Script>
</mx:Button>