【发布时间】:2014-08-30 05:57:51
【问题描述】:
我正在尝试编写一些相对简单的自定义字段。
这是我的edit.vm的摘录:
$webResourceManager.requireResource("cz.firma.rozy:zakaznik")
<input id="test" style="width:500px"
type="text" placeholder="Sem zadejte ID" value=""/>
<button id="buttonID" >Use ID</button>
这是我的简单 zakaznik.js:
AJS.$( "#buttonID" ).click(function() {
AJS.$("#test").hide();
});
最后是 atlassian-plugin.xml
<web-resource key="zakaznik-resources" name="zakaznik Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<dependency>com.atlassian.auiplugin:jquery</dependency>
<dependency>com.atlassian.auiplugin:jquery-ui-other</dependency>
<dependency>com.atlassian.auiplugin:aui-select2</dependency>
<context>atl.general</context>
<context>atl.admin</context>
<resource type="download" name="zakaznik.css" location="/css/zakaznik.css"/>
<resource type="download" name="zakaznik.js" location="/js/zakaznik.js"/>
<resource type="download" name="images/" location="/images"/>
<context>zakaznik</context>
</web-resource>
...
<customfield-type name="Pridani zakaznika" i18n-name-key="customer-add.name" key="customer-add" class="cz.firma.rozy.jira.customfields.CustomerCustomField">
<description key="customer-add.description">Plugin, ktery prida zakaznika z abry</description>
<resource name="view" type="velocity" location="templates/viewCustomer.vm"/>
<resource name="edit" type="velocity" location="templates/edit.vm"/>
</customfield-type>
插件已成功构建并安装在 JIRA (v6.2.3) 中,我可以将此字段添加到任何屏幕。当我点击这个添加的按钮时,我想看看,那个输入是隐藏的。当我点击我的按钮时,什么都没有做,编辑模式也关闭了。
我做错了什么?
【问题讨论】:
-
请将您的问题拆分为单独的问题。
-
好吧,我被拆分了
标签: jquery jira velocity custom-fields jira-plugin