bug fix on admin_init and code cleanup
This commit is contained in:
parent
bf32f439e6
commit
d1275eb680
5 changed files with 592 additions and 538 deletions
|
|
@ -1,37 +1,26 @@
|
|||
jQuery(document).ready(function($) {
|
||||
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;
|
||||
});
|
||||
});
|
||||
|
||||
$('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;
|
||||
});
|
||||
$('.repo-toggle').on('click', function () {
|
||||
var id = $(this).data('repo');
|
||||
$('.repo-' + id).toggleClass('open');
|
||||
$('.repo-' + id + ' > ul.packages').slideToggle(400);
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
155
assets/style.css
155
assets/style.css
|
|
@ -1,133 +1,152 @@
|
|||
.wrap {
|
||||
overflow: hidden;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#show-tokens {
|
||||
float: right;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.box {
|
||||
margin: 20px 0;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E5E5E5;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
||||
margin: 20px 0;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E5E5E5;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.box .title {
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
background: #FFFFFF;
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
margin: 0;
|
||||
padding: 15px;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.box .title h3 {
|
||||
font-size: 14px;
|
||||
line-height: 1em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
line-height: 1em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.box .inner {
|
||||
padding: 15px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.gitea {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
|
||||
}
|
||||
|
||||
.gitea > li {
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.gitea > li > ul {
|
||||
overflow: hidden;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.gitea > li li {
|
||||
box-sizing: border-box;
|
||||
padding: 8px 15px;
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
// width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 8px 15px;
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.gitea ul.packages > li {
|
||||
padding: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.gitea li.repository,
|
||||
.gitea li.package {
|
||||
width: 210px;
|
||||
float: left;
|
||||
width: 210px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.gitea a {
|
||||
text-decoration: none;
|
||||
outline: 0;
|
||||
text-decoration: none;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.gitea a:focus,
|
||||
.gitea a:active {
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.gitea a.repo-toggle {
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
.gitea > li:hover .row-actions {
|
||||
left: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.gitea input.token {
|
||||
width: 70%;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 782px) {
|
||||
.gitea input.token {
|
||||
width: 100%;
|
||||
}
|
||||
.gitea input.token {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.times {
|
||||
color: #555d66;
|
||||
float: right;
|
||||
padding: 10px;
|
||||
font-style: italic;
|
||||
color: #555d66;
|
||||
float: right;
|
||||
padding: 10px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.form-table input[type=text],
|
||||
.form-table input[type=password] {
|
||||
width: 75%;
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.repo-row > ul.packages {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.repo-row > ul:first-child {
|
||||
transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
}
|
||||
|
||||
.repo-row.open > ul:first-child {
|
||||
background: #2a9bd9;
|
||||
border-color: #2a9bd9;
|
||||
color: white;
|
||||
background: #2a9bd9;
|
||||
border-color: #2a9bd9;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.repo-row.open > ul:first-child a {
|
||||
color: white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.token-box {
|
||||
position: relative;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.token-toggle {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
height: 20px;
|
||||
top: 50%;
|
||||
margin-top: -10px;
|
||||
color: #aaa !important;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
height: 20px;
|
||||
top: 50%;
|
||||
margin-top: -10px;
|
||||
color: #aaa !important;
|
||||
}
|
||||
|
||||
.token-toggle:hover {
|
||||
color: #aaa !important;
|
||||
color: #aaa !important;
|
||||
}
|
||||
|
||||
.token-toggle:focus,
|
||||
.token-toggle:active {
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
color: #aaa !important;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
color: #aaa !important;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue