Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/accordion.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.6.3 - Accordion
* # Semantic UI 2.6.4 - Accordion
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down
2 changes: 1 addition & 1 deletion components/accordion.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.6.3 - Accordion
* # Semantic UI 2.6.4 - Accordion
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down
2 changes: 1 addition & 1 deletion components/accordion.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/ad.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.6.3 - Ad
* # Semantic UI 2.6.4 - Ad
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down
2 changes: 1 addition & 1 deletion components/ad.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/api.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.6.3 - API
* # Semantic UI 2.6.4 - API
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down
2 changes: 1 addition & 1 deletion components/breadcrumb.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.6.3 - Breadcrumb
* # Semantic UI 2.6.4 - Breadcrumb
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down
2 changes: 1 addition & 1 deletion components/breadcrumb.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 47 additions & 21 deletions components/button.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.6.3 - Button
* # Semantic UI 2.6.4 - Button
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down Expand Up @@ -424,8 +424,8 @@
-ms-flex-align: center;
align-items: center;
margin: 0px 0px 0px -1px !important;
padding: '';
font-size: 1em;
padding: '';
border-color: rgba(34, 36, 38, 0.15);
}

Expand Down Expand Up @@ -482,20 +482,20 @@

/* Twitter */
.ui.twitter.button {
background-color: #55ACEE;
background-color: #1DA1F2;
color: #FFFFFF;
text-shadow: none;
background-image: none;
-webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
}
.ui.twitter.button:hover {
background-color: #35a2f4;
background-color: #0298f3;
color: #FFFFFF;
text-shadow: none;
}
.ui.twitter.button:active {
background-color: #2795e9;
background-color: #0c85d0;
color: #FFFFFF;
text-shadow: none;
}
Expand All @@ -522,17 +522,17 @@

/* Linked In */
.ui.linkedin.button {
background-color: #1F88BE;
background-color: #0077B5;
color: #FFFFFF;
text-shadow: none;
}
.ui.linkedin.button:hover {
background-color: #147baf;
background-color: #00669c;
color: #FFFFFF;
text-shadow: none;
}
.ui.linkedin.button:active {
background-color: #186992;
background-color: #005582;
color: #FFFFFF;
text-shadow: none;
}
Expand Down Expand Up @@ -599,18 +599,52 @@

/* VK */
.ui.vk.button {
background-color: #4D7198;
background-color: #45668E;
color: #FFFFFF;
background-image: none;
-webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
}
.ui.vk.button:hover {
background-color: #41648a;
background-color: #395980;
color: #FFFFFF;
}
.ui.vk.button:active {
background-color: #3c5876;
background-color: #344d6c;
color: #FFFFFF;
}

/* WhatsApp */
.ui.whatsapp.button {
background-color: #25D366;
color: #FFFFFF;
background-image: none;
-webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
}
.ui.whatsapp.button:hover {
background-color: #19c55a;
color: #FFFFFF;
}
.ui.whatsapp.button:active {
background-color: #1da851;
color: #FFFFFF;
}

/* Telegram */
.ui.telegram.button {
background-color: #0088CC;
color: #FFFFFF;
background-image: none;
-webkit-box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
}
.ui.telegram.button:hover {
background-color: #0077b3;
color: #FFFFFF;
}
.ui.telegram.button:active {
background-color: #006699;
color: #FFFFFF;
}

Expand Down Expand Up @@ -900,8 +934,6 @@
}
.ui.basic.vertical.buttons .button {
border-left: none;
}
.ui.basic.vertical.buttons .button {
border-left-width: 0px;
border-top: 1px solid rgba(34, 36, 38, 0.15);
}
Expand Down Expand Up @@ -965,6 +997,8 @@
.ui.labeled.icon.buttons > .button > .icon,
.ui.labeled.icon.button > .icon {
position: absolute;
top: 0em;
left: 0em;
height: 100%;
line-height: 1;
border-radius: 0px;
Expand All @@ -979,13 +1013,6 @@
box-shadow: -1px 0px 0px 0px transparent inset;
}

/* Left Labeled */
.ui.labeled.icon.buttons > .button > .icon,
.ui.labeled.icon.button > .icon {
top: 0em;
left: 0em;
}

