Added custom jquery plugin jquery.cuteform.js.
authorMarek Stępniowski <marek@stepniowski.com>
Thu, 14 Aug 2008 15:48:07 +0000 (17:48 +0200)
committerMarek Stępniowski <marek@stepniowski.com>
Thu, 14 Aug 2008 15:48:07 +0000 (17:48 +0200)
media/js/jquery.cuteform.js [new file with mode: 0644]
settings.py

diff --git a/media/js/jquery.cuteform.js b/media/js/jquery.cuteform.js
new file mode 100644 (file)
index 0000000..7993634
--- /dev/null
@@ -0,0 +1,13 @@
+(function($) {
+    $.fn.cuteform = function() {
+        $('form.cuteform', this).each(function(index) {
+            var formLabels = $('label', this)
+            var maxWidth = 0;
+            
+            formLabels.each(function() {
+                maxWidth = max(maxWidth, this);
+            });
+            formLabels.width(maxWidth);
+        });
+    };
+})(jQuery)
\ No newline at end of file
index 8baaf69..83bd3c3 100644 (file)
@@ -97,7 +97,7 @@ COMPRESS_CSS = {
 COMPRESS_JS = {
     'all': {
         'source_filenames': ('js/jquery.js', 'js/jquery.autocolumn.js', 'js/jquery.autocomplete.js', 
-            'js/jquery.form.js', 'js/jquery.jqmodal.js', 'js/jquery.labelify.js',),
+            'js/jquery.form.js', 'js/jquery.jqmodal.js', 'js/jquery.labelify.js', 'js/jquery.cuteform.js'),
         'output_filename': 'js/all.min.js',
     }
 }