Changeset 593 for ether_statistics/web/resources
- Timestamp:
- 10/12/12 16:38:48 (12 years ago)
- Location:
- ether_statistics/web/resources
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
ether_statistics/web/resources/css/statistics.css
r592 r593 108 108 } 109 109 110 #title { 111 position: relative; 112 top: 17px; 113 left: 3px; 114 } 115 110 116 #home, #mail, #login { 111 117 padding: 15px 0 0 23px; … … 116 122 padding: 21px 0 0 28px; 117 123 width: 62px; 124 position: relative; 125 top: 23px; 126 left: 17px; 127 } 128 129 #mail { 130 position: relative; 131 top: -15px; 132 left: 20px; 118 133 } 119 134 120 135 #copy { 121 136 position: absolute; 122 top: 492px;123 left: 800px;137 top: 500px; 138 left: 773px; 124 139 } 125 140 … … 140 155 float: left; 141 156 margin-right: 10px; 157 top: 41px; 158 left: 4px; 142 159 } 143 160 … … 146 163 top: 0; 147 164 left: 0; 148 z-index: 1;149 165 } 150 166 … … 153 169 top: 21px; 154 170 left: 25px; 155 z-index: 2;156 171 } 157 172 … … 159 174 visibility: hidden; 160 175 position: absolute; 161 z-index: 2;162 176 } 163 177 -
ether_statistics/web/resources/js/classesForJQuery/DragSlide.js
r570 r593 1 1 //************************************************************************* 2 // Class Slide3 // Display a Slide2 // Class DragSlide 3 // Display a draggable slide 4 4 // 5 5 // use jQuery … … 8 8 //************************************************************************* 9 9 10 var Slide = Class.create( {10 var DragSlide = Class.create( { 11 11 12 12 initialize: function( objectParameter ) … … 14 14 // Param 15 15 this.parent = objectParameter.parent ? objectParameter.parent : document.body; 16 this.titleId = objectParameter.titleId; 16 17 this.contentId = objectParameter.contentId; 17 this.buttonId = objectParameter.buttonId; 18 this.width = objectParameter.width; 19 this.height = objectParameter.height; 20 this.top = objectParameter.top; 21 this.left = objectParameter.left; 22 this.specificClass = objectParameter.specificClass; 23 this.specificTitleClass = objectParameter.specificTitleClass ? objectParameter.specificTitleClass : false; 18 24 this.specificContentClass = objectParameter.specificContentClass ? objectParameter.specificContentClass : false; 19 this.specificButtonClass = objectParameter.specificButtonClass ? objectParameter.specificButtonClass : false; 20 this.timeToSlide = objectParameter.timeToSlide ? objectParameter.timeToSlide : 1000; 25 this.title = objectParameter.title; 21 26 this.contentSlide = objectParameter.contentSlide ? objectParameter.contentSlide : false; 22 27 this.contentPageSlide = objectParameter.contentPageSlide ? objectParameter.contentPageSlide : false; 23 this.contentButton = objectParameter.contentButton;24 28 this.isIndexToChange = objectParameter.isIndexToChange ? objectParameter.isIndexToChange : false; 25 this.zIndex = this.parent.css( "z-index" );26 29 27 // Content div 28 this.divSlideContent = $( document.createElement( "div" ) ); 29 this.divSlideContent.attr( {id:this.contentId, class:"containerSlideContent"} ); 30 this.divContainer = $( document.createElement( "div" ) ); 31 if( this.specificClass ) 32 this.divContainer.addClass( this.specificClass ); 33 this.divContainer.attr( {id:this.id, style:"width:" + this.width + "px; height:" + this.height + "px; top:" + this.top + "; left:" + this.left} ); 34 35 // Title 36 this.divTitle = $( document.createElement( "div" ) ); 37 if( this.specificTitleClass ) 38 this.divTitle.addClass( this.specificTitleClass ); 39 this.divTitle.html( this.title ); 40 this.divTitle.attr( {style:"width:" + (this.width - 7) + "px"} ); 41 this.divContainer.append( this.divTitle ); 42 43 // Content 44 this.divContent = $( document.createElement( "div" ) ); 30 45 if( this.specificContentClass ) 31 this.divSlideContent.addClass( this.specificContentClass ); 32 if( this.contentId ) 33 this.divSlideContent.html( this.contentSlide ); 34 this.parent.append( this.divSlideContent ); 46 this.divContent.addClass( this.specificContentClass ); 47 this.divContent.html( this.content ); 48 this.divContainer.append( this.divContent ); 35 49 36 // Button div 37 this.divSlideButton = $( document.createElement( "div" ) ); 38 this.divSlideButton.attr( {id:this.buttonId} ); 39 this.divSlideButton.attr( {id:this.buttonId, class:"containerSlideButton"} ); 40 if( this.specificButtonClass ) 41 this.divSlideButton.addClass( this.specificButtonClass ); 42 this.divSlideButton.append( this.contentButton ); 43 this.divSlideButton.bind( "click", jQuery.proxy( this.onClickButton, this ) ); 44 this.parent.append( this.divSlideButton ); 50 this.parent.append( this.divContainer ); 51 52 this.divContainer.draggable(); 53 this.divContainer.resizable(); 54 // this.divContainer.dblclick(); 55 this.divTitle.dblclick( jQuery.proxy( this.onDbClickTitle, this ) ); 56 this.divContainer.resize( jQuery.proxy( this.onResizeContainer, this ) ); 45 57 }, 46 58 47 59 getContent: function() 48 60 { 49 return this.div SlideContent.html();61 return this.divContent.html(); 50 62 }, 51 63 52 64 setContent: function( newContent ) 53 65 { 54 this.div SlideContent.html( newContent );66 this.divContent.html( newContent ); 55 67 }, 56 68 57 69 isContentVisible: function() 58 70 { 59 return (this.div SlideContent.css( "display" ) == "block");71 return (this.divContent.css( "display" ) == "block"); 60 72 }, 61 73 62 74 // public 63 on ClickButton: function()75 onDbClickTitle: function() 64 76 { 65 if( this.isIndexToChange && !this.isContentVisible() ) 66 this.parent.css( "z-index", 100 ); 77 if( this.width == this.divContainer.width() ) 78 this.enlargeContainer(); 79 else 80 this.reduceContainer(); 81 }, 67 82 68 this.divSlideContent.animate( {width:"toggle"}, this.timeToSlide, jQuery.proxy( function() 83 enlargeContainer: function() 84 { 85 this.divContainer.animate( { 86 height:'500px', 87 width:'500px' 88 }, 1000, function() 69 89 { 70 if( this.isIndexToChange && !this.isContentVisible() ) 71 this.parent.css( "z-index", this.zIndex ); 72 }, this ) ); 90 } ); 91 this.divTitle.animate( { 92 width:'493px' 93 }, 1000, function() 94 { 95 } ); 96 }, 73 97 74 if( this.contentPageSlide ) 75 this.divSlideContent.load( this.contentPageSlide ); 98 reduceContainer: function() 99 { 100 this.divContainer.animate( { 101 height:this.height + 'px', 102 width:this.width + 'px' 103 }, 1000, function() 104 { 105 } ); 106 this.divTitle.animate( { 107 width:(this.width - 7) + 'px' 108 }, 1000, function() 109 { 110 } ); 111 }, 112 113 onResizeContainer: function() 114 { 115 var widthTitle = this.divContainer.width() - 7; 116 this.divTitle.width( widthTitle ); 76 117 } 77 118 } );
Note: See TracChangeset
for help on using the changeset viewer.