mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
Merge pull request #57 from fmbiete/turbolinks
Moving document.ready to init.js, to be in html header
This commit is contained in:
commit
6968003fed
2 changed files with 16 additions and 4 deletions
|
@ -4,8 +4,10 @@
|
|||
<script type="text/javascript">
|
||||
(function(){
|
||||
// Do not continue if Paloma not found.
|
||||
if (window['Paloma'] === undefined && window['console'] !== undefined){
|
||||
console.warn("Paloma not found. Require it in your application.js.");
|
||||
if (window['Paloma'] === undefined) {
|
||||
if (window['console'] !== undefined) {
|
||||
console.warn("Paloma not found. Require it in your application.js.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -20,8 +22,6 @@
|
|||
request['resource'],
|
||||
request['action'],
|
||||
request['params']);
|
||||
|
||||
$(document).ready(function(){ Paloma.engine.start(); });
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
|
|
12
vendor/assets/javascripts/paloma/init.js
vendored
12
vendor/assets/javascripts/paloma/init.js
vendored
|
@ -15,3 +15,15 @@ else {
|
|||
console.log(msg);
|
||||
};
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
// Do not continue if Paloma not found.
|
||||
if (window['Paloma'] === undefined) {
|
||||
if (window['console'] !== undefined) {
|
||||
console.warn("Paloma not found. Require it in your application.js.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Paloma.engine.start();
|
||||
});
|
Loading…
Reference in a new issue