bug 370836 - Adds more descriptive date to title bar in day view. Patch by Markus Adrario <MarkusAdrario@web.de>, r=lilmatt, ui-r=mvl

This commit is contained in:
mattwillis%gmail.com 2007-03-08 02:07:42 +00:00
Родитель d0236110d4
Коммит d1e3d2ddc3
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -100,7 +100,15 @@
.getService(Components.interfaces.nsIStringBundleService);
var brand = sbs.createBundle("chrome://branding/locale/brand.properties");
document.title = aNameArray[2] + " - " + brand.GetStringFromName("brandShortName");
var docTitle;
if (!aDate) {
docTitle = aNameArray[2];
} else {
var df = Cc["@mozilla.org/calendar/datetime-formatter;1"].
getService(Ci.calIDateTimeFormatter);
docTitle = df.formatDate(aDate);
}
document.title = docTitle + " - " + brand.GetStringFromName("brandShortName");
]]></body>
</method>
<method name="moveView">

Просмотреть файл

@ -144,7 +144,7 @@
var index = ((aDate.weekday + i + 7) % 7) + 1;
nameArray.push(calGetString("dateFormat", "day."+index+".name"));
}
document.getAnonymousElementByAttribute(this, "anonid", "nav-control").setNames(nameArray);
document.getAnonymousElementByAttribute(this, "anonid", "nav-control").setNames(nameArray, aDate);
]]></body>
</method>
</implementation>