Monotone-Parent: 437fac2430280df37d483569496666d9d69454cd
Monotone-Revision: e433ae535cede58cecc04ea6e4733015deeea548 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2007-11-16T19:38:49 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
dd5d07c5fb
commit
15218ac087
|
@ -335,18 +335,18 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="buttons">
|
||||
<var:if condition="canCreateOrModify"
|
||||
><input
|
||||
type="submit"
|
||||
class="button"
|
||||
label:value="Save"
|
||||
name="save:method" /></var:if>
|
||||
<input
|
||||
type="submit"
|
||||
class="button"
|
||||
label:value="Cancel"
|
||||
name="cancel"
|
||||
onclick="window.close(); return false;" />
|
||||
<var:if condition="canCreateOrModify"
|
||||
><input
|
||||
type="submit"
|
||||
class="button"
|
||||
label:value="Save"
|
||||
name="save:method" /></var:if>
|
||||
</div>
|
||||
</form>
|
||||
</var:component>
|
||||
|
|
|
@ -10,13 +10,12 @@
|
|||
<var:foreach list="toolbarConfig" item="toolbarGroup"
|
||||
><var:foreach list="toolbarGroup" item="buttonInfo"
|
||||
><var:if condition="isButtonEnabled"
|
||||
><a class="toolbarButton"
|
||||
><button class="toolbarButton"
|
||||
var:href="buttonInfo.link"
|
||||
var:target="buttonInfo.target"
|
||||
var:onclick="buttonInfo.onclick"
|
||||
var:title="buttonTooltip"
|
||||
><span class="toolbarButton"
|
||||
><img class="buttonImage"
|
||||
><img class="buttonImage"
|
||||
var:src="buttonImage"
|
||||
var:alt="buttonTooltip"
|
||||
/><var:if condition="hasMenu"
|
||||
|
@ -29,8 +28,7 @@
|
|||
><var:string
|
||||
value="buttonLabel"
|
||||
/></span
|
||||
></span
|
||||
></a
|
||||
></button
|
||||
></var:if
|
||||
><var:if condition="isButtonEnabled"
|
||||
const:negate="YES"
|
||||
|
|
|
@ -261,10 +261,12 @@ TABLE#dateSelectorTable
|
|||
{ background-color: #deebf7;
|
||||
border: 1px solid #deebf7; }
|
||||
|
||||
#dateSelector TD.dayOfToday._selected
|
||||
{ background-color: #4b6983; }
|
||||
|
||||
#dateSelector TD._selected A
|
||||
{ color: #fff; }
|
||||
|
||||
|
||||
TABLE#eventsList
|
||||
{ width: 100%; }
|
||||
|
||||
|
@ -283,10 +285,8 @@ TABLE#eventsList TH
|
|||
._unfocused#dateSelector TD._selected,
|
||||
UL._unfocused > LI._selected,
|
||||
TABLE._unfocused#eventsList TR._selected TD
|
||||
{
|
||||
background-color: #d4d0c8 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
{ background-color: #d4d0c8 !important;
|
||||
color: #fff !important; }
|
||||
|
||||
SPAN.dayCellLabel
|
||||
{ color: #77a;
|
||||
|
|
|
@ -452,7 +452,7 @@ function restoreCurrentDaySelection(div) {
|
|||
}
|
||||
|
||||
function changeDateSelectorDisplay(day, keepCurrentDay) {
|
||||
var url = ApplicationBaseURL + "/dateselector";
|
||||
var url = ApplicationBaseURL + "dateselector";
|
||||
if (day)
|
||||
url += "?day=" + day;
|
||||
|
||||
|
@ -480,7 +480,7 @@ function changeDateSelectorDisplay(day, keepCurrentDay) {
|
|||
}
|
||||
|
||||
function changeCalendarDisplay(data, newView) {
|
||||
var url = ApplicationBaseURL + "/" + ((newView) ? newView : currentView);
|
||||
var url = ApplicationBaseURL + ((newView) ? newView : currentView);
|
||||
|
||||
selectedCalendarCell = null;
|
||||
|
||||
|
@ -493,9 +493,55 @@ function changeCalendarDisplay(data, newView) {
|
|||
|
||||
if (!day)
|
||||
day = currentDay;
|
||||
if (day)
|
||||
url += "?day=" + day;
|
||||
|
||||
if (day) {
|
||||
var divs = $$('div.day[day='+day+']');
|
||||
if (divs.length > 0) {
|
||||
// Don't reload the view if the event is present in current view
|
||||
|
||||
// Find day number
|
||||
var dayNumber;
|
||||
var classes = $w(divs[0].className);
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
if (classes[i] == 'day')
|
||||
continue;
|
||||
if (classes[i] == 'selectedDay')
|
||||
break;
|
||||
dayNumber = classes[i];
|
||||
break;
|
||||
}
|
||||
|
||||
// Deselect previous day
|
||||
var selectedDivs = $$('div.day.selectedDay');
|
||||
selectedDivs.each(function(div) {
|
||||
div.removeClassName('selectedDay');
|
||||
});
|
||||
|
||||
// Select new day
|
||||
selectedDivs = $$('div.day.'+dayNumber);
|
||||
selectedDivs.each(function(div) {
|
||||
div.addClassName('selectedDay');
|
||||
});
|
||||
|
||||
// Deselect day in date selector
|
||||
if (document.selectedDate)
|
||||
document.selectedDate.deselect();
|
||||
|
||||
// Select day in date selector
|
||||
var selectedLink = $$('table#dateSelectorTable a[day='+day+']');
|
||||
if (selectedLink.length > 0) {
|
||||
selectedCell = selectedLink[0].up(1);
|
||||
selectedCell.select();
|
||||
document.selectedDate = selectedCell;
|
||||
}
|
||||
|
||||
// Scroll to event
|
||||
scrollDayView(scrollEvent);
|
||||
|
||||
return false;
|
||||
}
|
||||
url += "?day=" + day;
|
||||
}
|
||||
// if (newView)
|
||||
// log ("switching to view: " + newView);
|
||||
// log ("changeCalendarDisplay: " + url);
|
||||
|
@ -538,18 +584,24 @@ function onMonthOverview() {
|
|||
}
|
||||
|
||||
function scrollDayView(scrollEvent) {
|
||||
|
||||
if (currentView == "monthview")
|
||||
return;
|
||||
|
||||
var offset = 0;
|
||||
var daysView = $("daysView");
|
||||
var hours =
|
||||
$(daysView.childNodesWithTag("div")[0]).childNodesWithTag("div");
|
||||
|
||||
if (scrollEvent && scrollEvent.siblings) {
|
||||
var classes = scrollEvent.siblings[0].getAttribute("class").split(" ");
|
||||
for (var i = 0; i < classes.length; i++)
|
||||
if (scrollEvent) {
|
||||
var divs = $$("div#calendarContent div." + eventClass(scrollEvent));
|
||||
var classes = $w(divs[0].className);
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
if (classes[i].startsWith("starts")) {
|
||||
var starts = Math.floor(parseInt(classes[i].substr(6)) / 4);
|
||||
offset = hours[starts].offsetTop;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
offset = hours[8].offsetTop;
|
||||
|
@ -564,7 +616,7 @@ function onClickableCellsDblClick(event) {
|
|||
event.returnValue = false;
|
||||
}
|
||||
|
||||
function refreshCalendarEvents() {
|
||||
function refreshCalendarEvents(scrollEvent) {
|
||||
var todayDate = new Date();
|
||||
var sd;
|
||||
var ed;
|
||||
|
@ -610,7 +662,7 @@ function refreshCalendarEvents() {
|
|||
var url = ApplicationBaseURL + "/eventslist?sd=" + sd + "&ed=" + ed;
|
||||
document.refreshCalendarEventsAjaxRequest
|
||||
= triggerAjaxRequest(url, refreshCalendarEventsCallback,
|
||||
{"startDate": sd, "endDate": ed});
|
||||
{"startDate": sd, "endDate": ed, "scrollEvent": scrollEvent});
|
||||
}
|
||||
|
||||
function refreshCalendarEventsCallback(http) {
|
||||
|
@ -625,6 +677,8 @@ function refreshCalendarEventsCallback(http) {
|
|||
http.callbackData["startDate"],
|
||||
http.callbackData["endDate"]);
|
||||
}
|
||||
if (http.callbackData["scrollEvent"])
|
||||
scrollDayView(http.callbackData["scrollEvent"]);
|
||||
}
|
||||
else
|
||||
log("AJAX error when refreshing calendar events");
|
||||
|
@ -655,7 +709,6 @@ function drawCalendarEvent(eventData, sd, ed) {
|
|||
var startHour = null;
|
||||
var endHour = null;
|
||||
|
||||
var siblings = new Array();
|
||||
for (var i = 0; i < days.length; i++)
|
||||
if (days[i].earlierDate(viewStartDate) == viewStartDate
|
||||
&& days[i].laterDate(viewEndDate) == viewEndDate) {
|
||||
|
@ -687,8 +740,6 @@ function drawCalendarEvent(eventData, sd, ed) {
|
|||
|
||||
var eventDiv = newEventDIV(eventData[0], eventData[1], starts, lasts,
|
||||
null, null, title);
|
||||
siblings.push(eventDiv);
|
||||
eventDiv.siblings = siblings;
|
||||
var dayString = days[i].getDayString();
|
||||
// log("day: " + dayString);
|
||||
var parentDiv = null;
|
||||
|
@ -731,18 +782,20 @@ function drawCalendarEvent(eventData, sd, ed) {
|
|||
if (parentDiv)
|
||||
parentDiv.appendChild(eventDiv);
|
||||
}
|
||||
|
||||
var eventTR = $(eventData[0]);
|
||||
if (eventTR)
|
||||
eventTR.siblings = siblings;
|
||||
}
|
||||
|
||||
function eventClass(cname) {
|
||||
return escape(cname.replace(".", "-"));
|
||||
}
|
||||
|
||||
|
||||
function newEventDIV(cname, calendar, starts, lasts,
|
||||
startHour, endHour, title) {
|
||||
var eventDiv = document.createElement("div");
|
||||
eventDiv.cname = escape(cname);
|
||||
eventDiv.calendar = calendar;
|
||||
$(eventDiv).addClassName("event");
|
||||
$(eventDiv).addClassName(eventClass(cname));
|
||||
$(eventDiv).addClassName("starts" + starts);
|
||||
$(eventDiv).addClassName("lasts" + lasts);
|
||||
for (var i = 1; i < 5; i++) {
|
||||
|
@ -800,12 +853,11 @@ function calendarDisplayCallback(http) {
|
|||
var contentView;
|
||||
if (currentView == "monthview")
|
||||
contentView = $("calendarContent");
|
||||
else {
|
||||
var scrollEvent = http.callbackData.scrollEvent;
|
||||
scrollDayView($(scrollEvent));
|
||||
else
|
||||
contentView = $("daysView");
|
||||
}
|
||||
refreshCalendarEvents();
|
||||
|
||||
refreshCalendarEvents(http.callbackData.scrollEvent);
|
||||
|
||||
var days = document.getElementsByClassName("day", contentView);
|
||||
if (currentView == "monthview")
|
||||
for (var i = 0; i < days.length; i++) {
|
||||
|
@ -980,9 +1032,9 @@ function onListFilterChange() {
|
|||
|
||||
function onEventClick(event) {
|
||||
changeCalendarDisplay( { "day": this.day,
|
||||
"scrollEvent": this.getAttribute("id") } );
|
||||
"scrollEvent": this.getAttribute("id") } );
|
||||
changeDateSelectorDisplay(this.day);
|
||||
|
||||
|
||||
return onRowClick(event);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,9 +10,8 @@ function onPopupAttendeesWindow(event) {
|
|||
function onSelectPrivacy(event) {
|
||||
if (event.button == 0 || (isSafari() && event.button == 1)) {
|
||||
var node = getTarget(event);
|
||||
if (node.tagName != 'A')
|
||||
node = $(node).getParentWithTagName("a");
|
||||
node = $(node).childNodesWithTag("span")[0];
|
||||
if (node.tagName != 'BUTTON')
|
||||
node = $(node).up("button");
|
||||
popupToolbarMenu(node, "privacy-menu");
|
||||
Event.stop(event);
|
||||
// preventDefault(event);
|
||||
|
|
|
@ -33,7 +33,7 @@ IMG#progressIndicator
|
|||
margin-top: 1.5em;
|
||||
margin-right: 1em; }
|
||||
|
||||
SPAN#toolbar IMG#progressIndicator
|
||||
DIV#toolbar IMG#progressIndicator
|
||||
{ margin-top: 0.75em; }
|
||||
|
||||
DIV#pageContent
|
||||
|
@ -232,12 +232,14 @@ SPAN.toolbarSeparator
|
|||
width: 0px;
|
||||
padding: 0px; }
|
||||
|
||||
A.toolbarButton
|
||||
BUTTON.toolbarButton,
|
||||
SPAN.toolbarButton,
|
||||
SPAN.disabledToolbarButton
|
||||
{ color: #000;
|
||||
text-decoration: none; }
|
||||
|
||||
SPAN.toolbarButton, SPAN.disabledToolbarButton
|
||||
{ cursor: default;
|
||||
font-family: Lucida Grande, Bitstream VeraSans, Tahoma;
|
||||
font-size: 8pt;
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
display: inline;
|
||||
float: left;
|
||||
text-align: center;
|
||||
|
@ -249,12 +251,16 @@ SPAN.toolbarButton, SPAN.disabledToolbarButton
|
|||
border-bottom: 1px solid transparent;
|
||||
padding: 1px 2px;
|
||||
background-color: transparent;
|
||||
color: -moz-DialogText; }
|
||||
color: -moz-DialogText;
|
||||
overflow: visible;
|
||||
margin: 0px; }
|
||||
|
||||
SPAN.disabledToolbarButton
|
||||
{ -moz-opacity: 0.4;
|
||||
opacity: 0.4; }
|
||||
opacity: 0.4;
|
||||
padding-top: 2px; }
|
||||
|
||||
BUTTON.toolbarButton:hover,
|
||||
SPAN.toolbarButton:hover
|
||||
{ color: -moz-buttonhovertext;
|
||||
border-top: 1px solid #fff;
|
||||
|
@ -262,6 +268,7 @@ SPAN.toolbarButton:hover
|
|||
border-bottom: 1px solid #828482;
|
||||
border-right: 1px solid #828482; }
|
||||
|
||||
BUTTON.toolbarButton:active,
|
||||
SPAN.toolbarButton:active
|
||||
{ color: -moz-buttonhovertext;
|
||||
border-top: 1px solid #828482;
|
||||
|
|
Loading…
Reference in New Issue