Changeset 4489 for extensions/gally/gallyjs-tpp.js
- Timestamp:
- Dec 13, 2009, 11:35:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/gally/gallyjs-tpp.js
r4446 r4489 20 20 var selectedTab; 21 21 var interfaceTimerDelay; 22 var isScrollable; 22 23 23 24 $("document").ready( 24 function(){ 25 function(){inittoolbar(); } 25 26 ); 26 27 … … 54 55 selectedTab=-1; 55 56 interfaceTimerDelay = null; 56 57 57 switchInterface('0', true); 58 initializeImageMode(); 59 60 61 $("#theCommentList").css("height", options.comments_visible-42+"px"); 62 63 if(options.interfaceOnImage) 58 initializeImageMode("init"); 59 60 if(options.interfaceOnImage=="always" || (options.interfaceOnImage=="noscroll" && !isScrollable)) 64 61 { 65 62 $("#theImg").bind("mouseenter", function () { switchInterface('y', true); } ) … … 72 69 $("#imageToolBar").bind("mouseenter", function () { switchInterface('y', true); } ) 73 70 .bind("mouseleave", function () { switchInterface('n', true); } ) 74 .bind("mousemove", function () { switchInterface('y', true); } ) 75 .css("top", $("#imageToolBar").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#imageHeaderBar").attr("offsetHeight")+"px"); 71 .bind("mousemove", function () { switchInterface('y', true); } ); 72 76 73 77 74 $("#navThumbPrev").bind("mouseenter", function () { switchInterface('Y', true); } ) … … 133 130 ); 134 131 135 $(window).resize( function () { initializeImageMode( ); } );132 $(window).resize( function () { initializeImageMode("resize"); } ); 136 133 137 134 $(document).data("initialized", 1); 138 135 } 139 136 140 function initializeImageMode() 141 { 142 copyrightArea = $("#copyright").attr("clientHeight")+1; 143 $("#theTabsContainer").css("bottom", copyrightArea+"px"); 144 145 $("#navThumbPrev").css("height", $("#copyright").attr("offsetTop")-$("#navThumbPrev").attr("offsetTop")-options.tabsHidden+"px"); 146 $("#navThumbNext").css("height", $("#copyright").attr("offsetTop")-$("#navThumbNext").attr("offsetTop")-options.tabsHidden+"px"); 137 function initializeImageMode(mode) 138 { 139 if(mode=="init") 140 { 141 $("#imageToolBar").css("top", $("#imageToolBar").attr("offsetTop")+$("#theHeader").attr("offsetHeight")+$("#imageHeaderBar").attr("offsetHeight")+"px"); 142 143 if(options.tabsPosition=="bottom") 144 { 145 copyrightArea = $("#copyright").attr("clientHeight")+1; 146 $("#theTabsContainer").css("bottom", copyrightArea+"px"); 147 } 148 else if(options.tabsPosition=="top") 149 { 150 toolBarArea = $("#imageToolBar").attr("offsetTop")+$("#imageToolBar").attr("offsetHeight"); 151 $("#theTabsContainer").css("top", toolBarArea+"px"); 152 } 153 154 if($("#navThumbPrev").length>0) 155 { 156 $("#navThumbPrev").css("height", $("#copyright").attr("offsetTop")-$("#navThumbPrev").attr("offsetTop")-options.tabsHidden+"px"); 157 } 158 if($("#navThumbNext").length>0) 159 { 160 $("#navThumbNext").css("height", $("#copyright").attr("offsetTop")-$("#navThumbNext").attr("offsetTop")-options.tabsHidden+"px"); 161 } 162 } 147 163 148 164 cssValues = new Object; … … 161 177 } 162 178 ); 179 isScrollable=true; 163 180 } 164 181 else … … 167 184 $("#theImg").css("left", "0px"); 168 185 cssValues.width = $("#theImg").attr("scrollWidth")+"px"; 186 isScrollable=false; 169 187 } 170 188 $("#theImgContainer").css(cssValues); 171 189 172 190 // imagecenter 173 $("#theImage").css("padding-bottom", $("#copyright").attr("offsetHeight")+"px"); 191 if($("#copyright").css("position")=="fixed") 192 { 193 $("#theImage").css("padding-bottom", $("#copyright").attr("offsetHeight")+"px"); 194 } 174 195 switch(options.imageCenterMode) 175 196 {
Note: See TracChangeset
for help on using the changeset viewer.