Bug #4677: Fix datatables with utf-8 search field values

(cherry picked from commit d78339e7b3)
This commit is contained in:
Carlos Martín committed 2016-07-22 16:25:52 +02:00
1 parent 313f1f7e39
commit 5a9ca1d190
14 files changed
+15 -15

No files matched your search

@@ -154,7 +154,7 @@ define(function(require) {
OpenNebulaDatastore.typeStr(element.TYPE),
state,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
});
@@ -181,7 +181,7 @@ define(function(require) {
element.VM_MAD,
Humanize.prettyTime(element.LAST_MON_TIME),
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
@@ -128,7 +128,7 @@ define(function(require) {
element.RUNNING_VMS,
element.TEMPLATE.TARGET ? element.TEMPLATE.TARGET : '--',
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
});
@@ -154,7 +154,7 @@ define(function(require) {
element.MARKETPLACE,
zone,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
@@ -143,7 +143,7 @@ define(function(require) {
element.MARKET_MAD,
zone,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
@@ -118,7 +118,7 @@ define(function(require) {
element.NAME,
state,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
});
@@ -112,7 +112,7 @@ define(function(require) {
element.GNAME,
element.NAME,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
});
@@ -112,7 +112,7 @@ define(function(require) {
element.GNAME,
element.NAME,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
});
@@ -120,7 +120,7 @@ define(function(require) {
element.NAME,
Humanize.prettyTime(element.REGTIME),
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
@@ -163,7 +163,7 @@ define(function(require) {
element.GID,
hidden_template,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
@@ -126,7 +126,7 @@ define(function(require) {
vncIcon,
TemplateUtils.templateToString(element),
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
@@ -155,7 +155,7 @@ define(function(require) {
ProgressBar.html(element.USED_LEASES, total_size),
element.VLAN_ID.length ? element.VLAN_ID : "-",
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
@@ -112,7 +112,7 @@ define(function(require) {
element.GNAME,
element.NAME,
(LabelsUtils.labelsStr(element[TEMPLATE_ATTR])||''),
btoa(JSON.stringify(search))
btoa(unescape(encodeURIComponent(JSON.stringify(search))))
];
}
});
@@ -355,7 +355,7 @@ define(function(require) {
}
try {
var values = JSON.parse(atob(data[that.searchColumn]));
var values = JSON.parse( decodeURIComponent(escape(atob(data[that.searchColumn]))) );
var match = true;
@@ -616,7 +616,7 @@ define(function(require) {
if(that.searchColumn != undefined){
try{
var values = JSON.parse(atob(item[that.searchColumn]));
var values = JSON.parse( decodeURIComponent(escape(atob(item[that.searchColumn]))) );
that.searchFields.forEach(function(name){
that.searchSets[name].add(values[name]);