-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathissue.html
118 lines (105 loc) · 5.22 KB
/
issue.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html lang="en">
<head>
<title>stock</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="stock.css">
</head>
<body>
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">ISSUE</button>
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">AUTONOMI</h4>
</div>
<div class="modal-body">
<div class="row ">
<div class="col-xs-12 ">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">please enter the stock id <small> Only for CICians</small></h3>
</div>
<div class="panel-body">
<form role="form">
<div class="container">
<div class="row clearfix">
<div class="col-md-5 column">
<table class="table table-bordered table-hover" id="tab_logic">
<thead>
<tr >
<th class="text-center">
#
</th>
<th class="text-center">
Stock_id
</th>
<th class="text-center">
Quantity
</th>
<th class="text-center">
Return_Date
</th>
</tr>
</thead>
<tbody>
<tr id='addr0'>
<td>
1
</td>
<td>
<input type="text" name='Stock_id' placeholder='Stock_id' class="form-control"/>
</td>
<td>
<input type="text" name='Quantity' placeholder='Quantity' class="form-control"/>
</td>
<td>
<input type="date" name='Return_date' placeholder='Return_date' class="form-control"/>
</td>
</tr>
<tr id='addr1'></tr>
</tbody>
</table>
</div>
</div>
<a id="add_row" class="btn btn-default pull-left">Add Row</a><a id='delete_row' class="btn btn-default">Delete Row</a>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Exit</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
var i=1;
$("#add_row").click(function(){
$('#addr'+i).html("<td>"+ (i+1) +"</td><td><input name='Stock_id"+i+"' type='text' placeholder='Stock_id' class='form-control input-md' /> </td><td><input name='Quantity"+i+"' type='text' placeholder='Quantity' class='form-control input-md'></td><td><input name='Return_date"+i+"' type='text' placeholder='Return_date' class='form-control input-md'></td><td><button class='delete_button' name='delete_row"+i+"' type='button'>delete</button> ");
$(".delete_button").click(function(){$(this).parent().parent().remove();i--;} );
$('#tab_logic').append('<tr id="addr'+(i+1)+'"></tr>');
i++;
});
$("delete_row"+i).click()
$("#delete_row").click(function(){
if(i>1){
$("#addr"+(i-1)).html('');
i--;
}
});
});
</script>
</body>
</html>