Changeset 663
- Timestamp:
- 11/05/12 18:26:34 (12 years ago)
- Location:
- ether_statistics/web
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ether_statistics/web/project/statistics-script.jsp
r661 r663 209 209 { 210 210 var printContent = new PrintContent(); 211 printContent.addContent( $( "#title" ).clone() ); 212 printContent.addContent( this.leftTopSlide.getDivContainer().clone().animate( {'marginLeft' : "+=80px"} ) ); 213 printContent.addContent( this.leftMiddleSlide.getDivContainer().clone().animate( {'marginLeft' : "+=80px"} ) ); 214 printContent.addContent( this.leftBottomSlide.getDivContainer().clone().animate( {'marginLeft' : "+=80px"} ) ); 215 printContent.addContent( this.middleSlide.getDivContainer().clone().animate( {'marginLeft' : "+=120px"} ) ); 211 216 printContent.displayPrintPreview(); 212 213 // $( "#containerMiddle" ).printPreview();214 // $( 'a.print-preview' ).printPreview();215 // $("#containerMiddle").jqprint();216 217 // var printContent =$( "#containerMiddle" );218 // var windowUrl = 'about:blank';219 // var windowName = 'Print';220 // var printWindow = window.open( windowUrl, windowName, 'left=50000,top=50000,width=0,height=0' );221 // printWindow.document.write( "slkdfjlsdkfjsdlf" );222 // printWindow.document.close();223 // printWindow.focus();224 // printWindow.print();225 // printWindow.close();226 //227 // TODO export PDF228 217 }, 229 218 -
ether_statistics/web/project/statistics.jsp
r661 r663 14 14 15 15 <ether:htmlCss cssFile="button"/> 16 <%--<ether:htmlCss cssFile="jquery-ui-1.8.16.custom/jquery-ui-1.8.16.custom"/>--%>17 16 <%-- WIJMO --%> 18 17 <ether:htmlCss cssFile="Wijmo/rocket/jquery-wijmo"/> … … 37 36 38 37 <ether:htmlJsp jspFile="statistics-script"/> 39 40 <%--<ether:htmlCss cssFile="etimbo-jquery-print-preview-plugin/960"/>--%>41 <%--<ether:htmlCss cssFile="etimbo-jquery-print-preview-plugin/screen"/>--%>42 <%--<ether:htmlCss cssFile="etimbo-jquery-print-preview-plugin/print"/>--%>43 <%--<ether:htmlCss cssFile="etimbo-jquery-print-preview-plugin/print-preview"/>--%>44 <%--<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>--%>45 <%--<ether:htmlJs jsFile="etimbo-jquery-print-preview-plugin/src/jquery.print-preview"/>--%>46 38 </HEAD> 47 39 -
ether_statistics/web/resources/css/printContent.css
r662 r663 9 9 -moz-box-shadow: 0 0 20px #000; 10 10 -webkit-box-shadow: 0 0 10px #000; 11 min-height: 700px; 11 12 } 12 13 … … 59 60 #printContent { 60 61 margin-left: 10px; 62 min-height: 500px; 61 63 } -
ether_statistics/web/resources/js/classesForJQuery/DragSlide.js
r661 r663 83 83 }, 84 84 85 getDivContainer: function() 86 { 87 return this.divContainer; 88 }, 89 85 90 isContentVisible: function() 86 91 { -
ether_statistics/web/resources/js/classesForJQuery/PrintContent.js
r662 r663 15 15 this.divButtons = $( '<div id="printButtons"></div>' ); 16 16 this.divContent = $( '<div id="printContent"></div>' ); 17 18 // this.print_frame = $( '<iframe id="print-modal-content" scrolling="no" border="0" frameborder="0" name="print-frame" />' );19 this.divContent.append( $( "#title" ).clone() );20 this.divContent.append( $( "#leftTop" ).clone().animate( {'marginLeft' : "+=80px"} ) );21 this.divContent.append( $( "#leftMiddleSlide" ).clone().animate( {'marginLeft' : "+=80px"} ) );22 this.divContent.append( $( "#leftBottomSlide" ).clone().animate( {'marginLeft' : "+=80px"} ) );23 this.divContent.append( $( "#middle" ).clone().animate( {'marginLeft' : "+=120px"} ) );24 17 }, 25 18 … … 29 22 this.divWrapper.append( this.divButtons ); 30 23 this.divWrapper.append( this.divContent ); 31 // this.divWrapper.append( this.print_frame );32 24 $( 'body' ).append( this.divWrapper ); 33 25 34 // The frame lives 35 // for( var i = 0; i < window.frames.length; i++ ) 36 // { 37 // if( window.frames[i].name == "print-frame" ) 38 // { 39 // this.print_frame_ref = window.frames[i].document; 40 // break; 41 // } 42 // } 43 44 // this.print_frame_ref.open(); 45 // this.print_frame_ref.write( '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' + 46 // '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">' + 47 // '<head><title>zzzzzzzzzzz</title></head>' + 48 // '<body></body>' + 49 // '</html>' ); 50 // this.print_frame_ref.close(); 51 52 // if( !$.browser.msie && !($.browser.version < 7) ) 53 // { 54 // $( 'head', this.print_frame_ref ).append( "headhhhhh" ); 55 // $( 'body', this.print_frame_ref ).append( this.content ); 56 // } 57 // else 58 // { 59 // $( 'body > *:not(#printWrapper):not(script)' ).clone().each( function() 60 // { 61 // $( 'body', this.print_frame_ref ).append( this.outerHTML ); 62 // } ); 63 // $( 'head link[media*=print], head link[media=all]' ).each( function() 64 // { 65 // $( 'head', this.print_frame_ref ).append( $( this ).clone().attr( 'media', 'all' )[0].outerHTML ); 66 // } ); 67 // } 68 26 // Display mask 69 27 this.loadMask(); 70 71 // Disable scrolling72 // $( 'body' ).css( {overflowY: 'hidden', height: '100%'} );73 // $( 'img', this.print_frame_ref ).load( function()74 // {75 // this.print_frame.height( $( 'body', this.print_frame.contents() )[0].scrollHeight );76 // } );77 28 78 29 // Position modal … … 91 42 }, this ) ); 92 43 93 // this.print_frame.height( $( 'body', this.print_frame.contents() )[0].scrollHeight );94 // this.print_frame.height( $( 'body', this.print_frame.contents() )[0].scrollHeight );95 44 this.createButtons(); 96 45 }, … … 103 52 this.printButton.bind( "click", jQuery.proxy( function() 104 53 { 105 // this.mask.animate( { opacity: 1}, 400, jQuery.proxy( function() 106 // { 107 window.print(); 108 // }, this ) ); 109 110 // var thePopup = window.open( '', "Customer Listing", "menubar=0,location=0,height=700,width=700" ); 111 // thePopup.document.body.innerHTML = this.content; 112 // this.divWrapper.clone().appendTo( thePopup.document.body ); 113 // thePopup.print(); 114 // window.open() 115 // window.document.body.innerHTML = "paf"; 116 // document.location.href = ""; 54 this.mask.animate( { opacity: 1}, 400, jQuery.proxy( function() 55 { 56 window.print(); 57 }, this ) ); 58 // window.print(); 117 59 }, this ) ); 118 60 this.divButtons.append( this.printButton ); … … 126 68 this.divButtons.append( this.closeButton ); 127 69 }, 128 129 // printdiv: function( printpage )130 // {131 // var headstr = "<html><head><title></title></head><body>";132 // var footstr = "</body>";133 // var newstr = document.all.item( printpage ).innerHTML;134 // var newstr = "<div>qsdqmsdkqsmdkqsd</div>";135 // var oldstr = document.body.innerHTML;136 // document.body.innerHTML = headstr + newstr + footstr;137 // window.print();138 // document.body.innerHTML = oldstr;139 // return false;140 // },141 70 142 71 distroyPrintPreview: function() … … 189 118 { 190 119 if( e.keyCode == 27 ) 191 {192 120 this.distroyPrintPreview(); 193 }194 121 }, this ) ); 195 122 }, … … 204 131 window.innerWidth || // ie7+ 205 132 document.documentElement.clientWidth || // ie6 206 document.body.clientWidth, 133 document.body.clientWidth, // ie6 quirks mode 207 134 d - w < 20 ? w : d 208 135 ]; … … 216 143 this.size = this.getMaskSize(); 217 144 this.mask.css( {width: this.size[0], height: this.size[1]} ); 145 }, 146 147 setContent: function( content ) 148 { 149 this.divContent.append( content ); 150 }, 151 152 addContent: function( content ) 153 { 154 this.divContent.append( content ); 218 155 } 156 219 157 } );
Note: See TracChangeset
for help on using the changeset viewer.