diff --git a/index.html b/index.html index dd193db..c070403 100644 --- a/index.html +++ b/index.html @@ -35,6 +35,9 @@ -moz-box-sizing: content-box; box-sizing: content-box; } + code { + white-space: pre-line; + }
@@ -221,6 +224,31 @@buttons
+ {
+ navBegin: "To beginning",
+ navEnd: "To end",
+ navNextDay: "Next day",
+ navNextPage: "Next page",
+ navNextWeek: "Next week",
+ navNow: "Now",
+ navPrevDay: "Previous day",
+ navPrevPage: "Previous page",
+ navPrevWeek: "Previous week",
+ navZoomIn: "Zoom in",
+ navZoomOut: "Zoom out"
+ }
+
+ onItemClick
diff --git a/js/jquery.fn.gantt.js b/js/jquery.fn.gantt.js
index 564f419..20e3fdd 100644
--- a/js/jquery.fn.gantt.js
+++ b/js/jquery.fn.gantt.js
@@ -180,6 +180,19 @@
dow: ["S", "M", "T", "W", "T", "F", "S"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
waitText: "Please wait...",
+ buttons: {
+ navBegin: "To beginning",
+ navEnd: "To end",
+ navNextDay: "Next day",
+ navNextPage: "Next page",
+ navNextWeek: "Next week",
+ navNow: "Now",
+ navPrevDay: "Previous day",
+ navPrevPage: "Previous page",
+ navPrevWeek: "Previous week",
+ navZoomIn: "Zoom in",
+ navZoomOut: "Zoom out"
+ },
// navigation
navigate: "buttons",
scrollToToday: true,
@@ -803,6 +816,7 @@
.append($('')
.append($('')
.append($('')
+ .attr('title', settings.buttons.navPrevPage)
.html('<')
.click(function () {
core.navigatePage(element, -1);
@@ -811,16 +825,19 @@
.append($('')
.html(element.pageNum + 1 + ' / ' + element.pageCount)))
.append($('')
+ .attr('title', settings.buttons.navNextPage)
.html('>')
.click(function () {
core.navigatePage(element, 1);
}))
.append($('')
+ .attr('title', settings.buttons.navNow)
.html('●')
.click(function () {
core.navigateTo(element, 'now');
}))
.append($('')
+ .attr('title', settings.buttons.navPrevWeek)
.html('<<')
.click(function () {
if (settings.scale === 'hours') {
@@ -834,6 +851,7 @@
}
}))
.append($('')
+ .attr('title', settings.buttons.navPrevDay)
.html('<')
.click(function () {
if (settings.scale === 'hours') {
@@ -864,6 +882,7 @@
)
.append($('')
.append($('')
+ .attr('title', settings.buttons.navNextDay)
.html('>')
.click(function () {
if (settings.scale === 'hours') {
@@ -877,6 +896,7 @@
}
}))
.append($('')
+ .attr('title', settings.buttons.navNextWeek)
.html('>>')
.click(function () {
if (settings.scale === 'hours') {
@@ -890,11 +910,13 @@
}
}))
.append($('')
+ .attr('title', settings.buttons.navZoomIn)
.html('+')
.click(function () {
core.zoomInOut(element, -1);
}))
.append($('')
+ .attr('title', settings.buttons.navZoomOut)
.html('-')
.click(function () {
core.zoomInOut(element, 1);
@@ -908,6 +930,7 @@
} else {
ganttNavigate = $('')
.append($('')
+ .attr('title', settings.buttons.navPrevPage)
.html('<')
.click(function () {
core.navigatePage(element, -1);
@@ -916,51 +939,61 @@
.append($('')
.html(element.pageNum + 1 + ' / ' + element.pageCount)))
.append($('')
+ .attr('title', settings.buttons.navNextPage)
.html('>')
.click(function () {
core.navigatePage(element, 1);
}))
.append($('')
+ .attr('title', settings.buttons.navBegin)
.html('|<')
.click(function () {
core.navigateTo(element, 'begin');
}))
.append($('')
+ .attr('title', settings.buttons.navPrevWeek)
.html('<<')
.click(function () {
core.navigateTo(element, tools.getCellSize() * 7);
}))
.append($('')
+ .attr('title', settings.buttons.navPrevDay)
.html('<')
.click(function () {
core.navigateTo(element, tools.getCellSize());
}))
.append($('')
+ .attr('title', settings.buttons.navNow)
.html('●')
.click(function () {
core.navigateTo(element, 'now');
}))
.append($('')
+ .attr('title', settings.buttons.navNextDay)
.html('>')
.click(function () {
core.navigateTo(element, tools.getCellSize() * -1);
}))
.append($('')
+ .attr('title', settings.buttons.navNextWeek)
.html('>>')
.click(function () {
core.navigateTo(element, tools.getCellSize() * -7);
}))
.append($('')
+ .attr('title', settings.buttons.navEnd)
.html('>|')
.click(function () {
core.navigateTo(element, 'end');
}))
.append($('')
+ .attr('title', settings.buttons.navZoomIn)
.html('+')
.click(function () {
core.zoomInOut(element, -1);
}))
.append($('')
+ .attr('title', settings.buttons.navZoomOut)
.html('-')
.click(function () {
core.zoomInOut(element, 1);