r774 - trunk/ui

r774 - trunk/ui


Author: pazu2k@gmail.com
Date: Sun Oct 5 03:44:15 2008
New Revision: 774
Modified:
trunk/ui/ui.spinner.js
Log:
Spinner: spinner casing now sets itself a unique id based on the id of the
original input textbox. If no id exists in the original then no id is set
to the casing.
Modified: trunk/ui/ui.spinner.js
==============================================================================
--- trunk/ui/ui.spinner.js    (original)
+++ trunk/ui/ui.spinner.js    Sun Oct 5 03:44:15 2008
@@ -138,6 +138,14 @@
                })
            .end();
        
+        // Give the spinner casing a unique id only if one exists in original
input
+        // - this should aid targetted customisations if a page contains
multiple instances
+        this.element.attr('id', function(){
+            if (this.id) {
+                $(this).parent().attr('id', this.id+'-ui-spinner');
+            }
+        });
+        
        // DataList: Set contraints for object length and step size.
        // Manipulate height of spinner.
        this._items = this.element.children().length;