Browse Source

more buttons

master
Pascal Gloor 5 years ago
parent
commit
bbfbdb98ab
2 changed files with 24 additions and 8 deletions
  1. 10
    8
      www/index.html
  2. 14
    0
      www/js/autodoc.js

+ 10
- 8
www/index.html View File

</td> </td>
<td> <td>
<div class="btn-group" role="group"> <div class="btn-group" role="group">
<button type="button" class="btn btn-primary autodoc_tag_color_primary">
<button type="button" class="btn btn-primary" data="autodoc_tag_color_primary">
<span class="autodoc_tag_btn_on d-none"> <span class="autodoc_tag_btn_on d-none">
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</span> </span>
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</span> </span>
</button> </button>
<button type="button" class="btn btn-secondary autodoc_tag_color_secondary">
<button type="button" class="btn btn-secondary" data="autodoc_tag_color_secondary">
<span class="autodoc_tag_btn_on d-none"> <span class="autodoc_tag_btn_on d-none">
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</span> </span>
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</span> </span>
</button> </button>
<button type="button" class="btn btn-success autodoc_tag_color_success">
<button type="button" class="btn btn-success" data="autodoc_tag_color_success">
<span class="autodoc_tag_btn_on d-none"> <span class="autodoc_tag_btn_on d-none">
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</span> </span>
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</span> </span>
</button> </button>
<button type="button" class="btn btn-danger autodoc_tag_color_danger">
<button type="button" class="btn btn-danger" data="autodoc_tag_color_danger">
<span class="autodoc_tag_btn_on d-none"> <span class="autodoc_tag_btn_on d-none">
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</span> </span>
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</span> </span>
</button> </button>
<button type="button" class="btn btn-warning autodoc_tag_color_warning">
<button type="button" class="btn btn-warning" data="autodoc_tag_color_warning">
<span class="autodoc_tag_btn_on d-none"> <span class="autodoc_tag_btn_on d-none">
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</span> </span>
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</span> </span>
</button> </button>
<button type="button" class="btn btn-info autodoc_tag_color_info">
<button type="button" class="btn btn-info" data="autodoc_tag_color_info">
<span class="autodoc_tag_btn_on d-none"> <span class="autodoc_tag_btn_on d-none">
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</span> </span>
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</span> </span>
</button> </button>
<button type="button" class="btn btn-light autodoc_tag_color_light">
<button type="button" class="btn btn-light" data="autodoc_tag_color_light">
<span class="autodoc_tag_btn_on d-none"> <span class="autodoc_tag_btn_on d-none">
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</span> </span>
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</span> </span>
</button> </button>
<button type="button" class="btn btn-dark autodoc_tag_color_dark">
<button type="button" class="btn btn-dark" data="autodoc_tag_color_dark">
<span class="autodoc_tag_btn_on d-none"> <span class="autodoc_tag_btn_on d-none">
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</span> </span>
</span> </span>
</button> </button>
</div> </div>
<!--
<a href="#" class="autodoc_tag_color badge badge-primary" data="primary">0</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-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-success" data="success">0</a>
<a href="#" class="autodoc_tag_color badge badge-info" data="info">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-light" data="light">0</a>
<a href="#" class="autodoc_tag_color badge badge-dark" data="dark">0</a> <a href="#" class="autodoc_tag_color badge badge-dark" data="dark">0</a>
-->
</td> </td>
<td> <td>
<span id="autodoc_tag_result" class="badge"></span> <span id="autodoc_tag_result" class="badge"></span>

+ 14
- 0
www/js/autodoc.js View File

}); });


$('.autodoc_tag_color').click(function(e) { $('.autodoc_tag_color').click(function(e) {
$(e.target).parent().children().removeClass('active');
$(e.target).addClass('active');

$(e.target).parent().children().each(function(id,x) {
var myclass = 'badge-' + $(x).attr('data').split('_').pop();
$('#autodoc_tag_result').removeClass(myclass);
});

var myclass = 'badge-' + $(e.target).attr('data').split('_').pop();
$('#autodoc_tag_result').addClass(myclass);

});

$('.NOPE_autodoc_tag_color').click(function(e) {
$(e.target).parent().children().html('0'); $(e.target).parent().children().html('0');
$(e.target).html('1'); $(e.target).html('1');

Loading…
Cancel
Save