Skip to content

Commit

Permalink
Merge commit 'refs/pull/168/head' of github.com:hananils/datetime int…
Browse files Browse the repository at this point in the history
…o pr-168
  • Loading branch information
nitriques committed Apr 28, 2015
2 parents 7541cb9 + 533c90a commit ef68728
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 62 deletions.
118 changes: 59 additions & 59 deletions assets/calendar.publish.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
* @source: http://github.com/nilshoerrmann/calendar
*/

div.calendar {
div.dt-calendar {
z-index: 2000;
position: relative;
-webkit-font-smoothing: antialiased;
}

/* Flip navigation*/

div.calendar div.date {
div.dt-calendar div.date {
width: 100%;
padding: 0;
position: relative;
}

div.calendar div.date nav {
div.dt-calendar div.date nav {
border-bottom: 1px solid #41403f;
height: 25px;
}

div.calendar div.date nav a {
div.dt-calendar div.date nav a {
display: inline-block;
background: url(images/arrows.png) 6px -13px no-repeat;
border: none;
Expand All @@ -38,23 +38,23 @@ div.calendar div.date nav a {
z-index: 1000;
}

div.calendar div.date nav a:hover {
div.dt-calendar div.date nav a:hover {
background-position: 6px -24px;
}

div.calendar div.date nav a:last-of-type {
div.dt-calendar div.date nav a:last-of-type {
background: url(images/arrows.png) -15px -13px no-repeat;
left: auto;
right: -6px;
}

div.calendar div.date nav a:last-of-type:hover {
div.dt-calendar div.date nav a:last-of-type:hover {
background-position: -15px -24px;
}

/* Switch navigation */

div.calendar div.switch {
div.dt-calendar div.switch {
width: 180px;
margin: 0 0 0 -90px;
float: left;
Expand All @@ -74,7 +74,7 @@ div.calendar div.switch {
background-image: -o-linear-gradient(top, #353533, #333331);
}

div.calendar div.switch:hover {
div.dt-calendar div.switch:hover {
box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
background: #323230;
background-image: -webkit-linear-gradient(top, #353533, #323230);
Expand All @@ -83,15 +83,15 @@ div.calendar div.switch:hover {
background-image: -o-linear-gradient(top, #353533, #323230);
}

div.calendar div.switch.active {
div.dt-calendar div.switch.active {
background: none;
overflow: hidden;
height: auto;
top: -117px;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.2);
}

div.calendar div.switch ul {
div.dt-calendar div.switch ul {
width: 80px;
float: left;
font-size: 109.09%;
Expand All @@ -101,34 +101,34 @@ div.calendar div.switch ul {
margin: -117px 0 0;
}

div.calendar div.switch.active ul {
div.dt-calendar div.switch.active ul {
margin: 0;
overflow: hidden;
}

div.calendar div.switch ul.months {
div.dt-calendar div.switch ul.months {
width: 100px;
text-align: right;
}

div.calendar div.switch ul.months li {
div.dt-calendar div.switch ul.months li {
border-right: 1px solid transparent;
width: 92px;
}

div.calendar div.switch.active ul.months li {
div.dt-calendar div.switch.active ul.months li {
border-right: 1px solid #eaeaea;
}

div.calendar div.switch ul.months li:nth-child(6) {
div.dt-calendar div.switch ul.months li:nth-child(6) {
background: url(images/arrows.png) 8px 7px no-repeat;
}

div.calendar div.switch ul.years li:nth-child(6) {
div.dt-calendar div.switch ul.years li:nth-child(6) {
background: url(images/arrows.png) 70px 7px no-repeat;
}

div.calendar div.switch ul li {
div.dt-calendar div.switch ul li {
color: #fff;
background: #fff;
border: none;
Expand All @@ -141,46 +141,46 @@ div.calendar div.switch ul li {
z-index: 3000;
}

div.calendar div.switch ul.months li:first-child {
div.dt-calendar div.switch ul.months li:first-child {
border-radius: 5px 0 0 0;
}

div.calendar div.switch ul.months li:last-child {
div.dt-calendar div.switch ul.months li:last-child {
border-radius: 0 0 0 5px;
}

div.calendar div.switch ul.years li:first-child {
div.dt-calendar div.switch ul.years li:first-child {
border-radius: 0 5px 0 0;
}

div.calendar div.switch ul.years li:last-child {
div.dt-calendar div.switch ul.years li:last-child {
border-radius: 0 0 5px 0;
}

div.calendar div.switch.active li {
div.dt-calendar div.switch.active li {
color: #000;
}

div.calendar div.switch.active ul:hover li:nth-child(6) {
div.dt-calendar div.switch.active ul:hover li:nth-child(6) {
background: #fff;
color: #000;
}

div.calendar div.switch.active ul li:nth-child(6) {
div.dt-calendar div.switch.active ul li:nth-child(6) {
background: #5677c3;
color: #fff;
border-right-color: #5677c3;
}

div.calendar div.switch.active ul li:hover {
div.dt-calendar div.switch.active ul li:hover {
background: #5677c3 !important;
color: #fff !important;
border-right-color: #5677c3;
}

/* Calendar sheet */

div.calendar table {
div.dt-calendar table {
border-collapse: collapse;
clear: both;
-webkit-user-select: none;
Expand All @@ -190,7 +190,7 @@ div.calendar table {
user-select: none;
}

div.calendar td {
div.dt-calendar td {
background: transparent /*#323230*/;
border: 1px solid #41403f;
border-style-bottom: none;
Expand All @@ -204,72 +204,72 @@ div.calendar td {
text-shadow: none;
}

div.calendar thead td,
div.calendar thead td:first-child,
div.calendar thead td:last-child {
div.dt-calendar thead td,
div.dt-calendar thead td:first-child,
div.dt-calendar thead td:last-child {
background: transparent;
border: none;
height: 30px;
color: rgba(255, 255, 255, 0.3);
}

div.calendar td.last,
div.calendar td.next {
div.dt-calendar td.last,
div.dt-calendar td.next {
color: rgba(255, 255, 255, 0.3) /*#686865*/;
}

div.calendar td:first-child,
div.calendar td:last-child {
div.dt-calendar td:first-child,
div.dt-calendar td:last-child {
background: #383836;
}

div.calendar td.today {
div.dt-calendar td.today {
background: rgba(200, 200, 200, 0.2);
}

div.calendar td.selected {
div.dt-calendar td.selected {
background: #5273c0;
color: #fff;
border: 1px solid rgba(200, 200, 200, 0.1);
}

div.calendar td:first-child.selected,
div.calendar td:last-child.selected {
div.dt-calendar td:first-child.selected,
div.dt-calendar td:last-child.selected {
background: #5677c3;
}

div.calendar td.last.selected,
div.calendar td.next.selected {
div.dt-calendar td.last.selected,
div.dt-calendar td.next.selected {
background: #475466;
border: 1px solid rgba(200, 200, 200, 0.1);
}

div.calendar td:first-child.last.selected,
div.calendar td:first-child.next.selected,
div.calendar td:last-child.last.selected,
div.calendar td:last-child.next.selected {
div.dt-calendar td:first-child.last.selected,
div.dt-calendar td:first-child.next.selected,
div.dt-calendar td:last-child.last.selected,
div.dt-calendar td:last-child.next.selected {
background: #505f73;
}

div.calendar td.selected.today {
div.dt-calendar td.selected.today {
background: #7499d2;
border: 1px solid rgba(200, 200, 200, 0.1);
}

div.calendar tbody td:hover {
div.dt-calendar tbody td:hover {
background: #ffb !important;
border: 1px solid #fff;
color: #9d854c;
}

@media screen and (min-width: 1000px) {

fieldset.primary div.calendar {
fieldset.primary div.dt-calendar {
height: 254px;
padding: 18px 38px 18px 18px;
}

fieldset.primary div.calendar div.date:not(:last-child) {
fieldset.primary div.dt-calendar div.date:not(:last-child) {
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 50%;
Expand All @@ -279,46 +279,46 @@ div.calendar tbody td:hover {
left: 0;
}

fieldset.primary div.calendar div.date:not(:last-child) nav a:first-of-type {
fieldset.primary div.dt-calendar div.date:not(:last-child) nav a:first-of-type {
left: 12px;
}

}

/* Ordering */

li.ordering div.calendar nav {
li.ordering div.dt-calendar nav {
border-bottom-color: #3c5c8c;
}

li.ordering div.calendar nav a {
li.ordering div.dt-calendar nav a {
display: none;
}

li.ordering div.calendar td {
li.ordering div.dt-calendar td {
border: 1px solid #44689e;
}

li.ordering div.calendar thead td {
li.ordering div.dt-calendar thead td {
border: none;
color: #3c5c8c;
}

li.ordering div.calendar tbody td:first-child,
li.ordering div.calendar tbody td:last-child {
li.ordering div.dt-calendar tbody td:first-child,
li.ordering div.dt-calendar tbody td:last-child {
background: rgba(68, 104, 158, 0.5);
}

li.ordering div.calendar div.switch {
li.ordering div.dt-calendar div.switch {
background: #44689e;
}

/* Single date */

.frame.single div.calendar div.date nav a:first-of-type {
.frame.single div.dt-calendar div.date nav a:first-of-type {
left: -6px;
}

.frame.single div.calendar div.date nav a:last-of-type {
.frame.single div.dt-calendar div.date nav a:last-of-type {
right: -8px;
}
2 changes: 1 addition & 1 deletion assets/calendar.publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
var dates = $(this),
settings = {
item: 'li',
calendar: 'div.calendar'
calendar: 'div.dt-calendar'
},
month_list = [
Symphony.Language.get('August'),
Expand Down
2 changes: 1 addition & 1 deletion assets/datetime.publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
var validate = function(input, date, show) {
var item = input.parents('li'),
datespan = input.parent(),
calendar = item.find('div.calendar');
calendar = item.find('div.dt-calendar');

// Call validator
if(input.attr('data-timestamp') != date) {
Expand Down
2 changes: 1 addition & 1 deletion fields/field.datetime.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static function createDate($element, $start=NULL, $end=NULL, $class=NULL,
self::__createDateField($element, 'end', $end, $time) .
' </div>
</header>
<div class="calendar content">' .
<div class="dt-calendar content">' .
self::__createCalendar() .
$cutter .
'</div>',
Expand Down

0 comments on commit ef68728

Please sign in to comment.