我似乎无法找到为什么我的模态不显示的任何答案,所以我认为应该检查基本面.我已经实现了以下结构,但没有弹出模态.请帮忙
1)索引页面有一个调用控制器编辑动作的链接
<%= link_to 'Edit business', edit_user_business_path(@u, b), {:remote => true, 'data-controls-modal' => "modal-window", 'data-backdrop' => true, 'data-keyboard' => true, :class => "btn btn-primary ", :id => 'edit_biz'} %>
Run Code Online (Sandbox Code Playgroud)
2)控制器的编辑操作执行此操作(缩短):
respond_to do |format|
format.html {render :edit}
format.json { head :ok}
end
Run Code Online (Sandbox Code Playgroud)
3)Edit.html.erb看起来像这样:
<div class="modal hide fade" id="modal-window">
<div class="modal-header">
<a href="#" class="close">×</a>
<h6>Loading...</h6>
</div>
<div class="modal-body center">
<h2>Edit business </h2>
<%= render 'editbusiness' %>
</div>
<div class="modal-footer">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
4)_editbusiness.html.erb具有以下内容
<fieldset>
<br/>
<br/>
<%= form_for @businesses_to_edit, :url => { :action …Run Code Online (Sandbox Code Playgroud) 我最近将phonegap-facebook-plugin(https://github.com/phonegap/phonegap-facebook-plugin)集成到iOS和Android(同一应用程序)中.
我想做一些我认为很简单的事情:将调用转发到本地facebook进行登录/身份验证,并始终使用Web对话框.如何实现这一目标?
我的登录代码目前如下所示:
初始代码:
//facebook initialization
FB.init({
appId: 'xxxxxxxxxxxx', //'<%#= FB_APP_ID %>',//'',
nativeInterface: CDV.FB,
useCachedDialogs: false
});
Run Code Online (Sandbox Code Playgroud)
登录电话是:
FB.login(function(response) {
if (response.authResponse) {
// connected
me.signInFacebook({
token: response.authResponse.accessToken,
email: response.authResponse.email,
success: function (data) {
// hide login view and show tabview
form.destroy();
// continue whatever action was previously happening
me.continueAction(tabIndexBack, callback);
},
failure: function (response) {
// show errors Ext.Viewport.down('tabscontainerview').setActiveItem(3);
}
});
} else {
//go back
Ext.Viewport.down('tabscontainerview').setActiveItem(3);
alert('fb login error');
}
},{ scope: "email" }); …Run Code Online (Sandbox Code Playgroud)