Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #68 from PatrickHuetter/master

Added feature 'customSelector' to modify the jQuery-selector name. Just ...
  • Loading branch information...
commit 04e5c2a152e1bbd9beec9cc8d7e97fe05e239c12 2 parents dcac94b + 54e205a
@benorama benorama authored
View
4 grails-app/views/tags/_add-to-page-link.gsp
@@ -1,7 +1,7 @@
<g:if test="${includeScript}">
<script type="text/javascript">
- $(function() {
- $('a.fb-sdk-add-to-page-link').click(function() {
+ ${customSelector ?: '$'}(function() {
+ ${customSelector ?: '$'}('a.fb-sdk-add-to-page-link').click(function() {
var link = $(this);
var options = {
method: 'pagetab'
View
6 grails-app/views/tags/_init-js.gsp
@@ -3,9 +3,9 @@
<div id="fb-root"></div>
<script type="text/javascript">
// Disable all fb sdk links until FB JS SDK is initialized
- $(function() {
+ ${customSelector ?: '$'}(function() {
if (!window.FB) {
- $('.fb-sdk-link').attr('disabled', 'disabled').addClass('disabled');
+ ${customSelector ?: '$'}('.fb-sdk-link').attr('disabled', 'disabled').addClass('disabled');
}
});
@@ -19,7 +19,7 @@
xfbml: <g:if test="${xfbml}">true</g:if><g:else>false</g:else>, // parse XFBML
frictionlessRequests: <g:if test="${frictionlessRequests}">true</g:if><g:else>false</g:else> // to enable frictionless requests
});
- $('.fb-sdk-link').removeAttr('disabled').removeClass('disabled');
+ ${customSelector ?: '$'}('.fb-sdk-link').removeAttr('disabled').removeClass('disabled');
<g:if test="${autoGrow}">
FB.Canvas.setAutoGrow();
View
4 grails-app/views/tags/_invite-link.gsp
@@ -1,8 +1,8 @@
<%@ page import="grails.converters.JSON" %>
<g:if test="${includeScript}">
<script type="text/javascript">
- $(function() {
- $('a.fb-sdk-invite-link').click(function() {
+ ${customSelector ?: '$'}(function() {
+ ${customSelector ?: '$'}('a.fb-sdk-invite-link').click(function() {
var link = $(this);
var options = {
method: 'apprequests',
View
4 grails-app/views/tags/_login-link.gsp
@@ -1,7 +1,7 @@
<g:if test="${includeScript}">
<script type="text/javascript">
- $(function() {
- $('a.fb-sdk-login-link').click(function(event) {
+ ${customSelector ?: '$'}(function() {
+ ${customSelector ?: '$'}('a.fb-sdk-login-link').click(function(event) {
var link = $(this);
link.attr('disabled', 'disabled');
FB.login(function(response) {
View
4 grails-app/views/tags/_logout-link.gsp
@@ -1,7 +1,7 @@
<g:if test="${includeScript}">
<script type="text/javascript">
- $(function() {
- $('a.fb-sdk-logout-link').click(function() {
+ ${customSelector ?: '$'}(function() {
+ ${customSelector ?: '$'}('a.fb-sdk-logout-link').click(function() {
var link = $(this);
link.attr('disabled', 'disabled');
FB.getLoginStatus(function(response) {
View
4 grails-app/views/tags/_publish-link.gsp
@@ -1,7 +1,7 @@
<g:if test="${includeScript}">
<script type="text/javascript">
- $(function() {
- $('a.fb-sdk-publish-link').click(function() {
+ ${customSelector ?: '$'}(function() {
+ ${customSelector ?: '$'}('a.fb-sdk-publish-link').click(function() {
var link = $(this);
var options = {
method: 'feed'
View
4 grails-app/views/tags/_send-link.gsp
@@ -1,7 +1,7 @@
<g:if test="${includeScript}">
<script type="text/javascript">
- $(function() {
- $('a.fb-sdk-send-link').click(function() {
+ ${customSelector ?: '$'}(function() {
+ ${customSelector ?: '$'}('a.fb-sdk-send-link').click(function() {
var link = $(this);
var options = {
method: 'send',
Please sign in to comment.
Something went wrong with that request. Please try again.