Merge pull request #506 from capilkey/add-user-contextmenu
add a context menu item to UserGrid to export user names
This commit is contained in:
commit
162e54d2ef
@ -137,6 +137,7 @@ bbb.users.muteMeBtnTxt.talk = Unmute
|
|||||||
bbb.users.muteMeBtnTxt.mute = Mute
|
bbb.users.muteMeBtnTxt.mute = Mute
|
||||||
bbb.users.muteMeBtnTxt.muted = Muted
|
bbb.users.muteMeBtnTxt.muted = Muted
|
||||||
bbb.users.muteMeBtnTxt.unmuted = Unmuted
|
bbb.users.muteMeBtnTxt.unmuted = Unmuted
|
||||||
|
bbb.users.usersGrid.contextmenu.exportusers = Copy User Names
|
||||||
bbb.users.usersGrid.accessibilityName = Users List. Use the arrow keys to navigate.
|
bbb.users.usersGrid.accessibilityName = Users List. Use the arrow keys to navigate.
|
||||||
bbb.users.usersGrid.nameItemRenderer = Name
|
bbb.users.usersGrid.nameItemRenderer = Name
|
||||||
bbb.users.usersGrid.nameItemRenderer.youIdentifier = you
|
bbb.users.usersGrid.nameItemRenderer.youIdentifier = you
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.bigbluebutton.modules.chat.model
|
package org.bigbluebutton.modules.chat.model
|
||||||
{
|
{
|
||||||
|
import flash.system.Capabilities;
|
||||||
|
|
||||||
import mx.collections.ArrayCollection;
|
import mx.collections.ArrayCollection;
|
||||||
|
|
||||||
import org.bigbluebutton.common.LogUtil;
|
import org.bigbluebutton.common.LogUtil;
|
||||||
@ -62,9 +64,10 @@ package org.bigbluebutton.modules.chat.model
|
|||||||
|
|
||||||
public function getAllMessageAsString():String{
|
public function getAllMessageAsString():String{
|
||||||
var allText:String = "";
|
var allText:String = "";
|
||||||
|
var returnStr:String = (Capabilities.os.indexOf("Windows") >= 0 ? "\r\n" : "\r");
|
||||||
for (var i:int = 0; i < messages.length; i++){
|
for (var i:int = 0; i < messages.length; i++){
|
||||||
var item:ChatMessage = messages.getItemAt(i) as ChatMessage;
|
var item:ChatMessage = messages.getItemAt(i) as ChatMessage;
|
||||||
allText += "\n" + item.name + " - " + item.time + " : " + item.text;
|
allText += item.name + " - " + item.time + " : " + item.text + returnStr;
|
||||||
}
|
}
|
||||||
return allText;
|
return allText;
|
||||||
}
|
}
|
||||||
|
@ -135,12 +135,35 @@
|
|||||||
|
|
||||||
stage.addEventListener(MouseEvent.MOUSE_OVER, handleStageMouseOver);
|
stage.addEventListener(MouseEvent.MOUSE_OVER, handleStageMouseOver);
|
||||||
usersGrid.addEventListener(MouseEvent.MOUSE_OVER, handleUsersGridMouseOver);
|
usersGrid.addEventListener(MouseEvent.MOUSE_OVER, handleUsersGridMouseOver);
|
||||||
|
|
||||||
|
addContextMenuItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPrefferedPosition():String{
|
public function getPrefferedPosition():String{
|
||||||
return MainCanvas.TOP_LEFT;
|
return MainCanvas.TOP_LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function addContextMenuItems():void {
|
||||||
|
var contextMenu:ContextMenu = new ContextMenu();
|
||||||
|
contextMenu.hideBuiltInItems();
|
||||||
|
|
||||||
|
var exportUsersItem:ContextMenuItem = new ContextMenuItem(ResourceUtil.getInstance().getString("bbb.users.usersGrid.contextmenu.exportusers"));
|
||||||
|
exportUsersItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, exportUsersItemHandler);
|
||||||
|
contextMenu.customItems.push(exportUsersItem);
|
||||||
|
|
||||||
|
this.contextMenu = contextMenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function exportUsersItemHandler(e:ContextMenuEvent):void{
|
||||||
|
if (e.target.caption == ResourceUtil.getInstance().getString("bbb.users.usersGrid.contextmenu.exportusers")) {
|
||||||
|
var userNames:String = "";
|
||||||
|
var returnStr:String = (Capabilities.os.indexOf("Windows") >= 0 ? "\r\n" : "\r");
|
||||||
|
for (var i:int = 0; i < users.length; i++) {
|
||||||
|
userNames += users[i].name + returnStr;
|
||||||
|
}
|
||||||
|
System.setClipboard(userNames);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function updateNumberofUsers(numUsers:int):void {
|
private function updateNumberofUsers(numUsers:int):void {
|
||||||
if (numUsers > 8)
|
if (numUsers > 8)
|
||||||
|
Loading…
Reference in New Issue
Block a user