turbolinks fixes

This commit is contained in:
Lee Lawlor 2014-08-01 15:57:02 -04:00
parent acd42142dc
commit 0c758f6e40
18 changed files with 91 additions and 88 deletions

View File

@ -1,11 +1,7 @@
$(function () { $(document).on('page:load ready', function() {
$("div.progressbar").each ( $("div.progressbar").each(function() {
function () {
var element = this; var element = this;
$(element).progressbar( $(element).progressbar({ value: parseInt($(element).attr("rel")) });
{
value: parseInt($(element).attr("rel"))
});
}); });
}); });

View File

@ -111,7 +111,7 @@
</div> </div>
<script language="javascript"> <script language="javascript">
$(function() { $(document).on('page:load ready', function() {
$("#sidebar a").attr("target", "_blank"); $("#sidebar a").attr("target", "_blank");
}); });
</script> </script>

View File

@ -141,7 +141,7 @@
// remember default field label // remember default field label
var default_label = '<%= t(:channel_default_field) %>'; var default_label = '<%= t(:channel_default_field) %>';
// when document is ready // when document is ready
$(function() { $(document).on('page:load ready', function() {
// iterate through each field textbox // iterate through each field textbox
$('.field').each(function() { $('.field').each(function() {
// if a value is present, show the 'remove' checkbox // if a value is present, show the 'remove' checkbox

View File

@ -12,7 +12,7 @@
<div id="private_dialog1" class="column" > </div> <div id="private_dialog1" class="column" > </div>
</div> </div>
<script> <script>
$(function() { $(document).on('page:load ready', function() {
$("#devInfoLink_private").click( $("#devInfoLink_private").click(
function(e) { function(e) {
var element = $("#devInfo"); var element = $("#devInfo");
@ -29,3 +29,4 @@ $(function() {
}); });
</script> </script>

View File

@ -92,7 +92,7 @@
} }
// when document is ready // when document is ready
$(function() { $(document).on('page:load ready', function() {
// events to automatically create slug field // events to automatically create slug field
$('#channel_name').keyup(function() { $('#channel_name').keyup(function() {
@ -105,3 +105,4 @@
}); });
</script> </script>

View File

@ -266,7 +266,7 @@
} }
// when document is ready // when document is ready
$(function() { $(document).on('page:load ready', function() {
// event to make sure user types something into form // event to make sure user types something into form
<% @fields.each do |f| %> <% @fields.each do |f| %>
@ -306,3 +306,4 @@
</body> </body>
</html> </html>

View File

@ -5,7 +5,7 @@
<script type="text/javascript" src="<%= @map_domain %>/maps/api/js?sensor=false"></script> <script type="text/javascript" src="<%= @map_domain %>/maps/api/js?sensor=false"></script>
<script type="text/javascript"> <script type="text/javascript">
// when document is ready // when document is ready
$(function() { $(document).on('page:load ready', function() {
// google maps options // google maps options
var myOptions = { var myOptions = {
@ -42,3 +42,4 @@
<div id="map_canvas" style="width: <%= params[:width] ? params[:width].to_i : @width.to_i %>px; height: <%= params[:height] ? params[:height].to_i : @height.to_i %>px;"></div> <div id="map_canvas" style="width: <%= params[:width] ? params[:width].to_i : @width.to_i %>px; height: <%= params[:height] ? params[:height].to_i : @height.to_i %>px;"></div>
</body> </body>
</html> </html>

View File

@ -5,7 +5,7 @@
<script type="text/javascript" src="<%= @map_domain %>/maps/api/js?sensor=false"></script> <script type="text/javascript" src="<%= @map_domain %>/maps/api/js?sensor=false"></script>
<script type="text/javascript"> <script type="text/javascript">
// when document is ready // when document is ready
$(function() { $(document).on('page:load ready', function() {
// google maps options // google maps options
var myOptions = { var myOptions = {
@ -117,3 +117,4 @@
<div id="map_canvas" style="width: <%= params[:width] ? params[:width].to_i : @width.to_i %>px; height: <%= params[:height] ? params[:height].to_i : @height.to_i %>px;"></div> <div id="map_canvas" style="width: <%= params[:width] ? params[:width].to_i : @width.to_i %>px; height: <%= params[:height] ? params[:height].to_i : @height.to_i %>px;"></div>
</body> </body>
</html> </html>

View File

@ -57,7 +57,7 @@
<script type="text/javascript"> <script type="text/javascript">
// when document is ready // when document is ready
$(function() { $(document).on('page:load ready', function() {
// allow tabs to work in textareas // allow tabs to work in textareas
$("textarea").tabby(); $("textarea").tabby();

View File

@ -13,7 +13,7 @@
<% end %> <% end %>
<div> <div>
<script> <script>
$(function () { $(document).on('page:load ready', function() {
$(".timeago").timeago(); $(".timeago").timeago();
var refreshInterval = setInterval(refreshStatus, 1 * 60 * 1000); var refreshInterval = setInterval(refreshStatus, 1 * 60 * 1000);
}); });
@ -44,3 +44,4 @@ function refreshStatus() {
</script> </script>
</body> </body>
</html> </html>

View File

@ -1,7 +1,6 @@
<script> <script>
$(document).on('page:load ready', function() {
$(function() {
$("#tabs").tabs({ $("#tabs").tabs({
ajaxOptions: { ajaxOptions: {
error: function( xhr, status, index, anchor ) { error: function( xhr, status, index, anchor ) {

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long