forked from Bitmessage/virtpool
added tagging feature part1
This commit is contained in:
parent
91136a9e87
commit
c53497c36f
|
@ -9,8 +9,11 @@
|
|||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="{{ STATIC_PREFIX }}assets/css/bootstrap-tagsinput.css">
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="{{ STATIC_PREFIX }}assets/js/bootstrap-tagsinput.js"></script>
|
||||
<style>
|
||||
body {
|
||||
color: #566787;
|
||||
|
@ -277,11 +280,16 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
//import Tagify from '@yaireo/tagify';
|
||||
$(document).ready(function(){
|
||||
|
||||
//window.onload= function(){
|
||||
// Activate tooltip
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
//$('input[name=tags]').data('tagify').addTags('aaa, bbb, ccc');
|
||||
//new Tagify(input)
|
||||
|
||||
// Select/Deselect checkboxes
|
||||
var checkbox = $('table tbody input[type="checkbox"]');
|
||||
$("#selectAll").click(function(){
|
||||
|
@ -384,6 +392,9 @@ $(document).ready(function(){
|
|||
elem.checked= false;
|
||||
|
||||
}
|
||||
else if(elem.placeholder=="Tags"){
|
||||
requestData.data.push(elem.value)
|
||||
}
|
||||
else{
|
||||
requestData.data.push(elem.value)
|
||||
row += `<td>${elem.value}</td>`
|
||||
|
@ -451,6 +462,9 @@ $(document).ready(function(){
|
|||
$(elem).prop('checked', false)
|
||||
}
|
||||
|
||||
}
|
||||
else if(elem.placeholder=="Tags"){
|
||||
|
||||
}
|
||||
else{
|
||||
elem.value= data[index]
|
||||
|
@ -487,6 +501,9 @@ $(document).ready(function(){
|
|||
elem.checked= false;
|
||||
|
||||
}
|
||||
else if(elem.placeholder=="Tags"){
|
||||
requestData.data.push(elem.value)
|
||||
}
|
||||
else{
|
||||
requestData.data.push(elem.value)
|
||||
row += `<td>${elem.value}</td>`
|
||||
|
@ -703,6 +720,11 @@ $(document).ready(function(){
|
|||
<label for="selectAll"></label>
|
||||
</span-->
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tags</label>
|
||||
<input type="text" value="" data-role="tagsinput" placeholder="Tags" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Power Option</label>
|
||||
<select class="browser-default custom-select sel-add" type="select">
|
||||
|
@ -760,6 +782,10 @@ $(document).ready(function(){
|
|||
<label for="selectAll"></label>
|
||||
</span-->
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Tags</label>
|
||||
<input type="text" value="hello, world" data-role="tagsinput" placeholder="Tags" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Power Option</label>
|
||||
<select class="browser-default custom-select sel-edit" type="select">
|
||||
|
|
Loading…
Reference in New Issue