diff --git a/jquery.jeditable.js b/jquery.jeditable.js
index eb8a911..2aa1674 100644
--- a/jquery.jeditable.js
+++ b/jquery.jeditable.js
@@ -517,6 +517,40 @@
});
}
}
+ },
+ selectmulti: {
+ element : function(settings, original) {
+ var select = $('');
+ $(this).append(select);
+ $(this).find('select').attr('multiple','multiple');
+ return(select);
+ },
+ content : function(data, settings, original) {
+ /* If it is string assume it is json. */
+ if (String == data.constructor) {
+ eval ('var json = ' + data);
+ } else {
+ /* Otherwise assume it is a hash already. */
+ var json = data;
+ }
+ for (var key in json) {
+ if (!json.hasOwnProperty(key)) {
+ continue;
+ }
+ if ('selected' == key) {
+ continue;
+ }
+ var option = $('').val(key).append(json[key]);
+ $('select', this).append(option);
+ }
+ /* Loop option again to set selected. IE needed this... */
+ $('select', this).children().each(function() {
+ if ($(this).val() == json['selected'] ||
+ $(this).text() == $.trim(original.revert)) {
+ $(this).attr('selected', 'selected');
+ }
+ });
+ }
}
},