mirror of https://github.com/apache/activemq.git
Merge pull request #763 from winne42/fix_encoding_error
fix encoding error in chat.js
This commit is contained in:
commit
d4ef7d3ee2
|
@ -133,7 +133,7 @@ var css = {
|
|||
removeClassFromElement: function(el, classString) {
|
||||
var classArray = this.privateGetClassArray(el);
|
||||
|
||||
for (x in classArray) {
|
||||
for (let x in classArray) {
|
||||
if (classString == classArray[x]) {
|
||||
classArray[x] = '';
|
||||
break;
|
||||
|
|
|
@ -536,7 +536,7 @@ PlotKit.SVGRenderer.prototype._renderPieAxis = function() {
|
|||
}
|
||||
else {
|
||||
var label = this.createSVGElement("text", svgattrib);
|
||||
label.appendChild(this.document.createTextNode(this.layout.xticks[i][1]))
|
||||
label.appendChild(this.document.createTextNode(this.layout.xticks[i][1]));
|
||||
this.root.appendChild(label);
|
||||
}
|
||||
}
|
||||
|
@ -668,7 +668,7 @@ PlotKit.SVGRenderer.isSupported = function() {
|
|||
*/
|
||||
|
||||
if (operaVersion && (operaVersion[1] > 8.9))
|
||||
return true
|
||||
return true;
|
||||
|
||||
if (mozillaVersion && (mozillaVersion > 1.7))
|
||||
return true;
|
||||
|
|
|
@ -20,7 +20,7 @@ try {
|
|||
}
|
||||
}
|
||||
catch (e) {
|
||||
throw "SweetCanvas depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, Canvas}"
|
||||
throw "SweetCanvas depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, Canvas}";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ try {
|
|||
}
|
||||
}
|
||||
catch (e) {
|
||||
throw "SweetSVG depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, SVG}"
|
||||
throw "SweetSVG depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, SVG}";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ org.activemq.Amq = function() {
|
|||
// we need to ensure that messages which set headers are sent by themselves.
|
||||
// if 2 'listen' messages were sent together, and a 'selector' header were added to one of them,
|
||||
// AMQ would add the selector to both 'listen' commands.
|
||||
for(i=0;i<messageQueue.length;i++) {
|
||||
for (let i=0; i < messageQueue.length; i++) {
|
||||
// a message with headers should always be sent by itself. if other messages have been added, send this one later.
|
||||
if ( messageQueue[ i ].headers && messagesToSend.length == 0 ) {
|
||||
messagesToSend[ messagesToSend.length ] = messageQueue[ i ].message;
|
||||
|
|
|
@ -73,7 +73,7 @@ org.activemq.AmqAdapter = {
|
|||
|
||||
if( headers ) {
|
||||
request.beforeSend = function(xhr) {
|
||||
for( h in headers ) {
|
||||
for( let h in headers ) {
|
||||
xhr.setRequestHeader( h, headers[ h ] );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,8 +169,8 @@ org.activemq.Chat = function() {
|
|||
chat: function(text) {
|
||||
if (text != null && text.length > 0) {
|
||||
// TODO more encoding?
|
||||
text = text.replace('<', '<');
|
||||
text = text.replace('>', '>');
|
||||
text = text.replace(/</g, '<');
|
||||
text = text.replace(/>/g, '>');
|
||||
|
||||
amq.sendMessage(chatTopic, '<message type="chat" from="' + user + '">' + text + '</message>');
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ $(document).ready(function(){
|
|||
$('#send_form').submit(function() {
|
||||
var text = $('#send_form_input').val();
|
||||
if (text) {
|
||||
message = new Messaging.Message(text);
|
||||
let message = new Messaging.Message(text);
|
||||
message.destinationName = destination;
|
||||
client.send(message);
|
||||
$('#send_form_input').val("");
|
||||
|
|
|
@ -74,7 +74,7 @@ function fixedDigits(t, digits) {
|
|||
* Find direct child of an element, by id.
|
||||
*/
|
||||
function find(t, id) {
|
||||
for (i = 0; i < t.childNodes.length; i++) {
|
||||
for (let i = 0; i < t.childNodes.length; i++) {
|
||||
var child = t.childNodes[i]
|
||||
if (child.id == id) {
|
||||
return child
|
||||
|
|
|
@ -51,15 +51,15 @@ var Behaviour = {
|
|||
},
|
||||
|
||||
apply : function(){
|
||||
for (var h=0;sheet=Behaviour.list[h];h++){
|
||||
for (selector in sheet){
|
||||
list = document.getElementsBySelector(selector);
|
||||
for (let h = 0; sheet = Behaviour.list[h]; h++) {
|
||||
for (let selector in sheet) {
|
||||
let list = document.getElementsBySelector(selector);
|
||||
|
||||
if (!list) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (var i=0;element=list[i];i++){
|
||||
for (let i = 0; element = list[i]; i++) {
|
||||
sheet[selector](element);
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ document.getElementsBySelector = function(selector) {
|
|||
var tokens = selector.split(' ');
|
||||
var currentContext = new Array(document);
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;
|
||||
let token = tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');
|
||||
if (token.indexOf('#') > -1) {
|
||||
// Token is an ID selector
|
||||
var bits = token.split('#');
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
-->
|
||||
<!--
|
||||
|
||||
Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
|
||||
Let's deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
|
||||
For more information, see:
|
||||
|
||||
http://camel.apache.org
|
||||
|
|
|
@ -181,7 +181,7 @@ $(document).ready(function(){
|
|||
$('#send_form').submit(function() {
|
||||
var text = $('#send_form_input').val();
|
||||
if (text) {
|
||||
message = new Messaging.Message(text);
|
||||
let message = new Messaging.Message(text);
|
||||
message.destinationName = destination;
|
||||
client.send(message);
|
||||
$('#send_form_input').val("");
|
||||
|
|
Loading…
Reference in New Issue