Dojo 1.2 Candidate 发布

Dojo 1.2 Candidate版本发布,保持大部分向后兼容性。改进包括核心库的键盘事件处理、浏览器判断、dojo.cldr更新等。Dijit组件有重大提升,如Widget.attributeMap支持innerHTML和class,新增placeAt()功能。DojoX引入新图表、动画、事件支持和多个新项目,如dojox.image.Badge和dojox.grid.DataGrid。此外,修复了多项Bug并提供升级指南。
摘要由CSDN通过智能技术生成

在推迟了一个月之后,dojo 1.2的Candidate版本终于发布了,

 

http://www.dojotoolkit.org/2008/09/19/dojo-1-2-proper-candidate

 

http://download.dojotoolkit.org/release-1.2.0rc1/

 

Dojo  1.2 的变化

向后兼容

Dojo V1.2添加了很多的新特性,并且做出了一些改动/删除.但最重要的是,Dojo V1.2的大部分都是和Dojo V1.0、 DojoV1.1版本相兼容的.至于不同的部分可以可以参考 “迁移部分”。

Dojo核心和相关的库文件

Keyboard 事件:

  • 增加 charOrCode属性,删除keyChar属性, 这样,可输出的和不可输出的都度可以在同一个switch中处理.
  • See [#13544] and [#13547] for details.

浏览器判断

  • 改变了dojo.isIE, dojo.isFF, dojo.isSafari的返回值.
  • 如果不是指定的浏览器,现在的返回值是 undefined (替代了之前的 0),如果是指定的浏览器,则返回版本号. 如果你不是直接用这些直接和0进行比较的话,并没有什么影响.所以,比较判断浏览器的方式建议是 if(!dojo.isIE){...}

dojo.cldr

  • dojo.cldr 从 CLDR 版本 1.5.1 更新到 1.6.
  • 更新了区域化表格。因此,dojo.date.locale, dojo.number、 dojo.currency 生成、格式化的字符串可能会与以前的版本有点不同.

djConfig.addOnLoad

  • Adds a new callback via dojo.addOnLoad.
  • Useful when Dojo is added after the page loads and djConfig.afterOnLoad is true.
  • Supports the same arguments as dojo.addOnLoad.
  • When using a function reference, use djConfig.addOnLoad = function(){};.
  • For object with function name use djConfig.addOnLoad = [myObject, "functionName"];.
  • For object with function reference use djConfig.addOnLoad = [myObject, function(){}];

try/catch behavior changed with djConfig.isDebug = true

  • Some modules in Dojo Core (XHR, Deferred, dojo.addOnLoad callback code) would catch errors and either just report them in the console or did another throw which made it hard to track the origin of the error. This was done to keep the code robust and running in the page. However, for development scenarios it made it hard to track down the origin of the error.
  • Now, those modules let the original exception bubble up, stopping JavaScript execution if djConfig.isDebug is set to true.
  • If djConfig.isDebug is set to false (or undefined) then a try/catch is used and the error is logged to the console.

dojo.fx.easing

  • The former known dojox.fx.easing has been promoted to Dojo Core, and is available by dojo.require("dojo.fx.easing").
  • An API shim is in place for users of dojox.fx.easing, and deprecation warnings are being thrown.

dojo.html.set()

  • feature added to use ContentPane like functionality outside of ContentPane.

Dijit 的改进

可用性/外观的改进

  • With V1.2 there comes major improvements to the visual polish and the usability of the Dijit component set.

_Widget.attributeMap

  • attributeMap can now handle innerHTML and class names too.
  • You should think of attributeMap as a binding from widget attribute to DOM nodes.
  • See the blog post for details.

_Widget.placeAt

  • placeAt() is a new domNode manipulation function, which allows you to chain and place the widget's domNode (or addChild() it to another widget) easily.
  • See: [#14602] for details.

动画:

  • The default animation time for widgets was sped up.
  • Animations are now controllable through dojo.config.defaultDuration.

BorderContainer:

  • Fixed layout issues with panes resulting in missing borders or double borders.

按钮Button:

  • 修正了垂直对齐和各种显示的问题.

复选框CheckBox:

  • Fixed rollover effect of focused checkboxes.
  • Indicate focus on FF/Safari the same as IE (via a hatched box around the label).

ComboBox:

  • Highlighting of search results.
  • See also [#6461] for details.

FilteringSelect

  • No longer need to put blank value in drop down list in order for user to be able to clear the value; they can clear it w/backspace or delete key now.
    See also [#5974] for details.
  • Highlighting of search results.
    See: [#6461] for details.

表单验证Form validation:

  • Form widgets have been enhanced so that they won't turn yellow while the user is typing because the value they have
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值