Permalink
Browse files

add no-local-deps version

  • Loading branch information...
1 parent db39861 commit 6cf7b65840bc9632d3b017cb378669d8837bea71 @vadimgurov committed Sep 25, 2012
Showing with 100 additions and 11 deletions.
  1. +96 −0 form-no-local-deps.html
  2. +4 −11 form.html
View
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Custom YouTrack Submit Form</title>
+
+ <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
+
+ <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
+ <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js"></script>
+</head>
+<body>
+
+
+<h3>Submit Issue</h3>
+
+<form onsubmit="createIssue(); return false;" class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="project">Project</label>
+
+ <div class="controls">
+ <select name="project" id="project">
+ <option>Loading projects...</option>
+ </select>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="summary">Summary</label>
+
+ <div class="controls">
+ <input type="text" id="summary" style="width: 50%"/>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="description">Description</label>
+
+
+ <div class="controls">
+ <textarea name="description" id="description" cols="30" rows="10" style="width: 50%"></textarea>
+ </div>
+
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <input type="submit" value="Create Issue" class="btn btn-primary"/>
+ <span id="result">Issue created!</span>
+ </div>
+
+ </div>
+</form>
+
+<script type="text/javascript">
+ function createIssue() {
+ $.ajax({
+ url:"http://scrumboard.myjetbrains.com" +
+ "/youtrack/rest/issue",
+ dataType:"json",
+ type:"POST",
+ data:{
+ project:$("#project").val(),
+ summary:$("#summary").val(),
+ description:$("#description").val()
+ }
+ }).done(function (data) {
+ $("#result").show();
+ $("#summary").val('');
+ $("#description").val('');
+ });
+ }
+
+ function loadProjects() {
+ $.ajax({
+ url:"http://scrumboard.myjetbrains.com" +
+ "/youtrack/rest/project/all",
+ dataType:"json"
+ }).done(function (data) {
+ var project = $("#project");
+ project.empty();
+ $.each(data, function(index, value) {
+ project.append($("<option/>", {
+ value: value.shortName,
+ text: value.name
+ }))
+ });
+ });
+ }
+
+ $(function(){
+ $("#result").hide();
+ loadProjects();
+ })
+</script>
+
+</body>
+</html>
View
@@ -2,8 +2,11 @@
<html>
<head>
<title>Custom YouTrack Submit Form</title>
+
<link rel="stylesheet" href="css/bootstrap.min.css">
- <link rel="stylesheet" href="css/override.css">
+
+ <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
+ <script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
@@ -47,11 +50,7 @@
</div>
</form>
-<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
-<script type="text/javascript" onscroll="js/bootstrap.min.js"></script>
<script type="text/javascript">
-
-
function createIssue() {
$.ajax({
url:"http://scrumboard.myjetbrains.com" +
@@ -87,16 +86,10 @@
});
}
-
$(function(){
$("#result").hide();
loadProjects();
})
-
-
-
-
-
</script>
</body>

0 comments on commit 6cf7b65

Please sign in to comment.