Javascript Weceem插件无法编辑内容
最近我一直在尝试在grails上安装weceem 1.2-M1插件,但它拒绝让我编辑内容。每当我试图编辑内容时,页面标题中就会有一大块JS作为文本。抱歉,现在还不能发布图片Javascript Weceem插件无法编辑内容,javascript,html,grails,content-management-system,weceem,Javascript,Html,Grails,Content Management System,Weceem,最近我一直在尝试在grails上安装weceem 1.2-M1插件,但它拒绝让我编辑内容。每当我试图编辑内容时,页面标题中就会有一大块JS作为文本。抱歉,现在还不能发布图片 <script language="javascript" type="text/javascript"> function styleButtons() { $('button.removeTag').button({ icons: { primary: 'ui-icon-closethick' }, text
<script language="javascript" type="text/javascript"> function styleButtons() { $('button.removeTag').button({ icons: { primary: 'ui-icon-closethick' }, text: false }); } $(function() { styleButtons(); $('button.addTag').button(); /*{icons: { primary: 'ui-icon-plus' }});*/ $('#tagsfield_tags .addTag').click( function(event) { event.preventDefault(); var dataElem = $("input[name='tags']"); var existingTags = dataElem.val().split(','); var displayTagsParent = $("#tagsfield_tags .existingTagList"); var newTagsElem = $("input[name='newTags_tags']"); var newTags = newTagsElem.val().split(','); var exists = false; $.each(newTags, function(index, t) { t = $.trim(t).toLowerCase(); var exists = false for (i = 0; i < existingTags.length; i++) { if (existingTags[i] == t) { exists = true; break; } } if (!exists) { existingTags[existingTags.length] = t; $('<div class="existingTag"><span class="tagtext">'+t+'</span><button class="removeTag">Remove</button></div>').appendTo(displayTagsParent); styleButtons(); } }) dataElem.val(existingTags.join(',')); newTagsElem.val(''); }); $('#tagsfield_tags .removeTag').live('click', function(event) { event.preventDefault(); var tagParentDiv = $(event.target).parentsUntil('.existingTagList'); var tagToRemove = $('.tagtext', tagParentDiv).text(); $(tagParentDiv).fadeOut(500, function() { $(this).remove(); }); var dataElem = $("input[name='tags']"); var currentTags = dataElem.val().split(','); var newVal = ''; $.each(currentTags, function(index, t) { t = $.trim(t).toLowerCase(); if (t != tagToRemove) { newVal += t + ',' } }); dataElem.val(newVal); }); }); </script>
这是我的buildconfig文件
plugins {
checksums false
build ":tomcat:7.0.50"
compile ":twitter-bootstrap:3.1.0"
compile ":scaffolding:2.0.1"
compile ':cache:1.1.1'
compile ":jquery:1.8.3"
compile ":jquery-ui:1.8.24"
compile (':weceem:1.2-M1')
compile ":hibernate:3.6.10.7"
runtime ":database-migration:1.3.8"
compile ":resources:1.2.1"
runtime ":twitter-bootstrap:3.0.3"
}
最后,这里是我的urlmapping
类URL映射{
static mappings = {
// "/$controller/$action?/$id?(.$format)?"{
// constraints {
// // apply constraints here
// }
// }
//"/"(view:"/index")
"500"(view:'/error')
}
}
请有人帮我找出问题所在或给我指出正确的方向?非常感谢!插件的安全设置如何?可能您没有编辑内容的权限?您可以使用weceem插件检查演示应用程序,请参阅或查看配置示例
static mappings = {
// "/$controller/$action?/$id?(.$format)?"{
// constraints {
// // apply constraints here
// }
// }
//"/"(view:"/index")
"500"(view:'/error')
}
}