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 2015/02/11 18:59:40 UTC
svn commit: r1659019 - in /openmeetings: branches/3.0.x/src/main/webapp/css/
branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/
trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/
trunk/singlew...
Author: solomax
Date: Wed Feb 11 17:59:39 2015
New Revision: 1659019
URL: http://svn.apache.org/r1659019
Log:
[OPENMEETINGS-1169] message dialog uses kendo date picker
Modified:
openmeetings/branches/3.0.x/src/main/webapp/css/admin-rtl.css
openmeetings/branches/3.0.x/src/main/webapp/css/admin.css
openmeetings/branches/3.0.x/src/main/webapp/css/theme-rtl.css
openmeetings/branches/3.0.x/src/main/webapp/css/theme.css
openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.html
openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.java
openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.html
openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.java
openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin-rtl.css
openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin.css
openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme-rtl.css
openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme.css
Modified: openmeetings/branches/3.0.x/src/main/webapp/css/admin-rtl.css
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/main/webapp/css/admin-rtl.css?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/src/main/webapp/css/admin-rtl.css (original)
+++ openmeetings/branches/3.0.x/src/main/webapp/css/admin-rtl.css Wed Feb 11 17:59:39 2015
@@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-.adminForm label, .adminForm input, .adminForm select, .adminForm textarea, .adminForm .input {
+.adminForm label, .adminForm input, .adminForm select, .adminForm textarea {
float: right !important;
}
Modified: openmeetings/branches/3.0.x/src/main/webapp/css/admin.css
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/main/webapp/css/admin.css?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/src/main/webapp/css/admin.css (original)
+++ openmeetings/branches/3.0.x/src/main/webapp/css/admin.css Wed Feb 11 17:59:39 2015
@@ -274,14 +274,6 @@ table.adminListTable td div.four_column_
height: 20px;
margin: 2px 2px;
}
-.adminForm .input {
- display: block;
- float: left;
- font-size: 14px;
- padding: 0px 0px;
- width: 280px;
- margin: 2px 2px;
-}
.adminForm input[type=checkbox], .adminForm input[type=radio] {
width: auto;
}
Modified: openmeetings/branches/3.0.x/src/main/webapp/css/theme-rtl.css
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/main/webapp/css/theme-rtl.css?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/src/main/webapp/css/theme-rtl.css (original)
+++ openmeetings/branches/3.0.x/src/main/webapp/css/theme-rtl.css Wed Feb 11 17:59:39 2015
@@ -66,6 +66,10 @@
margin-left: initial !important;
margin-right: 60px !important;
}
+form .input {
+ float: right !important;
+}
+
/**** FIXME need to be moved to wicket-jquery-ui **************/
span.css-emoticon {
transform: rotate(-90deg) !important;
Modified: openmeetings/branches/3.0.x/src/main/webapp/css/theme.css
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/main/webapp/css/theme.css?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/src/main/webapp/css/theme.css (original)
+++ openmeetings/branches/3.0.x/src/main/webapp/css/theme.css Wed Feb 11 17:59:39 2015
@@ -518,13 +518,15 @@ table.messages td.main {
}
input[type="text"].messages.text, .messages.text.to {
width: 100%;
+ max-height: 100px;
+ overflow-y: auto;
}
textarea.messages.body {
width: 100%;
height: 300px;
}
select.messages.selector {
- width: 120px;
+ width: 220px;
}
.info-text {
background-image: url(images/information.png);
@@ -600,6 +602,15 @@ select.messages.selector {
.user.info.panel fieldset table, .user.info.panel fieldset table textarea {
width: 100%;
}
+form .input {
+ display: block;
+ float: left;
+ font-size: 14px;
+ padding: 0px 0px;
+ width: 280px;
+ margin: 2px 2px;
+}
.date.time.picker {
font-size: 12px;
+ white-space: nowrap;
}
Modified: openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.html
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.html?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.html (original)
+++ openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.html Wed Feb 11 17:59:39 2015
@@ -61,11 +61,11 @@
</tr>
<tr>
<td><wicket:ommessage key="570" /></td>
- <td><span wicket:id="start"></span></td>
+ <td><span class="date time picker" wicket:id="start"></span></td>
</tr>
<tr>
<td><wicket:ommessage key="571" /></td>
- <td><span wicket:id="end"></span></td>
+ <td><span class="date time picker" wicket:id="end"></span></td>
</tr>
</table>
</td>
Modified: openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.java
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.java?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.java (original)
+++ openmeetings/branches/3.0.x/src/web/java/org/apache/openmeetings/web/user/profile/MessageDialog.java Wed Feb 11 17:59:39 2015
@@ -44,12 +44,12 @@ import org.apache.openmeetings.db.entity
import org.apache.openmeetings.mail.MailHandler;
import org.apache.openmeetings.util.LinkHelper;
import org.apache.openmeetings.web.app.WebSession;
+import org.apache.openmeetings.web.util.CalendarHelper;
import org.apache.openmeetings.web.util.ContactsHelper;
import org.apache.openmeetings.web.util.RoomTypeDropDown;
import org.apache.openmeetings.web.util.UserMultiChoice;
import org.apache.wicket.ajax.AjaxEventBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.yui.calendar.DateTimeField;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.Form;
@@ -59,23 +59,27 @@ import org.apache.wicket.model.CompoundP
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.util.CollectionModel;
+import org.threeten.bp.LocalDateTime;
+import com.googlecode.wicket.jquery.core.Options;
import com.googlecode.wicket.jquery.ui.plugins.wysiwyg.WysiwygEditor;
import com.googlecode.wicket.jquery.ui.plugins.wysiwyg.toolbar.DefaultWysiwygToolbar;
import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
+import com.googlecode.wicket.kendo.ui.form.datetime.local.DateTimePicker;
+import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
public class MessageDialog extends AbstractFormDialog<PrivateMessage> {
private static final long serialVersionUID = 1L;
private final Form<PrivateMessage> form;
- private FeedbackPanel feedback = new FeedbackPanel("feedback");
+ private final KendoFeedbackPanel feedback = new KendoFeedbackPanel("feedback", new Options("button", true));
String sendLbl = WebSession.getString(218);
DialogButton send = new DialogButton(sendLbl);
private DialogButton cancel = new DialogButton(WebSession.getString(219));
private final WebMarkupContainer roomParamsBlock = new WebMarkupContainer("roomParamsBlock");
private final WebMarkupContainer roomParams = new WebMarkupContainer("roomParams");
- private final IModel<Date> modelStart = Model.of(new Date());
- private final IModel<Date> modelEnd = Model.of(new Date());
+ private DateTimePicker start = new DateTimePicker("start", Model.of(LocalDateTime.now()), "yyyy/MM/dd", "HH:mm:ss"); //FIXME use user locale
+ private DateTimePicker end = new DateTimePicker("end", Model.of(LocalDateTime.now()), "yyyy/MM/dd", "HH:mm:ss"); //FIXME use user locale
private boolean isPrivate = false;
private final IModel<Collection<User>> modelTo = new CollectionModel<User>(new ArrayList<User>());
@@ -90,8 +94,8 @@ public class MessageDialog extends Abstr
}
public MessageDialog reset(boolean isPrivate) {
- modelStart.setObject(new Date());
- modelEnd.setObject(new Date()); //TODO should we add 1 hour or generalize with Calendar???
+ start.setModelObject(LocalDateTime.now());
+ end.setModelObject(LocalDateTime.now()); //TODO should we add 1 hour or generalize with Calendar???
modelTo.setObject(new ArrayList<User>());
PrivateMessage p = new PrivateMessage();
p.setFrom(getBean(UserDao.class).get(getUserId()));
@@ -143,8 +147,8 @@ public class MessageDialog extends Abstr
}));
roomParamsBlock.add(roomParams);
roomParams.add(new RoomTypeDropDown("room.roomtype"));
- roomParams.add(new DateTimeField("start", modelStart));
- roomParams.add(new DateTimeField("end", modelEnd));
+ roomParams.add(start);
+ roomParams.add(end);
add(form.setOutputMarkupId(true));
}
@@ -209,7 +213,7 @@ public class MessageDialog extends Abstr
Invitation i = getBean(InvitationManager.class).getInvitation(to, p.getRoom(),
false, null, Valid.Period
, userDao.get(getUserId()), userDao.get(getUserId()).getLanguage_id(),
- modelStart.getObject(), modelEnd.getObject(), null);
+ CalendarHelper.getDate(start.getModelObject()), CalendarHelper.getDate(end.getModelObject()), null);
invitation_link = LinkHelper.getInvitationLink(getBean(ConfigurationDao.class).getBaseUrl(), i);
@@ -233,8 +237,6 @@ public class MessageDialog extends Abstr
@Override
protected void onDetach() {
- modelEnd.detach();
- modelStart.detach();
modelTo.detach();
super.onDetach();
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.html
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.html?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.html (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.html Wed Feb 11 17:59:39 2015
@@ -61,11 +61,11 @@
</tr>
<tr>
<td><wicket:ommessage key="570" /></td>
- <td><span wicket:id="start"></span></td>
+ <td><span class="date time picker" wicket:id="start"></span></td>
</tr>
<tr>
<td><wicket:ommessage key="571" /></td>
- <td><span wicket:id="end"></span></td>
+ <td><span class="date time picker" wicket:id="end"></span></td>
</tr>
</table>
</td>
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.java?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/profile/MessageDialog.java Wed Feb 11 17:59:39 2015
@@ -49,7 +49,6 @@ import org.apache.openmeetings.web.util.
import org.apache.openmeetings.web.util.UserMultiChoice;
import org.apache.wicket.ajax.AjaxEventBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.yui.calendar.DateTimeField;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.Form;
@@ -59,23 +58,27 @@ import org.apache.wicket.model.CompoundP
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.util.CollectionModel;
+import org.threeten.bp.LocalDateTime;
+import com.googlecode.wicket.jquery.core.Options;
import com.googlecode.wicket.jquery.ui.plugins.wysiwyg.WysiwygEditor;
import com.googlecode.wicket.jquery.ui.plugins.wysiwyg.toolbar.DefaultWysiwygToolbar;
import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton;
+import com.googlecode.wicket.kendo.ui.form.datetime.local.DateTimePicker;
+import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
public class MessageDialog extends AbstractFormDialog<PrivateMessage> {
private static final long serialVersionUID = 1L;
private final Form<PrivateMessage> form;
- private FeedbackPanel feedback = new FeedbackPanel("feedback");
+ private final KendoFeedbackPanel feedback = new KendoFeedbackPanel("feedback", new Options("button", true));
String sendLbl = WebSession.getString(218);
DialogButton send = new DialogButton(sendLbl);
private DialogButton cancel = new DialogButton(WebSession.getString(219));
private final WebMarkupContainer roomParamsBlock = new WebMarkupContainer("roomParamsBlock");
private final WebMarkupContainer roomParams = new WebMarkupContainer("roomParams");
- private final IModel<Date> modelStart = Model.of(new Date());
- private final IModel<Date> modelEnd = Model.of(new Date());
+ private DateTimePicker start = new DateTimePicker("start", Model.of(LocalDateTime.now()), "yyyy/MM/dd", "HH:mm:ss"); //FIXME use user locale
+ private DateTimePicker end = new DateTimePicker("end", Model.of(LocalDateTime.now()), "yyyy/MM/dd", "HH:mm:ss"); //FIXME use user locale
private boolean isPrivate = false;
private final IModel<Collection<User>> modelTo = new CollectionModel<User>(new ArrayList<User>());
@@ -90,8 +93,8 @@ public class MessageDialog extends Abstr
}
public MessageDialog reset(boolean isPrivate) {
- modelStart.setObject(new Date());
- modelEnd.setObject(new Date()); //TODO should we add 1 hour or generalize with Calendar???
+ start.setModelObject(LocalDateTime.now());
+ end.setModelObject(LocalDateTime.now()); //TODO should we add 1 hour or generalize with Calendar???
modelTo.setObject(new ArrayList<User>());
PrivateMessage p = new PrivateMessage();
p.setFrom(getBean(UserDao.class).get(getUserId()));
@@ -143,8 +146,8 @@ public class MessageDialog extends Abstr
}));
roomParamsBlock.add(roomParams);
roomParams.add(new RoomTypeDropDown("room.roomtype"));
- roomParams.add(new DateTimeField("start", modelStart));
- roomParams.add(new DateTimeField("end", modelEnd));
+ roomParams.add(start);
+ roomParams.add(end);
add(form.setOutputMarkupId(true));
}
@@ -209,7 +212,7 @@ public class MessageDialog extends Abstr
Invitation i = getBean(IInvitationManager.class).getInvitation(to, p.getRoom(),
false, null, Valid.Period
, userDao.get(getUserId()), userDao.get(getUserId()).getLanguageId(),
- modelStart.getObject(), modelEnd.getObject(), null);
+ CalendarHelper.getDate(start.getModelObject()), CalendarHelper.getDate(end.getModelObject()), null);
invitation_link = getInvitationLink(getBean(ConfigurationDao.class).getBaseUrl(), i);
@@ -233,8 +236,6 @@ public class MessageDialog extends Abstr
@Override
protected void onDetach() {
- modelEnd.detach();
- modelStart.detach();
modelTo.detach();
super.onDetach();
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin-rtl.css
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin-rtl.css?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin-rtl.css (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin-rtl.css Wed Feb 11 17:59:39 2015
@@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-.adminForm label, .adminForm input, .adminForm select, .adminForm textarea, .adminForm .input {
+.adminForm label, .adminForm input, .adminForm select, .adminForm textarea {
float: right !important;
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin.css
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin.css?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin.css (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/admin.css Wed Feb 11 17:59:39 2015
@@ -274,14 +274,6 @@ table.adminListTable td div.four_column_
height: 20px;
margin: 2px 2px;
}
-.adminForm .input {
- display: block;
- float: left;
- font-size: 14px;
- padding: 0px 0px;
- width: 280px;
- margin: 2px 2px;
-}
.adminForm input[type=checkbox], .adminForm input[type=radio] {
width: auto;
}
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme-rtl.css
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme-rtl.css?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme-rtl.css (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme-rtl.css Wed Feb 11 17:59:39 2015
@@ -66,6 +66,10 @@
margin-left: initial !important;
margin-right: 60px !important;
}
+form .input {
+ float: right !important;
+}
+
/**** FIXME need to be moved to wicket-jquery-ui **************/
span.css-emoticon {
transform: rotate(-90deg) !important;
Modified: openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme.css
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme.css?rev=1659019&r1=1659018&r2=1659019&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme.css (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-web/src/main/webapp/css/theme.css Wed Feb 11 17:59:39 2015
@@ -499,18 +499,20 @@ table.messages td.main {
}
input[type="text"].messages.text, .messages.text.to {
width: 100%;
+ max-height: 100px;
+ overflow-y: auto;
}
textarea.messages.body {
width: 100%;
height: 300px;
}
select.messages.selector {
- width: 120px;
+ width: 220px;
}
.info-text {
background-image: url(images/information.png);
background-repeat: no-repeat;
- background-position: 2px 2px;
+ background-position: left top;
cursor: default;
border: none;
padding-left: 20px;
@@ -601,4 +603,5 @@ form .input {
}
.date.time.picker {
font-size: 12px;
+ white-space: nowrap;
}