Skip to content

Commit

Permalink
helped turbolinks to redo JS
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Louie committed Nov 15, 2013
1 parent ccf204a commit 9db6f6a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
7 changes: 5 additions & 2 deletions app/assets/javascripts/daily_news.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

$ ->
ready = ->
$(".has-translation").mouseover ->
$(".translation-bubble", this).show()
$(this).css("z-index", 100)

$(".has-translation").mouseout ->
$(".translation-bubble", this).hide()
$(this).css("z-index", 0)
$(this).css("z-index", 0)

$(document).ready(ready)
$(document).on('page:load', ready)
6 changes: 6 additions & 0 deletions db/migrate/20131115030223_add_index_to_words.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class AddIndexToWords < ActiveRecord::Migration
def change
add_index :words, :chars_trad
add_index :words, :chars_simp
end
end
5 changes: 4 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20131106061700) do
ActiveRecord::Schema.define(version: 20131115030223) do

create_table "compound_word_links", force: true do |t|
t.integer "compound_id"
Expand Down Expand Up @@ -93,4 +93,7 @@
t.datetime "stroke_image_updated_at"
end

add_index "words", ["chars_simp"], name: "index_words_on_chars_simp", using: :btree
add_index "words", ["chars_trad"], name: "index_words_on_chars_trad", using: :btree

end

0 comments on commit 9db6f6a

Please sign in to comment.