Parse.com发布了他们的"Cloud Code"JavaScript API,但没有关于Windows入门的说明.
你如何在Windows环境中启动和运行?
有没有办法用trigger.io以编程方式关闭Android屏幕键盘?
我有一个搜索字段,自动完成搜索.当用户停止输入时,我会显示搜索结果,但屏幕键盘保持可见 - 模糊了许多结果.
javascript android android-webview android-softkeyboard trigger.io
我在Backbone.js Marionette项目中使用Backbone.ModelBinder.我有一个场景,我无法弄清楚如何使用ModelBinder自动更新我的模型/ UI.
我的模型有一个'status'字符串属性,有多个状态.在这个例子中,我将展示两个代码:'很快','某天'
在我的UI中,我有一个列表,我使用click事件来设置模型状态,并更新类以突出显示UI中的相关链接.
<dd id="status-soon"><a>Soon</a></dd>
<dd id="status-someday" class="active"><a>Someday</a></dd>
events: {
'click #status-soon': 'setStatusSoon',
'click #status-someday': 'setStatusSomeday'
},
setStatusSoon: function () {
this.model.set('status', 'soon');
this.$el.find('.status dd').removeClass('active');
this.$el.find('#status-soon').addClass('active');
},
... etc
Run Code Online (Sandbox Code Playgroud)
感觉就像我这样做是一个冗长而笨重的方式!代码膨胀随着我需要支持的状态数量而增加.使用ModelBinder获得相同结果的最佳方法是什么?