[OPENMEETINGS-551] basic work on video settings

Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo
Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/35544aaf
Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/35544aaf
Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/35544aaf

Branch: refs/heads/master
Commit: 35544aafcd363362ad2530e15f1bc6d464157ade
Parents: d8febfd
Author: Maxim Solodovnik <[email protected]>
Authored: Sat Apr 8 10:09:46 2017 +0000
Committer: Maxim Solodovnik <[email protected]>
Committed: Sat Apr 8 10:09:46 2017 +0000

----------------------------------------------------------------------
 openmeetings-flash/pom.xml                      |   2 +-
 openmeetings-flash/src/main/flex/main.mxml      |   8 +-
 .../openmeetings/web/common/NameDialog.java     |   2 +-
 .../web/common/tree/FileTreePanel.java          |   4 +-
 .../web/pages/InvitationPasswordDialog.java     |   6 +-
 .../web/pages/auth/ForgetPasswordDialog.java    |  13 +-
 .../web/pages/auth/KickMessageDialog.java       |   5 +-
 .../web/pages/auth/RegisterDialog.java          |  25 +--
 .../web/pages/auth/ResetPasswordDialog.java     |  19 +-
 .../web/pages/auth/SignInDialog.java            |   6 +-
 .../web/pages/install/InstallWizard.java        |   2 +-
 .../openmeetings/web/room/NicknameDialog.java   |   6 +-
 .../web/room/RedirectMessageDialog.java         |  25 ++-
 .../org/apache/openmeetings/web/room/room.js    |  53 +++++-
 .../web/room/sidebar/RoomSidebar.html           |  67 +++++++
 .../web/room/sidebar/icon/SettingsIcon.java     |   4 +-
 .../openmeetings/web/room/wb/WbPanel.java       | 176 +++++++++++--------
 .../org/apache/openmeetings/web/room/wb/wb.js   |  31 ++--
 .../web/user/calendar/AppointmentDialog.java    |   2 +-
 .../web/util/NonClosableDialog.java             |  39 ++++
 .../web/util/NonClosableMessageDialog.java      |  46 +++++
 openmeetings-web/src/main/webapp/css/room.css   |  37 ++++
 22 files changed, 402 insertions(+), 176 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-flash/pom.xml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/pom.xml b/openmeetings-flash/pom.xml
index ca687f7..be7f36c 100644
--- a/openmeetings-flash/pom.xml
+++ b/openmeetings-flash/pom.xml
@@ -16,7 +16,7 @@
    limitations under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+               xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.apache.openmeetings</groupId>

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-flash/src/main/flex/main.mxml
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/main.mxml 
b/openmeetings-flash/src/main/flex/main.mxml
index e173816..9287291 100644
--- a/openmeetings-flash/src/main/flex/main.mxml
+++ b/openmeetings-flash/src/main/flex/main.mxml
@@ -19,9 +19,9 @@
 
 -->
 <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
-                          xmlns:s="library://ns.adobe.com/flex/spark"
-                          xmlns:mx="library://ns.adobe.com/flex/mx" 
width="570" height="900" pageTitle="Openmeetings"
-                          preinitialize="init()" fontSize="12" 
applicationComplete="appInit()">
+               xmlns:s="library://ns.adobe.com/flex/spark"
+               xmlns:mx="library://ns.adobe.com/flex/mx" width="570" 
height="900" pageTitle="Openmeetings"
+               preinitialize="init()" fontSize="12" 
applicationComplete="appInit()">
        <fx:Declarations>
                <!-- Place non-visual elements (e.g., services, value objects) 
here -->
                <mx:TraceTarget/>
@@ -477,7 +477,7 @@
                                        </s:Group>
                                </s:Scroller>
                                <s:Label id="timerText" height="20" width="45" 
