Changeset 693 for ether_statistics
- Timestamp:
- 01/07/13 18:43:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_statistics/web/resources/js/classesForJQuery/DragSlide.js
r692 r693 17 17 this.titleId = objectParameter.titleId; 18 18 this.contentId = objectParameter.contentId; 19 this.width = objectParameter. minWidth ? objectParameter.minWidth : objectParameter.width;20 this.height = objectParameter. minHeight ? objectParameter.minHeight : objectParameter.height;21 this.minWidth = objectParameter.minWidth ? objectParameter.minWidth : objectParameter.width;22 this.minHeight = objectParameter.minHeight ? objectParameter.minHeight : objectParameter.height;19 this.width = objectParameter.width ? objectParameter.width : false; 20 this.height = objectParameter.height ? objectParameter.height : false; 21 this.minWidth = objectParameter.minWidth ? objectParameter.minWidth : false; 22 this.minHeight = objectParameter.minHeight ? objectParameter.minHeight : false; 23 23 this.top = objectParameter.top; 24 24 this.left = objectParameter.left; … … 37 37 if( this.specificClass ) 38 38 this.divContainer.addClass( this.specificClass ); 39 this.divContainer.attr( {id:this.id, style:"width:" + this.width + "px; height:" + this.height + "px; min-width:" + this.minWidth + "px; min-height:" + this.minHeight + "px; top:" + this.top + "; left:" + this.left} );40 39 41 40 // Title … … 52 51 this.divContent.html( this.contentSlide ); 53 52 this.divContainer.append( this.divContent ); 53 54 // Height and width or min-height and min-width 55 if( this.height && this.width ) 56 this.divContainer.attr( {id:this.id, style:"width:" + this.width + "px; height:" + this.height + "px; top:" + this.top + "; left:" + this.left} ); 57 else 58 this.divContainer.attr( {id:this.id, style:"min-width:" + this.minWidth + "px; min-height:" + this.minHeight + "px; height:" + this.divTitle.height() + "px; top:" + this.top + "; left:" + this.left} ); 59 54 60 55 61 this.parent.append( this.divContainer ); … … 102 108 onDbClickTitle: function() 103 109 { 104 if( this.height == this.divContainer.height() )110 if( (this.height == this.divContainer.height()) || (this.minHeight == this.divContainer.height()) ) 105 111 this.hideContainerContent(); 106 112 else … … 110 116 hideContainerContent: function() 111 117 { 112 this.divContainer.css( 'min-height', '0px' ).animate( { 113 height:this.divTitle.height() + 'px' 114 }, 1000, jQuery.proxy( function() 118 if( this.minHeight ) 115 119 { 116 this.divContent.hide(); 117 }, this ) ); 120 this.divContainer.css( 'min-height', '0px' ); 121 this.divContainer.css( 'height', this.minHeight + 'px' ).animate( { 122 height:this.divTitle.height() + 'px' 123 }, 1000, jQuery.proxy( function() 124 { 125 this.divContent.hide(); 126 }, this ) ); 127 } 128 else 129 { 130 this.divContainer.animate( { 131 height:this.divTitle.height() + 'px' 132 }, 1000, jQuery.proxy( function() 133 { 134 this.divContent.hide(); 135 }, this ) ); 136 } 118 137 }, 119 138 120 139 showContainerContent: function() 121 140 { 122 this.divContainer.css( 'min-height', this.minHeight + 'px' ).animate( { 123 height:this.height + 'px' 124 }, 1000, jQuery.proxy( function() 141 if( this.minHeight ) 125 142 { 126 this.divContent.show(); 127 }, this ) ); 143 this.divContainer.animate( { 144 height:this.minHeight + 'px' 145 }, 1000, jQuery.proxy( function() 146 { 147 this.divContainer.css( 'min-height', this.minHeight + 'px' ); 148 this.divContainer.css( 'height', this.divTitle.height() + 'px' ); 149 this.divContent.show(); 150 }, this ) ); 151 } 152 else 153 { 154 this.divContainer.animate( { 155 height:this.height + 'px' 156 }, 1000, jQuery.proxy( function() 157 { 158 this.divContent.show(); 159 }, this ) ); 160 } 128 161 }, 129 162
Note: See TracChangeset
for help on using the changeset viewer.