r3032 committed - labs: panel ...

r3032 committed - labs: panel ...


Revision: 3032
Author: idlesign
Date: Wed Aug 5 23:40:06 2009
Log: labs: panel
* fixed: 'pointer' cursor over panel title on non-collapsible panels
(changed to 'default')
* fixed: panel state is not stored in a cookie
http://code.google.com/p/jquery-ui/source/detail?r=3032
Modified:
/branches/labs/panel/ui.panel.js
=======================================
--- /branches/labs/panel/ui.panel.js    Tue Jul 14 22:29:24 2009
+++ /branches/labs/panel/ui.panel.js    Wed Aug 5 23:40:06 2009
@@ -1,5 +1,5 @@
/*
-* Panel Draft 0.3.4
+* Panel Draft 0.3.5
* for jQuery UI
*
* Copyright (c) 2009 Igor 'idle sign' Starikov
@@ -109,6 +109,8 @@
         if (o.collapsed) {
            self.toggle(0, true);
         }
+        } else {
+            this.titleTextBox.css('cursor','default');
        }
        // making panel draggable if not accordion-like
        if (!o.accordion && o.draggable && $.fn.draggable){
this._makeDraggable(); }
@@ -121,10 +123,11 @@
    },
    _cookie: function() {
-     var cookie = this.cookie || (this.cookie = this.options.cookie.name |
| 'ui-panel-' + $.data(this.options.id));
+     var cookie = this.cookie || (this.cookie = this.options.cookie.name |
| 'ui-panel-'+this.options.id);
     return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
    },
+    // ui.draggable config
    _makeDraggable: function() {
     this.panelBox.draggable({
        containment: 'document',
@@ -143,6 +146,7 @@
     return false;
    },
+    // disables panel (usign appropiate ui class)
    disable: function (disable){
     var o = this.options;
@@ -163,6 +167,7 @@
     o.disabled = disable;
    },
+    // toggles panel state (folded/unfolded)
    toggle: function (collapseSpeed, innerCall){
     var self = this,
        o = this.options,
@@ -261,10 +266,12 @@
     headerBox.toggleClass('ui-corner-all');
    },
+    // sets panel's content
    content: function(content){
     this.contentTextBox.html(content);
    },
+    // destroys panel
    destroy: function(){
     var o = this.options;
@@ -294,7 +301,7 @@
});
$.extend($.ui.panel, {
-    version: '0.3.4',
+    version: '0.3.5',
    defaults: {
     event: 'click',
     collapsible: true,