drag_demo_effect.rhtml
来自「ruby on rails web敏捷开发之路第二版 源代码」· RHTML 代码 · 共 51 行
RHTML
51 行
<!-- ! Excerpted from "Agile Web Development with Rails, 2nd Ed." ! We make no guarantees that this code is fit for any purpose. ! Visit http://www.pragmaticprogrammer.com/titles/rails2 for more book information.--><style>.hover { background-color: #888888;}#pending_todos ul li, #completed_todos ul li { list-style: none; cursor: -moz-grab;}#pending_todos, #completed_todos { border: 1px solid gray;}<%# codecite style %></style><h1>Todo list for <%= @user.username %></h1><h2>Pending</h2><div id="pending_todos"> <%= render :partial=>"pending_todos" %></div><h2>Completed</h2><div id="completed_todos"> <%= render :partial=>"completed_todos" %></div><%= drop_receiving_element('pending_todos', :accept=>'completed_todo', :complete=>"$('spinner').hide();" + visual_effect(:highlight, 'pending_todos'), :before=>"$('spinner').show();", :hoverclass=>'hover', :with=>"'todo=' + encodeURIComponent(element.id.split('_').last())", :url=>{:action=>:todo_pending, :id=>@user})%><%= drop_receiving_element('completed_todos', :accept=>'pending_todo', :complete=>"$('spinner').hide();", :before=>"$('spinner').show();", :hoverclass=>'hover', :with=>"'todo=' + encodeURIComponent(element.id.split('_').last())", :url=>{:action=>:todo_completed, :id=>@user})%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?