summaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2017-11-25 13:51:20 +0000
committerGo MAEDA <maeda@farend.jp>2017-11-25 13:51:20 +0000
commit412aa218e8963c4e6b592def1cce47a31f1a7b30 (patch)
tree3bd1793337bdaf3b132a3342eafdb5745bbdb0ff /public/javascripts
parent980ea2160dcf9efcedc0cfae8edd0efb36f2d0f3 (diff)
downloadredmine-412aa218e8963c4e6b592def1cce47a31f1a7b30.tar.gz
redmine-412aa218e8963c4e6b592def1cce47a31f1a7b30.zip
Make gantt columns resizable (#20481).
Contributed by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17026 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/gantt.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/public/javascripts/gantt.js b/public/javascripts/gantt.js
index f83eea9f1..2e71178b0 100644
--- a/public/javascripts/gantt.js
+++ b/public/javascripts/gantt.js
@@ -173,3 +173,25 @@ function drawGanttHandler() {
if ($("#draw_relations").prop('checked'))
drawRelations();
}
+
+function resizableSubjectColumn(){
+ $('.issue-subject, .project-name, .version-name').each(function(){
+ $(this).width($(".gantt_subjects_column").width()-$(this).position().left);
+ });
+ $('td.gantt_subjects_column').resizable({
+ alsoResize: '.gantt_subjects_container, .gantt_subjects_container>.gantt_hdr, .project-name, .issue-subject, .version-name',
+ minWidth: 100,
+ handles: 'e',
+ containment: '#content',
+ create: function( event, ui ) {
+ $('.ui-resizable-e').css('cursor','ew-resize');
+ }
+ }).on('resize', function (e) {
+ e.stopPropagation();
+ });
+ if(isMobile()) {
+ $('td.gantt_subjects_column').resizable('disable');
+ }else{
+ $('td.gantt_subjects_column').resizable('enable');
+ };
+}