зеркало из https://github.com/mozilla/pjs.git
Bug 326562 No 'Visit URL' button in the new event dialog, r=dmose
This commit is contained in:
Родитель
1f53240c35
Коммит
419b6c1394
|
@ -911,6 +911,9 @@ function loadDetails() {
|
|||
updateAlarm();
|
||||
|
||||
updateTaskAlarmWarnings();
|
||||
|
||||
updateURL();
|
||||
return;
|
||||
}
|
||||
|
||||
function updateToDoStatus(status, passedInCompletedDate)
|
||||
|
@ -975,3 +978,38 @@ function updateToDoStatus(status, passedInCompletedDate)
|
|||
disableElement("completed-date-picker");
|
||||
}
|
||||
}
|
||||
|
||||
function updateURL(aValue)
|
||||
{
|
||||
var button = document.getElementById("load-url-button");
|
||||
button.setAttribute("disabled", true)
|
||||
|
||||
if (!aValue) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The user might have just put in 'www.foo.com', correct that here
|
||||
if (aValue.indexOf( ":" ) == -1) {
|
||||
aValue = "http://" + aValue;
|
||||
}
|
||||
try {
|
||||
makeURL(aValue);
|
||||
// If we made it this far, that means it's a valid url
|
||||
button.removeAttribute("disabled");
|
||||
} catch(ex) {}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function loadURL()
|
||||
{
|
||||
var url = getElementValue("item-url");
|
||||
|
||||
// The user might have just put in 'www.foo.com', correct that here
|
||||
if (url.indexOf( ":" ) == -1) {
|
||||
url = "http://" + url;
|
||||
}
|
||||
|
||||
launchBrowser(url);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
<script type="application/x-javascript" src="chrome://calendar/content/calendar-event-dialog.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendar-dialog-utils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendarUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/applicationUtil.js"/>
|
||||
|
||||
<!-- Used for the button to show/hide details -->
|
||||
<script type="application/x-javascript">
|
||||
|
@ -281,7 +282,11 @@
|
|||
|
||||
<row align="center" details="true">
|
||||
<label value="&newevent.uri.label;"/>
|
||||
<textbox id="item-url"/>
|
||||
<hbox flex="1">
|
||||
<textbox id="item-url" flex="1" oninput="updateURL(this.value)"/>
|
||||
<button id="load-url-button" oncommand="loadURL()"
|
||||
label="&newevent.uri.visit.label;"/>
|
||||
</hbox>
|
||||
</row>
|
||||
|
||||
<row class="todo-only" details="true">
|
||||
|
|
|
@ -23,6 +23,7 @@ en-US.jar:
|
|||
locale/en-US/lightning/lightning.properties (locale/lightning.properties)
|
||||
|
||||
calendar.jar:
|
||||
* content/calendar/applicationUtil.js (/calendar/resources/content/applicationUtil.js)
|
||||
content/calendar/calendarProperties.xul (/calendar/resources/content/calendarProperties.xul)
|
||||
content/calendar/calendarProperties.js (/calendar/resources/content/calendarProperties.js)
|
||||
content/calendar/calendarCreation.xul (/calendar/resources/content/calendarCreation.xul)
|
||||
|
|
Загрузка…
Ссылка в новой задаче