control.js.svn-base

来自「嵌入式无线路由系统openwrt的web配置工具」· SVN-BASE 代码 · 共 63 行

SVN-BASE
63
字号
/*Class: FlashSYS.Control  Various control element wrappersCopyright:  Copyright (C) 2008 OpenRB.com*/FlashSYS.Control = {  /*  Function: addButton    Add buttons to given container, sets click options  Arguments:    container - (element) button is injected into this container    options - (object) button specific options  */  addButton: function(container, options) {    options = $merge({      'click': $load,      'params': {},      'cls': '',      'prefix': 'actions',      'skipPrefix': false    }, options);    if (!options.skipPrefix && !container.retrieve('hasControl', false)) {      var prefixElem = new Element('div', {        'class': 'FSControlPrefix',        'text': $TR(options.prefix)      }).inject(container);    }    var controlElem = new Element('div', {      'class': 'FSButton ' + options.cls,      'events': {        'click': this.buttonClick.bind(this, options)      }    }).inject(container);    container.store('hasControl', true);    if (options.title) {      controlElem.set('title', options.title);    }  },  /*  Function: buttonClick    Fires button click event  Arguments:    options - (object) button specific options  */  buttonClick: function(options) {    options.click(options.params);  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?