Skip to content

Commit

Permalink
html: update
Browse files Browse the repository at this point in the history
  • Loading branch information
yffrankwang committed Feb 16, 2024
1 parent ff026bf commit 6c75276
Show file tree
Hide file tree
Showing 21 changed files with 617 additions and 407 deletions.
30 changes: 24 additions & 6 deletions panda-html/src/html/panda/html/corejs/core.string.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,41 @@
};
}

if (typeof String.prototype.leftPad != "function") {
String.prototype.leftPad = function(n, c) {
if (typeof String.prototype.padLeft != "function") {
String.prototype.padLeft = function(n, c) {
c = c || ' ';
var s = this;
if (s.length >= n) {
return s;
}
while (s.length < n) {
s = c + s;
}
return s;
return s.right(n);
};
}
if (typeof String.prototype.rightPad != "function") {
String.prototype.rightPad = function(n, c) {
if (typeof String.prototype.padRight != "function") {
String.prototype.padRight = function(n, c) {
c = c || ' ';
var s = this;
if (s.length >= n) {
return s;
}
while (s.length < n) {
s += n;
s += c;
}
return s.left(n);
};
}
if (typeof String.prototype.padCenter != "function") {
String.prototype.padCenter = function(n, c) {
c = c || ' ';
var s = this, z = s.length, p = n - z;
if (p <= 0) {
return s;
}
s = s.padLeft(z+p/2, c);
s = s.padRight(n, c);
return s;
};
}
Expand Down
30 changes: 24 additions & 6 deletions panda-html/src/html/panda/html/corejs/corejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1088,23 +1088,41 @@ function DecimalFormat(pattern) {
};
}

if (typeof String.prototype.leftPad != "function") {
String.prototype.leftPad = function(n, c) {
if (typeof String.prototype.padLeft != "function") {
String.prototype.padLeft = function(n, c) {
c = c || ' ';
var s = this;
if (s.length >= n) {
return s;
}
while (s.length < n) {
s = c + s;
}
return s;
return s.right(n);
};
}
if (typeof String.prototype.rightPad != "function") {
String.prototype.rightPad = function(n, c) {
if (typeof String.prototype.padRight != "function") {
String.prototype.padRight = function(n, c) {
c = c || ' ';
var s = this;
if (s.length >= n) {
return s;
}
while (s.length < n) {
s += n;
s += c;
}
return s.left(n);
};
}
if (typeof String.prototype.padCenter != "function") {
String.prototype.padCenter = function(n, c) {
c = c || ' ';
var s = this, z = s.length, p = n - z;
if (p <= 0) {
return s;
}
s = s.padLeft(z+p/2, c);
s = s.padRight(n, c);
return s;
};
}
Expand Down
2 changes: 1 addition & 1 deletion panda-html/src/html/panda/html/corejs/corejs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion panda-html/src/html/panda/html/corejs/corejs.min.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ label {
font-family: Consolas, monospace;
}

input.form-control[size],
input.form-control[type="month"],
input.form-control[type="date"],
input.form-control[type="time"],
Expand All @@ -22,6 +23,10 @@ input.form-control[type="datetime-local"] {
width: auto;
}

select.form-control {
width: auto;
}

/** disable bootstrap not-allowed cursor */
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
cursor: auto;
Expand All @@ -33,11 +38,11 @@ input.form-control[type="datetime-local"] {
background-color: #f9f9f9;
padding: 10px;
}
.form-horizontal.lined > .form-group {
.form-horizontal.lined .form-group {
border-bottom: 1px solid #ccc;
margin: 0;
padding: 7px;
}
.form-horizontal.lined > .form-group:last-of-type {
.form-horizontal.lined .form-group:last-of-type {
border-bottom: 0;
}
18 changes: 7 additions & 11 deletions panda-html/src/html/panda/html/plugins/css/bootstrap.pager.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,40 @@
margin: 20px 0;
text-align: center;
}
.ui-pager > .infos {
.ui-pager > div.infos {
float: left;
padding: 8px;
}
.ui-pager > .limits {
.ui-pager > div.limits {
float: right;
}
.ui-pager > .pagination {
border-radius: 0;
margin: 0;
}
.ui-pager > .pagination > li:first-child > a,
.ui-pager > .pagination > li:first-child > span,
.ui-pager > .pagination > li:last-child > a,
.ui-pager > .pagination > li:last-child > span {
border-radius: 0;
.ui-pager > .pagination > li.limits > select {
display: inline;
float: left;
width: auto;
}

.ui-pager.lined > .pagination > li > a,
.ui-pager.lined > .pagination > li > span {
background-color: #fff;
border: 0 none;
border-bottom: 3px solid #ddd;
border-radius: 0;
color: #888;
margin-left: 3px;
padding: 5px 11px;
}
.ui-pager.lined > .pagination > li > a:hover,
.ui-pager.lined > .pagination > li > span:hover {
background-color: #eee;
border: 0 none;
border-bottom: 3px solid #337ab7;
}

.ui-pager.lined > .pagination > li.eleft > span,
.ui-pager.lined > .pagination > li.eright > span {
border: 0 none;
border-bottom: 3px solid transparent;
padding-left: 8px;
padding-right: 8px;
Expand All @@ -52,7 +49,6 @@
.ui-pager.lined > .pagination > .active > a:focus,
.ui-pager.lined > .pagination > .active > span:focus {
background-color: #fff;
border: 0 none;
border-bottom: 3px solid #337ab7;
color: #000;
font-weight: bold;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.table > thead > tr > th {
vertical-align: middle;
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@
padding: 15px;
border-bottom: 1px solid #e5e5e5;
}
.ui-popup-header h1, .ui-popup-header h2, .ui-popup-header h3, .ui-popup-header h4, .ui-popup-header h5, .ui-popup-header h6 {
margin: 0;
}

.ui-popup-body {
position: relative;
padding: 15px;
Expand Down
19 changes: 8 additions & 11 deletions panda-html/src/html/panda/html/plugins/css/jquery.ui.textclear.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
.ui-textclear {
cursor: pointer;
right: 22px;
display: inline-block;
position: absolute;
z-index: 3;
}

.ui-has-textclear {
padding-right: 24px;
}

input.ui-has-textclear + .ui-textclear {
margin-top: -8px;
top: 50%;
.ui-has-textclear + .ui-textclear {
top: 8px;
right: 22px;
}

input[size].ui-has-textclear + .ui-textclear,
.input-group > input.ui-has-textclear + .ui-textclear {
position: relative;
display: inline-block;
margin: 10px 0 0 -22px;
top: auto;
margin-left: -22px;
right: auto;
}

textarea.ui-has-textclear + .ui-textclear {
top: 8px;
}
53 changes: 42 additions & 11 deletions panda-html/src/html/panda/html/plugins/css/jquery.ui.uploader.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,37 @@
.ui-uploader-progress {
margin: 5px 0;
}
.ui-uploader-sep {
.ui-uploader-items {
margin: 7px 0 0 0;
}
.ui-uploader-item {
border: 1px solid #ccc;
border: 1px dashed #ccc;
display: inline-block;
padding: 8px;
padding: 8px 24px;
margin: 0 7px 7px 0;
vertical-align: top;
position: relative;
}
.ui-uploader-text {
display: inline-block;
.ui-uploader-item.loading {
border: 1px dotted #ccc;
}
.ui-uploader-item.success {
border: 1px solid #ccc;
}
.ui-uploader-item.error {
border: 1px solid #a94442;
}
.ui-uploader-remove {
color: #999;
.ui-uploader-item.error .ui-uploader-icon {
color: #a94442;
}
.ui-uploader-item .ui-close {
cursor: pointer;
margin-left: 10px;
padding: 3px;
position: absolute;
top: 6px;
right: 4px;
}
.ui-uploader-remove:hover {
color: #235273;
.ui-uploader-icon {
margin: 0 8px 0 -14px;
}
.ui-uploader-image img {
margin: 5px 0;
Expand All @@ -44,6 +54,9 @@
margin: 5px 0;
padding: 15px;
}
.ui-uploader-error.json {
white-space: pre-wrap;
}

/* drag & drop */
.ui-uploader-draggable {
Expand All @@ -55,3 +68,21 @@
background-color: #eee;
}

/* blink */
.ui-uploader-item.blinking {
animation: ui-uploader-blinking 2s infinite;
}

@keyframes ui-uploader-blinking {
0% { background-color: #fff; }
10% { background-color: #eee; }
20% { background-color: #ddd; }
30% { background-color: #ccc; }
40% { background-color: #bbb; }
50% { background-color: #aaa; }
60% { background-color: #bbb; }
70% { background-color: #ccc; }
80% { background-color: #ddd; }
90% { background-color: #eee; }
100% { background-color: #fff; }
}

0 comments on commit 6c75276

Please sign in to comment.