PageRenderTime 139ms CodeModel.GetById 45ms app.highlight 1ms RepoModel.GetById 34ms app.codeStats 0ms

/javascript-mode/extjs_extend

http://github.com/ridgetang/snippets
#! | 23 lines | 20 code | 3 blank | 0 comment | 0 complexity | ed2730b14243c83a78ae5c889851d2a2 MD5 | raw file
 1# name : extend
 2# key : extend
 3# group : extjs
 4# contributor : crazycode@gmail.com
 5# This was cloned from a TextMate bundle for yasnippet.
 6# --
 7/**
 8 * @class ${1:MyNamespace.}${2:${TM_FILENAME/(.+)\.js$/$1/}}
 9 * @extends ${3:extendsClass}
10 * ${6:Description}
11 */
12${1:MyNamespace.}${2:ClassName} = Ext.extend(${3:extendsClass}, {
13
14  initComponent: function() {
15    Ext.applyIf(this, {
16      $0
17    });
18    
19    ${1:MyNamespace.}${2:ClassName}.superclass.initComponent.apply(this, arguments);
20  }
21});${4:
22
23Ext.reg('${5:xtype}', ${1:MyNamespace.}${2:ClassName});}