【发布时间】:2013-08-01 10:33:34
【问题描述】:
我正在使用带有自动增长功能的 Mika Tuupola 的 Jeditable 插件。我已按照他的指示进行操作,但控制台显示此错误:
我正在使用带有fosjsroutingbundle 的 Symfony2;这就是使用可编辑变量的原因。这很好用。
这是JS代码:
$('.editarContenido').editable(Routing.generate('criContenido_ajax.' + $('html').attr('lang'), { "_locale": $('html').attr('lang'), "pysStr": $('section').attr('pelicula') }),
{
type : "autogrow",
submit : 'OK',
indicator : 'Saving...',
tooltip : 'Click to edit...',
autogrow : {
lineHeight : 16,
maxHeight : 512
}
});
$.editable.addInputType('autogrow', {
element : function(settings, original) {
var textarea = $('<textarea>');
if (settings.rows) {
textarea.attr('rows', settings.rows);
} else {
textarea.height(settings.height);
}
if (settings.cols) {
textarea.attr('cols', settings.cols);
} else {
textarea.width(settings.width);
}
$(this).append(textarea);
return(textarea);
},
plugin : function(settings, original) {
$('textarea', this).autogrow(settings.autogrow);
}
});
编辑
【问题讨论】:
-
该错误消息图像实际上无法读取。你能用剪切和粘贴的文本替换它吗?