From 3d3d5ed144bf9c03f001abd06bb5829debc054ac Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Wed, 17 Jul 2013 11:12:34 +0800 Subject: [PATCH] updated with fullcalendar.css, added front end page Conflicts: vendor/built_in_modules/calendar_new/init.rb --- .../calendar/back_end/cals/index.html.erb | 2 + .../app/assets/stylesheets/fullcalendar.css | 328 ++++++++---------- .../back_end/events/index.html.erb | 12 +- .../front_end/events/index.html.erb | 65 ++++ .../calendar_new/config/locales/en.yml | 1 + .../calendar_new/config/routes.rb | 4 + vendor/built_in_modules/calendar_new/init.rb | 34 +- 7 files changed, 252 insertions(+), 194 deletions(-) create mode 100644 vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/front_end/events/index.html.erb diff --git a/vendor/built_in_modules/calendar/app/views/panel/calendar/back_end/cals/index.html.erb b/vendor/built_in_modules/calendar/app/views/panel/calendar/back_end/cals/index.html.erb index 0b3a4e295..5f27016ef 100644 --- a/vendor/built_in_modules/calendar/app/views/panel/calendar/back_end/cals/index.html.erb +++ b/vendor/built_in_modules/calendar/app/views/panel/calendar/back_end/cals/index.html.erb @@ -63,6 +63,7 @@
+<%if is_manager?%>
<%= link_to "Add", new_panel_calendar_back_end_event_path, :class => "btn btn-primary pull-right", :id=>"create_event_btn", :ref=>"add-btn" %>
@@ -76,5 +77,6 @@ +<%end%> diff --git a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.css b/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.css index bbfbfe221..acae725d2 100644 --- a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.css +++ b/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.css @@ -1,12 +1,7 @@ -/* - * FullCalendar v1.5.4 Stylesheet - * - * Copyright (c) 2011 Adam Shaw - * Dual licensed under the MIT and GPL licenses, located in - * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. - * - * Date: Tue Sep 4 23:38:33 2012 -0700 - * +/*! + * FullCalendar v1.6.1 Stylesheet + * Docs & License: http://arshaw.com/fullcalendar/ + * (c) 2013 Adam Shaw */ @@ -79,11 +74,8 @@ html .fc, margin-right: -1px; } -.fc-header .fc-corner-right { - margin-right: 1px; /* back to normal */ - } - -.fc-header .ui-corner-right { +.fc-header .fc-corner-right, /* non-theme */ +.fc-header .ui-corner-right { /* theme */ margin-right: 0; /* back to normal */ } @@ -124,17 +116,17 @@ html .fc, .fc-widget-header, /* , usually */ .fc-widget-content { /* , usually */ - border: 1px solid #ccc; + border: 1px solid #ddd; } .fc-state-highlight { /* today cell */ /* TODO: add .fc-today to */ - background: #ffc; + background: #fcf8e3; } .fc-cell-overlay { /* semi-transparent rectangle while dragging */ - background: #9cf; - opacity: .2; - filter: alpha(opacity=20); /* for IE */ + background: #bce8f1; + opacity: .3; + filter: alpha(opacity=30); /* for IE */ } @@ -145,43 +137,54 @@ html .fc, .fc-button { position: relative; display: inline-block; + padding: 0 .6em; + overflow: hidden; + height: 1.9em; + line-height: 1.9em; + white-space: nowrap; cursor: pointer; } .fc-state-default { /* non-theme */ - border-style: solid; - border-width: 1px 0; + border: 1px solid; } - -.fc-button-inner { - position: relative; - float: left; - overflow: hidden; + +.fc-state-default.fc-corner-left { /* non-theme */ + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; } - -.fc-state-default .fc-button-inner { /* non-theme */ - border-style: solid; - border-width: 0 1px; + +.fc-state-default.fc-corner-right { /* non-theme */ + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; } - -.fc-button-content { - position: relative; - float: left; - height: 1.9em; - line-height: 1.9em; - padding: 0 .6em; - white-space: nowrap; + +/* + Our default prev/next buttons use HTML entities like ‹ › « » + and we'll try to make them look good cross-browser. +*/ + +.fc-text-arrow { + margin: 0 .1em; + font-size: 2em; + font-family: "Courier New", Courier, monospace; + vertical-align: baseline; /* for IE7 */ + } + +.fc-button-prev .fc-text-arrow, +.fc-button-next .fc-text-arrow { /* for ‹ › */ + font-weight: bold; } /* icon (for jquery ui) */ -.fc-button-content .fc-icon-wrap { +.fc-button .fc-icon-wrap { position: relative; float: left; top: 50%; } -.fc-button-content .ui-icon { +.fc-button .ui-icon { position: relative; float: left; margin-top: -50%; @@ -189,117 +192,98 @@ html .fc, *top: -50%; } -/* gloss effect */ - -.fc-state-default .fc-button-effect { - position: absolute; - top: 50%; - left: 0; +/* + button states + borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/) +*/ + +.fc-state-default { + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + color: #333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } - -.fc-state-default .fc-button-effect span { - position: absolute; - top: -100px; - left: 0; - width: 500px; - height: 100px; - border-width: 100px 0 0 1px; - border-style: solid; - border-color: #fff; - background: #444; - opacity: .09; - filter: alpha(opacity=9); - } - -/* button states (determines colors) */ - -.fc-state-default, -.fc-state-default .fc-button-inner { - border-style: solid; - border-color: #ccc #bbb #aaa; - background: #F3F3F3; - color: #000; - } - + .fc-state-hover, -.fc-state-hover .fc-button-inner { - border-color: #999; - } - .fc-state-down, -.fc-state-down .fc-button-inner { - border-color: #555; - background: #777; - } - .fc-state-active, -.fc-state-active .fc-button-inner { - border-color: #555; - background: #777; - color: #fff; +.fc-state-disabled { + color: #333333; + background-color: #e6e6e6; } - -.fc-state-disabled, -.fc-state-disabled .fc-button-inner { - color: #999; - border-color: #ddd; + +.fc-state-hover { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; } - + +.fc-state-down, +.fc-state-active { + background-color: #cccccc; + background-image: none; + outline: 0; + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + } + .fc-state-disabled { cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + box-shadow: none; } - -.fc-state-disabled .fc-button-effect { - display: none; - } - + /* Global Event Styles ------------------------------------------------------------------------*/ .fc-event { - border-style: solid; - border-width: 0; + border: 1px solid #3a87ad; /* default BORDER color */ + background-color: #3a87ad; /* default BACKGROUND color */ + color: #fff; /* default TEXT color */ font-size: .85em; cursor: default; } + +a.fc-event { + text-decoration: none; + } a.fc-event, .fc-event-draggable { cursor: pointer; } -a.fc-event { - text-decoration: none; - } - .fc-rtl .fc-event { text-align: right; } - -.fc-event-skin { - border-color: #36c; /* default BORDER color */ - background-color: #36c; /* default BACKGROUND color */ - color: #fff; /* default TEXT color */ - } - + .fc-event-inner { - position: relative; width: 100%; height: 100%; - border-style: solid; - border-width: 0; overflow: hidden; } .fc-event-time, .fc-event-title { - padding: 3px 1px; - background-color: #eee; -} + padding: 0 1px; + } -.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/ +.fc .ui-resizable-handle { display: block; position: absolute; z-index: 99999; @@ -317,6 +301,20 @@ a.fc-event { border-width: 1px 0; margin-bottom: 1px; } + +.fc-ltr .fc-event-hori.fc-event-start, +.fc-rtl .fc-event-hori.fc-event-end { + border-left-width: 1px; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + } + +.fc-ltr .fc-event-hori.fc-event-end, +.fc-rtl .fc-event-hori.fc-event-start { + border-right-width: 1px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + } /* resizable */ @@ -342,66 +340,6 @@ a.fc-event { -/* Fake Rounded Corners (for buttons and events) -------------------------------------------------------------*/ - -.fc-corner-left { - margin-left: 1px; - } - -.fc-corner-left .fc-button-inner, -.fc-corner-left .fc-event-inner { - margin-left: -1px; - } - -.fc-corner-right { - margin-right: 1px; - } - -.fc-corner-right .fc-button-inner, -.fc-corner-right .fc-event-inner { - margin-right: -1px; - } - -.fc-corner-top { - margin-top: 1px; - } - -.fc-corner-top .fc-event-inner { - margin-top: -1px; - } - -.fc-corner-bottom { - margin-bottom: 1px; - } - -.fc-corner-bottom .fc-event-inner { - margin-bottom: -1px; - } - - - -/* Fake Rounded Corners SPECIFICALLY FOR EVENTS ------------------------------------------------------------------*/ - -.fc-corner-left .fc-event-inner { - border-left-width: 1px; - } - -.fc-corner-right .fc-event-inner { - border-right-width: 1px; - } - -.fc-corner-top .fc-event-inner { - border-top-width: 1px; - } - -.fc-corner-bottom .fc-event-inner { - border-bottom-width: 1px; - } - - - /* Reusable Separate-border Table ------------------------------------------------------------*/ @@ -437,6 +375,15 @@ table.fc-border-separate { .fc-grid th { text-align: center; } + +.fc .fc-week-number { + width: 22px; + text-align: center; + } + +.fc .fc-week-number div { + padding: 0 2px; + } .fc-grid .fc-day-number { float: right; @@ -493,6 +440,10 @@ table.fc-border-separate { white-space: nowrap; font-weight: normal; } + +.fc-agenda .fc-week-number { + font-weight: bold; + } .fc-agenda .fc-day-content { padding: 2px 2px 1px; @@ -567,19 +518,28 @@ table.fc-border-separate { .fc-event-vert { border-width: 0 1px; } - -.fc-event-vert .fc-event-head, -.fc-event-vert .fc-event-content { - position: relative; - z-index: 2; - width: 100%; - overflow: hidden; + +.fc-event-vert.fc-event-start { + border-top-width: 1px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + } + +.fc-event-vert.fc-event-end { + border-bottom-width: 1px; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; } .fc-event-vert .fc-event-time { white-space: nowrap; font-size: 10px; } + +.fc-event-vert .fc-event-inner { + position: relative; + z-index: 2; + } .fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */ position: absolute; @@ -589,8 +549,8 @@ table.fc-border-separate { width: 100%; height: 100%; background: #fff; - opacity: .3; - filter: alpha(opacity=30); + opacity: .25; + filter: alpha(opacity=25); } .fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */ diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/index.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/index.html.erb index c86f06ebf..77e50d894 100644 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/index.html.erb +++ b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/index.html.erb @@ -1,9 +1,11 @@ -<%= stylesheet_link_tag 'fullcalendar'%> -<%= stylesheet_link_tag 'calendar'%> <%= javascript_include_tag 'fullcalendar' %> <%= javascript_include_tag 'calendar' %> <%= javascript_include_tag 'bootstrap-datetimepicker' %> + +<%= stylesheet_link_tag "fullcalendar"%> +<%= stylesheet_link_tag "calendar"%> +
@@ -50,12 +52,14 @@
+<%if is_manager?%>
<%= link_to "Add", new_panel_calendar_new_back_end_event_path, :class => "btn btn-primary pull-right", :id=>"create_event_btn", :ref=>"add-btn" %>
- + \ No newline at end of file + +<%end%> \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/front_end/events/index.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/front_end/events/index.html.erb new file mode 100644 index 000000000..77e50d894 --- /dev/null +++ b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/front_end/events/index.html.erb @@ -0,0 +1,65 @@ + +<%= javascript_include_tag 'fullcalendar' %> +<%= javascript_include_tag 'calendar' %> +<%= javascript_include_tag 'bootstrap-datetimepicker' %> + +<%= stylesheet_link_tag "fullcalendar"%> +<%= stylesheet_link_tag "calendar"%> + +
+
+
+ + +
+
+

+
+
+
+
+ + + + +
+
+ +
+
+
+
+
+
+
+
+
+ + +
Loading...
+
+
+
+
+<%if is_manager?%> +
+ <%= link_to "Add", new_panel_calendar_new_back_end_event_path, :class => "btn btn-primary pull-right", :id=>"create_event_btn", :ref=>"add-btn" %> +
+
+
+ + +<%end%> \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/config/locales/en.yml b/vendor/built_in_modules/calendar_new/config/locales/en.yml index ec356548e..52e9b16db 100644 --- a/vendor/built_in_modules/calendar_new/config/locales/en.yml +++ b/vendor/built_in_modules/calendar_new/config/locales/en.yml @@ -1,5 +1,6 @@ en: calendar: + all: All calendar: Calendar calendars: Calendars color: Color diff --git a/vendor/built_in_modules/calendar_new/config/routes.rb b/vendor/built_in_modules/calendar_new/config/routes.rb index 2faf9f0d1..3cc9d7266 100644 --- a/vendor/built_in_modules/calendar_new/config/routes.rb +++ b/vendor/built_in_modules/calendar_new/config/routes.rb @@ -6,6 +6,10 @@ Rails.application.routes.draw do match 'events/agenda' => 'events#agenda', :as => :agenda resources :events end + namespace :front_end do + match 'events/agenda' => 'events#agenda', :as => :agenda + resources :events + end end end end diff --git a/vendor/built_in_modules/calendar_new/init.rb b/vendor/built_in_modules/calendar_new/init.rb index 3af664a04..11695f673 100644 --- a/vendor/built_in_modules/calendar_new/init.rb +++ b/vendor/built_in_modules/calendar_new/init.rb @@ -9,6 +9,17 @@ module CalendarNew author "RD dep" intro "I am intro" update_info 'some update_info' + + authorizable + categorizable + taggable + category_customizable + + front_end do + app_page 'events' do + frontend_i18n "calendar_new.frontend.events" + end + end side_bar do head_label_i18n 'calendar.calendar',:icon_class=>"icons-calendar" @@ -18,17 +29,28 @@ module CalendarNew head_link_path "panel_calendar_new_back_end_events_path" - context_link 'calendar.new_category', - :link_path=>"new_panel_calendar_new_back_end_event_category_path" , + context_link 'calendar.categories', + :link_path=>"admin_module_app_categories_path(get_module_app)" , :priority=>3, - :active_for_action=>{:event_categories=>:new}, + :active_for_category => 'CalendarNew', :available_for => [:manager] context_link 'calendar.categories', - :link_path=>"panel_calendar_new_back_end_event_categories_path" , - :priority=>2, - :active_for_action=>{:event_categories=>:index}, + :link_path=>"admin_module_app_categories_path(get_module_app)" , + :priority=>3, + :active_for_category => 'CalendarNew', :available_for => [:manager] + context_link 'tags', + :link_path=>"admin_module_tags_path(module_app_id: get_module_app)" , + :priority=>4, + :active_for_tag => 'CalendarNew', + :available_for => [:manager] + + context_link 'module_authorization', + :link_path=>"admin_authorizations_path(get_module_app.key)", + :priority=>6, + :available_for => [:manager] + end end end