Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

some more view defaults

- oneDayHead => at Day-View Header seems like repitition
- monthHead => show Month-Header or just add day to dates
- markAllDays =>  add day to all dates ?
- add 3dayView
  • Loading branch information...
commit e082bea4e344a9fc4478c1963429cef5e2d3331e 1 parent b9463ce
@twetzel authored
Showing with 461 additions and 61 deletions.
  1. +1 −0  Gemfile
  2. +6 −0 Gemfile.lock
  3. +2 −2 app/assets/javascripts/fc_defaults.js.coffee
  4. +16 −2 app/assets/javascripts/fullcalendar_atwork.js.coffee
  5. +3 −0  app/assets/javascripts/fullcalendar_blank.js.coffee
  6. +12 −1 app/assets/javascripts/fullcalendar_twetzel.js.coffee
  7. +1 −24 app/assets/stylesheets/application.css
  8. +8 −0 app/assets/stylesheets/fc_styles/abletech.css.scss
  9. +7 −0 app/assets/stylesheets/fc_styles/arshaw.css.scss
  10. +8 −0 app/assets/stylesheets/fc_styles/atwork.css.scss
  11. +8 −0 app/assets/stylesheets/fc_styles/blank.css.scss
  12. +8 −0 app/assets/stylesheets/fc_styles/buerofuerideen.css.scss
  13. +23 −0 app/assets/stylesheets/fc_styles/changes.css.scss
  14. +8 −0 app/assets/stylesheets/fc_styles/jarnokurlin.css.scss
  15. +8 −0 app/assets/stylesheets/fc_styles/twetzel.css.scss
  16. +1 −0  app/views/calendar/show.html.erb
  17. +1 −1  config/environments/production.rb
  18. BIN  vendor/assets/src/.DS_Store
  19. BIN  vendor/assets/src/atwork/.DS_Store
  20. +43 −0 vendor/assets/src/atwork/agenda/AgendaThreeDayView.js
  21. +28 −4 vendor/assets/src/atwork/agenda/AgendaView.js
  22. +1 −1  vendor/assets/src/atwork/agenda/AgendaWorkWeekView.js
  23. +9 −0 vendor/assets/src/atwork/agenda/views/agenda_allday.jst.eco
  24. +28 −0 vendor/assets/src/atwork/agenda/views/agenda_table.jst.eco
  25. +25 −3 vendor/assets/src/atwork/basic/BasicView.js
  26. +28 −4 vendor/assets/src/atwork/basic/basic.css
  27. +29 −0 vendor/assets/src/atwork/basic/views/basic_table.jst.eco
  28. +8 −2 vendor/assets/src/atwork/defaults.js
  29. BIN  vendor/assets/src/twetzel/.DS_Store
  30. +40 −0 vendor/assets/src/twetzel/agenda/AgendaThreeDayView.js
  31. +7 −4 vendor/assets/src/twetzel/agenda/AgendaView.js
  32. +40 −0 vendor/assets/src/twetzel/agenda/AgendaWorkWeekView.js
  33. +19 −8 vendor/assets/src/twetzel/basic/BasicView.js
  34. +28 −4 vendor/assets/src/twetzel/basic/basic.css
  35. +7 −1 vendor/assets/src/twetzel/defaults.js
