Skip to content

Commit

Permalink
Merge pull request fex-team#193 from 2betop/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
2betop committed Mar 5, 2014
2 parents a42eb10 + 577476d commit 16333aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/widget/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
/input|textarea|select/i.test(document.activeElement.tagName)){

document.body.scrollLeft = 0;
$.later(action, 200);//do it later in 200ms.
setTimeout(action, 200);//do it later in 200ms.

} else {
action();//do it now
Expand Down Expand Up @@ -353,7 +353,7 @@
* @param {Event} e gmu.Event对象
* @description 在弹出框关闭之后触发
*/

/**
* @event destroy
* @param {Event} e gmu.Event对象
Expand Down
24 changes: 13 additions & 11 deletions tasks/concat.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = function( grunt ) {
var path = require( 'path' ),
file = grunt.file;

function concatComponents( opts, f, theme, models ) {

if (typeof theme !== 'string') {
Expand Down Expand Up @@ -74,7 +74,7 @@ module.exports = function( grunt ) {
obj.structor && arr.push(readText(cssPrefix + obj.structor)) &&
cssFiles.push(obj.structor);

theme && obj[theme] &&
theme && obj[theme] &&
arr.push(readText(cssPrefix + obj[theme])) &&
cssFiles.push(obj[theme]);

Expand All @@ -89,8 +89,8 @@ module.exports = function( grunt ) {
url = matches[i].match(
/url\(((['"]?)(?!data)([^'"\n\r]+?)\2)\)/i)[3];

images[url] = path.resolve(cssPrefix +
path.dirname(obj.structor || obj[theme]) +
images[url] = path.resolve(cssPrefix +
path.dirname(obj.structor || obj[theme]) +
path.sep + url);
}
}
Expand Down Expand Up @@ -141,7 +141,7 @@ module.exports = function( grunt ) {
banner = opts.banner;
dest = f.dest;

file.write(dest,
file.write(dest,
banner.replace(/@files/ig, jsFiles.join(', ')) + '\n' + js.join(opts.separator));

grunt.log.writeln('✓ 生成 %s - %s ', dest, String(caculateSize(dest)).green );
Expand All @@ -156,7 +156,7 @@ module.exports = function( grunt ) {

renderedImages = {};
for (image in images) {

if( images.hasOwnProperty( image ) ) {
newName = path.basename(image);

Expand All @@ -171,17 +171,19 @@ module.exports = function( grunt ) {
}

renderedImages[newName] = images[image];
file.write(destDir + 'images/' + newName,
file.read(images[image]));
file.write(destDir + 'images/' + newName,
file.read(images[image], {
encoding: null
}));

css = strReplace('\\((\'|")?' +
image.replace(/\./g, '\\.') + '\\1\\)',
css = strReplace('\\((\'|")?' +
image.replace(/\./g, '\\.') + '\\1\\)',
'(./images/' + newName + ')', css);
}
}

dest = dest.replace(/\.js$/, '.css');
file.write(dest,
file.write(dest,
banner.replace(/@files/g, cssFiles.join(', ')) + '\n' + css );
grunt.log.writeln('✓ 生成 %s - %s ', dest, String(caculateSize(dest)).green);
}
Expand Down

0 comments on commit 16333aa

Please sign in to comment.