diff --git a/bigbluebutton-client/locale/en_US/bbbResources.properties b/bigbluebutton-client/locale/en_US/bbbResources.properties index 9c43e891ca830237972bfdefc752415004a8c662..0b26b2ee24a207754c0491247a09e1d1ddb7a4a7 100755 --- a/bigbluebutton-client/locale/en_US/bbbResources.properties +++ b/bigbluebutton-client/locale/en_US/bbbResources.properties @@ -286,6 +286,12 @@ bbb.layout.combo.remote = Remote bbb.layout.save.complete = Layouts were successfully saved bbb.layout.load.complete = Layouts were successfully loaded bbb.layout.load.failed = Failed to load the layouts +bbb.layout.name.defaultlayout = Default Layout +bbb.layout.name.videochat = Video Chat +bbb.layout.name.webcamsfocus = Webcam Meeting +bbb.layout.name.presentfocus = Presentation Meeting +bbb.layout.name.lectureassistant = Lecture Assistant +bbb.layout.name.lecture = Lecture bbb.highlighter.toolbar.pencil = Pencil bbb.highlighter.toolbar.pencil.accessibilityName = Switch whiteboard cursor to pencil bbb.highlighter.toolbar.ellipse = Circle diff --git a/bigbluebutton-client/resources/config.xml.template b/bigbluebutton-client/resources/config.xml.template index 6d2fdd3820b1b7a40a2702481687b773a23ea30f..f819eb2370eac1dded1a67c065ec2de1d637ce7e 100644 --- a/bigbluebutton-client/resources/config.xml.template +++ b/bigbluebutton-client/resources/config.xml.template @@ -10,7 +10,7 @@ <language userSelectionEnabled="true" /> <skinning enabled="true" url="http://HOST/client/branding/css/BBBDefault.css.swf" /> <shortcutKeys showButton="true" /> - <layout showLogButton="false" showVideoLayout="false" showResetLayout="true" defaultLayout="Default" + <layout showLogButton="false" showVideoLayout="false" showResetLayout="true" defaultLayout="bbb.layout.name.defaultlayout" showToolbar="true" showFooter="true" showMeetingName="true" showHelpButton="true" showLogoutWindow="true" showLayoutTools="true" showNetworkMonitor="false" confirmLogout="true"/> <lock allowModeratorLocking="false" disableCamForLockedUsers="false" disableMicForLockedUsers="false" disablePrivateChatForLockedUsers="false" diff --git a/bigbluebutton-client/resources/prod/layout.xml b/bigbluebutton-client/resources/prod/layout.xml index 7ccd5b338bd3a1b7c697bf4beaaf24c385926d35..cdcc9d0eda9b21c0e5f3b8c5b9f3c13873b8365c 100755 --- a/bigbluebutton-client/resources/prod/layout.xml +++ b/bigbluebutton-client/resources/prod/layout.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <layouts> - <layout name="Default Layout" default="true"> + <layout name="bbb.layout.name.defaultlayout" default="true"> <window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/> <window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/> <window name="PresentationWindow" width="0.5137481910274964" height="0.9946808510638298" x="0.18017366136034732" y="0" /> @@ -10,7 +10,7 @@ <window name="ViewersWindow" width="0.1772793053545586" height="0.33643617021276595" x="0" y="0" /> <window name="ListenersWindow" width="0.1772793053545586" height="0.33643617021276595" x="0" y="0.34308510638297873" /> </layout> - <layout name="Video Chat"> + <layout name="bbb.layout.name.videochat"> <window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/> <window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/> <window name="VideoDock" width="1" height="1" x="0" y="0" order="0"/> @@ -20,7 +20,7 @@ <window name="ViewersWindow" hidden="true" draggable="false" resizable="false" /> <window name="ListenersWindow" hidden="true" draggable="false" resizable="false"/> </layout> - <layout name="Meeting"> + <layout name="bbb.layout.name.webcamsfocus"> <window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/> <window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/> <window name="VideoDock" width="0.6570188133140377" height="0.9960106382978723" x="0" y="0" /> @@ -28,7 +28,7 @@ <window name="UsersWindow" hidden="true" /> <window name="PresentationWindow" width="0.34008683068017365" height="0.4601063829787234" x="0.658465991316932" y="0.535904255319149" /> </layout> - <layout name="Webinar"> + <layout name="bbb.layout.name.presentfocus"> <window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/> <window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/> <window name="UsersWindow" minimized="true" /> @@ -36,15 +36,15 @@ <window name="PresentationWindow" width="0.7027777777777777" height="0.9986702127659575" x="0" y="0" /> <window name="ChatWindow" width="0.2923611111111111" height="0.5305851063829787" x="0.7048611111111112" y="0" /> </layout> - <layout name="Lecture assistant"> + <layout name="bbb.layout.name.lectureassistant"> <window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/> <window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/> <window name="ChatWindow" width="0.4597222222222222" height="0.9958677685950413" x="0.2263888888888889" y="0" /> - <window name="UsersWindow" width="0.22152777777777777" height="0.9178852643419573" x="0" y="0" minWidth="280" /> + <window name="UsersWindow" width="0.22152777777777777" height="0.9958677685950413" x="0" y="0" minWidth="280" /> <window name="PresentationWindow" width="0.3104166666666667" height="0.5537190082644629" x="0.6895833333333333" y="0" /> - <window name="VideoDock" width="0.30972222222222223" height="0.4256198347107438" x="0.6902777777777778" y="0.568870523415978" /> + <window name="VideoDock" width="0.30972222222222223" height="0.4357198347107438" x="0.6902777777777778" y="0.558870523415978" /> </layout> - <layout name="Lecture"> + <layout name="bbb.layout.name.lecture"> <window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/> <window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/> <window name="UsersWindow" hidden="true" /> @@ -52,7 +52,7 @@ <window name="PresentationWindow" width="0.7027777777777777" height="0.9986702127659575" x="0" y="0" /> <window name="ChatWindow" width="0.2923611111111111" height="0.5305851063829787" x="0.7048611111111112" y="0" /> </layout> - <layout name="Lecture" role="presenter"> + <layout name="bbb.layout.name.lecture" role="presenter"> <window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/> <window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/> <window name="ChatWindow" hidden="true" /> @@ -60,7 +60,7 @@ <window name="PresentationWindow" maximized="true" /> <window name="VideoDock" hidden="true" /> </layout> - <layout name="Lecture" role="moderator"> + <layout name="bbb.layout.name.lecture" role="moderator"> <window name="NotesWindow" hidden="true" width="0.7" height="1" x="0" y="0" draggable="false" resizable="false"/> <window name="BroadcastWindow" hidden="true" draggable="false" resizable="false"/> <window name="ChatWindow" width="0.4597222222222222" height="0.9958677685950413" x="0.2263888888888889" y="0" /> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/managers/LayoutManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/managers/LayoutManager.as old mode 100644 new mode 100755 index 528544002183c36c344d947836cab726425cb89e..477589c9a8d7a3eb14d79984d62e933655dcf926 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/managers/LayoutManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/managers/LayoutManager.as @@ -331,7 +331,9 @@ package org.bigbluebutton.modules.layout.managers private function updateCurrentLayout(layout:LayoutDefinition=null):LayoutDefinition { if (layout != null) { + if (_currentLayout) _currentLayout.currentLayout = false; _currentLayout = layout; + layout.currentLayout = true; } else { _currentLayout = LayoutDefinition.getLayout(_canvas, ResourceUtil.getInstance().getString('bbb.layout.combo.customName')); } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml index f84d5483f9dfa05815061a675ccbd8798761297f..040367c168a05a74acbe167852a3fb1b455039f6 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/layout/views/LayoutsCombo.mxml @@ -30,45 +30,51 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. <mate:Listener type="{SwitchedLayoutEvent.SWITCHED_LAYOUT_EVENT}" method="onLayoutChanged" /> <mate:Listener type="{LayoutsReadyEvent.LAYOUTS_READY}" method="populateLayoutsList"/> <mate:Listener type="{LockControlEvent.CHANGED_LOCK_SETTINGS}" method="lockSettingsChanged" /> + <mate:Listener type="{LocaleChangeEvent.LOCALE_CHANGED}" method="localeChanged" /> <mx:Script> <![CDATA[ - import com.asfusion.mate.events.Dispatcher; - import flash.events.Event; - import flash.events.IOErrorEvent; - import flash.events.ProgressEvent; - import flash.net.FileReference; - import flexlib.mdi.containers.MDICanvas; - import flexlib.mdi.containers.MDIWindow; - import flexlib.mdi.events.MDIManagerEvent; - import flexlib.mdi.events.MDIWindowEvent; - import flexlib.mdi.managers.MDIManager; - import mx.collections.ArrayCollection; - import mx.controls.Alert; - import mx.events.ResizeEvent; - import org.bigbluebutton.common.IBbbModuleWindow; - import org.bigbluebutton.common.Images; - import org.bigbluebutton.common.LogUtil; - import org.bigbluebutton.common.events.OpenWindowEvent; - import org.bigbluebutton.core.UsersUtil; - import org.bigbluebutton.core.events.LockControlEvent; - import org.bigbluebutton.core.events.SwitchedLayoutEvent; - import org.bigbluebutton.core.managers.UserManager; - import org.bigbluebutton.core.vo.LockSettingsVO; - import org.bigbluebutton.main.views.MainToolbar; - import org.bigbluebutton.modules.layout.events.ChangeLayoutEvent; - import org.bigbluebutton.modules.layout.events.ComboBoxCreatedEvent; - import org.bigbluebutton.modules.layout.events.LayoutChangedEvent; - import org.bigbluebutton.modules.layout.events.LayoutEvent; - import org.bigbluebutton.modules.layout.events.LayoutsLoadedEvent; - import org.bigbluebutton.modules.layout.events.LayoutsReadyEvent; - import org.bigbluebutton.modules.layout.events.ViewInitializedEvent; - import org.bigbluebutton.modules.layout.model.LayoutDefinition; - import org.bigbluebutton.modules.layout.model.LayoutDefinitionFile; - import org.bigbluebutton.modules.layout.model.LayoutModel; - import org.bigbluebutton.modules.layout.model.WindowLayout; - import org.bigbluebutton.modules.layout.views.LayoutButton; - import org.bigbluebutton.util.i18n.ResourceUtil; + import com.asfusion.mate.events.Dispatcher; + + import flash.events.Event; + import flash.events.IOErrorEvent; + import flash.events.ProgressEvent; + import flash.net.FileReference; + + import flexlib.mdi.containers.MDICanvas; + import flexlib.mdi.containers.MDIWindow; + import flexlib.mdi.events.MDIManagerEvent; + import flexlib.mdi.events.MDIWindowEvent; + import flexlib.mdi.managers.MDIManager; + + import mx.collections.ArrayCollection; + import mx.controls.Alert; + import mx.events.ResizeEvent; + + import org.bigbluebutton.common.IBbbModuleWindow; + import org.bigbluebutton.common.Images; + import org.bigbluebutton.common.LogUtil; + import org.bigbluebutton.common.events.LocaleChangeEvent; + import org.bigbluebutton.common.events.OpenWindowEvent; + import org.bigbluebutton.core.UsersUtil; + import org.bigbluebutton.core.events.LockControlEvent; + import org.bigbluebutton.core.events.SwitchedLayoutEvent; + import org.bigbluebutton.core.managers.UserManager; + import org.bigbluebutton.core.vo.LockSettingsVO; + import org.bigbluebutton.main.views.MainToolbar; + import org.bigbluebutton.modules.layout.events.ChangeLayoutEvent; + import org.bigbluebutton.modules.layout.events.ComboBoxCreatedEvent; + import org.bigbluebutton.modules.layout.events.LayoutChangedEvent; + import org.bigbluebutton.modules.layout.events.LayoutEvent; + import org.bigbluebutton.modules.layout.events.LayoutsLoadedEvent; + import org.bigbluebutton.modules.layout.events.LayoutsReadyEvent; + import org.bigbluebutton.modules.layout.events.ViewInitializedEvent; + import org.bigbluebutton.modules.layout.model.LayoutDefinition; + import org.bigbluebutton.modules.layout.model.LayoutDefinitionFile; + import org.bigbluebutton.modules.layout.model.LayoutModel; + import org.bigbluebutton.modules.layout.model.WindowLayout; + import org.bigbluebutton.modules.layout.views.LayoutButton; + import org.bigbluebutton.util.i18n.ResourceUtil; private static const LOG:String = "Layout::LayoutsCombo - "; @@ -98,35 +104,45 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. layoutNames = new ArrayCollection(); var layouts:Array = LayoutModel.getInstance().getLayoutNames(); - var idx:int = 0; + var idx:int = 0, currentLayoutIndex = -1; for each (var lay:Object in layouts) { - var item:Object = {index: idx, label: lay.name, currentLayout: lay.currentLayout }; + var translatedName:String = ResourceUtil.getInstance().getString(lay.name) + if (translatedName == "undefined") translatedName = lay.name; + var item:Object = {index: idx, label: translatedName, localeKey: lay.name, currentLayout: lay.currentLayout }; trace(LOG + " layout [" + lay.name + ", current=" + lay.currentLayout + "]"); layoutNames.addItem(item); if (lay.currentLayout) { - selectedIndex = idx; + currentLayoutIndex = idx; } idx++; } dataProvider = layoutNames; + selectedIndex = currentLayoutIndex; invalidateDisplayList(); } private function onLayoutChanged(e:SwitchedLayoutEvent):void { trace(LOG + " handling SwitchedLayoutEvent layout=[" + e.layoutID + "]"); populateComboBox(); - + trace(LOG + " selected layout coming in is: " + selectedIndex); var idx:int = -1; for each (var obj:Object in dataProvider) { - if (obj.label == e.layoutID) + if (obj.localeKey == e.layoutID) idx = obj.index; } selectedIndex = idx; invalidateDisplayList(); + + trace(LOG + " selected layout afterwards is: " + selectedIndex); + } + + private function localeChanged(e:LocaleChangeEvent):void { + trace(LOG + " locale change recieved"); + populateComboBox(); } private function onSelectedItemChanged(e:Event):void { - _dispatcher.dispatchEvent(new ChangeLayoutEvent(e.currentTarget.selectedItem.label)); + _dispatcher.dispatchEvent(new ChangeLayoutEvent(e.currentTarget.selectedItem.localeKey)); } ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/util/i18n/ResourceUtil.as b/bigbluebutton-client/src/org/bigbluebutton/util/i18n/ResourceUtil.as index ff0350ee2e7b6ad77f8787c480ef33f29a30af10..e881f539803f2530e9d9aacaee39838d9b02bbb3 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/util/i18n/ResourceUtil.as +++ b/bigbluebutton-client/src/org/bigbluebutton/util/i18n/ResourceUtil.as @@ -223,6 +223,8 @@ package org.bigbluebutton.util.i18n } public function update():void{ + var dispatcher:Dispatcher = new Dispatcher; + dispatcher.dispatchEvent(new LocaleChangeEvent(LocaleChangeEvent.LOCALE_CHANGED)); dispatchEvent(new Event(Event.CHANGE)); }