View
1  Gemfile
@@ -22,6 +22,7 @@ group :assets do
gem 'jquery-rails'
gem 'jquery-ui-rails'
+ gem 'eco'
end
View
6 Gemfile.lock
@@ -37,6 +37,11 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.3.3)
+ eco (1.0.0)
+ coffee-script
+ eco-source
+ execjs
+ eco-source (1.1.0.rc.1)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
@@ -107,6 +112,7 @@ PLATFORMS
DEPENDENCIES
coffee-rails (~> 3.2.1)
+ eco
jquery-rails
jquery-ui-rails
rails (= 3.2.8)
View
4 app/assets/javascripts/fc_defaults.js.coffee
@@ -86,8 +86,8 @@
month: "Monat"
week: "Woche"
day: "Tag"
- resourceDay: 'Resourcen'
- agendaWorkWeek: 'Arbeitswoche'
+ resourceDay: 'R-Day'
+ agendaWorkWeek: 'workweek'
axisFormat: 'H:mm'
droppable: true, # this allows things to be dropped onto the calendar !!!
View
18 app/assets/javascripts/fullcalendar_atwork.js.coffee
@@ -11,14 +11,20 @@
//= require src/atwork/basic/BasicDayView
//= require src/atwork/basic/BasicView
//= require src/atwork/basic/BasicEventRenderer
+//= require src/atwork/basic/views/basic_table
#
//= require src/atwork/agenda/AgendaWorkWeekView
+//= require src/atwork/agenda/AgendaThreeDayView
+#
//= require src/atwork/agenda/AgendaWeekView
//= require src/atwork/agenda/AgendaDayView
//= require src/atwork/agenda/AgendaView
//= require src/atwork/agenda/AgendaEventRenderer
+//= require src/atwork/agenda/views/agenda_table
+//= require src/atwork/agenda/views/agenda_allday
#
//= require src/atwork/resources/ResourceWorkWeekView
+#
//= require src/atwork/resources/ResourceDayView
//= require src/atwork/resources/ResourceView
//= require src/atwork/resources/ResourceList
@@ -43,12 +49,20 @@
# => individual options for fullCalendar
#
options =
+
+ monthHead: false
+ markAllDays: false
+ oneDayHead: false
+ speziTitleFormat:
+ week: "d.[ MMMM][ yyyy]{ - d. MMMM yyyy}"
+ day: "d.[ MMMM][ yyyy]{ - d. MMMM yyyy}"
+
defaultView: 'resourceDay'
header:
left: 'prev,next today'
center: 'title'
- right: 'month,agendaWeek,agendaWorkWeek,resourceWorkWeek,resourceDay'
- # right: 'month,agendaWeek,agendaWorkWeek,resourceWorkWeek,agendaDay,resourceDay'
+ right: 'month,agendaWeek,agendaWorkWeek,agendaThreeDay,agendaDay,resourceDay,resourceWorkWeek'
+ # right: 'month,agendaWeek,agendaWorkWeek,agendaThreeDay,resourceWorkWeek,agendaDay,resourceDay'
# resources: [
# { id: 1, name: 'Joe Bloggs', color: 'red', textColor: 'black' },
# { id: 2, name: 'Alan Black', color: 'blue' },
View
3  app/assets/javascripts/fullcalendar_blank.js.coffee
@@ -12,6 +12,9 @@
//= require src/twetzel/basic/BasicView
//= require src/twetzel/basic/BasicEventRenderer
#
+//= require src/twetzel/agenda/AgendaWorkWeekView
+//= require src/twetzel/agenda/AgendaThreeDayView
+#
//= require src/twetzel/agenda/AgendaWeekView
//= require src/twetzel/agenda/AgendaDayView
//= require src/twetzel/agenda/AgendaView
View
13 app/assets/javascripts/fullcalendar_twetzel.js.coffee
@@ -12,6 +12,9 @@
//= require src/twetzel/basic/BasicView
//= require src/twetzel/basic/BasicEventRenderer
#
+//= require src/twetzel/agenda/AgendaWorkWeekView
+//= require src/twetzel/agenda/AgendaThreeDayView
+#
//= require src/twetzel/agenda/AgendaWeekView
//= require src/twetzel/agenda/AgendaDayView
//= require src/twetzel/agenda/AgendaView
@@ -41,11 +44,19 @@
# => individual options for fullCalendar
#
options =
+
+ monthHead: false
+ markAllDays: true
+ oneDayHead: false
+ speziTitleFormat:
+ week: "d.[ MMMM][ yyyy]{ - d. MMMM yyyy}"
+ day: "d.[ MMMM][ yyyy]{ - d. MMMM yyyy}"
+
defaultView: 'resourceDay'
header:
left: 'prev,next today'
center: 'title'
- right: 'month,agendaWeek,resourceDay'
+ right: 'month,agendaWeek,agendaWorkWeek,agendaThreeDay,agendaDay,resourceDay'
# right: 'month,agendaWeek,agendaWorkWeek,resourceWorkWeek,agendaDay,resourceDay'
# resources: [
# { id: 1, name: 'Joe Bloggs', color: 'red', textColor: 'black' },
View
25 app/assets/stylesheets/application.css
@@ -10,7 +10,7 @@
*
*= require boiler_before
*= require jquery.ui.all
- *= require fullcalendar
+xrequire fullcalendar
*= require_self
*= require boiler_after
*/
@@ -258,26 +258,3 @@ input[type="submit"]:hover {
margin: 0.4em 0px 0.5em 0.5em;
}
-.fc-event.de_holiday { position: relative; }
-.fc-event.de_holiday div { text-indent: 15px; }
-
-.fc-event.de_holiday .fc-event-title:before {
- display: block;
- content:"g";
- position: absolute;
- left: -13px;
- top: 0;
- font-weight: bold;
- color: #999;
- font-size: 13px;
- line-height: 12px;
-}
-
-.fc-event.event.unsinged {
- border: dotted 1px #666;
-}
-
-.fc-event.event.unsinged .fc-event-inner {
- background: #fff url("back.png") !important;
- color: #555;
-}
View
8 app/assets/stylesheets/fc_styles/abletech.css.scss
@@ -0,0 +1,8 @@
+@import "src/AbleTech/main";
+@import "src/AbleTech/common/common";
+@import "src/AbleTech/basic/basic";
+@import "src/AbleTech/agenda/agenda";
+@import "src/AbleTech/resources/resource";
+@import "fc_styles/changes";
+// Print
+// @import "src/AbleTech/common/print";
View
7 app/assets/stylesheets/fc_styles/arshaw.css.scss
@@ -0,0 +1,7 @@
+@import "src/arshaw/main";
+@import "src/arshaw/common/common";
+@import "src/arshaw/basic/basic";
+@import "src/arshaw/agenda/agenda";
+@import "fc_styles/changes";
+// Print
+// @import "src/arshaw/common/print";
View
8 app/assets/stylesheets/fc_styles/atwork.css.scss
@@ -0,0 +1,8 @@
+@import "src/atwork/main";
+@import "src/atwork/common/common";
+@import "src/atwork/basic/basic";
+@import "src/atwork/agenda/agenda";
+@import "src/atwork/resources/resource";
+@import "fc_styles/changes";
+// Print
+// @import "src/atwork/common/print";
View
8 app/assets/stylesheets/fc_styles/blank.css.scss
@@ -0,0 +1,8 @@
+@import "src/atwork/main";
+@import "src/atwork/common/common";
+@import "src/atwork/basic/basic";
+@import "src/atwork/agenda/agenda";
+@import "src/atwork/resources/resource";
+@import "fc_styles/changes";
+// Print
+// @import "src/atwork/common/print";
View
8 app/assets/stylesheets/fc_styles/buerofuerideen.css.scss
@@ -0,0 +1,8 @@
+@import "src/buero-fuer-ideen/main";
+@import "src/buero-fuer-ideen/common/common";
+@import "src/buero-fuer-ideen/basic/basic";
+@import "src/buero-fuer-ideen/agenda/agenda";
+@import "src/buero-fuer-ideen/resources/resource";
+@import "fc_styles/changes";
+// Print
+// @include "src/buero-fuer-ideen/common/print";
View
23 app/assets/stylesheets/fc_styles/changes.css.scss
@@ -0,0 +1,23 @@
+.fc-event.de_holiday { position: relative; }
+.fc-event.de_holiday div { text-indent: 15px; }
+
+.fc-event.de_holiday .fc-event-title:before {
+ display: block;
+ content:"g";
+ position: absolute;
+ left: -13px;
+ top: 0;
+ font-weight: bold;
+ color: #999;
+ font-size: 13px;
+ line-height: 12px;
+}
+
+.fc-event.event.unsinged {
+ border: dotted 1px #666;
+}
+
+.fc-event.event.unsinged .fc-event-inner {
+ background: #fff url("back.png") !important;
+ color: #555;
+}
View
8 app/assets/stylesheets/fc_styles/jarnokurlin.css.scss
@@ -0,0 +1,8 @@
+@import "src/jarnokurlin/main";
+@import "src/jarnokurlin/common/common";
+@import "src/jarnokurlin/basic/basic";
+@import "src/jarnokurlin/agenda/agenda";
+@import "src/jarnokurlin/resource/resource";
+@import "fc_styles/changes";
+// Print
+// @import "src/jarnokurlin/common/print";
View
8 app/assets/stylesheets/fc_styles/twetzel.css.scss
@@ -0,0 +1,8 @@
+@import "src/twetzel/main";
+@import "src/twetzel/common/common";
+@import "src/twetzel/basic/basic";
+@import "src/twetzel/agenda/agenda";
+@import "src/twetzel/resources/resource";
+@import "fc_styles/changes";
+// Print
+// @import "src/twetzel/common/print";
View
1  app/views/calendar/show.html.erb
@@ -1,3 +1,4 @@
+<%= stylesheet_link_tag "fc_styles/#{ @calender_type }" %>
<%= javascript_include_tag "fullcalendar_#{ @calender_type }" %>
<% that_name = CalendarController::SOURCES[ @calender_type ] %>
View
2  config/environments/production.rb
@@ -46,7 +46,7 @@
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
- config.assets.precompile += %w( fullcalendar_abletech.js fullcalendar_arshaw.js fullcalendar_atwork.js fullcalendar_buerofuerideen.js fullcalendar_jarnokurlin.js fullcalendar_twetzel.js fullcalendar_blank.js )
+ config.assets.precompile += %w( fullcalendar_abletech.js fullcalendar_arshaw.js fullcalendar_atwork.js fullcalendar_buerofuerideen.js fullcalendar_jarnokurlin.js fullcalendar_twetzel.js fullcalendar_blank.js fc_styles/abletech.css fc_styles/arshaw.css fc_styles/atwork.css fc_styles/buerofuerideen.css fc_styles/jarnokurlin.css fc_styles/twetzel.css )
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
View
BIN  vendor/assets/src/.DS_Store
Binary file not shown
View
BIN  vendor/assets/src/atwork/.DS_Store
Binary file not shown
View
43 vendor/assets/src/atwork/agenda/AgendaThreeDayView.js
@@ -0,0 +1,43 @@
+
+fcViews.agendaThreeDay = AgendaThreeDayView;
+
+function AgendaThreeDayView(element, calendar) {
+ var t = this;
+
+ // exports
+ t.render = render;
+
+ // imports
+ AgendaView.call(t, element, calendar, 'agendaThreeDay');
+ var opt = t.opt;
+ var renderAgenda = t.renderAgenda;
+ var formatDates = calendar.formatDates;
+
+ function render(date, delta) {
+ if (delta) {
+ addDays(date, delta * 3);
+ }
+ var start = addDays(cloneDate(date), -((date.getDay() - opt('firstDay') + 3) % 3));
+ var end = addDays(cloneDate(start), 3);
+ var visStart = cloneDate(start);
+ var visEnd = cloneDate(end);
+ // var weekends = false;
+ var weekends = true;
+ if (!weekends) {
+ skipWeekend(visStart);
+ skipWeekend(visEnd, -1, true);
+ }
+ t.title = formatDates(
+ visStart,
+ addDays(cloneDate(visEnd), -1),
+ opt('speziTitleFormat')
+ );
+ t.start = start;
+ t.end = end;
+ t.visStart = visStart;
+ t.visEnd = visEnd;
+ renderAgenda(3);
+ }
+
+
+}
View
32 vendor/assets/src/atwork/agenda/AgendaView.js
@@ -13,7 +13,8 @@ setDefaults({
agenda: .5
},
minTime: 0,
- maxTime: 24
+ maxTime: 24,
+ oneDayHead: true
});
@@ -172,6 +173,7 @@ function AgendaView(element, calendar, viewName) {
var minutes;
var slotNormal = opt('slotMinutes') % 15 == 0;
+ /*
s =
"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>" +
"<thead>" +
@@ -203,6 +205,15 @@ function AgendaView(element, calendar, viewName) {
"</tr>" +
"</tbody>" +
"</table>";
+ */
+
+ s = JST["src/atwork/agenda/views/agenda_table"]({
+ "colCnt": colCnt,
+ "headerClass": headerClass,
+ "contentClass": contentClass,
+ "oneDayHead": opt('oneDayHead')
+ });
+
dayTable = $(s).appendTo(element);
dayHead = dayTable.find('thead');
dayHeadCells = dayHead.find('th').slice(1, -1);
@@ -228,6 +239,7 @@ function AgendaView(element, calendar, viewName) {
$("<div style='position:absolute;z-index:8;top:0;left:0'/>")
.appendTo(slotLayer);
+ /*
s =
"<table style='width:100%' class='fc-agenda-allday' cellspacing='0'>" +
"<tr>" +
@@ -238,6 +250,12 @@ function AgendaView(element, calendar, viewName) {
"<th class='" + headerClass + " fc-agenda-gutter'>&nbsp;</th>" +
"</tr>" +
"</table>";
+ */
+ s = JST["src/atwork/agenda/views/agenda_allday"]({
+ "text": opt('allDayText'),
+ "headerClass": headerClass
+ });
+
allDayTable = $(s).appendTo(slotLayer);
allDayRow = allDayTable.find('tr');
@@ -313,13 +331,19 @@ function AgendaView(element, calendar, viewName) {
for (i=0; i<colCnt; i++) {
date = colDate(i);
headCell = dayHeadCells.eq(i);
- headCell.html(formatDate(date, colFormat));
+ if ( (colCnt > 1) || (opt('oneDayHead') == true) ) {
+ headCell.html(formatDate(date, colFormat));
+ }
bodyCell = dayBodyCells.eq(i);
if (+date == +today) {
- headCell.addClass('fc-today');
+ if ( (colCnt > 1) || (opt('oneDayHead') == true) ) {
+ headCell.addClass('fc-today');
+ }
bodyCell.addClass(tm + '-state-highlight fc-today');
}else{
- headCell.removeClass('fc-today');
+ if ( (colCnt > 1) || (opt('oneDayHead') == true) ) {
+ headCell.removeClass('fc-today');
+ }
bodyCell.removeClass(tm + '-state-highlight fc-today');
}
setDayID(headCell.add(bodyCell), date);
View
2  vendor/assets/src/atwork/agenda/AgendaWorkWeekView.js
@@ -27,7 +27,7 @@ function AgendaWorkWeekView(element, calendar) {
t.title = formatDates(
visStart,
addDays(cloneDate(visEnd), -1),
- opt('titleFormat')
+ opt('speziTitleFormat')
);
t.start = start;
t.end = end;
View
9 vendor/assets/src/atwork/agenda/views/agenda_allday.jst.eco
@@ -0,0 +1,9 @@
+<table style='width:100%' class='fc-agenda-allday' cellspacing='0'>
+ <tr>
+ <th class='<%= @headerClass %> fc-agenda-axis'><%= @text %></th>
+ <td>
+ <div class='fc-day-content'><div style='position:relative'/></div>
+ </td>
+ <th class='<%= @headerClass %> fc-agenda-gutter'>&nbsp;</th>
+ </tr>
+</table>
View
28 vendor/assets/src/atwork/agenda/views/agenda_table.jst.eco
@@ -0,0 +1,28 @@
+<% that_cnt = [0..(@colCnt - 1)] %>
+<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>
+ <thead>
+ <tr>
+ <th class='fc-agenda-axis <%= @headerClass %>'> </th>
+ <% for i in that_cnt: %>
+ <th class='fc- fc-col<%= i %> <%= @headerClass %>'/>
+ <% end %>
+ <th class='fc-agenda-gutter <%= @headerClass %>'> </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th class='fc-agenda-axis <%= @headerClass %>'>&nbsp;</th>
+ <% for i in that_cnt: %>
+ <td class='fc- fc-col<%= i %> <%= @contentClass %>'>
+ <div>
+ <div class='fc-day-content'>
+ <div style='position:relative'>&nbsp;</div>
+ </div>
+ </div>
+ </td>
+ <% end %>
+ <td class='fc-agenda-gutter <%= @contentClass %>'>&nbsp;</td>
+ </tr>
+ </tbody>
+</table>
+
View
28 vendor/assets/src/atwork/basic/BasicView.js
@@ -1,6 +1,8 @@
setDefaults({
- weekMode: 'fixed'
+ weekMode: 'fixed',
+ monthHead: true,
+ markAllDays: false
});
@@ -122,7 +124,7 @@ function BasicView(element, calendar, viewName) {
var contentClass = tm + "-widget-content";
var i, j;
var table;
-
+ /*
s =
"<table class='fc-border-separate' style='width:100%' cellspacing='0'>" +
"<thead>" +
@@ -158,6 +160,15 @@ function BasicView(element, calendar, viewName) {
s +=
"</tbody>" +
"</table>";
+ */
+ s = JST["src/atwork/basic/views/basic_table"]({
+ "colCnt": colCnt,
+ "maxRowCnt": maxRowCnt,
+ "headerClass": headerClass,
+ "contentClass": contentClass,
+ "showNumbers": showNumbers,
+ "monthHead": opt('monthHead')
+ });
table = $(s).appendTo(element);
head = table.find('thead');
@@ -190,10 +201,13 @@ function BasicView(element, calendar, viewName) {
var row;
if (dowDirty) {
+
headCells.each(function(i, _cell) {
cell = $(_cell);
date = indexDate(i);
- cell.html(formatDate(date, colFormat));
+ if (opt('monthHead') == true) {
+ cell.html(formatDate(date, colFormat));
+ }
setDayID(cell, date);
});
}
@@ -212,6 +226,14 @@ function BasicView(element, calendar, viewName) {
cell.removeClass(tm + '-state-highlight fc-today');
}
cell.find('div.fc-day-number').text(date.getDate());
+ if ( opt('monthHead') != true ) {
+ if ( (cell.find('div.fc-day-number').attr("data-row") == 1) || (opt('markAllDays') == true) ) {
+ cell = $(_cell);
+ date = indexDate(i);
+ cell.find('div.fc-day-number')
+ .append('<div class="fc-day-name">'+formatDate(date, colFormat)+'</div>');
+ }
+ }
if (dowDirty) {
setDayID(cell, date);
}
View
32 vendor/assets/src/atwork/basic/basic.css
@@ -5,15 +5,22 @@
.fc-grid th {
text-align: center;
}
-
+
+/*
.fc-grid .fc-day-number {
float: right;
padding: 0 2px;
+}
+*/
+.fc-grid .fc-other-month {
+ background: rgba(153,153,153,.35);
}
-
+
.fc-grid .fc-other-month .fc-day-number {
- opacity: 0.3;
- filter: alpha(opacity=30); /* for IE */
+ /*
+ opacity: 0.7;
+ filter: alpha(opacity=70); / for IE */
+ background: #fff;
/* opacity with small font can sometimes look too faded
might want to set the 'color' property instead
making day-numbers bold also fixes the problem */
@@ -41,3 +48,20 @@
}
+
+
+.fc-grid .fc-day-number {
+ background: rgba(153,153,153,.65);
+ padding: 0 5px;
+ text-align: right;
+ position: relative;
+}
+
+.fc-grid .fc-day-name {
+ display:block;
+ position: absolute;
+ left: 5px;
+ top:0;
+ font-weight: bold;
+}
+
View
29 vendor/assets/src/atwork/basic/views/basic_table.jst.eco
@@ -0,0 +1,29 @@
+<% c_cnt = [0..(@colCnt - 1)] %>
+<% r_cnt = [0..(@maxRowCnt - 1)] %>
+<table class='fc-border-separate' style='width:100%' cellspacing='0'>
+ <thead>
+ <tr>
+ <% for i in c_cnt: %>
+ <th class='fc- <%= @headerClass %>'></th>
+ <% end %>
+ </tr>
+ </thead>
+ <tbody>
+ <% for i in r_cnt: %>
+ <tr class='fc-week<%= i %>'>
+ <% for j in c_cnt: %>
+ <td class='fc- <%= @contentClass %> fc-day<%= (i * @colCnt + j ) %> fc_day_cell'>
+ <div class="fc-basic-day-cell">
+ <% if @showNumbers: %>
+ <div class='fc-day-number' data-row="<%= i + 1 %>"></div>
+ <% end %>
+ <div class='fc-day-content'>
+ <div style='position:relative'>&nbsp;</div>
+ </div>
+ </div>
+ </td>
+ <% end %>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
View
10 vendor/assets/src/atwork/defaults.js
@@ -30,6 +30,10 @@ var defaults = {
week: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",
day: 'dddd, MMM d, yyyy'
},
+ speziTitleFormat: {
+ week: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",
+ day: 'dddd, MMM d, yyyy'
+ },
columnFormat: {
month: 'ddd',
week: 'ddd M/d',
@@ -55,8 +59,10 @@ var defaults = {
month: 'month',
week: 'week',
day: 'day',
- resourceDay: 'resource',
- agendaWorkWeek: 'workweek'
+ resourceDay: 'r-day',
+ agendaWorkWeek: 'workweek',
+ agendaThreeDay: '3days',
+ resourceWorkWeek: 'r-week'
},
// jquery-ui theming
View
BIN  vendor/assets/src/twetzel/.DS_Store
Binary file not shown
View
40 vendor/assets/src/twetzel/agenda/AgendaThreeDayView.js
@@ -0,0 +1,40 @@
+
+fcViews.agendaThreeDay = AgendaThreeDayView;
+
+function AgendaThreeDayView(element, calendar) {
+ var t = this;
+
+ // exports
+ t.render = render;
+
+ // imports
+ AgendaView.call(t, element, calendar, 'agendaThreeDay');
+ var opt = t.opt;
+ var renderAgenda = t.renderAgenda;
+ var formatDates = calendar.formatDates;
+
+ function render(date, delta) {
+ if (delta) {
+ addDays(date, delta * 3);
+ }
+ var start = addDays(cloneDate(date), -((date.getDay() - opt('firstDay') + 3) % 3));
+ var end = addDays(cloneDate(start), 3);
+ var visStart = cloneDate(start);
+ var visEnd = cloneDate(end);
+ var weekends = false;
+ skipWeekend(visStart);
+ skipWeekend(visEnd, -1, true);
+ t.title = formatDates(
+ visStart,
+ addDays(cloneDate(visEnd), -1),
+ opt('speziTitleFormat')
+ );
+ t.start = start;
+ t.end = end;
+ t.visStart = visStart;
+ t.visEnd = visEnd;
+ renderAgenda(3);
+ }
+
+
+}
View
11 vendor/assets/src/twetzel/agenda/AgendaView.js
@@ -13,7 +13,8 @@ setDefaults({
agenda: .5
},
minTime: 0,
- maxTime: 24
+ maxTime: 24,
+ oneDayHead: true
});
@@ -176,13 +177,13 @@ function AgendaView(element, calendar, viewName) {
"<table style='width:100%' class='fc-agenda-days fc-border-separate' cellspacing='0'>" +
"<thead>" +
"<tr>" +
- "<th class='fc-agenda-axis " + headerClass + "'>&nbsp;</th>";
+ "<th class='fc-agenda-axis " + headerClass + "'> </th>";
for (i=0; i<colCnt; i++) {
s +=
"<th class='fc- fc-col" + i + ' ' + headerClass + "'/>"; // fc- needed for setDayID
}
s +=
- "<th class='fc-agenda-gutter " + headerClass + "'>&nbsp;</th>" +
+ "<th class='fc-agenda-gutter " + headerClass + "'> </th>" +
"</tr>" +
"</thead>" +
"<tbody>" +
@@ -313,7 +314,9 @@ function AgendaView(element, calendar, viewName) {
for (i=0; i<colCnt; i++) {
date = colDate(i);
headCell = dayHeadCells.eq(i);
- headCell.html(formatDate(date, colFormat));
+ if ( (colCnt > 1) || (opt('oneDayHead') == true) ) {
+ headCell.html('<div class="head_cell_date">'+ formatDate(date, colFormat) +'</div>');
+ }
bodyCell = dayBodyCells.eq(i);
if (+date == +today) {
headCell.addClass('fc-today');
View
40 vendor/assets/src/twetzel/agenda/AgendaWorkWeekView.js
@@ -0,0 +1,40 @@
+
+fcViews.agendaWorkWeek = AgendaWorkWeekView;
+
+function AgendaWorkWeekView(element, calendar) {
+ var t = this;
+
+ // exports
+ t.render = render;
+
+ // imports
+ AgendaView.call(t, element, calendar, 'agendaWorkWeek');
+ var opt = t.opt;
+ var renderAgenda = t.renderAgenda;
+ var formatDates = calendar.formatDates;
+
+ function render(date, delta) {
+ if (delta) {
+ addDays(date, delta * 7);
+ }
+ var start = addDays(cloneDate(date), -((date.getDay() - opt('firstDay') + 7) % 7));
+ var end = addDays(cloneDate(start), 7);
+ var visStart = cloneDate(start);
+ var visEnd = cloneDate(end);
+ var weekends = false;
+ skipWeekend(visStart);
+ skipWeekend(visEnd, -1, true);
+ t.title = formatDates(
+ visStart,
+ addDays(cloneDate(visEnd), -1),
+ opt('speziTitleFormat')
+ );
+ t.start = start;
+ t.end = end;
+ t.visStart = visStart;
+ t.visEnd = visEnd;
+ renderAgenda(5);
+ }
+
+
+}
View
27 vendor/assets/src/twetzel/basic/BasicView.js
@@ -1,6 +1,8 @@
setDefaults({
- weekMode: 'fixed'
+ weekMode: 'fixed',
+ monthHead: true,
+ markAllDays: false
});
@@ -140,12 +142,9 @@ function BasicView(element, calendar, viewName) {
"<tr class='fc-week" + i + "'>";
for (j=0; j<colCnt; j++) {
s +=
- "<td class='fc- " + contentClass + " fc-day" + (i*colCnt+j) + "'>" + // need fc- for setDayID
- "<div>" +
- (showNumbers ?
- "<div class='fc-day-number'/>" :
- ''
- ) +
+ "<td class='fc- " + contentClass + " fc-day" + (i*colCnt+j) + " fc_day_cell'>" + // fc- for setDayID
+ "<div class='fc-basic-day-cell'>" +
+ (showNumbers ? "<div class='fc-day-number' data-row='" + (i + 1) + "'/>" : '' ) +
"<div class='fc-day-content'>" +
"<div style='position:relative'>&nbsp;</div>" +
"</div>" +
@@ -193,7 +192,9 @@ function BasicView(element, calendar, viewName) {
headCells.each(function(i, _cell) {
cell = $(_cell);
date = indexDate(i);
- cell.html(formatDate(date, colFormat));
+ if (opt('monthHead') == true) {
+ cell.html(formatDate(date, colFormat));
+ }
setDayID(cell, date);
});
}
@@ -212,6 +213,16 @@ function BasicView(element, calendar, viewName) {
cell.removeClass(tm + '-state-highlight fc-today');
}
cell.find('div.fc-day-number').text(date.getDate());
+
+ if ( opt('monthHead') != true ) {
+ if ( (cell.find('div.fc-day-number').attr("data-row") == 1) || (opt('markAllDays') == true) ) {
+ cell = $(_cell);
+ date = indexDate(i);
+ cell.find('div.fc-day-number')
+ .append('<div class="fc-day-name">'+formatDate(date, colFormat)+'</div>');
+ }
+ }
+
if (dowDirty) {
setDayID(cell, date);
}
View
32 vendor/assets/src/twetzel/basic/basic.css
@@ -5,15 +5,22 @@
.fc-grid th {
text-align: center;
}
-
+
+/*
.fc-grid .fc-day-number {
float: right;
padding: 0 2px;
+}
+*/
+.fc-grid .fc-other-month {
+ background: rgba(153,153,153,.35);
}
-
+
.fc-grid .fc-other-month .fc-day-number {
- opacity: 0.3;
- filter: alpha(opacity=30); /* for IE */
+ /*
+ opacity: 0.7;
+ filter: alpha(opacity=70); / for IE */
+ background: #fff;
/* opacity with small font can sometimes look too faded
might want to set the 'color' property instead
making day-numbers bold also fixes the problem */
@@ -41,3 +48,20 @@
}
+
+
+.fc-grid .fc-day-number {
+ background: rgba(153,153,153,.65);
+ padding: 0 5px;
+ text-align: right;
+ position: relative;
+}
+
+.fc-grid .fc-day-name {
+ display:block;
+ position: absolute;
+ left: 5px;
+ top:0;
+ font-weight: bold;
+}
+
View
8 vendor/assets/src/twetzel/defaults.js
@@ -30,6 +30,10 @@ var defaults = {
week: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",
day: 'dddd, MMM d, yyyy'
},
+ speziTitleFormat: {
+ week: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}",
+ day: "MMM d[ yyyy]{ '&#8212;'[ MMM] d yyyy}"
+ },
columnFormat: {
month: 'ddd',
week: 'ddd M/d',
@@ -55,7 +59,9 @@ var defaults = {
month: 'month',
week: 'week',
day: 'day',
- resourceDay: 'resource'
+ resourceDay: 'r-day',
+ agendaWorkWeek: 'workweek',
+ agendaThreeDay: '3days'
},
// jquery-ui theming
Please sign in to comment.
Something went wrong with that request. Please try again.