assets and options improvment
This commit is contained in:
parent
2a47c356ee
commit
67981c517d
3 changed files with 213 additions and 123 deletions
37
assets/script.js
Normal file
37
assets/script.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
jQuery(document).ready(function($) {
|
||||
|
||||
// $('#show-tokens').on('click', function() {
|
||||
// if ($('input.token').attr('type') == 'password') {
|
||||
// $('input.token').attr('type', 'text');
|
||||
// $(this).addClass('dashicons-hidden').removeClass('dashicons-visibility')
|
||||
// } else {
|
||||
// $('input.token').attr('type', 'password');
|
||||
// $(this).addClass('dashicons-visibility').removeClass('dashicons-hidden')
|
||||
// }
|
||||
// return false;
|
||||
// });
|
||||
|
||||
$('input.token').each(function() {
|
||||
var token = $(this)
|
||||
var toggle = $('<a href="#" class="token-toggle dashicons dashicons-visibility"></a>');
|
||||
token.wrap('<span class="token-box"></span>').after(toggle);
|
||||
toggle.on('click', function() {
|
||||
if (token.attr('type') == 'password') {
|
||||
token.attr('type', 'text')
|
||||
toggle.addClass('dashicons-hidden').removeClass('dashicons-visibility')
|
||||
} else {
|
||||
token.attr('type', 'password')
|
||||
toggle.addClass('dashicons-visibility').removeClass('dashicons-hidden')
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
$('.repo-toggle').on('click', function() {
|
||||
var id = $(this).data('repo');
|
||||
$('.repo-'+id).toggleClass('open')
|
||||
$('.repo-'+id+' > ul.packages').slideToggle(400)
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue