\r
$.each(_kiwi.global.settings.attributes, function(key, value) {\r
\r
- switch ($('[data-setting="' + key + '"]', that.$el).prop('type')) {\r
+ var $el = $('[data-setting="' + key + '"]', that.$el);\r
+\r
+ // Only deal with settings we have a UI element for\r
+ if (!$el)\r
+ return;\r
+\r
+ switch ($el.prop('type')) {\r
case 'checkbox':\r
- $('[data-setting="' + key + '"]', that.$el).prop('checked', value);\r
+ $el.prop('checked', value);\r
break;\r
case 'radio':\r
$('[data-setting="' + key + '"][value="' + value + '"]', that.$el).prop('checked', true);\r
break;\r
case 'text':\r
- $('[data-setting="' + key + '"]', that.$el).val(value);\r
+ $el.val(value);\r
break;\r
default:\r
$('[data-setting="' + key + '"][data-value="' + value + '"]', that.$el).addClass('active');\r