refactored javascripts
This commit is contained in:
@@ -3,7 +3,7 @@ class TagAliasesController < ApplicationController
|
|||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@tag_alias = TagAlias.new
|
@tag_alias = TagAlias.new(params[:tag_alias])
|
||||||
respond_with(@tag_alias)
|
respond_with(@tag_alias)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ class WikiPagesController < ApplicationController
|
|||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
before_filter :member_only, :except => [:index, :show]
|
before_filter :member_only, :except => [:index, :show]
|
||||||
before_filter :moderator_only, :only => [:destroy]
|
before_filter :moderator_only, :only => [:destroy]
|
||||||
|
before_filter :normalize_search_params, :only => [:index]
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@wiki_page = WikiPage.new
|
@wiki_page = WikiPage.new
|
||||||
@@ -53,4 +54,12 @@ class WikiPagesController < ApplicationController
|
|||||||
@wiki_page.revert_to!(@version)
|
@wiki_page.revert_to!(@version)
|
||||||
respond_with(@wiki_page)
|
respond_with(@wiki_page)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
def normalize_search_params
|
||||||
|
if params[:title]
|
||||||
|
params[:search] ||= {}
|
||||||
|
params[:search][:title_equals] = params.delete(:title)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def wait_image(html_id)
|
def wait_image(html_id)
|
||||||
('<img src="/images/wait.gif" style="display: none;" id="' + html_id + '">').html_safe
|
('<img src="/images/wait.gif" style="display: none;" class="wait" id="' + html_id + '">').html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|||||||
@@ -29,6 +29,14 @@ class TagAlias < ActiveRecord::Base
|
|||||||
self.creator_id = CurrentUser.user.id
|
self.creator_id = CurrentUser.user.id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def antecedent_tag
|
||||||
|
Tag.find_by_name(antecedent_name)
|
||||||
|
end
|
||||||
|
|
||||||
|
def consequent_tag
|
||||||
|
Tag.find_by_name(consequent_name)
|
||||||
|
end
|
||||||
|
|
||||||
def absence_of_transitive_relation
|
def absence_of_transitive_relation
|
||||||
# We don't want a -> b && b -> c chains
|
# We don't want a -> b && b -> c chains
|
||||||
if self.class.exists?(["antecedent_name = ?", consequent_name]) || self.class.exists?(["consequent_name = ?", antecedent_name])
|
if self.class.exists?(["antecedent_name = ?", consequent_name]) || self.class.exists?(["consequent_name = ?", antecedent_name])
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= link_to h(url.to_s), h(url.to_s) %>
|
<%= link_to h(url.to_s), h(url.to_s) %>
|
||||||
<% if CurrentUser.user.is_moderator? %>
|
<% if CurrentUser.user.is_moderator? %>
|
||||||
(<%= link_to("mass edit", mass_edit_admin_posts_path(:antecedent => "-#{@artist.name} source:#{ArtistUrl.normalize_for_search(url.to_s)}", :consequent => @artist.name)) %>)
|
(<%#= link_to("mass edit", mass_edit_admin_posts_path(:antecedent => "-#{@artist.name} source:#{ArtistUrl.normalize_for_search(url.to_s)}", :consequent => @artist.name)) %>)
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -35,8 +35,12 @@
|
|||||||
<%= nav_link_to("Notes", notes_path) %>
|
<%= nav_link_to("Notes", notes_path) %>
|
||||||
<%= nav_link_to("Artists", artists_path(:order => "date")) %>
|
<%= nav_link_to("Artists", artists_path(:order => "date")) %>
|
||||||
<%= nav_link_to("Tags", tags_path(:order => "date")) %>
|
<%= nav_link_to("Tags", tags_path(:order => "date")) %>
|
||||||
|
<% if CurrentUser.is_moderator? %>
|
||||||
|
<%= nav_link_to("Aliases", tag_aliases_path) %>
|
||||||
|
<%= nav_link_to("Implications", tag_implications_path) %>
|
||||||
|
<% end %>
|
||||||
<%= nav_link_to("Pools", pools_path) %>
|
<%= nav_link_to("Pools", pools_path) %>
|
||||||
<%= nav_link_to("Wiki", wiki_pages_path(:search => {:title_equals => "help:home"})) %>
|
<%= nav_link_to("Wiki", wiki_pages_path(:title => "help:home")) %>
|
||||||
<%= nav_link_to("Forum", forum_topics_path, :class => (CurrentUser.user.has_forum_been_updated? ? "forum-updated" : nil)) %>
|
<%= nav_link_to("Forum", forum_topics_path, :class => (CurrentUser.user.has_forum_been_updated? ? "forum-updated" : nil)) %>
|
||||||
<%= nav_link_to("»".html_safe, site_map_path) %>
|
<%= nav_link_to("»".html_safe, site_map_path) %>
|
||||||
</menu>
|
</menu>
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
Danbooru.Utility.j_error(<%= @exception.message.to_json.html_safe %>);
|
Danbooru.j_error(<%= @exception.message.to_json.html_safe %>);
|
||||||
$("img#approve-wait").hide();
|
$("img#approve-wait").hide();
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
Danbooru.Utility.j_error("You have already disapproved this post");
|
Danbooru.j_error("You have already disapproved this post");
|
||||||
$("img#disapprove-wait").hide();
|
$("img#disapprove-wait").hide();
|
||||||
|
|||||||
7
app/views/tag_aliases/_secondary_links.html.erb
Normal file
7
app/views/tag_aliases/_secondary_links.html.erb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<% content_for(:secondary_links) do %>
|
||||||
|
<menu>
|
||||||
|
<li><%= link_to "Listing", tag_aliases_path %></li>
|
||||||
|
<li><%= link_to "Add", new_tag_alias_path %></li>
|
||||||
|
<li><%= link_to "Help", wiki_pages_path(:title => "help:tag_aliases") %></li>
|
||||||
|
</menu>
|
||||||
|
<% end %>
|
||||||
@@ -1,92 +1,42 @@
|
|||||||
<div style="margin-bottom: 1em;">
|
<div id="c-tag-aliases">
|
||||||
<% form_tag(tag_aliases_path, :method => :get) do %>
|
<div id="a-index">
|
||||||
<%= text_field_tag "query", params[:query] %>
|
<div class="search">
|
||||||
<%= submit_tag "Search Aliases" %>
|
<% form_tag(tag_aliases_path, :method => :get) do %>
|
||||||
<%= submit_tag "Search Implications" %>
|
<%= text_field_tag "query", params[:query] %>
|
||||||
<% end %>
|
<%= submit_tag "Search Aliases" %>
|
||||||
</div>
|
<%= submit_tag "Search Implications" %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="aliases">
|
|
||||||
<% form_tag(:action => "update") do %>
|
|
||||||
<table width="100%" class="highlightable">
|
<table width="100%" class="highlightable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="1%"></th>
|
<th width="20%">From</th>
|
||||||
<th width="19%">From</th>
|
|
||||||
<th width="20%">To</th>
|
<th width="20%">To</th>
|
||||||
<th width="60%">Reason</th>
|
<th width="20%">Reference</th>
|
||||||
|
<th width="40%"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td colspan="4">
|
|
||||||
<% if @current_user.is_admin_or_higher? %>
|
|
||||||
<%= button_to_function "Select pending", "$$('.pending').each(function(x) {x.checked = true})" %>
|
|
||||||
<%= submit_tag "Approve" %>
|
|
||||||
<%= button_to_function "Delete", "$('reason-box').show(); $('reason').focus()" %>
|
|
||||||
<%= submit_tag "Fix" %>
|
|
||||||
<%= button_to_function "Add", "$('add-box').show().scrollTo(); $('tag_alias_name').focus()" %>
|
|
||||||
|
|
||||||
<div id="reason-box" style="display: none; margin-top: 1em;">
|
|
||||||
<strong>Reason:</strong>
|
|
||||||
<%= text_field_tag "reason", "", :size => 40 %>
|
|
||||||
<%= submit_tag "Delete" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @aliases.each do |a| %>
|
<% @tag_aliases.each do |tag_alias| %>
|
||||||
<tr class="<%= cycle 'even', 'odd' %> <%= a.is_pending? ? 'pending-tag' : nil %>">
|
<tr>
|
||||||
<td><input type="checkbox" name="aliases[<%= a.id %>]" value="1" <%= a.is_pending? ? 'class="pending"' : nil %>></td>
|
<td><%= link_to tag_alias.antecedent_name, posts_path(:tags => tag_alias.antecedent_name) %> (<%= tag_alias.antecedent_tag.post_count rescue 0 %>)</td>
|
||||||
<td><%= link_to h(a.name), :controller => "post", :action => "index", :tags => a.name %> (<%= Tag.find_by_name(a.name).post_count rescue 0 %>)</td>
|
<td><%= link_to tag_alias.consequent_name, posts_path(:tags => tag_alias.consequent_name) %> (<%= tag_alias.consequent_tag.post_count rescue 0 %>)</td>
|
||||||
<td><%= link_to h(a.alias_name), :controller => "post", :action => "index", :tags => a.alias_name %> (<%= Tag.find(a.alias_id).post_count rescue 0 %>)</td>
|
<td><%= link_to tag_alias.forum_topic_id, forum_topic_path(tag_alias.forum_topic_id) %></td>
|
||||||
<td><%= format_text(a.reason) %></td>
|
<td>
|
||||||
|
<% if CurrentUser.is_admin? %>
|
||||||
|
<%= link_to "Delete", :url => tag_alias_path(tag_alias), :remote => true, :method => :delete, :confirm => "Are you sure you want to delete this alias?" %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% if @current_user.is_admin_or_higher? %>
|
|
||||||
<div id="add-box" <% unless params[:to_name] %>style="display: none;"<% end %>>
|
|
||||||
<% form_tag(:action => "create") do %>
|
|
||||||
<h4>Add Alias</h4>
|
|
||||||
|
|
||||||
<% unless @current_user.is_anonymous? %>
|
|
||||||
<%= hidden_field_tag "tag_alias[creator_id]", @current_user.id %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th><label for="tag_alias_name">Name</label></th>
|
|
||||||
<td><%= text_field "tag_alias", "name", :size => 40, :value => params[:from_name] %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th><label for="tag_alias_alias">Alias to</label></th>
|
|
||||||
<td><%= text_field "tag_alias", "alias", :size => 40, :value => params[:to_name] %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th><label for="tag_alias_reason">Reason</label></th>
|
|
||||||
<td><%= text_area "tag_alias", "reason", :size => "40x2", :value => params[:reason] %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2"><%= submit_tag "Submit" %></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
</div>
|
||||||
|
|
||||||
<div id="paginator">
|
<div id="paginator">
|
||||||
<%= will_paginate(@aliases) %>
|
<%= will_paginate(@aliases) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% content_for("subnavbar") do %>
|
<%= render "secondary_links" %>
|
||||||
<li><%= link_to "List", :controller => "tag_alias", :action => "index" %></li>
|
|
||||||
<li><%= link_to "Add", :controller => "tag_alias", :action => "new" %></li>
|
|
||||||
<li><%= link_to "Help", :controller => "help", :action => "tag_aliases" %></li>
|
|
||||||
<% end %>
|
|
||||||
|
|||||||
@@ -1,20 +1,13 @@
|
|||||||
<% form_tag(:controller => "forum", :action => "create") do %>
|
<div id="c-tag-aliases">
|
||||||
<p>You can create a forum thread to suggest the creation of an alias.</p>
|
<div id="a-new">
|
||||||
<table>
|
<h1>New Tag Alias</h1>
|
||||||
<tr>
|
<%= simple_form_for(@tag_alias) do |f| %>
|
||||||
<th><label for="tag_alias_name">From</label></th>
|
<%= f.input :antecedent_name, :label => "From" %>
|
||||||
<td><%= text_field "tag_alias", "name", :size => 40 %></td>
|
<%= f.input :consequent_name, :label => "To" %>
|
||||||
</tr>
|
<%= f.input :forum_topic_id, :label => "Forum" %>
|
||||||
<tr>
|
<%= f.button :submit %>
|
||||||
<th><label for="tag_alias_alias">To</label></th>
|
<% end %>
|
||||||
<td><%= text_field "tag_alias", "alias", :size => 40 %></td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<th><label for="tag_alias_reason">Reason</label></th>
|
<%= render "secondary_links" %>
|
||||||
<td><%= text_area "tag_alias", "reason", :rows => 10, :cols => 60 %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2"><%= submit_tag "Submit" %></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<% end %>
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
var errors = <%= @unapproval.errors.full_messages.to_json.html_safe %>;
|
var errors = <%= @unapproval.errors.full_messages.to_json.html_safe %>;
|
||||||
if (errors.length > 0) {
|
if (errors.length > 0) {
|
||||||
Danbooru.Utility.j_error(errors.join("; "));
|
Danbooru.j_error(errors.join("; "));
|
||||||
} else {
|
} else {
|
||||||
Danbooru.Utility.j_alert("Unapproval", "Unapproval successful");
|
Danbooru.j_alert("Unapproval", "Unapproval successful");
|
||||||
$("a#approve").show();
|
$("a#approve").show();
|
||||||
$("a#disapprove").show();
|
$("a#disapprove").show();
|
||||||
$("a#unapprove").hide();
|
$("a#unapprove").hide();
|
||||||
|
|||||||
@@ -664,8 +664,47 @@ a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
Cookie = {
|
$(document).ready(function() {
|
||||||
put: function(name, value, days) {
|
// $("#hide-upgrade-account-link").click(function() {
|
||||||
|
// $("#upgrade-account").hide();
|
||||||
|
// Cookie.put('hide-upgrade-account', '1', 7);
|
||||||
|
// });
|
||||||
|
|
||||||
|
// Table striping
|
||||||
|
$("table.striped tbody tr:even").addClass("even");
|
||||||
|
$("table.striped tbody tr:odd").addClass("odd");
|
||||||
|
|
||||||
|
// Comment listing
|
||||||
|
$(".comment-section form").hide();
|
||||||
|
$(".comment-section input.expand-comment-response").click(function() {
|
||||||
|
var post_id = $(this).closest(".comment-section").data("post-id");
|
||||||
|
$(".comment-section[data-post-id=" + post_id + "] form").show();
|
||||||
|
$(this).hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Image resize sidebar
|
||||||
|
$("#resize-links").hide();
|
||||||
|
|
||||||
|
$("#resize-links a").click(function(e) {
|
||||||
|
var image = $("#image");
|
||||||
|
var target = $(e.target);
|
||||||
|
image.attr("src", target.data("src"));
|
||||||
|
image.attr("width", target.data("width"));
|
||||||
|
image.attr("height", target.data("height"));
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#resize-link a").click(function(e) {
|
||||||
|
$("#resize-links").toggle();
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var Danbooru = {};
|
||||||
|
(function() {
|
||||||
|
Danbooru.Cookie = {};
|
||||||
|
|
||||||
|
Danbooru.Cookie.put = function(name, value, days) {
|
||||||
if (days == null) {
|
if (days == null) {
|
||||||
days = 365;
|
days = 365;
|
||||||
}
|
}
|
||||||
@@ -674,9 +713,9 @@ Cookie = {
|
|||||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||||
var expires = "; expires=" + date.toGMTString();
|
var expires = "; expires=" + date.toGMTString();
|
||||||
document.cookie = name + "=" + encodeURIComponent(value) + expires + "; path=/";
|
document.cookie = name + "=" + encodeURIComponent(value) + expires + "; path=/";
|
||||||
},
|
}
|
||||||
|
|
||||||
raw_get: function(name) {
|
Danbooru.Cookie.raw_get = function(name) {
|
||||||
var nameEq = name + "=";
|
var nameEq = name + "=";
|
||||||
var ca = document.cookie.split(";");
|
var ca = document.cookie.split(";");
|
||||||
|
|
||||||
@@ -693,21 +732,21 @@ Cookie = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
},
|
}
|
||||||
|
|
||||||
get: function(name) {
|
Danbooru.Cookie.get = function(name) {
|
||||||
return this.unescape(this.raw_get(name));
|
return this.unescape(this.raw_get(name));
|
||||||
},
|
}
|
||||||
|
|
||||||
remove: function(name) {
|
Danbooru.Cookie.remove = function(name) {
|
||||||
Cookie.put(name, "", -1);
|
this.put(name, "", -1);
|
||||||
},
|
}
|
||||||
|
|
||||||
unescape: function(val) {
|
Danbooru.Cookie.unescape = function(val) {
|
||||||
return decodeURIComponent(val.replace(/\+/g, " "));
|
return decodeURIComponent(val.replace(/\+/g, " "));
|
||||||
},
|
}
|
||||||
|
|
||||||
setup: function() {
|
Danbooru.Cookie.initialize = function() {
|
||||||
if (location.href.match(/^\/(comment|pool|note|post)/) && this.get("tos") != "1") {
|
if (location.href.match(/^\/(comment|pool|note|post)/) && this.get("tos") != "1") {
|
||||||
// Setting location.pathname in Safari doesn't work, so manually extract the domain.
|
// Setting location.pathname in Safari doesn't work, so manually extract the domain.
|
||||||
var domain = location.href.match(/^(http:\/\/[^\/]+)/)[0];
|
var domain = location.href.match(/^(http:\/\/[^\/]+)/)[0];
|
||||||
@@ -721,59 +760,33 @@ Cookie = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})();
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
Cookie.setup();
|
Danbooru.Cookie.initialize();
|
||||||
|
|
||||||
// $("#hide-upgrade-account-link").click(function() {
|
|
||||||
// $("#upgrade-account").hide();
|
|
||||||
// Cookie.put('hide-upgrade-account', '1', 7);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// Table striping
|
|
||||||
$("table.striped tbody tr:even").addClass("even");
|
|
||||||
$("table.striped tbody tr:odd").addClass("odd");
|
|
||||||
|
|
||||||
// Comment listing
|
|
||||||
$(".comment-section form").hide();
|
|
||||||
$(".comment-section input.expand-comment-response").click(function() {
|
|
||||||
var post_id = $(this).closest(".comment-section").attr("data-post-id");
|
|
||||||
$(".comment-section[data-post-id=" + post_id + "] form").show();
|
|
||||||
$(this).hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Image resize sidebar
|
|
||||||
$("#resize-links").hide();
|
|
||||||
|
|
||||||
$("#resize-links a").click(function(e) {
|
|
||||||
var image = $("#image");
|
|
||||||
var target = $(e.target);
|
|
||||||
image.attr("src", target.attr("data-src"));
|
|
||||||
image.attr("width", target.attr("data-width"));
|
|
||||||
image.attr("height", target.attr("data-height"));
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#resize-link a").click(function(e) {
|
|
||||||
$("#resize-links").toggle();
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var Danbooru = {};
|
|
||||||
(function() {
|
(function() {
|
||||||
Danbooru.Utility = {};
|
Danbooru.meta = function(key) {
|
||||||
|
return $("meta[name=" + key + "]").attr("content");
|
||||||
|
}
|
||||||
|
|
||||||
Danbooru.Utility.j_alert = function(title, msg) {
|
Danbooru.j_alert = function(title, msg) {
|
||||||
$('<div title="' + title + '"></div>').html(msg).dialog();
|
$('<div title="' + title + '"></div>').html(msg).dialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Utility.j_error = function(msg) {
|
Danbooru.j_error = function(msg) {
|
||||||
this.j_alert("Error", msg);
|
this.j_alert("Error", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Danbooru.ajax_start = function(element) {
|
||||||
|
$(element).after(' <span class="wait">...</span>');
|
||||||
|
}
|
||||||
|
|
||||||
|
Danbooru.ajax_stop = function(element) {
|
||||||
|
$(element).next("span.wait").remove();
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// PostModeMenu = {
|
// PostModeMenu = {
|
||||||
// init: function() {
|
// init: function() {
|
||||||
// this.original_background_color = $(document.body).css("background-color")
|
// this.original_background_color = $(document.body).css("background-color")
|
||||||
@@ -949,12 +962,12 @@ var Danbooru = {};
|
|||||||
|
|
||||||
Danbooru.Post.initialize_tag_list = function() {
|
Danbooru.Post.initialize_tag_list = function() {
|
||||||
$("#tag-box a.search-inc-tag").click(function(e) {
|
$("#tag-box a.search-inc-tag").click(function(e) {
|
||||||
$("#tags").val($("#tags").val() + " " + $(e.target).parent("li").attr("data-tag-name"));
|
$("#tags").val($("#tags").val() + " " + $(e.target).parent("li").data("tag-name"));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#tag-box a.search-exl-tag").click(function(e) {
|
$("#tag-box a.search-exl-tag").click(function(e) {
|
||||||
$("#tags").val($("#tags").val() + " -" + $(e.target).parent("li").attr("data-tag-name"));
|
$("#tags").val($("#tags").val() + " -" + $(e.target).parent("li").data("tag-name"));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1009,10 +1022,9 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
Danbooru.Comment.initialize_response_link = function() {
|
Danbooru.Comment.initialize_response_link = function() {
|
||||||
$("a.expand-comment-response").click(function(e) {
|
$("a.expand-comment-response").click(function(e) {
|
||||||
e.stopPropagation();
|
e.preventDefault();
|
||||||
$(e.target).closest("div.new-comment").find("form").show();
|
$(e.target).closest("div.new-comment").find("form").show();
|
||||||
$(e.target).hide();
|
$(e.target).hide();
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("div.new-comment form").hide();
|
$("div.new-comment form").hide();
|
||||||
@@ -1020,19 +1032,16 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
Danbooru.Comment.initialize_preview_button = function() {
|
Danbooru.Comment.initialize_preview_button = function() {
|
||||||
$("div.new-comment input[type=submit][value=Preview]").click(function(e) {
|
$("div.new-comment input[type=submit][value=Preview]").click(function(e) {
|
||||||
e.stopPropagation();
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax("/dtext/preview", {
|
||||||
context: e.target,
|
type: "post",
|
||||||
url: "/dtext/preview",
|
|
||||||
data: {
|
data: {
|
||||||
body: $(e.target).closest("form").find("textarea").val()
|
body: $(e.target).closest("form").find("textarea").val()
|
||||||
},
|
},
|
||||||
success: function(data, text_status, xhr) {
|
success: function(data) {
|
||||||
$(this).closest("div.new-comment").find("div.comment-preview").show().html(data);
|
$(e.target).closest("div.new-comment").find("div.comment-preview").show().html(data);
|
||||||
},
|
}
|
||||||
type: "post"
|
|
||||||
});
|
});
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
@@ -1041,17 +1050,17 @@ $(document).ready(function() {
|
|||||||
Danbooru.Comment.initialize_all();
|
Danbooru.Comment.initialize_all();
|
||||||
});
|
});
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var img = $("#image-preview img");
|
var img = $("#image-preview img");
|
||||||
if (img) {
|
if (img) {
|
||||||
var height = img.attr("height");
|
var height = img.attr("height");
|
||||||
var width = img.attr("width");
|
var width = img.attr("width");
|
||||||
if (height > 400) {
|
if (height > 400) {
|
||||||
var ratio = 400.0 / height;
|
var ratio = 400.0 / height;
|
||||||
img.attr("height", height * ratio);
|
img.attr("height", height * ratio);
|
||||||
img.attr("width", width * ratio);
|
img.attr("width", width * ratio);
|
||||||
$("#scale").val("Scaled " + parseInt(100 * ratio) + "%");
|
$("#scale").val("Scaled " + parseInt(100 * ratio) + "%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("footer.nav-links a").click(function(event) {
|
$("footer.nav-links a").click(function(event) {
|
||||||
@@ -1059,7 +1068,7 @@ $(document).ready(function() {
|
|||||||
$(event.target.hash).show();
|
$(event.target.hash).show();
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($("meta[name=errors]").attr("content")) {
|
if (Danbooru.meta("errors")) {
|
||||||
$("#p1").hide();
|
$("#p1").hide();
|
||||||
$("#notice").hide();
|
$("#notice").hide();
|
||||||
} else {
|
} else {
|
||||||
@@ -1076,15 +1085,13 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Favorite.hide_or_show_add_to_favorites_link = function() {
|
Danbooru.Favorite.hide_or_show_add_to_favorites_link = function() {
|
||||||
var favorites = $("meta[name=favorites]").attr("content");
|
var favorites = Danbooru.meta("favorites");
|
||||||
var current_user_id = $("meta[name=current-user-id]").attr("content");
|
var current_user_id = Danbooru.meta("current-user-id");
|
||||||
|
|
||||||
if (current_user_id == "") {
|
if (current_user_id == "") {
|
||||||
$("a#add-to-favorites").hide();
|
$("a#add-to-favorites").hide();
|
||||||
$("a#remove-from-favorites").hide();
|
$("a#remove-from-favorites").hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var regexp = new RegExp("\\bfav:" + current_user_id + "\\b");
|
var regexp = new RegExp("\\bfav:" + current_user_id + "\\b");
|
||||||
if ((favorites != undefined) && (favorites.match(regexp))) {
|
if ((favorites != undefined) && (favorites.match(regexp))) {
|
||||||
$("a#add-to-favorites").hide();
|
$("a#add-to-favorites").hide();
|
||||||
@@ -1095,46 +1102,46 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
Danbooru.Favorite.initialize_add_to_favorites = function() {
|
Danbooru.Favorite.initialize_add_to_favorites = function() {
|
||||||
$("a#add-to-favorites").click(function(e) {
|
$("a#add-to-favorites").click(function(e) {
|
||||||
e.stopPropagation();
|
e.preventDefault();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
url: "/favorites",
|
url: "/favorites",
|
||||||
data: {
|
data: {
|
||||||
id: $("meta[name=post-id]").attr("content")
|
id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#add-to-favorites-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
},
|
},
|
||||||
success: function(data, text_status, xhr) {
|
success: function() {
|
||||||
$("a#add-to-favorites").hide();
|
$("a#add-to-favorites").hide();
|
||||||
$("a#remove-from-favorites").show();
|
$("a#remove-from-favorites").show();
|
||||||
$("img#add-to-favorites-wait").hide();
|
|
||||||
},
|
},
|
||||||
type: "post"
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Favorite.initialize_remove_from_favorites = function() {
|
Danbooru.Favorite.initialize_remove_from_favorites = function() {
|
||||||
$("a#remove-from-favorites").click(function(e) {
|
$("a#remove-from-favorites").click(function(e) {
|
||||||
e.stopPropagation();
|
e.preventDefault();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/favorites/" + $("meta[name=post-id]").attr("content"),
|
type: "delete",
|
||||||
|
url: "/favorites/" + Danbooru.meta("post-id"),
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#remove-from-favorites-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
},
|
},
|
||||||
success: function(data, text_status, xhr) {
|
success: function() {
|
||||||
$("a#add-to-favorites").show();
|
$("a#add-to-favorites").show();
|
||||||
$("a#remove-from-favorites").hide();
|
$("a#remove-from-favorites").hide();
|
||||||
$("img#remove-from-favorites-wait").hide();
|
|
||||||
},
|
},
|
||||||
type: "delete"
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
@@ -1151,7 +1158,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Unapproval.hide_or_show_unapprove_link = function() {
|
Danbooru.Unapproval.hide_or_show_unapprove_link = function() {
|
||||||
if ($("meta[name=post-is-unapprovable]").attr("content") != "true") {
|
if (Danbooru.meta("post-is-unapprovable") != "true") {
|
||||||
$("a#unapprove").hide();
|
$("a#unapprove").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1172,9 +1179,9 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("a#unapprove").click(function() {
|
$("a#unapprove").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$("#unapprove-dialog").dialog("open");
|
$("#unapprove-dialog").dialog("open");
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
@@ -1195,14 +1202,14 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.hide_or_show_approve_and_disapprove_links = function() {
|
Danbooru.PostModeration.hide_or_show_approve_and_disapprove_links = function() {
|
||||||
if ($("meta[name=post-is-approvable]").attr("content") != "true") {
|
if (Danbooru.meta("post-is-approvable") != "true") {
|
||||||
$("a#approve").hide();
|
$("a#approve").hide();
|
||||||
$("a#disapprove").hide();
|
$("a#disapprove").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.hide_or_show_delete_and_undelete_links = function() {
|
Danbooru.PostModeration.hide_or_show_delete_and_undelete_links = function() {
|
||||||
if ($("meta[name=post-is-deleted]").attr("content") == "true") {
|
if (Danbooru.meta("post-is-deleted") == "true") {
|
||||||
$("a#delete").hide();
|
$("a#delete").hide();
|
||||||
} else {
|
} else {
|
||||||
$("a#undelete").hide();
|
$("a#undelete").hide();
|
||||||
@@ -1210,60 +1217,76 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.initialize_delete_link = function() {
|
Danbooru.PostModeration.initialize_delete_link = function() {
|
||||||
$("a#delete").click(function() {
|
$("a#delete").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/post_moderation/delete.js",
|
|
||||||
type: "post",
|
type: "post",
|
||||||
|
url: "/post_moderation/delete.js",
|
||||||
data: {
|
data: {
|
||||||
post_id: $("meta[name=post-id]").attr("content")
|
post_id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#delete-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.initialize_undelete_link = function() {
|
Danbooru.PostModeration.initialize_undelete_link = function() {
|
||||||
$("a#undelete").click(function() {
|
$("a#undelete").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/post_moderation/undelete.js",
|
|
||||||
type: "post",
|
type: "post",
|
||||||
|
url: "/post_moderation/undelete.js",
|
||||||
data: {
|
data: {
|
||||||
post_id: $("meta[name=post-id]").attr("content")
|
post_id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#undelete-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.initialize_disapprove_link = function() {
|
Danbooru.PostModeration.initialize_disapprove_link = function() {
|
||||||
$("a#disapprove").click(function() {
|
$("a#disapprove").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/post_moderation/disapprove.js",
|
|
||||||
type: "put",
|
type: "put",
|
||||||
|
url: "/post_moderation/disapprove.js",
|
||||||
data: {
|
data: {
|
||||||
post_id: $("meta[name=post-id]").attr("content")
|
post_id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#disapprove-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.initialize_approve_link = function() {
|
Danbooru.PostModeration.initialize_approve_link = function() {
|
||||||
$("a#approve").click(function() {
|
$("a#approve").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/post_moderation/approve.js",
|
|
||||||
type: "put",
|
type: "put",
|
||||||
|
url: "/post_moderation/approve.js",
|
||||||
data: {
|
data: {
|
||||||
post_id: $("meta[name=post-id]").attr("content")
|
post_id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#approve-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -1296,12 +1319,13 @@ $(document).ready(function() {
|
|||||||
minLength: 4,
|
minLength: 4,
|
||||||
});
|
});
|
||||||
|
|
||||||
$("a#pool").click(function() {
|
$("a#pool").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$("#add-to-pool-dialog").dialog("open");
|
$("#add-to-pool-dialog").dialog("open");
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("ul#recent-pools li").click(function() {
|
$("ul#recent-pools li").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$("#pool_name").val($(this).html());
|
$("#pool_name").val($(this).html());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1317,8 +1341,8 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$("div.pools div.edit form#ordering-form").submit(function(e) {
|
$("div.pools div.edit form#ordering-form").submit(function(e) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: e.target.action,
|
|
||||||
type: "put",
|
type: "put",
|
||||||
|
url: e.target.action,
|
||||||
data: $("#sortable").sortable("serialize") + "&" + $(e.target).serialize()
|
data: $("#sortable").sortable("serialize") + "&" + $(e.target).serialize()
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
Cookie.setup();
|
|
||||||
|
|
||||||
// $("#hide-upgrade-account-link").click(function() {
|
// $("#hide-upgrade-account-link").click(function() {
|
||||||
// $("#upgrade-account").hide();
|
// $("#upgrade-account").hide();
|
||||||
// Cookie.put('hide-upgrade-account', '1', 7);
|
// Cookie.put('hide-upgrade-account', '1', 7);
|
||||||
@@ -13,7 +11,7 @@ $(document).ready(function() {
|
|||||||
// Comment listing
|
// Comment listing
|
||||||
$(".comment-section form").hide();
|
$(".comment-section form").hide();
|
||||||
$(".comment-section input.expand-comment-response").click(function() {
|
$(".comment-section input.expand-comment-response").click(function() {
|
||||||
var post_id = $(this).closest(".comment-section").attr("data-post-id");
|
var post_id = $(this).closest(".comment-section").data("post-id");
|
||||||
$(".comment-section[data-post-id=" + post_id + "] form").show();
|
$(".comment-section[data-post-id=" + post_id + "] form").show();
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
});
|
});
|
||||||
@@ -24,9 +22,9 @@ $(document).ready(function() {
|
|||||||
$("#resize-links a").click(function(e) {
|
$("#resize-links a").click(function(e) {
|
||||||
var image = $("#image");
|
var image = $("#image");
|
||||||
var target = $(e.target);
|
var target = $(e.target);
|
||||||
image.attr("src", target.attr("data-src"));
|
image.attr("src", target.data("src"));
|
||||||
image.attr("width", target.attr("data-width"));
|
image.attr("width", target.data("width"));
|
||||||
image.attr("height", target.attr("data-height"));
|
image.attr("height", target.data("height"));
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -36,5 +34,4 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var Danbooru = {};
|
var Danbooru = {};
|
||||||
|
|||||||
@@ -8,10 +8,9 @@
|
|||||||
|
|
||||||
Danbooru.Comment.initialize_response_link = function() {
|
Danbooru.Comment.initialize_response_link = function() {
|
||||||
$("a.expand-comment-response").click(function(e) {
|
$("a.expand-comment-response").click(function(e) {
|
||||||
e.stopPropagation();
|
e.preventDefault();
|
||||||
$(e.target).closest("div.new-comment").find("form").show();
|
$(e.target).closest("div.new-comment").find("form").show();
|
||||||
$(e.target).hide();
|
$(e.target).hide();
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("div.new-comment form").hide();
|
$("div.new-comment form").hide();
|
||||||
@@ -19,19 +18,16 @@
|
|||||||
|
|
||||||
Danbooru.Comment.initialize_preview_button = function() {
|
Danbooru.Comment.initialize_preview_button = function() {
|
||||||
$("div.new-comment input[type=submit][value=Preview]").click(function(e) {
|
$("div.new-comment input[type=submit][value=Preview]").click(function(e) {
|
||||||
e.stopPropagation();
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax("/dtext/preview", {
|
||||||
context: e.target,
|
type: "post",
|
||||||
url: "/dtext/preview",
|
|
||||||
data: {
|
data: {
|
||||||
body: $(e.target).closest("form").find("textarea").val()
|
body: $(e.target).closest("form").find("textarea").val()
|
||||||
},
|
},
|
||||||
success: function(data, text_status, xhr) {
|
success: function(data) {
|
||||||
$(this).closest("div.new-comment").find("div.comment-preview").show().html(data);
|
$(e.target).closest("div.new-comment").find("div.comment-preview").show().html(data);
|
||||||
},
|
}
|
||||||
type: "post"
|
|
||||||
});
|
});
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
Cookie = {
|
(function() {
|
||||||
put: function(name, value, days) {
|
Danbooru.Cookie = {};
|
||||||
|
|
||||||
|
Danbooru.Cookie.put = function(name, value, days) {
|
||||||
if (days == null) {
|
if (days == null) {
|
||||||
days = 365;
|
days = 365;
|
||||||
}
|
}
|
||||||
@@ -8,9 +10,9 @@ Cookie = {
|
|||||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||||
var expires = "; expires=" + date.toGMTString();
|
var expires = "; expires=" + date.toGMTString();
|
||||||
document.cookie = name + "=" + encodeURIComponent(value) + expires + "; path=/";
|
document.cookie = name + "=" + encodeURIComponent(value) + expires + "; path=/";
|
||||||
},
|
}
|
||||||
|
|
||||||
raw_get: function(name) {
|
Danbooru.Cookie.raw_get = function(name) {
|
||||||
var nameEq = name + "=";
|
var nameEq = name + "=";
|
||||||
var ca = document.cookie.split(";");
|
var ca = document.cookie.split(";");
|
||||||
|
|
||||||
@@ -27,21 +29,21 @@ Cookie = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
},
|
}
|
||||||
|
|
||||||
get: function(name) {
|
Danbooru.Cookie.get = function(name) {
|
||||||
return this.unescape(this.raw_get(name));
|
return this.unescape(this.raw_get(name));
|
||||||
},
|
}
|
||||||
|
|
||||||
remove: function(name) {
|
Danbooru.Cookie.remove = function(name) {
|
||||||
Cookie.put(name, "", -1);
|
this.put(name, "", -1);
|
||||||
},
|
}
|
||||||
|
|
||||||
unescape: function(val) {
|
Danbooru.Cookie.unescape = function(val) {
|
||||||
return decodeURIComponent(val.replace(/\+/g, " "));
|
return decodeURIComponent(val.replace(/\+/g, " "));
|
||||||
},
|
}
|
||||||
|
|
||||||
setup: function() {
|
Danbooru.Cookie.initialize = function() {
|
||||||
if (location.href.match(/^\/(comment|pool|note|post)/) && this.get("tos") != "1") {
|
if (location.href.match(/^\/(comment|pool|note|post)/) && this.get("tos") != "1") {
|
||||||
// Setting location.pathname in Safari doesn't work, so manually extract the domain.
|
// Setting location.pathname in Safari doesn't work, so manually extract the domain.
|
||||||
var domain = location.href.match(/^(http:\/\/[^\/]+)/)[0];
|
var domain = location.href.match(/^(http:\/\/[^\/]+)/)[0];
|
||||||
@@ -55,4 +57,9 @@ Cookie = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})();
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
Danbooru.Cookie.initialize();
|
||||||
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -8,15 +8,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Favorite.hide_or_show_add_to_favorites_link = function() {
|
Danbooru.Favorite.hide_or_show_add_to_favorites_link = function() {
|
||||||
var favorites = $("meta[name=favorites]").attr("content");
|
var favorites = Danbooru.meta("favorites");
|
||||||
var current_user_id = $("meta[name=current-user-id]").attr("content");
|
var current_user_id = Danbooru.meta("current-user-id");
|
||||||
|
|
||||||
if (current_user_id == "") {
|
if (current_user_id == "") {
|
||||||
$("a#add-to-favorites").hide();
|
$("a#add-to-favorites").hide();
|
||||||
$("a#remove-from-favorites").hide();
|
$("a#remove-from-favorites").hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var regexp = new RegExp("\\bfav:" + current_user_id + "\\b");
|
var regexp = new RegExp("\\bfav:" + current_user_id + "\\b");
|
||||||
if ((favorites != undefined) && (favorites.match(regexp))) {
|
if ((favorites != undefined) && (favorites.match(regexp))) {
|
||||||
$("a#add-to-favorites").hide();
|
$("a#add-to-favorites").hide();
|
||||||
@@ -27,46 +25,46 @@
|
|||||||
|
|
||||||
Danbooru.Favorite.initialize_add_to_favorites = function() {
|
Danbooru.Favorite.initialize_add_to_favorites = function() {
|
||||||
$("a#add-to-favorites").click(function(e) {
|
$("a#add-to-favorites").click(function(e) {
|
||||||
e.stopPropagation();
|
e.preventDefault();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
url: "/favorites",
|
url: "/favorites",
|
||||||
data: {
|
data: {
|
||||||
id: $("meta[name=post-id]").attr("content")
|
id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#add-to-favorites-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
},
|
},
|
||||||
success: function(data, text_status, xhr) {
|
success: function() {
|
||||||
$("a#add-to-favorites").hide();
|
$("a#add-to-favorites").hide();
|
||||||
$("a#remove-from-favorites").show();
|
$("a#remove-from-favorites").show();
|
||||||
$("img#add-to-favorites-wait").hide();
|
|
||||||
},
|
},
|
||||||
type: "post"
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Favorite.initialize_remove_from_favorites = function() {
|
Danbooru.Favorite.initialize_remove_from_favorites = function() {
|
||||||
$("a#remove-from-favorites").click(function(e) {
|
$("a#remove-from-favorites").click(function(e) {
|
||||||
e.stopPropagation();
|
e.preventDefault();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/favorites/" + $("meta[name=post-id]").attr("content"),
|
type: "delete",
|
||||||
|
url: "/favorites/" + Danbooru.meta("post-id"),
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#remove-from-favorites-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
},
|
},
|
||||||
success: function(data, text_status, xhr) {
|
success: function() {
|
||||||
$("a#add-to-favorites").show();
|
$("a#add-to-favorites").show();
|
||||||
$("a#remove-from-favorites").hide();
|
$("a#remove-from-favorites").hide();
|
||||||
$("img#remove-from-favorites-wait").hide();
|
|
||||||
},
|
},
|
||||||
type: "delete"
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -21,12 +21,13 @@
|
|||||||
minLength: 4,
|
minLength: 4,
|
||||||
});
|
});
|
||||||
|
|
||||||
$("a#pool").click(function() {
|
$("a#pool").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$("#add-to-pool-dialog").dialog("open");
|
$("#add-to-pool-dialog").dialog("open");
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("ul#recent-pools li").click(function() {
|
$("ul#recent-pools li").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$("#pool_name").val($(this).html());
|
$("#pool_name").val($(this).html());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -42,8 +43,8 @@
|
|||||||
|
|
||||||
$("div.pools div.edit form#ordering-form").submit(function(e) {
|
$("div.pools div.edit form#ordering-form").submit(function(e) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: e.target.action,
|
|
||||||
type: "put",
|
type: "put",
|
||||||
|
url: e.target.action,
|
||||||
data: $("#sortable").sortable("serialize") + "&" + $(e.target).serialize()
|
data: $("#sortable").sortable("serialize") + "&" + $(e.target).serialize()
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.hide_or_show_approve_and_disapprove_links = function() {
|
Danbooru.PostModeration.hide_or_show_approve_and_disapprove_links = function() {
|
||||||
if ($("meta[name=post-is-approvable]").attr("content") != "true") {
|
if (Danbooru.meta("post-is-approvable") != "true") {
|
||||||
$("a#approve").hide();
|
$("a#approve").hide();
|
||||||
$("a#disapprove").hide();
|
$("a#disapprove").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.hide_or_show_delete_and_undelete_links = function() {
|
Danbooru.PostModeration.hide_or_show_delete_and_undelete_links = function() {
|
||||||
if ($("meta[name=post-is-deleted]").attr("content") == "true") {
|
if (Danbooru.meta("post-is-deleted") == "true") {
|
||||||
$("a#delete").hide();
|
$("a#delete").hide();
|
||||||
} else {
|
} else {
|
||||||
$("a#undelete").hide();
|
$("a#undelete").hide();
|
||||||
@@ -26,60 +26,76 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.initialize_delete_link = function() {
|
Danbooru.PostModeration.initialize_delete_link = function() {
|
||||||
$("a#delete").click(function() {
|
$("a#delete").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/post_moderation/delete.js",
|
|
||||||
type: "post",
|
type: "post",
|
||||||
|
url: "/post_moderation/delete.js",
|
||||||
data: {
|
data: {
|
||||||
post_id: $("meta[name=post-id]").attr("content")
|
post_id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#delete-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.initialize_undelete_link = function() {
|
Danbooru.PostModeration.initialize_undelete_link = function() {
|
||||||
$("a#undelete").click(function() {
|
$("a#undelete").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/post_moderation/undelete.js",
|
|
||||||
type: "post",
|
type: "post",
|
||||||
|
url: "/post_moderation/undelete.js",
|
||||||
data: {
|
data: {
|
||||||
post_id: $("meta[name=post-id]").attr("content")
|
post_id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#undelete-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.initialize_disapprove_link = function() {
|
Danbooru.PostModeration.initialize_disapprove_link = function() {
|
||||||
$("a#disapprove").click(function() {
|
$("a#disapprove").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/post_moderation/disapprove.js",
|
|
||||||
type: "put",
|
type: "put",
|
||||||
|
url: "/post_moderation/disapprove.js",
|
||||||
data: {
|
data: {
|
||||||
post_id: $("meta[name=post-id]").attr("content")
|
post_id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#disapprove-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.PostModeration.initialize_approve_link = function() {
|
Danbooru.PostModeration.initialize_approve_link = function() {
|
||||||
$("a#approve").click(function() {
|
$("a#approve").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/post_moderation/approve.js",
|
|
||||||
type: "put",
|
type: "put",
|
||||||
|
url: "/post_moderation/approve.js",
|
||||||
data: {
|
data: {
|
||||||
post_id: $("meta[name=post-id]").attr("content")
|
post_id: Danbooru.meta("post-id")
|
||||||
},
|
},
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
$("img#approve-wait").show();
|
Danbooru.ajax_start(e.target);
|
||||||
|
},
|
||||||
|
complete: function() {
|
||||||
|
Danbooru.ajax_stop(e.target);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -173,12 +173,12 @@
|
|||||||
|
|
||||||
Danbooru.Post.initialize_tag_list = function() {
|
Danbooru.Post.initialize_tag_list = function() {
|
||||||
$("#tag-box a.search-inc-tag").click(function(e) {
|
$("#tag-box a.search-inc-tag").click(function(e) {
|
||||||
$("#tags").val($("#tags").val() + " " + $(e.target).parent("li").attr("data-tag-name"));
|
$("#tags").val($("#tags").val() + " " + $(e.target).parent("li").data("tag-name"));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#tag-box a.search-exl-tag").click(function(e) {
|
$("#tag-box a.search-exl-tag").click(function(e) {
|
||||||
$("#tags").val($("#tags").val() + " -" + $(e.target).parent("li").attr("data-tag-name"));
|
$("#tags").val($("#tags").val() + " -" + $(e.target).parent("li").data("tag-name"));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Unapproval.hide_or_show_unapprove_link = function() {
|
Danbooru.Unapproval.hide_or_show_unapprove_link = function() {
|
||||||
if ($("meta[name=post-is-unapprovable]").attr("content") != "true") {
|
if (Danbooru.meta("post-is-unapprovable") != "true") {
|
||||||
$("a#unapprove").hide();
|
$("a#unapprove").hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("a#unapprove").click(function() {
|
$("a#unapprove").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
$("#unapprove-dialog").dialog("open");
|
$("#unapprove-dialog").dialog("open");
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var img = $("#image-preview img");
|
var img = $("#image-preview img");
|
||||||
if (img) {
|
if (img) {
|
||||||
var height = img.attr("height");
|
var height = img.attr("height");
|
||||||
var width = img.attr("width");
|
var width = img.attr("width");
|
||||||
if (height > 400) {
|
if (height > 400) {
|
||||||
var ratio = 400.0 / height;
|
var ratio = 400.0 / height;
|
||||||
img.attr("height", height * ratio);
|
img.attr("height", height * ratio);
|
||||||
img.attr("width", width * ratio);
|
img.attr("width", width * ratio);
|
||||||
$("#scale").val("Scaled " + parseInt(100 * ratio) + "%");
|
$("#scale").val("Scaled " + parseInt(100 * ratio) + "%");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ $(document).ready(function() {
|
|||||||
$(event.target.hash).show();
|
$(event.target.hash).show();
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($("meta[name=errors]").attr("content")) {
|
if (Danbooru.meta("errors")) {
|
||||||
$("#p1").hide();
|
$("#p1").hide();
|
||||||
$("#notice").hide();
|
$("#notice").hide();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,12 +1,21 @@
|
|||||||
(function() {
|
(function() {
|
||||||
Danbooru.Utility = {};
|
Danbooru.meta = function(key) {
|
||||||
|
return $("meta[name=" + key + "]").attr("content");
|
||||||
|
}
|
||||||
|
|
||||||
Danbooru.Utility.j_alert = function(title, msg) {
|
Danbooru.j_alert = function(title, msg) {
|
||||||
$('<div title="' + title + '"></div>').html(msg).dialog();
|
$('<div title="' + title + '"></div>').html(msg).dialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Utility.j_error = function(msg) {
|
Danbooru.j_error = function(msg) {
|
||||||
this.j_alert("Error", msg);
|
this.j_alert("Error", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Danbooru.ajax_start = function(element) {
|
||||||
|
$(element).after(' <span class="wait">...</span>');
|
||||||
|
}
|
||||||
|
|
||||||
|
Danbooru.ajax_stop = function(element) {
|
||||||
|
$(element).next("span.wait").remove();
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|||||||
@@ -120,6 +120,9 @@ span.link {
|
|||||||
color: #006ffa;
|
color: #006ffa;
|
||||||
cursor: pointer; }
|
cursor: pointer; }
|
||||||
|
|
||||||
|
span.wait {
|
||||||
|
color: #CCC; }
|
||||||
|
|
||||||
table tfoot {
|
table tfoot {
|
||||||
margin-top: 2em; }
|
margin-top: 2em; }
|
||||||
|
|
||||||
@@ -198,7 +201,7 @@ form.simple_form div.input {
|
|||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
text-align: right; }
|
text-align: right; }
|
||||||
form.simple_form div.input span.hint {
|
form.simple_form div.input span.hint {
|
||||||
margin-left: 10em;
|
margin-left: 11em;
|
||||||
color: #666;
|
color: #666;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
|||||||
@@ -2,21 +2,21 @@ $link_color: #006FFA;
|
|||||||
$link_hover_color: #9093FF;
|
$link_hover_color: #9093FF;
|
||||||
|
|
||||||
.blacklisted {
|
.blacklisted {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body, div, h1, h2, h3, h4, h5, h6, p, ul, li, dd, dt {
|
body, div, h1, h2, h3, h4, h5, h6, p, ul, li, dd, dt {
|
||||||
font-family: Verdana, Geneva, sans-serif;
|
font-family: Verdana, Geneva, sans-serif;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h2, h3, h4 {
|
h1, h2, h3, h4 {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -94,9 +94,9 @@ h6 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
margin: 0 0 1em 0;
|
margin: 0 0 1em 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
@@ -106,19 +106,19 @@ img {
|
|||||||
|
|
||||||
input[type=text], input[type=password], input[type=url], textarea, button {
|
input[type=text], input[type=password], input[type=url], textarea, button {
|
||||||
/* border: 1px solid #AAA;*/
|
/* border: 1px solid #AAA;*/
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
/* -moz-border-radius: 4px;*/
|
/* -moz-border-radius: 4px;*/
|
||||||
/* -webkit-border-radius: 4px;*/
|
/* -webkit-border-radius: 4px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=submit] {
|
input[type=submit] {
|
||||||
padding: 1px 4px;
|
padding: 1px 4px;
|
||||||
/* border: 1px solid #AAA;*/
|
/* border: 1px solid #AAA;*/
|
||||||
/* background-color: #EEE;*/
|
/* background-color: #EEE;*/
|
||||||
/* -moz-border-radius: 4px;*/
|
/* -moz-border-radius: 4px;*/
|
||||||
/* -webkit-border-radius: 4px;*/
|
/* -webkit-border-radius: 4px;*/
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:focus, textarea:focus {
|
input:focus, textarea:focus {
|
||||||
@@ -130,24 +130,24 @@ input[type=submit]:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
menu {
|
menu {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin: 0 1em 0 0;
|
margin: 0 1em 0 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.link {
|
span.link {
|
||||||
@@ -155,6 +155,10 @@ span.link {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.wait {
|
||||||
|
color: #CCC;
|
||||||
|
}
|
||||||
|
|
||||||
table tfoot {
|
table tfoot {
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
}
|
}
|
||||||
@@ -180,18 +184,18 @@ div#notice {
|
|||||||
|
|
||||||
div#page {
|
div#page {
|
||||||
aside#sidebar {
|
aside#sidebar {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
aside#sidebar > section {
|
aside#sidebar > section {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
section#content {
|
section#content {
|
||||||
width: 75%;
|
width: 75%;
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,7 +281,7 @@ form.simple_form {
|
|||||||
}
|
}
|
||||||
|
|
||||||
span.hint {
|
span.hint {
|
||||||
margin-left: 10em;
|
margin-left: 11em;
|
||||||
color: #666;
|
color: #666;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ cat public/javascripts/src/lib/jquery-1.5.1.min.js > public/javascripts/compiled
|
|||||||
cat public/javascripts/src/lib/jquery-ui-1.8.9.custom.min.js >> public/javascripts/compiled/default.js
|
cat public/javascripts/src/lib/jquery-ui-1.8.9.custom.min.js >> public/javascripts/compiled/default.js
|
||||||
cat public/javascripts/src/lib/jrails.min.js >> public/javascripts/compiled/default.js
|
cat public/javascripts/src/lib/jrails.min.js >> public/javascripts/compiled/default.js
|
||||||
cat public/javascripts/src/lib/rails.js >> public/javascripts/compiled/default.js
|
cat public/javascripts/src/lib/rails.js >> public/javascripts/compiled/default.js
|
||||||
cat public/javascripts/src/app/cookie.js >> public/javascripts/compiled/default.js
|
|
||||||
cat public/javascripts/src/app/application.js >> public/javascripts/compiled/default.js
|
cat public/javascripts/src/app/application.js >> public/javascripts/compiled/default.js
|
||||||
|
cat public/javascripts/src/app/cookie.js >> public/javascripts/compiled/default.js
|
||||||
cat public/javascripts/src/app/utility.js >> public/javascripts/compiled/default.js
|
cat public/javascripts/src/app/utility.js >> public/javascripts/compiled/default.js
|
||||||
cat public/javascripts/src/app/posts.js >> public/javascripts/compiled/default.js
|
cat public/javascripts/src/app/posts.js >> public/javascripts/compiled/default.js
|
||||||
cat public/javascripts/src/app/comments.js >> public/javascripts/compiled/default.js
|
cat public/javascripts/src/app/comments.js >> public/javascripts/compiled/default.js
|
||||||
|
|||||||
Reference in New Issue
Block a user