http://git-wip-us.apache.org/repos/asf/openmeetings/blob/8e63647c/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 8346aa1..bb19049 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 @@ -1,157 +1,157 @@ -/* - * 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.pages.auth; - -import static org.apache.openmeetings.db.util.UserHelper.getMinPasswdLength; -import static org.apache.openmeetings.web.app.Application.getBean; -import static org.apache.wicket.validation.validator.StringValidator.minimumLength; - -import java.util.Arrays; -import java.util.List; - -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; -import org.apache.wicket.markup.html.form.Form; -import org.apache.wicket.markup.html.form.PasswordTextField; -import org.apache.wicket.markup.html.form.TextField; -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.DialogButton; -import com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog; -import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel; - -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; - private final KendoFeedbackPanel feedback = new KendoFeedbackPanel("feedback", new Options("button", true)); - private PasswordTextField password; - private final User user; - final MessageDialog confirmReset; - - public ResetPasswordDialog(String id, final User user) { - super(id, Application.getString(325)); - this.user = user; - add(form = new Form<String>("form") { - private static final long serialVersionUID = 1L; - private TextField<String> login; - private PasswordTextField confirmPassword; - { - add(feedback.setOutputMarkupId(true)); - add(login = new TextField<>("login", Model.of(user.getLogin()))); - login.setOutputMarkupId(true); - add(password = new PasswordTextField("password", new Model<String>())); - password.setOutputMarkupId(true); - password.setLabel(Model.of(Application.getString(328))); - ConfigurationDao cfgDao = getBean(ConfigurationDao.class); - password.setRequired(false).add(minimumLength(getMinPasswdLength(cfgDao))); - add(confirmPassword = new PasswordTextField("confirmPassword", new Model<String>())); - confirmPassword.setOutputMarkupId(true); - confirmPassword.setLabel(Model.of(Application.getString(329))); - confirmPassword.setRequired(true).add(minimumLength(getMinPasswdLength(cfgDao))); - - add(new AjaxButton("submit") { // FAKE button so "submit-on-enter" works as expected - private static final long serialVersionUID = 1L; - - @Override - protected void onSubmit(AjaxRequestTarget target) { - ResetPasswordDialog.this.onSubmit(target); - } - - @Override - protected void onError(AjaxRequestTarget target) { - ResetPasswordDialog.this.onError(target); - } - }); - } - - @Override - protected void onValidate() { - String pass = password.getConvertedInput(); - if (pass != null && !pass.isEmpty() && !pass.equals(confirmPassword.getConvertedInput())) { - error(Application.getString(232)); - } - super.onValidate(); - } - - }); - confirmReset = new NonClosableMessageDialog("confirmReset", Application.getString(325), Application.getString(332)) { - private static final long serialVersionUID = 1L; - - @Override - public void onClose(IPartialPageRequestHandler handler, DialogButton button) { - setResponsePage(Application.get().getSignInPageClass()); - } - }; - add(confirmReset); - } - - @Override - public void onConfigure(JQueryBehavior behavior) { - super.onConfigure(behavior); - behavior.setOption("autoOpen", true); - } - - @Override - protected List<DialogButton> getButtons() { - return Arrays.asList(resetBtn); - } - - @Override - public DialogButton getSubmitButton() { - return resetBtn; - } - - @Override - public Form<?> getForm() { - return form; - } - - @Override - protected void onError(AjaxRequestTarget target) { - target.add(feedback); - } - - @Override - protected void onSubmit(AjaxRequestTarget target) { - try { - getBean(UserDao.class).resetPassword(user, password.getConvertedInput()); - } catch (Exception e) { - error(e.getMessage()); - } - } - - @Override - public void onClose(IPartialPageRequestHandler handler, DialogButton button) { - if (resetBtn.equals(button)) { - confirmReset.open(handler); - } else { - setResponsePage(Application.get().getSignInPageClass()); - } - } -} +/* + * 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.pages.auth; + +import static org.apache.openmeetings.db.util.UserHelper.getMinPasswdLength; +import static org.apache.openmeetings.web.app.Application.getBean; +import static org.apache.wicket.validation.validator.StringValidator.minimumLength; + +import java.util.Arrays; +import java.util.List; + +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; +import org.apache.wicket.markup.html.form.Form; +import org.apache.wicket.markup.html.form.PasswordTextField; +import org.apache.wicket.markup.html.form.TextField; +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.DialogButton; +import com.googlecode.wicket.jquery.ui.widget.dialog.MessageDialog; +import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel; + +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; + private final KendoFeedbackPanel feedback = new KendoFeedbackPanel("feedback", new Options("button", true)); + private PasswordTextField password; + private final User user; + final MessageDialog confirmReset; + + public ResetPasswordDialog(String id, final User user) { + super(id, Application.getString(325)); + this.user = user; + add(form = new Form<String>("form") { + private static final long serialVersionUID = 1L; + private TextField<String> login; + private PasswordTextField confirmPassword; + { + add(feedback.setOutputMarkupId(true)); + add(login = new TextField<>("login", Model.of(user.getLogin()))); + login.setOutputMarkupId(true); + add(password = new PasswordTextField("password", new Model<String>())); + password.setOutputMarkupId(true); + password.setLabel(Model.of(Application.getString(328))); + ConfigurationDao cfgDao = getBean(ConfigurationDao.class); + password.setRequired(false).add(minimumLength(getMinPasswdLength(cfgDao))); + add(confirmPassword = new PasswordTextField("confirmPassword", new Model<String>())); + confirmPassword.setOutputMarkupId(true); + confirmPassword.setLabel(Model.of(Application.getString(329))); + confirmPassword.setRequired(true).add(minimumLength(getMinPasswdLength(cfgDao))); + + add(new AjaxButton("submit") { // FAKE button so "submit-on-enter" works as expected + private static final long serialVersionUID = 1L; + + @Override + protected void onSubmit(AjaxRequestTarget target) { + ResetPasswordDialog.this.onSubmit(target); + } + + @Override + protected void onError(AjaxRequestTarget target) { + ResetPasswordDialog.this.onError(target); + } + }); + } + + @Override + protected void onValidate() { + String pass = password.getConvertedInput(); + if (pass != null && !pass.isEmpty() && !pass.equals(confirmPassword.getConvertedInput())) { + error(Application.getString(232)); + } + super.onValidate(); + } + + }); + confirmReset = new NonClosableMessageDialog("confirmReset", Application.getString(325), Application.getString(332)) { + private static final long serialVersionUID = 1L; + + @Override + public void onClose(IPartialPageRequestHandler handler, DialogButton button) { + setResponsePage(Application.get().getSignInPageClass()); + } + }; + add(confirmReset); + } + + @Override + public void onConfigure(JQueryBehavior behavior) { + super.onConfigure(behavior); + behavior.setOption("autoOpen", true); + } + + @Override + protected List<DialogButton> getButtons() { + return Arrays.asList(resetBtn); + } + + @Override + public DialogButton getSubmitButton() { + return resetBtn; + } + + @Override + public Form<?> getForm() { + return form; + } + + @Override + protected void onError(AjaxRequestTarget target) { + target.add(feedback); + } + + @Override + protected void onSubmit(AjaxRequestTarget target) { + try { + getBean(UserDao.class).resetPassword(user, password.getConvertedInput()); + } catch (Exception e) { + error(e.getMessage()); + } + } + + @Override + public void onClose(IPartialPageRequestHandler handler, DialogButton button) { + if (resetBtn.equals(button)) { + confirmReset.open(handler); + } else { + setResponsePage(Application.get().getSignInPageClass()); + } + } +}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/8e63647c/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.js ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.js index fc60d0a..8e353d8 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.js +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.js @@ -1,329 +1,329 @@ -/* - * Licensed MIT https://github.com/ROMB/jquery-dialogextend/blob/master/LICENSE.md - */ -(function() { - var $; - - $ = jQuery; - - $.widget("ui.dialogExtend", { - version: "2.0.4", - modes: {}, - options: { - "closable": true, - "dblclick": false, - "titlebar": false, - "icons": { - "close": "ui-icon-closethick", - "restore": "ui-icon-newwin" - }, - "load": null, - "beforeRestore": null, - "restore": null - }, - _create: function() { - this._state = "normal"; - if (!$(this.element[0]).data("ui-dialog")) { - $.error("jQuery.dialogExtend Error : Only jQuery UI Dialog element is accepted"); - } - this._verifyOptions(); - this._initStyles(); - this._initButtons(); - this._initTitleBar(); - this._setState("normal"); - this._on("load", function(e) { - return console.log("test", e); - }); - return this._trigger("load"); - }, - _setState: function(state) { - $(this.element[0]).removeClass("ui-dialog-" + this._state).addClass("ui-dialog-" + state); - return this._state = state; - }, - _verifyOptions: function() { - var name, _ref, _results; - - if (this.options.dblclick && !(this.options.dblclick in this.modes)) { - $.error("jQuery.dialogExtend Error : Invalid <dblclick> value '" + this.options.dblclick + "'"); - this.options.dblclick = false; - } - if (this.options.titlebar && ((_ref = this.options.titlebar) !== "none" && _ref !== "transparent")) { - $.error("jQuery.dialogExtend Error : Invalid <titlebar> value '" + this.options.titlebar + "'"); - this.options.titlebar = false; - } - _results = []; - for (name in this.modes) { - if (this["_verifyOptions_" + name]) { - _results.push(this["_verifyOptions_" + name]()); - } else { - _results.push(void 0); - } - } - return _results; - }, - _initStyles: function() { - var name, style, _results; - - if (!$(".dialog-extend-css").length) { - style = ''; - style += '<style class="dialog-extend-css" type="text/css">'; - style += '.ui-dialog .ui-dialog-titlebar-buttonpane>a { float: right; }'; - style += '.ui-dialog .ui-dialog-titlebar-restore { width: 19px; height: 18px; }'; - style += '.ui-dialog .ui-dialog-titlebar-restore span { display: block; margin: 1px; }'; - style += '.ui-dialog .ui-dialog-titlebar-restore:hover,'; - style += '.ui-dialog .ui-dialog-titlebar-restore:focus { padding: 0; }'; - style += '.ui-dialog .ui-dialog-titlebar ::selection { background-color: transparent; }'; - style += '</style>'; - $(style).appendTo("body"); - } - _results = []; - for (name in this.modes) { - _results.push(this["_initStyles_" + name]()); - } - return _results; - }, - _initButtons: function() { - var buttonPane, mode, name, titlebar, _ref, - _this = this; - - titlebar = $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar"); - buttonPane = $('<div class="ui-dialog-titlebar-buttonpane"></div>').appendTo(titlebar); - buttonPane.css({ - "position": "absolute", - "top": "50%", - "right": "0.3em", - "margin-top": "-10px", - "height": "18px" - }); - titlebar.find(".ui-dialog-titlebar-close").css({ - "position": "relative", - "float": "right", - "top": "auto", - "right": "auto", - "margin": 0 - }).find(".ui-icon").removeClass("ui-icon-closethick").addClass(this.options.icons.close).end().appendTo(buttonPane).end(); - buttonPane.append('<a class="ui-dialog-titlebar-restore ui-corner-all ui-state-default" href="#"><span class="ui-icon ' + this.options.icons.restore + '" title="restore">restore</span></a>').find('.ui-dialog-titlebar-restore').attr("role", "button").mouseover(function() { - return $(this).addClass("ui-state-hover"); - }).mouseout(function() { - return $(this).removeClass("ui-state-hover"); - }).focus(function() { - return $(this).addClass("ui-state-focus"); - }).blur(function() { - return $(this).removeClass("ui-state-focus"); - }).end().find(".ui-dialog-titlebar-close").toggle(this.options.closable).end().find(".ui-dialog-titlebar-restore").hide().click(function(e) { - e.preventDefault(); - return _this.restore(); - }).end(); - _ref = this.modes; - for (name in _ref) { - mode = _ref[name]; - this._initModuleButton(name, mode); - } - return titlebar.dblclick(function(evt) { - if (_this.options.dblclick) { - if (_this._state !== "normal") { - return _this.restore(); - } else { - return _this[_this.options.dblclick](); - } - } - }).select(function() { - return false; - }); - }, - _initModuleButton: function(name, mode) { - var buttonPane, - _this = this; - - buttonPane = $(this.element[0]).dialog("widget").find('.ui-dialog-titlebar-buttonpane'); - return buttonPane.append('<a class="ui-dialog-titlebar-' + name + ' ui-corner-all ui-state-default" href="#" title="' + name + '"><span class="ui-icon ' + this.options.icons[name] + '">' + name + '</span></a>').find(".ui-dialog-titlebar-" + name).attr("role", "button").mouseover(function() { - return $(this).addClass("ui-state-hover"); - }).mouseout(function() { - return $(this).removeClass("ui-state-hover"); - }).focus(function() { - return $(this).addClass("ui-state-focus"); - }).blur(function() { - return $(this).removeClass("ui-state-focus"); - }).end().find(".ui-dialog-titlebar-" + name).toggle(this.options[mode.option]).click(function(e) { - e.preventDefault(); - return _this[name](); - }).end(); - }, - _initTitleBar: function() { - var handle; - - switch (this.options.titlebar) { - case false: - return 0; - case "none": - if ($(this.element[0]).dialog("option", "draggable")) { - handle = $("<div />").addClass("ui-dialog-draggable-handle").css("cursor", "move").height(5); - $(this.element[0]).dialog("widget").prepend(handle).draggable("option", "handle", handle); - } - return $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").find(".ui-dialog-title").html(" ").end().css({ - "background-color": "transparent", - "background-image": "none", - "border": 0, - "position": "absolute", - "right": 0, - "top": 0, - "z-index": 9999 - }).end(); - case "transparent": - return $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").css({ - "background-color": "transparent", - "background-image": "none", - "border": 0 - }); - default: - return $.error("jQuery.dialogExtend Error : Invalid <titlebar> value '" + this.options.titlebar + "'"); - } - }, - state: function() { - return this._state; - }, - restore: function() { - this._trigger("beforeRestore"); - this._restore(); - this._toggleButtons(); - return this._trigger("restore"); - }, - _restore: function() { - if (this._state !== "normal") { - this["_restore_" + this._state](); - this._setState("normal"); - return $(this.element[0]).dialog("widget").focus(); - } - }, - _saveSnapshot: function() { - if (this._state === "normal") { - this.original_config_resizable = $(this.element[0]).dialog("option", "resizable"); - this.original_config_draggable = $(this.element[0]).dialog("option", "draggable"); - this.original_size_height = $(this.element[0]).dialog("widget").outerHeight(); - this.original_size_width = $(this.element[0]).dialog("option", "width"); - this.original_size_maxHeight = $(this.element[0]).dialog("option", "maxHeight"); - this.original_position_mode = $(this.element[0]).dialog("widget").css("position"); - this.original_position_left = $(this.element[0]).dialog("widget").offset().left - $('body').scrollLeft(); - this.original_position_top = $(this.element[0]).dialog("widget").offset().top - $('body').scrollTop(); - return this.original_titlebar_wrap = $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").css("white-space"); - } - }, - _loadSnapshot: function() { - return { - "config": { - "resizable": this.original_config_resizable, - "draggable": this.original_config_draggable - }, - "size": { - "height": this.original_size_height, - "width": this.original_size_width, - "maxHeight": this.original_size_maxHeight - }, - "position": { - "mode": this.original_position_mode, - "left": this.original_position_left, - "top": this.original_position_top - }, - "titlebar": { - "wrap": this.original_titlebar_wrap - } - }; - }, - _toggleButtons: function(newstate) { - var mode, name, state, _ref, _ref1, _results; - - state = newstate || this._state; - $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-restore").toggle(state !== "normal").css({ - "right": "1.4em" - }).end(); - _ref = this.modes; - for (name in _ref) { - mode = _ref[name]; - $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-" + name).toggle(state !== mode.state && this.options[mode.option]); - } - _ref1 = this.modes; - _results = []; - for (name in _ref1) { - mode = _ref1[name]; - if (mode.state === state) { - _results.push($(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-restore").insertAfter($(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-" + name)).end()); - } else { - _results.push(void 0); - } - } - return _results; - } - }); - -}).call(this); - -(function() { - var $; - - $ = jQuery; - - $.extend(true, $.ui.dialogExtend.prototype, { - modes: { - "collapse": { - option: "collapsable", - state: "collapsed" - } - }, - options: { - "collapsable": false, - "icons": { - "collapse": "ui-icon-triangle-1-s" - }, - "beforeCollapse": null, - "collapse": null - }, - collapse: function() { - var newHeight, pos; - - newHeight = $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").height() + 2; - this._trigger("beforeCollapse"); - if (this._state !== "normal") { - this._restore(); - } - this._saveSnapshot(); - pos = $(this.element[0]).dialog("widget").position(); - $(this.element[0]).dialog("option", { - "resizable": false, - "height": newHeight, - "maxHeight": newHeight, - "position": [pos.left - $(document).scrollLeft(), pos.top - $(document).scrollTop()] - }).on('dialogclose', this._collapse_restore).dialog("widget").find(".ui-dialog-buttonpane:visible").hide().end().find(".ui-dialog-titlebar").css("white-space", "nowrap").end().find(".ui-dialog-content"); - this._setState("collapsed"); - this._toggleButtons(); - return this._trigger("collapse"); - }, - _restore_collapsed: function() { - var original; - - original = this._loadSnapshot(); - return $(this.element[0]).show().dialog("widget").find(".ui-dialog-buttonpane:hidden").show().end().find(".ui-dialog-titlebar").css("white-space", original.titlebar.wrap).end().find(".ui-dialog-content").dialog("option", { - "resizable": original.config.resizable, - "height": original.size.height, - "maxHeight": original.size.maxHeight - }).off('dialogclose', this._collapse_restore); - }, - _initStyles_collapse: function() { - var style; - - if (!$(".dialog-extend-collapse-css").length) { - style = ''; - style += '<style class="dialog-extend-collapse-css" type="text/css">'; - style += '.ui-dialog .ui-dialog-titlebar-collapse { width: 19px; height: 18px; }'; - style += '.ui-dialog .ui-dialog-titlebar-collapse span { display: block; margin: 1px; }'; - style += '.ui-dialog .ui-dialog-titlebar-collapse:hover,'; - style += '.ui-dialog .ui-dialog-titlebar-collapse:focus { padding: 0; }'; - style += '</style>'; - return $(style).appendTo("body"); - } - }, - _collapse_restore: function() { - return $(this).dialogExtend("restore"); - } - }); - -}).call(this); +/* + * Licensed MIT https://github.com/ROMB/jquery-dialogextend/blob/master/LICENSE.md + */ +(function() { + var $; + + $ = jQuery; + + $.widget("ui.dialogExtend", { + version: "2.0.4", + modes: {}, + options: { + "closable": true, + "dblclick": false, + "titlebar": false, + "icons": { + "close": "ui-icon-closethick", + "restore": "ui-icon-newwin" + }, + "load": null, + "beforeRestore": null, + "restore": null + }, + _create: function() { + this._state = "normal"; + if (!$(this.element[0]).data("ui-dialog")) { + $.error("jQuery.dialogExtend Error : Only jQuery UI Dialog element is accepted"); + } + this._verifyOptions(); + this._initStyles(); + this._initButtons(); + this._initTitleBar(); + this._setState("normal"); + this._on("load", function(e) { + return console.log("test", e); + }); + return this._trigger("load"); + }, + _setState: function(state) { + $(this.element[0]).removeClass("ui-dialog-" + this._state).addClass("ui-dialog-" + state); + return this._state = state; + }, + _verifyOptions: function() { + var name, _ref, _results; + + if (this.options.dblclick && !(this.options.dblclick in this.modes)) { + $.error("jQuery.dialogExtend Error : Invalid <dblclick> value '" + this.options.dblclick + "'"); + this.options.dblclick = false; + } + if (this.options.titlebar && ((_ref = this.options.titlebar) !== "none" && _ref !== "transparent")) { + $.error("jQuery.dialogExtend Error : Invalid <titlebar> value '" + this.options.titlebar + "'"); + this.options.titlebar = false; + } + _results = []; + for (name in this.modes) { + if (this["_verifyOptions_" + name]) { + _results.push(this["_verifyOptions_" + name]()); + } else { + _results.push(void 0); + } + } + return _results; + }, + _initStyles: function() { + var name, style, _results; + + if (!$(".dialog-extend-css").length) { + style = ''; + style += '<style class="dialog-extend-css" type="text/css">'; + style += '.ui-dialog .ui-dialog-titlebar-buttonpane>a { float: right; }'; + style += '.ui-dialog .ui-dialog-titlebar-restore { width: 19px; height: 18px; }'; + style += '.ui-dialog .ui-dialog-titlebar-restore span { display: block; margin: 1px; }'; + style += '.ui-dialog .ui-dialog-titlebar-restore:hover,'; + style += '.ui-dialog .ui-dialog-titlebar-restore:focus { padding: 0; }'; + style += '.ui-dialog .ui-dialog-titlebar ::selection { background-color: transparent; }'; + style += '</style>'; + $(style).appendTo("body"); + } + _results = []; + for (name in this.modes) { + _results.push(this["_initStyles_" + name]()); + } + return _results; + }, + _initButtons: function() { + var buttonPane, mode, name, titlebar, _ref, + _this = this; + + titlebar = $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar"); + buttonPane = $('<div class="ui-dialog-titlebar-buttonpane"></div>').appendTo(titlebar); + buttonPane.css({ + "position": "absolute", + "top": "50%", + "right": "0.3em", + "margin-top": "-10px", + "height": "18px" + }); + titlebar.find(".ui-dialog-titlebar-close").css({ + "position": "relative", + "float": "right", + "top": "auto", + "right": "auto", + "margin": 0 + }).find(".ui-icon").removeClass("ui-icon-closethick").addClass(this.options.icons.close).end().appendTo(buttonPane).end(); + buttonPane.append('<a class="ui-dialog-titlebar-restore ui-corner-all ui-state-default" href="#"><span class="ui-icon ' + this.options.icons.restore + '" title="restore">restore</span></a>').find('.ui-dialog-titlebar-restore').attr("role", "button").mouseover(function() { + return $(this).addClass("ui-state-hover"); + }).mouseout(function() { + return $(this).removeClass("ui-state-hover"); + }).focus(function() { + return $(this).addClass("ui-state-focus"); + }).blur(function() { + return $(this).removeClass("ui-state-focus"); + }).end().find(".ui-dialog-titlebar-close").toggle(this.options.closable).end().find(".ui-dialog-titlebar-restore").hide().click(function(e) { + e.preventDefault(); + return _this.restore(); + }).end(); + _ref = this.modes; + for (name in _ref) { + mode = _ref[name]; + this._initModuleButton(name, mode); + } + return titlebar.dblclick(function(evt) { + if (_this.options.dblclick) { + if (_this._state !== "normal") { + return _this.restore(); + } else { + return _this[_this.options.dblclick](); + } + } + }).select(function() { + return false; + }); + }, + _initModuleButton: function(name, mode) { + var buttonPane, + _this = this; + + buttonPane = $(this.element[0]).dialog("widget").find('.ui-dialog-titlebar-buttonpane'); + return buttonPane.append('<a class="ui-dialog-titlebar-' + name + ' ui-corner-all ui-state-default" href="#" title="' + name + '"><span class="ui-icon ' + this.options.icons[name] + '">' + name + '</span></a>').find(".ui-dialog-titlebar-" + name).attr("role", "button").mouseover(function() { + return $(this).addClass("ui-state-hover"); + }).mouseout(function() { + return $(this).removeClass("ui-state-hover"); + }).focus(function() { + return $(this).addClass("ui-state-focus"); + }).blur(function() { + return $(this).removeClass("ui-state-focus"); + }).end().find(".ui-dialog-titlebar-" + name).toggle(this.options[mode.option]).click(function(e) { + e.preventDefault(); + return _this[name](); + }).end(); + }, + _initTitleBar: function() { + var handle; + + switch (this.options.titlebar) { + case false: + return 0; + case "none": + if ($(this.element[0]).dialog("option", "draggable")) { + handle = $("<div />").addClass("ui-dialog-draggable-handle").css("cursor", "move").height(5); + $(this.element[0]).dialog("widget").prepend(handle).draggable("option", "handle", handle); + } + return $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").find(".ui-dialog-title").html(" ").end().css({ + "background-color": "transparent", + "background-image": "none", + "border": 0, + "position": "absolute", + "right": 0, + "top": 0, + "z-index": 9999 + }).end(); + case "transparent": + return $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").css({ + "background-color": "transparent", + "background-image": "none", + "border": 0 + }); + default: + return $.error("jQuery.dialogExtend Error : Invalid <titlebar> value '" + this.options.titlebar + "'"); + } + }, + state: function() { + return this._state; + }, + restore: function() { + this._trigger("beforeRestore"); + this._restore(); + this._toggleButtons(); + return this._trigger("restore"); + }, + _restore: function() { + if (this._state !== "normal") { + this["_restore_" + this._state](); + this._setState("normal"); + return $(this.element[0]).dialog("widget").focus(); + } + }, + _saveSnapshot: function() { + if (this._state === "normal") { + this.original_config_resizable = $(this.element[0]).dialog("option", "resizable"); + this.original_config_draggable = $(this.element[0]).dialog("option", "draggable"); + this.original_size_height = $(this.element[0]).dialog("widget").outerHeight(); + this.original_size_width = $(this.element[0]).dialog("option", "width"); + this.original_size_maxHeight = $(this.element[0]).dialog("option", "maxHeight"); + this.original_position_mode = $(this.element[0]).dialog("widget").css("position"); + this.original_position_left = $(this.element[0]).dialog("widget").offset().left - $('body').scrollLeft(); + this.original_position_top = $(this.element[0]).dialog("widget").offset().top - $('body').scrollTop(); + return this.original_titlebar_wrap = $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").css("white-space"); + } + }, + _loadSnapshot: function() { + return { + "config": { + "resizable": this.original_config_resizable, + "draggable": this.original_config_draggable + }, + "size": { + "height": this.original_size_height, + "width": this.original_size_width, + "maxHeight": this.original_size_maxHeight + }, + "position": { + "mode": this.original_position_mode, + "left": this.original_position_left, + "top": this.original_position_top + }, + "titlebar": { + "wrap": this.original_titlebar_wrap + } + }; + }, + _toggleButtons: function(newstate) { + var mode, name, state, _ref, _ref1, _results; + + state = newstate || this._state; + $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-restore").toggle(state !== "normal").css({ + "right": "1.4em" + }).end(); + _ref = this.modes; + for (name in _ref) { + mode = _ref[name]; + $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-" + name).toggle(state !== mode.state && this.options[mode.option]); + } + _ref1 = this.modes; + _results = []; + for (name in _ref1) { + mode = _ref1[name]; + if (mode.state === state) { + _results.push($(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-restore").insertAfter($(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-" + name)).end()); + } else { + _results.push(void 0); + } + } + return _results; + } + }); + +}).call(this); + +(function() { + var $; + + $ = jQuery; + + $.extend(true, $.ui.dialogExtend.prototype, { + modes: { + "collapse": { + option: "collapsable", + state: "collapsed" + } + }, + options: { + "collapsable": false, + "icons": { + "collapse": "ui-icon-triangle-1-s" + }, + "beforeCollapse": null, + "collapse": null + }, + collapse: function() { + var newHeight, pos; + + newHeight = $(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").height() + 2; + this._trigger("beforeCollapse"); + if (this._state !== "normal") { + this._restore(); + } + this._saveSnapshot(); + pos = $(this.element[0]).dialog("widget").position(); + $(this.element[0]).dialog("option", { + "resizable": false, + "height": newHeight, + "maxHeight": newHeight, + "position": [pos.left - $(document).scrollLeft(), pos.top - $(document).scrollTop()] + }).on('dialogclose', this._collapse_restore).dialog("widget").find(".ui-dialog-buttonpane:visible").hide().end().find(".ui-dialog-titlebar").css("white-space", "nowrap").end().find(".ui-dialog-content"); + this._setState("collapsed"); + this._toggleButtons(); + return this._trigger("collapse"); + }, + _restore_collapsed: function() { + var original; + + original = this._loadSnapshot(); + return $(this.element[0]).show().dialog("widget").find(".ui-dialog-buttonpane:hidden").show().end().find(".ui-dialog-titlebar").css("white-space", original.titlebar.wrap).end().find(".ui-dialog-content").dialog("option", { + "resizable": original.config.resizable, + "height": original.size.height, + "maxHeight": original.size.maxHeight + }).off('dialogclose', this._collapse_restore); + }, + _initStyles_collapse: function() { + var style; + + if (!$(".dialog-extend-collapse-css").length) { + style = ''; + style += '<style class="dialog-extend-collapse-css" type="text/css">'; + style += '.ui-dialog .ui-dialog-titlebar-collapse { width: 19px; height: 18px; }'; + style += '.ui-dialog .ui-dialog-titlebar-collapse span { display: block; margin: 1px; }'; + style += '.ui-dialog .ui-dialog-titlebar-collapse:hover,'; + style += '.ui-dialog .ui-dialog-titlebar-collapse:focus { padding: 0; }'; + style += '</style>'; + return $(style).appendTo("body"); + } + }, + _collapse_restore: function() { + return $(this).dialogExtend("restore"); + } + }); + +}).call(this); http://git-wip-us.apache.org/repos/asf/openmeetings/blob/8e63647c/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.min.js ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.min.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.min.js index 4eb412e..293458c 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.min.js +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/jquery.dialogextend.min.js @@ -1,3 +1,3 @@ -/* Licensed MIT */ -/*! jquery-dialogextend 2.0.4 2014-07-08 */ +/* Licensed MIT */ +/*! jquery-dialogextend 2.0.4 2014-07-08 */ (function(){var i;i=jQuery,i.widget("ui.dialogExtend",{version:"2.0.4",modes:{},options:{closable:!0,dblclick:!1,titlebar:!1,icons:{close:"ui-icon-closethick",restore:"ui-icon-newwin"},load:null,beforeRestore:null,restore:null},_create:function(){return this._state="normal",i(this.element[0]).data("ui-dialog")||i.error("jQuery.dialogExtend Error : Only jQuery UI Dialog element is accepted"),this._verifyOptions(),this._initStyles(),this._initButtons(),this._initTitleBar(),this._setState("normal"),this._on("load",function(i){return console.log("test",i)}),this._trigger("load")},_setState:function(t){return i(this.element[0]).removeClass("ui-dialog-"+this._state).addClass("ui-dialog-"+t),this._state=t},_verifyOptions:function(){var t,e,o;!this.options.dblclick||this.options.dblclick in this.modes||(i.error("jQuery.dialogExtend Error : Invalid <dblclick> value '"+this.options.dblclick+"'"),this.options.dblclick=!1),this.options.titlebar&&"none"!==(e=this.options.titlebar)&&"transparent" !==e&&(i.error("jQuery.dialogExtend Error : Invalid <titlebar> value '"+this.options.titlebar+"'"),this.options.titlebar=!1),o=[];for(t in this.modes)this["_verifyOptions_"+t]?o.push(this["_verifyOptions_"+t]()):o.push(void 0);return o},_initStyles:function(){var t,e,o;i(".dialog-extend-css").length||(e="",e+='<style class="dialog-extend-css" type="text/css">',e+=".ui-dialog .ui-dialog-titlebar-buttonpane>a { float: right; }",e+=".ui-dialog .ui-dialog-titlebar-restore { width: 19px; height: 18px; }",e+=".ui-dialog .ui-dialog-titlebar-restore span { display: block; margin: 1px; }",e+=".ui-dialog .ui-dialog-titlebar-restore:hover,",e+=".ui-dialog .ui-dialog-titlebar-restore:focus { padding: 0; }",e+=".ui-dialog .ui-dialog-titlebar ::selection { background-color: transparent; }",e+="</style>",i(e).appendTo("body")),o=[];for(t in this.modes)o.push(this["_initStyles_"+t]());return o},_initButtons:function(){var t,e,o,n,a,l=this;n=i(this.element[0]).dialog("widget").find(".ui-dialog-title bar"),t=i('<div class="ui-dialog-titlebar-buttonpane"></div>').appendTo(n),t.css({position:"absolute",top:"50%",right:"0.3em","margin-top":"-10px",height:"18px"}),n.find(".ui-dialog-titlebar-close").css({position:"relative","float":"right",top:"auto",right:"auto",margin:0}).find(".ui-icon").removeClass("ui-icon-closethick").addClass(this.options.icons.close).end().appendTo(t).end(),t.append('<a class="ui-dialog-titlebar-restore ui-corner-all ui-state-default" href="#"><span class="ui-icon '+this.options.icons.restore+'" title="restore">restore</span></a>').find(".ui-dialog-titlebar-restore").attr("role","button").mouseover(function(){return i(this).addClass("ui-state-hover")}).mouseout(function(){return i(this).removeClass("ui-state-hover")}).focus(function(){return i(this).addClass("ui-state-focus")}).blur(function(){return i(this).removeClass("ui-state-focus")}).end().find(".ui-dialog-titlebar-close").toggle(this.options.closable).end().find(".ui-dialog-titlebar-restore").hide().c lick(function(i){return i.preventDefault(),l.restore()}).end(),a=this.modes;for(o in a)e=a[o],this._initModuleButton(o,e);return n.dblclick(function(){return l.options.dblclick?"normal"!==l._state?l.restore():l[l.options.dblclick]():void 0}).select(function(){return!1})},_initModuleButton:function(t,e){var o,n=this;return o=i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-buttonpane"),o.append('<a class="ui-dialog-titlebar-'+t+' ui-corner-all ui-state-default" href="#" title="'+t+'"><span class="ui-icon '+this.options.icons[t]+'">'+t+"</span></a>").find(".ui-dialog-titlebar-"+t).attr("role","button").mouseover(function(){return i(this).addClass("ui-state-hover")}).mouseout(function(){return i(this).removeClass("ui-state-hover")}).focus(function(){return i(this).addClass("ui-state-focus")}).blur(function(){return i(this).removeClass("ui-state-focus")}).end().find(".ui-dialog-titlebar-"+t).toggle(this.options[e.option]).click(function(i){return i.preventDefault(),n[t]()}) .end()},_initTitleBar:function(){var t;switch(this.options.titlebar){case!1:return 0;case"none":return i(this.element[0]).dialog("option","draggable")&&(t=i("<div />").addClass("ui-dialog-draggable-handle").css("cursor","move").height(5),i(this.element[0]).dialog("widget").prepend(t).draggable("option","handle",t)),i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").find(".ui-dialog-title").html(" ").end().css({"background-color":"transparent","background-image":"none",border:0,position:"absolute",right:0,top:0,"z-index":9999}).end();case"transparent":return i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").css({"background-color":"transparent","background-image":"none",border:0});default:return i.error("jQuery.dialogExtend Error : Invalid <titlebar> value '"+this.options.titlebar+"'")}},state:function(){return this._state},restore:function(){return this._trigger("beforeRestore"),this._restore(),this._toggleButtons(),this._trigger("restore")},_restore: function(){return"normal"!==this._state?(this["_restore_"+this._state](),this._setState("normal"),i(this.element[0]).dialog("widget").focus()):void 0},_saveSnapshot:function(){return"normal"===this._state?(this.original_config_resizable=i(this.element[0]).dialog("option","resizable"),this.original_config_draggable=i(this.element[0]).dialog("option","draggable"),this.original_size_height=i(this.element[0]).dialog("widget").outerHeight(),this.original_size_width=i(this.element[0]).dialog("option","width"),this.original_size_maxHeight=i(this.element[0]).dialog("option","maxHeight"),this.original_position_mode=i(this.element[0]).dialog("widget").css("position"),this.original_position_left=i(this.element[0]).dialog("widget").offset().left-i("body").scrollLeft(),this.original_position_top=i(this.element[0]).dialog("widget").offset().top-i("body").scrollTop(),this.original_titlebar_wrap=i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").css("white-space")):void 0},_loadSnapsho t:function(){return{config:{resizable:this.original_config_resizable,draggable:this.original_config_draggable},size:{height:this.original_size_height,width:this.original_size_width,maxHeight:this.original_size_maxHeight},position:{mode:this.original_position_mode,left:this.original_position_left,top:this.original_position_top},titlebar:{wrap:this.original_titlebar_wrap}}},_toggleButtons:function(t){var e,o,n,a,l,s;n=t||this._state,i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-restore").toggle("normal"!==n).css({right:"1.4em"}).end(),a=this.modes;for(o in a)e=a[o],i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-"+o).toggle(n!==e.state&&this.options[e.option]);l=this.modes,s=[];for(o in l)e=l[o],e.state===n?s.push(i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-restore").insertAfter(i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-"+o)).end()):s.push(void 0);return s}})}).call(this),function(){var i;i=jQuery,i.extend(!0,i.ui.dia logExtend.prototype,{modes:{collapse:{option:"collapsable",state:"collapsed"}},options:{collapsable:!1,icons:{collapse:"ui-icon-triangle-1-s"},beforeCollapse:null,collapse:null},collapse:function(){var t,e;return t=i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").height()+2,this._trigger("beforeCollapse"),"normal"!==this._state&&this._restore(),this._saveSnapshot(),e=i(this.element[0]).dialog("widget").position(),i(this.element[0]).dialog("option",{resizable:!1,height:t,maxHeight:t,position:[e.left-i(document).scrollLeft(),e.top-i(document).scrollTop()]}).on("dialogclose",this._collapse_restore).dialog("widget").find(".ui-dialog-buttonpane:visible").hide().end().find(".ui-dialog-titlebar").css("white-space","nowrap").end().find(".ui-dialog-content"),this._setState("collapsed"),this._toggleButtons(),this._trigger("collapse")},_restore_collapsed:function(){var t;return t=this._loadSnapshot(),i(this.element[0]).show().dialog("widget").find(".ui-dialog-buttonpane:hidden") .show().end().find(".ui-dialog-titlebar").css("white-space",t.titlebar.wrap).end().find(".ui-dialog-content").dialog("option",{resizable:t.config.resizable,height:t.size.height,maxHeight:t.size.maxHeight}).off("dialogclose",this._collapse_restore)},_initStyles_collapse:function(){var t;return i(".dialog-extend-collapse-css").length?void 0:(t="",t+='<style class="dialog-extend-collapse-css" type="text/css">',t+=".ui-dialog .ui-dialog-titlebar-collapse { width: 19px; height: 18px; }",t+=".ui-dialog .ui-dialog-titlebar-collapse span { display: block; margin: 1px; }",t+=".ui-dialog .ui-dialog-titlebar-collapse:hover,",t+=".ui-dialog .ui-dialog-titlebar-collapse:focus { padding: 0; }",t+="</style>",i(t).appendTo("body"))},_collapse_restore:function(){return i(this).dialogExtend("restore")}})}.call(this); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/openmeetings/blob/8e63647c/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.html ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.html b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.html index 9c025cb..a69db09 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.html +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.html @@ -1,42 +1,42 @@ -<?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> - <table> - <tr> - <td><wicket:message key="1550" /></td> - <td wicket:id="name">[name]</td> - </tr> - <tr> - <td><wicket:message key="1551" /></td> - <td wicket:id="version">[version]</td> - </tr> - <tr> - <td><wicket:message key="1552" /></td> - <td wicket:id="revision">[revision]</td> - </tr> - <tr> - <td><wicket:message key="1553" /></td> - <td wicket:id="buildDate">[buildDate]</td> - </tr> - </table> -</wicket:panel> -</html> +<?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> + <table> + <tr> + <td><wicket:message key="1550" /></td> + <td wicket:id="name">[name]</td> + </tr> + <tr> + <td><wicket:message key="1551" /></td> + <td wicket:id="version">[version]</td> + </tr> + <tr> + <td><wicket:message key="1552" /></td> + <td wicket:id="revision">[revision]</td> + </tr> + <tr> + <td><wicket:message key="1553" /></td> + <td wicket:id="buildDate">[buildDate]</td> + </tr> + </table> +</wicket:panel> +</html> http://git-wip-us.apache.org/repos/asf/openmeetings/blob/8e63647c/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.java ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.java index 50718e4..ab92bbe 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/AboutDialog.java @@ -1,57 +1,57 @@ -/* - * 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.user; - -import static org.apache.openmeetings.util.Version.getBuildDate; -import static org.apache.openmeetings.util.Version.getRevision; -import static org.apache.openmeetings.util.Version.getVersion; -import static org.apache.openmeetings.web.app.Application.getBean; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.openmeetings.db.dao.basic.ConfigurationDao; -import org.apache.openmeetings.web.app.Application; -import org.apache.wicket.core.request.handler.IPartialPageRequestHandler; -import org.apache.wicket.markup.html.basic.Label; - -import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog; -import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton; - -public class AboutDialog extends AbstractDialog<String> { - private static final long serialVersionUID = 1L; - - public AboutDialog(String id) { - super(id, Application.getString(1549)); - - add(new Label("name", getBean(ConfigurationDao.class).getAppName())); - add(new Label("version", getVersion())); - add(new Label("revision", getRevision())); - add(new Label("buildDate", getBuildDate())); - } - - @Override - protected List<DialogButton> getButtons() { - return new ArrayList<>(); - } - - @Override - public void onClose(IPartialPageRequestHandler handler, DialogButton arg1) { - } -} +/* + * 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.user; + +import static org.apache.openmeetings.util.Version.getBuildDate; +import static org.apache.openmeetings.util.Version.getRevision; +import static org.apache.openmeetings.util.Version.getVersion; +import static org.apache.openmeetings.web.app.Application.getBean; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.openmeetings.db.dao.basic.ConfigurationDao; +import org.apache.openmeetings.web.app.Application; +import org.apache.wicket.core.request.handler.IPartialPageRequestHandler; +import org.apache.wicket.markup.html.basic.Label; + +import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog; +import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton; + +public class AboutDialog extends AbstractDialog<String> { + private static final long serialVersionUID = 1L; + + public AboutDialog(String id) { + super(id, Application.getString(1549)); + + add(new Label("name", getBean(ConfigurationDao.class).getAppName())); + add(new Label("version", getVersion())); + add(new Label("revision", getRevision())); + add(new Label("buildDate", getBuildDate())); + } + + @Override + protected List<DialogButton> getButtons() { + return new ArrayList<>(); + } + + @Override + public void onClose(IPartialPageRequestHandler handler, DialogButton arg1) { + } +} http://git-wip-us.apache.org/repos/asf/openmeetings/blob/8e63647c/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.html ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.html b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.html index 42cd4b3..f450843 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.html +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.html @@ -1,27 +1,27 @@ -<?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="container"> - <div wicket:id="body"></div> - </div> -</wicket:panel> -</html> +<?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="container"> + <div wicket:id="body"></div> + </div> +</wicket:panel> +</html> http://git-wip-us.apache.org/repos/asf/openmeetings/blob/8e63647c/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.java ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.java index 0cab471..50f3472 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/UserInfoDialog.java @@ -1,83 +1,83 @@ -/* - * 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.user; - -import static org.apache.openmeetings.web.app.Application.getBean; -import static org.apache.openmeetings.web.app.WebSession.getUserId; - -import java.util.Arrays; -import java.util.List; - -import org.apache.openmeetings.db.dao.user.UserContactDao; -import org.apache.openmeetings.web.app.Application; -import org.apache.openmeetings.web.user.profile.UserProfilePanel; -import org.apache.openmeetings.web.util.ContactsHelper; -import org.apache.wicket.core.request.handler.IPartialPageRequestHandler; -import org.apache.wicket.markup.html.WebMarkupContainer; - -import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog; -import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton; - -public class UserInfoDialog extends AbstractDialog<String> { - private static final long serialVersionUID = 1L; - private WebMarkupContainer container = new WebMarkupContainer("container"); - private DialogButton cancel = new DialogButton("cancel", Application.getString(61)); - private DialogButton message = new DialogButton("message", Application.getString(1253)); - private DialogButton contacts = new DialogButton("contacts", Application.getString(1186)); - private MessageDialog newMessage; - private long userId; - - public UserInfoDialog(String id, MessageDialog newMessage) { - super(id, Application.getString(1235)); - add(container.add(new WebMarkupContainer("body")).setOutputMarkupId(true)); - this.newMessage = newMessage; - } - - public void open(IPartialPageRequestHandler handler, long userId) { - this.userId = userId; - contacts.setVisible(userId != getUserId() && getBean(UserContactDao.class).get(userId, getUserId()) == null, handler); - message.setVisible(userId != getUserId(), handler); - container.replace(new UserProfilePanel("body", userId)); - handler.add(container); - open(handler); - } - - public WebMarkupContainer getContainer() { - return container; - } - - @Override - public int getWidth() { - return 600; - } - - @Override - protected List<DialogButton> getButtons() { - return Arrays.asList(contacts, message, cancel); - } - - @Override - public void onClose(IPartialPageRequestHandler handler, DialogButton button) { - if (message.equals(button)) { - newMessage.reset(false).open(handler, userId); - } else if (contacts.equals(button)) { - ContactsHelper.addUserToContactList(userId); - } - } -} +/* + * 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.user; + +import static org.apache.openmeetings.web.app.Application.getBean; +import static org.apache.openmeetings.web.app.WebSession.getUserId; + +import java.util.Arrays; +import java.util.List; + +import org.apache.openmeetings.db.dao.user.UserContactDao; +import org.apache.openmeetings.web.app.Application; +import org.apache.openmeetings.web.user.profile.UserProfilePanel; +import org.apache.openmeetings.web.util.ContactsHelper; +import org.apache.wicket.core.request.handler.IPartialPageRequestHandler; +import org.apache.wicket.markup.html.WebMarkupContainer; + +import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog; +import com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton; + +public class UserInfoDialog extends AbstractDialog<String> { + private static final long serialVersionUID = 1L; + private WebMarkupContainer container = new WebMarkupContainer("container"); + private DialogButton cancel = new DialogButton("cancel", Application.getString(61)); + private DialogButton message = new DialogButton("message", Application.getString(1253)); + private DialogButton contacts = new DialogButton("contacts", Application.getString(1186)); + private MessageDialog newMessage; + private long userId; + + public UserInfoDialog(String id, MessageDialog newMessage) { + super(id, Application.getString(1235)); + add(container.add(new WebMarkupContainer("body")).setOutputMarkupId(true)); + this.newMessage = newMessage; + } + + public void open(IPartialPageRequestHandler handler, long userId) { + this.userId = userId; + contacts.setVisible(userId != getUserId() && getBean(UserContactDao.class).get(userId, getUserId()) == null, handler); + message.setVisible(userId != getUserId(), handler); + container.replace(new UserProfilePanel("body", userId)); + handler.add(container); + open(handler); + } + + public WebMarkupContainer getContainer() { + return container; + } + + @Override + public int getWidth() { + return 600; + } + + @Override + protected List<DialogButton> getButtons() { + return Arrays.asList(contacts, message, cancel); + } + + @Override + public void onClose(IPartialPageRequestHandler handler, DialogButton button) { + if (message.equals(button)) { + newMessage.reset(false).open(handler, userId); + } else if (contacts.equals(button)) { + ContactsHelper.addUserToContactList(userId); + } + } +} http://git-wip-us.apache.org/repos/asf/openmeetings/blob/8e63647c/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html index 2d5276e..6a69179 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/calendar/AppointmentDialog.html @@ -1,121 +1,121 @@ -<?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> - <form wicket:id="appForm" class="appointmentPopUp"> - <span wicket:id="feedback"></span> - <div id="tabs"> - <ul> - <li><a href="#tab1"><wicket:message key="appointment.tab.general"/></a></li> - <li><a href="#tab2"><wicket:message key="436"/></a></li> - <li><a href="#tab3"><wicket:message key="appointment.tab.advanced"/></a></li> - </ul> - <div id="tab1"> - <div class="table"> - <div> - <div class="column label"><wicket:message key="572" /></div> - <div class="column data"><input type="text" wicket:id="title" /></div> - </div> - <div> - <div class="column label"><wicket:message key="570" /></div> - <div class="column data"><span class="date time picker" wicket:id="start"></span></div> - </div> - <div> - <div class="column label"><wicket:message key="571" /></div> - <div class="column data"><span class="date time picker" wicket:id="end"></span></div> - </div> - <div wicket:id="owner-row"> - <div class="column label"><wicket:message key="1156" /></div> - <div class="column data"><span wicket:id="aowner"></span></div> - </div> - <div wicket:id="inviteeType"> - <div> - <div class="column label"><input type="radio" wicket:id="user"/><label wicket:for="user"><wicket:message key="803" /></label></div> - <div class="column data om-select2" wicket:message="title:1588"><select class="appointment attendees input" wicket:id="attendees"></select></div> - </div> - <div wicket:id="groupContainer"> - <div class="column label"><input type="radio" wicket:id="group"/><label wicket:for="group"><wicket:message key="126" /></label></div> - <div class="column data om-select2"><select wicket:id="groups" class="input invitees"></select></div> - </div> - </div> - <div> - <div class="column label"><wicket:message key="569" /></div> - <div class="column data"><input type="text" wicket:id="location" /></div> - </div> - <div> - <div class="column label"><wicket:message key="573" /></div> - <div class="column data"> - <div wicket:id="toolbarContainer"></div> - <div wicket:id="description"></div> - </div> - </div> - </div> - </div> - <div id="tab2"> - <div class="table"> - <div> - <input type="checkbox" wicket:id="createRoom" /><label wicket:for="createRoom"><wicket:message key="1509" /></label> - </div> - <div wicket:id="create-room-block"> - <div> - <div class="column label"><wicket:message key="619" /></div> - <div class="column data"><select wicket:id="type" ></select></div> - </div> - <div> - <div class="column label"><label wicket:for="moderated"><wicket:message key="640" /></label></div> - <div class="column data"><input type="checkbox" wicket:id="moderated" /></div> - </div> - </div> - <div> - <div class="column label"><wicket:message key="436" /></div> - <div class="column data"><select wicket:id="groom" ></select></div> - </div> - <div wicket:id="sip-container"> - <div class="column label"><wicket:message key="1003"/></div> - <div class="column data"><span wicket:id="room.confno"></span></div> - </div> - </div> - </div> - <div id="tab3"> - <div class="table"> - <div> - <div class="column label"><wicket:message key="565" /></div> - <div class="column data"><select wicket:id="reminder" ></select></div> - </div> - <div> - <input type="checkbox" wicket:id="passwordProtected" /><label wicket:for="passwordProtected"><wicket:message key="524" /></label> - </div> - <div> - <div class="column label"><wicket:message key="525" /></div> - <div class="column data"><input type="password" wicket:id="password" /></div> - </div> - <div><wicket:message key="1445" /></div> - <div> - <div class="column label"><wicket:message key="162" /></div> - <div class="column data"><select wicket:id="calendar"></select></div> - </div> - </div> - </div> - </div> - </form> - <div wicket:id="confirmDelete"></div> - </wicket:panel> -</html> +<?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> + <form wicket:id="appForm" class="appointmentPopUp"> + <span wicket:id="feedback"></span> + <div id="tabs"> + <ul> + <li><a href="#tab1"><wicket:message key="appointment.tab.general"/></a></li> + <li><a href="#tab2"><wicket:message key="436"/></a></li> + <li><a href="#tab3"><wicket:message key="appointment.tab.advanced"/></a></li> + </ul> + <div id="tab1"> + <div class="table"> + <div> + <div class="column label"><wicket:message key="572" /></div> + <div class="column data"><input type="text" wicket:id="title" /></div> + </div> + <div> + <div class="column label"><wicket:message key="570" /></div> + <div class="column data"><span class="date time picker" wicket:id="start"></span></div> + </div> + <div> + <div class="column label"><wicket:message key="571" /></div> + <div class="column data"><span class="date time picker" wicket:id="end"></span></div> + </div> + <div wicket:id="owner-row"> + <div class="column label"><wicket:message key="1156" /></div> + <div class="column data"><span wicket:id="aowner"></span></div> + </div> + <div wicket:id="inviteeType"> + <div> + <div class="column label"><input type="radio" wicket:id="user"/><label wicket:for="user"><wicket:message key="803" /></label></div> + <div class="column data om-select2" wicket:message="title:1588"><select class="appointment attendees input" wicket:id="attendees"></select></div> + </div> + <div wicket:id="groupContainer"> + <div class="column label"><input type="radio" wicket:id="group"/><label wicket:for="group"><wicket:message key="126" /></label></div> + <div class="column data om-select2"><select wicket:id="groups" class="input invitees"></select></div> + </div> + </div> + <div> + <div class="column label"><wicket:message key="569" /></div> + <div class="column data"><input type="text" wicket:id="location" /></div> + </div> + <div> + <div class="column label"><wicket:message key="573" /></div> + <div class="column data"> + <div wicket:id="toolbarContainer"></div> + <div wicket:id="description"></div> + </div> + </div> + </div> + </div> + <div id="tab2"> + <div class="table"> + <div> + <input type="checkbox" wicket:id="createRoom" /><label wicket:for="createRoom"><wicket:message key="1509" /></label> + </div> + <div wicket:id="create-room-block"> + <div> + <div class="column label"><wicket:message key="619" /></div> + <div class="column data"><select wicket:id="type" ></select></div> + </div> + <div> + <div class="column label"><label wicket:for="moderated"><wicket:message key="640" /></label></div> + <div class="column data"><input type="checkbox" wicket:id="moderated" /></div> + </div> + </div> + <div> + <div class="column label"><wicket:message key="436" /></div> + <div class="column data"><select wicket:id="groom" ></select></div> + </div> + <div wicket:id="sip-container"> + <div class="column label"><wicket:message key="1003"/></div> + <div class="column data"><span wicket:id="room.confno"></span></div> + </div> + </div> + </div> + <div id="tab3"> + <div class="table"> + <div> + <div class="column label"><wicket:message key="565" /></div> + <div class="column data"><select wicket:id="reminder" ></select></div> + </div> + <div> + <input type="checkbox" wicket:id="passwordProtected" /><label wicket:for="passwordProtected"><wicket:message key="524" /></label> + </div> + <div> + <div class="column label"><wicket:message key="525" /></div> + <div class="column data"><input type="password" wicket:id="password" /></div> + </div> + <div><wicket:message key="1445" /></div> + <div> + <div class="column label"><wicket:message key="162" /></div> + <div class="column data"><select wicket:id="calendar"></select></div> + </div> + </div> + </div> + </div> + </form> + <div wicket:id="confirmDelete"></div> + </wicket:panel> +</html>