x="{videoGroup.width - 60}" y="5" paddingLeft="5" paddingTop="5"
-                                        visible="false" 
backgroundColor="0xf5f5f5" fontWeight="bold"><s:text></s:text></s:Label>
+                                               visible="false" 
backgroundColor="0xf5f5f5" fontWeight="bold"><s:text></s:text></s:Label>
                                <s:VGroup id="playGroup">
                                        <s:Group>
                                                <s:Graphic x="0" z="1">

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/NameDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/NameDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/NameDialog.java
index ab4c811..5a7992d 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/NameDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/NameDialog.java
@@ -40,7 +40,7 @@ public abstract class NameDialog extends 
AbstractFormDialog<String> {
        private final DialogButton add;
        private final DialogButton cancel = new DialogButton("cancel", 
Application.getString(219));
        private final Form<String> form;
-       private final KendoFeedbackPanel feedback = new 
KendoFeedbackPanel("feedback", new Options("button", true));
+       protected final KendoFeedbackPanel feedback = new 
KendoFeedbackPanel("feedback", new Options("button", true));
        private final String name;
        private RequiredTextField<String> title;
 

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
index dff9122..37552d2 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/common/tree/FileTreePanel.java
@@ -38,9 +38,9 @@ import 
org.apache.openmeetings.db.entity.file.FileExplorerItem;
 import org.apache.openmeetings.db.entity.file.FileItem;
 import org.apache.openmeetings.db.entity.file.FileItem.Type;
 import org.apache.openmeetings.db.entity.record.Recording;
-import org.apache.openmeetings.web.common.NameDialog;
 import org.apache.openmeetings.web.common.ConfirmableAjaxBorder;
 import 
org.apache.openmeetings.web.common.ConfirmableAjaxBorder.ConfirmableBorderDialog;
+import org.apache.openmeetings.web.common.NameDialog;
 import org.apache.openmeetings.web.util.AjaxDownload;
 import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.Component;
@@ -149,7 +149,7 @@ public abstract class FileTreePanel extends Panel {
                                                                String 
statement = "var $drop = $(this);";
                                                                statement += 
"$('body').append('<div id=" + dialogId + ">" + getString("713") + "</div>');";
                                                                statement += 
"$( '#" + dialogId
-                                                                               
+ "' ).dialog({ title: '" + escapeEcmaScript(getString("80")) + "', 
dialogClass: 'no-close', buttons: [";
+                                                                               
+ "' ).dialog({ title: '" + escapeEcmaScript(getString("80")) + "', classes: 
{'ui-dialog-titlebar': 'ui-corner-all no-close'}, buttons: [";
                                                                statement += "  
{ text: '" + escapeEcmaScript(getString("54")) + "', click: function() { 
$drop.append(ui.draggable); $(this).dialog('close'); " + 
super.getCallbackFunctionBody(parameters) + " } },";
                                                                statement += "  
{ text: '" + escapeEcmaScript(getString("25")) + "', click: function() { 
$(this).dialog('close'); } } ";
                                                                statement += 
"],";

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/InvitationPasswordDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/InvitationPasswordDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/InvitationPasswordDialog.java
index ef994a0..2dddfbb 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/InvitationPasswordDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/InvitationPasswordDialog.java
@@ -26,6 +26,7 @@ import org.apache.openmeetings.util.crypt.CryptProvider;
 import org.apache.openmeetings.web.app.Application;
 import org.apache.openmeetings.web.app.WebSession;
 import org.apache.openmeetings.web.common.IUpdatable;
+import org.apache.openmeetings.web.util.NonClosableDialog;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
@@ -38,11 +39,10 @@ import org.apache.wicket.validation.ValidationError;
 
 import com.googlecode.wicket.jquery.core.JQueryBehavior;
 import com.googlecode.wicket.jquery.core.Options;
-import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
 import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
 import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
 
-public class InvitationPasswordDialog extends AbstractFormDialog<Invitation> {
+public class InvitationPasswordDialog extends NonClosableDialog<Invitation> {
        private static final long serialVersionUID = 1L;
        private final KendoFeedbackPanel feedback = new 
KendoFeedbackPanel("feedback", new Options("button", true));
        private final DialogButton check = new DialogButton("check", 
Application.getString(537));
@@ -87,8 +87,6 @@ public class InvitationPasswordDialog extends 
AbstractFormDialog<Invitation> {
                super.onConfigure(behavior);
                Invitation i = WebSession.get().getInvitation();
                behavior.setOption("autoOpen", i != null && 
i.isPasswordProtected());
-               behavior.setOption("closeOnEscape", false);
-               behavior.setOption("dialogClass", Options.asString("no-close"));
                behavior.setOption("resizable", false);
        }
 

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ForgetPasswordDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ForgetPasswordDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ForgetPasswordDialog.java
index e89f9f7..0767e03 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ForgetPasswordDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ForgetPasswordDialog.java
@@ -32,6 +32,7 @@ import org.apache.openmeetings.db.entity.user.User;
 import org.apache.openmeetings.service.mail.template.ResetPasswordTemplate;
 import org.apache.openmeetings.web.app.Application;
 import org.apache.openmeetings.web.pages.ResetPage;
+import org.apache.openmeetings.web.util.NonClosableMessageDialog;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormChoiceComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
@@ -48,12 +49,9 @@ import 
org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
 
-import com.googlecode.wicket.jquery.core.JQueryBehavior;
 import com.googlecode.wicket.jquery.core.Options;
 import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
 import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
-import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButtons;
-import com.googlecode.wicket.jquery.ui.widget.dialog.DialogIcon;
 import com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog;
 import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
 
@@ -136,17 +134,10 @@ public class ForgetPasswordDialog extends 
AbstractFormDialog<String> {
                                super.onDetach();
                        }
                });
-               confirmDialog = new MessageDialog("confirmDialog", 
Application.getString(312), Application.getString(321), DialogButtons.OK, 
DialogIcon.INFO){
+               confirmDialog = new NonClosableMessageDialog("confirmDialog", 
Application.getString(312), Application.getString(321)){
                        private static final long serialVersionUID = 1L;
 
                        @Override
-                       public void onConfigure(JQueryBehavior behavior) {
-                               super.onConfigure(behavior);
-                               behavior.setOption("dialogClass", 
Options.asString("no-close"));
-                               behavior.setOption("closeOnEscape", false);
-                       }
-
-                       @Override
                        public void onClose(IPartialPageRequestHandler handler, 
DialogButton button) {
                                s.open(handler);
                        }

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/KickMessageDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/KickMessageDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/KickMessageDialog.java
index 0bea145..b2f489f 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/KickMessageDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/KickMessageDialog.java
@@ -24,7 +24,6 @@ import 
org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
 import org.apache.wicket.markup.html.basic.Label;
 
 import com.googlecode.wicket.jquery.core.JQueryBehavior;
-import com.googlecode.wicket.jquery.core.Options;
 import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog;
 import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
 
@@ -40,13 +39,13 @@ public class KickMessageDialog extends 
AbstractDialog<String> {
                super.onInitialize();
                add(new Label("message", getString("606")));
        };
-       
+
        @Override
        public void onConfigure(JQueryBehavior behavior) {
                super.onConfigure(behavior);
                behavior.setOption("autoOpen", true);
                behavior.setOption("closeOnEscape", false);
-               behavior.setOption("dialogClass", Options.asString("no-close"));
+               behavior.setOption("classes", "{'ui-dialog-titlebar': 
'ui-corner-all no-close'}");
                behavior.setOption("resizable", false);
        }
 

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/RegisterDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/RegisterDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/RegisterDialog.java
index 9306db1..b2fc869 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/RegisterDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/RegisterDialog.java
@@ -39,6 +39,8 @@ import org.apache.openmeetings.web.app.Application;
 import org.apache.openmeetings.web.app.WebSession;
 import org.apache.openmeetings.web.common.LanguageDropDown;
 import org.apache.openmeetings.web.util.CountryDropDown;
+import org.apache.openmeetings.web.util.NonClosableDialog;
+import org.apache.openmeetings.web.util.NonClosableMessageDialog;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
@@ -55,16 +57,12 @@ import org.apache.wicket.util.string.Strings;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
 
-import com.googlecode.wicket.jquery.core.JQueryBehavior;
 import com.googlecode.wicket.jquery.core.Options;
-import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
 import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
-import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButtons;
-import com.googlecode.wicket.jquery.ui.widget.dialog.DialogIcon;
 import com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog;
 import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
 
-public class RegisterDialog extends AbstractFormDialog<String> {
+public class RegisterDialog extends NonClosableDialog<String> {
        private static final long serialVersionUID = 1L;
        private static final Logger log = 
Red5LoggerFactory.getLogger(RegisterDialog.class, webAppRootKey);
        private DialogButton cancelBtn = new DialogButton("cancel", 
Application.getString(122));
@@ -92,18 +90,10 @@ public class RegisterDialog extends 
AbstractFormDialog<String> {
                form.setOutputMarkupId(true);
                tzDropDown.setOutputMarkupId(true);
 
-               confirmRegistration = new MessageDialog("confirmRegistration", 
Application.getString(235),
-                               Application.getString(674), DialogButtons.OK, 
DialogIcon.INFO) {
+               confirmRegistration = new 
NonClosableMessageDialog("confirmRegistration", Application.getString(235), 
Application.getString(674)) {
                        private static final long serialVersionUID = 1L;
 
                        @Override
-                       public void onConfigure(JQueryBehavior behavior) {
-                               super.onConfigure(behavior);
-                               behavior.setOption("dialogClass", 
Options.asString("no-close"));
-                               behavior.setOption("closeOnEscape", false);
-                       }
-
-                       @Override
                        public void onClose(IPartialPageRequestHandler handler, 
DialogButton button) {
                                s.open(handler);
                        }
@@ -112,13 +102,6 @@ public class RegisterDialog extends 
AbstractFormDialog<String> {
                reset();
        }
 
-       @Override
-       public void onConfigure(JQueryBehavior behavior) {
-               super.onConfigure(behavior);
-               behavior.setOption("dialogClass", Options.asString("no-close"));
-               behavior.setOption("closeOnEscape", false);
-       }
-
        public void setSignInDialog(SignInDialog s) {
                this.s = s;
        }

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ResetPasswordDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ResetPasswordDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ResetPasswordDialog.java
index e0fefec..8346aa1 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ResetPasswordDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/ResetPasswordDialog.java
@@ -29,6 +29,8 @@ import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
 import org.apache.openmeetings.db.dao.user.UserDao;
 import org.apache.openmeetings.db.entity.user.User;
 import org.apache.openmeetings.web.app.Application;
+import org.apache.openmeetings.web.util.NonClosableDialog;
+import org.apache.openmeetings.web.util.NonClosableMessageDialog;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
@@ -39,14 +41,11 @@ import org.apache.wicket.model.Model;
 
 import com.googlecode.wicket.jquery.core.JQueryBehavior;
 import com.googlecode.wicket.jquery.core.Options;
-import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
 import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
-import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButtons;
-import com.googlecode.wicket.jquery.ui.widget.dialog.DialogIcon;
 import com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog;
 import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
 
-public class ResetPasswordDialog extends AbstractFormDialog<String> {
+public class ResetPasswordDialog extends NonClosableDialog<String> {
        private static final long serialVersionUID = 1L;
        private DialogButton resetBtn = new DialogButton("reset", 
Application.getString(327));
        private Form<String> form;
@@ -101,18 +100,10 @@ public class ResetPasswordDialog extends 
AbstractFormDialog<String> {
                        }
 
                });
-               confirmReset = new MessageDialog("confirmReset", 
Application.getString(325), Application.getString(332),
-                               DialogButtons.OK, DialogIcon.INFO) {
+               confirmReset = new NonClosableMessageDialog("confirmReset", 
Application.getString(325), Application.getString(332)) {
                        private static final long serialVersionUID = 1L;
 
                        @Override
-                       public void onConfigure(JQueryBehavior behavior) {
-                               super.onConfigure(behavior);
-                               behavior.setOption("dialogClass", 
Options.asString("no-close"));
-                               behavior.setOption("closeOnEscape", false);
-                       }
-
-                       @Override
                        public void onClose(IPartialPageRequestHandler handler, 
DialogButton button) {
                                
setResponsePage(Application.get().getSignInPageClass());
                        }
@@ -124,8 +115,6 @@ public class ResetPasswordDialog extends 
AbstractFormDialog<String> {
        public void onConfigure(JQueryBehavior behavior) {
                super.onConfigure(behavior);
                behavior.setOption("autoOpen", true);
-               behavior.setOption("dialogClass", Options.asString("no-close"));
-               behavior.setOption("closeOnEscape", false);
        }
 
        @Override

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInDialog.java
index 186a72b..4349a8f 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInDialog.java
@@ -42,6 +42,7 @@ import 
org.apache.openmeetings.web.app.OmAuthenticationStrategy;
 import org.apache.openmeetings.web.app.WebSession;
 import org.apache.openmeetings.web.common.OmAjaxClientInfoBehavior;
 import org.apache.openmeetings.web.pages.HashPage;
+import org.apache.openmeetings.web.util.NonClosableDialog;
 import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.RestartResponseException;
 import org.apache.wicket.ajax.AjaxEventBehavior;
@@ -72,11 +73,10 @@ import com.googlecode.wicket.jquery.core.JQueryBehavior;
 import com.googlecode.wicket.jquery.core.Options;
 import com.googlecode.wicket.jquery.ui.effect.JQueryEffectBehavior;
 import com.googlecode.wicket.jquery.ui.form.button.Button;
-import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
 import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
 import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
 
-public class SignInDialog extends AbstractFormDialog<String> {
+public class SignInDialog extends NonClosableDialog<String> {
        private static final long serialVersionUID = 1L;
        private Form<String> form;
        private DialogButton loginBtn = new DialogButton("login", 
Application.getString(112));
@@ -107,8 +107,6 @@ public class SignInDialog extends 
AbstractFormDialog<String> {
        public void onConfigure(JQueryBehavior behavior) {
                super.onConfigure(behavior);
                behavior.setOption("autoOpen", true);
-               behavior.setOption("closeOnEscape", false);
-               behavior.setOption("dialogClass", Options.asString("no-close"));
                behavior.setOption("resizable", false);
        }
 

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard.java
index 7b790da..0fdf955 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/install/InstallWizard.java
@@ -135,7 +135,7 @@ public class InstallWizard extends 
AbstractWizard<InstallationConfig> {
        public void onConfigure(JQueryBehavior behavior) {
                super.onConfigure(behavior);
                behavior.setOption("closeOnEscape", false);
-               behavior.setOption("dialogClass", Options.asString("no-close"));
+               behavior.setOption("classes", "{'ui-dialog-titlebar': 
'ui-corner-all no-close'}");
                behavior.setOption("resizable", false);
        }
 

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/NicknameDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/NicknameDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/NicknameDialog.java
index 094e38b..76879e5 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/NicknameDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/NicknameDialog.java
@@ -27,6 +27,7 @@ import java.util.List;
 import org.apache.commons.lang3.time.FastDateFormat;
 import org.apache.openmeetings.db.entity.user.User;
 import org.apache.openmeetings.web.app.Application;
+import org.apache.openmeetings.web.util.NonClosableDialog;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import 
org.apache.wicket.extensions.validation.validator.RfcCompliantEmailAddressValidator;
 import org.apache.wicket.markup.html.form.Form;
@@ -37,11 +38,10 @@ import org.apache.wicket.util.string.Strings;
 
 import com.googlecode.wicket.jquery.core.JQueryBehavior;
 import com.googlecode.wicket.jquery.core.Options;
-import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
 import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
 import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
 
-public class NicknameDialog extends AbstractFormDialog<User> {
+public class NicknameDialog extends NonClosableDialog<User> {
        private static final long serialVersionUID = 1L;
        private static final FastDateFormat TIME_DF = 
FastDateFormat.getInstance("HH:mm:ss");
        private final KendoFeedbackPanel feedback = new 
KendoFeedbackPanel("feedback", new Options("button", true));
@@ -72,8 +72,6 @@ public class NicknameDialog extends AbstractFormDialog<User> {
        public void onConfigure(JQueryBehavior behavior) {
                super.onConfigure(behavior);
                behavior.setOption("autoOpen", 
isVisible(form.getModelObject()));
-               behavior.setOption("closeOnEscape", false);
-               behavior.setOption("dialogClass", Options.asString("no-close"));
                behavior.setOption("resizable", false);
        }
 

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RedirectMessageDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RedirectMessageDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RedirectMessageDialog.java
index 9da7695..76bd5c5 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RedirectMessageDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RedirectMessageDialog.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 
 import org.apache.directory.api.util.Strings;
 import org.apache.openmeetings.web.app.Application;
+import org.apache.openmeetings.web.util.NonClosableMessageDialog;
 import org.apache.wicket.Component;
 import org.apache.wicket.RestartResponseException;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -30,26 +31,24 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.request.flow.RedirectToUrlException;
 
 import com.googlecode.wicket.jquery.core.JQueryBehavior;
-import com.googlecode.wicket.jquery.core.Options;
 import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
 import com.googlecode.wicket.jquery.ui.widget.dialog.DialogIcon;
-import com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog;
 
-public class RedirectMessageDialog extends MessageDialog {
+public class RedirectMessageDialog extends NonClosableMessageDialog {
        private static final long serialVersionUID = 1L;
        private final String labelId;
        private final String url;
        private final int delay = 5;
        private final boolean autoOpen;
-       private Component label; 
-       
+       private Component label;
+
        public RedirectMessageDialog(String id, String labelId, boolean 
autoOpen, String url) {
                super(id, Application.getString(204), "", new 
ArrayList<DialogButton>(), DialogIcon.ERROR);
                this.labelId = labelId;
                this.url = url;
                this.autoOpen = autoOpen;
        }
-       
+
        @Override
        protected void onInitialize() {
                super.onInitialize();
@@ -75,36 +74,34 @@ public class RedirectMessageDialog extends MessageDialog {
                        handler.add(label);
                }
        }
-       
+
        @Override
        protected void onOpen(IPartialPageRequestHandler handler) {
                super.onOpen(handler);
                startTimer(handler);
        }
-       
+
        @Override
        public void onConfigure(JQueryBehavior behavior) {
                super.onConfigure(behavior);
                behavior.setOption("autoOpen", autoOpen);
-               behavior.setOption("closeOnEscape", false);
-               behavior.setOption("dialogClass", Options.asString("no-close"));
                behavior.setOption("resizable", false);
        }
-       
+
        @Override
        public boolean isModal() {
                return true;
        }
-       
+
        @Override
        public boolean isDefaultCloseEventEnabled() {
                return false;
        }
-       
+
        @Override
        public void onClose(IPartialPageRequestHandler handler, DialogButton 
button) {
        }
-       
+
        @Override
        protected Component newLabel(String id, IModel<String> model) {
                label = super.newLabel(id, model);

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
index fd447d7..1fb06cc 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
@@ -17,6 +17,7 @@
  * under the License.
  */
 function initVideo(_options) {
+       return; //commented until video is implemented
        var options = $.extend({bgcolor: "#ffffff"
                , resolutions: JSON.stringify([{label: "4:3 (~6 KByte/sec)", 
width: 40, height: 30}
                        , {label: "4:3 (~12 KByte/sec)", width: 80, height: 60}
@@ -37,7 +38,7 @@ function initVideo(_options) {
        var type = 'application/x-shockwave-flash';
        var src = 'public/main.swf?cache' + new Date().getTime();
        var r = $('<div class="room video">').attr("id", "video" + options.uid);
-       var o = $('<object>').attr('type', type).attr('data', src);
+       var o = $('<object>').attr('type', type).attr('data', 
src).attr('width', 640).attr('height', 480);
        o.append($('<param>').attr('name', 'quality').attr('value', 'best'))
                .append($('<param>').attr('name', 'wmode').attr('value', 
'transparent'))
                .append($('<param>').attr('name', 
'allowscriptaccess').attr('value', 'sameDomain'))
@@ -104,6 +105,7 @@ function roomLoad() {
                        setRoomSizes();
                }
        });
+       VideoSettings.init();
        Wicket.Event.subscribe("/websocket/closed", roomClosed);
 }
 function roomUnload() {
@@ -112,12 +114,61 @@ function roomUnload() {
        if (!!WbArea) {
                WbArea.destroy();
        }
+       VideoSettings.close();
 }
 function startPrivateChat(el) {
        Chat.addTab('chatTab-u' + el.parent().parent().data("userid"), 
el.parent().parent().find('.user.name').text());
        Chat.open();
        $('#chatMessage .wysiwyg-editor').click();
 }
+var VideoSettings = (function() {
+       var self = {}, vs, lm;
+       function _init() {
+               vs = $('#video-settings');
+               lm = vs.find('.level-meter');
+               vs.dialog({
+                       classes: {
+                               'ui-dialog': 'ui-corner-all video'
+                       }
+                       , width: 640
+                       , autoOpen: false
+                       , buttons: [
+                               {
+                                       text: vs.data('btn-save')
+                                       , icons: {
+                                               primary: "ui-icon-disk"
+                                       }
+                                       , click: function() {
+                                               vs.dialog("close");
+                                       }
+                               }
+                               , {
+                                       text: vs.data('btn-cancel')
+                                       , click: function() {
+                                               vs.dialog("close");
+                                       }
+                               }
+                       ]
+               });
+               lm.progressbar({ value: 0 });
+               vs.find('button').button();
+       }
+       function _open(interview) {
+               var rr = vs.find('.cam-resolution').parent('.sett-row');
+               if (interview) {
+                       rr.show();
+               } else {
+                       rr.hide();
+               }
+               vs.dialog('open');
+       }
+       return {
+               init: _init
+               , open: _open
+               , close: function() { vs.dialog('close'); }
+       };
+})();
+
 /***** functions required by SIP   ******/
 function sipBtnClick() {
        var txt = $('.sip-number');

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.html
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.html
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.html
index a174b10..9e5b7ac 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.html
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.html
@@ -40,5 +40,72 @@
        <form wicket:id="form"><div wicket:id="confirm-trash"></div></form>
        <div wicket:id="upload"></div>
        <div wicket:id="confirm-kick" />
+       <div id="video-settings" wicket:message="title:51, data-btn-save:144, 
data-btn-cancel:25" style="display:none;">
+               <div class="title"><wicket:message key="758"/></div>
+               <div class="sett-container">
+                       <div class="opt-block">
+                               <div class="sett-row">
+                                       <div><wicket:message key="52"/></div>
+                                       <div>
+                                               <select class="cam">
+                                                       <option 
value="-1"><wicket:message key="159"/></option>
+                                               </select>
+                                       </div>
+                               </div>
+                               <div class="sett-row">
+                                       <div><wicket:message key="53"/></div>
+                                       <div>
+                                               <select class="mic">
+                                                       <option 
value="-1"><wicket:message key="159"/></option>
+                                               </select>
+                                       </div>
+                               </div>
+                               <div class="sett-row">
+                                       <div class="clear">
+                                               <wicket:message key="1429"/>
+                                               <span class="warn 
ui-state-highlight" wicket:message="title:1430">
+                                                       <span class="ui-icon 
ui-icon-alert"></span>
+                                               </span>
+                                       </div>
+                                       <div>
+                                               <select class="cam-resolution">
+                                                       <option value="1" 
data-width="40" data-height="30">40x30 [4:3 (~6 KByte/sec)]</option>
+                                                       <option value="2" 
data-width="80" data-height="60">80x60 [4:3 (~12 KByte/sec)]</option>
+                                                       <option value="3" 
data-width="120" data-height="90" selected="selected">120x90 [4:3 (~20 
KByte/sec)]</option>
+                                                       <option value="4" 
data-width="160" data-height="120">160x120 [QQVGA 4:3 (~36 KByte/sec)]</option>
+                                                       <option value="5" 
data-width="240" data-height="180">240x180 [4:3 (~40 KByte/sec)]</option>
+                                                       <option value="6" 
data-width="320" data-height="240">320x240 [HVGA 4:3 (~56 KByte/sec)]</option>
+                                                       <option value="7" 
data-width="480" data-height="360">480x360 [4:3  (~60 KByte/sec)]</option>
+                                                       <option value="8" 
data-width="640" data-height="480">640x480 [4:3 (~68 KByte/sec)]</option>
+                                                       <option value="9" 
data-width="1024" data-height="768">1024x768 [XGA 4:3]</option>
+                                                       <option value="10" 
data-width="256" data-height="150">256x150 [16:9]</option>
+                                                       <option value="11" 
data-width="432" data-height="240">432x240 [WQVGA 9:5]</option>
+                                                       <option value="12" 
data-width="480" data-height="234">480x234 [pseudo 16:9]</option>
+                                                       <option value="13" 
data-width="512" data-height="300">512x300 [16:9]</option>
+                                                       <option value="14" 
data-width="640" data-height="360">640x360 [nHD 16:9]</option>
+                                                       <option value="15" 
data-width="1024" data-height="600">1024x600 [16:9]</option>
+                                               </select>
+                                       </div>
+                               </div>
+                               <div class="sett-row">
+                                       <div 
class="align-right"><button><wicket:message key="775"/></button></div>
+                               </div>
+                       </div>
+                       <div class="vid-block">
+                               <div>
+                               </div>
+                               <div class="level-meter"></div>
+                               <div class="sett-row">
+                                       <div 
class="align-right"><button><wicket:message key="764"/></button></div>
+                               </div>
+                       </div>
+               </div>
+               <div>
+                       <span style="padding: 5px;">
+                               <span class="ui-icon ui-icon-info"></span>
+                       </span>
+                       <wicket:message key="765"/>
+               </div>
+       </div>
 </wicket:panel>
 </html>

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/SettingsIcon.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/SettingsIcon.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/SettingsIcon.java
index 566dae5..0c9f020 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/SettingsIcon.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/SettingsIcon.java
@@ -24,7 +24,7 @@ import org.apache.openmeetings.web.room.RoomPanel;
 
 public class SettingsIcon extends ClientIcon {
        private static final long serialVersionUID = 1L;
-       
+
        public SettingsIcon(String id, Client client, RoomPanel room) {
                super(id, client, room);
                mainCssClass = "settings ";
@@ -42,6 +42,6 @@ public class SettingsIcon extends ClientIcon {
 
        @Override
        protected String getScript() {
-               return 
String.format("document.getElementById('lzapp').showAvSettings(%s);", 
Room.Type.interview == room.getRoom().getType());
+               return String.format("VideoSettings.open(%s);", 
Room.Type.interview == room.getRoom().getType());
        }
 }

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.java
index 4f3762a..47e6fd4 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/WbPanel.java
@@ -18,11 +18,17 @@
  */
 package org.apache.openmeetings.web.room.wb;
 
+import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 import static org.apache.openmeetings.web.app.Application.getBean;
 import static 
org.apache.openmeetings.web.util.CallbackFunctionHelper.getNamedFunction;
 import static org.apache.wicket.AttributeModifier.append;
 import static org.apache.wicket.ajax.attributes.CallbackParameter.explicit;
 
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
 import java.util.Arrays;
 import java.util.Map.Entry;
 import java.util.UUID;
@@ -35,7 +41,9 @@ import org.apache.openmeetings.db.dao.record.RecordingDao;
 import org.apache.openmeetings.db.dto.room.Whiteboard;
 import org.apache.openmeetings.db.dto.room.Whiteboards;
 import org.apache.openmeetings.db.entity.basic.Client;
+import org.apache.openmeetings.db.entity.file.FileExplorerItem;
 import org.apache.openmeetings.db.entity.file.FileItem;
+import org.apache.openmeetings.db.entity.file.FileItem.Type;
 import org.apache.openmeetings.db.entity.room.Room.Right;
 import org.apache.openmeetings.db.entity.room.Room.RoomElement;
 import org.apache.openmeetings.util.OmFileHelper;
@@ -63,12 +71,16 @@ import 
org.apache.wicket.request.resource.JavaScriptResourceReference;
 import org.apache.wicket.request.resource.ResourceReference;
 import org.apache.wicket.resource.FileSystemResourceReference;
 import org.apache.wicket.util.string.StringValue;
+import org.red5.logging.Red5LoggerFactory;
+import org.slf4j.Logger;
 
 import com.github.openjson.JSONArray;
 import com.github.openjson.JSONObject;
+import com.github.openjson.JSONTokener;
 
 public class WbPanel extends Panel {
        private static final long serialVersionUID = 1L;
+       private static final Logger log = 
Red5LoggerFactory.getLogger(WbPanel.class, webAppRootKey);
        private static final int UPLOAD_WB_LEFT = 0;
        private static final int UPLOAD_WB_TOP = 0;
        private static final int DEFAULT_WIDTH = 640;
@@ -126,19 +138,19 @@ public class WbPanel extends Panel {
                                                        break;
                                                case removeWb:
                                                {
-                                                       long _id = 
obj.optLong("id", -1);
+                                                       long _id = 
obj.optLong("wbId", -1);
                                                        Long id = _id < 0 ? 
null : _id;
                                                        
getBean(WhiteboardCache.class).remove(roomId, id);
-                                                       
sendWbAll(Action.removeWb, new JSONObject().put("id", id));
+                                                       
sendWbAll(Action.removeWb, obj);
                                                }
                                                        break;
                                                case activateWb:
                                                {
-                                                       long _id = 
obj.optLong("id", -1);
+                                                       long _id = 
obj.optLong("wbId", -1);
                                                        if (_id > -1) {
                                                                Whiteboards wbs 
= getBean(WhiteboardCache.class).get(roomId);
                                                                
wbs.setActiveWb(_id);
-                                                               
sendWbAll(Action.activateWb, new JSONObject().put("id", _id));
+                                                               
sendWbAll(Action.activateWb, obj);
                                                        }
                                                }
                                                        break;
@@ -185,8 +197,7 @@ public class WbPanel extends Panel {
                                                case clearAll:
                                                {
                                                        Whiteboard wb = 
getBean(WhiteboardCache.class).get(roomId).get(obj.getLong("wbId"));
-                                                       wb.clear();
-                                                       
sendWbAll(Action.clearAll, obj);
+                                                       clearAll(wb);
                                                }
                                                        break;
                                                case clearSlide:
@@ -213,7 +224,19 @@ public class WbPanel extends Panel {
                @Override
                protected void onSubmit(AjaxRequestTarget target) {
                        Whiteboard wb = 
getBean(WhiteboardCache.class).get(roomId).get(wb2save);
-                       wb.toJson();
+                       FileExplorerItem f = new FileExplorerItem();
+                       f.setType(Type.WmlFile);
+                       f.setRoomId(roomId);
+                       f.setHash(UUID.randomUUID().toString());
+                       f.setName(getModelObject());
+                       f = getBean(FileExplorerItemDao.class).update(f);
+                       try (BufferedWriter writer = 
Files.newBufferedWriter(f.getFile().toPath())) {
+                               writer.write(wb.toJson().toString(2));
+                       } catch (IOException e) {
+                               error("Unexpected error while saving WB: " + 
e.getMessage());
+                               target.add(feedback);
+                               log.error("Unexpected error while saving WB", 
e);
+                       }
                }
 
                @Override
@@ -274,7 +297,7 @@ public class WbPanel extends Panel {
                        }
                        
sb.append("WbArea.load(").append(getObjWbJson(entry.getKey(), 
arr).toString()).append(");");
                }
-               sb.append("WbArea.activateWb({id: 
").append(wbs.getActiveWb()).append("});");
+               sb.append("WbArea.activateWb({wbId: 
").append(wbs.getActiveWb()).append("});");
                response.render(OnDomReadyHeaderItem.forScript(sb));
        }
 
@@ -289,23 +312,18 @@ public class WbPanel extends Panel {
        private void sendWb(Action meth, JSONObject obj, Predicate<Client> 
check) {
                WebSocketHelper.sendRoom(
                                roomId
-                               , new JSONObject()
-                                               .put("type", "wb")
+                               , new JSONObject().put("type", "wb")
                                , check
                                , (o, c) -> o.put("func", 
String.format("WbArea.%s(%s);", meth.name(), obj.toString())).toString()
                        );
        }
 
        private static JSONObject getObjWbJson(Long wbId, Object o) {
-               return new JSONObject()
-                               .put("wbId", wbId)
-                               .put(PARAM_OBJ, o);
+               return new JSONObject().put("wbId", wbId).put(PARAM_OBJ, o);
        }
 
        private static JSONObject getAddWbJson(Long id, String name) {
-               return new JSONObject()
-                               .put("id", id)
-                               .put("name", name);
+               return new JSONObject().put("wbId", id).put("name", name);
        }
 
        public boolean isReadOnly() {
@@ -327,7 +345,7 @@ public class WbPanel extends Panel {
 
        private JSONObject addFileUrl(String ruid, JSONObject _file) {
                try {
-               final long fid = _file.optLong("fileId", -1);
+                       final long fid = _file.optLong("fileId", -1);
                        if (fid > 0) {
                                FileItem fi = 
FileItem.Type.Recording.name().equals(_file.optString("fileType"))
                                                ? 
getBean(RecordingDao.class).get(fid)
@@ -371,72 +389,78 @@ public class WbPanel extends Panel {
                return file;
        }
 
-       /*
-        * OLD VERSION
-        *
-       public void sendFileToWb(FileItem fi, boolean clean) {
-               if (wb.isVisible() && fi.getId() != null && 
FileItem.Type.Folder != fi.getType()) {
-                       long activeWbId = -1;
-                       if (FileItem.Type.WmlFile == fi.getType()) {
-                               
getBean(ConferenceLibrary.class).sendToWhiteboard(getClient().getUid(), 
activeWbId, fi);
-                       } else {
-                               String url = null;
-                               PageParameters pp = new PageParameters();
-                               pp.add("id", fi.getId())
-                                       .add("ruid", 
getBean(WhiteboardCache.class).get(r.getId()).getUid());
-                               switch (fi.getType()) {
-                                       case Video:
-                                               pp.add("preview", true);
-                                               url = urlFor(new 
RoomResourceReference(), pp).toString();
-                                               break;
-                                       case Recording:
-                                               url = urlFor(new 
JpgRecordingResourceReference(), pp).toString();
-                                               break;
-                                       default:
-                                               url = urlFor(new 
RoomResourceReference(), pp).toString();
-                                               break;
-                               }
-                               
getBean(ScopeApplicationAdapter.class).sendToWhiteboard(getClient().getUid(), 
activeWbId, fi, url, clean);
-                       }
-               }
+       private void clearAll(Whiteboard wb) {
+               wb.clear();
+               sendWbAll(Action.clearAll, new JSONObject().put("wbId", 
wb.getId()));
        }
-        */
 
        public void sendFileToWb(FileItem fi, boolean clean) {
-               if (isVisible() && fi.getId() != null && FileItem.Type.Folder 
!= fi.getType()) {
-                       //FIXME TODO WmlFile/Chart special handling
+               if (isVisible() && fi.getId() != null) {
                        Whiteboards wbs = 
getBean(WhiteboardCache.class).get(roomId);
                        String wuid = UUID.randomUUID().toString();
                        Whiteboard wb = wbs.get(wbs.getActiveWb());
-                       //FIXME TODO various types
-                       JSONObject file = new JSONObject()
-                                       .put("fileId", fi.getId())
-                                       .put("fileType", fi.getType().name())
-                                       .put("count", fi.getCount())
-                                       .put("type", "image")
-                                       .put("left", UPLOAD_WB_LEFT)
-                                       .put("top", UPLOAD_WB_TOP)
-                                       .put("width", fi.getWidth() == null ? 
DEFAULT_WIDTH : fi.getWidth())
-                                       .put("height", fi.getHeight() == null ? 
DEFAULT_HEIGHT : fi.getHeight())
-                                       .put("uid", wuid)
-                                       .put("slide", wb.getSlide())
-                                       ;
-                       wb.put(wuid, file);
-                       final String ruid = wbs.getUid();
-                       if (clean) {
-                               sendWbAll(Action.clearAll, new 
JSONObject().put("wbId", wb.getId()));
-                       }
-                       WebSocketHelper.sendRoom(
-                                       roomId
-                                       , new JSONObject().put("type", "wb")
-                                       , null
-                                       , (o, c) -> {
-                                                       return o.put("func", 
String.format("WbArea.%s(%s);"
-                                                                       , 
Action.createObj.name()
-                                                                       , 
getObjWbJson(wb.getId(), addFileUrl(ruid, file, fi, c)).toString())
-                                                               ).toString();
+                       switch (fi.getType()) {
+                               case Folder:
+                                       //do nothing
+                                       break;
+                               case WmlFile:
+                               {
+                                       File f = fi.getFile();
+                                       if (f.exists() && f.isFile()) {
+                                               try (BufferedReader br = 
Files.newBufferedReader(f.toPath())) {
+                                                       JSONObject wbo = new 
JSONObject(new JSONTokener(br));
+                                                       
/*WebSocketHelper.sendRoom(
+                                                                       roomId
+                                                                       , new 
JSONObject().put("type", "wb")
+                                                                       , null
+                                                                       , (o, 
c) -> {
+                                                                               
        return o.put("func", String.format("WbArea.%s(%s);"
+                                                                               
                        , Action.createObj.name()
+                                                                               
                        , getObjWbJson(wb.getId(), addFileUrl(ruid, file, fi, 
c)).toString())
+                                                                               
                ).toString();
+                                                                               
}
+                                                                       );*/
+                                               } catch (IOException e) {
+                                                       log.error("Unexpected 
error while loading WB", e);
                                                }
-                                       );
+                                       }
+                               }
+                                       break;
+                               case PollChart:
+                                       break;
+                               default:
+                               {
+                                       JSONObject file = new JSONObject()
+                                                       .put("fileId", 
fi.getId())
+                                                       .put("fileType", 
fi.getType().name())
+                                                       .put("count", 
fi.getCount())
+                                                       .put("type", "image")
+                                                       .put("left", 
UPLOAD_WB_LEFT)
+                                                       .put("top", 
UPLOAD_WB_TOP)
+                                                       .put("width", 
fi.getWidth() == null ? DEFAULT_WIDTH : fi.getWidth())
+                                                       .put("height", 
fi.getHeight() == null ? DEFAULT_HEIGHT : fi.getHeight())
+                                                       .put("uid", wuid)
+                                                       .put("slide", 
wb.getSlide())
+                                                       ;
+                                       wb.put(wuid, file);
+                                       final String ruid = wbs.getUid();
+                                       if (clean) {
+                                               clearAll(wb);
+                                       }
+                                       WebSocketHelper.sendRoom(
+                                                       roomId
+                                                       , new 
JSONObject().put("type", "wb")
+                                                       , null
+                                                       , (o, c) -> {
+                                                                       return 
o.put("func", String.format("WbArea.%s(%s);"
+                                                                               
        , Action.createObj.name()
+                                                                               
        , getObjWbJson(wb.getId(), addFileUrl(ruid, file, fi, c)).toString())
+                                                                               
).toString();
+                                                               }
+                                                       );
+                               }
+                                       break;
+                       }
                }
        }
 

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb.js
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb.js 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb.js
index d2da4dd..f580f19 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/wb.js
@@ -1085,6 +1085,15 @@ var WbArea = (function() {
                });
                wbTabs.find(".ui-tabs-panel .scroll-container").height(wbah);
        }
+       function _addCloseBtn(li) {
+               if (readOnly) {
+                       return;
+               }
+               li.append($('#wb-tab-close').clone().attr('id', ''));
+               li.find('button').click(function() {
+                       wbAction('removeWb', JSON.stringify({wbId: 
li.data().wbId}));
+               });
+       }
        self.getWbTabId = function(id) {
                return "wb-tab-" + id;
        };
@@ -1122,10 +1131,8 @@ var WbArea = (function() {
                                        scroll.scrollLeft(scroll.scrollLeft() + 
30);
                                });
                                tabsNav.find('li').each(function(idx) {
-                                       
$(this).append($('#wb-tab-close').clone().attr('id', ''));
-                                       $(this).find('button').click(function() 
{
-                                               wbAction('removeWb', 
JSON.stringify({id: obj.id}));
-                                       });
+                                       var li = $(this);
+                                       _addCloseBtn(li);
                                });
                                $(window).keyup(deleteHandler);
                        }
@@ -1145,7 +1152,7 @@ var WbArea = (function() {
                                return res;
                        }
                        , activate: function(e, ui) {
-                               wbAction('activateWb', JSON.stringify({id: 
ui.newTab.data('wb-id')}));
+                               wbAction('activateWb', JSON.stringify({wbId: 
ui.newTab.data('wb-id')}));
                        }
                });
                scroll = tabs.find('.scroll-container');
@@ -1162,26 +1169,28 @@ var WbArea = (function() {
                $(window).off('keyup', deleteHandler);
        };
        self.create = function(obj) {
-               var tid = self.getWbTabId(obj.id)
-                       , li = $('#wb-area-tab').clone().attr('id', 
'').data('wb-id', obj.id)
+               var tid = self.getWbTabId(obj.wbId)
+                       , li = $('#wb-area-tab').clone().attr('id', 
'').data('wb-id', obj.wbId)
                        , wb = $('#wb-area').clone().attr('id', tid);
                li.find('a').text(obj.name).attr('title', 
obj.name).attr('href', "#" + tid);
        
                tabs.find(".ui-tabs-nav").append(li);
                tabs.append(wb);
                refreshTabs();
+               _addCloseBtn(li);
        
                var wbo = Wb();
                wb.data(wbo);
-               wbo.init(obj.id, tid, readOnly);
+               wbo.init(obj.wbId, tid, readOnly);
                _resizeWbs();
        }
        self.createWb = function(obj) {
                self.create(obj);
-               _activateTab(obj.id);
+               self.setReadOnly(readOnly);
+               _activateTab(obj.wbId);
        };
        self.activateWb = function(obj) {
-               _activateTab(obj.id);
+               _activateTab(obj.wbId);
        }
        self.load = function(json) {
                self.getWb(json.wbId).load(json.obj);
@@ -1206,7 +1215,7 @@ var WbArea = (function() {
                self.getWb(json.wbId).clearSlide(json.slide);
        };
        self.removeWb = function(obj) {
-               var tabId = self.getWbTabId(obj.id);
+               var tabId = self.getWbTabId(obj.wbId);
                tabs.find('li[aria-controls="' + tabId + '"]').remove();
                $("#" + tabId).remove();
                refreshTabs();

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
index bb7e55a..e468e36 100644
--- 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.java
@@ -129,7 +129,7 @@ public class AppointmentDialog extends 
AbstractFormDialog<Appointment> {
        @Override
        public void onConfigure(JQueryBehavior behavior) {
                super.onConfigure(behavior);
-               behavior.setOption("dialogClass", 
Options.asString("appointment"));
+               behavior.setOption("classes", "{'ui-dialog': 'ui-corner-all 
appointment'}");
        }
 
        public void setModelObjectWithAjaxTarget(Appointment a, 
AjaxRequestTarget target) {

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/NonClosableDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/NonClosableDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/NonClosableDialog.java
new file mode 100644
index 0000000..8f8a5ec
--- /dev/null
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/NonClosableDialog.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.web.util;
+
+import java.io.Serializable;
+
+import com.googlecode.wicket.jquery.core.JQueryBehavior;
+import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
+
+public abstract class NonClosableDialog<T extends Serializable> extends 
AbstractFormDialog<T> {
+       private static final long serialVersionUID = 1L;
+
+       public NonClosableDialog(String id, String title) {
+               super(id, title);
+       }
+
+       @Override
+       public void onConfigure(JQueryBehavior behavior) {
+               super.onConfigure(behavior);
+               behavior.setOption("closeOnEscape", false);
+               behavior.setOption("classes", "{'ui-dialog-titlebar': 
'ui-corner-all no-close'}");
+       }
+}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/NonClosableMessageDialog.java
----------------------------------------------------------------------
diff --git 
a/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/NonClosableMessageDialog.java
 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/NonClosableMessageDialog.java
new file mode 100644
index 0000000..2778268
--- /dev/null
+++ 
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/NonClosableMessageDialog.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") +  you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openmeetings.web.util;
+
+import java.util.List;
+
+import com.googlecode.wicket.jquery.core.JQueryBehavior;
+import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
+import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButtons;
+import com.googlecode.wicket.jquery.ui.widget.dialog.DialogIcon;
+import com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog;;
+
+public abstract class NonClosableMessageDialog extends MessageDialog {
+       private static final long serialVersionUID = 1L;
+
+       public NonClosableMessageDialog(String id, String title, String 
message) {
+               super(id, title, message, DialogButtons.OK, DialogIcon.INFO);
+       }
+
+       public NonClosableMessageDialog(String id, String title, String 
message, List<DialogButton> buttons, DialogIcon icon) {
+               super(id, title, message, buttons, icon);
+       }
+
+       @Override
+       public void onConfigure(JQueryBehavior behavior) {
+               super.onConfigure(behavior);
+               behavior.setOption("classes", "{'ui-dialog-titlebar': 
'ui-corner-all no-close'}");
+               behavior.setOption("closeOnEscape", false);
+       }
+}

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/35544aaf/openmeetings-web/src/main/webapp/css/room.css
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/webapp/css/room.css 
b/openmeetings-web/src/main/webapp/css/room.css
index cfbe13c..18f6f4c 100644
--- a/openmeetings-web/src/main/webapp/css/room.css
+++ b/openmeetings-web/src/main/webapp/css/room.css
@@ -356,6 +356,43 @@
        padding: 0;
        overflow: hidden;
 }
+.ui-dialog.video .ui-dialog-titlebar {
+       padding-left:10px
+}
+.ui-dialog.video .title {
+       font-weight: bold;
+}
+.ui-dialog.video .opt-block {
+       width: 300px;
+       display: inline-block;
+       position: absolute;
+       top: 0;
+       left: 0;
+}
+.ui-dialog.video .vid-block {
+       min-width: 300px;
+       padding-left: 305px;
+}
+.ui-dialog.video .level-meter {
+       height: 16px;
+}
+.ui-dialog.video .warn {
+       float: right;
+       margin-right: .3em;
+}
+.ui-dialog.video .level-meter .ui-progressbar-value {
+       background: greenyellow;
+}
+.ui-dialog.video .sett-container {
+       position: relative;
+       min-height: 200px;
+}
+.ui-dialog.video .sett-row {
+       padding-top: 10px;
+}
+.ui-dialog.video .sett-row select, .ui-dialog.video .level-meter {
+       width: 250px;
+}
 .input .select2-container {
        max-height: 100px;
        overflow-y: auto;

Reply via email to