[MRM-84] fix date picker

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@707813 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2008-10-25 06:01:41 +00:00
parent 8ea1037a29
commit 0e7887712a
4 changed files with 217 additions and 128 deletions

View File

@ -18,27 +18,22 @@
--%> --%>
<%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!-- jQuery -->
<script type="text/javascript" src="/archiva/js/jquery/jquery-1.2.6.packjs"></script>
<!-- required plugins -->
<script type="text/javascript" src="/archiva/js/jquery/date.js"></script>
<!-- jquery.datePicker.js -->
<script type="text/javascript" src="/archiva/js/jquery/jquery.datePicker.js"></script>
<html> <html>
<head> <head>
<title>Reports</title> <title>Reports</title>
<s:head theme="ajax" /> <s:head theme="ajax" />
<link rel="stylesheet" href="<c:url value='/css/ui.datepicker.css'/>" type="text/css" media="all"/>
<script type="text/javascript" src="<c:url value='/js/jquery/jquery-1.2.6.pack.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/jquery/ui.datepicker.packed.js'/>"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() $(document).ready(function()
{ {
$('#startDate').datePicker({clickInput:true}) $('#startDate').datepicker()
$('#endDate').datePicker({clickInput:true}) $('#endDate').datepicker()
}); });
</script> </script>
</head> </head>

View File

@ -1,115 +0,0 @@
table.jCalendar {
border: 1px solid #000;
background: #aaa;
border-collapse: separate;
border-spacing: 2px;
}
table.jCalendar th {
background: #333;
color: #fff;
font-weight: bold;
padding: 3px 5px;
}
table.jCalendar td {
background: #ccc;
color: #000;
padding: 3px 5px;
text-align: center;
}
table.jCalendar td.other-month {
background: #ddd;
color: #aaa;
}
table.jCalendar td.today {
background: #666;
color: #fff;
}
table.jCalendar td.selected {
background: #f66;
color: #fff;
}
table.jCalendar td.selected:hover {
background: #f33;
color: #fff;
}
table.jCalendar td:hover, table.jCalendar td.dp-hover {
background: #fff;
color: #000;
}
table.jCalendar td.disabled, table.jCalendar td.disabled:hover {
background: #bbb;
color: #888;
}
/* For the popup */
/* NOTE - you will probably want to style a.dp-choose-date - see how I did it in demo.css */
div.dp-popup {
position: relative;
background: #ccc;
font-size: 10px;
font-family: arial, sans-serif;
padding: 2px;
width: 171px;
line-height: 1.2em;
}
div#dp-popup {
position: absolute;
z-index: 199;
}
div.dp-popup h2 {
font-size: 12px;
text-align: center;
margin: 2px 0;
padding: 0;
}
a#dp-close {
font-size: 11px;
padding: 4px 0;
text-align: center;
display: block;
}
a#dp-close:hover {
text-decoration: underline;
}
div.dp-popup a {
color: #000;
text-decoration: none;
padding: 3px 2px 0;
}
div.dp-popup div.dp-nav-prev {
position: absolute;
top: 2px;
left: 4px;
width: 100px;
}
div.dp-popup div.dp-nav-prev a {
float: left;
}
/* Opera needs the rules to be this specific otherwise it doesn't change the cursor back to pointer after you have disabled and re-enabled a link */
div.dp-popup div.dp-nav-prev a, div.dp-popup div.dp-nav-next a {
cursor: pointer;
}
div.dp-popup div.dp-nav-prev a.disabled, div.dp-popup div.dp-nav-next a.disabled {
cursor: default;
}
div.dp-popup div.dp-nav-next {
position: absolute;
top: 2px;
right: 4px;
width: 100px;
}
div.dp-popup div.dp-nav-next a {
float: right;
}
div.dp-popup a.disabled {
cursor: default;
color: #aaa;
}
div.dp-popup td {
cursor: pointer;
}
div.dp-popup td.disabled {
cursor: default;
}

View File

