Author: solomax
Date: Tue Apr 23 12:23:12 2013
New Revision: 1470915
URL: http://svn.apache.org/r1470915
Log:
[OPENMEETINGS-612] WelcomeWidget is updated to display profile picture;
code clean-up;
Added:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.html
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.java
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileProcessor.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileUtils.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/CreateLibraryPresentation.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/GenerateImage.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/DownloadHandler.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/UploadController.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/OmFileHelper.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/MenuPanel.html
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/ChatPanel.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileProcessor.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileProcessor.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileProcessor.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileProcessor.java
Tue Apr 23 12:23:12 2013
@@ -18,6 +18,8 @@
*/
package org.apache.openmeetings.data.file;
+import static org.apache.openmeetings.utils.OmFileHelper.thumbImagePrefix;
+
import java.io.File;
import java.io.InputStream;
import java.util.Date;
@@ -156,7 +158,7 @@ public class FileProcessor {
returnError = generateImage.convertImage(newFileSystemName,
newFileExtDot, "files",
newFileSystemName, false);
} else if (isAsIs) {
- ConverterProcessResult processThumb =
generateThumbs.generateThumb("_thumb_", completeName, 50);
+ ConverterProcessResult processThumb =
generateThumbs.generateThumb(thumbImagePrefix, completeName, 50);
returnError.addItem("processThumb", processThumb);
} else if (isVideo) {
List<ConverterProcessResult> returnList =
flvExplorerConverter.startConversion(fileExplorerItemId,
completeName.getCanonicalPath());
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileUtils.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileUtils.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileUtils.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/file/FileUtils.java
Tue Apr 23 12:23:12 2013
@@ -18,6 +18,8 @@
*/
package org.apache.openmeetings.data.file;
+import static org.apache.openmeetings.utils.OmFileHelper.thumbImagePrefix;
+
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -51,8 +53,7 @@ public class FileUtils {
fileSize += tFile.length();
}
- File thumbFile = new File(base, "_thumb_"
- +
fileExplorerItem.getFileHash());
+ File thumbFile = new File(base,
thumbImagePrefix + fileExplorerItem.getFileHash());
if (thumbFile.exists()) {
fileSize += thumbFile.length();
}
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/CreateLibraryPresentation.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/CreateLibraryPresentation.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/CreateLibraryPresentation.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/CreateLibraryPresentation.java
Tue Apr 23 12:23:12 2013
@@ -18,6 +18,8 @@
*/
package org.apache.openmeetings.documents;
+import static org.apache.openmeetings.utils.OmFileHelper.thumbImagePrefix;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
@@ -77,7 +79,7 @@ public class CreateLibraryPresentation {
Arrays.sort(allfiles);
for(int i=0; i<allfiles.length; i++){
File thumbfile = new
File(targetDirectory, allfiles[i]);
- if (allfiles[i].startsWith("_thumb_")){
+ if
(allfiles[i].startsWith(thumbImagePrefix)){
thumbs.addElement( "thumb" )
.addAttribute("lastmod", (new Long(thumbfile.lastModified())).toString())
.addAttribute("size",
(new Long(thumbfile.length())).toString())
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/GenerateImage.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/GenerateImage.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/GenerateImage.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/documents/GenerateImage.java
Tue Apr 23 12:23:12 2013
@@ -18,6 +18,11 @@
*/
package org.apache.openmeetings.documents;
+import static org.apache.openmeetings.utils.OmFileHelper.bigImagePrefix;
+import static org.apache.openmeetings.utils.OmFileHelper.chatImagePrefix;
+import static org.apache.openmeetings.utils.OmFileHelper.profileImagePrefix;
+import static org.apache.openmeetings.utils.OmFileHelper.thumbImagePrefix;
+
import java.io.File;
import java.io.IOException;
@@ -58,7 +63,7 @@ public class GenerateImage extends BaseC
ConverterProcessResult processJPG = this.convertSingleJpg(
fileFullPath.getCanonicalPath(),
destinationFile);
ConverterProcessResult processThumb =
generateThumbs.generateThumb(
- "_thumb_", destinationFile, 50);
+ thumbImagePrefix, destinationFile, 50);
returnMap.addItem("processJPG", processJPG);
returnMap.addItem("processThumb", processThumb);
@@ -83,11 +88,11 @@ public class GenerateImage extends BaseC
fileFullPath, destinationFile);
ConverterProcessResult processThumb1 =
generateThumbs.generateThumb(
- "_chat_", destinationFile, 40);
+ chatImagePrefix, destinationFile, 40);
ConverterProcessResult processThumb2 =
generateThumbs.generateThumb(
- "_profile_", destinationFile, 126);
+ profileImagePrefix, destinationFile, 126);
ConverterProcessResult processThumb3 =
generateThumbs.generateThumb(
- "_big_", destinationFile, 240);
+ bigImagePrefix, destinationFile, 240);
returnMap.addItem("processJPG", processJPG);
returnMap.addItem("processThumb1", processThumb1);
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/DownloadHandler.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/DownloadHandler.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/DownloadHandler.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/DownloadHandler.java
Tue Apr 23 12:23:12 2013
@@ -18,6 +18,11 @@
*/
package org.apache.openmeetings.servlet.outputhandler;
+import static org.apache.openmeetings.utils.OmFileHelper.bigImagePrefix;
+import static org.apache.openmeetings.utils.OmFileHelper.chatImagePrefix;
+import static
org.apache.openmeetings.utils.OmFileHelper.defaultProfileImageName;
+import static org.apache.openmeetings.utils.OmFileHelper.profileImagePrefix;
+
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
@@ -46,9 +51,8 @@ public class DownloadHandler extends Bas
DownloadHandler.class,
OpenmeetingsVariables.webAppRootKey);
private static final String defaultImageName = "deleted.jpg";
- private static final String defaultProfileImageName = "profile_pic.jpg";
- private static final String defaultProfileImageNameBig =
"_big_profile_pic.jpg";
- private static final String defaultChatImageName =
"_chat_profile_pic.jpg";
+ private static final String defaultProfileImageNameBig =
profileImagePrefix + defaultProfileImageName;
+ private static final String defaultChatImageName = chatImagePrefix +
defaultProfileImageName;
private static final String defaultSWFName = "deleted.swf";
private void logNonExistentFolder(File f) {
@@ -193,20 +197,20 @@ public class DownloadHandler extends Bas
log.debug("LOG
moduleName: " + moduleName);
- requestedFile =
DownloadHandler.defaultImageName;
+ requestedFile =
defaultImageName;
if
(moduleName.equals("remoteuserprofile")) {
- requestedFile =
DownloadHandler.defaultProfileImageName;
+ requestedFile =
defaultProfileImageName;
} else if
(moduleName.equals("remoteuserprofilebig")) {
- requestedFile =
DownloadHandler.defaultProfileImageNameBig;
+ requestedFile =
defaultProfileImageNameBig;
} else if
(moduleName.equals("userprofile")) {
- requestedFile =
DownloadHandler.defaultProfileImageName;
+ requestedFile =
defaultProfileImageName;
} else if
(moduleName.equals("chat")) {
- requestedFile =
DownloadHandler.defaultChatImageName;
+ requestedFile =
defaultChatImageName;
}
} else if
(requestedFile.endsWith(".swf")) {
- requestedFile =
DownloadHandler.defaultSWFName;
+ requestedFile =
defaultSWFName;
} else {
- requestedFile =
DownloadHandler.defaultImageName;
+ requestedFile =
defaultImageName;
}
full_path = new
File(OmFileHelper.getDefaultDir(), requestedFile);
}
@@ -312,7 +316,7 @@ public class DownloadHandler extends Bas
String filesString[] = f.list();
for (int i = 0; i < filesString.length; i++) {
String fileName = filesString[i];
- if (fileName.startsWith("_chat_"))
+ if (fileName.startsWith(chatImagePrefix))
return fileName;
}
}
@@ -324,7 +328,7 @@ public class DownloadHandler extends Bas
String filesString[] = f.list();
for (int i = 0; i < filesString.length; i++) {
String fileName = filesString[i];
- if (fileName.startsWith("_big_"))
+ if (fileName.startsWith(bigImagePrefix))
return fileName;
}
}
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/UploadController.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/UploadController.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/UploadController.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/servlet/outputhandler/UploadController.java
Tue Apr 23 12:23:12 2013
@@ -18,6 +18,11 @@
*/
package org.apache.openmeetings.servlet.outputhandler;
+import static org.apache.openmeetings.utils.OmFileHelper.bigImagePrefix;
+import static org.apache.openmeetings.utils.OmFileHelper.chatImagePrefix;
+import static org.apache.openmeetings.utils.OmFileHelper.profileImagePrefix;
+import static org.apache.openmeetings.utils.OmFileHelper.thumbImagePrefix;
+
import java.io.File;
import java.io.InputStream;
@@ -290,11 +295,11 @@ public class UploadController extends Ab
this.deleteUserProfileFiles(userId);
// is UserProfile Picture
returnError.addItem("processThumb1",
generateThumbs
- .generateThumb("_chat_",
completeName, 40));
+ .generateThumb(chatImagePrefix,
completeName, 40));
returnError.addItem("processThumb2",
generateThumbs
- .generateThumb("_profile_",
completeName, 126));
+
.generateThumb(profileImagePrefix, completeName, 126));
returnError.addItem("processThumb3",
generateThumbs
- .generateThumb("_big_",
completeName, 240));
+ .generateThumb(bigImagePrefix,
completeName, 240));
String pictureuri = completeName.getName();
User us = usersDao.get(userId);
@@ -305,7 +310,7 @@ public class UploadController extends Ab
//FIXME: After updating the picture url all
other users should refresh
} else {
returnError.addItem("processThumb",
generateThumbs
- .generateThumb("_thumb_",
completeName, 50));
+
.generateThumb(thumbImagePrefix, completeName, 50));
}
}
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/OmFileHelper.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/OmFileHelper.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/OmFileHelper.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/utils/OmFileHelper.java
Tue Apr 23 12:23:12 2013
@@ -61,6 +61,11 @@ public class OmFileHelper {
public static final String nameOfTimeZoneFile = "timezones.xml";
public static final String nameOfErrorFile = "errorvalues.xml";
public static final String libraryFileName = "library.xml";
+ public static final String defaultProfileImageName = "profile_pic.jpg";
+ public static final String profileImagePrefix = "_profile_";
+ public static final String chatImagePrefix = "_chat_";
+ public static final String bigImagePrefix = "_big_";
+ public static final String thumbImagePrefix = "_thumb_";
public static void setOmHome(File omHome) {
OmFileHelper.OM_HOME = omHome;
@@ -99,12 +104,24 @@ public class OmFileHelper {
return getDir(getUploadDir(), PROFILES_DIR);
}
- public static File getUploadProfilesUserDir(Long users_id) {
- return getDir(getUploadProfilesDir(),
OmFileHelper.profilesPrefix + users_id);
+ public static File getUploadProfilesUserDir(Long userId) {
+ return getDir(getUploadProfilesDir(), profilesPrefix + userId);
}
public static File getUploadProfilesUserDir(String users_id) {
- return getDir(getUploadProfilesDir(),
OmFileHelper.profilesPrefix + users_id);
+ return getDir(getUploadProfilesDir(), profilesPrefix +
users_id);
+ }
+
+ public static File getDefaultProfilePicture() {
+ return new File(getDefaultDir(), profileImagePrefix +
defaultProfileImageName);
+ }
+
+ public static File getUserProfilePicture(Long userId, String uri) {
+ File img = new File(getUploadProfilesUserDir(userId),
profileImagePrefix + uri);
+ if (!img.exists()) {
+ img = getDefaultProfilePicture();
+ }
+ return img;
}
public static File getUploadImportDir() {
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java
Tue Apr 23 12:23:12 2013
@@ -46,6 +46,7 @@ import org.springframework.web.context.s
import ro.fortsoft.wicket.dashboard.WidgetRegistry;
import ro.fortsoft.wicket.dashboard.web.DashboardContext;
import ro.fortsoft.wicket.dashboard.web.DashboardContextInjector;
+import ro.fortsoft.wicket.dashboard.web.DashboardSettings;
public class Application extends AuthenticatedWebApplication {
private DashboardContext dashboardContext;
@@ -80,6 +81,9 @@ public class Application extends Authent
// add dashboard context injector
DashboardContextInjector dashboardContextInjector = new
DashboardContextInjector(dashboardContext);
getComponentInstantiationListeners().add(dashboardContextInjector);
+ DashboardSettings dashboardSettings = DashboardSettings.get();
+ dashboardSettings.setIncludeJQuery(false);
+ dashboardSettings.setIncludeJQueryUI(false);
mountPage("signin", getSignInPageClass());
mountPage("notinited", NotInitedPage.class);
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/MenuPanel.html
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/MenuPanel.html?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/MenuPanel.html
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/MenuPanel.html
Tue Apr 23 12:23:12 2013
@@ -51,4 +51,4 @@
</li>
</ul>
</wicket:panel>
-</html>
\ No newline at end of file
+</html>
Added:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.html
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.html?rev=1470915&view=auto
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.html
(added)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.html
Tue Apr 23 12:23:12 2013
@@ -0,0 +1,25 @@
+<?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>
+ <div wicket:id="profile"><img wicket:id="img"/></div>
+ </wicket:panel>
+</html>
Added:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.java?rev=1470915&view=auto
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.java
(added)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/ProfileImagePanel.java
Tue Apr 23 12:23:12 2013
@@ -0,0 +1,80 @@
+/*
+ * 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.components;
+
+import static org.apache.openmeetings.OpenmeetingsVariables.webAppRootKey;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URI;
+
+import org.apache.openmeetings.data.user.dao.UsersDao;
+import org.apache.openmeetings.utils.OmFileHelper;
+import org.apache.openmeetings.web.app.Application;
+import org.apache.openmeetings.web.app.WebSession;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.image.Image;
+import org.apache.wicket.request.resource.ByteArrayResource;
+import org.apache.wicket.util.io.IOUtils;
+import org.red5.logging.Red5LoggerFactory;
+import org.slf4j.Logger;
+
+public class ProfileImagePanel extends BasePanel {
+ private static final long serialVersionUID = 1119719397241677937L;
+ private static final Logger log =
Red5LoggerFactory.getLogger(ProfileImagePanel.class, webAppRootKey);
+
+ public ProfileImagePanel(String id, final long userId) {
+ super(id);
+ WebMarkupContainer profile = new WebMarkupContainer("profile");
+ final String uri =
Application.getBean(UsersDao.class).get(userId).getPictureuri();
+ boolean absolute = false;
+ try {
+ absolute = URI.create(uri).isAbsolute();
+ } catch (Exception e) {
+ //no-op
+ }
+ if (absolute) {
+ profile.add(new Image("img",
WebSession.getString(5L)).add(AttributeModifier.replace("src", uri)));
+ } else {
+ profile.add(new Image("img", new
ByteArrayResource("image/jpeg") {
+ private static final long serialVersionUID =
6039580072791941591L;
+
+ @Override
+ protected ResourceResponse
newResourceResponse(Attributes attributes) {
+ ResourceResponse rr =
super.newResourceResponse(attributes);
+ rr.disableCaching();
+ return rr;
+ }
+
+ @Override
+ protected byte[] getData(Attributes attributes)
{
+ File img =
OmFileHelper.getUserProfilePicture(userId, uri);
+ try {
+ return IOUtils.toByteArray(new
FileInputStream(img));
+ } catch (Exception e) {
+ log.error("failed to get bytes
from image", e);
+ }
+ return null;
+ }
+ }));
+ }
+ add(profile);
+ }
+}
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/ChatPanel.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/ChatPanel.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/ChatPanel.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/ChatPanel.java
Tue Apr 23 12:23:12 2013
@@ -18,9 +18,10 @@
*/
package org.apache.openmeetings.web.components.user;
+import static org.apache.openmeetings.OpenmeetingsVariables.webAppRootKey;
+
import java.util.Date;
-import org.apache.openmeetings.OpenmeetingsVariables;
import org.apache.openmeetings.data.chat.ChatDao;
import org.apache.openmeetings.data.user.dao.UsersDao;
import org.apache.openmeetings.persistence.beans.chat.ChatMessage;
@@ -45,9 +46,8 @@ import org.apache.wicket.protocol.ws.api
import org.apache.wicket.protocol.ws.api.IWebSocketConnectionRegistry;
import org.red5.logging.Red5LoggerFactory;
import org.slf4j.Logger;
-
public class ChatPanel extends UserPanel {
- private static final Logger log =
Red5LoggerFactory.getLogger(ChatPanel.class,
OpenmeetingsVariables.webAppRootKey);
+ private static final Logger log =
Red5LoggerFactory.getLogger(ChatPanel.class, webAppRootKey);
private static final long serialVersionUID = -9144707674886211557L;
private String message;
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java?rev=1470915&r1=1470914&r2=1470915&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java
Tue Apr 23 12:23:12 2013
@@ -22,9 +22,9 @@ import org.apache.openmeetings.data.user
import org.apache.openmeetings.persistence.beans.user.User;
import org.apache.openmeetings.web.app.Application;
import org.apache.openmeetings.web.app.WebSession;
+import org.apache.openmeetings.web.components.ProfileImagePanel;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.Model;
@@ -38,7 +38,7 @@ public class WelcomeWidgetView extends W
super(id, model);
User u =
Application.getBean(UsersDao.class).get(WebSession.getUserId());
- add(new WebMarkupContainer("img"));//FIXME
+ add(new ProfileImagePanel("img",
WebSession.getUserId()));//FIXME
//FIXME this need to be aligned according to Locale
add(new Label("firstname", Model.of(u.getFirstname())));
add(new Label("lastname", Model.of(u.getLastname())));