PageRenderTime 38ms CodeModel.GetById 34ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/javascript-mode/extjs_vbuilder

http://github.com/ridgetang/snippets
#! | 29 lines | 26 code | 3 blank | 0 comment | 0 complexity | 3f9192bea99cba796175f61f4754db3a MD5 | raw file
 1# name : vbuilder
 2# key : vbuilder
 3# group : extjs
 4# contributor : crazycode@gmail.com
 5# This was cloned from a TextMate bundle for yasnippet.
 6# --
 7/**
 8 * @class Ext.ux.MVC.plugin.${1:${TM_FILENAME/(.+)\.js$/$1/}}
 9 * @extends Ext.ux.MVC.ViewportBuilder
10 * ${2:Describe what this viewport builder does}
11 */
12Ext.ux.MVC.plugin.${1:${TM_FILENAME/(.+)\.js$/$1/}} = Ext.extend(Ext.ux.MVC.ViewportBuilder, {
13  /**
14   * Creates the viewport elements, taking config options from OS.viewportBuilderConfig
15   * @param {Ext.ux.MVC.OS} os The OS instance to link built viewport components to
16   * Assigns this.topBar, this.sideMenu, this.mainPanel, this.contentPanel and this.viewport
17   * to the passed os when calling build(os)
18   * @return {Ext.ux.MVC.OS} The same OS instance, now decorated with viewport components
19   */
20  build: function(os) {
21    var config = os.getViewportBuilderConfig() || {};
22    
23    $0
24    
25    return os;
26  }
27});
28
29Ext.ux.MVC.ViewportBuilderManager.register('${3:viewportType}', Ext.ux.MVC.plugin.${1:${TM_FILENAME/(.+)\.js$/$1/}});