Как изменить значение всплывающего окна Kendo
Я использую планировщик Kendo UI и хочу настроить всплывающее окно. Я искал в их документации, и я не нашел ничего подобного.
В основном, я хочу знать одну вещь:
При двойном щелчке по ячейке планировщика появляется всплывающее окно. Заголовок имеет значение по умолчанию - "Без заголовка", но если вы удалите его и дважды щелкните по входу, появится новое значение - "Замены". Это другое значение по умолчанию, или это значение извлекается откуда-то? (где?)
3 ответа
Решение
Если вы просматриваете HTML-код страницы учебника вы видите
schema: {
model: {
id: "taskId",
fields: {
taskId: { from: "TaskID", type: "number" },
//*** In this line you can change title default value //// title: { from: "Title", defaultValue: "No title", validation: { // required: true } },
start: { type: "date", from: "Start" },
end: { type: "date", from: "End" },
startTimezone: { from: "StartTimezone" },
endTimezone: { from: "EndTimezone" },
description: { from: "Description" },
recurrenceId: { from: "RecurrenceID" },
recurrenceRule: { from: "RecurrenceRule" },
recurrenceException: { from: "RecurrenceException" },
ownerId: { from: "OwnerID", defaultValue: 1 },
isAllDay: { type: "boolean", from: "IsAllDay" }
}
}
},
Вам нужно добавить в
$("#scheduler").kendoScheduler({
editable: {
template: $("#editor").html()
},
...
и добавьте шаблон
<script id="editor" type="text/x-kendo-template">
<p><label>Task Id: <input name="taskId" id="taskId" /></label></p>
<p><label>Title: <input name="title" id="title"/></label></p>
...
</script>
in the event message of the scheduler you can to do it:
messages: {
editor: {
title: "Nombre",
start: "Fecha Inicio",
end: "Fecha Final",
allDayEvent: "Todo el día",
repeat: "Repetir",
description: "Descripción"
},
recurrenceEditor: {
daily: {
interval: " día(s)",
repeatEvery: "Repetir cada "
},
end: {
never: " Nunca",
after: " Despues de ",
on: " el ",
label: "Finalizar: ",
occurrence: " veces "
},
weekly: {
repeatEvery: "Repetir cada: ",
interval: " semana(s).",
repeatOn: "Repetir los: "
},
monthly: {
repeatEvery: "Repetir cada : ",
interval: " mes(es).",
repeatOn: "Repetir el: ",
day: " día "
},
yearly: {
repeatOn: "Repetir cada: ",
interval: " año(s).",
repeatOn: "Repetir en: ",
of: " de "
},
frequencies: {
never: "Nunca",
daily: "Diariamente",
weekly: "Semanalmente",
monthly: "Mensualmente",
yearly: "Anualmente"
},
offsetPositions: {
first: "primer",
second: "segundo",
third: "tercer",
fourth: "cuarto",
last: "último"
},
weekdays: {
weekday: "Día de la semana",
weekend: "Fin de semana"
}
}
}
ССЫЛКА: http://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler