Skip to content

Commit

Permalink
add reset method to util template
Browse files Browse the repository at this point in the history
  • Loading branch information
mmplayer committed Mar 17, 2012
1 parent 93ab3f0 commit ba8b6bd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/log.js
Expand Up @@ -12,6 +12,8 @@
* @package core
* @module log
* @requires base
* @includes util.bigtable
* util.time
*/

QQWB.extend("log", {
Expand Down
24 changes: 24 additions & 0 deletions src/util/template.js
Expand Up @@ -40,6 +40,30 @@
return this;
},

/**
* Reset template
*
*/
reset: function (resetTpl, resetData) {

if (!resetTpl && !resetData) {

this.tmpl = [];

this.datas = {};

} else {

resetTpl && (this.tmpl = []);

resetData && (this.datas = {});

}

return this;

},

/**
* Add template data
*
Expand Down

0 comments on commit ba8b6bd

Please sign in to comment.