UI updates for presentation pods list.

This commit is contained in:
Ghazi Triki 2017-12-20 22:33:41 +01:00
parent ca853a837f
commit e8683436a9
4 changed files with 32 additions and 19 deletions

View File

@ -1384,7 +1384,11 @@ mx|Panel {
backgroundColor : #E2E8ED;
}
.podCurrentPresenter {
.podItemTitle {
fontWeight : bold;
}
.podCurrentUser {
color : #1070D7;
}
@ -1607,6 +1611,10 @@ flexlib|SuperTabNavigator {
.highlightedTabStyle {
color : #DF2721;
iconColor : #DF2721;
fillColorUp : #E8EFF3;
fillColorOver : #CDD4DB;
fillColorDown : #ACB2B7;
fillColorDisabled : #F0F2F6;
iconVisible : true;
skin : ClassReference("org.bigbluebutton.skins.TabSkin");
tabCloseButtonStyleName : "tabCloseButton";

View File

@ -321,7 +321,7 @@ bbb.filedownload.downloadBtn = Download
bbb.filedownload.downloadBtn.toolTip = Download Presentation
bbb.presentationExport.title = Export presentation
bbb.presentationExport.fileName = File name
bbb.presentationExport.saveToDisk = Save to desktop
bbb.presentationExport.saveToDisk = Save
bbb.presentationExport.generatingPDF = Generating PDF…
bbb.presentationExport.converting = Converting “{0}”. Processing page {1}/{2}
bbb.presentationExport.uploading = Upload progress {0}%

View File

@ -25,6 +25,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
xmlns:mx="library://ns.adobe.com/flex/mx">
<mx:Label text="{data.label}"
styleName="{data.type == 'current'? 'podCurrentPresenter' : ''}" />
styleName="{data.styleName}" />
</mx:Canvas>

View File

@ -71,10 +71,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<![CDATA[
import flash.geom.Point;
import flashx.textLayout.formats.Direction;
import flexlib.mdi.events.MDIWindowEvent;
import mx.collections.ArrayCollection;
import mx.controls.Button;
import mx.controls.Menu;
@ -84,6 +80,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import mx.managers.PopUpManager;
import mx.utils.StringUtil;
import flashx.textLayout.formats.Direction;
import flexlib.mdi.events.MDIWindowEvent;
import org.as3commons.lang.ArrayUtils;
import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
@ -96,6 +97,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.PopUpUtil;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.model.users.events.ChangeMyRole;
import org.bigbluebutton.main.model.users.events.UserAddedToPresenterGroupEvent;
@ -129,9 +131,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.modules.present.model.PresentationPodManager;
import org.bigbluebutton.modules.whiteboard.events.RequestNewCanvasEvent;
import org.bigbluebutton.modules.whiteboard.views.IWhiteboardOverlay;
import org.bigbluebutton.modules.whiteboard.views.IWhiteboardReceiver;
import org.bigbluebutton.modules.whiteboard.views.IWhiteboardToolbar;
import org.bigbluebutton.modules.whiteboard.views.WhiteboardTextToolbar;
import org.bigbluebutton.modules.whiteboard.views.WhiteboardToolbar;
import org.bigbluebutton.util.i18n.ResourceUtil;
private static const LOGGER:ILogger = getClassLogger(PresentationWindow);
@ -242,19 +243,23 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.closePresentationWindowOpen'), type: "action", handler: closePresentationWindowHandler});
}
var presGroup:ArrayCollection = UsersUtil.getPresenterGroup();
var presGroup:Array = ArrayUtils.getUniqueValues(UsersUtil.getPresenterGroup().source);
if (presGroup.length > 0 || !StringUtils.isEmpty(currentPresenterUsername)) {
listOfPodControls.push({type: "separator", label: StringUtil.repeat("─", Math.floor(ResourceUtil.getInstance().getString('bbb.presentation.multipod.controls.newPresentationWindowOpen').length / 2) + 2)});
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.itemrenderer.presenter'), type: "title"});
if (!StringUtils.isEmpty(currentPresenterUsername)){
listOfPodControls.push({label: currentPresenterUsername, type: "current"});
}
listOfPodControls.push({label: ResourceUtil.getInstance().getString('bbb.presentation.multipod.itemrenderer.presenter'), type: "title", styleName: "podItemTitle"});
for (var j:int = 0; j < presGroup.length; j++) {
var nextPresenterId:String = presGroup.getItemAt(j) as String;
if (nextPresenterId != this.currentPresenterInPod && !StringUtils.isEmpty(UsersUtil.getUserName(nextPresenterId))) { // avoid duplication
listOfPodControls.push({label: UsersUtil.getUserName(nextPresenterId), type: "user", handler: requestPodPresenterChange, data: nextPresenterId});
var nextPresenterId:String = presGroup[j] as String;
var userName:String = UsersUtil.getUserName(nextPresenterId);
var myUser:Boolean = LiveMeeting.inst().me.id == nextPresenterId;
if (nextPresenterId == this.currentPresenterInPod) {
userName = "✓ " + userName;
}
if (myUser) {
userName += ' (' + ResourceUtil.getInstance().getString('bbb.users.usersGrid.nameItemRenderer.youIdentifier') + ')'
}
if (!StringUtils.isEmpty(UsersUtil.getUserName(nextPresenterId))) { // avoid duplication
listOfPodControls.push({label: userName, type: "user", handler: requestPodPresenterChange, data: nextPresenterId, styleName: myUser ? "podCurrentUser" : ""});
}
}
}
@ -1156,7 +1161,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
dataProvider = "{listOfPodControls}" height="30"
selectedIndex="-1"
rowCount="10"
prompt="{ResourceUtil.getInstance().getString('bbb.presentation.multipod.selectPresenter')}"
prompt="{StringUtils.isEmpty(this.currentPresenterUsername) ? ResourceUtil.getInstance().getString('bbb.presentation.multipod.selectPresenter') : this.currentPresenterUsername}"
itemRenderer="org.bigbluebutton.modules.present.ui.views.PresentationPodControlItemRenderer"
change="onPresentationPodControlsChange(event)" />