Skip to content

Commit

Permalink
Merge pull request #21 from briceburg/master
Browse files Browse the repository at this point in the history
1.4.0 (2015.08.16 +r25) release
  • Loading branch information
briceburg committed Aug 17, 2015
2 parents c05f5da + 9c99e4e commit 9ba537f
Show file tree
Hide file tree
Showing 10 changed files with 255 additions and 291 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#### LANG
/.lein-repl-history
/repl
/node_modules

#### IDE
/.project
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
language: node_js
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
jqModal Changes By Release
==========================

## 1.4.0 (2015.08.16 +r25)

* new convention: use 'e' for event, 'm' for modal element, 80 cols max.
* preventDefault to cancel click behavior in trigger functions, thanks @ayyash
* strict javascript linting, thanks @paladox
* add travis-ci integration

## 1.3.0 (2015.04.15 +r24)

* immediately show ajax modals
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,10 @@ The [CHANGELOG.md](https://github.com/briceburg/jqModal/blob/master/CHANGELOG.md
* Minify jqModal.js -> jqModal.min.js
* Update jqModal.jquery.json, bumping <semver> version
* Ensure changelog is up to date
* Copy jqModal.js to `releases/jqModal-r<revision>.js`
* Merge -master with -release
* Ensure `releases/` is absent from -release branch
* Tag -release with <semver> : `git tag <semver> && git push origin --tags` to publish.



Get Involved
============

Expand Down
2 changes: 1 addition & 1 deletion examples/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
'no timestampe value received';

if(isset($_GET['sleep'])) {
sleep(5);
sleep(3);
}
178 changes: 67 additions & 111 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<!-- example page styling -->
<style>
div.middle {
width: 600px;
margin: 2em auto;
width: 600px;
margin: 2em auto;
}
</style>

Expand All @@ -17,19 +17,14 @@
<!-- jqModal Styling -->
<link type="text/css" rel="stylesheet" media="all" href="jqModal.css" />


<!-- example page Styling -->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"
type="text/css" rel="stylesheet" />

</head>
<body>


<!-----------------
TRIGGER ELEMENTS
------------------->

<!-- TRIGGER ELEMENTS -->

<div class="middle">
1. <em>Defaults</em> -- <a href="#" class="jqModal">show dialog</a> <br /> Out-of-box behavior. The window and its
Expand All @@ -43,13 +38,11 @@
http:// and not file://).
</div>


<div class="middle">
3. <em>Manual trigger, extend options</em> -- <a href="#" id="trigger-ajax-with-timestamp">show dialog</a> <br />
Demonstrates a manual trigger of `jqmShow` as well as updating the options object.
</div>


<div class="middle">
4. <em>Manual trigger, modal:true dialog</em> -- <a href="#" id="trigger-modal-dialog">show modal:true dialog</a> <br />
Demonstrates a manual trigger of `jqmShow` as well as updating the options object.
Expand All @@ -62,10 +55,7 @@
http:// and not file://).
</div>


<!-------------
MODAL MARKUP (styled via jqModal.css)
--------------->
<!-- MODAL MARKUP (styled via jqModal.css) -->

<div class="jqmWindow" id="dialog">
<a href="#" class="jqmClose">Close</a>
Expand All @@ -79,18 +69,14 @@

<div class="jqmWindow" id="ajax-dialog">
<a href="#" class="jqmClose">Close</a>

<hr />

<div class="ajax-content"><marquee>loading...</marquee></div>
</div>


<div class="jqmWindow" id="modal-dialog">
<a href="#" class="jqmClose">Close</a>

<hr />

<p>modal: true demonstration</p>
<p>Pressing `Esc` or clicking the overlay will NOT close this form</p>

Expand All @@ -102,111 +88,81 @@
</select>
</div>


<div class="jqmWindow" id="ajax-text-dialog">
<a href="#" class="jqmClose">Close</a>

<hr />

<div class="ajax-content">I should be replaced</div>
<div class="ajax-content">I get replaced...</div>
</div>


<!------------
MODAL SCRIPT
-------------->

<!-- MODAL SCRIPT -->

<script type="text/javascript">
$().ready(function() {

/************
Example #1
************/
$().ready(function() {

$('#dialog').jqm();
/* Example #1 */
$('#dialog').jqm();

/************
Example #2
************/
/* Example #2 */
$('#ajax-dialog').jqm({
trigger: 'a.jqm-trigger-ajax',
ajax: 'ajax.php',
target: 'div.ajax-content',
closeOnEsc: true
});

/* Example #3 */
$('#trigger-ajax-with-timestamp').click(function() {
var timestamp = new Date().getTime();
$('#ajax-dialog').jqm({
trigger: 'a.jqm-trigger-ajax',
ajax: 'ajax.php',
target: 'div.ajax-content',
closeOnEsc: true
});

/************
Example #3
************/

$('#trigger-ajax-with-timestamp').click(function() {

var timestamp = new Date().getTime();

$('#ajax-dialog').jqm({
// update an option
ajax: 'ajax.php?timestamp=' + timestamp
}).jqmShow(); // show modal

return false;
});


/************
Example #4
************/

$('#modal-dialog').jqm({
trigger: '#trigger-modal-dialog',
modal: true
});


/************
Example #5
************/

$('#ajax-text-dialog').jqm({
trigger: '#trigger-ajax-text',
ajax: 'ajax.php?sleep=true',
ajaxText: 'Loading ...<span class="glyphicon glyphicon-refresh glyphicon-spin"></span>',
target: 'div.ajax-content',
closeOnEsc: true
});



// update an option
ajax: 'ajax.php?timestamp=' + timestamp
}).jqmShow(); // show modal
return false;
});
</script>

/* Example #4 */
$('#modal-dialog').jqm({
trigger: '#trigger-modal-dialog',
modal: true
});

/* Example #5 */
$('#ajax-text-dialog').jqm({
trigger: '#trigger-ajax-text',
ajax: 'ajax.php?sleep=true',
ajaxText: 'Loading ...<span class="glyphicon glyphicon-refresh glyphicon-spin"></span>',
target: 'div.ajax-content',
closeOnEsc: true
});
});
</script>

<style>
.glyphicon-spin {
-webkit-animation: spin 1000ms infinite linear;
animation: spin 1000ms infinite linear;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
</style>

<style>
.glyphicon-spin {
-webkit-animation: spin 1000ms infinite linear;
animation: spin 1000ms infinite linear;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
</style>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion jqModal.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"video",
"cover"
],
"version": "1.3.0",
"version": "1.4.0",
"author": {
"name": "Brice Burgess"
},
Expand Down
Loading

0 comments on commit 9ba537f

Please sign in to comment.