From e57a05baac9d73173ec3415bbe6c8965a5497f87 Mon Sep 17 00:00:00 2001 From: "mattwillis%gmail.com" Date: Wed, 29 Dec 2004 21:58:04 +0000 Subject: [PATCH] bug 272732 fixes window title regression r=pavlov@pavlov.net --- calendar/resources/content/eventDialog.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/calendar/resources/content/eventDialog.js b/calendar/resources/content/eventDialog.js index 199101e28dcc..deef5f22ad79 100644 --- a/calendar/resources/content/eventDialog.js +++ b/calendar/resources/content/eventDialog.js @@ -142,6 +142,7 @@ function loadCalendarEventDialog() /* uh... */ dump("got a bogus event\n"); } + debug("title: "+title); //document.getElementById("calendar-new-component-window").setAttribute("title", title); document.title = title; @@ -1529,6 +1530,7 @@ function processAlarmType() function processComponentType() { + var title; var componentMenu = document.getElementById("component-type"); if( componentMenu.selectedItem) { debug("processComponentType: " + componentMenu.selectedItem.value ); @@ -1565,11 +1567,12 @@ function processComponentType() // Set menubar title correctly - New vs. Edit if( "new" == args.mode ) - title = document.getElementById( "data-event-title-new" ); + title = document.getElementById( "data-event-title-new" ).getAttribute("value"); else - title = document.getElementById( "data-event-title-edit" ); - //document.title = title; - document.getElementById("calendar-new-component-window").setAttribute("title", title); + title = document.getElementById( "data-event-title-edit" ).getAttribute("value"); + debug("title: "+title); + //document.getElementById("calendar-new-component-window").setAttribute("title", title); + document.title = title; break; case "ICAL_COMPONENT_TODO": @@ -1601,11 +1604,12 @@ function processComponentType() // Set menubar title correctly - New vs. Edit if( "new" == args.mode ) - title = document.getElementById( "data-todo-title-new" ); + title = document.getElementById( "data-todo-title-new" ).getAttribute("value"); else - title = document.getElementById( "data-todo-title-edit" ); - //document.title = title; - document.getElementById("calendar-new-component-window").setAttribute("title", title); + title = document.getElementById( "data-todo-title-edit" ).getAttribute("value"); + debug("title: "+title); + //document.getElementById("calendar-new-component-window").setAttribute("title", title); + document.title = title; break; //case "ICAL_COMPONENT_JOURNAL":