Author: solomax
Date: Tue Apr 23 10:52:03 2013
New Revision: 1470890
URL: http://svn.apache.org/r1470890
Log:
[OPENMEETINGS-612] StartWidget is added
Added:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidget.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetDescriptor.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.html
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.java
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html
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=1470890&r1=1470889&r2=1470890&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 10:52:03 2013
@@ -20,6 +20,7 @@ package org.apache.openmeetings.web.app;
import org.apache.openmeetings.remote.red5.ScopeApplicationAdapter;
import
org.apache.openmeetings.web.components.user.dashboard.PrivateRoomsWidgetDescriptor;
+import
org.apache.openmeetings.web.components.user.dashboard.StartWidgetDescriptor;
import
org.apache.openmeetings.web.components.user.dashboard.WelcomeWidgetDescriptor;
import org.apache.openmeetings.web.pages.MainPage;
import org.apache.openmeetings.web.pages.NotInitedPage;
@@ -75,6 +76,7 @@ public class Application extends Authent
WidgetRegistry widgetRegistry =
dashboardContext.getWidgetRegistry();
widgetRegistry.registerWidget(new
PrivateRoomsWidgetDescriptor());
widgetRegistry.registerWidget(new WelcomeWidgetDescriptor());
+ widgetRegistry.registerWidget(new StartWidgetDescriptor());
// add dashboard context injector
DashboardContextInjector dashboardContextInjector = new
DashboardContextInjector(dashboardContext);
getComponentInstantiationListeners().add(dashboardContextInjector);
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java?rev=1470890&r1=1470889&r2=1470890&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java
Tue Apr 23 10:52:03 2013
@@ -36,6 +36,7 @@ import org.apache.openmeetings.persisten
import org.apache.openmeetings.persistence.beans.lang.FieldLanguage;
import org.apache.openmeetings.persistence.beans.user.User;
import
org.apache.openmeetings.web.components.user.dashboard.PrivateRoomsWidgetDescriptor;
+import
org.apache.openmeetings.web.components.user.dashboard.StartWidgetDescriptor;
import
org.apache.openmeetings.web.components.user.dashboard.WelcomeWidgetDescriptor;
import
org.apache.wicket.authroles.authentication.AbstractAuthenticatedWebSession;
import org.apache.wicket.authroles.authorization.strategies.role.Roles;
@@ -180,6 +181,7 @@ public class WebSession extends Abstract
WidgetFactory widgetFactory =
dashboardContext.getWidgetFactory();
dashboard.getWidgets().clear(); //FIXME hack somehow Dashboard
loaded with 7! PrivateRoomsWidgets
dashboard.addWidget(widgetFactory.createWidget(new
WelcomeWidgetDescriptor()));
+ dashboard.addWidget(widgetFactory.createWidget(new
StartWidgetDescriptor()));
dashboard.addWidget(widgetFactory.createWidget(new
PrivateRoomsWidgetDescriptor()));
}
}
Added:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidget.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidget.java?rev=1470890&view=auto
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidget.java
(added)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidget.java
Tue Apr 23 10:52:03 2013
@@ -0,0 +1,42 @@
+/*
+ * 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.user.dashboard;
+
+import org.apache.openmeetings.web.app.WebSession;
+import org.apache.wicket.model.Model;
+
+import ro.fortsoft.wicket.dashboard.AbstractWidget;
+import ro.fortsoft.wicket.dashboard.Widget;
+import ro.fortsoft.wicket.dashboard.WidgetLocation;
+import ro.fortsoft.wicket.dashboard.web.WidgetView;
+
+public class StartWidget extends AbstractWidget {
+ private static final long serialVersionUID = 9060237325733825899L;
+
+ public StartWidget(String id) {
+ super();
+ setId(id);
+ title = WebSession.getString(774L);
+ location = new WidgetLocation(1, 0);
+ }
+
+ public WidgetView createView(String viewId) {
+ return new StartWidgetView(viewId, new Model<Widget>(this));
+ }
+}
Added:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetDescriptor.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetDescriptor.java?rev=1470890&view=auto
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetDescriptor.java
(added)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetDescriptor.java
Tue Apr 23 10:52:03 2013
@@ -0,0 +1,44 @@
+/*
+ * 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.user.dashboard;
+
+import org.apache.openmeetings.web.app.WebSession;
+
+import ro.fortsoft.wicket.dashboard.WidgetDescriptor;
+
+public class StartWidgetDescriptor implements WidgetDescriptor {
+ private static final long serialVersionUID = 2533010836978961930L;
+
+ public String getName() {
+ return WebSession.getString(774L);
+ }
+
+ public String getProvider() {
+ return "Apache Openmeetings";
+ }
+
+ public String getDescription() {
+ return WebSession.getString(804L);
+ }
+
+ public String getWidgetClassName() {
+ return StartWidget.class.getName();
+ }
+
+}
Added:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.html
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.html?rev=1470890&view=auto
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.html
(added)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.html
Tue Apr 23 10:52:03 2013
@@ -0,0 +1,38 @@
+<?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>
+ <h3><wicket:ommessage key="774"/></h3>
+ <div><wicket:ommessage key="768"/></div>
+ <div><wicket:ommessage key="771"/></div>
+ <div><wicket:ommessage key="772"/></div>
+ <div><wicket:ommessage key="773"/></div>
+ <table>
+ <tr>
+ <td><wicket:ommessage key="804"/></td>
+ <td>
+ <input type="button"
wicket:ommessage="value:788"/><br/>
+ <input type="button"
wicket:ommessage="value:291"/>
+ </td>
+ </tr>
+ </table>
+ </wicket:panel>
+</html>
\ No newline at end of file
Added:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.java
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.java?rev=1470890&view=auto
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.java
(added)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/StartWidgetView.java
Tue Apr 23 10:52:03 2013
@@ -0,0 +1,32 @@
+/*
+ * 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.user.dashboard;
+
+import org.apache.wicket.model.Model;
+
+import ro.fortsoft.wicket.dashboard.Widget;
+import ro.fortsoft.wicket.dashboard.web.WidgetView;
+
+public class StartWidgetView extends WidgetView {
+ private static final long serialVersionUID = -3886388347737468022L;
+
+ public StartWidgetView(String id, Model<Widget> model) {
+ super(id, model);
+ }
+}
Modified:
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html
URL:
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html?rev=1470890&r1=1470889&r2=1470890&view=diff
==============================================================================
---
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html
(original)
+++
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html
Tue Apr 23 10:52:03 2013
@@ -24,7 +24,7 @@
<tr>
<td><div wicket:id="img"></div></td>
<td>
- <wicket:ommessage key="376"/> <span
wicket:id="firstname"></span> <span wicket:id="lastname"></span><br/>
+ <h3><wicket:ommessage key="376"/> <span
wicket:id="firstname"></span> <span wicket:id="lastname"></span></h3>
<wicket:ommessage key="1143"/> <span
wicket:id="tz"></span><br/>
<wicket:ommessage key="378"/> <span
wicket:id="unread"></span><br/>
<a wicket:id="editProfile"><wicket:ommessage
key="377"/></a>