calendar update

This commit is contained in:
devin 2012-10-30 17:26:52 +08:00 committed by chris
parent 6dd9f441ef
commit 228d43d0e2
6 changed files with 75 additions and 16 deletions

View File

@ -320,7 +320,7 @@ var calendarAPI = function(){
if(allow){ if(allow){
if(evnt.title=="Navratri") if(evnt.title=="Navratri")
console.log(pos); //console.log(pos);
if(pos == 1){ if(pos == 1){
var colspan = 0; var colspan = 0;
if(evnt.total_days>7){ if(evnt.total_days>7){
@ -643,6 +643,11 @@ var calendarAPI = function(){
$( "#dpfrom" ).datepicker( "option", "maxDate", selectedDate ); $( "#dpfrom" ).datepicker( "option", "maxDate", selectedDate );
} }
}); });
$('#open_tags_panel').click(function(){
$('#tags_panel').toggle();
$('.my_scroll').tinyscrollbar();
return false;
});
} }
c.event_create_div.load(url+"?ref="+ref+"&date="+date+"&month="+month+"&year="+year+"&time="+time+"&ses="+ses,function(){ c.event_create_div.load(url+"?ref="+ref+"&date="+date+"&month="+month+"&year="+year+"&time="+time+"&ses="+ses,function(){

View File

@ -5,4 +5,5 @@
// the compiled file. // the compiled file.
// //
//= require jquery-ui //= require jquery-ui
//= require bootstrap
//= require calendarAPI //= require calendarAPI

View File

@ -18,7 +18,6 @@
line-height: 28px; line-height: 28px;
} }
.calendar_mode { .calendar_mode {
float: right;
z-index: 2; z-index: 2;
} }
.mode_switch { .mode_switch {
@ -37,6 +36,9 @@
-webkit-box-shadow: inset 0 0 1px black; -webkit-box-shadow: inset 0 0 1px black;
-moz-box-shadow: inset 0 0 1px black; -moz-box-shadow: inset 0 0 1px black;
} }
.modal-body {
max-height: 450px;
}
.event_list_wrapper { .event_list_wrapper {
position: relative; position: relative;
} }
@ -164,7 +166,7 @@
/* agenda view */ /* agenda view */
#calendar_agenda { #calendar_agenda {
border-bottom: solid 1px #ddd; margin-top: 20px;
} }
#calendar_agenda .table { #calendar_agenda .table {
margin-bottom: 0; margin-bottom: 0;
@ -335,3 +337,24 @@
float: none; float: none;
margin: 4px 0 0 0; margin: 4px 0 0 0;
} }
/* create / edit event panel */
#tags_panel {
top: auto;
bottom: 34px;
width: 258px;
height: 170px;
padding: 8px 0;
overflow: hidden;
position: absolute;
clear: none;
}
#tags_panel .viewport {
height: 170px;
}
#tags_panel .scrollbar {
top: 8px;
}
#tags_list {
padding: 8px;
}

View File

@ -1,5 +1,5 @@
<div id="agenda_date_range" style="display:none;"> <div id="agenda_date_range" style="display:none;">
<label>From :</label> <select name="start_month" class='input-small'> <label>From</label> <select name="start_month" class='input-small'>
<% for i in 1..12 %> <% for i in 1..12 %>
<% if i == @start_month %> <% if i == @start_month %>
<option value="<%= i %>" selected="selected"><%= Date::MONTHNAMES[i] %></option> <option value="<%= i %>" selected="selected"><%= Date::MONTHNAMES[i] %></option>
@ -17,7 +17,7 @@
<% end %> <% end %>
<% end %> <% end %>
</select> </select>
<label>To :</label> <select name="end_month" class='input-small'> <label>To</label> <select name="end_month" class='input-small'>
<% for i in 1..12 %> <% for i in 1..12 %>
<% if i == @end_month %> <% if i == @end_month %>
<option value="<%= i %>" selected="selected"><%= Date::MONTHNAMES[i] %></option> <option value="<%= i %>" selected="selected"><%= Date::MONTHNAMES[i] %></option>
@ -75,7 +75,7 @@
<table class="table event_list"> <table class="table event_list">
<thead> <thead>
<tr height="0"> <tr height="0">
<th class="span2"></th> <th class="span3"></th>
<th class="span2"></th> <th class="span2"></th>
<th class=""></th> <th class=""></th>
</tr> </tr>

