Fix bug 525430 - Task view doesn't show the attachments for selected tasks. r=philipp
This commit is contained in:
Родитель
0b0f43ff1f
Коммит
2a1e21b338
|
@ -153,11 +153,21 @@ var taskDetailsView = {
|
|||
var description = item.hasProperty("DESCRIPTION") ? item.getProperty("DESCRIPTION") : null;
|
||||
textbox.value = description;
|
||||
textbox.inputField.readOnly = true;
|
||||
var gURL = item.getProperty("URL");
|
||||
if (displayElement("calendar-task-details-attachment-row", gURL && gURL.length)) {
|
||||
var urlLabel = document.getElementById("calendar-task-details-attachment");
|
||||
urlLabel.value = gURL;
|
||||
urlLabel.setAttribute("tooltiptext", gURL);
|
||||
let attachmentRows = document.getElementById("calendar-task-details-attachment-rows");
|
||||
removeChildren(attachmentRows);
|
||||
let attachments = item.getAttachments({});
|
||||
if (displayElement("calendar-task-details-attachment-row", attachments.length > 0)) {
|
||||
displayElement("calendar-task-details-attachment-rows", true);
|
||||
for each (let attachment in attachments) {
|
||||
let url = attachment.calIAttachment.uri.spec
|
||||
let urlLabel = createXULElement("label");
|
||||
urlLabel.setAttribute("value", url);
|
||||
urlLabel.setAttribute("tooltiptext", url);
|
||||
urlLabel.setAttribute("class", "text-link");
|
||||
urlLabel.setAttribute("crop", "end");
|
||||
urlLabel.setAttribute("onclick", "launchBrowser(this.value)");
|
||||
attachmentRows.appendChild(urlLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,13 +188,16 @@
|
|||
<hbox id="calendar-task-details-attachment-row"
|
||||
align="top"
|
||||
hidden="true">
|
||||
<label value="&event.attachments.label;"
|
||||
class="task-details-name"/>
|
||||
<label id="calendar-task-details-attachment"
|
||||
class="text-link"
|
||||
crop="end"
|
||||
flex="1"
|
||||
onclick="launchBrowser(this.value)"/>
|
||||
<hbox pack="end">
|
||||
<label value="&calendar.task-details.attachments.label;"
|
||||
class="task-details-name"/>
|
||||
</hbox>
|
||||
<vbox id="calendar-task-details-attachment-rows"
|
||||
align="top"
|
||||
flex="1"
|
||||
style="overflow: auto;"
|
||||
hidden="true">
|
||||
</vbox>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
#calendar-header-name-column {
|
||||
#calendar-header-name-column,
|
||||
#calendar-task-details-attachment-row > hbox {
|
||||
width: 7em;
|
||||
}
|
||||
|
||||
|
@ -83,7 +84,14 @@
|
|||
color: #888a85; /* lower contrast */
|
||||
}
|
||||
|
||||
#calendar-task-details-attachment,
|
||||
#calendar-task-details-attachment-row {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
#calendar-task-details-attachment-rows {
|
||||
max-height: 60px;
|
||||
}
|
||||
|
||||
.task-details-value {
|
||||
text-align: left;
|
||||
background-color: transparent;
|
||||
|
|
|
@ -49,7 +49,8 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
#calendar-header-name-column {
|
||||
#calendar-header-name-column,
|
||||
#calendar-task-details-attachment-row > hbox {
|
||||
width: 7.7em;
|
||||
}
|
||||
|
||||
|
@ -88,7 +89,14 @@
|
|||
color: #888a85; /* lower contrast */
|
||||
}
|
||||
|
||||
#calendar-task-details-attachment,
|
||||
#calendar-task-details-attachment-row {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
#calendar-task-details-attachment-rows {
|
||||
max-height: 60px;
|
||||
}
|
||||
|
||||
.task-details-value {
|
||||
text-align: left;
|
||||
background-color: transparent;
|
||||
|
|
|
@ -151,6 +151,7 @@
|
|||
<!ENTITY calendar.task-details.status.label "status">
|
||||
<!ENTITY calendar.task-details.category.label "category">
|
||||
<!ENTITY calendar.task-details.repeat.label "repeat">
|
||||
<!ENTITY calendar.task-details.attachments.label "attachments">
|
||||
|
||||
<!ENTITY calendar.task.category.button.tooltip "Categorize tasks">
|
||||
<!ENTITY calendar.task.complete.button.tooltip "Mark selected tasks completed">
|
||||
|
|
Загрузка…
Ссылка в новой задаче