add semakin imut
|
After Width: | Height: | Size: 437 KiB |
@@ -0,0 +1,115 @@
|
||||
/**
|
||||
* Created by Kausar on 06/10/2016.
|
||||
*/
|
||||
window.marker = null;
|
||||
|
||||
function initialize() {
|
||||
var map;
|
||||
|
||||
var nottingham = new google.maps.LatLng(51.507351, -0.127758);
|
||||
|
||||
var style = [
|
||||
{
|
||||
"featureType": "road.highway",
|
||||
"elementType": "geometry",
|
||||
"stylers": [
|
||||
{ "saturation": -100 },
|
||||
{ "lightness": -8 },
|
||||
{ "gamma": 1.18 }
|
||||
]
|
||||
}, {
|
||||
"featureType": "road.arterial",
|
||||
"elementType": "geometry",
|
||||
"stylers": [
|
||||
{ "saturation": -100 },
|
||||
{ "gamma": 1 },
|
||||
{ "lightness": -24 }
|
||||
]
|
||||
}, {
|
||||
"featureType": "poi",
|
||||
"elementType": "geometry",
|
||||
"stylers": [
|
||||
{ "saturation": -100 }
|
||||
]
|
||||
}, {
|
||||
"featureType": "administrative",
|
||||
"stylers": [
|
||||
{ "saturation": -100 }
|
||||
]
|
||||
}, {
|
||||
"featureType": "transit",
|
||||
"stylers": [
|
||||
{ "saturation": -100 }
|
||||
]
|
||||
}, {
|
||||
"featureType": "water",
|
||||
"elementType": "geometry.fill",
|
||||
"stylers": [
|
||||
{ "saturation": -100 }
|
||||
]
|
||||
}, {
|
||||
"featureType": "road",
|
||||
"stylers": [
|
||||
{ "saturation": -100 }
|
||||
]
|
||||
}, {
|
||||
"featureType": "administrative",
|
||||
"stylers": [
|
||||
{ "saturation": -100 }
|
||||
]
|
||||
}, {
|
||||
"featureType": "landscape",
|
||||
"stylers": [
|
||||
{ "saturation": -100 }
|
||||
]
|
||||
}, {
|
||||
"featureType": "poi",
|
||||
"stylers": [
|
||||
{ "saturation": -100 }
|
||||
]
|
||||
}, {
|
||||
}
|
||||
];
|
||||
|
||||
var mapOptions = {
|
||||
// SET THE CENTER
|
||||
center: nottingham,
|
||||
|
||||
// SET THE MAP STYLE & ZOOM LEVEL
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
||||
|
||||
// SET THE BACKGROUND COLOUR
|
||||
backgroundColor:"#000",
|
||||
|
||||
// REMOVE ALL THE CONTROLS EXCEPT ZOOM
|
||||
zoom:17,
|
||||
panControl:false,
|
||||
zoomControl:true,
|
||||
mapTypeControl:false,
|
||||
scaleControl:false,
|
||||
streetViewControl:false,
|
||||
overviewMapControl:false,
|
||||
zoomControlOptions: {
|
||||
style:google.maps.ZoomControlStyle.LARGE
|
||||
}
|
||||
|
||||
}
|
||||
map = new google.maps.Map(document.getElementById('map'), mapOptions);
|
||||
// SET THE MAP TYPE
|
||||
var mapType = new google.maps.StyledMapType(style, {name:"Grayscale"});
|
||||
map.mapTypes.set('grey', mapType);
|
||||
map.setMapTypeId('grey');
|
||||
|
||||
//CREATE A CUSTOM PIN ICON
|
||||
var marker_image ='plugins/google-map/images/marker.png';
|
||||
var pinIcon = new google.maps.MarkerImage(marker_image,null,null, null,new google.maps.Size(74, 73));
|
||||
|
||||
marker = new google.maps.Marker({
|
||||
position: nottingham,
|
||||
map: map,
|
||||
icon: pinIcon,
|
||||
title: 'eventre'
|
||||
});
|
||||
}
|
||||
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* jQuery.appear
|
||||
* http://code.google.com/p/jquery-appear/
|
||||
*
|
||||
* Copyright (c) 2009 Michael Hixson
|
||||
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
(function($){$.fn.appear=function(f,o){var s=$.extend({one:true},o);return this.each(function(){var t=$(this);t.appeared=false;if(!f){t.trigger('appear',s.data);return;}var w=$(window);var c=function(){if(!t.is(':visible')){t.appeared=false;return;}var a=w.scrollLeft();var b=w.scrollTop();var o=t.offset();var x=o.left;var y=o.top;if(y+t.height()>=b&&y<=b+w.height()&&x+t.width()>=a&&x<=a+w.width()){if(!t.appeared)t.trigger('appear',s.data);}else{t.appeared=false;}};var m=function(){t.appeared=true;if(s.one){w.unbind('scroll',c);var i=$.inArray(c,$.fn.appear.checks);if(i>=0)$.fn.appear.checks.splice(i,1);}f.apply(this,arguments);};if(s.one)t.one('appear',s.data,m);else t.bind('appear',s.data,m);w.scroll(c);$.fn.appear.checks.push(c);(c)();});};$.extend($.fn.appear,{checks:[],timeout:null,checkAll:function(){var l=$.fn.appear.checks.length;if(l>0)while(l--)($.fn.appear.checks[l])();},run:function(){if($.fn.appear.timeout)clearTimeout($.fn.appear.timeout);$.fn.appear.timeout=setTimeout($.fn.appear.checkAll,20);}});$.each(['append','prepend','after','before','attr','removeAttr','addClass','removeClass','toggleClass','remove','css','show','hide'],function(i,n){var u=$.fn[n];if(u){$.fn[n]=function(){var r=u.apply(this,arguments);$.fn.appear.run();return r;}}});})(jQuery);
|
||||
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,10 @@
|
||||
css_dir = "."
|
||||
sass_dir = "."
|
||||
images_dir = "."
|
||||
fonts_dir = "fonts"
|
||||
relative_assets = true
|
||||
|
||||
output_style = :compact
|
||||
line_comments = false
|
||||
|
||||
preferred_syntax = :scss
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by Fontastic.me</metadata>
|
||||
<defs>
|
||||
<font id="slick" horiz-adv-x="512">
|
||||
<font-face font-family="slick" units-per-em="512" ascent="480" descent="-32"/>
|
||||
<missing-glyph horiz-adv-x="512" />
|
||||
|
||||
<glyph unicode="→" d="M241 113l130 130c4 4 6 8 6 13 0 5-2 9-6 13l-130 130c-3 3-7 5-12 5-5 0-10-2-13-5l-29-30c-4-3-6-7-6-12 0-5 2-10 6-13l87-88-87-88c-4-3-6-8-6-13 0-5 2-9 6-12l29-30c3-3 8-5 13-5 5 0 9 2 12 5z m234 143c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
|
||||
<glyph unicode="←" d="M296 113l29 30c4 3 6 7 6 12 0 5-2 10-6 13l-87 88 87 88c4 3 6 8 6 13 0 5-2 9-6 12l-29 30c-3 3-8 5-13 5-5 0-9-2-12-5l-130-130c-4-4-6-8-6-13 0-5 2-9 6-13l130-130c3-3 7-5 12-5 5 0 10 2 13 5z m179 143c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
|
||||
<glyph unicode="•" d="M475 256c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
|
||||
<glyph unicode="a" d="M475 439l0-128c0-5-1-9-5-13-4-4-8-5-13-5l-128 0c-8 0-13 3-17 11-3 7-2 14 4 20l40 39c-28 26-62 39-100 39-20 0-39-4-57-11-18-8-33-18-46-32-14-13-24-28-32-46-7-18-11-37-11-57 0-20 4-39 11-57 8-18 18-33 32-46 13-14 28-24 46-32 18-7 37-11 57-11 23 0 44 5 64 15 20 9 38 23 51 42 2 1 4 3 7 3 3 0 5-1 7-3l39-39c2-2 3-3 3-6 0-2-1-4-2-6-21-25-46-45-76-59-29-14-60-20-93-20-30 0-58 5-85 17-27 12-51 27-70 47-20 19-35 43-47 70-12 27-17 55-17 85 0 30 5 58 17 85 12 27 27 51 47 70 19 20 43 35 70 47 27 12 55 17 85 17 28 0 55-5 81-15 26-11 50-26 70-45l37 37c6 6 12 7 20 4 8-4 11-9 11-17z"/>
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,204 @@
|
||||
@charset 'UTF-8';
|
||||
/* Slider */
|
||||
.slick-loading .slick-list
|
||||
{
|
||||
background: #fff url('./ajax-loader.gif') center center no-repeat;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
@font-face
|
||||
{
|
||||
font-family: 'slick';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
|
||||
src: url('./fonts/slick.eot');
|
||||
src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');
|
||||
}
|
||||
/* Arrows */
|
||||
.slick-prev,
|
||||
.slick-next
|
||||
{
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
|
||||
display: block;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
-webkit-transform: translate(0, -50%);
|
||||
-ms-transform: translate(0, -50%);
|
||||
transform: translate(0, -50%);
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
color: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
}
|
||||
.slick-prev:hover,
|
||||
.slick-prev:focus,
|
||||
.slick-next:hover,
|
||||
.slick-next:focus
|
||||
{
|
||||
color: transparent;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
}
|
||||
.slick-prev:hover:before,
|
||||
.slick-prev:focus:before,
|
||||
.slick-next:hover:before,
|
||||
.slick-next:focus:before
|
||||
{
|
||||
opacity: 1;
|
||||
}
|
||||
.slick-prev.slick-disabled:before,
|
||||
.slick-next.slick-disabled:before
|
||||
{
|
||||
opacity: .25;
|
||||
}
|
||||
|
||||
.slick-prev:before,
|
||||
.slick-next:before
|
||||
{
|
||||
font-family: 'slick';
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
|
||||
opacity: .75;
|
||||
color: white;
|
||||
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.slick-prev
|
||||
{
|
||||
left: -25px;
|
||||
}
|
||||
[dir='rtl'] .slick-prev
|
||||
{
|
||||
right: -25px;
|
||||
left: auto;
|
||||
}
|
||||
.slick-prev:before
|
||||
{
|
||||
content: '←';
|
||||
}
|
||||
[dir='rtl'] .slick-prev:before
|
||||
{
|
||||
content: '→';
|
||||
}
|
||||
|
||||
.slick-next
|
||||
{
|
||||
right: -25px;
|
||||
}
|
||||
[dir='rtl'] .slick-next
|
||||
{
|
||||
right: auto;
|
||||
left: -25px;
|
||||
}
|
||||
.slick-next:before
|
||||
{
|
||||
content: '→';
|
||||
}
|
||||
[dir='rtl'] .slick-next:before
|
||||
{
|
||||
content: '←';
|
||||
}
|
||||
|
||||
/* Dots */
|
||||
.slick-dotted.slick-slider
|
||||
{
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.slick-dots
|
||||
{
|
||||
position: absolute;
|
||||
bottom: -25px;
|
||||
|
||||
display: block;
|
||||
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
list-style: none;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
.slick-dots li
|
||||
{
|
||||
position: relative;
|
||||
|
||||
display: inline-block;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 5px;
|
||||
padding: 0;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
.slick-dots li button
|
||||
{
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
|
||||
display: block;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 5px;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
color: transparent;
|
||||
border: 0;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
}
|
||||
.slick-dots li button:hover,
|
||||
.slick-dots li button:focus
|
||||
{
|
||||
outline: none;
|
||||
}
|
||||
.slick-dots li button:hover:before,
|
||||
.slick-dots li button:focus:before
|
||||
{
|
||||
opacity: 1;
|
||||
}
|
||||
.slick-dots li button:before
|
||||
{
|
||||
font-family: 'slick';
|
||||
font-size: 6px;
|
||||
line-height: 20px;
|
||||
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
content: '•';
|
||||
text-align: center;
|
||||
|
||||
opacity: .25;
|
||||
color: black;
|
||||
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.slick-dots li.slick-active button:before
|
||||
{
|
||||
opacity: .75;
|
||||
color: black;
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
// Default Variables
|
||||
|
||||
@slick-font-path: "./fonts/";
|
||||
@slick-font-family: "slick";
|
||||
@slick-loader-path: "./";
|
||||
@slick-arrow-color: white;
|
||||
@slick-dot-color: black;
|
||||
@slick-dot-color-active: @slick-dot-color;
|
||||
@slick-prev-character: "←";
|
||||
@slick-next-character: "→";
|
||||
@slick-dot-character: "•";
|
||||
@slick-dot-size: 6px;
|
||||
@slick-opacity-default: 0.75;
|
||||
@slick-opacity-on-hover: 1;
|
||||
@slick-opacity-not-active: 0.25;
|
||||
|
||||
/* Slider */
|
||||
.slick-loading .slick-list{
|
||||
background: #fff url('@{slick-loader-path}ajax-loader.gif') center center no-repeat;
|
||||
}
|
||||
|
||||
/* Arrows */
|
||||
.slick-prev,
|
||||
.slick-next {
|
||||
position: absolute;
|
||||
display: block;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
line-height: 0px;
|
||||
font-size: 0px;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
top: 50%;
|
||||
-webkit-transform: translate(0, -50%);
|
||||
-ms-transform: translate(0, -50%);
|
||||
transform: translate(0, -50%);
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
&:hover, &:focus {
|
||||
outline: none;
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
&:before {
|
||||
opacity: @slick-opacity-on-hover;
|
||||
}
|
||||
}
|
||||
&.slick-disabled:before {
|
||||
opacity: @slick-opacity-not-active;
|
||||
}
|
||||
}
|
||||
|
||||
.slick-prev:before, .slick-next:before {
|
||||
font-family: @slick-font-family;
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
color: @slick-arrow-color;
|
||||
opacity: @slick-opacity-default;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
& when ( @slick-font-family = 'slick' ) {
|
||||
/* Icons */
|
||||
@font-face {
|
||||
font-family: 'slick';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
src: url('@{slick-font-path}slick.eot');
|
||||
src: url('@{slick-font-path}slick.eot?#iefix') format('embedded-opentype'), url('@{slick-font-path}slick.woff') format('woff'), url('@{slick-font-path}slick.ttf') format('truetype'), url('@{slick-font-path}slick.svg#slick') format('svg');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slick-prev {
|
||||
left: -25px;
|
||||
[dir="rtl"] & {
|
||||
left: auto;
|
||||
right: -25px;
|
||||
}
|
||||
&:before {
|
||||
content: @slick-prev-character;
|
||||
[dir="rtl"] & {
|
||||
content: @slick-next-character;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slick-next {
|
||||
right: -25px;
|
||||
[dir="rtl"] & {
|
||||
left: -25px;
|
||||
right: auto;
|
||||
}
|
||||
&:before {
|
||||
content: @slick-next-character;
|
||||
[dir="rtl"] & {
|
||||
content: @slick-prev-character;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Dots */
|
||||
|
||||
.slick-dotted .slick-slider {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.slick-dots {
|
||||
position: absolute;
|
||||
bottom: -25px;
|
||||
list-style: none;
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
li {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
margin: 0 5px;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
button {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
display: block;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
outline: none;
|
||||
line-height: 0px;
|
||||
font-size: 0px;
|
||||
color: transparent;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
&:hover, &:focus {
|
||||
outline: none;
|
||||
&:before {
|
||||
opacity: @slick-opacity-on-hover;
|
||||
}
|
||||
}
|
||||
&:before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
content: @slick-dot-character;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-family: @slick-font-family;
|
||||
font-size: @slick-dot-size;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
color: @slick-dot-color;
|
||||
opacity: @slick-opacity-not-active;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
}
|
||||
&.slick-active button:before {
|
||||
color: @slick-dot-color-active;
|
||||
opacity: @slick-opacity-default;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
// Default Variables
|
||||
|
||||
// Slick icon entity codes outputs the following
|
||||
// "\2190" outputs ascii character "←"
|
||||
// "\2192" outputs ascii character "→"
|
||||
// "\2022" outputs ascii character "•"
|
||||
|
||||
$slick-font-path: "./fonts/" !default;
|
||||
$slick-font-family: "slick" !default;
|
||||
$slick-loader-path: "./" !default;
|
||||
$slick-arrow-color: white !default;
|
||||
$slick-dot-color: black !default;
|
||||
$slick-dot-color-active: $slick-dot-color !default;
|
||||
$slick-prev-character: "\2190" !default;
|
||||
$slick-next-character: "\2192" !default;
|
||||
$slick-dot-character: "\2022" !default;
|
||||
$slick-dot-size: 6px !default;
|
||||
$slick-opacity-default: 0.75 !default;
|
||||
$slick-opacity-on-hover: 1 !default;
|
||||
$slick-opacity-not-active: 0.25 !default;
|
||||
|
||||
@function slick-image-url($url) {
|
||||
@if function-exists(image-url) {
|
||||
@return image-url($url);
|
||||
}
|
||||
@else {
|
||||
@return url($slick-loader-path + $url);
|
||||
}
|
||||
}
|
||||
|
||||
@function slick-font-url($url) {
|
||||
@if function-exists(font-url) {
|
||||
@return font-url($url);
|
||||
}
|
||||
@else {
|
||||
@return url($slick-font-path + $url);
|
||||
}
|
||||
}
|
||||
|
||||
/* Slider */
|
||||
|
||||
.slick-list {
|
||||
.slick-loading & {
|
||||
background: #fff slick-image-url("ajax-loader.gif") center center no-repeat;
|
||||
}
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
@if $slick-font-family == "slick" {
|
||||
@font-face {
|
||||
font-family: "slick";
|
||||
src: slick-font-url("slick.eot");
|
||||
src: slick-font-url("slick.eot?#iefix") format("embedded-opentype"), slick-font-url("slick.woff") format("woff"), slick-font-url("slick.ttf") format("truetype"), slick-font-url("slick.svg#slick") format("svg");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
/* Arrows */
|
||||
|
||||
.slick-prev,
|
||||
.slick-next {
|
||||
position: absolute;
|
||||
display: block;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
line-height: 0px;
|
||||
font-size: 0px;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
top: 50%;
|
||||
-webkit-transform: translate(0, -50%);
|
||||
-ms-transform: translate(0, -50%);
|
||||
transform: translate(0, -50%);
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
&:hover, &:focus {
|
||||
outline: none;
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
&:before {
|
||||
opacity: $slick-opacity-on-hover;
|
||||
}
|
||||
}
|
||||
&.slick-disabled:before {
|
||||
opacity: $slick-opacity-not-active;
|
||||
}
|
||||
&:before {
|
||||
font-family: $slick-font-family;
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
color: $slick-arrow-color;
|
||||
opacity: $slick-opacity-default;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
}
|
||||
|
||||
.slick-prev {
|
||||
left: -25px;
|
||||
[dir="rtl"] & {
|
||||
left: auto;
|
||||
right: -25px;
|
||||
}
|
||||
&:before {
|
||||
content: $slick-prev-character;
|
||||
[dir="rtl"] & {
|
||||
content: $slick-next-character;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slick-next {
|
||||
right: -25px;
|
||||
[dir="rtl"] & {
|
||||
left: -25px;
|
||||
right: auto;
|
||||
}
|
||||
&:before {
|
||||
content: $slick-next-character;
|
||||
[dir="rtl"] & {
|
||||
content: $slick-prev-character;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Dots */
|
||||
|
||||
.slick-dotted.slick-slider {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.slick-dots {
|
||||
position: absolute;
|
||||
bottom: -25px;
|
||||
list-style: none;
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
li {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
margin: 0 5px;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
button {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
display: block;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
outline: none;
|
||||
line-height: 0px;
|
||||
font-size: 0px;
|
||||
color: transparent;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
&:hover, &:focus {
|
||||
outline: none;
|
||||
&:before {
|
||||
opacity: $slick-opacity-on-hover;
|
||||
}
|
||||
}
|
||||
&:before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
content: $slick-dot-character;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-family: $slick-font-family;
|
||||
font-size: $slick-dot-size;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
color: $slick-dot-color;
|
||||
opacity: $slick-opacity-not-active;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
}
|
||||
&.slick-active button:before {
|
||||
color: $slick-dot-color-active;
|
||||
opacity: $slick-opacity-default;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
/* Slider */
|
||||
.slick-slider
|
||||
{
|
||||
position: relative;
|
||||
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
-webkit-touch-callout: none;
|
||||
-khtml-user-select: none;
|
||||
-ms-touch-action: pan-y;
|
||||
touch-action: pan-y;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.slick-list
|
||||
{
|
||||
position: relative;
|
||||
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.slick-list:focus
|
||||
{
|
||||
outline: none;
|
||||
}
|
||||
.slick-list.dragging
|
||||
{
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.slick-slider .slick-track,
|
||||
.slick-slider .slick-list
|
||||
{
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.slick-track
|
||||
{
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.slick-track:before,
|
||||
.slick-track:after
|
||||
{
|
||||
display: table;
|
||||
|
||||
content: '';
|
||||
}
|
||||
.slick-track:after
|
||||
{
|
||||
clear: both;
|
||||
}
|
||||
.slick-loading .slick-track
|
||||
{
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.slick-slide
|
||||
{
|
||||
display: none;
|
||||
float: left;
|
||||
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
}
|
||||
[dir='rtl'] .slick-slide
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
.slick-slide img
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
.slick-slide.slick-loading img
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.slick-slide.dragging img
|
||||
{
|
||||
pointer-events: none;
|
||||
}
|
||||
.slick-initialized .slick-slide
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
.slick-loading .slick-slide
|
||||
{
|
||||
visibility: hidden;
|
||||
}
|
||||
.slick-vertical .slick-slide
|
||||
{
|
||||
display: block;
|
||||
|
||||
height: auto;
|
||||
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
.slick-arrow.slick-hidden {
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
/* Slider */
|
||||
|
||||
.slick-slider {
|
||||
position: relative;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-ms-touch-action: pan-y;
|
||||
touch-action: pan-y;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.slick-list {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&.dragging {
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
}
|
||||
.slick-slider .slick-track,
|
||||
.slick-slider .slick-list {
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.slick-track {
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.slick-loading & {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
.slick-slide {
|
||||
float: left;
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
[dir="rtl"] & {
|
||||
float: right;
|
||||
}
|
||||
img {
|
||||
display: block;
|
||||
}
|
||||
&.slick-loading img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
display: none;
|
||||
|
||||
&.dragging img {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.slick-initialized & {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.slick-loading & {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.slick-vertical & {
|
||||
display: block;
|
||||
height: auto;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
}
|
||||
.slick-arrow.slick-hidden {
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
/* Slider */
|
||||
|
||||
.slick-slider {
|
||||
position: relative;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-ms-touch-action: pan-y;
|
||||
touch-action: pan-y;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.slick-list {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&.dragging {
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
}
|
||||
}
|
||||
.slick-slider .slick-track,
|
||||
.slick-slider .slick-list {
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.slick-track {
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.slick-loading & {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
.slick-slide {
|
||||
float: left;
|
||||
height: 100%;
|
||||
min-height: 1px;
|
||||
[dir="rtl"] & {
|
||||
float: right;
|
||||
}
|
||||
img {
|
||||
display: block;
|
||||
}
|
||||
&.slick-loading img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
display: none;
|
||||
|
||||
&.dragging img {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.slick-initialized & {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.slick-loading & {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.slick-vertical & {
|
||||
display: block;
|
||||
height: auto;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
}
|
||||
.slick-arrow.slick-hidden {
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
/**
|
||||
* FILE: jquery.ptTileSelect.css
|
||||
* Default style for the timeselect container.
|
||||
*
|
||||
* LAST UPDATED:
|
||||
*
|
||||
* - $Date: 2009/04/12 20:23:02 $
|
||||
* - $Author: paulinho4u $
|
||||
* - $Revision: 1.1 $
|
||||
*/
|
||||
|
||||
#ptTimeSelectCntr {
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
margin-left: 0;
|
||||
position: absolute;
|
||||
width: 270px !important;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#ptTimeSelectCntr .ui-widget-content {
|
||||
background: #fff none repeat scroll 0 0;
|
||||
border: medium none !important;
|
||||
border-radius: 0;
|
||||
margin-bottom: 0px;
|
||||
margin-top: 0 !important;
|
||||
padding: 5px;
|
||||
}
|
||||
#ptTimeSelectCntr .ui-widget.ui-widget-content {
|
||||
border: 1px solid #ddd !important;
|
||||
}
|
||||
#ptTimeSelectCntr .ui-widget{}
|
||||
#ptTimeSelectCntr .ui-widget-header {
|
||||
background: #1fc055 none repeat scroll 0 0;
|
||||
border: 2px solid #1fc055;
|
||||
border-radius: 0;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
height: 40px;
|
||||
padding: 5px;
|
||||
}
|
||||
#ptTimeSelectCntr #ptTimeSelectUserTime {
|
||||
font-size: larger;
|
||||
line-height: 26px;
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
}
|
||||
#ptTimeSelectCntr .ui-widget-header .ui-icon {
|
||||
background-image: url("images/ui-icons_444444_256x240.png") !important;
|
||||
}
|
||||
|
||||
#ptTimeSelectCntr #ptTimeSelectCloseCntr {
|
||||
display: block;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#ptTimeSelectCntr .ui-widget.ui-widget-content {
|
||||
margin-top: 0;
|
||||
}
|
||||
#ptTimeSelectCntr .ptTimeSelectLeftPane.ui-widget-content {
|
||||
border-top:none;
|
||||
border-bottom:none;
|
||||
border-left:none;
|
||||
border-right-width: 2px;
|
||||
}
|
||||
#ptTimeSelectCntr .ptTimeSelectRightPane.ui-widget-content {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* content style and hover style */
|
||||
#ptTimeSelectCntr .ptTimeSelectHrCntr a,
|
||||
#ptTimeSelectCntr .ptTimeSelectMinCntr a {
|
||||
display: block;
|
||||
float: left;
|
||||
line-height: 32px;
|
||||
margin: 2px;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
transition: all 500ms ease;
|
||||
}
|
||||
#ptTimeSelectCntr .ptTimeSelectHrCntr a:hover,
|
||||
#ptTimeSelectCntr .ptTimeSelectMinCntr a:hover{
|
||||
background: #1fc055 !important;
|
||||
border-color: #1fc055 !important;
|
||||
}
|
||||
|
||||
/* Hour min text style */
|
||||
#ptTimeSelectCntr .ptTimeSelectTimeLabelsCntr {
|
||||
color: #252525;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Cloase button style */
|
||||
#ptTimeSelectCntr #ptTimeSelectCloseCntr a {
|
||||
border-radius: 30%;
|
||||
display: block;
|
||||
height: 25px !important;
|
||||
line-height: 25px;
|
||||
margin: 0 !important;
|
||||
opacity: 1;
|
||||
padding: 3px !important;
|
||||
text-align: center;
|
||||
width: 25px !important;
|
||||
}
|
||||
|
||||
/* am pm content style, hover bg */
|
||||
#ptTimeSelectCntr .ui-state-default {
|
||||
background: #fff !important;
|
||||
border: 1px solid #eaeaea !important;
|
||||
border-radius: 0;
|
||||
color: #252525 !important;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
height: 34px;
|
||||
margin-bottom: 5px;
|
||||
outline: medium none;
|
||||
text-align: center;
|
||||
width: 34px !important;
|
||||
line-height: 33px;
|
||||
margin: 2px;
|
||||
transition: all 500ms ease;
|
||||
}
|
||||
#ptTimeSelectCntr .ui-state-default:hover{
|
||||
background: #1fc055 !important;
|
||||
border-color: #1fc055 !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
|
||||
/* For time set button css */
|
||||
#ptTimeSelectCntr #ptTimeSelectSetButton {
|
||||
padding: 0 15px 5px 0;
|
||||
}
|
||||
#ptTimeSelectSetButton .ui-state-hover{
|
||||
background: #d5ac63 !important;
|
||||
border: 2px solid #252525 !important;
|
||||
border-radius: 0;
|
||||
color: #252525 !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal;
|
||||
height: 35px;
|
||||
width: 70px !important;
|
||||
}
|
||||
#ptTimeSelectCntr #ptTimeSelectSetButton a {
|
||||
display: block;
|
||||
text-align: center;
|
||||
float: right;
|
||||
background: #252525 !important;
|
||||
border: 2px solid #252525 !important;
|
||||
border-radius: 0;
|
||||
color: #fff !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal;
|
||||
height: 35px;
|
||||
width: 70px !important;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
line-height: 32px;
|
||||
text-transform: uppercase;
|
||||
transition: all 500ms ease;
|
||||
}
|
||||
#ptTimeSelectCntr #ptTimeSelectSetButton a:hover{
|
||||
background: #1fc055 !important;
|
||||
border-color: #1fc055 !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,535 @@
|
||||
/**
|
||||
* FILE: jQuery.ptTileSelect.js
|
||||
*
|
||||
* @fileOverview
|
||||
* jQuery plugin for displaying a popup that allows a user
|
||||
* to define a time and set that time back to a form's input
|
||||
* field.
|
||||
*
|
||||
* @version 0.8
|
||||
* @author Paul Tavares, www.purtuga.com
|
||||
* @see http://pttimeselect.sourceforge.net
|
||||
*
|
||||
* @requires jQuery {@link http://www.jquery.com}
|
||||
*
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* Copyright (c) 2007 Paul T. (purtuga.com)
|
||||
* Dual licensed under the:
|
||||
*
|
||||
* - MIT
|
||||
* <http://www.opensource.org/licenses/mit-license.php>
|
||||
*
|
||||
* - GPL
|
||||
* <http://www.opensource.org/licenses/gpl-license.php>
|
||||
*
|
||||
* User can pick whichever one applies best for their project
|
||||
* and doesn not have to contact me.
|
||||
*
|
||||
*
|
||||
* INSTALLATION:
|
||||
*
|
||||
* There are two files (.css and .js) delivered with this plugin and
|
||||
* that must be included in your html page after the jquery.js library
|
||||
* and the jQuery UI style sheet (the jQuery UI javascript library is
|
||||
* not necessary).
|
||||
* Both of these are to be included inside of the 'head' element of
|
||||
* the document. Example below demonstrates this along side the jQuery
|
||||
* libraries.
|
||||
*
|
||||
* | <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
|
||||
* | <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/themes/redmond/jquery-ui.css" />
|
||||
* |
|
||||
* | <link rel="stylesheet" type="text/css" href="jquery.ptTimeSelect.css" />
|
||||
* | <script type="text/javascript" src="jquery.ptTimeSelect.js"></script>
|
||||
* |
|
||||
*
|
||||
* USAGE:
|
||||
*
|
||||
* - See <$(ele).ptTimeSelect()>
|
||||
*
|
||||
*
|
||||
*
|
||||
* LAST UPDATED:
|
||||
*
|
||||
* - $Date: 2012/08/05 19:40:21 $
|
||||
* - $Author: paulinho4u $
|
||||
* - $Revision: 1.8 $
|
||||
*
|
||||
*/
|
||||
|
||||
(function($){
|
||||
|
||||
/**
|
||||
* jQuery definition
|
||||
*
|
||||
* @see http://jquery.com/
|
||||
* @name jQuery
|
||||
* @class jQuery Library
|
||||
*/
|
||||
|
||||
/**
|
||||
* jQuery 'fn' definition to anchor all public plugin methods.
|
||||
*
|
||||
* @see http://jquery.com/
|
||||
* @name fn
|
||||
* @class jQuery Library public method anchor
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
|
||||
/**
|
||||
* Namespace for all properties and methods
|
||||
*
|
||||
* @namespace ptTimeSelect
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
jQuery.ptTimeSelect = {};
|
||||
jQuery.ptTimeSelect.version = "__BUILD_VERSION_NUMBER__";
|
||||
|
||||
/**
|
||||
* The default options for all calls to ptTimeSelect. Can be
|
||||
* overwriten with each individual call to {@link jQuery.fn.ptTimeSelect}
|
||||
*
|
||||
* @type {Object} options
|
||||
* @memberOf jQuery.ptTimeSelect
|
||||
* @see jQuery.fn.ptTimeSelect
|
||||
*/
|
||||
jQuery.ptTimeSelect.options = {
|
||||
containerClass: undefined,
|
||||
containerWidth: '22em',
|
||||
hoursLabel: 'Hour',
|
||||
minutesLabel: 'Minutes',
|
||||
setButtonLabel: 'Set',
|
||||
popupImage: undefined,
|
||||
onFocusDisplay: true,
|
||||
zIndex: 10,
|
||||
onBeforeShow: undefined,
|
||||
onClose: undefined
|
||||
};
|
||||
|
||||
/**
|
||||
* Internal method. Called when page is initialized to add the time
|
||||
* selection area to the DOM.
|
||||
*
|
||||
* @private
|
||||
* @memberOf jQuery.ptTimeSelect
|
||||
* @return {undefined}
|
||||
*/
|
||||
jQuery.ptTimeSelect._ptTimeSelectInit = function () {
|
||||
jQuery(document).ready(
|
||||
function () {
|
||||
//if the html is not yet created in the document, then do it now
|
||||
if (!jQuery('#ptTimeSelectCntr').length) {
|
||||
jQuery("body").append(
|
||||
'<div id="ptTimeSelectCntr" class="">'
|
||||
+ ' <div class="ui-widget ui-widget-content ui-corner-all">'
|
||||
+ ' <div class="ui-widget-header ui-corner-all">'
|
||||
+ ' <div id="ptTimeSelectCloseCntr" style="float: right;">'
|
||||
+ ' <a href="javascript: void(0);" onclick="jQuery.ptTimeSelect.closeCntr();" '
|
||||
+ ' onmouseover="jQuery(this).removeClass(\'ui-state-default\').addClass(\'ui-state-hover\');" '
|
||||
+ ' onmouseout="jQuery(this).removeClass(\'ui-state-hover\').addClass(\'ui-state-default\');"'
|
||||
+ ' class="ui-corner-all ui-state-default">'
|
||||
+ ' <span class="ui-icon ui-icon-circle-close">X</span>'
|
||||
+ ' </a>'
|
||||
+ ' </div>'
|
||||
+ ' <div id="ptTimeSelectUserTime" style="float: left;">'
|
||||
+ ' <span id="ptTimeSelectUserSelHr">1</span> : '
|
||||
+ ' <span id="ptTimeSelectUserSelMin">00</span> '
|
||||
+ ' <span id="ptTimeSelectUserSelAmPm">AM</span>'
|
||||
+ ' </div>'
|
||||
+ ' <br style="clear: both;" /><div></div>'
|
||||
+ ' </div>'
|
||||
+ ' <div class="ui-widget-content ui-corner-all">'
|
||||
+ ' <div>'
|
||||
+ ' <div class="ptTimeSelectTimeLabelsCntr">'
|
||||
+ ' <div class="ptTimeSelectLeftPane" style="width: 50%; text-align: center; float: left;" class="">Hour</div>'
|
||||
+ ' <div class="ptTimeSelectRightPane" style="width: 50%; text-align: center; float: left;">Minutes</div>'
|
||||
+ ' </div>'
|
||||
+ ' <div>'
|
||||
+ ' <div style="float: left; width: 50%;">'
|
||||
+ ' <div class="ui-widget-content ptTimeSelectLeftPane">'
|
||||
+ ' <div class="ptTimeSelectHrAmPmCntr">'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);" '
|
||||
+ ' style="display: block; width: 45%; float: left;">AM</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);" '
|
||||
+ ' style="display: block; width: 45%; float: left;">PM</a>'
|
||||
+ ' <br style="clear: left;" /><div></div>'
|
||||
+ ' </div>'
|
||||
+ ' <div class="ptTimeSelectHrCntr">'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">1</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">2</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">3</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">4</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">5</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">6</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">7</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">8</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">9</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">10</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">11</a>'
|
||||
+ ' <a class="ptTimeSelectHr ui-state-default" href="javascript: void(0);">12</a>'
|
||||
+ ' <br style="clear: left;" /><div></div>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ ' <div style="width: 50%; float: left;">'
|
||||
+ ' <div class="ui-widget-content ptTimeSelectRightPane">'
|
||||
+ ' <div class="ptTimeSelectMinCntr">'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">00</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">05</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">10</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">15</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">20</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">25</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">30</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">35</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">40</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">45</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">50</a>'
|
||||
+ ' <a class="ptTimeSelectMin ui-state-default" href="javascript: void(0);">55</a>'
|
||||
+ ' <br style="clear: left;" /><div></div>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ ' </div>'
|
||||
+ ' <div style="clear: left;"></div>'
|
||||
+ ' </div>'
|
||||
+ ' <div id="ptTimeSelectSetButton">'
|
||||
+ ' <a href="javascript: void(0);" onclick="jQuery.ptTimeSelect.setTime()"'
|
||||
+ ' onmouseover="jQuery(this).removeClass(\'ui-state-default\').addClass(\'ui-state-hover\');" '
|
||||
+ ' onmouseout="jQuery(this).removeClass(\'ui-state-hover\').addClass(\'ui-state-default\');"'
|
||||
+ ' class="ui-corner-all ui-state-default">'
|
||||
+ ' SET'
|
||||
+ ' </a>'
|
||||
+ ' <br style="clear: both;" /><div></div>'
|
||||
+ ' </div>'
|
||||
+ ' <!--[if lte IE 6.5]>'
|
||||
+ ' <iframe style="display:block; position:absolute;top: 0;left:0;z-index:-1;'
|
||||
+ ' filter:Alpha(Opacity=\'0\');width:3000px;height:3000px"></iframe>'
|
||||
+ ' <![endif]-->'
|
||||
+ ' </div></div>'
|
||||
);
|
||||
|
||||
var e = jQuery('#ptTimeSelectCntr');
|
||||
|
||||
// Add the events to the functions
|
||||
e.find('.ptTimeSelectMin')
|
||||
.bind("click", function(){
|
||||
jQuery.ptTimeSelect.setMin($(this).text());
|
||||
});
|
||||
|
||||
e.find('.ptTimeSelectHr')
|
||||
.bind("click", function(){
|
||||
jQuery.ptTimeSelect.setHr($(this).text());
|
||||
});
|
||||
|
||||
$(document).mousedown(jQuery.ptTimeSelect._doCheckMouseClick);
|
||||
}//end if
|
||||
}
|
||||
);
|
||||
}();// jQuery.ptTimeSelectInit()
|
||||
|
||||
|
||||
/**
|
||||
* Sets the hour selected by the user on the popup.
|
||||
*
|
||||
* @private
|
||||
* @param {Integer} h - Interger indicating the hour. This value
|
||||
* is the same as the text value displayed on the
|
||||
* popup under the hour. This value can also be the
|
||||
* words AM or PM.
|
||||
* @return {undefined}
|
||||
*
|
||||
*/
|
||||
jQuery.ptTimeSelect.setHr = function(h) {
|
||||
if ( h.toLowerCase() == "am"
|
||||
|| h.toLowerCase() == "pm"
|
||||
) {
|
||||
jQuery('#ptTimeSelectUserSelAmPm').empty().append(h);
|
||||
} else {
|
||||
jQuery('#ptTimeSelectUserSelHr').empty().append(h);
|
||||
}
|
||||
};// END setHr() function
|
||||
|
||||
/**
|
||||
* Sets the minutes selected by the user on the popup.
|
||||
*
|
||||
* @private
|
||||
* @param {Integer} m - interger indicating the minutes. This
|
||||
* value is the same as the text value displayed on the popup
|
||||
* under the minutes.
|
||||
* @return {undefined}
|
||||
*/
|
||||
jQuery.ptTimeSelect.setMin = function(m) {
|
||||
jQuery('#ptTimeSelectUserSelMin').empty().append(m);
|
||||
};// END setMin() function
|
||||
|
||||
/**
|
||||
* Takes the time defined by the user and sets it to the input
|
||||
* element that the popup is currently opened for.
|
||||
*
|
||||
* @private
|
||||
* @return {undefined}
|
||||
*/
|
||||
jQuery.ptTimeSelect.setTime = function() {
|
||||
var tSel = jQuery('#ptTimeSelectUserSelHr').text()
|
||||
+ ":"
|
||||
+ jQuery('#ptTimeSelectUserSelMin').text()
|
||||
+ " "
|
||||
+ jQuery('#ptTimeSelectUserSelAmPm').text();
|
||||
|
||||
var i = jQuery(".isPtTimeSelectActive");
|
||||
|
||||
if(i.attr('type') == 'time'){
|
||||
i.val(jQuery.ptTimeSelect.convertFromAMPM(tSel));
|
||||
}else{
|
||||
i.val(tSel);
|
||||
}
|
||||
|
||||
i.trigger('change');
|
||||
|
||||
this.closeCntr();
|
||||
|
||||
};// END setTime() function
|
||||
|
||||
/**
|
||||
* Converts a 24 hours formated time into a 12 hours formated time
|
||||
*
|
||||
*
|
||||
* @private
|
||||
* @return {undefined}
|
||||
*/
|
||||
jQuery.ptTimeSelect.convertFrom24 = function(time) {
|
||||
// Check correct time format and split into components
|
||||
time = time.toString ().match (/^([01]\d|2[0-3])(:)([0-5]\d)(:[0-5]\d)?$/) || [time];
|
||||
if (time.length > 1) { // If time format correct
|
||||
time = time.slice (1); // Remove full string match value
|
||||
time[5] = +time[0] < 12 ? ' AM' : ' PM'; // Set AM/PM
|
||||
time[0] = +time[0] % 12 || 12; // Adjust hours
|
||||
}
|
||||
return time.join (''); // return adjusted time or original string
|
||||
};// END convertFrom24() function
|
||||
|
||||
/**
|
||||
* Converts a 12 hours formated time into a 24 hours formated time
|
||||
*
|
||||
*
|
||||
* @private
|
||||
* @return {undefined}
|
||||
*/
|
||||
jQuery.ptTimeSelect.convertFromAMPM = function(time){
|
||||
|
||||
var hours = Number(time.match(/^(\d+)/)[1]);
|
||||
var minutes = Number(time.match(/:(\d+)/)[1]);
|
||||
var AMPM = time.match(/\s(.*)$/)[1];
|
||||
if(AMPM == "PM" && hours<12) hours = hours+12;
|
||||
if(AMPM == "AM" && hours==12) hours = hours-12;
|
||||
var sHours = hours.toString();
|
||||
var sMinutes = minutes.toString();
|
||||
if(hours<10) sHours = "0" + sHours;
|
||||
if(minutes<10) sMinutes = "0" + sMinutes;
|
||||
return sHours + ":" + sMinutes;
|
||||
};// END convertFromAMPM() function
|
||||
|
||||
/**
|
||||
* Displays the time definition area on the page, right below
|
||||
* the input field. Also sets the custom colors/css on the
|
||||
* displayed area to what ever the input element options were
|
||||
* set with.
|
||||
*
|
||||
* @private
|
||||
* @param {String} uId - Id of the element for whom the area will
|
||||
* be displayed. This ID was created when the
|
||||
* ptTimeSelect() method was called.
|
||||
* @return {undefined}
|
||||
*
|
||||
*/
|
||||
jQuery.ptTimeSelect.openCntr = function (ele) {
|
||||
jQuery.ptTimeSelect.closeCntr();
|
||||
jQuery(".isPtTimeSelectActive").removeClass("isPtTimeSelectActive");
|
||||
var cntr = jQuery("#ptTimeSelectCntr");
|
||||
var i = jQuery(ele).eq(0).addClass("isPtTimeSelectActive");
|
||||
var opt = i.data("ptTimeSelectOptions");
|
||||
var style = i.offset();
|
||||
var time = '';
|
||||
style['z-index'] = opt.zIndex;
|
||||
style.top = (style.top + i.outerHeight());
|
||||
if (opt.containerWidth) {
|
||||
style.width = opt.containerWidth;
|
||||
}
|
||||
if (opt.containerClass) {
|
||||
cntr.addClass(opt.containerClass);
|
||||
}
|
||||
cntr.css(style);
|
||||
|
||||
if(i.attr('type') == 'time'){
|
||||
time = jQuery.ptTimeSelect.convertFrom24(i.val());
|
||||
}else{
|
||||
time = i.val();
|
||||
}
|
||||
|
||||
var hr = 1;
|
||||
var min = '00';
|
||||
var tm = 'AM';
|
||||
if (time) {
|
||||
var re = /([0-9]{1,2}).*:.*([0-9]{2}).*(PM|AM)/i;
|
||||
var match = re.exec(time);
|
||||
if (match) {
|
||||
hr = match[1] || 1;
|
||||
min = match[2] || '00';
|
||||
tm = match[3] || 'AM';
|
||||
}
|
||||
}
|
||||
cntr.find("#ptTimeSelectUserSelHr").empty().append(hr);
|
||||
cntr.find("#ptTimeSelectUserSelMin").empty().append(min);
|
||||
cntr.find("#ptTimeSelectUserSelAmPm").empty().append(tm);
|
||||
cntr.find(".ptTimeSelectTimeLabelsCntr .ptTimeSelectLeftPane")
|
||||
.empty().append(opt.hoursLabel);
|
||||
cntr.find(".ptTimeSelectTimeLabelsCntr .ptTimeSelectRightPane")
|
||||
.empty().append(opt.minutesLabel);
|
||||
cntr.find("#ptTimeSelectSetButton a").empty().append(opt.setButtonLabel);
|
||||
if (opt.onBeforeShow) {
|
||||
opt.onBeforeShow(i, cntr);
|
||||
}
|
||||
cntr.slideDown("fast");
|
||||
|
||||
};// END openCntr()
|
||||
|
||||
/**
|
||||
* Closes (hides it) the popup container.
|
||||
* @private
|
||||
* @param {Object} i - Optional. The input field for which the
|
||||
* container is being closed.
|
||||
* @return {undefined}
|
||||
*/
|
||||
jQuery.ptTimeSelect.closeCntr = function(i) {
|
||||
var e = $("#ptTimeSelectCntr");
|
||||
if (e.is(":visible") == true) {
|
||||
|
||||
// If IE, then check to make sure it is realy visible
|
||||
if (jQuery.support.tbody == false) {
|
||||
if (!(e[0].offsetWidth > 0) && !(e[0].offsetHeight > 0) ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
jQuery('#ptTimeSelectCntr')
|
||||
.css("display", "none")
|
||||
.removeClass()
|
||||
.css("width", "");
|
||||
if (!i) {
|
||||
i = $(".isPtTimeSelectActive");
|
||||
}
|
||||
if (i) {
|
||||
var opt = i.removeClass("isPtTimeSelectActive")
|
||||
.data("ptTimeSelectOptions");
|
||||
if (opt && opt.onClose) {
|
||||
opt.onClose(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
};//end closeCntr()
|
||||
|
||||
/**
|
||||
* Closes the timePicker popup if user is not longer focused on the
|
||||
* input field or the timepicker
|
||||
*
|
||||
* @private
|
||||
* @param {jQueryEvent} ev - Event passed in by jQuery
|
||||
* @return {undefined}
|
||||
*/
|
||||
jQuery.ptTimeSelect._doCheckMouseClick = function(ev){
|
||||
if (!$("#ptTimeSelectCntr:visible").length) {
|
||||
return;
|
||||
}
|
||||
if ( !jQuery(ev.target).closest("#ptTimeSelectCntr").length
|
||||
&& jQuery(ev.target).not("input.isPtTimeSelectActive").length ){
|
||||
jQuery.ptTimeSelect.closeCntr();
|
||||
}
|
||||
|
||||
};// jQuery.ptTimeSelect._doCheckMouseClick
|
||||
|
||||
/**
|
||||
* FUNCTION: $().ptTimeSelect()
|
||||
* Attaches a ptTimeSelect widget to each matched element. Matched
|
||||
* elements must be input fields that accept a values (input field).
|
||||
* Each element, when focused upon, will display a time selection
|
||||
* popoup where the user can define a time.
|
||||
*
|
||||
* @memberOf jQuery
|
||||
*
|
||||
* PARAMS:
|
||||
*
|
||||
* @param {Object} [opt] - An object with the options for the time selection widget.
|
||||
*
|
||||
* @param {String} [opt.containerClass=""] - A class to be associated with the popup widget.
|
||||
*
|
||||
* @param {String} [opt.containerWidth=""] - Css width for the container.
|
||||
*
|
||||
* @param {String} [opt.hoursLabel="Hours"] - Label for the Hours.
|
||||
*
|
||||
* @param {String} [opt.minutesLabel="Minutes"] - Label for the Mintues container.
|
||||
*
|
||||
* @param {String} [opt.setButtonLabel="Set"] - Label for the Set button.
|
||||
*
|
||||
* @param {String} [opt.popupImage=""] - The html element (ex. img or text) to be appended next to each
|
||||
* input field and that will display the time select widget upon
|
||||
* click.
|
||||
*
|
||||
* @param {Integer} [opt.zIndex=10] - Integer for the popup widget z-index.
|
||||
*
|
||||
* @param {Function} [opt.onBeforeShow=undefined] - Function to be called before the widget is made visible to the
|
||||
* user. Function is passed 2 arguments: 1) the input field as a
|
||||
* jquery object and 2) the popup widget as a jquery object.
|
||||
*
|
||||
* @param {Function} [opt.onClose=undefined] - Function to be called after closing the popup widget. Function
|
||||
* is passed 1 argument: the input field as a jquery object.
|
||||
*
|
||||
* @param {Bollean} [opt.onFocusDisplay=true] - True or False indicating if popup is auto displayed upon focus
|
||||
* of the input field.
|
||||
*
|
||||
*
|
||||
* RETURN:
|
||||
* @return {jQuery} selection
|
||||
*
|
||||
*
|
||||
*
|
||||
* EXAMPLE:
|
||||
* @example
|
||||
* $('#fooTime').ptTimeSelect();
|
||||
*
|
||||
*/
|
||||
jQuery.fn.ptTimeSelect = function (opt) {
|
||||
return this.each(function(){
|
||||
if(this.nodeName.toLowerCase() != 'input') return;
|
||||
var e = jQuery(this);
|
||||
if (e.hasClass('hasPtTimeSelect')){
|
||||
return this;
|
||||
}
|
||||
var thisOpt = {};
|
||||
thisOpt = $.extend(thisOpt, jQuery.ptTimeSelect.options, opt);
|
||||
e.addClass('hasPtTimeSelect').data("ptTimeSelectOptions", thisOpt);
|
||||
|
||||
//Wrap the input field in a <div> element with
|
||||
// a unique id for later referencing.
|
||||
if (thisOpt.popupImage || !thisOpt.onFocusDisplay) {
|
||||
var img = jQuery('<span> </span><a href="javascript:" onclick="' +
|
||||
'jQuery.ptTimeSelect.openCntr(jQuery(this).data(\'ptTimeSelectEle\'));">' +
|
||||
thisOpt.popupImage + '</a>'
|
||||
)
|
||||
.data("ptTimeSelectEle", e);
|
||||
e.after(img);
|
||||
}
|
||||
if (thisOpt.onFocusDisplay){
|
||||
e.focus(function(){
|
||||
jQuery.ptTimeSelect.openCntr(this);
|
||||
});
|
||||
}
|
||||
return this;
|
||||
});
|
||||
};// End of jQuery.fn.ptTimeSelect
|
||||
|
||||
})(jQuery);
|
||||