This commit is contained in:
life
2014-11-12 17:32:03 +08:00
parent d979a0c3e2
commit 1f45666ec4
119 changed files with 2463 additions and 675 deletions

View File

@@ -12,6 +12,9 @@
{{range .notebooks}}
<li class="list-group-item" draggable="true" data-id="{{.NotebookId.Hex}}">
<span class="pull-left media-xs"><i class="fa fa-sort text-muted fa m-r-sm"></i></span>
<div class="pull-right" style="margin-right: 10px">
固定链接: /cate/<input data-id="{{.NotebookId.Hex}}" class="url-title" type="text" value="{{if .UrlTitle}}{{.UrlTitle|decodeUrlValue}}{{else}}{{.NotebookId.Hex}}{{end}}"/>
</div>
{{.Title}}
</li>
{{end}}
@@ -33,7 +36,7 @@ $(function() {
$(".list-group-item").each(function() {
ids.push($(this).data("id"));
});
ajaxPost("/member/blog/upateCateIds", {cateIds: ids}, function(re){
ajaxPost("/member/blog/", {cateIds: ids}, function(re){
if(reIsOk(re)) {
art.tips("Success");
} else {
@@ -41,6 +44,19 @@ $(function() {
}
});
});
$(".url-title").change(function(){
var $t = $(this);
var url = $t.val();
var cateId = $t.data('id');
ajaxPost("/member/blog/updateCateUrlTitle", {cateId: cateId, urlTitle: url}, function(re){
if(reIsOk(re)) {
$t.val(re.Item);
} else {
art.alert(re.Msg || "error");
}
});
});
});
</script>