I tried simply get and its doesnt work too
<Content type="html" view="profile">
<![CDATA[
<div id="hope"/>
#requireResource("com.atlassian.jira.gadgets:common")
#includeResources()
<input type="button" id="art"></input>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#art").click(function() {
jQuery.get("/jira/plugins/servlet/children", {"parentid":"3"}, function(data) {
});
});
});
</script>
]]>
</Content>
firebug show that query didnt send when button was pressed.
how send query from gadget.xml?
such query good works in my application in templates
I tried rest api and it didnt work to:
(function () {
var gadget = AJS.Gadget({
baseUrl: "__ATLASSIAN_BASE_URL__",
view: { ..........
}
});
})();
Community moderators have prevented the ability to post new answers.
full code of gadget.xml
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Edit_Employee_Data"
title_url="__MSG_gadget.title.url__"
directory_title="__MSG_gadget.title__"
description="__MSG_gadget.description__"
author="Andrew Denysenko"
author_email="bo.wang@customware.net"
screenshot='#staticResourceUrl("com.homecredit.plugins:employeeDataGadget", "star_red")'
thumbnail='#staticResourceUrl("com.homecredit.plugins:employeeDataGadget", "user_16.gif")'
>
<Optional feature="gadget-directory">
<Param name="categories">
JIRA
</Param>
</Optional>
</ModulePrefs>
<UserPref name="isConfigured" datatype="hidden" default_value="false"/>
<Content view="profile">
<![CDATA[
#requireResource("com.atlassian.jira.gadgets:common")
#includeResources()
<script type="text/javascript">
(function () {
var gadget = AJS.Gadget({
baseUrl: "__ATLASSIAN_BASE_URL__",
view: {
template: function(args) {
var gadget = this;
var userDetails = AJS.$("<h1/>").text("Hello, "+args.user["fullName"]);
gadget.getView().html(userDetails);
},
args: [{
key: "user",
ajaxOptions: function() {
return {
url: "/rest/gadget/1.0/currentUser"
};
}
}]
}
});
})();
</script>
]]>
</Content>
</Module>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.