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>
|
||||
|
||||
@@ -4,7 +4,7 @@ module Danbooru
|
||||
class Configuration
|
||||
# The version of this Danbooru.
|
||||
def version
|
||||
"2.57.4"
|
||||
"2.57.0"
|
||||
end
|
||||
|
||||
# The name of this Danbooru.
|
||||
|
||||
6
vendor/assets/javascripts/hammer.min.js
vendored
6
vendor/assets/javascripts/hammer.min.js
vendored
File diff suppressed because one or more lines are too long
8
vendor/assets/javascripts/jquery.hammer.min.js
vendored
Normal file
8
vendor/assets/javascripts/jquery.hammer.min.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/*! jQuery plugin for Hammer.JS - v1.1.0dev - 2014-04-11
|
||||
* http://eightmedia.github.com/hammer.js
|
||||
*
|
||||
* Copyright (c) 2014 Jorik Tangelder <j.tangelder@gmail.com>;
|
||||
* Licensed under the MIT license */
|
||||
|
||||
!function(a){"use strict";function b(a,b){Date.now||(Date.now=function(){return(new Date).getTime()}),a.utils.each(["on","off"],function(c){a.utils[c]=function(a,d,e){b(a)[c](d,function(a){var c=b.extend({},a.originalEvent,a);e.call(this,c)})}}),a.Instance.prototype.trigger=function(a,c){var d=b(this.element);return d.has(c.target).length&&(d=b(c.target)),d.trigger({type:a,gesture:c})},b.fn.hammer=function(c){return this.each(function(){var d=b(this),e=d.data("hammer");e?e&&c&&a.utils.extend(e.options,c):d.data("hammer",new a(this,c||{}))})}}"function"==typeof define&&define.amd?define(["hammerjs","jquery"],b):b(a.Hammer,a.jQuery||a.Zepto)}(window);
|
||||
//# sourceMappingURL=jquery.hammer.min.map
|
||||
Reference in New Issue
Block a user