http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/AjaxDownload.java ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/AjaxDownload.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/AjaxDownload.java index c61c7d7..992707d 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/AjaxDownload.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/util/AjaxDownload.java @@ -1,128 +1,128 @@ -/* - * 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.util; - -import java.util.UUID; - -import org.apache.wicket.Component; -import org.apache.wicket.Page; -import org.apache.wicket.ajax.AjaxRequestTarget; -import org.apache.wicket.behavior.AbstractAjaxBehavior; -import org.apache.wicket.markup.head.IHeaderResponse; -import org.apache.wicket.markup.head.JavaScriptHeaderItem; -import org.apache.wicket.markup.head.OnDomReadyHeaderItem; -import org.apache.wicket.markup.head.PriorityHeaderItem; -import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; -import org.apache.wicket.request.resource.ContentDisposition; -import org.apache.wicket.request.resource.JavaScriptResourceReference; -import org.apache.wicket.request.resource.ResourceReference; -import org.apache.wicket.util.resource.IResourceStream; - -/** - * see: <a href="https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow"> - * https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow</href> - * - */ -public class AjaxDownload extends AbstractAjaxBehavior { - private static final long serialVersionUID = 1L; - private boolean addAntiCache; - private String fileName; - private IResourceStream resourceStream; - private final String iframeId; - - public AjaxDownload() { - this(true); - } - - public AjaxDownload(boolean addAntiCache) { - super(); - this.addAntiCache = addAntiCache; - iframeId = String.format("download-iframe-%s", UUID.randomUUID().toString()); - } - - /** - * Call this method to initiate the download. - */ - public void initiate(AjaxRequestTarget target) { - StringBuilder url = new StringBuilder(getCallbackUrl()); - - if (addAntiCache) { - url.append(url.indexOf("?") > -1 ? "&" : "?") - .append("antiCache=").append(System.currentTimeMillis()); - } - target.appendJavaScript(String.format("$('#%s').attr('src', '%s');", iframeId, url.toString())); - } - - @Override - protected void onBind() { - super.onBind(); - // it is impossible to get page by id anyway - if (!(getComponent() instanceof Page)) { - getComponent().setOutputMarkupId(true); - } - } - - private static ResourceReference newResourceReference() { - return new JavaScriptResourceReference(AjaxDownload.class, "ajax-download.js"); - } - - @Override - public void renderHead(Component component, IHeaderResponse response) { - super.renderHead(component, response); - response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(newResourceReference()))); - response.render(OnDomReadyHeaderItem.forScript(String.format("addDwnldIframe('%s', '%s');", component instanceof Page ? "" : component.getMarkupId(), iframeId))); - } - - @Override - public void onRequest() { - ResourceStreamRequestHandler handler = new ResourceStreamRequestHandler(getResourceStream(), getFileName()); - handler.setContentDisposition(getContentDisposition()); - getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(handler); - } - - protected ContentDisposition getContentDisposition() { - return ContentDisposition.ATTACHMENT; - } - /** - * Override this method for a file name which will let the browser prompt - * with a save/open dialog. - * - * @see ResourceStreamRequestTarget#getFileName() - */ - protected String getFileName() { - return this.fileName; - } - - public void setFileName(String fileName) { - this.fileName = fileName; - } - - /** - * Hook method providing the actual resource stream. - */ - protected IResourceStream getResourceStream() { - return resourceStream; - - } - - public void setResourceStream(IResourceStream resourceStream) { - this.resourceStream = resourceStream; - } - -} +/* + * 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.util; + +import java.util.UUID; + +import org.apache.wicket.Component; +import org.apache.wicket.Page; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.behavior.AbstractAjaxBehavior; +import org.apache.wicket.markup.head.IHeaderResponse; +import org.apache.wicket.markup.head.JavaScriptHeaderItem; +import org.apache.wicket.markup.head.OnDomReadyHeaderItem; +import org.apache.wicket.markup.head.PriorityHeaderItem; +import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; +import org.apache.wicket.request.resource.ContentDisposition; +import org.apache.wicket.request.resource.JavaScriptResourceReference; +import org.apache.wicket.request.resource.ResourceReference; +import org.apache.wicket.util.resource.IResourceStream; + +/** + * see: <a href="https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow"> + * https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow</href> + * + */ +public class AjaxDownload extends AbstractAjaxBehavior { + private static final long serialVersionUID = 1L; + private boolean addAntiCache; + private String fileName; + private IResourceStream resourceStream; + private final String iframeId; + + public AjaxDownload() { + this(true); + } + + public AjaxDownload(boolean addAntiCache) { + super(); + this.addAntiCache = addAntiCache; + iframeId = String.format("download-iframe-%s", UUID.randomUUID().toString()); + } + + /** + * Call this method to initiate the download. + */ + public void initiate(AjaxRequestTarget target) { + StringBuilder url = new StringBuilder(getCallbackUrl()); + + if (addAntiCache) { + url.append(url.indexOf("?") > -1 ? "&" : "?") + .append("antiCache=").append(System.currentTimeMillis()); + } + target.appendJavaScript(String.format("$('#%s').attr('src', '%s');", iframeId, url.toString())); + } + + @Override + protected void onBind() { + super.onBind(); + // it is impossible to get page by id anyway + if (!(getComponent() instanceof Page)) { + getComponent().setOutputMarkupId(true); + } + } + + private static ResourceReference newResourceReference() { + return new JavaScriptResourceReference(AjaxDownload.class, "ajax-download.js"); + } + + @Override + public void renderHead(Component component, IHeaderResponse response) { + super.renderHead(component, response); + response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(newResourceReference()))); + response.render(OnDomReadyHeaderItem.forScript(String.format("addDwnldIframe('%s', '%s');", component instanceof Page ? "" : component.getMarkupId(), iframeId))); + } + + @Override + public void onRequest() { + ResourceStreamRequestHandler handler = new ResourceStreamRequestHandler(getResourceStream(), getFileName()); + handler.setContentDisposition(getContentDisposition()); + getComponent().getRequestCycle().scheduleRequestHandlerAfterCurrent(handler); + } + + protected ContentDisposition getContentDisposition() { + return ContentDisposition.ATTACHMENT; + } + /** + * Override this method for a file name which will let the browser prompt + * with a save/open dialog. + * + * @see ResourceStreamRequestTarget#getFileName() + */ + protected String getFileName() { + return this.fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + /** + * Hook method providing the actual resource stream. + */ + protected IResourceStream getResourceStream() { + return resourceStream; + + } + + public void setResourceStream(IResourceStream resourceStream) { + this.resourceStream = resourceStream; + } + +}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/main/webapp/conf/om_ldap.cfg ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/webapp/conf/om_ldap.cfg b/openmeetings-web/src/main/webapp/conf/om_ldap.cfg index 4415d8f..e65436c 100644 --- a/openmeetings-web/src/main/webapp/conf/om_ldap.cfg +++ b/openmeetings-web/src/main/webapp/conf/om_ldap.cfg @@ -1,109 +1,109 @@ -# -# 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. -# -#ConfigurationFile for LDAP Auth -#ConfigKey 'ldap_config_path' must be set in DataBase Configration of OM and point to this file -#o.becherer,14.01.2009 - -#LDAP URL -# This is the URL used to access your LDAP server. -# if you want to use "ldaps://" links, please be aware that you need to import your CA certificate -# to a java keystore and add the -Djavax.net.ssl.keyStore, -Djavax.net.ssl.keyStorePassword, -# -Djavax.net.ssl.trustStore and -Djavax.net.ssl.trustStorePassword parameters to your -# JAVA_OPT environment -ldap_conn_host=dc2.medint.local -ldap_conn_port=389 -ldap_conn_secure=false - -# Login distinguished name (DN) for Authentication on LDAP Server - keep empty if not required -# Use full qualified LDAP DN -ldap_admin_dn=CN=dummy,OU=Company,DC=medint,DC=local - -# Loginpass for Authentication on LDAP Server - keep empty if not required -ldap_passwd=dummy07 - -# base to search for userdata(of user, that wants to login) -ldap_search_base=OU=Company,DC=medint,DC=local - -# Fieldnames (can differ between Ldap servers) -ldap_search_query=(uid=%s) - -# the scope of the search might be: OBJECT, ONELEVEL, SUBTREE -ldap_search_scope=ONELEVEL - -# Ldap auth type(NONE, SEARCHANDBIND, SIMPLEBIND) -# When using SIMPLEBIND a simple bind is performed on the LDAP server to check user authentication -# When using NONE, the Ldap server is not used for authentication -ldap_auth_type=SIMPLEBIND - -# userDN format, will be used to bind if ldap_auth_type=SIMPLEBIND -# might be used to get provisionningDn in case ldap_auth_type=NONE -ldap_userdn_format=uid=%s,OU=Company,DC=medint,DC=local - -# Ldap provisioning type(NONE, AUTOCREATE, AUTOUPDATE) -ldap_provisionning=AUTOCREATE - -# Ldap deref mode (never, searching, finding, always) -ldap_deref_mode=always - -# Set this to 'true' if you want to use admin_dn to get user attributes -# If any other value is set, user_dn will be used -ldap_use_admin_to_get_attrs=true - -# Ldap-password synchronization to OM DB -# Set this to 'true' if you want OM to synchronize the user Ldap-password to OM's internal DB -# If you want to disable the feature, set this to any other string. -# Defautl value is 'true' -ldap_sync_password_to_om=true - -# Ldap group mode (NONE, ATTRIBUTE, QUERY) -# NONE means group associations will be ignored -# ATTRIBUTE means group associations will be taken from 'ldap_group_attr' attribute (M$ AD mode) -# QUERY means group associations will be taken as a result of 'ldap_group_query' query -ldap_group_mode=NONE - -ldap_group_query=(&(memberUid=%s)(objectClass=posixGroup)) - -# Ldap user attributes mapping -# Set the following internal OM user attributes to their corresponding Ldap-attribute -ldap_user_attr_login=uid -ldap_user_attr_lastname=sn -ldap_user_attr_firstname=givenName -ldap_user_attr_mail=mail -ldap_user_attr_street=streetAddress -ldap_user_attr_additionalname=description -ldap_user_attr_fax=facsimileTelephoneNumber -ldap_user_attr_zip=postalCode -ldap_user_attr_country=co -ldap_user_attr_town=l -ldap_user_attr_phone=telephoneNumber -ldap_group_attr=memberOf - -# optional, only absolute URLs make sense -#ldap_user_picture_uri=picture_uri - -# optional -# the timezone has to match any timezone available in Java, otherwise the timezone defined in the value of -# the conf_key "default.timezone" in OpenMeetings "configurations" table -#ldap_user_timezone=timezone - -# Ldap ignore upper/lower case, convert all input to lower case -ldap_use_lower_case=false - -# Ldap import query, this query should retrieve all LDAP users -ldap_import_query=(objectClass=inetOrgPerson) +# +# 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. +# +#ConfigurationFile for LDAP Auth +#ConfigKey 'ldap_config_path' must be set in DataBase Configration of OM and point to this file +#o.becherer,14.01.2009 + +#LDAP URL +# This is the URL used to access your LDAP server. +# if you want to use "ldaps://" links, please be aware that you need to import your CA certificate +# to a java keystore and add the -Djavax.net.ssl.keyStore, -Djavax.net.ssl.keyStorePassword, +# -Djavax.net.ssl.trustStore and -Djavax.net.ssl.trustStorePassword parameters to your +# JAVA_OPT environment +ldap_conn_host=dc2.medint.local +ldap_conn_port=389 +ldap_conn_secure=false + +# Login distinguished name (DN) for Authentication on LDAP Server - keep empty if not required +# Use full qualified LDAP DN +ldap_admin_dn=CN=dummy,OU=Company,DC=medint,DC=local + +# Loginpass for Authentication on LDAP Server - keep empty if not required +ldap_passwd=dummy07 + +# base to search for userdata(of user, that wants to login) +ldap_search_base=OU=Company,DC=medint,DC=local + +# Fieldnames (can differ between Ldap servers) +ldap_search_query=(uid=%s) + +# the scope of the search might be: OBJECT, ONELEVEL, SUBTREE +ldap_search_scope=ONELEVEL + +# Ldap auth type(NONE, SEARCHANDBIND, SIMPLEBIND) +# When using SIMPLEBIND a simple bind is performed on the LDAP server to check user authentication +# When using NONE, the Ldap server is not used for authentication +ldap_auth_type=SIMPLEBIND + +# userDN format, will be used to bind if ldap_auth_type=SIMPLEBIND +# might be used to get provisionningDn in case ldap_auth_type=NONE +ldap_userdn_format=uid=%s,OU=Company,DC=medint,DC=local + +# Ldap provisioning type(NONE, AUTOCREATE, AUTOUPDATE) +ldap_provisionning=AUTOCREATE + +# Ldap deref mode (never, searching, finding, always) +ldap_deref_mode=always + +# Set this to 'true' if you want to use admin_dn to get user attributes +# If any other value is set, user_dn will be used +ldap_use_admin_to_get_attrs=true + +# Ldap-password synchronization to OM DB +# Set this to 'true' if you want OM to synchronize the user Ldap-password to OM's internal DB +# If you want to disable the feature, set this to any other string. +# Defautl value is 'true' +ldap_sync_password_to_om=true + +# Ldap group mode (NONE, ATTRIBUTE, QUERY) +# NONE means group associations will be ignored +# ATTRIBUTE means group associations will be taken from 'ldap_group_attr' attribute (M$ AD mode) +# QUERY means group associations will be taken as a result of 'ldap_group_query' query +ldap_group_mode=NONE + +ldap_group_query=(&(memberUid=%s)(objectClass=posixGroup)) + +# Ldap user attributes mapping +# Set the following internal OM user attributes to their corresponding Ldap-attribute +ldap_user_attr_login=uid +ldap_user_attr_lastname=sn +ldap_user_attr_firstname=givenName +ldap_user_attr_mail=mail +ldap_user_attr_street=streetAddress +ldap_user_attr_additionalname=description +ldap_user_attr_fax=facsimileTelephoneNumber +ldap_user_attr_zip=postalCode +ldap_user_attr_country=co +ldap_user_attr_town=l +ldap_user_attr_phone=telephoneNumber +ldap_group_attr=memberOf + +# optional, only absolute URLs make sense +#ldap_user_picture_uri=picture_uri + +# optional +# the timezone has to match any timezone available in Java, otherwise the timezone defined in the value of +# the conf_key "default.timezone" in OpenMeetings "configurations" table +#ldap_user_timezone=timezone + +# Ldap ignore upper/lower case, convert all input to lower case +ldap_use_lower_case=false + +# Ldap import query, this query should retrieve all LDAP users +ldap_import_query=(objectClass=inetOrgPerson) http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/main/webapp/js/openmeetings_functions.js ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/webapp/js/openmeetings_functions.js b/openmeetings-web/src/main/webapp/js/openmeetings_functions.js index 53c3d3a..09b3fc5 100644 --- a/openmeetings-web/src/main/webapp/js/openmeetings_functions.js +++ b/openmeetings-web/src/main/webapp/js/openmeetings_functions.js @@ -1,64 +1,64 @@ -/* - 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. - -*/ -/* - * Functions to be included in the HTML wrapper, - * see the templates dir (*.vm) for the include statements - * - */ - -function getBrowserInfo() { - //alert(navigator.userAgent); - document.getElementById("lzapp").getBrowserInfoCallback(navigator.userAgent); -} - -function getBrowserLang() { - //alert(navigator.userAgent); - document.getElementById("lzapp").getBrowserLangCallback(navigator.language); -} - -function redirectToUrl(url) { - //alert(navigator.userAgent); - window.location = url; - - document.getElementById("lzapp").redirectToUrlCallback("ok"); -} - -function loadingComplete() { - document.getElementById("swfloading").style.display = 'none'; - var lzApp = document.getElementById("lzappContainer"); - lzApp.style.width = '100%'; - lzApp.style.height = '100%'; -} - -function getTimeZoneOffsetMinutes() { - var rightNow = new Date(), std_time_offset = -rightNow.getTimezoneOffset(); - for (var i = 0; i < 12; ++i) { - var d = new Date(rightNow.getFullYear(), i, 1, 0, 0, 0, 0), offset = -d.getTimezoneOffset(); - if (offset < std_time_offset) { - std_time_offset = offset; - break; - } - } - return std_time_offset; -} - -function getTimeZoneOffset() { - document.getElementById("lzapp").getTimeZoneOffsetCallback(getTimeZoneOffsetMinutes()/60); -} +/* + 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. + +*/ +/* + * Functions to be included in the HTML wrapper, + * see the templates dir (*.vm) for the include statements + * + */ + +function getBrowserInfo() { + //alert(navigator.userAgent); + document.getElementById("lzapp").getBrowserInfoCallback(navigator.userAgent); +} + +function getBrowserLang() { + //alert(navigator.userAgent); + document.getElementById("lzapp").getBrowserLangCallback(navigator.language); +} + +function redirectToUrl(url) { + //alert(navigator.userAgent); + window.location = url; + + document.getElementById("lzapp").redirectToUrlCallback("ok"); +} + +function loadingComplete() { + document.getElementById("swfloading").style.display = 'none'; + var lzApp = document.getElementById("lzappContainer"); + lzApp.style.width = '100%'; + lzApp.style.height = '100%'; +} + +function getTimeZoneOffsetMinutes() { + var rightNow = new Date(), std_time_offset = -rightNow.getTimezoneOffset(); + for (var i = 0; i < 12; ++i) { + var d = new Date(rightNow.getFullYear(), i, 1, 0, 0, 0, 0), offset = -d.getTimezoneOffset(); + if (offset < std_time_offset) { + std_time_offset = offset; + break; + } + } + return std_time_offset; +} + +function getTimeZoneOffset() { + document.getElementById("lzapp").getTimeZoneOffsetCallback(getTimeZoneOffsetMinutes()/60); +} http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/main/webapp/languages/errorvalues.xsd ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/webapp/languages/errorvalues.xsd b/openmeetings-web/src/main/webapp/languages/errorvalues.xsd index 66f06d1..5acb78a 100644 --- a/openmeetings-web/src/main/webapp/languages/errorvalues.xsd +++ b/openmeetings-web/src/main/webapp/languages/errorvalues.xsd @@ -1,41 +1,41 @@ -<?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. - ---> -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - <xs:element name="ROOT"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="row"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="row"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="field"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="field"> - <xs:complexType mixed="true"> - <xs:attribute name="name" use="required" type="xs:NCName"/> - </xs:complexType> - </xs:element> -</xs:schema> +<?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. + +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xs:element name="ROOT"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="row"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="row"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="field"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="field"> + <xs:complexType mixed="true"> + <xs:attribute name="name" use="required" type="xs:NCName"/> + </xs:complexType> + </xs:element> +</xs:schema> http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/main/webapp/public/config.xsd ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/webapp/public/config.xsd b/openmeetings-web/src/main/webapp/public/config.xsd index cb1c1b7..b8e19d3 100644 --- a/openmeetings-web/src/main/webapp/public/config.xsd +++ b/openmeetings-web/src/main/webapp/public/config.xsd @@ -1,131 +1,131 @@ -<?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. - ---> -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - <xs:element name="config"> - <xs:complexType> - <xs:sequence> - <xs:element ref="rtmphostlocal"/> - <xs:element ref="httphostlocal"/> - <xs:element ref="rtmpport"/> - <xs:element ref="rtmpsslport"/> - <xs:element ref="useSSL"/> - <xs:element ref="red5httpport"/> - <xs:element ref="protocol"/> - <xs:element ref="proxyType"/> - <xs:element ref="loudnessAcitviation"/> - <xs:element ref="webAppRootKey"/> - <xs:element ref="httpRootKey"/> - <xs:element ref="showWindowEffect"/> - <xs:element ref="codecType"/> - <xs:element ref="framesPerSecond"/> - <xs:element ref="bandwidthNeededNormal"/> - <xs:element ref="bandwidthNeededBest"/> - <xs:element ref="camQualityNormal"/> - <xs:element ref="camQualityBest"/> - <xs:element ref="microphoneRateBest"/> - <xs:element ref="echoPath" /> - <xs:element ref="echoSuppression" /> - <xs:element ref="defaultWhiteboardWidth"/> - <xs:element ref="defaultWhiteboardHeight"/> - <xs:element ref="availableCameraResolutions"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="rtmphostlocal"> - <xs:annotation> - <xs:documentation> - URL/IP to use for the Server for RTMP and RTMPT traffic. - If this value is empty it will try to connect to the - domain-name the OpenMeetings-Client has been loading from - - Can be either and IP or a domain name. - For example: - 192.168.254.182 - or - mysubdomain.streaming.to - </xs:documentation> - </xs:annotation> - <xs:complexType/> - </xs:element> - <xs:element name="httphostlocal"> - <xs:annotation> - <xs:documentation> - URL/IP to use for the Server for HTTP and HTTPS traffic. - If this value is empty it will use the rtmphostlocal - variable (and in that way try to connect to the - domain-name the OpenMeetings-Client has been loading from) - </xs:documentation> - </xs:annotation> - <xs:complexType/> - </xs:element> - <xs:element name="rtmpport" type="xs:integer"/> - <xs:element name="rtmpTunnelport" type="xs:integer"/> - <xs:element name="rtmpsslport" type="xs:integer"/> - <xs:element name="useSSL" type="xs:NCName"/> - <xs:element name="red5httpport" type="xs:integer"/> - <xs:element name="protocol" type="xs:NCName"/> - <xs:element name="proxyType" type="xs:NCName"/> - <xs:element name="loudnessAcitviation" type="xs:integer"/> - <xs:element name="webAppRootKey" type="xs:NCName"/> - <xs:element name="httpRootKey" type="xs:string"/> - <xs:element name="showWindowEffect" type="xs:NCName"/> - <xs:element name="codecType" type="xs:string"/> - <xs:element name="framesPerSecond" type="xs:integer"/> - <xs:element name="bandwidthNeededNormal" type="xs:integer"/> - <xs:element name="bandwidthNeededBest" type="xs:integer"/> - <xs:element name="camQualityNormal" type="xs:integer"/> - <xs:element name="camQualityBest" type="xs:integer"/> - <xs:element name="microphoneRateBest" type="xs:integer"/> - <xs:element name="echoSuppression" type="xs:string"/> - <xs:element name="echoPath"> - <xs:annotation> - <xs:documentation> - AEC configuration value - - Specifies the echo path length (in milliseconds). A longer echo path means better - echo cancellation but also introduces longer delays and requires more processing power. - The default value is 128; the only other possible value is 256. - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:int"> - <xs:enumeration value="128" /> - <xs:enumeration value="256" /> - </xs:restriction> - </xs:simpleType> - </xs:element> - <xs:element name="defaultWhiteboardWidth" type="xs:integer"/> - <xs:element name="defaultWhiteboardHeight" type="xs:integer"/> - <xs:element name="availableCameraResolutions"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="resolution"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="resolution"> - <xs:complexType> - <xs:attribute name="height" use="required" type="xs:integer"/> - <xs:attribute name="isDefault" use="required" type="xs:boolean"/> - <xs:attribute name="type" use="required"/> - <xs:attribute name="width" use="required" type="xs:integer"/> - </xs:complexType> - </xs:element> -</xs:schema> +<?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. + +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xs:element name="config"> + <xs:complexType> + <xs:sequence> + <xs:element ref="rtmphostlocal"/> + <xs:element ref="httphostlocal"/> + <xs:element ref="rtmpport"/> + <xs:element ref="rtmpsslport"/> + <xs:element ref="useSSL"/> + <xs:element ref="red5httpport"/> + <xs:element ref="protocol"/> + <xs:element ref="proxyType"/> + <xs:element ref="loudnessAcitviation"/> + <xs:element ref="webAppRootKey"/> + <xs:element ref="httpRootKey"/> + <xs:element ref="showWindowEffect"/> + <xs:element ref="codecType"/> + <xs:element ref="framesPerSecond"/> + <xs:element ref="bandwidthNeededNormal"/> + <xs:element ref="bandwidthNeededBest"/> + <xs:element ref="camQualityNormal"/> + <xs:element ref="camQualityBest"/> + <xs:element ref="microphoneRateBest"/> + <xs:element ref="echoPath" /> + <xs:element ref="echoSuppression" /> + <xs:element ref="defaultWhiteboardWidth"/> + <xs:element ref="defaultWhiteboardHeight"/> + <xs:element ref="availableCameraResolutions"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="rtmphostlocal"> + <xs:annotation> + <xs:documentation> + URL/IP to use for the Server for RTMP and RTMPT traffic. + If this value is empty it will try to connect to the + domain-name the OpenMeetings-Client has been loading from + + Can be either and IP or a domain name. + For example: + 192.168.254.182 + or + mysubdomain.streaming.to + </xs:documentation> + </xs:annotation> + <xs:complexType/> + </xs:element> + <xs:element name="httphostlocal"> + <xs:annotation> + <xs:documentation> + URL/IP to use for the Server for HTTP and HTTPS traffic. + If this value is empty it will use the rtmphostlocal + variable (and in that way try to connect to the + domain-name the OpenMeetings-Client has been loading from) + </xs:documentation> + </xs:annotation> + <xs:complexType/> + </xs:element> + <xs:element name="rtmpport" type="xs:integer"/> + <xs:element name="rtmpTunnelport" type="xs:integer"/> + <xs:element name="rtmpsslport" type="xs:integer"/> + <xs:element name="useSSL" type="xs:NCName"/> + <xs:element name="red5httpport" type="xs:integer"/> + <xs:element name="protocol" type="xs:NCName"/> + <xs:element name="proxyType" type="xs:NCName"/> + <xs:element name="loudnessAcitviation" type="xs:integer"/> + <xs:element name="webAppRootKey" type="xs:NCName"/> + <xs:element name="httpRootKey" type="xs:string"/> + <xs:element name="showWindowEffect" type="xs:NCName"/> + <xs:element name="codecType" type="xs:string"/> + <xs:element name="framesPerSecond" type="xs:integer"/> + <xs:element name="bandwidthNeededNormal" type="xs:integer"/> + <xs:element name="bandwidthNeededBest" type="xs:integer"/> + <xs:element name="camQualityNormal" type="xs:integer"/> + <xs:element name="camQualityBest" type="xs:integer"/> + <xs:element name="microphoneRateBest" type="xs:integer"/> + <xs:element name="echoSuppression" type="xs:string"/> + <xs:element name="echoPath"> + <xs:annotation> + <xs:documentation> + AEC configuration value - + Specifies the echo path length (in milliseconds). A longer echo path means better + echo cancellation but also introduces longer delays and requires more processing power. + The default value is 128; the only other possible value is 256. + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:int"> + <xs:enumeration value="128" /> + <xs:enumeration value="256" /> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element name="defaultWhiteboardWidth" type="xs:integer"/> + <xs:element name="defaultWhiteboardHeight" type="xs:integer"/> + <xs:element name="availableCameraResolutions"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="resolution"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="resolution"> + <xs:complexType> + <xs:attribute name="height" use="required" type="xs:integer"/> + <xs:attribute name="isDefault" use="required" type="xs:boolean"/> + <xs:attribute name="type" use="required"/> + <xs:attribute name="width" use="required" type="xs:integer"/> + </xs:complexType> + </xs:element> +</xs:schema> http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/main/webapp/public/theme.xml ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/webapp/public/theme.xml b/openmeetings-web/src/main/webapp/public/theme.xml index 29957cd..82a19b3 100644 --- a/openmeetings-web/src/main/webapp/public/theme.xml +++ b/openmeetings-web/src/main/webapp/public/theme.xml @@ -1,330 +1,330 @@ -<?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. - ---> -<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="theme.xsd"> - - <!-- Colors --> - <color name="mainBackgroundColor" value="0xEEF0EB" - description="main background color" /> - - <color name="basebgcolorizer" value="0xBDC0DB" - description="Color for background" /> - - <color name="baseMousecolorizer" value="0xBDC0DB" - description="Color Mouseover color for list items" /> - - <color name="baseMouseOvercolorizer" value="0xBDC0DB" - description="Color Mouseover color for list items" /> - - <color name="styleMenuBarBaseColor" value="0x000088" - description="menu bar background color" /> - - <color name="mainBorderColor" value="0xCCCCCC" - description="main border color" /> - - <color name="secondBorderColor" value="0xE0E0E0" - description="main border color" /> - - <color name="menuBackgroundColor" value="0xEFEFEF" - description="main border color" /> - - <color name="menuTextColor" value="0x666666" - description="color of text for menus" /> - - <color name="menuTextDisabledColor" value="0xBBBBBB" - description="color of text for menus" /> - - <!-- Icons --> - <resource name="warning_popup_icon_rsc" - description="Toolbar Icon" - license="FamFam Icon Set" - src="themes/basic-theme/general/error.png" /> - - <resource name="info_text_icon_rsc" - description="Info Icon" - license="FamFam Icon Set" - src="themes/basic-theme/general/information.png" /> - - <!-- Save Toolbar (for example Admin section) --> - - <resource name="filesave_rsc" - description="Save Icon" - license="FamFam Icon Set" - src="themes/basic-theme/general/disk.png" /> - - <resource name="edit_add_rsc" - description="Save Icon" - license="APL Author sebawagner" - src="themes/basic-theme/general/plus_icon.png" /> - - <resource name="reload_rsc" - description="Save Icon" - license="FamFam Icon Set" - src="themes/basic-theme/general/arrow_refresh_small.png" /> - - <resource name="button_cancel_rsc" - description="Save Icon" - license="APL Author sebawagner" - src="themes/basic-theme/general/cancel_icon.png" /> - - <resource name="add_rsc" - description="Edit Add Icon" - license="APL Author sebawagner" - src="themes/basic-theme/general/add.png" /> - - <resource name="date_icon_rsc" - description="Edit Add Icon" - license="FamFam Icon Set" - src="themes/basic-theme/general/calendar_view_week.png" /> - - <!-- Sorted list --> - - <resource name="step_back_two_arrow" - description="Step to first" - license="FamFam Icon Set" - src="themes/basic-theme/general/resultset_first.png" /> - - <resource name="step_fwd_two_arrow" - description="Step to last" - license="FamFam Icon Set" - src="themes/basic-theme/general/resultset_last.png" /> - - <resource name="step_back_arrow" - description="Step one back" - license="FamFam Icon Set" - src="themes/basic-theme/general/resultset_previous.png" /> - - <resource name="step_fwd_arrow" - description="Step one next" - license="FamFam Icon Set" - src="themes/basic-theme/general/resultset_next.png" /> - - <resource name="sort_up_rsc" - description="Sort up" - license="FamFam Icon Set" - src="themes/basic-theme/general/resultset_up.png" /> - - <resource name="sort_down_rsc" - description="Sort down" - license="FamFam Icon Set" - src="themes/basic-theme/general/resultset_down.png" /> - - <!-- Chat toolbar --> - - <resource name="font_style" - description="Change font style button" - license="FamFam Icon Set" - src="themes/basic-theme/general/style.png" /> - - <resource name="font_bold" - description="Bold font style button" - license="FamFam Icon Set" - src="themes/basic-theme/general/text_bold.png" /> - - <resource name="font_italic" - description="Italic font style button" - license="FamFam Icon Set" - src="themes/basic-theme/general/text_italic.png" /> - - <resource name="font_underline" - description="Underline font style button" - license="FamFam Icon Set" - src="themes/basic-theme/general/text_underline.png" /> - - <resource name="font_color" - description="Change font color button" - license="FamFam Icon Set" - src="themes/basic-theme/general/color_swatch.png" /> - - <resource name="hyperlink" - description="Insert hyperlink button" - license="FamFam Icon Set" - src="themes/basic-theme/general/world_link.png" /> - - <!-- Whiteboard Toolbar --> - - <resource name="plain" - description="Toolbar Icon" - license="APL author sebawagner" - src="themes/basic-theme/whiteboard/delete_all.png" /> - - <resource name="plainSlides" - description="Toolbar Icon" - license="FamFam Icon Set" - src="themes/basic-theme/whiteboard/page_delete.png" /> - - <resource name="arrow_draw_panel_tool_cursor" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/arrow_cursor_tool.png" /> - - <resource name="saveobj" - description="Toolbar Icon" - license="FamFam Icon Set" - src="themes/basic-theme/general/disk.png" /> - - <resource name="revert" - description="Toolbar Icon" - license="FamFam Icon Set" - src="themes/basic-theme/whiteboard/arrow_rotate_anticlockwise.png" /> - - <resource name="next" - description="Toolbar Icon" - license="FamFam Icon Set" - src="themes/basic-theme/whiteboard/arrow_rotate_clockwise.png" /> - - <resource name="menupointer_rsc" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/menupointer.png" /> - - <resource name="pointer_whiteboard_menu_rsc" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/pointerWhiteBoard_menu_rsc.png" /> - - <resource name="letter" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/letter.png" /> - - <resource name="paint" - description="Toolbar Icon" - license="FamFam Icon Set" - src="themes/basic-theme/whiteboard/pencil.png" /> - - <resource name="line_rsc" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/line.png" /> - - <resource name="uline_rsc" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/uline.png" /> - - <resource name="rectangle" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/rectangle.png" /> - - <resource name="ellipse" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/ellipse.png" /> - - <resource name="drawarrowicon_rsc" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/drawarrowicon.png" /> - - <!-- whiteboard general --> - - <resource name="bounding_box_delete_item_rsc" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/general/cancel_icon_small.png" /> - - <resource name="bounding_box_textedit_item_rsc" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/text_signature.png" /> - - <!-- document Tools --> - - <resource name="doc_next" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/doc_next.png" /> - - <resource name="doc_pre" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/doc_pre.png" /> - - <resource name="doc_first" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/doc_first.png" /> - - <resource name="doc_last" - description="Toolbar Icon" - license="APL Author sebawagner" - src="themes/basic-theme/whiteboard/doc_last.png" /> - - <!-- property panel --> - <resource name="colorlinechoose_rsc" - description="Property bar icon line color" - license="FamFam Icon Set" - src="themes/basic-theme/whiteboard/pencil.png" /> - - <resource name="colorfillchoose_rsc" - description="Property bar icon fill color" - license="FamFam Icon Set" - src="themes/basic-theme/whiteboard/paintcan.png" /> - - <resource name="color_lock_rsc" - description="Property bar icon color lock" - license="FamFam Icon Set" - src="themes/basic-theme/whiteboard/lock.png" /> - - <resource name="color_lock_open_rsc" - description="Property bar icon color lock open" - license="FamFam Icon Set" - src="themes/basic-theme/whiteboard/lock_open.png" /> - - <!-- Dashboard --> - - <resource name="icon_btn_dashboard_1" - description="Info Guide Icon" - license="APL Author sebawagner" - src="themes/basic-theme/dashboard/wizzard_button_1.png" /> - - <resource name="icon_btn_dashboard_2" - description="Info Guide Icon" - license="APL Author sebawagner" - src="themes/basic-theme/dashboard/wizzard_button_2.png" /> - - <resource name="icon_btn_dashboard_3" - description="Info Guide Icon" - license="APL Author sebawagner" - src="themes/basic-theme/dashboard/wizzard_button_3.png" /> - - <resource name="icon_btn_dashboard_4" - description="Info Guide Icon" - license="APL Author sebawagner" - src="themes/basic-theme/dashboard/wizzard_button_4.png" /> - - <resource name="icon_btn_rss_conference" - description="RSS Tab Icon" - license="FamFam Icon Set" - src="themes/basic-theme/dashboard/feed.png" /> - - <resource name="icon_btn_chat_dashboard" - description="Chat Tab Icon" - license="FamFam Icon Set" - src="themes/basic-theme/dashboard/comments.png" /> - - <resource name="icon_btn_rooms_conference" - description="Conference Room Tab Icon" - license="APL author sebawagner" - src="themes/basic-theme/dashboard/conference_icon_normal.png" /> -</theme> +<?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. + +--> +<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="theme.xsd"> + + <!-- Colors --> + <color name="mainBackgroundColor" value="0xEEF0EB" + description="main background color" /> + + <color name="basebgcolorizer" value="0xBDC0DB" + description="Color for background" /> + + <color name="baseMousecolorizer" value="0xBDC0DB" + description="Color Mouseover color for list items" /> + + <color name="baseMouseOvercolorizer" value="0xBDC0DB" + description="Color Mouseover color for list items" /> + + <color name="styleMenuBarBaseColor" value="0x000088" + description="menu bar background color" /> + + <color name="mainBorderColor" value="0xCCCCCC" + description="main border color" /> + + <color name="secondBorderColor" value="0xE0E0E0" + description="main border color" /> + + <color name="menuBackgroundColor" value="0xEFEFEF" + description="main border color" /> + + <color name="menuTextColor" value="0x666666" + description="color of text for menus" /> + + <color name="menuTextDisabledColor" value="0xBBBBBB" + description="color of text for menus" /> + + <!-- Icons --> + <resource name="warning_popup_icon_rsc" + description="Toolbar Icon" + license="FamFam Icon Set" + src="themes/basic-theme/general/error.png" /> + + <resource name="info_text_icon_rsc" + description="Info Icon" + license="FamFam Icon Set" + src="themes/basic-theme/general/information.png" /> + + <!-- Save Toolbar (for example Admin section) --> + + <resource name="filesave_rsc" + description="Save Icon" + license="FamFam Icon Set" + src="themes/basic-theme/general/disk.png" /> + + <resource name="edit_add_rsc" + description="Save Icon" + license="APL Author sebawagner" + src="themes/basic-theme/general/plus_icon.png" /> + + <resource name="reload_rsc" + description="Save Icon" + license="FamFam Icon Set" + src="themes/basic-theme/general/arrow_refresh_small.png" /> + + <resource name="button_cancel_rsc" + description="Save Icon" + license="APL Author sebawagner" + src="themes/basic-theme/general/cancel_icon.png" /> + + <resource name="add_rsc" + description="Edit Add Icon" + license="APL Author sebawagner" + src="themes/basic-theme/general/add.png" /> + + <resource name="date_icon_rsc" + description="Edit Add Icon" + license="FamFam Icon Set" + src="themes/basic-theme/general/calendar_view_week.png" /> + + <!-- Sorted list --> + + <resource name="step_back_two_arrow" + description="Step to first" + license="FamFam Icon Set" + src="themes/basic-theme/general/resultset_first.png" /> + + <resource name="step_fwd_two_arrow" + description="Step to last" + license="FamFam Icon Set" + src="themes/basic-theme/general/resultset_last.png" /> + + <resource name="step_back_arrow" + description="Step one back" + license="FamFam Icon Set" + src="themes/basic-theme/general/resultset_previous.png" /> + + <resource name="step_fwd_arrow" + description="Step one next" + license="FamFam Icon Set" + src="themes/basic-theme/general/resultset_next.png" /> + + <resource name="sort_up_rsc" + description="Sort up" + license="FamFam Icon Set" + src="themes/basic-theme/general/resultset_up.png" /> + + <resource name="sort_down_rsc" + description="Sort down" + license="FamFam Icon Set" + src="themes/basic-theme/general/resultset_down.png" /> + + <!-- Chat toolbar --> + + <resource name="font_style" + description="Change font style button" + license="FamFam Icon Set" + src="themes/basic-theme/general/style.png" /> + + <resource name="font_bold" + description="Bold font style button" + license="FamFam Icon Set" + src="themes/basic-theme/general/text_bold.png" /> + + <resource name="font_italic" + description="Italic font style button" + license="FamFam Icon Set" + src="themes/basic-theme/general/text_italic.png" /> + + <resource name="font_underline" + description="Underline font style button" + license="FamFam Icon Set" + src="themes/basic-theme/general/text_underline.png" /> + + <resource name="font_color" + description="Change font color button" + license="FamFam Icon Set" + src="themes/basic-theme/general/color_swatch.png" /> + + <resource name="hyperlink" + description="Insert hyperlink button" + license="FamFam Icon Set" + src="themes/basic-theme/general/world_link.png" /> + + <!-- Whiteboard Toolbar --> + + <resource name="plain" + description="Toolbar Icon" + license="APL author sebawagner" + src="themes/basic-theme/whiteboard/delete_all.png" /> + + <resource name="plainSlides" + description="Toolbar Icon" + license="FamFam Icon Set" + src="themes/basic-theme/whiteboard/page_delete.png" /> + + <resource name="arrow_draw_panel_tool_cursor" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/arrow_cursor_tool.png" /> + + <resource name="saveobj" + description="Toolbar Icon" + license="FamFam Icon Set" + src="themes/basic-theme/general/disk.png" /> + + <resource name="revert" + description="Toolbar Icon" + license="FamFam Icon Set" + src="themes/basic-theme/whiteboard/arrow_rotate_anticlockwise.png" /> + + <resource name="next" + description="Toolbar Icon" + license="FamFam Icon Set" + src="themes/basic-theme/whiteboard/arrow_rotate_clockwise.png" /> + + <resource name="menupointer_rsc" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/menupointer.png" /> + + <resource name="pointer_whiteboard_menu_rsc" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/pointerWhiteBoard_menu_rsc.png" /> + + <resource name="letter" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/letter.png" /> + + <resource name="paint" + description="Toolbar Icon" + license="FamFam Icon Set" + src="themes/basic-theme/whiteboard/pencil.png" /> + + <resource name="line_rsc" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/line.png" /> + + <resource name="uline_rsc" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/uline.png" /> + + <resource name="rectangle" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/rectangle.png" /> + + <resource name="ellipse" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/ellipse.png" /> + + <resource name="drawarrowicon_rsc" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/drawarrowicon.png" /> + + <!-- whiteboard general --> + + <resource name="bounding_box_delete_item_rsc" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/general/cancel_icon_small.png" /> + + <resource name="bounding_box_textedit_item_rsc" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/text_signature.png" /> + + <!-- document Tools --> + + <resource name="doc_next" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/doc_next.png" /> + + <resource name="doc_pre" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/doc_pre.png" /> + + <resource name="doc_first" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/doc_first.png" /> + + <resource name="doc_last" + description="Toolbar Icon" + license="APL Author sebawagner" + src="themes/basic-theme/whiteboard/doc_last.png" /> + + <!-- property panel --> + <resource name="colorlinechoose_rsc" + description="Property bar icon line color" + license="FamFam Icon Set" + src="themes/basic-theme/whiteboard/pencil.png" /> + + <resource name="colorfillchoose_rsc" + description="Property bar icon fill color" + license="FamFam Icon Set" + src="themes/basic-theme/whiteboard/paintcan.png" /> + + <resource name="color_lock_rsc" + description="Property bar icon color lock" + license="FamFam Icon Set" + src="themes/basic-theme/whiteboard/lock.png" /> + + <resource name="color_lock_open_rsc" + description="Property bar icon color lock open" + license="FamFam Icon Set" + src="themes/basic-theme/whiteboard/lock_open.png" /> + + <!-- Dashboard --> + + <resource name="icon_btn_dashboard_1" + description="Info Guide Icon" + license="APL Author sebawagner" + src="themes/basic-theme/dashboard/wizzard_button_1.png" /> + + <resource name="icon_btn_dashboard_2" + description="Info Guide Icon" + license="APL Author sebawagner" + src="themes/basic-theme/dashboard/wizzard_button_2.png" /> + + <resource name="icon_btn_dashboard_3" + description="Info Guide Icon" + license="APL Author sebawagner" + src="themes/basic-theme/dashboard/wizzard_button_3.png" /> + + <resource name="icon_btn_dashboard_4" + description="Info Guide Icon" + license="APL Author sebawagner" + src="themes/basic-theme/dashboard/wizzard_button_4.png" /> + + <resource name="icon_btn_rss_conference" + description="RSS Tab Icon" + license="FamFam Icon Set" + src="themes/basic-theme/dashboard/feed.png" /> + + <resource name="icon_btn_chat_dashboard" + description="Chat Tab Icon" + license="FamFam Icon Set" + src="themes/basic-theme/dashboard/comments.png" /> + + <resource name="icon_btn_rooms_conference" + description="Conference Room Tab Icon" + license="APL author sebawagner" + src="themes/basic-theme/dashboard/conference_icon_normal.png" /> +</theme> http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/main/webapp/public/theme.xsd ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/webapp/public/theme.xsd b/openmeetings-web/src/main/webapp/public/theme.xsd index c7a1885..f5b6710 100644 --- a/openmeetings-web/src/main/webapp/public/theme.xsd +++ b/openmeetings-web/src/main/webapp/public/theme.xsd @@ -1,45 +1,45 @@ -<?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. - ---> -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - <xs:element name="theme"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="color"/> - <xs:element maxOccurs="unbounded" ref="resource"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="color"> - <xs:complexType> - <xs:attribute name="description" use="required"/> - <xs:attribute name="name" use="required" type="xs:NCName"/> - <xs:attribute name="value" use="required" type="xs:NMTOKEN"/> - </xs:complexType> - </xs:element> - <xs:element name="resource"> - <xs:complexType> - <xs:attribute name="description" use="required"/> - <xs:attribute name="license" use="required"/> - <xs:attribute name="name" use="required" type="xs:NCName"/> - <xs:attribute name="src" use="required"/> - </xs:complexType> - </xs:element> -</xs:schema> +<?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. + +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xs:element name="theme"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="color"/> + <xs:element maxOccurs="unbounded" ref="resource"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="color"> + <xs:complexType> + <xs:attribute name="description" use="required"/> + <xs:attribute name="name" use="required" type="xs:NCName"/> + <xs:attribute name="value" use="required" type="xs:NMTOKEN"/> + </xs:complexType> + </xs:element> + <xs:element name="resource"> + <xs:complexType> + <xs:attribute name="description" use="required"/> + <xs:attribute name="license" use="required"/> + <xs:attribute name="name" use="required" type="xs:NCName"/> + <xs:attribute name="src" use="required"/> + </xs:complexType> + </xs:element> +</xs:schema> http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/main/webapp/upload/library.xsd ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/webapp/upload/library.xsd b/openmeetings-web/src/main/webapp/upload/library.xsd index 71f2b7d..6b459b1 100644 --- a/openmeetings-web/src/main/webapp/upload/library.xsd +++ b/openmeetings-web/src/main/webapp/upload/library.xsd @@ -1,68 +1,68 @@ -<?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. - ---> -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - <xs:element name="presentation"> - <xs:complexType> - <xs:sequence> - <xs:element ref="originalDocument"/> - <xs:element ref="swfDocument"/> - <xs:element ref="thumbs"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="originalDocument"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:NCName"> - <xs:attribute name="lastmod" use="required" type="xs:integer"/> - <xs:attribute name="size" use="required" type="xs:integer"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="swfDocument"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:NCName"> - <xs:attribute name="lastmod" use="required" type="xs:integer"/> - <xs:attribute name="size" use="required" type="xs:integer"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> - <xs:element name="thumbs"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="thumb"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="thumb"> - <xs:complexType> - <xs:simpleContent> - <xs:extension base="xs:NCName"> - <xs:attribute name="lastmod" use="required" type="xs:integer"/> - <xs:attribute name="size" use="required" type="xs:integer"/> - </xs:extension> - </xs:simpleContent> - </xs:complexType> - </xs:element> -</xs:schema> +<?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. + +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + <xs:element name="presentation"> + <xs:complexType> + <xs:sequence> + <xs:element ref="originalDocument"/> + <xs:element ref="swfDocument"/> + <xs:element ref="thumbs"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="originalDocument"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:NCName"> + <xs:attribute name="lastmod" use="required" type="xs:integer"/> + <xs:attribute name="size" use="required" type="xs:integer"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="swfDocument"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:NCName"> + <xs:attribute name="lastmod" use="required" type="xs:integer"/> + <xs:attribute name="size" use="required" type="xs:integer"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + <xs:element name="thumbs"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="thumb"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="thumb"> + <xs:complexType> + <xs:simpleContent> + <xs:extension base="xs:NCName"> + <xs:attribute name="lastmod" use="required" type="xs:integer"/> + <xs:attribute name="size" use="required" type="xs:integer"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> +</xs:schema> http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/site/site.xml ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/site/site.xml b/openmeetings-web/src/site/site.xml index b7a0eae..dd3dc53 100644 --- a/openmeetings-web/src/site/site.xml +++ b/openmeetings-web/src/site/site.xml @@ -1,39 +1,39 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed 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. - --> -<project xmlns="http://maven.apache.org/DECORATION/1.7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/DECORATION/1.7.0 http://maven.apache.org/xsd/decoration-1.7.0.xsd" - name="Apache OpenMeetings Project"> - - <body> - <menu ref="parent"/> - <menu name="Project"> - <item name="About" href="/index.html" /> - <item name="Info" href="/project-info.html" /> - <item name="Summary" href="/project-summary.html" /> - <item name="License" href="/license.html" /> - <item name="Dependencies" href="/dependencies.html" /> - <item name="Dependency Convergence" href="/dependency-convergence.html" /> - <item name="RAT Report" href="/rat-report.html" /> - </menu> - </body> - <custom> - <reflowSkin> - <bottomNav maxSpan="12"> - <column>Parent Project</column> - <column>Project</column> - </bottomNav> - </reflowSkin> - </custom> -</project> +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed 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. + --> +<project xmlns="http://maven.apache.org/DECORATION/1.7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/DECORATION/1.7.0 http://maven.apache.org/xsd/decoration-1.7.0.xsd" + name="Apache OpenMeetings Project"> + + <body> + <menu ref="parent"/> + <menu name="Project"> + <item name="About" href="/index.html" /> + <item name="Info" href="/project-info.html" /> + <item name="Summary" href="/project-summary.html" /> + <item name="License" href="/license.html" /> + <item name="Dependencies" href="/dependencies.html" /> + <item name="Dependency Convergence" href="/dependency-convergence.html" /> + <item name="RAT Report" href="/rat-report.html" /> + </menu> + </body> + <custom> + <reflowSkin> + <bottomNav maxSpan="12"> + <column>Parent Project</column> + <column>Project</column> + </bottomNav> + </reflowSkin> + </custom> +</project> http://git-wip-us.apache.org/repos/asf/openmeetings/blob/1cb3518f/openmeetings-web/src/test/java/org/apache/openmeetings/test/AbstractWicketTester.java ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/test/java/org/apache/openmeetings/test/AbstractWicketTester.java b/openmeetings-web/src/test/java/org/apache/openmeetings/test/AbstractWicketTester.java index 8775f82..bcf8aad 100644 --- a/openmeetings-web/src/test/java/org/apache/openmeetings/test/AbstractWicketTester.java +++ b/openmeetings-web/src/test/java/org/apache/openmeetings/test/AbstractWicketTester.java @@ -1,77 +1,77 @@ -/* - * 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.test; - -import static org.apache.openmeetings.db.util.ApplicationHelper.getWicketTester; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - -import java.io.Serializable; -import java.util.List; - -import org.apache.openmeetings.db.entity.user.User.Type; -import org.apache.openmeetings.web.app.WebSession; -import org.apache.wicket.util.lang.Args; -import org.apache.wicket.util.tester.WicketTester; -import org.junit.After; - -import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog; -import com.googlecode.wicket.jquery.ui.widget.dialog.ButtonAjaxBehavior; - -public class AbstractWicketTester extends AbstractJUnitDefaults { - protected WicketTester tester; - - @Override - public void setUp() throws Exception { - super.setUp(); - tester = getWicketTester(); - assertNotNull("Web session should not be null", WebSession.get()); - } - - public void login(String login, String password) { - if (login != null && password != null) { - WebSession.get().signIn(login, password, Type.user, null); - } else { - WebSession.get().signIn(username, userpass, Type.user, null); - } - assertTrue("Web session is not signed in for user: " + (login != null ? login : username), WebSession.get().isSignedIn()); - } - - @After - public void tearDown() { - if (tester != null) { - //can be null in case exception on initialization - tester.destroy(); - } - } - - public <T extends Serializable> ButtonAjaxBehavior getButtonBehavior(String path, String name) { - Args.notNull(path, "path"); - Args.notNull(name, "name"); - @SuppressWarnings("unchecked") - AbstractDialog<T> dialog = (AbstractDialog<T>)tester.getComponentFromLastRenderedPage(path); - List<ButtonAjaxBehavior> bl = dialog.getBehaviors(ButtonAjaxBehavior.class); - for (ButtonAjaxBehavior bb : bl) { - if (name.equals(bb.getButton().getName())) { - return bb; - } - } - return null; - } -} +/* + * 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.test; + +import static org.apache.openmeetings.db.util.ApplicationHelper.getWicketTester; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.io.Serializable; +import java.util.List; + +import org.apache.openmeetings.db.entity.user.User.Type; +import org.apache.openmeetings.web.app.WebSession; +import org.apache.wicket.util.lang.Args; +import org.apache.wicket.util.tester.WicketTester; +import org.junit.After; + +import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractDialog; +import com.googlecode.wicket.jquery.ui.widget.dialog.ButtonAjaxBehavior; + +public class AbstractWicketTester extends AbstractJUnitDefaults { + protected WicketTester tester; + + @Override + public void setUp() throws Exception { + super.setUp(); + tester = getWicketTester(); + assertNotNull("Web session should not be null", WebSession.get()); + } + + public void login(String login, String password) { + if (login != null && password != null) { + WebSession.get().signIn(login, password, Type.user, null); + } else { + WebSession.get().signIn(username, userpass, Type.user, null); + } + assertTrue("Web session is not signed in for user: " + (login != null ? login : username), WebSession.get().isSignedIn()); + } + + @After + public void tearDown() { + if (tester != null) { + //can be null in case exception on initialization + tester.destroy(); + } + } + + public <T extends Serializable> ButtonAjaxBehavior getButtonBehavior(String path, String name) { + Args.notNull(path, "path"); + Args.notNull(name, "name"); + @SuppressWarnings("unchecked") + AbstractDialog<T> dialog = (AbstractDialog<T>)tester.getComponentFromLastRenderedPage(path); + List<ButtonAjaxBehavior> bl = dialog.getBehaviors(ButtonAjaxBehavior.class); + for (ButtonAjaxBehavior bb : bl) { + if (name.equals(bb.getButton().getName())) { + return bb; + } + } + return null; + } +}
