1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

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

(cherry picked from commit d78339e7b3c29e64fdcb3ea2d61ae8b5c9133517)
This commit is contained in:
Carlos Martín 2016-07-22 16:23:25 +02:00
parent 313f1f7e39
commit 5a9ca1d190
14 changed files with 15 additions and 15 deletions

View File

@ -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))))
];
}
});

View File

@ -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))))
];
}

View File

@ -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))))
];
}
});

View File

@ -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))))
];
}

View File

@ -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))))
];
}

View File

@ -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))))
];
}
});

View File

@ -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))))
];
}
});

View File

@ -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))))
];
}
});

View File

@ -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))))
];
}

View File

@ -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))))
];
}

View File

@ -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))))
];
}

View File

@ -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))))
];
}

View File

@ -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))))
];
}
});

View File

@ -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]);