Permalink
Browse files

Get the assets in the repo, proper display for stuck/selected

  • Loading branch information...
1 parent 3efbf0a commit 66b611b554cc1493df1c795c759b41f5a8934239 @kneath committed Oct 19, 2008
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -114,13 +114,13 @@ div.timeframe_calendar table {
cursor: col-resize;
}
div.timeframe_calendar tbody td.startrange {
- background-image: url(../images/start.png);
+ background-image: url(images/start.png);
}
div.timeframe_calendar tbody td.endrange {
- background-image: url(../images/end.png);
+ background-image: url(images/end.png);
}
div.timeframe_calendar tbody td.startendrange {
- background-image: url(../images/startend.png);
+ background-image: url(images/startend.png);
}
/* Today */
div.timeframe_calendar tbody td.today {
@@ -159,7 +159,7 @@ div.timeframe_calendar table {
width: 0;
}
div.timeframe_calendar tbody td span.clear span {
- background-image: url(../images/closebox.png);
+ background-image: url(images/closebox.png);
cursor: pointer;
display: block;
height: 30px;
@@ -170,5 +170,5 @@ div.timeframe_calendar table {
width: 30px;
}
div.timeframe_calendar tbody td span.clear span.active {
- background-image: url(../images/closebox_selected.png);
+ background-image: url(images/closebox_selected.png);
}
View
@@ -234,6 +234,12 @@ var Timeframe = new Class({
handleRangeChange: function(){
this.element.getElements('td').each(function(td){
td.set('class', td.retrieve('baseClass'));
+
+ // Did we just create a singlular range?
+ if (this.range.get('start') != null && this.range.get('end') == null){
+ if (td.retrieve('date') == this.range.get('start')) td.addClass('startendrange')
+ return;
+ }
// Are we inside the range?
if (td.retrieve('date') < this.range.get('start') || td.retrieve('date') > this.range.get('end')) return;
@@ -277,6 +283,8 @@ Timeframe.Events = {
var el;
// Are we clicking/dragging a date?
if (el = element.hasClass('selectable') ? element : element.getParent('td.selectable')){
+ // Clear the range if we're clicking to make a new range
+ if (!this.isDragging && this.range.get('start') != null && this.range.get('end') != null) this.range.empty();
this.isMouseDown = this.isDragging = true;
this.markEndPoint(el.retrieve('date'));
}
@@ -296,6 +304,7 @@ Timeframe.Events = {
handleMouseUp: function(event){
this.isMouseDown = false;
this.isDragging = false;
+ this.fireEvent('rangeChange');
},
// Handles when a field gains focus

0 comments on commit 66b611b

Please sign in to comment.