You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2017/08/28 07:53:14 UTC
openmeetings git commit: [OPENMEETINGS-1638] initial commit
Repository: openmeetings
Updated Branches:
refs/heads/master 42c1aad6f -> 66f3b707b
[OPENMEETINGS-1638] initial commit
Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo
Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/66f3b707
Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/66f3b707
Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/66f3b707
Branch: refs/heads/master
Commit: 66f3b707b25dce0a32355c97b4ae7bb4bfa4522c
Parents: 42c1aad
Author: Maxim Solodovnik <so...@gmail.com>
Authored: Mon Aug 28 14:53:07 2017 +0700
Committer: Maxim Solodovnik <so...@gmail.com>
Committed: Mon Aug 28 14:53:07 2017 +0700
----------------------------------------------------------------------
.../apache/openmeetings/web/room/RoomPanel.java | 63 ++++++++++++--------
.../web/room/menu/RoomMenuPanel.java | 57 ++++++++++--------
.../web/room/sidebar/RoomSidebar.java | 4 +-
.../web/room/wb/AbstractWbPanel.java | 39 ++++++++++++
.../web/room/wb/InterviewWbPanel.html | 24 ++++++++
.../web/room/wb/InterviewWbPanel.java | 43 +++++++++++++
.../openmeetings/web/room/wb/WbPanel.java | 9 ++-
.../openmeetings/web/room/wb/interviewwb.js | 36 +++++++++++
8 files changed, 219 insertions(+), 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/66f3b707/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
index 8f41b31..ed6f9bc 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
@@ -29,6 +29,7 @@ import static org.apache.openmeetings.web.app.Application.getRoomClients;
import static org.apache.openmeetings.web.app.Application.update;
import static org.apache.openmeetings.web.app.WebSession.getDateFormat;
import static org.apache.openmeetings.web.app.WebSession.getUserId;
+import static org.apache.openmeetings.web.room.wb.InterviewWbPanel.INTERVIEWWB_JS_REFERENCE;
import static org.apache.openmeetings.web.room.wb.WbPanel.WB_JS_REFERENCE;
import static org.apache.wicket.util.time.Duration.NONE;
@@ -69,6 +70,8 @@ import org.apache.openmeetings.web.room.activities.ActivitiesPanel;
import org.apache.openmeetings.web.room.activities.Activity;
import org.apache.openmeetings.web.room.menu.RoomMenuPanel;
import org.apache.openmeetings.web.room.sidebar.RoomSidebar;
+import org.apache.openmeetings.web.room.wb.AbstractWbPanel;
+import org.apache.openmeetings.web.room.wb.InterviewWbPanel;
import org.apache.openmeetings.web.room.wb.WbPanel;
import org.apache.openmeetings.web.util.ExtendedClientProperties;
import org.apache.wicket.AttributeModifier;
@@ -155,7 +158,7 @@ public class RoomPanel extends BasePanel {
private RoomMenuPanel menu;
private RoomSidebar sidebar;
private ActivitiesPanel activities;
- private final WbPanel wb;
+ private final AbstractWbPanel wb;
private String sharingUser = null;
private String recordingUser = null;
private byte[] pdfWb;
@@ -200,7 +203,9 @@ public class RoomPanel extends BasePanel {
public RoomPanel(String id, Room r) {
super(id);
this.r = r;
- this.wb = new WbPanel("whiteboard", this);
+ this.wb = Room.Type.interview == r.getType()
+ ? new InterviewWbPanel("whiteboard", this)
+ : new WbPanel("whiteboard", this);
}
private void initVideos(AjaxRequestTarget target) {
@@ -227,32 +232,36 @@ public class RoomPanel extends BasePanel {
room.add(menu = new RoomMenuPanel("menu", this));
room.add(AttributeModifier.append("data-room-id", r.getId()));
- Droppable<FileItem> wbArea = new Droppable<FileItem>("wb-area") {
- private static final long serialVersionUID = 1L;
+ if (Room.Type.interview == r.getType()) {
+ room.add(new WebMarkupContainer("wb-area").add(wb));
+ } else {
+ Droppable<FileItem> wbArea = new Droppable<FileItem>("wb-area") {
+ private static final long serialVersionUID = 1L;
- @Override
- public void onConfigure(JQueryBehavior behavior) {
- super.onConfigure(behavior);
- behavior.setOption("hoverClass", Options.asString("ui-state-hover"));
- behavior.setOption("accept", Options.asString(".recorditem, .fileitem, .readonlyitem"));
- }
+ @Override
+ public void onConfigure(JQueryBehavior behavior) {
+ super.onConfigure(behavior);
+ behavior.setOption("hoverClass", Options.asString("ui-state-hover"));
+ behavior.setOption("accept", Options.asString(".recorditem, .fileitem, .readonlyitem"));
+ }
- @Override
- public void onDrop(AjaxRequestTarget target, Component component) {
- Object o = component.getDefaultModelObject();
- if (wb.isVisible() && o instanceof FileItem) {
- FileItem f = (FileItem)o;
- if (sidebar.getFilesPanel().isSelected(f)) {
- for (Entry<String, FileItem> e : sidebar.getFilesPanel().getSelected().entrySet()) {
- wb.sendFileToWb(e.getValue(), false);
+ @Override
+ public void onDrop(AjaxRequestTarget target, Component component) {
+ Object o = component.getDefaultModelObject();
+ if (wb.isVisible() && o instanceof FileItem) {
+ FileItem f = (FileItem)o;
+ if (sidebar.getFilesPanel().isSelected(f)) {
+ for (Entry<String, FileItem> e : sidebar.getFilesPanel().getSelected().entrySet()) {
+ wb.sendFileToWb(e.getValue(), false);
+ }
+ } else {
+ wb.sendFileToWb(f, false);
}
- } else {
- wb.sendFileToWb(f, false);
}
}
- }
- };
- room.add(wbArea.add(wb));
+ };
+ room.add(wbArea.add(wb));
+ }
room.add(roomEnter);
room.add(sidebar = new RoomSidebar("sidebar", this));
room.add(activities = new ActivitiesPanel("activities", this));
@@ -651,7 +660,11 @@ public class RoomPanel extends BasePanel {
super.renderHead(response);
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(RoomPanel.class, "jquery.dialogextend.js"))));
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(RoomPanel.class, "room.js"))));
- response.render(JavaScriptHeaderItem.forReference(WB_JS_REFERENCE));
+ if (Room.Type.interview == r.getType()) {
+ response.render(JavaScriptHeaderItem.forReference(INTERVIEWWB_JS_REFERENCE));
+ } else {
+ response.render(JavaScriptHeaderItem.forReference(WB_JS_REFERENCE));
+ }
WebSession ws = WebSession.get();
if (!Strings.isEmpty(r.getRedirectURL()) && (ws.getSoapLogin() != null || ws.getInvitation() != null)) {
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forScript(
@@ -765,7 +778,7 @@ public class RoomPanel extends BasePanel {
return sidebar;
}
- public WbPanel getWb() {
+ public AbstractWbPanel getWb() {
return wb;
}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/66f3b707/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/RoomMenuPanel.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/RoomMenuPanel.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/RoomMenuPanel.java
index 222fade..0b440c9 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/RoomMenuPanel.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/menu/RoomMenuPanel.java
@@ -182,6 +182,30 @@ public class RoomMenuPanel extends Panel {
sipDialer.open(target);
}
};
+ private final RoomMenuItem downloadPngMenuItem = new RoomMenuItem(Application.getString("download.png"), Application.getString("download.png")) {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick(AjaxRequestTarget target) {
+ target.appendJavaScript(String.format("WbArea.download('%s');", EXTENSION_PNG));
+ }
+ };
+ private final RoomMenuItem downloadJpgMenuItem = new RoomMenuItem(Application.getString("download.jpg"), Application.getString("download.jpg")) {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick(AjaxRequestTarget target) {
+ target.appendJavaScript(String.format("WbArea.download('%s');", EXTENSION_JPG));
+ }
+ };
+ private final RoomMenuItem downloadPdfMenuItem = new RoomMenuItem(Application.getString("download.pdf"), Application.getString("download.pdf")) {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void onClick(AjaxRequestTarget target) {
+ target.appendJavaScript(String.format("WbArea.download('%s');", EXTENSION_PDF));
+ }
+ };
private final ImagePanel logo = new ImagePanel("logo") {
private static final long serialVersionUID = 1L;
@@ -268,30 +292,9 @@ public class RoomMenuPanel extends Panel {
actionsMenu.getItems().add(pollResultMenuItem); //FIXME enable/disable
actionsMenu.getItems().add(pollVoteMenuItem); //FIXME enable/disable
actionsMenu.getItems().add(sipDialerMenuItem);
- actionsMenu.getItems().add(new RoomMenuItem(Application.getString("download.png"), Application.getString("download.png")) {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void onClick(AjaxRequestTarget target) {
- target.appendJavaScript(String.format("WbArea.download('%s');", EXTENSION_PNG));
- }
- });
- actionsMenu.getItems().add(new RoomMenuItem(Application.getString("download.jpg"), Application.getString("download.jpg")) {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void onClick(AjaxRequestTarget target) {
- target.appendJavaScript(String.format("WbArea.download('%s');", EXTENSION_JPG));
- }
- });
- actionsMenu.getItems().add(new RoomMenuItem(Application.getString("download.pdf"), Application.getString("download.pdf")) {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void onClick(AjaxRequestTarget target) {
- target.appendJavaScript(String.format("WbArea.download('%s');", EXTENSION_PDF));
- }
- });
+ actionsMenu.getItems().add(downloadPngMenuItem);
+ actionsMenu.getItems().add(downloadJpgMenuItem);
+ actionsMenu.getItems().add(downloadPdfMenuItem);
//TODO seems need to be removed actionsMenu.getItems().add(new RoomMenuItem(Application.getString(1126), Application.getString(1490)));
menu.add(actionsMenu);
return menu;
@@ -302,12 +305,16 @@ public class RoomMenuPanel extends Panel {
return;
}
Room r = room.getRoom();
+ boolean isInterview = Room.Type.interview == r.getType();
+ downloadPngMenuItem.setEnabled(!isInterview);
+ downloadJpgMenuItem.setEnabled(!isInterview);
+ downloadPdfMenuItem.setEnabled(!isInterview);
PollDao pollDao = getBean(PollDao.class);
boolean pollExists = pollDao.hasPoll(r.getId());
User u = room.getClient().getUser();
boolean notExternalUser = u.getType() != User.Type.external && u.getType() != User.Type.contact;
exitMenuItem.setEnabled(notExternalUser);//TODO check this
- filesMenu.setEnabled(room.getSidebar().isShowFiles());
+ filesMenu.setEnabled(!isInterview && room.getSidebar().isShowFiles());
boolean moder = room.getClient().hasRight(Room.Right.moderator);
actionsMenu.setEnabled((moder && !r.isHidden(RoomElement.ActionMenu)) || (!moder && r.isAllowUserQuestions()));
inviteMenuItem.setEnabled(notExternalUser && moder);
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/66f3b707/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
index 75bd986..27e5edd 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
@@ -362,7 +362,9 @@ public class RoomSidebar extends Panel {
}
private void updateShowFiles(IPartialPageRequestHandler handler) {
- showFiles = !room.getRoom().isHidden(RoomElement.Files) && room.getClient().hasRight(Right.presenter);
+ showFiles = Room.Type.interview != room.getRoom().getType()
+ && !room.getRoom().isHidden(RoomElement.Files)
+ && room.getClient().hasRight(Right.presenter);
roomFiles.setReadOnly(!showFiles, handler);
}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/66f3b707/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/AbstractWbPanel.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/AbstractWbPanel.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/AbstractWbPanel.java
new file mode 100644
index 0000000..77a463b
--- /dev/null
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/AbstractWbPanel.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.room.wb;
+
+import org.apache.openmeetings.db.entity.file.FileItem;
+import org.apache.openmeetings.web.room.RoomPanel;
+import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
+import org.apache.wicket.markup.html.panel.Panel;
+
+public abstract class AbstractWbPanel extends Panel {
+ private static final long serialVersionUID = 1L;
+ protected final RoomPanel rp;
+
+ public AbstractWbPanel(String id, RoomPanel rp) {
+ super(id);
+ this.rp = rp;
+ }
+
+ public abstract AbstractWbPanel update(IPartialPageRequestHandler handler);
+
+ public void sendFileToWb(final FileItem fi, boolean clean) {
+ }
+}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/66f3b707/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/InterviewWbPanel.html
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/InterviewWbPanel.html b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/InterviewWbPanel.html
new file mode 100644
index 0000000..e16b265
--- /dev/null
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/InterviewWbPanel.html
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+
+-->
+<html xmlns:wicket="http://wicket.apache.org">
+<wicket:panel>
+</wicket:panel>
+</html>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/66f3b707/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/InterviewWbPanel.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/InterviewWbPanel.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/InterviewWbPanel.java
new file mode 100644
index 0000000..9975891
--- /dev/null
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/InterviewWbPanel.java
@@ -0,0 +1,43 @@
+/*
+ * 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.room.wb;
+
+import org.apache.openmeetings.db.entity.file.FileItem;
+import org.apache.openmeetings.web.room.RoomPanel;
+import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
+import org.apache.wicket.request.resource.JavaScriptResourceReference;
+import org.apache.wicket.request.resource.ResourceReference;
+
+public class InterviewWbPanel extends AbstractWbPanel {
+ private static final long serialVersionUID = 1L;
+ public final static ResourceReference INTERVIEWWB_JS_REFERENCE = new JavaScriptResourceReference(WbPanel.class, "interviewwb.js");
+
+ public InterviewWbPanel(String id, RoomPanel rp) {
+ super(id, rp);
+ }
+
+ @Override
+ public InterviewWbPanel update(IPartialPageRequestHandler handler) {
+ return this;
+ }
+
+ @Override
+ public void sendFileToWb(final FileItem fi, boolean clean) {
+ }
+}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/66f3b707/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 cc2bed7..862aceb 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
@@ -86,7 +86,6 @@ import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
import org.apache.wicket.markup.head.PriorityHeaderItem;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.request.resource.JavaScriptResourceReference;
import org.apache.wicket.request.resource.ResourceReference;
import org.apache.wicket.util.string.StringValue;
@@ -97,7 +96,7 @@ import com.github.openjson.JSONArray;
import com.github.openjson.JSONObject;
import com.github.openjson.JSONTokener;
-public class WbPanel extends Panel {
+public class WbPanel extends AbstractWbPanel {
private static final long serialVersionUID = 1L;
private static final Logger log = Red5LoggerFactory.getLogger(WbPanel.class, webAppRootKey);
private static final int UPLOAD_WB_LEFT = 0;
@@ -110,7 +109,6 @@ public class WbPanel extends Panel {
public final static ResourceReference WB_JS_REFERENCE = new JavaScriptResourceReference(WbPanel.class, "wb.js");
private final static ResourceReference FABRIC_JS_REFERENCE = new JavaScriptResourceReference(WbPanel.class, "fabric.js");
private final Long roomId;
- private final RoomPanel rp;
private long wb2save = -1;
private boolean inited = false;
private final Map<Long, Deque<UndoObject>> undoList = new HashMap<>();
@@ -398,8 +396,7 @@ public class WbPanel extends Panel {
};
public WbPanel(String id, RoomPanel rp) {
- super(id);
- this.rp = rp;
+ super(id, rp);
this.roomId = rp.getRoom().getId();
setOutputMarkupId(true);
add(wbLoad);
@@ -437,6 +434,7 @@ public class WbPanel extends Panel {
.put("zoomMode", wb.getZoomMode());
}
+ @Override
public WbPanel update(IPartialPageRequestHandler handler) {
String role = "none";
if (rp.getClient().hasRight(Right.presenter)) {
@@ -506,6 +504,7 @@ public class WbPanel extends Panel {
wb.setHeight(Math.max(wb.getHeight(), h));
}
+ @Override
public void sendFileToWb(final FileItem fi, boolean clean) {
if (isVisible() && fi.getId() != null) {
Whiteboards wbs = WhiteboardCache.get(roomId);
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/66f3b707/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/interviewwb.js
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/interviewwb.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/interviewwb.js
new file mode 100644
index 0000000..54a29f4
--- /dev/null
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/wb/interviewwb.js
@@ -0,0 +1,36 @@
+/**
+ * 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.
+ */
+var WbArea = (function() {
+ var container, area, self = {}, _inited = false;
+
+ self.init = function() {
+ container = $(".room.wb.area");
+ area = container.find(".wb-area");
+ _inited = true;
+ };
+ self.destroy = function() {
+ };
+ self.resize = function(posX, w, h) {
+ if (!container || !_inited) return;
+ var hh = h - 5;
+ container.width(w).height(h).css('left', posX + "px");
+ area.width(w).height(hh);
+ }
+ return self;
+})();