View File

@ -24,7 +24,7 @@
</div> </div>
</div> </div>
<div id="orbit_calendar" class="month_view"> <div id="orbit_calendar" class="month_view">
<div class="row-fluid"> <div class="row-fluid cal-fn">
<div class="span3" id='sec1'> <div class="span3" id='sec1'>
<div class="btn-toolbar" id="navigation" style="margin:0;"> <div class="btn-toolbar" id="navigation" style="margin:0;">
<div class="btn-group"> <div class="btn-group">
@ -42,16 +42,17 @@
<h4 class="current_day_title"></h4> <h4 class="current_day_title"></h4>
</div> </div>
<div class="span4" id='sec3'> <div class="span4" id='sec3'>
<div class="btn-group pull-right"> <div class="btn-toolbar" style="margin:0; text-align:right;">
<button id="refresh_btn" class="btn icon-refresh"></button> <div class="btn-group calendar_mode" data-toggle="buttons-radio">
<button class="btn mode_switch">day</button>
<button class="btn mode_switch">week</button>
<button class="btn active mode_switch">month</button>
<button class="btn mode_switch">agenda</button>
</div>
<div class="btn-group">
<button id="refresh_btn" class="btn icon-refresh"></button>
</div>
</div> </div>
<div class="btn-group calendar_mode" data-toggle="buttons-radio">
<button class="btn mode_switch">day</button>
<button class="btn mode_switch">week</button>
<button class="btn active mode_switch">month</button>
<button class="btn mode_switch">agenda</button>
</div>
</div> </div>
</div> </div>
<div id="view_holder"></div> <div id="view_holder"></div>

View File

@ -74,6 +74,35 @@
<%= f.select(:cal_id, Cal.all.collect {|p| [ p.name, p.id ] },{:prompt => t("calendar.select_calendar")},:class => "validate") %> <%= f.select(:cal_id, Cal.all.collect {|p| [ p.name, p.id ] },{:prompt => t("calendar.select_calendar")},:class => "validate") %>
</div> </div>
</div> </div>
<div class="row-fluid">
<label for="" class="control-label span3">Tags</label>
<div class="row-fluid span9 dropdown">
<button id="open_tags_panel" class="btn">Choose Tags</button>
<div id="tags_panel" class="dropdown-menu my_scroll">
<div class="scrollbar">
<div class="track">
<div class="thumb">
<div class="end"></div>
</div>
</div>
</div>
<div class="viewport">
<div class="overview">
<ul id="tags_list" class="unstyled">
<li><label for="" class="checkbox"><input type="checkbox"> tag1</label></li>
<li><label for="" class="checkbox"><input type="checkbox"> tag2</label></li>
<li><label for="" class="checkbox"><input type="checkbox"> tag3</label></li>
<li><label for="" class="checkbox"><input type="checkbox"> tag4</label></li>
<li><label for="" class="checkbox"><input type="checkbox"> tag5</label></li>
<li><label for="" class="checkbox"><input type="checkbox"> tag6</label></li>
<li><label for="" class="checkbox"><input type="checkbox"> tag7</label></li>
<li><label for="" class="checkbox"><input type="checkbox"> tag8</label></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="row-fluid"> <div class="row-fluid">
<label for="" class="control-label span3">Note</label> <label for="" class="control-label span3">Note</label>
<div class="row-fluid span9"> <div class="row-fluid span9">