Skip to content

Commit

Permalink
修复tree组件从已有html生成时点击展开/收起按钮不生效的bug(测试通过)。 fixes #687
Browse files Browse the repository at this point in the history
  • Loading branch information
weekeight committed Sep 12, 2014
1 parent 2c3edfc commit 2a52d63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/component/extension/content-box/src/content-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
function shortcut(self) {
var contentEl = self.get('contentEl');
self.$contentEl = self.$contentEl = contentEl;
self.contentEl = self.contentEl = contentEl[0];
self.contentEl = self.contentEl = contentEl;
}

var contentTpl = require('./content-box/content-xtpl');
Expand Down
12 changes: 6 additions & 6 deletions src/swf/tests/specs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if (UA.mobile || UA.phantomjs || location.protocol === 'file:') {
it('can create into body', function () {

var swf1 = new SWF({
src: '../assets/test.swf',
src: '../t-assets/test.swf',
attrs: {
id: 'test',
width: 300,
Expand Down Expand Up @@ -85,7 +85,7 @@ if (UA.mobile || UA.phantomjs || location.protocol === 'file:') {
var render = Dom.create('<div class="test"></div>');
Dom.prepend(render, document.body);
var swf1 = new SWF({
src: '../assets/test.swf',
src: '../t-assets/test.swf',
render: render,
attrs: {
width: 300,
Expand All @@ -104,8 +104,8 @@ if (UA.mobile || UA.phantomjs || location.protocol === 'file:') {
expect(render.innerHTML.toLowerCase().indexOf('object')).toBeGreaterThan(0);

// has id
expect(swf1.get('html').replace('classid', '').indexOf('id=')).toBe(-1);
expect(Dom.hasAttr(swf1.get('el'), 'id')).toBeFalsy();
expect(swf1.get('html').replace('classid', '').indexOf('id=')).toBeGreaterThan(-1);
expect(Dom.hasAttr(swf1.get('el'), 'id')).toBe(true);

swf1.destroy();
waits(300);
Expand All @@ -116,7 +116,7 @@ if (UA.mobile || UA.phantomjs || location.protocol === 'file:') {

it('ok with flashvars', function () {
var config = util.merge(util.clone(defaultConfig), {
src: '../assets/flashvars.swf',
src: '../t-assets/flashvars.swf',
params: {
bgcolor: '#038C3C',
flashvars: {
Expand Down Expand Up @@ -154,7 +154,7 @@ if (UA.mobile || UA.phantomjs || location.protocol === 'file:') {

it('will handle low version', function () {
var swf1 = new SWF({
src: '../assets/test.swf',
src: '../t-assets/test.swf',
attrs: {
width: 300,
height: 300
Expand Down

0 comments on commit 2a52d63

Please sign in to comment.