RoomNameValidation

This commit is contained in:
Spellauge 2015-10-20 09:34:42 +02:00
parent 267b796c40
commit 15d47974d2
4 changed files with 21 additions and 5 deletions

View File

@ -126,6 +126,8 @@
"mutedTitle": "Stummschaltung aktiv."
},
"dialog": {
"illCharInRoomNameMessage": "Ungültiges Zeichen im Raumnamen",
"roomNameHint": "Ein gültiger Raumname besteht aus Buchstaben, Ziffern, + Zeichen und = Zeichen.",
"kickMessage": "Oh! Sie wurden aus der Konferenz ausgeschlossen.",
"popupError": "Ihr Browser blockiert Popup-Fenster von dieser Webseite. Bitte erlauben Sie dieser Seite Popups in den Sicherheitseinstellungen Ihres Browsers und versuchen Sie es erneut.",
"passwordError": "Diese Konferenz ist mit einem Paswort geschützt. Nur der Besitzer der Konferenz kann ein Passwort vergeben.",
@ -241,4 +243,4 @@
"pending": "Die Aufzeichnung wird gestartet sobald ein weiterer Teilnehmer beitritt",
"on": "Aufzeichnung wurde gestartet"
}
}
}

View File

@ -130,7 +130,9 @@
"mutedTitle": "You're muted!"
},
"dialog": {
"kickMessage": "Ouch! You have been kicked out of the meet!",
"illCharInRoomNameMessage": "Illegal Character in Room Name",
"roomNameHint": "A valid room name may contain only letters, digits, + signs and = -characters.",
"kickMessage": "Ouch ! You have been kicked out of the meet!",
"popupError": "Your browser is blocking popup windows from this site. Please enable popups in your browser's security settings and try again.",
"passwordError": "This conversation is currently protected by a password. Only the owner of the conference can set a password.",
"passwordError2": "This conversation isn't currently protected by a password. Only the owner of the conference can set a password.",

View File

@ -56,7 +56,8 @@ function Dialog(callback, obtainSession) {
var password = f.password;
if (jid && password) {
stop = false;
//++__authdomain__ complete jid by appending @<domain> if no @ was found in jid
//++__authdomain__ complete jid by appending @<domain>
//if no @ was found in jid
if (jid.indexOf("@") < 0) {
jid = jid.concat('@');
if (config.hosts.authdomain) {

View File

@ -2,14 +2,25 @@
var animateTimeout, updateTimeout;
var RoomNameGenerator = require("./RoomnameGenerator");
var messageHandler = require("../util/MessageHandler");
function enter_room() {
var val = $("#enter_room_field").val();
if(!val) {
val = $("#enter_room_field").attr("room_name");
val = $("#enter_room_field").attr("room_name");
}
if (val) {
// also ÄÖÜäöüß - requiers further changes
// (nginx - sites-enabled (location .. rewrite), other js-modules
// var validRoomNamePattern =
// /^[a-zA-Z0-9=\?\+\u00c4\u00e4\u00d6\u00f6\u00dc\u00fc\u00df\ ]+$/;
var validRoomNamePattern = /^[a-zA-Z0-9=\?\+]+$/;
if (val.match(validRoomNamePattern) !== null) {
window.location.pathname = "/" + val;
} else {
messageHandler.openMessageDialog (
"dialog.illCharInRoomNameMessage", "dialog.roomNameHint");
}
}
}
@ -93,4 +104,4 @@ function setupWelcomePage() {
}
module.exports = setupWelcomePage;
module.exports = setupWelcomePage;