mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Create Photoswipe escape class
* Set 'rx-escape' as a escape class for images to escape photoswipe addon. * `rx-escape` 라는 class 를 가진 이미지는 포토스와이프 애드온으로 포토스와이프 되지 않습니다.
This commit is contained in:
parent
f7736dbc29
commit
da3e971486
1 changed files with 5 additions and 0 deletions
|
|
@ -217,8 +217,13 @@ var initPhotoSwipeFromDOM = function(gallerySelector) {
|
|||
// do not activate PhotoSwipe at the editor-component or other module components
|
||||
var regx_skip = /(?:(modules|addons|classes|common|layouts|libs|widgets|widgetstyles)\/)/i;
|
||||
var regx_allow_i6pngfix = /(?:common\/tpl\/images\/blank\.gif$)/i;
|
||||
var ps_skip_class = 'rx-escape';
|
||||
var galleryImgEls = $(galleryElements[i]).find('img');
|
||||
for(var j = 0, jl = galleryImgEls.length; j < jl; j++) {
|
||||
// if the item has skip class, skip it.
|
||||
if($(galleryImgEls[j]).hasClass(ps_skip_class)) continue;
|
||||
|
||||
// skip components
|
||||
if(regx_skip.test($(galleryImgEls[j]).attr('src')) && !regx_allow_i6pngfix.test($(galleryImgEls[j]).attr('src'))) continue;
|
||||
|
||||
//$(galleryImgEls[j]).attr('data-pswp-uid', i+1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue