[IMP] String#slice can take a negative second index

bzr revid: xmo@openerp.com-20130828092003-mjrao9vl9ju6bxa1
This commit is contained in:
Xavier Morel
2013-08-28 11:20:03 +02:00
parent 217fb8a53b
commit 43c0bb84df
+2 -2
View File
@@ -695,8 +695,8 @@
var pt = $snippet.css('padding-top');
var pb = $snippet.css('padding-bottom');
pt = Number(pt.slice(0,pt.length - 2)) || 0; //FIXME something cleaner to remove 'px'
pb = Number(pb.slice(0,pb.length - 2)) || 0;
pt = Number(pt.slice(0, -2)) || 0; //FIXME something cleaner to remove 'px'
pb = Number(pb.slice(0, -2)) || 0;
$manipulator.addClass('oe_hover');
event.preventDefault();