Skip to content

Commit 8767760

Browse files
committed
Merge pull request #75 from noahcooper/1.7.0
v1.7.0
2 parents 49e4128 + 01f7014 commit 8767760

32 files changed

+462
-397
lines changed

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
luminateExtend.js
22
=================
33

4-
Version: 1.6 (28-JAN-2014)
4+
Version: 1.7.0 (23-APR-2015)
55
Requires: jQuery v1.5.1+ or Zepto v1.1+
66

77
luminateExtend.js is a JavaScript library for use with
@@ -50,10 +50,10 @@ Before using luminateExtend.js, there are a few basic steps you must follow:
5050
For security reasons, the API and this library limit requests to a list of domains whitelisted by
5151
your organization. If you haven't already done so, go to Setup -> Site Options -> Open API
5252
Configuration, and click "Edit Javascript/Flash configuration". For the purposes of using this
53-
library, the only option you need to worry about on this page is **2. Trust JavaScript/Flash API from
54-
these domains**. Add any domains where you will use this library to the list. As noted on the page,
55-
you can use an asterisk as a wildcard if your website has multiple subdomains, e.g.
56-
"\*.myorganization.com".
53+
library, the only options you need to worry about on this page are **1. Allow JavaScript/Flash API
54+
from these domains** and **2. Trust JavaScript/Flash API from these domains**. Add any domains where
55+
you will use this library to these lists. As noted on the page, you can use an asterisk as a wildcard
56+
if your website has multiple subdomains, e.g. "\*.myorganization.com".
5757

5858
* Create luminateExtend_server PageBuilder page
5959

@@ -88,15 +88,14 @@ website, including the library on a page is easy — simply pull in the libr
8888
jQuery is included. (Change out the file path as needed, depending on where you uploaded the file on your site.)
8989

9090
``` html
91-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
91+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
9292
<script src="../js/luminateExtend.min.js"></script>
9393
```
9494

