(function($){
var snakerflow = $.snakerflow;
$.extend(true, snakerflow.editors, {
inputEditor : function(){
var _props,_k,_div,_src,_r;
this.init = function(props, k, div, src, r){
_props=props; _k=k; _div=div; _src=src; _r=r;
$('').val(props[_k].value).change(function(){
props[_k].value = $(this).val();
}).appendTo('#'+_div);
$('#'+_div).data('editor', this);
}
this.destroy = function(){
$('#'+_div+' input').each(function(){
_props[_k].value = $(this).val();
});
}
},
selectEditor : function(arg){
var _props,_k,_div,_src,_r;
this.init = function(props, k, div, src, r){
_props=props; _k=k; _div=div; _src=src; _r=r;
var sle = $('').val(props[_k].value).change(function(){
props[_k].value = $(this).val();
}).appendTo('#'+_div);
if(typeof arg === 'string'){
$.ajax({
type: "GET",
url: arg,
success: function(data){
var opts = eval(data);
if(opts && opts.length){
for(var idx=0; idx'+opts[idx].name+'');
}
sle.val(_props[_k].value);
}
}
});
}else {
for(var idx=0; idx'+arg[idx].name+'');
}
sle.val(_props[_k].value);
}
$('#'+_div).data('editor', this);
};
this.destroy = function(){
$('#'+_div+' input').each(function(){
_props[_k].value = $(this).val();
});
};
}
});
})(jQuery);