* Merge randuin's changes
* Revert user/show changes * Move paginator js into separate file
This commit is contained in:
@@ -8,20 +8,3 @@
|
|||||||
//= require_self
|
//= require_self
|
||||||
//= require_tree .
|
//= require_tree .
|
||||||
|
|
||||||
(function() {
|
|
||||||
Danbooru.Paginator = {};
|
|
||||||
Danbooru.Paginator.next_page = function() {
|
|
||||||
if($('.paginator li span').parent().next().length != 0)
|
|
||||||
{
|
|
||||||
window.location = $('.paginator li span').parent().next().find('a').attr('href');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Danbooru.Paginator.prev_page = function() {
|
|
||||||
if($('.paginator li span').parent().prev().length != 0)
|
|
||||||
{
|
|
||||||
window.location = $('.paginator li span').parent().prev().find('a').attr('href');
|
|
||||||
console.log('logged')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|||||||
22
app/assets/javascripts/paginator.js
Normal file
22
app/assets/javascripts/paginator.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
(function() {
|
||||||
|
Danbooru.Paginator = {};
|
||||||
|
Danbooru.Paginator.next_page = function() {
|
||||||
|
if($('.paginator li span').parent().next().length != 0)
|
||||||
|
{
|
||||||
|
window.location = $('.paginator li span').parent().next().find('a').attr('href');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Danbooru.Paginator.prev_page = function() {
|
||||||
|
if($('.paginator li span').parent().prev().length != 0)
|
||||||
|
{
|
||||||
|
window.location = $('.paginator li span').parent().prev().find('a').attr('href');
|
||||||
|
console.log('logged')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
key('right', function(){ Danbooru.Paginator.next_page() });
|
||||||
|
key('left', function(){ Danbooru.Paginator.prev_page() });
|
||||||
|
})
|
||||||
@@ -111,6 +111,4 @@
|
|||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
Danbooru.Post.initialize_all();
|
Danbooru.Post.initialize_all();
|
||||||
key('right', function(){ Danbooru.Paginator.next_page() });
|
|
||||||
key('left', function(){ Danbooru.Paginator.prev_page() });
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
small { font-size: 80% }
|
|
||||||
dt { float: left; margin: 0 20px 0 0; width: 200px; }
|
|
||||||
dd { margin: 0 }
|
|
||||||
@@ -1,9 +1,17 @@
|
|||||||
<div id="c-users">
|
<div id="c-users">
|
||||||
<div id="a-show">
|
<div id="a-show">
|
||||||
<h1><%= CurrentUser.pretty_name %> <small>[<%= @presenter.level %>]</small></h1>
|
<h1>Show User: <%= CurrentUser.pretty_name %></h1>
|
||||||
<div><small>Member since <strong><%= @presenter.join_date %></strong> with the help of <strong><%= @presenter.inviter(self) %></strong></small></div>
|
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
|
<dt>Join Date</dt>
|
||||||
|
<dd><%= @presenter.join_date %></dd>
|
||||||
|
|
||||||
|
<dt>Inviter</dt>
|
||||||
|
<dd><%= @presenter.inviter(self) %></dd>
|
||||||
|
|
||||||
|
<dt>Level</dt>
|
||||||
|
<dd><%= @presenter.level %></dd>
|
||||||
|
|
||||||
<dt>Upload Limit</dt>
|
<dt>Upload Limit</dt>
|
||||||
<dd><%= @presenter.upload_limit %></dd>
|
<dd><%= @presenter.upload_limit %></dd>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user