bodhi/templates/pkg.kid | 2 +-
bodhi/widgets.py | 13 ++++++++++---
2 files changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 40584f6da6b8f962b6520a0f0c324b6de9dfac84
Author: Till Maas <opensource(a)till.name>
Date: Fri Aug 13 17:17:28 2010 +0200
Link to gitweb instead of cvs viewvc
diff --git a/bodhi/templates/pkg.kid b/bodhi/templates/pkg.kid
index 5540687..96fda69 100644
--- a/bodhi/templates/pkg.kid
+++ b/bodhi/templates/pkg.kid
@@ -36,7 +36,7 @@
</li>
<li>
<img
src="https://fedoraproject.org/static/css/../images/icons/fedora-inf...
- <a
href="http://cvs.fedoraproject.org/viewcvs/rpms/${pkg.name}">...
Source</a>
+ <a
href="http://pkgs.fedoraproject.org/gitweb/?p=${pkg.name}.git"&...
Source</a>
</li>
</ul>
</blockquote>
commit c5ad5752b2b9322376dd20fb91c63688394c3562
Author: Till Maas <opensource(a)till.name>
Date: Sat Aug 14 13:12:18 2010 +0200
set default (un)stable karma values if re-enabled
Reset the default (un)stable karma values to (-)3 if the previous value
is 0 and the autokarma checkbox is changed from unchecked to checked.
diff --git a/bodhi/widgets.py b/bodhi/widgets.py
index 1dcd976..eb9c70e 100644
--- a/bodhi/widgets.py
+++ b/bodhi/widgets.py
@@ -125,8 +125,15 @@ class NewUpdateForm(Form):
CheckBox(name='autokarma', label='Enable karma automatism',
default=True, validator=validators.StringBool(),
attrs={'onchange':
-
'$("#form_stable_karma").attr("disabled",
!$("#form_autokarma").attr("checked"));'
-
'$("#form_unstable_karma").attr("disabled",
!$("#form_autokarma").attr("checked"));',
+ 'if
($("#form_autokarma").attr("checked")) {'
+
'$("#form_stable_karma").attr("disabled", false);'
+ 'if
($("#form_stable_karma").attr("value") == 0)
$("#form_stable_karma").attr("value", 3);'
+
'$("#form_unstable_karma").attr("disabled", false);'
+ 'if
($("#form_unstable_karma").attr("value") == 0)
$("#form_unstable_karma").attr("value", -3);'
+ ' } else { '
+
'$("#form_stable_karma").attr("disabled", true);'
+
'$("#form_unstable_karma").attr("disabled", true);'
+ '}',
'title': 'Karma Automatism - Enable update request '
'automation based on user feedback',
}),
commit 5dc3bdbcc7d6d6649878ee73042126830437cd5f
Author: Till Maas <opensource(a)till.name>
Date: Sat Aug 14 13:10:11 2010 +0200
Fix autokarma javascript disabling
Disable (un)stable karma text boxes only if the autokarma checkbox is
not checked and re-enable if it is checked.
diff --git a/bodhi/widgets.py b/bodhi/widgets.py
index eaa8706..1dcd976 100644
--- a/bodhi/widgets.py
+++ b/bodhi/widgets.py
@@ -124,9 +124,9 @@ class NewUpdateForm(Form):
'update'}),
CheckBox(name='autokarma', label='Enable karma automatism',
default=True, validator=validators.StringBool(),
- attrs={'onclick':
-
'$("#form_stable_karma").attr("disabled",
!$("#form_stable_karma").attr("disabled"));'
-
'$("#form_unstable_karma").attr("disabled",
!$("#form_unstable_karma").attr("disabled"));',
+ attrs={'onchange':
+
'$("#form_stable_karma").attr("disabled",
!$("#form_autokarma").attr("checked"));'
+
'$("#form_unstable_karma").attr("disabled",
!$("#form_autokarma").attr("checked"));',
'title': 'Karma Automatism - Enable update request '
'automation based on user feedback',
}),