我正在使用$.special.event.drag和$.special.event.dropjQuery 逆向工程facebook的uiTokenizer ,因为jQuery UI的可排序/可拖动很重且很慢.
我认为我的问题与决定何时注入占位符元素的容差数学有关.
自从我第一次编写代码以来,我已经清理了很多代码,但前提仍然存在并应该适用于这个问题.
这是代码和逻辑:http: //jsfiddle.net/JoshuaIRL/kf9Qt/进行测试.
我需要有人看的区域是$ .drop函数的"容差"区域,如果你找到它的话.
$.drop({
mode:'intersect',
tolerance: function( event, proxy, target ){
var testV = event.pageY > ( target.top + target.height / 2 );
$.data(target.elem, "drop+reorder", testV ? "insertAfter" : "insertBefore" );
return this.contains( target, [ event.pageX, event.pageY ] );
}
});
Run Code Online (Sandbox Code Playgroud)
当你的实际光标碰到另一个元素时,Facebook似乎会做一个"insertAfter".
我在想这也可能是它的核心:
if ( drop && $(drop).is('.uiToken') && ( drop != dd.current || method != dd.method ) ){
$( this )[ method ]( drop ); …Run Code Online (Sandbox Code Playgroud) 我的问题
我可以采取哪些可靠的步骤来100%使这个工作?我需要真正的指示,而不是一个班轮答案或过程的模糊概念描述.
让我们来看看它的底部.似乎某些地方存在冲突,而且我在GitHub上的宝石开发者得到了与我在Ruby/Rails/Bundler/Homebrew上的经验相关的低级辅助,所以这不完全是他们的错:P但是我需要弄清楚如何尽快得到这个工作,所以这里是我目前的这个问题的状态.
更新:2/25/2013
更新了GCC/XCODE版本4.6(4H127)并下载了最新版本的XCODE COMMAND-LINE TOOLS,现在iconv_open()显示在extconf检查器中.现在我收到这些错误:
我相信它们现在是tiny_tds的问题,并且与最新的xcode路径兼容.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for iconv_open() in iconv.h... yes
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... yes
checking for ct_bind() in -lct... yes
creating Makefile
make
xcrun cc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -DHAVE_ICONV_OPEN -DHAVE_SYBFRONT_H -DHAVE_SYBDB_H -I-I/usr/local/php5/include -I-I/usr/include -I-I/usr/local/include -I-I/opt/local/include -I-I/usr/local/MacGPG2/include -I-I/opt/sm/pkg/active/include -I/usr/local/php5/include -I/usr/include -I/usr/local/include -I/opt/local/include -I/usr/local/MacGPG2/include -I/opt/sm/pkg/active/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c …Run Code Online (Sandbox Code Playgroud) 我正在使用Java 1.7在Mac OS X 10.8上使用Jetty 8在Railo 4.0.2.002 Express中运行传统CF Fusebox 5.5应用程序.我也在使用jetty urlrewrite http://tuckey.org/urlrewrite/(如果那是相关的)
为什么FORM在提交表单时范围始终为空?但是,如果我使用URL范围,它工作正常.
该应用程序在所有其他版本的CF中运行良好,也应该在这里工作正常.
更新1:
此外,当我在onRequestStart内部Application.cfc并且我转储FORM范围时它也是空的.
有人有这个问题吗?我不认为它必然是"fusebox"所以我想知道它是否是一个Railo 4兼容性问题?
更新2:
当表单发布到/admin/index.cfm?event=Main.Login时
,表单范围工作正常.但是当它发布到/admin/event/Main.Login时,表单范围就消失了.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite
PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN"
"http://tuckey.org/res/dtds/urlrewrite3.0.dtd">
<urlrewrite>
<rule>
<from>^/admin/event/(.*)</from>
<to last="false">/admin/index.cfm?event=$1</to>
</rule>
<rule>
<from>^/lms/event/(.*)</from>
<to last="false">/lms/index.cfm?event=$1</to>
</rule>
</urlrewrite>
Run Code Online (Sandbox Code Playgroud)
更新3:
还应该注意到Charles(代理)正确检测到'POST'请求包含电子邮件/密码和其他正确发送到服务器的表单元素.
Jetty服务器根本没有看到它们或没有正确地将它们转发到Railo引擎或其他东西?
更新4:
这是他们告诉你放入你的tuckey配置web.xml.其实我放在这个在webdefault.xml中etc/Railo快速的目录,我想可能只是码头的文件.
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
Run Code Online (Sandbox Code Playgroud) 我是一名网络开发人员,我正在一个新应用程序中使用 webrtc。OS X 没有简单的方法来禁用我的网络摄像头和麦克风,我想根据缺少网络摄像头/缺少麦克风来测试/设计 UI 组件。
有没有办法禁用或模拟我没有这些功能,以便浏览器不会接管并要求我允许访问相机?等等?
可能重复:
map(&:name)在Ruby中意味着什么?
什么是&:valid?在发现each意味着什么?我见过.each do |r|或者其他什么,但不确定这个是如何工作的?
我有点引起了一个奇怪的问题。我将客户端移至另一台服务器。升级了wordpress+数据库。我几乎不知道,由于配置具有硬编码的 mysql IP 地址,我实际上是在更新以前服务器上的数据库。
所以我在配置中解决了这个问题,然后它要求更新数据库。
现在它不会在管理中显示帖子/页面,但计数仍然显示在“所有”“已发布”链接中。
数据库更新中是否有未设置的位或“状态”?阻止这些内容在管理员中显示的东西。
它们在首页上显示得很好。
任何帮助,将不胜感激!
更新:升级后创建了一个新帖子,计数增加到 13,但仍然显示“无帖子”。:-\
更新:链接和评论都显示一个巨大的列表。帖子、页面和媒体不显示。
也许这与 WordPress 添加的 post_author 索引有关?我已验证该用户是否存在并具有匹配的 ID。:-\
