Merge pull request #127 from SenecaCDOT-BigBlueButton/add-allowkick

added allowKickUser option to config.xml, fixed lock icon bug, set white...
This commit is contained in:
Richard Alam 2013-04-25 13:29:02 -07:00
commit 4983bc2961
4 changed files with 21 additions and 8 deletions

View File

@ -31,8 +31,10 @@ package org.bigbluebutton.modules.users.model
[Bindable]
public var baseTabIndex:int = 201;
public function UsersOptions()
{
[Bindable]
public var allowKickUser:Boolean = false;
public function UsersOptions() {
var vxml:XML = BBB.getConfigForModule("UsersModule");
if (vxml != null) {
windowVisible = (vxml.@windowVisible.toString().toUpperCase() == "TRUE") ? true : false;
@ -43,6 +45,9 @@ package org.bigbluebutton.modules.users.model
if (vxml.@baseTabIndex != undefined) {
baseTabIndex = vxml.@baseTabIndex;
}
if (vxml.@allowKickUser != undefined) {
allowKickUser = vxml.@allowKickUser;
}
}
}

View File

@ -51,6 +51,7 @@
import org.bigbluebutton.main.model.users.events.LowerHandEvent;
import org.bigbluebutton.modules.users.events.UsersRollEvent;
import org.bigbluebutton.modules.users.events.ViewCameraEvent;
import org.bigbluebutton.modules.users.model.UsersOptions;
import org.bigbluebutton.util.i18n.ResourceUtil;
[Bindable]
@ -66,6 +67,8 @@
private var muteRolled:Boolean = false;
private var lockRolled:Boolean = false;
private var options:UsersOptions;
private function onCreationComplete():void{
lockBtn.enabled = muteBtn.enabled = kickUserBtn.enabled = moderator = UserManager.getInstance().getConference().amIModerator();
@ -74,6 +77,10 @@
BindingUtils.bindSetter(updateButtons, voiceJoinedInd, "visible");
BindingUtils.bindSetter(updateButtons, muteInd, "visible");
BindingUtils.bindSetter(updateButtons, voiceLockedInd, "visible");
options = new UsersOptions();
LogUtil.debug("CHAD: " + options.allowKickUser);
}
private function dataChangeHandler(e:Event):void {
@ -148,7 +155,7 @@
private function updateButtons(voiceMuted:Boolean = false):void {
if (data != null) {
kickUserBtn.visible = !data.me && rolledOver;
kickUserBtn.visible = !data.me && rolledOver && options.allowKickUser;
if (!data.voiceJoined) {
@ -159,15 +166,14 @@
} else {
muteImg.visible = !rolledOver;
muteImg.includeInLayout = !rolledOver;
muteBtn.visible = rolledOver;
muteBtn.includeInLayout = rolledOver;
if(data.talking && !rolledOver){
muteImg.filters = [new GlowFilter(0x898989)];
}else{
muteImg.filters = [];
}
muteBtn.visible = rolledOver;
muteBtn.includeInLayout = rolledOver;
}
if ((data.role == Role.MODERATOR) || !data.voiceJoined) {
@ -192,6 +198,8 @@
lockImg.source = images.locked_20;
else if (moderator)
lockImg.source = images.unlocked_20;
else
lockImg.source = null;
} else {
if (data.voiceMuted == rolledOverMute)
muteBtn.setStyle("icon", images.audio);

View File

@ -338,7 +338,7 @@
}
public function remoteKickUser():void{
if (amIModerator && usersGrid.selectedIndex != -1) {
if (amIModerator && usersGrid.selectedIndex != -1 && partOptions.allowKickUser) {
var selData:Object = usersGrid.selectedItem;
if (!selData.me)

View File

@ -109,7 +109,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
[Bindable] public var wbOptions:WhiteboardOptions;
[Bindable] private var baseIndex:int;
[Bindable] private var showWhiteboardToolbar:Boolean = true;
[Bindable] private var showWhiteboardToolbar:Boolean = false;
public var canvas:WhiteboardCanvas;
private var presentationWindow:PresentationWindow;