X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/jsbuilder/src/Parser/Statement/Deprecated.js diff --git a/jsbuilder/src/Parser/Statement/Deprecated.js b/jsbuilder/src/Parser/Statement/Deprecated.js new file mode 100644 index 00000000..5fc94b47 --- /dev/null +++ b/jsbuilder/src/Parser/Statement/Deprecated.js @@ -0,0 +1,14 @@ +Loader.require('Parser.Statement.If'); + +Parser.Statement.Deprecated = Ext.extend(Parser.Statement.If, { + constructor: function() { + Parser.Statement.Deprecated.superclass.constructor.apply(this, arguments); + + if (this.getProperty('since') === null) { + throw new Error("[Parser.Statement.Deprecated] 'since' property is required for deprecated statement"); + } + + this.setProperty('minVersion', '<=' + this.getProperty('since')); + this.removeProperty('since'); + } +});