/* Right Labeled */
.ui[class*="right labeled"].icon.button {
padding-right: 4.07142857em !important;
Expand Down Expand Up @@ -4439,7 +4466,6 @@
-webkit-box-flex: 1;
-ms-flex: 1 0 auto;
flex: 1 0 auto;
margin: 0em;
border-radius: 0em;
margin: 0px 0px 0px 0px;
}
Expand Down
4 changes: 2 additions & 2 deletions components/button.min.css

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions components/calendar.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.6.3 - Calendar
* # Semantic UI 2.6.4 - Calendar
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down Expand Up @@ -75,9 +75,6 @@
.ui.calendar .ui.table tr th .icon {
margin: 0;
}
.ui.calendar .ui.table tr th .icon {
margin: 0;
}
.ui.calendar .ui.table tr:first-child th {
position: relative;
padding-left: 0;
Expand Down Expand Up @@ -108,7 +105,8 @@
right: 0;
}
.ui.calendar .ui.table tr .disabled {
pointer-events: none;
pointer-events: auto;
cursor: default;
color: rgba(40, 40, 40, 0.3);
}

Expand Down
91 changes: 64 additions & 27 deletions components/calendar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.6.3 - Calendar
* # Semantic UI 2.6.4 - Calendar
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down Expand Up @@ -216,6 +216,7 @@ $.fn.calendar = function(parameters) {
var pages = isDay ? multiMonth : 1;

var container = $container;
var tooltipPosition = container.hasClass("left") ? "right center" : "left center";
container.empty();
if (pages > 1) {
pageGrid = $('<div/>').addClass(className.grid).appendTo(container);
Expand Down Expand Up @@ -315,7 +316,14 @@ $.fn.calendar = function(parameters) {
cell.text(cellText);
cell.data(metadata.date, cellDate);
var adjacent = isDay && cellDate.getMonth() !== ((month + 12) % 12);
var disabled = adjacent || !module.helper.isDateInRange(cellDate, mode) || settings.isDisabled(cellDate, mode);
var disabled = adjacent || !module.helper.isDateInRange(cellDate, mode) || settings.isDisabled(cellDate, mode) || module.helper.isDisabled(cellDate, mode);
if (disabled) {
var disabledReason = module.helper.disabledReason(cellDate, mode);
if (disabledReason !== null) {
cell.attr("data-tooltip", disabledReason[metadata.message]);
cell.attr("data-position", tooltipPosition);
}
}
var active = module.helper.dateEqual(cellDate, date, mode);
var isToday = module.helper.dateEqual(cellDate, today, mode);
cell.toggleClass(className.adjacentCell, adjacent);
Expand Down Expand Up @@ -378,7 +386,7 @@ $.fn.calendar = function(parameters) {
var inRange = !rangeDate ? false :
((!!startDate && module.helper.isDateInRange(cellDate, mode, startDate, rangeDate)) ||
(!!endDate && module.helper.isDateInRange(cellDate, mode, rangeDate, endDate)));
cell.toggleClass(className.focusCell, focused && (!isTouch || isTouchDown) && !adjacent);
cell.toggleClass(className.focusCell, focused && (!isTouch || isTouchDown) && !adjacent && !disabled);
cell.toggleClass(className.rangeCell, inRange && !active && !disabled);
});
}
Expand Down Expand Up @@ -446,6 +454,9 @@ $.fn.calendar = function(parameters) {
event.stopPropagation();
isTouchDown = false;
var target = $(event.target);
if (target.hasClass("disabled")) {
return;
}
var parent = target.parent();
if (parent.data(metadata.date) || parent.data(metadata.focusDate) || parent.data(metadata.mode)) {
//clicked on a child element, switch to parent (used when clicking directly on prev/next <i> icon element)
Expand Down Expand Up @@ -495,7 +506,7 @@ $.fn.calendar = function(parameters) {
//enter
var mode = module.get.mode();
var date = module.get.focusDate();
if (date && !settings.isDisabled(date, mode)) {
if (date && !settings.isDisabled(date, mode) && !module.helper.isDisabled(date, mode)) {
module.selectDate(date);
}
//disable form submission:
Expand Down Expand Up @@ -789,6 +800,29 @@ $.fn.calendar = function(parameters) {
},

helper: {
isDisabled: function(date, mode) {
return mode === 'day' && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
if (d instanceof Date) {
return module.helper.dateEqual(date, d, mode);
}
if (d !== null && typeof d === 'object') {
return module.helper.dateEqual(date, d[metadata.date], mode);
}
}));
},
disabledReason: function(date, mode) {
if (mode === 'day') {
for (var i = 0; i < settings.disabledDates.length; i++) {
var d = settings.disabledDates[i];
if (d !== null && typeof d === 'object' && module.helper.dateEqual(date, d[metadata.date], mode)) {
var reason = {};
reason[metadata.message] = d[metadata.message];
return reason;
}
}
}
return null;
},
sanitiseDate: function (date) {
if (!date) {
return undefined;
Expand Down Expand Up @@ -1051,28 +1085,30 @@ $.fn.calendar.settings = {
verbose: false,
performance: false,

type : 'datetime', // picker type, can be 'datetime', 'date', 'time', 'month', or 'year'
firstDayOfWeek : 0, // day for first day column (0 = Sunday)
constantHeight : true, // add rows to shorter months to keep day calendar height consistent (6 rows)
today : false, // show a 'today/now' button at the bottom of the calendar
closable : true, // close the popup after selecting a date/time
monthFirst : true, // month before day when parsing/converting date from/to text
touchReadonly : true, // set input to readonly on touch devices
inline : false, // create the calendar inline instead of inside a popup
on : null, // when to show the popup (defaults to 'focus' for input, 'click' for others)
initialDate : null, // date to display initially when no date is selected (null = now)
startMode : false, // display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day')
minDate : null, // minimum date/time that can be selected, dates/times before are disabled
maxDate : null, // maximum date/time that can be selected, dates/times after are disabled
ampm : true, // show am/pm in time mode
disableYear : false, // disable year selection mode
disableMonth : false, // disable month selection mode
disableMinute : false, // disable minute selection mode
formatInput : true, // format the input text upon input blur and module creation
startCalendar : null, // jquery object or selector for another calendar that represents the start date of a date range
endCalendar : null, // jquery object or selector for another calendar that represents the end date of a date range
multiMonth : 1, // show multiple months when in 'day' mode
showWeekNumbers: null, // show Number of Week at the very first column of a dayView
type : 'datetime', // picker type, can be 'datetime', 'date', 'time', 'month', or 'year'
firstDayOfWeek : 0, // day for first day column (0 = Sunday)
constantHeight : true, // add rows to shorter months to keep day calendar height consistent (6 rows)
today : false, // show a 'today/now' button at the bottom of the calendar
closable : true, // close the popup after selecting a date/time
monthFirst : true, // month before day when parsing/converting date from/to text
touchReadonly : true, // set input to readonly on touch devices
inline : false, // create the calendar inline instead of inside a popup
on : null, // when to show the popup (defaults to 'focus' for input, 'click' for others)
initialDate : null, // date to display initially when no date is selected (null = now)
startMode : false, // display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day')
minDate : null, // minimum date/time that can be selected, dates/times before are disabled
maxDate : null, // maximum date/time that can be selected, dates/times after are disabled
ampm : true, // show am/pm in time mode
disableYear : false, // disable year selection mode
disableMonth : false, // disable month selection mode
disableMinute : false, // disable minute selection mode
formatInput : true, // format the input text upon input blur and module creation
startCalendar : null, // jquery object or selector for another calendar that represents the start date of a date range
endCalendar : null, // jquery object or selector for another calendar that represents the end date of a date range
multiMonth : 1, // show multiple months when in 'day' mode
showWeekNumbers : null, // show Number of Week at the very first column of a dayView
disabledDates : [], // specific day(s) which won't be selectable and contain additional information.
disabledDaysOfWeek : [], // day(s) which won't be selectable(s) (0 = Sunday)
// popup options ('popup', 'on', 'hoverable', and show/hide callbacks are overridden)
popupOptions: {
position: 'bottom left',
Expand Down Expand Up @@ -1432,7 +1468,8 @@ $.fn.calendar.settings = {
minDate: 'minDate',
maxDate: 'maxDate',
mode: 'mode',
monthOffset: 'monthOffset'
monthOffset: 'monthOffset',
message: 'message'
}
};

Expand Down
Loading