Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #193

Merged
merged 2 commits into from
Mar 5, 2014
Merged

Dev #193

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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