Changeset 25165 for extensions/Slide
- Timestamp:
- Oct 26, 2013, 1:00:00 PM (10 years ago)
- Location:
- extensions/Slide/js
- Files:
-
- 5 added
- 3 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Slide/js/slide.js
r25053 r25165 1 $(function(){ 2 if($('body').attr('id') == 'theCategoryPage'){ 3 $('#menu_start').hide() 1 $(function() 2 { 3 $( document ).ready(function() 4 { 5 if($('body').attr('id') == 'theCategoryPage') 6 { 7 $('#menu_start').hide() 8 }; 9 if($('body').attr('id') != 'theCategoryPage') 10 { 11 $('#menu').hide() 12 }; 13 14 $("#page_content #nav_wrapper").css("display", "none"); 15 $("li.liSub:last-child dt").addClass('dd_wrapper'); 16 $("li.liSub:last-child dd").addClass('sub'); 17 18 function megaHoverOver() 19 { 20 $(this).find(".sub").stop().fadeTo('slow', 1).show() 21 } 22 23 function megaHoverOut() 24 { 25 $(this).find(".sub").stop().fadeTo('slow', 0, function() 26 { 27 $(this).hide() 28 }); 29 } 30 31 32 var configSub = { 33 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) 34 interval: 0, // number = milliseconds for onMouseOver polling interval 35 over: megaHoverOver, // function = onMouseOver callback (REQUIRED) 36 timeout: 0, // number = milliseconds delay before onMouseOut 37 out: megaHoverOut // function = onMouseOut callback (REQUIRED) 38 }; 39 40 $("ul#topnav li .sub").css({'display':'none'}); 41 $("ul#topnav li").hoverIntent(configSub); 42 43 44 // Delete the border for the last li of the submenu 45 $("ul#topnav .sub ul li:last-child a").css("border", "none"); 46 47 /*other menubar script*/ 48 //open form login menu 49 50 $(".cl_wrapper").next("div").hide(); 51 $(".cl_wrapper").hover(function() 52 { 53 if($(this).next("div").is(":hidden")) 54 { 55 $(this).next("div").fadeTo('fast', 1); 56 $(this).addClass('activate'); 57 $(this).next("div").attr(":visible") 58 } 59 }); 60 61 $(".cl_wrapper").click(function() 62 { 63 if($(this).next("div").is(":visible")) 64 { 65 $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()}); 66 $(this).removeClass('activate'); 67 $(this).next("div").attr(":hidden") 68 } 69 }); 70 71 $(".close").click(function() 72 { 73 if($("#loger").is(":visible")) 74 { 75 $("#loger").fadeTo('fast', 0, function(){$(this).hide()}); 76 $(".cl_wrapper").removeClass('activate'); 77 $("#loger").attr(":hidden"); 78 } 79 }); 80 81 $(".cc_wrapper").click(function() 82 { 83 if($(this).next("div").is(":visible")) 84 { 85 $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()}); 86 $(this).removeClass('activate'); 87 $(this).next("div").attr(":hidden") 88 } 89 }); 90 91 $(".cc_wrapper").click(function() 92 { 93 if($(this).next("div").is(":hidden")) 94 { 95 $(this).next("div").fadeTo('fast', 1); 96 $(this).addClass('activate'); 97 $(this).next("div").attr(":visible") 98 } 99 }); 100 101 $(".close").click(function() 102 { 103 if($("#loger").is(":visible")) 104 { 105 $("#loger").fadeTo('fast', 0, function(){$(this).hide()}); 106 $(".cc_wrapper").removeClass('activate'); 107 $("#loger").attr(":hidden"); 108 } 109 }); 110 111 // make column menubar_categorie 112 $('.mcol').makeacolumnlists({cols:4, colWidth:155, equalHeight: true, startN: 1}); 113 114 //determines what page will slide 115 var t = [ $('#menu_start a'), 116 $('.navigationBar a'), 117 $('.calendarBar a'), 118 $('.calendarCalBar a'), 119 $('.navigationButtons a'), 120 $('#imageHeaderBar a'), 121 $('.calImg a'), 122 $('.date_today'), 123 $('#sortOrderBox a'), 124 $('#derivativeSwitchBox a'), 125 $('#sortOrderLink'), 126 $('#derivativeSwitchLink'), 127 $('.actions a'), 128 $('.navThumb'), 129 $('.calendarTitle a'), 130 $('#linkToPiwigo a'), 131 $('#copyright a'), 132 //determines what page will slide->specific plugin 133 $('#languageSwitchLink'), 134 $('#languageSwitchBox a'), 135 $('#theHeader a'), 136 $('#myHomePage a'), 137 $('#mbAdditionalPages a'), 138 $('#photosAddContent a'), 139 $('.amm-MenuBar-links-icons a'), 140 ]; 141 $.each(t,function() 142 { 143 $(this).attr('class','noSlide') 144 }); 145 146 var r = [ $('.pwg-icon-letters'), 147 $('.pwg-icon-cloud'), 148 $('.pwg-icon-help'), 149 $('.pwg-icon-favorite-del'), 150 $('.pwg-icon-caddie-add'), 151 $('.pwg-icon-category-view-flat'), 152 $('.pwg-icon-category-view-normal'), 153 $('#thePicturePage .pwg-icon-slideshow'), 154 $('#thePicturePage .pwg-icon-camera-info'), 155 $('#thePicturePage .pwg-icon-save'), 156 $('#thePicturePage .pwg-icon-favorite-add'), 157 $('#thePicturePage .pwg-icon-representative'), 158 $('#thePicturePage .pwg-icon-edit'), 159 $('.pwg-icon-category-edit') 160 ]; 161 $.each(r,function() 162 { 163 $(this).parent().attr('class','noSlide') 164 }); 165 166 if($('.illustration a').hasClass('cboxElement')) 167 { 168 $('.illustration a').addClass('noSlide').removeClass('slide') 169 }; 170 171 $('.categoryActions a[onclick]').addClass('noSlide'); 172 $('.actionButtons a[onclick]').addClass('noSlide'); 173 174 $('a:not(.noSlide)').addClass('slide'); 175 176 var s = [ $('.description_stuffs .zero nb-comments'), 177 $('.description_stuffs .nb-hits'), 178 $('.description_stuffs .nb-comments'), 179 $('.pwg-icon-arrow-n').parent() 180 ]; 181 $.each(s,function() 182 { 183 $(this).remove() 184 }); 185 186 var u = [ $('#linkToPiwigo a'), 187 $('#copyright a'), 188 ]; 189 $.each(u,function() 190 { 191 $(this).attr('target','blank') 192 }); 193 194 $('.stuffs_block .illustration .description').removeClass('description').addClass('description_stuffs'); 195 $('.titrePage + div').addClass('blockConteneur'); 196 $('.myHomePage_links a[href="index.php?/contact"]').addClass('slide'); 197 $('#theHeader').find('a').on('click',function() 198 { 199 window.top.location.reload() 200 }); 201 202 //initialise scroll bar 203 var settings = { verticalDragMinHeight: 100, 204 verticalDragMaxHeight: 100, 205 autoReinitialise: true 206 }; 207 var pane = $('.scrollpane').jScrollPane(settings); 208 var api= pane.data('jsp'); 209 210 //open the slide 211 $(function() 212 { 213 $('.slide').pageslide({direction: "left",speed:2000}) 214 }); 215 216 $(function() 217 { 218 var wipalen = window.parent.length; 219 if(wipalen==1) 220 { 221 $('#menubar').remove(); 222 $('#theHeader').addClass('headbord') 4 223 }; 5 if($('body').attr('id') != 'theCategoryPage'){ 6 $('#menu').hide() 7 }; 8 9 //determines what page will slide 10 var t = [ $('#menu_start a'), 11 $('.navigationBar a'), 12 $('.calendarBar a'), 13 $('.calendarCalBar a'), 14 $('.navigationButtons a'), 15 $('#imageHeaderBar a'), 16 $('.calImg a'), 17 $('.date_today'), 18 $('#sortOrderBox a'), 19 $('#derivativeSwitchBox a'), 20 $('#sortOrderLink'), 21 $('#derivativeSwitchLink'), 22 $('.actions a'), 23 $('.navThumb'), 24 $('.calendarTitle a'), 25 $('#linkToPiwigo a'), 26 $('#copyright a'), 27 //determines what page will slide->specific plugin 28 $('#languageSwitchLink'), 29 $('#languageSwitchBox a'), 30 $('#theHeader a'), 31 $('#myHomePage a'), 32 $('#mbAdditionalPages a'), 33 $('#photosAddContent a'), 34 $('.amm-MenuBar-links-icons a'), 35 ]; 36 37 $( document ).ready(function() 38 { 39 if($('.illustration a').hasClass('cboxElement')) 40 { 41 $('.illustration a').addClass('noSlide').removeClass('slide'); 42 } 43 }); 44 45 $.each(t,function(){ 46 $(this).attr('class','noSlide'); 47 }); 48 49 var r = [ $('.pwg-icon-letters'), 50 $('.pwg-icon-cloud'), 51 $('.pwg-icon-help'), 52 $('.pwg-icon-favorite-del'), 53 $('.pwg-icon-caddie-add'), 54 $('.pwg-icon-category-view-flat'), 55 $('.pwg-icon-category-view-normal'), 56 $('#thePicturePage .pwg-icon-slideshow'), 57 $('#thePicturePage .pwg-icon-camera-info'), 58 $('#thePicturePage .pwg-icon-save'), 59 $('#thePicturePage .pwg-icon-favorite-add'), 60 $('#thePicturePage .pwg-icon-representative'), 61 $('#thePicturePage .pwg-icon-edit'), 62 $('.pwg-icon-category-edit') 63 ]; 64 $.each(r,function(){ 65 $(this).parent().attr('class','noSlide'); 66 }); 67 68 $('a:not(.noSlide)').addClass('slide'); 69 70 var s = [ $('.description_stuffs .zero nb-comments'), 71 $('.description_stuffs .nb-hits'), 72 $('.description_stuffs .nb-comments'), 73 $('.pwg-icon-arrow-n').parent() 74 ]; 75 $.each(s,function(){ 76 $(this).remove(); 77 }); 78 79 var u = [ $('#linkToPiwigo a'), 80 $('#copyright a'), 81 ]; 82 $.each(u,function(){ 83 $(this).attr('target','blank'); 84 }); 85 86 $('.stuffs_block .illustration .description').removeClass('description').addClass('description_stuffs'); 87 $('.titrePage + div').addClass('blockConteneur'); 88 $('.myHomePage_links a[href="index.php?/contact"]').addClass('slide'); 89 90 //initialise scroll bar 91 var settings = { 92 verticalDragMinHeight: 100, 93 verticalDragMaxHeight: 100, 94 autoReinitialise: true 95 }; 96 var pane = $('.scrollpane').jScrollPane(settings); 97 var api= pane.data('jsp'); 98 99 //open the slide 100 $(function(){ 101 $('.slide').pageslide({direction: "left",speed:2000}); 102 }); 103 104 $(function(){ 105 var wipalen = window.parent.length; 106 if(wipalen==1){ 107 $('#menubar').remove(); 108 $('#theHeader').addClass('headbord'); 109 } 110 if(wipalen>3) { 111 $('#menubar').remove(); 112 $('#theHeader').addClass('headbord'); 113 } 114 }); 224 if(wipalen>3) 225 { 226 $('#menubar').remove(); 227 $('#theHeader').addClass('headbord') 228 } 229 }); 115 230 116 231 //close the slide 117 function close(){$.pageslide.close()}; 232 function close() 233 { 234 $.pageslide.close() 235 }; 118 236 119 237 //fit the size of the screen 120 var w_w= $(window).width()-41 + 'px',121 w_h= $(window).height() + 'px',122 w_mh= $(window).height()-180 + 'px';123 124 125 126 $('#content').css({minHeight: w_mh});238 var w_w = $(window).width()-41 + 'px', 239 w_h = $(window).height() + 'px', 240 w_mh = $(window).height()-180 + 'px'; 241 $('#pageslide').css({width: w_w}); 242 $('#the_page').css({height: w_h}); 243 $('.intabs').css({height: w_h}); 244 $('#content').css({minHeight: w_mh}) 127 245 128 246 //when click on tabs or scroll bar 129 $('.tabs').bind('click', 130 function(){ 131 $('.intabs').removeClass('visibleTransi') 132 .css("cursor","default"); 133 $('.jspDrag').css("cursor","pointer"); 134 $('.jspVerticalBar').addClass('visibleTransi'); 135 $('.jspVerticalBar').removeClass('hideTransi'); 136 }); 247 $('.tabs').bind('click', function() 248 { 249 $('.intabs').removeClass('visibleTransi').css("cursor","default"); 250 $('.jspDrag').css("cursor","pointer"); 251 $('.jspVerticalBar').addClass('visibleTransi'); 252 $('.jspVerticalBar').removeClass('hideTransi'); 253 }); 137 254 138 $('.jspTrack').bind('click', 139 function(){ 140 $('.intabs').removeClass('visibleTransi') 141 .css("cursor","default"); 142 $('.jspDrag').css("cursor","pointer"); 143 $('.jspVerticalBar').addClass('visibleTransi'); 144 $('.jspVerticalBar').removeClass('hideTransi'); 145 }); 255 $('.jspTrack').bind('click', function() 256 { 257 $('.intabs').removeClass('visibleTransi').css("cursor","default"); 258 $('.jspDrag').css("cursor","pointer"); 259 $('.jspVerticalBar').addClass('visibleTransi'); 260 $('.jspVerticalBar').removeClass('hideTransi') 261 }); 146 262 147 263 //when click on link with class'slide' 148 $('.slide').bind('click', 149 function(){ 150 $('.intabs').addClass('visibleTransi') 151 .css("cursor","pointer"); 152 $('.jspDrag').css("cursor","default"); 153 $('.jspVerticalBar').addClass('hideTransi'); 154 $('.jspVerticalBar').removeClass('visibleTransi'); 155 }); 156 264 $('.slide').bind('click', function() 265 { 266 $('.intabs').addClass('visibleTransi').css("cursor","pointer"); 267 $('.jspDrag').css("cursor","default"); 268 $('.jspVerticalBar').addClass('hideTransi'); 269 $('.jspVerticalBar').removeClass('visibleTransi') 270 }); 271 157 272 //specif tab in page indentification 158 var content=$('#theIdentificationPage .titrePage a').first().text(), 159 link='<a href="index.php">' + content + '</a>'; 160 $('#theIdentificationPage .intabs').addClass('visible'); 161 $('#theIdentificationPage #sld_tab').replaceWith('<div id="sld_tabIdent">' + link + '</div>'); 162 $('#theIdentificationPage #menubar').remove(); 273 var content = $('#theIdentificationPage .titrePage a').first().text(), 274 link = '<a href="index.php">' + content + '</a>'; 275 $('#theIdentificationPage .intabs').addClass('visible'); 276 $('#theIdentificationPage #sld_tab').replaceWith('<div id="sld_tabIdent">' + link + '</div>'); 277 $('#theIdentificationPage #menubar').remove(); 278 279 //title page 280 var titre = $('#sld_tab').text(), 281 titre = titre.substring(titre.lastIndexOf("/")), 282 titre = titre.replace("/",""); 283 if ((titre.indexOf("[")>=0)) 284 { 285 var titre = titre.substring(0,titre.indexOf("[",1)) 286 }; 287 $('#sld_tab').replaceWith("<div id='sld_tab'>"+ titre +"</div>") 288 289 var titre = $('#content .titrePage h2').first().text(), 290 titre = titre.substring(titre.lastIndexOf("/")), 291 titre = titre.replace("/",""); 292 $('#content .titrePage h2').first().replaceWith("<h2>"+ titre +"</h2>"); 293 294 $('.browsePath a').remove(); 295 var titre = $('.browsePath').text(), 296 titre = titre.substring(titre.lastIndexOf("/")), 297 titre = titre.replace("/",""), 298 titre = titre.replace("[",""), 299 titre = titre.replace("]",""); 300 $('.browsePath').replaceWith("<h2>"+ titre +"</h2>"); 163 301 164 //title page165 var titre=$('#sld_tab').text(),166 titre=titre.substring(titre.lastIndexOf("/")),167 titre=titre.replace("/","");168 if ((titre.indexOf("[")>=0)){169 var titre=titre.substring(0,titre.indexOf("[",1));170 };171 $('#sld_tab').replaceWith("<div id='sld_tab'>"+ titre +"</div>")172 173 var titre=$('#content .titrePage h2').first().text(),174 titre=titre.substring(titre.lastIndexOf("/")),175 titre=titre.replace("/","");176 $('#content .titrePage h2').first().replaceWith("<h2>"+ titre +"</h2>");177 178 $('.browsePath a').remove();179 var titre=$('.browsePath').text(),180 titre=titre.substring(titre.lastIndexOf("/")),181 titre=titre.replace("/",""),182 titre=titre.replace("[",""),183 titre=titre.replace("]","");184 $('.browsePath').replaceWith("<h2>"+ titre +"</h2>");185 186 302 187 303 //description size on thumbnail 188 var l=$('.illustration img').width(); 189 if(l<230){ 190 $('.description').css('width','80%'); 191 }; 304 var l = $('.illustration img').width(); 305 if(l<230) 306 { 307 $('.description').css('width','80%') 308 }; 192 309 193 310 //input scearch on menubar 194 $('#submitSearch').bind('click',195 function(){196 197 198 $('.jspVerticalBar').removeClass('visibleTransi');199 311 $('#submitSearch').click( function() 312 { 313 $('.intabs').addClass('visibleTransi'); 314 $('.jspVerticalBar').addClass('hideTransi'); 315 $('.jspVerticalBar').removeClass('visibleTransi') 316 }); 200 317 201 318 //piwitheme link in footer 202 var piwithemehtml = 'http://piwitheme.fr'; 203 var link=' - theme by <a href="http://piwitheme.fr" target="_blank">piwitheme</a>'; 204 $('#copyright').append(link); 319 var link = ' - theme by <a href="http://piwitheme.fr" target="_blank">piwitheme</a>'; 320 $('#copyright').append(link); 205 321 206 322 //specific IE8 207 if ($.browser.msie && parseInt($.browser.version, 10) === 8) { 208 $("#sortOrderLink").click(function() { 209 var elt = $("#sortOrderBox"); 323 if ($.browser.msie && parseInt($.browser.version, 10) === 8) 324 { 325 $("#sortOrderLink").click(function() 326 { 327 var elt = $("#sortOrderBox"); 210 328 elt.css("left", Math.min( $(this).offset().left, $(window).width() - elt.outerWidth(true) - 5)) 211 329 .css("top", $(this).offset().top + $(this).outerHeight(true)) 212 .toggle(); 213 }); 214 $("#sortOrderBox").on("mouseleave", function() { 215 $(this).hide(); 216 }); 217 $("#derivativeSwitchLink").click(function() { 218 var elt = $("#derivativeSwitchBox"); 330 .toggle() 331 }); 332 $("#sortOrderBox").on("mouseleave", function() 333 { 334 $(this).hide() 335 }); 336 $("#derivativeSwitchLink").click(function() 337 { 338 var elt = $("#derivativeSwitchBox"); 219 339 elt.css("left", Math.min( $(this).offset().left, $(window).width() - elt.outerWidth(true) - 5)) 220 340 .css("top", $(this).offset().top + $(this).outerHeight(true)) 221 .toggle(); 222 }); 223 $("#derivativeSwitchBox").on("mouseleave", function() { 224 $(this).hide(); 225 }); 226 $("#languageSwitchLink").click(function() { 341 .toggle() 342 }); 343 $("#derivativeSwitchBox").on("mouseleave", function() 344 { 345 $(this).hide() 346 }); 347 $("#languageSwitchLink").click(function() 348 { 227 349 var elt = $("#languageSwitchBox"); 228 350 elt.css("left", Math.min($(this).offset().left, $(window).width() - elt.outerWidth(true) - 5)) 229 351 .css("top", $(this).offset().top + $(this).outerHeight(true)) 230 .toggle(); 231 }); 232 $("#languageSwitchBox").on("mouseleave", function() { 352 .toggle() 353 }); 354 $("#languageSwitchBox").on("mouseleave", function() 355 { 233 356 $(this).hide(); 234 }); 235 }; 236 }); 357 }); 358 }; 359 360 }); 361 362 })(jQuery);
Note: See TracChangeset
for help on using the changeset viewer.