incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [2/2] git commit: [#6293] ticket:371 add tag when saving the ticket
Date Thu, 27 Jun 2013 14:51:48 GMT
[#6293] ticket:371 add tag when saving the ticket


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7aad53fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7aad53fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7aad53fa

Branch: refs/heads/master
Commit: 7aad53fa16ed2140ed03f03b758a42a4dbfba12f
Parents: 57067cf
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Wed Jun 19 10:29:43 2013 +0400
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Thu Jun 27 14:51:17 2013 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/widgets/ticket_form.py | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7aad53fa/ForgeTracker/forgetracker/widgets/ticket_form.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/widgets/ticket_form.py b/ForgeTracker/forgetracker/widgets/ticket_form.py
index 3a00389..3763ea1 100644
--- a/ForgeTracker/forgetracker/widgets/ticket_form.py
+++ b/ForgeTracker/forgetracker/widgets/ticket_form.py
@@ -142,6 +142,12 @@ class TicketForm(GenericTicketForm):
                 $('#show_attach').hide();
             });
             $('form').submit(function() {
+                var value = $('div.tagsinput div input').val();
+                var exists = $('input.label_edit').tagExist(value);
+                var default_value =$('div.tagsinput div input').attr('data-default');
+                if ((value != default_value) && (!exists) && value != ''){
+                    $('input.label_edit').addTag(value);
+                }
                 $('input[type=submit]', this).attr('disabled', 'disabled');
             });
             $('div.reply.discussion-post a.markdown_preview').click(function(){


Mime
View raw message