Ensure that new units are displayed correctly on widget edit page

This commit is contained in:
Kijin Sung 2016-03-07 10:45:32 +09:00
parent 145bdab6c6
commit 8b8a0d0159

View file

@ -119,6 +119,20 @@ function doFillWidgetVars() {
if(node.type == 'button') continue;
if(node.name === '') continue;
if (node.name == 'widget_cache') {
var widget_cache = selected_node.getAttribute(node.name);
var widget_cache_unit = widget_cache.match(/[smhd]$/i);
if (widget_cache_unit) {
jQuery("#widget_cache_unit").val(widget_cache_unit);
widget_cache = widget_cache.replace(/[smhd]$/i, "");
}
jQuery("#widget_cache").val(widget_cache);
continue;
}
if (node.name == 'widget_cache_unit') {
continue;
}
var length = node.length;
var type = node.type;