revert hammer js changes
This commit is contained in:
@@ -6,4 +6,4 @@
|
||||
//= require jquery.storageapi.js
|
||||
//= require rails.js
|
||||
//= require common.js
|
||||
//= require_tree ./default
|
||||
//= require_tree .
|
||||
|
||||
3
app/assets/javascripts/bulk_update_requests.js.coffee
Normal file
3
app/assets/javascripts/bulk_update_requests.js.coffee
Normal file
@@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://coffeescript.org/
|
||||
7
app/assets/javascripts/mobile.js
Normal file
7
app/assets/javascripts/mobile.js
Normal file
@@ -0,0 +1,7 @@
|
||||
//= require jquery-1.10.1.min.js
|
||||
//= require hammer.min.js
|
||||
//= require jquery.hammer.min.js
|
||||
|
||||
$(function() {
|
||||
$(document).hammer();
|
||||
});
|
||||
@@ -1,2 +0,0 @@
|
||||
//= require hammer.min.js
|
||||
//= require jquery-1.10.1.min.js
|
||||
@@ -62,28 +62,4 @@ div#tags {
|
||||
font-size: 24pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.category-1 a, a.tag-type-1 {
|
||||
color: #A00;
|
||||
|
||||
&:hover {
|
||||
color: #B66;
|
||||
}
|
||||
}
|
||||
|
||||
.category-3 a, a.tag-type-3 {
|
||||
color: #A0A;
|
||||
|
||||
&:hover {
|
||||
color: #B6B;
|
||||
}
|
||||
}
|
||||
|
||||
.category-4 a, a.tag-type-4 {
|
||||
color: #0A0;
|
||||
|
||||
&:hover {
|
||||
color: #6B6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<%= csrf_meta_tag %>
|
||||
<%= stylesheet_link_tag "mobile", :media => "screen" %>
|
||||
<%= javascript_include_tag "mobile/mobile" %>
|
||||
<%= javascript_include_tag "mobile" %>
|
||||
<%= Danbooru.config.custom_html_header_content %>
|
||||
<%= yield :html_header %>
|
||||
</head>
|
||||
|
||||
@@ -11,20 +11,23 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var doc = new Hammer(document.body);
|
||||
|
||||
doc.on("swipeleft", function(e) {
|
||||
var href = $(".paginator a[rel=next]").attr("href");
|
||||
if (href) {
|
||||
window.location = href;
|
||||
}
|
||||
});
|
||||
doc.on("swiperight", function(e) {
|
||||
var href = $(".paginator a[rel=prev]").attr("href");
|
||||
if (href) {
|
||||
window.location = href;
|
||||
$(document).on("swipeleft", function(e) {
|
||||
if (e.gesture.distance > 150) {
|
||||
var href = $(".paginator a[rel=next]").attr("href");
|
||||
if (href) {
|
||||
window.location = href;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("swiperight", function(e) {
|
||||
if (e.gesture.distance > 150) {
|
||||
var href = $(".paginator a[rel=prev]").attr("href");
|
||||
if (href) {
|
||||
window.location = href;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
|
||||
@@ -13,17 +13,19 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=<%= @post.device_scale %>">
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var doc = new Hammer(document.body);
|
||||
|
||||
doc.on("swipeleft", function(e) {
|
||||
var href = $(".paginator a[rel=next]").attr("href");
|
||||
if (href) {
|
||||
window.location = href;
|
||||
$(document).on("swipeleft", function(e) {
|
||||
if (e.gesture.distance > 150) {
|
||||
var href = $(".paginator a[rel=next]").attr("href");
|
||||
if (href) {
|
||||
window.location = href;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
doc.on("swiperight", function(e) {
|
||||
window.history.back();
|
||||
$(document).on("swiperight", function(e) {
|
||||
if (e.gesture.distance > 150) {
|
||||
window.history.back();
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user