Reviewed-by: Daniel Barboza <danielhb(a)linux.vnet.ibm.com>
On 06/09/2014 04:43 AM, Hongliang Wang wrote:
String.prototype.startsWith is a Firefox-specified API and Chrome
doesn't
support it. Replace it with a generic method.
Signed-off-by: Hongliang Wang <hlwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.template_main.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.template_main.js b/ui/js/src/kimchi.template_main.js
index eaa5247..48354c9 100644
--- a/ui/js/src/kimchi.template_main.js
+++ b/ui/js/src/kimchi.template_main.js
@@ -22,7 +22,7 @@ kimchi.doListTemplates = function() {
var listHtml = '';
var templateHtml = $('#templateTmpl').html();
$.each(result, function(index, value) {
- var isLocal = value.cdrom.startsWith("/");
+ var isLocal = /^\//.test(value['cdrom']);
if(isLocal){
value.location = "images/theme-default/icon-local.png";
}else{