...
|
...
|
@@ -69,6 +69,7 @@ |
|
|
<td>
|
|
|
<span style="color:red">*</span><label>文字内容</label> <br>
|
|
|
<textarea rows="5" id="content" style="width:60%; white-space: pre-wrap;" name = "content" class="form-control" placeholder="请在这里输入1-500字的笔记" required="" maxlength="500"></textarea>
|
|
|
<span id="content-count">0</span>/500
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
...
|
...
|
@@ -181,6 +182,15 @@ |
|
|
}
|
|
|
});
|
|
|
|
|
|
/*字数限制*/
|
|
|
$("#content").on("input propertychange", function() {
|
|
|
debugger
|
|
|
var $this = $(this);
|
|
|
var count = $this.val().length;
|
|
|
$("#content-count").text(count);
|
|
|
});
|
|
|
|
|
|
|
|
|
$("#labelId").combobox({
|
|
|
prompt: "请选择标签",
|
|
|
required: false,
|
...
|
...
|
@@ -316,6 +326,20 @@ |
|
|
bucket: "grassImg"
|
|
|
},
|
|
|
onBeforeSubmit: function () {
|
|
|
debugger;
|
|
|
var oobj = $(this).find("input[type='file']");
|
|
|
var files = oobj[0].files;
|
|
|
|
|
|
for(var i=0; i<files.length;i++){
|
|
|
var obj = files[i];
|
|
|
if(obj!=null && obj!=''){
|
|
|
if(obj.type.toLowerCase() == 'image/png'){
|
|
|
$.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$.messager.progress({
|
|
|
title: "正在执行",
|
|
|
msg: "正在执行,请稍后...",
|
...
|
...
|
@@ -427,6 +451,19 @@ |
|
|
bucket: "grassImg"
|
|
|
},
|
|
|
onBeforeSubmit: function () {
|
|
|
var oobj = $(this).find("input[type='file']");
|
|
|
var files = oobj[0].files;
|
|
|
|
|
|
for(var i=0; i<files.length;i++){
|
|
|
var obj = files[i];
|
|
|
if(obj!=null && obj!=''){
|
|
|
if(obj.type.toLowerCase() == 'image/png'){
|
|
|
$.messager.alert("提示","不允许上传png格式的图片", "info", function(){return false;});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$.messager.progress({
|
|
|
title: "正在执行",
|
|
|
msg: "正在执行,请稍后...",
|
...
|
...
|
|