Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-15 21:54:39 +0400
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-15 21:54:39 +0400
commitf77986bf5efc95c3447302acec50348244b74a64 (patch)
treee64cc06d6f704673e4495caeea749ceb9f51eb91 /app/views
parent975d13c734b813feb46be893ddff858d1d4b010b (diff)
parent3226b4fe7a00b3543ac3c81d1475dd860adaff98 (diff)
Merge branch 'issue_im'
Conflicts: config/initializers/rails_footnotes.rb
Diffstat (limited to 'app/views')
-rw-r--r--app/views/issues/_show.html.haml1
-rw-r--r--app/views/issues/index.html.haml26
-rw-r--r--app/views/issues/index.js.haml1
3 files changed, 28 insertions, 0 deletions
diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml
index 131d0d4c8a2..30157257ff5 100644
--- a/app/views/issues/_show.html.haml
+++ b/app/views/issues/_show.html.haml
@@ -1,5 +1,6 @@
%tr{ :id => dom_id(issue), :class => "issue", :url => project_issue_path(@project, issue) }
%td
+ = image_tag "move.png" , :class => [:handle, :left]
= image_tag gravatar_icon(issue.assignee.email), :class => "left", :width => 40, :style => "padding:0 5px;"
= truncate issue.assignee.name, :lenght => 20
%td ##{issue.id}
diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml
index 7157d2c385d..6f4548a8066 100644
--- a/app/views/issues/index.html.haml
+++ b/app/views/issues/index.html.haml
@@ -22,3 +22,29 @@
:javascript
$('.delete-issue').live('ajax:success', function() {
$(this).closest('tr').fadeOut(); });
+
+ function setSortable(){
+ $('#issues-table>tbody').sortable({
+ axis: 'y',
+ dropOnEmpty: false,
+ handle: '.handle',
+ cursor: 'crosshair',
+ items: 'tr',
+ opacity: 0.4,
+ scroll: true,
+ update: function(){
+ $.ajax({
+ type: 'post',
+ data: $('#issues-table>tbody').sortable('serialize'),
+ dataType: 'script',
+ complete: function(request){
+ $('#issues-table>tbody').effect('highlight');
+ },
+ url: "#{sort_project_issues_path(@project)}"})
+ }
+ });
+ }
+
+ $(function(){
+ setSortable();
+ });
diff --git a/app/views/issues/index.js.haml b/app/views/issues/index.js.haml
index 1f051309233..bc18ac15151 100644
--- a/app/views/issues/index.js.haml
+++ b/app/views/issues/index.js.haml
@@ -1,2 +1,3 @@
:plain
$('#issues-table-holder').html("#{escape_javascript(render('issues'))}");
+ setSortable();