Browse Source

better

master
Pascal Gloor 5 years ago
parent
commit
8507ad602b
2 changed files with 11 additions and 13 deletions
  1. 8
    8
      www/index.html
  2. 3
    5
      www/js/autodoc.js

+ 8
- 8
www/index.html View File

@@ -231,14 +231,14 @@
<input type="text" placeholder="Tag name" class="autodoc_tag_text">
</td>
<td>
<a href="#" class="autodoc_tag_color badge badge-primary" data="primary"><i class="fas fa-times"></i></a>
<a href="#" class="autodoc_tag_color badge badge-secondary" data="secondary"><i class="fas fa-times"></i></a>
<a href="#" class="autodoc_tag_color badge badge-success" data="success"><i class="fas fa-times"></i></a>
<a href="#" class="autodoc_tag_color badge badge-danger" data="danger"><i class="fas fa-times"></i></a>
<a href="#" class="autodoc_tag_color badge badge-warning" data="warning"><i class="fas fa-times"></i></a>
<a href="#" class="autodoc_tag_color badge badge-info" data="info"><i class="fas fa-times"></i></a>
<a href="#" class="autodoc_tag_color badge badge-light" data="light"><i class="fas fa-times"></i></a>
<a href="#" class="autodoc_tag_color badge badge-dark" data="dark"><i class="fas fa-times"></i></a>
<a href="#" class="autodoc_tag_color badge badge-primary" data="primary">0</a>
<a href="#" class="autodoc_tag_color badge badge-secondary" data="secondary">0</a>
<a href="#" class="autodoc_tag_color badge badge-success" data="success">0</a>
<a href="#" class="autodoc_tag_color badge badge-danger" data="danger">0</a>
<a href="#" class="autodoc_tag_color badge badge-warning" data="warning">0</a>
<a href="#" class="autodoc_tag_color badge badge-info" data="info">0</a>
<a href="#" class="autodoc_tag_color badge badge-light" data="light">0</a>
<a href="#" class="autodoc_tag_color badge badge-dark" data="dark">0</a>
</td>
<td>
<span id="autodoc_tag_result" class="badge"></span>

+ 3
- 5
www/js/autodoc.js View File

@@ -70,12 +70,10 @@ $(document).ready(function () {

$('.autodoc_tag_color').click(function(e) {
$(e.target).parent().parent().children().children().removeClass('fa-check')
$(e.target).parent().parent().children().children().addClass('fa-times')
$(e.target).removeClass('fa-times')
$(e.target).addClass('fa-check')
$(e.target).parent().children().html('0');
$(e.target).html('1');
$(e.target).parent().parent().children().each(function(id, x) {
$(e.target).parent().children().each(function(id, x) {
console.log(x);
console.log($(x).attr('data'));
$("#autodoc_tag_result").removeClass("badge-" + $(x).attr('data'));

Loading…
Cancel
Save