95-
If you prefer to use a CDN, luminateExtend.js is available via [cdnjs](http://cdnjs.com/libraries/luminateExtend).
96-
Thanks cdnjs and CloudFlare!
95+
If you prefer to use a CDN, luminateExtend.js is available via [cdnjs](http://cdnjs.com/libraries/luminateExtend).
9796

9897
``` html
99-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
98+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
10099
<script src="//cdnjs.cloudflare.com/ajax/libs/luminateExtend/1.6.0/luminateExtend.min.js"></script>
101100
```
102101

@@ -122,7 +121,7 @@ luminateExtend.library
122121
`luminateExtend.library` contains information about the library.
123122

124123
``` js
125-
console.log(luminateExtend.library.version); // logs a value like "1.6"
124+
console.log(luminateExtend.library.version); // logs a value like "1.7.0"
126125
```
127126

128127
The library object contains the following:
@@ -301,7 +300,6 @@ luminateExtend.api.request([{
301300
async: false,
302301
api: 'cons',
303302
data: 'method=getUser',
304-
requestType: 'POST',
305303
requiresAuth: true,
306304
callback: {
307305
success: getUserCallback
@@ -336,8 +334,6 @@ common parameters defined in luminateExtend.global.apiCommon.
336334
**form:** A selector for a form to be serialized with the request. The result is appended to the data
337335
string above.
338336

339-
**requestType:** The type of HTTP request, either "GET", the default, or "POST".
340-
341337
**requiresAuth:** A boolean indicating whether or not the API method being called requires
342338
authentication. If true, an auth token is automatically appended to the request data string.
343339

@@ -400,7 +396,6 @@ When the request method is called ...
400396
* The value for `contentType` is set to the value of the enctype attribute if defined.
401397
* Any query strings included in the form action are passed as `data`.
402398
* The form's ID is passed as the value for `form`, and if the form has no ID, one is added.
403-
* The value for `requestType` is determined by the form method.
404399
* The value for `useHTTP` is determined by the protocol of the form action, or if the form action is
405400
relative, by the protocol of the requesting page.
406401
* The values for `callback` and `requiresAuth` are set using an HTML5 data- attribute, data-luminateApi.

examples/bootstrap/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ window.getUser = function() {
8484
api: 'cons',
8585
callback: getUserCallback,
8686
data: 'method=getUser',
87-
requestType: 'POST',
8887
requiresAuth: true
8988
});
9089
};
@@ -238,7 +237,7 @@ To use the sign-up form, you'll first need to edit the form's action to use your
238237
You'll also need to edit the Survey ID to use the appropriate Survey from your organization's site:
239238

240239
```html
241-
<input type="hidden" name="survey_id" value="18561">
240+
<input type="hidden" name="survey_id" value="1234">
242241
```
243242

244243
Reading the HTML for the sign-up form above, you'll note that the form tag has a callback defined for handling the API response, submitSurveyCallback. If the Survey is submitted without error, a thank you message is shown to the user in place of the form. If one or more errors are returned, they are displayed above the form.

examples/bootstrap/action-center.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<head>
44
<meta charset="utf-8">
55
<title>American Health Society Action Center</title>
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maxiumum-scale=1.0">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
77

8-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
8+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
99
<style>
1010
/* example site styles */
1111
body {
@@ -14,15 +14,15 @@
1414
</style>
1515

1616
<!--[if lt IE 9]>
17-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
17+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
1818
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
1919
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
2020
<link href="//netdna.bootstrapcdn.com/respond-proxy.html" id="respond-proxy" rel="respond-proxy">
2121
<link href="js/respond.proxy.gif" id="respond-redirect" rel="respond-redirect">
2222
<script src="js/respond.proxy.js"></script>
2323
<![endif]-->
2424
<!--[if gte IE 9]><!-->
25-
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
25+
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
2626
<!--<![endif]-->
2727
</head>
2828
<body>
@@ -77,7 +77,7 @@ <h1>Action Center</h1>
7777
</footer>
7878
</div>
7979

80-
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
80+
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
8181

8282
<script src="js/luminateExtend.js"></script>
8383
<script src="js/luminateExtend-examples.js"></script>

examples/bootstrap/donate.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<head>
44
<meta charset="utf-8">
55
<title>Donate to American Health Society</title>
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maxiumum-scale=1.0">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
77

8-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
8+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
99
<style>
1010
/* example site styles */
1111
body {
@@ -22,15 +22,15 @@
2222
</style>
2323

2424
<!--[if lt IE 9]>
25-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
25+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
2626
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
2727
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
2828
<link href="//netdna.bootstrapcdn.com/respond-proxy.html" id="respond-proxy" rel="respond-proxy">
2929
<link href="js/respond.proxy.gif" id="respond-redirect" rel="respond-redirect">
3030
<script src="js/respond.proxy.js"></script>
3131
<![endif]-->
3232
<!--[if gte IE 9]><!-->
33-
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
33+
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
3434
<!--<![endif]-->
3535
</head>
3636
<body>
@@ -319,7 +319,7 @@ <h1>Donate</h1>
319319
</footer>
320320
</div>
321321

322-
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
322+
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
323323

324324
<script src="js/luminateExtend.js"></script>
325325
<script src="js/luminateExtend-examples.js"></script>

examples/bootstrap/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<head>
44
<meta charset="utf-8">
55
<title>American Health Society</title>
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maxiumum-scale=1.0">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
77

8-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
8+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
99
<style>
1010
/* example site styles */
1111
body {
@@ -14,15 +14,15 @@
1414
</style>
1515

1616
<!--[if lt IE 9]>
17-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
17+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
1818
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
1919
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
2020
<link href="//netdna.bootstrapcdn.com/respond-proxy.html" id="respond-proxy" rel="respond-proxy">
2121
<link href="js/respond.proxy.gif" id="respond-redirect" rel="respond-redirect">
2222
<script src="js/respond.proxy.js"></script>
2323
<![endif]-->
2424
<!--[if gte IE 9]><!-->
25-
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
25+
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
2626
<!--<![endif]-->
2727
</head>
2828
<body>
@@ -94,7 +94,7 @@ <h2>Walk for Health</h2>
9494
</footer>
9595
</div>
9696

97-
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
97+
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
9898

9999
<script src="js/luminateExtend.js"></script>
100100
<script src="js/luminateExtend-examples.js"></script>

examples/bootstrap/js/luminateExtend-examples.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
api: 'cons',
2424
callback: getUserCallback,
2525
data: 'method=getUser',
26-
requestType: 'POST',
2726
requiresAuth: true
2827
});
2928
};

examples/bootstrap/js/luminateExtend.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/bootstrap/sign-up.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<head>
44
<meta charset="utf-8">
55
<title>Sign Up for News from American Health Society</title>
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maxiumum-scale=1.0">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
77

8-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
8+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
99
<style>
1010
/* example site styles */
1111
body {
@@ -14,15 +14,15 @@
1414
</style>
1515

1616
<!--[if lt IE 9]>
17-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
17+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
1818
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
1919
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
2020
<link href="//netdna.bootstrapcdn.com/respond-proxy.html" id="respond-proxy" rel="respond-proxy">
2121
<link href="js/respond.proxy.gif" id="respond-redirect" rel="respond-redirect">
2222
<script src="js/respond.proxy.js"></script>
2323
<![endif]-->
2424
<!--[if gte IE 9]><!-->
25-
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
25+
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
2626
<!--<![endif]-->
2727
</head>
2828
<body>
@@ -70,7 +70,7 @@ <h1>Get AHS News</h1>
7070
<p>Sign up today to receive the American Health Society's weekly e-newsletter.</p>
7171
<form class="form-horizontal luminateApi survey-form" method="POST" action="http://shortname.convio.net/site/CRSurveyAPI" data-luminateApi='{"callback": "submitSurveyCallback", "requiresAuth": "true"}'>
7272
<input type="hidden" name="method" value="submitSurvey">
73-
<input type="hidden" name="survey_id" value="18561">
73+
<input type="hidden" name="survey_id" value="1234">
7474
<div class="form-group">
7575
<label for="survey-cons-first-name" class="col-sm-3 col-md-2 control-label">First Name:</label>
7676
<div class="col-sm-6">
@@ -109,7 +109,7 @@ <h1>Get AHS News</h1>
109109
</footer>
110110
</div>
111111

112-
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
112+
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
113113

114114
<script src="js/luminateExtend.js"></script>
115115
<script src="js/luminateExtend-examples.js"></script>

examples/bootstrap/walk-for-health.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<head>
44
<meta charset="utf-8">
55
<title>Walk for Health - American Health Society</title>
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maxiumum-scale=1.0">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
77

8-
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
8+
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
99
<style>
1010
/* example site styles */
1111
body {
@@ -17,15 +17,15 @@
1717
</style>
1818

1919
<!--[if lt IE 9]>
20-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
20+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
2121
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
2222
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
2323
<link href="//netdna.bootstrapcdn.com/respond-proxy.html" id="respond-proxy" rel="respond-proxy">
2424
<link href="js/respond.proxy.gif" id="respond-redirect" rel="respond-redirect">
2525
<script src="js/respond.proxy.js"></script>
2626
<![endif]-->
2727
<!--[if gte IE 9]><!-->
28-
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
28+
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
2929
<!--<![endif]-->
3030
</head>
3131
<body>
@@ -95,7 +95,7 @@ <h1>Walk for Health</h1>
9595
</footer>
9696
</div>
9797

98-
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
98+
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
9999

100100
<script src="js/luminateExtend.js"></script>
101101
<script src="js/luminateExtend-examples.js"></script>

examples/foundation/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ window.getUser = function() {
8888
api: 'cons',
8989
callback: getUserCallback,
9090
data: 'method=getUser',
91-
requestType: 'POST',
9291
requiresAuth: true
9392
});
9493
};
@@ -231,7 +230,7 @@ To use the sign-up form, you'll first need to edit the form's action to use your
231230
You'll also need to edit the Survey ID to use the appropriate Survey from your organization's site:
232231

233232
```html
234-
<input type="hidden" name="survey_id" value="18561">
233+
<input type="hidden" name="survey_id" value="1234">
235234
```
236235

237236
Reading the HTML for the sign-up form above, you'll note that the form tag has a callback defined for handling the API response, submitSurveyCallback. If the Survey is submitted without error, a thank you message is shown to the user in place of the form. If one or more errors are returned, they are displayed above the form.

0 commit comments

Comments
 (0)