Skip to content

Commit

Permalink
Merge 2a52d63 into d9a3d0f
Browse files Browse the repository at this point in the history
  • Loading branch information
weekeight committed Sep 12, 2014
2 parents d9a3d0f + 2a52d63 commit 14e006c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/component/control/src/control.js
Expand Up @@ -583,7 +583,9 @@ var Control = module.exports = Base.extend({
$: function (selector) {
return this.$el.all(selector);
},

$one: function (selector) {
return this.$el.one(selector);
},
fillChildrenElsBySelectors: function (childrenElSelectors) {
var self = this,
el = self.$el,
Expand All @@ -595,7 +597,7 @@ var Control = module.exports = Base.extend({
selector = childrenElSelectors[childName];
var node = selector.call(self, el);
if (typeof node === 'string') {
node = self.$(node);
node = self.$one(node);
}
self.setInternal(childName, node);
}
Expand Down
2 changes: 1 addition & 1 deletion src/component/extension/content-box/src/content-box.js
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
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 14e006c

Please sign in to comment.