@ -0,0 +1,207 @@
/* Main Style Sheet for jQuery UI date picker */
#ui-datepicker-div, .ui-datepicker-inline {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
padding: 0;
margin: 0;
background: #ddd;
width: 185px;
}
#ui-datepicker-div {
display: none;
border: 1px solid #777;
z-index: 9999; /*must have*/
}
.ui-datepicker-inline {
float: left;
display: block;
border: 0;
}
.ui-datepicker-rtl {
direction: rtl;
}
.ui-datepicker-dialog {
padding: 5px !important;
border: 4px ridge #ddd !important;
}
button.ui-datepicker-trigger {
width: 25px;
}
img.ui-datepicker-trigger {
margin: 2px;
vertical-align: middle;
}
.ui-datepicker-prompt {
float: left;
padding: 2px;
background: #ddd;
color: #000;
}
* html .ui-datepicker-prompt {
width: 185px;
}
.ui-datepicker-control, .ui-datepicker-links, .ui-datepicker-header, .ui-datepicker {
clear: both;
float: left;
width: 100%;
color: #fff;
}
.ui-datepicker-control {
background: #400;
padding: 2px 0px;
}
.ui-datepicker-links {
background: #000;
padding: 2px 0px;
}
.ui-datepicker-control, .ui-datepicker-links {
font-weight: bold;
font-size: 80%;
}
.ui-datepicker-links label { /* disabled links */
padding: 2px 5px;
color: #888;
}
.ui-datepicker-clear, .ui-datepicker-prev {
float: left;
width: 34%;
}
.ui-datepicker-rtl .ui-datepicker-clear, .ui-datepicker-rtl .ui-datepicker-prev {
float: right;
text-align: right;
}
.ui-datepicker-current {
float: left;
width: 30%;
text-align: center;
}
.ui-datepicker-close, .ui-datepicker-next {
float: right;
width: 34%;
text-align: right;
}
.ui-datepicker-rtl .ui-datepicker-close, .ui-datepicker-rtl .ui-datepicker-next {
float: left;
text-align: left;
}
.ui-datepicker-header {
padding: 1px 0 3px;
background: #333;
text-align: center;
font-weight: bold;
height: 1.3em;
}
.ui-datepicker-header select {
background: #333;
color: #fff;
border: 0px;
font-weight: bold;
}
.ui-datepicker {
background: #ccc;
text-align: center;
font-size: 100%;
}
.ui-datepicker a {
display: block;
width: 100%;
}
.ui-datepicker-title-row {
background: #777;
}
.ui-datepicker-days-row {
background: #eee;
color: #666;
}
.ui-datepicker-week-col {
background: #777;
color: #fff;
}
.ui-datepicker-days-cell {
color: #000;
border: 1px solid #ddd;
}
.ui-datepicker-days-cell a{
display: block;
}
.ui-datepicker-week-end-cell {
background: #ddd;
}
.ui-datepicker-title-row .ui-datepicker-week-end-cell {
background: #777;
}
.ui-datepicker-days-cell-over {
background: #fff;
border: 1px solid #777;
}
.ui-datepicker-unselectable {
color: #888;
}
.ui-datepicker-today {
background: #fcc !important;
}
.ui-datepicker-current-day {
background: #999 !important;
}
.ui-datepicker-status {
background: #ddd;
width: 100%;
font-size: 80%;
text-align: center;
}
/* ________ Datepicker Links _______
** Reset link properties and then override them with !important */
#ui-datepicker-div a, .ui-datepicker-inline a {
cursor: pointer;
margin: 0;
padding: 0;
background: none;
color: #000;
}
.ui-datepicker-inline .ui-datepicker-links a {
padding: 0 5px !important;
}
.ui-datepicker-control a, .ui-datepicker-links a {
padding: 2px 5px !important;
color: #eee !important;
}
.ui-datepicker-title-row a {
color: #eee !important;
}
.ui-datepicker-control a:hover {
background: #fdd !important;
color: #333 !important;
}
.ui-datepicker-links a:hover, .ui-datepicker-title-row a:hover {
background: #ddd !important;
color: #333 !important;
}
/* ___________ MULTIPLE MONTHS _________*/
.ui-datepicker-multi .ui-datepicker {
border: 1px solid #777;
}
.ui-datepicker-one-month {
float: left;
width: 185px;
}
.ui-datepicker-new-row {
clear: left;
}
/* ___________ IE6 IFRAME FIX ________ */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}

File diff suppressed because one or more lines are too long