This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <title>jQuery Scroll Loader Demo</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
| <script src="https://gist.github.com/1592132.js?file=scrollLoader.js"></script> | |
| </head> | |
| <body> | |
| <ol id="feed"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <title>jQuery FAQ Toggle Plugin Demo</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
| <script src="https://gist.github.com/1592157.js?file=faqToggle.js"></script> | |
| <style type="text/css"> | |
| dl.faqToggle dt { color:#006F53; cursor:pointer; margin:0 0 .25em 0; display:block; } | |
| dl.faqToggle dd { display:block; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <title>jQuery Simple Image Resize</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
| <script src="https://gist.github.com/1592221.js?file=simpleImgResize.js"></script> | |
| <style type="text/css"> | |
| #srcImg { border:1px solid red; } | |
| #banner { border:1px solid green; width:200px;height:200px;overflow:hidden; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The first commented line is your dabblet’s title | |
| */ | |
| body { | |
| background: #f06; | |
| background: linear-gradient(45deg, #f06, yellow); | |
| min-height:100%; | |
| font: 13px/1.4 Arial; | |
| color:#666666; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Grab this service as MyPlaces only available to authenticated users | |
| #set($groupLocalService = $serviceLocator.findService("com.liferay.portal.service.GroupLocalService")) | |
| ## Get all Groups | |
| #set($groupList = $groupLocalService.getGroups(-1, -1)) | |
| ## Check if we have Groups before processing | |
| #if($listTool.size($groupList)>0) | |
| ## Grab all groups that are Communities |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #* | |
| REQUIREMENTS: | |
| journal.article.force.autogenerate.id must be set to false in portal-ext to allow custom ID | |
| USAGE: | |
| For global: simply create Web Content ID | |
| For a specific community: subfix Community ID E.g. FOOTER-COPY-18 | |
| *# | |
| ## Example common footer copy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #parse ($init) ## REQUIRED to "parse" Velocity Vars | |
| ... | |
| ... | |
| ... | |
| ## Let's get the REAL portlet id, not the "56_INSTANCE_blahG" instance id | |
| #set ($the_portlet_id = $getterUtil.getInteger($stringUtil.extractFirst($portlet_display.getId(),"_"))) | |
| ... | |
| ... | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Video Lightbox */ | |
| jQuery('.video a').click(function(e) { | |
| var videoUrl = jQuery(this).attr('href'); | |
| //console.log(videoUrl); | |
| if (videoUrl) { | |
| var videoTitle = jQuery(this).text(); | |
| var videoW = 640, videoH = 360; | |
| var lightbox = jQuery('<iframe id="" src="' + videoUrl + '" width="' + videoW + '" height="' + videoH + '" frameborder="0" allowfullscreen></iframe>'); | |
| lightbox.dialog({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #**************************************************** | |
| MOBILE DEVICE CHECK | |
| adapted from http://detectmobilebrowsers.com/ | |
| (current devices as of 6/3/2012) | |
| *****************************************************# | |
| #set($userAgent = $request.getHeader("User-Agent").toLowerCase()) | |
| #set($isMobile = false) | |
| #if($userAgent.matches(".*(android.+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino).*")||$userAgent.substring(0,4).matches("1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #**************************************************** | |
| Check if login maximized | |
| *****************************************************# | |
| #set ($is_login_maximized = false) | |
| #if($is_maximized && $layoutTypePortlet.getStateMaxPortletId() == 58) | |
| #set ($is_login_maximized = true) | |
| #end | |
| #* Example usage: |
OlderNewer