首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Weceem插件无法编辑内容

Weceem插件无法编辑内容
EN

Stack Overflow用户
提问于 2014-02-23 23:29:31
回答 1查看 128关注 0票数 0

最近我一直在尝试在grails上安装weceem 1.2-M1插件,但它就是不让我编辑内容。每当我试图编辑内容时,一大块JS被用作页面标题中的文本(对不起,目前还不能发布图片)。

代码语言:javascript
复制
<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>

我已经将以下两行包含在Config文件中。

代码语言:javascript
复制
grails.resources.adhoc.excludes = ['/plugins/weceem-1.2-M1/*']  
grails.mime.disable.accept.header.userAgents = ['Gecko', 'WebKit', 'Presto', 'Trident']
grails.mime.file.extensions = false
grails.mime.types = [ // the first one is the default format
all:           '*/*', // 'all' maps to '*' or the first available format in withFormat
atom:          'application/atom+xml',
css:           'text/css',
csv:           'text/csv',
form:          'application/x-www-form-urlencoded',
html:          ['text/html','application/xhtml+xml'],
js:            'text/javascript',
json:          ['application/json', 'text/json'],
multipartForm: 'multipart/form-data',
rss:           'application/rss+xml',
text:          'text/plain',
hal:           ['application/hal+json','application/hal+xml'],
xml:           ['text/xml', 'application/xml']
]
grails.resources.adhoc.excludes = ['/plugins/weceem-1.2-M1/*']  
//grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']

这是我的buildconfig文件

代码语言:javascript
复制
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"
    }

最后,这是我的here映射类UrlMappings {

代码语言:javascript
复制
static mappings = {
   // "/$controller/$action?/$id?(.$format)?"{
   //     constraints {
   //         // apply constraints here
   //     }
   // }

    //"/"(view:"/index")
    "500"(view:'/error')
}
}

有没有人能帮我找出问题所在,或者给我指出正确的方向?非常感谢!

EN

回答 1

Stack Overflow用户

发布于 2014-03-11 04:05:45

你的插件的安全设置是什么?也许你没有编辑内容的权限?你可以使用weceem插件检查演示应用程序,配置示例请参见http://www.weceem.org/weceem/https://github.com/jCatalog/weceem-app

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21970231

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档