デフォルトのアクションイベントです。
193294
public function defaultActionEvent () {
		$this->allowedRequestParameter();
		$this->setErrorList($this->validate());

		$ret = $this->action($this->render);
		if ($ret === false) {
			$this->cancelEvents();
			return null;
		}
		return $ret;
	}
205239
function Tab(selector, opts) {
    var _this = this;

    _this.$tab = $(selector).eq(0);
    if (!_this.$tab.length) {
      return;
    }

    // 已通过自定义属性实例化过，不再重复实例化
    var oldInst = _this.$tab.data('mdui.tab');
    if (oldInst) {
      return oldInst;
    }

    _this.options = $.extend({}, DEFAULT, (opts || {}));
    _this.$tabs = _this.$tab.children('a');
    _this.$indicator = $('<div class="mdui-tab-indicator"></div>').appendTo(_this.$tab);
    _this.activeIndex = false; // 为 false 时表示没有激活的选项卡，或不存在选项卡

    // 根据 url hash 获取默认激活的选项卡
    var hash = location.hash;
    if (hash) {
      _this.$tabs.each(function (i, tab) {
        if ($(tab).attr('href') === hash) {
          _this.activeIndex = i;
          return false;
        }
      });
    }

    // 含 mdui-tab-active 的元素默认激活
    if (_this.activeIndex === false) {
      _this.$tabs.each(function (i, tab) {
        if ($(tab).hasClass('mdui-tab-active')) {
          _this.activeIndex = i;
          return false;
        }
      });
    }

    // 存在选项卡时，默认激活第一个选项卡
    if (_this.$tabs.length && _this.activeIndex === false) {
      _this.activeIndex = 0;
    }

    // 设置激活状态选项卡
    _this._setActive();

    // 监听窗口大小变化事件，调整指示器位置
    $window.on('resize', $.throttle(function () {
      _this._setIndicatorPosition();
    }, 100));

    // 监听点击选项卡事件
    _this.$tabs.each(function (i, tab) {
      _this._bindTabEvent(tab);
    });
  }
894931
function(e){
    var images  = this.images;
    var baseDir = path.dirname(this.get('file'));
    var files   = {};
    var equals = {};

    forEach(images, function(file, id){
      var fullPath = path.resolve(baseDir, file);
      if (files[fullPath] !== undefined) {
        equals[id] = files[fullPath];
      } else {
        //去除重复
        files[fullPath] = id;
      }
    });

    this.equals = equals;

    files = Object.keys(files);
    files.forEach(function(file){
      var fs = require('fs');
      var exists    = fs.existsSync;
      if (!exists(file)){
        Log.error('图片' + path.relative(baseDir, file) + '不存在');
      }
    });

    //获取图片大小
    Api.getImagesSize(files, this._setDef, this);
  }
916380
function () {

    function getRider() {
      if (process.env.LIGHTSQLSERVER_HOST) {
        return sqlserverRider;
      }
      if (process.env.LIGHTMYSQL_HOST) {
        return mysqlRider;
      }
      return mongoRider;
    }

    // 遍历所有board，以class名注册类，并添加board方法
    this.board.forEach(item => {
      this[item.class] = this[item.class] || {};

      log.debug(`>>>> ${item.api} ${item.class} ${item.action} ${CONST.METHOD[item.type]}`);

      this[item.class][item.action] = (handler, params, callback) => {

        // params参数未指定
        if (typeof params === 'function') {
          callback = params;
          params = undefined;
        }

        // 添加参数
        handler = handler.copy(params || handler.params);
        handler.api = item;

        const func = getRider()[CONST.BOARD_TYPE[item.type]];
        if (func) {
          return func.call(this, handler, callback);
        }

        log.debug('no method. ' + item.class + '#' + item.action);
        callback(new error.class.MethodNotFoundError());
      };
    });
  }
1262641
public void init() {
        try {
            String[] names = tgtools.web.platform.Platform.getBeanFactory().getBeanDefinitionNames();
            for (String name : names) {
                if (name.endsWith("CommandImpl") && tgtools.web.platform.Platform.getBean(name) instanceof Command && mType.equals(((Command) tgtools.web.platform.Platform.getBean(name)).getType())) {
                    addCommand((Command)tgtools.web.platform.Platform.getBean(name));
                }
            }
        } catch (Exception e) {
            LogHelper.error("","CommandFactory 初始化失败；原因："+e.toString(),"CommandFactory.init",e);
        }
    }
142029
function () {
            this._winTouchEvent = new $B.event.TouchEvent( window );
    
            //Axis을 이용하여 제스추어 방향 알아내기
            this._gAxis = new $B.event.GestureAxis( this._target, {
                aType: this._aType
            });
            this._gAxis.addListener( 'axis', $B.bind(function (e) {
                if ( !this._enable ) return this._winTouchEvent.removeListener();
                this.dispatch( 'axis', e );
    
                this._axis = e.axis;
                this._speed = this._getSpeed( this._axis, e.pageX, e.pageY );
                this._startX = e.pageX;
                this._startY = e.pageY;
                this._pageX = e.pageX;
                this._pageY = e.pageY;
                this._moveX = 0;
                this._moveY = 0;
                this._growX = 0;
                this._growY = 0;
                this._offsetBeginX = e.pageX;
                this._offsetBeginY = e.pageY;
                this._startTime = new Date().getTime();
    
                this._addTouchEvent();
            }, this));
    
            this._touchHandler = $B.bind( function (e) {
                if ( !this._enable ) return this._winTouchEvent.removeListener();
    
                switch ( e.type ) {
                    case 'touchmove':
                        e.preventDefault();
    
                        var pageX = this._startX, pageY = this._startY;
    
                        if ( e.touches.length > 0 ) {
                            var touch = e.touches[0];
                            pageX = touch.pageX;
                            pageY = touch.pageY;
                        }
    
                        this._moveX = pageX - this._startX;
                        this._moveY = pageY - this._startY;
                        this._growX = pageX - this._offsetBeginX;
                        this._growY = pageY - this._offsetBeginY;
                        this._speed = this._getSpeed( this._axis, pageX, pageY );
                        this._pageX = pageX;
                        this._pageY = pageY;
                        this._offsetBeginX = pageX;
                        this._offsetBeginY = pageY;
                        this._isTouchMove = true;
    
                        this.dispatch( 'move', {target: e.target, currentTarget: this._target, axis: this._axis, swipe: this._swipe, pageX: this._pageX, pageY: this._pageY, growX: this._growX, growY: this._growY, moveX: this._moveX, moveY: this._moveY, duration: 0, speed: this._speed} );
                        break;
                    case 'touchcancel':
                    case 'touchend':
                        if ( this._isTouchMove ) {
                            var duration = new Date().getTime() - this._startTime;
                            this._swipe = this._getSwipType( this._axis, this._moveX, this._moveY, duration );
                        } else {
                            this._swipe = 'none';
                        }
    
                        this.dispatch( 'swipe', {target: e.target, currentTarget: this._target, axis: this._axis, swipe: this._swipe, pageX: this._pageX, pageY: this._pageY, growX: this._growX, growY: this._growY, moveX: this._moveX, moveY: this._moveY, duration: duration, speed: this._speed} );
                        this._isTouchMove = false;
                        this._winTouchEvent.removeListener();
                        break;
                }
            }, this);
        }
324373
function () {
            var len = this.source.length,
                char,
                result = '';
            if (this.position >= len) {
                return undefined;
            }
            for (; this.position < len; this.position++) {
                char = this.readNextChars(1);

                if (char === '(' && this.quotes.length === 0) {
                    this.brackets.push(this.position);
                } else if (char === ')' && this.quotes.length === 0) {
                    this.brackets.pop();
                }

                //除这些外，且不在引号内部的特殊字符，都break。Special characters, except the following, and is not in quotes, all break.
                if (['.', ',', '(', ')', '[', ']', '"', "'", ' '].indexOf(char) === -1 && /\W/.test(char) && this.quotes.length === 0) {
                    break;
                }

                //class="@name"   class="@arr.join('')"
                if ((char === '"' || char === "'") && (this.brackets.length === 0 || this.brackets[this.brackets.length - 1] < (this.braces[this.braces.length - 1] || {position: -1}).position)) {
                    break;
                }

                //class="@name abc"   class="@arr.join(' ') abc"
                if (char === ' ' && (this.brackets.length === 0 || this.brackets[this.brackets.length - 1] < (this.braces[this.braces.length - 1] || {position: -1}).position)) {
                    break;
                }

                //class="@name.toString()abc"   class="@arr.join().toString()abc"
                if (char === ')' && [').', ')[', ')]', ')('].indexOf(this.readNextChars(2)) === -1) {
                    result += char;
                    this.position++;
                    break;
                }

                if (char === ']' && ['].', '][', ']]', ']('].indexOf(this.readNextChars(2)) === -1) {
                    result += char;
                    this.position++;
                    break;
                }

                //引号的处理。Handle quotes.
                if ((char === '"' || char === "'") && this.readPrevChars(1) !== '\\') {
                    if (this.quotes.length === 0) {
                        this.quotes.push({
                            type: char === '"' ? quotesEnum.doubleQuotes : quotesEnum.singleQuotes,
                            position: this.position
                        });
                    } else if (this.quotes.length > 0) {
                        if (char === '"' && this.quotes[0].type === quotesEnum.doubleQuotes) {
                            this.quotes.pop();
                        } else if (char === "'" && this.quotes[0].type === quotesEnum.singleQuotes) {
                            this.quotes.pop();
                        }
                    }
                }

                result += char;
            }
            //准备进入前端读取模式。Ready to switch to frontend read mode.
            this.state = stateEnum.client;
            return result;
        }
980174
function (withWhitespace) {
                var tok;

                // 如果已经有缓存的预读
                if (this.peeked) {
                    if (!withWhitespace && this.peeked.type == lexer.TOKEN_WHITESPACE) {
                        this.peeked = null;
                    } else {
                        tok = this.peeked;
                        this.peeked = null;
                        return tok;
                    }
                }

                tok = this.tokens.nextToken();

                // ... 默认如果下一个tokens是空白字符 则返回下下个token
                // ... 当withWhitespace为true时 即nextToken(true) 则不考虑是否是空白字符
                if (!withWhitespace) {
                    while (tok && tok.type == lexer.TOKEN_WHITESPACE) {
                        tok = this.tokens.nextToken();
                    }
                }

                return tok;
            }
459564
function (_this) {
    // 窗口高度
    var windowHeight = $window.height();

    // 配置参数
    var gutter = _this.options.gutter;
    var position = _this.options.position;

    // mdui-select 高度
    var selectHeight = parseInt(_this.$select.height());

    // 菜单项高度
    var $menuItemFirst = _this.$items.eq(0);
    var menuItemHeight = parseInt($menuItemFirst.height());
    var menuItemMargin = parseInt($menuItemFirst.css('margin-top'));

    // 菜单高度
    var menuWidth = parseFloat(_this.$select.width() + 0.01); // 必须比真实宽度多一点，不然会出现省略号
    var menuHeight = menuItemHeight * _this.size + menuItemMargin * 2;

    // var menuRealHeight = menuItemHeight * _this.$items.length + menuItemMargin * 2;

    // 菜单是否出现了滚动条
    //var isMenuScrollable = menuRealHeight > menuHeight;

    // select 在窗口中的位置
    var selectTop = _this.$select[0].getBoundingClientRect().top;

    var transformOriginY;
    var menuMarginTop;

    // position 为 auto 时
    if (position === 'auto') {

      // 菜单高度不能超过窗口高度
      var heightTemp = windowHeight - gutter * 2;
      if (menuHeight > heightTemp) {
        menuHeight = heightTemp;
      }

      // 菜单的 margin-top
      menuMarginTop = -(
        menuItemMargin + _this.selectedIndex * menuItemHeight +
        (menuItemHeight - selectHeight) / 2
      );
      var menuMarginTopMax = -(
        menuItemMargin + (_this.size - 1) * menuItemHeight +
        (menuItemHeight - selectHeight) / 2
      );
      if (menuMarginTop < menuMarginTopMax) {
        menuMarginTop = menuMarginTopMax;
      }

      // 菜单不能超出窗口
      var menuTop = selectTop + menuMarginTop;

      if (menuTop < gutter) {
        // 不能超出窗口上方
        menuMarginTop = -(selectTop - gutter);
      } else if (menuTop + menuHeight + gutter > windowHeight) {
        // 不能超出窗口下方
        menuMarginTop = -(selectTop + menuHeight + gutter - windowHeight);
      }

      // transform 的 Y 轴坐标
      transformOriginY = (_this.selectedIndex * menuItemHeight + menuItemHeight / 2 + menuItemMargin) + 'px';
    } else if (position === 'bottom') {
      menuMarginTop = selectHeight;
      transformOriginY = '0px';
    } else if (position === 'top') {
      menuMarginTop = -menuHeight - 1;
      transformOriginY = '100%';
    }

    // 设置样式
    _this.$select.width(menuWidth);
    _this.$menu
      .width(menuWidth)
      .height(menuHeight)
      .css({
        'margin-top': menuMarginTop + 'px',
        'transform-origin':
        'center ' + transformOriginY + ' 0',
      });
  }
654927
function mergeEnv(opts, env) {
    //用环境变量替换当前配置
    for (var i in env) {
        //console.log("", i);
        if (i.startsWith('pomjs_')) {

            var config = i.substring(6);
            if (config.indexOf('_') == -1) {
                opts[config] = env[i];
            } else {
                var temp = 'opts';
                var vs = config.split('_');
                for (var index = 0; index < vs.length; index++) {
                    temp += '.' + vs[index];
                    //console.log(temp, eval(temp));
                    if (!eval(temp) || index === vs.length - 1) {
                        var tempValue = index < vs.length - 1 ? '{}' : "'" + env[i] + "'";
                        eval(temp + '=' + tempValue);
                    }
                }
            }
        }
    }

    console.log(opts.saluki);
}
1114330
function (element) {
            var self = this;
            var $el = self.$el;    // 隐藏当然不包含了
            // 隐藏当然不包含了
            if (!self.get('visible') || !$el) {
                return false;
            }
            if ($el && ($el[0] === element || $el.contains(element))) {
                return true;
            }
            var children = self.get('children');
            for (var i = 0, count = children.length; i < count; i++) {
                var child = children[i];
                if (child.containsElement && child.containsElement(element)) {
                    return true;
                }
            }
            return false;
        }
1044028
function Module(id, deps, maker, root) {

        this.id = id;
        this.deps = deps; //必须是数组
        this.maker = maker;
        this.root = root || $;
        // _modulesMap[id] = 1;//定义之前
        // this.queue = new Queue();
        if(checkDeps(id)) {

            this.namespace();

        } else {

            this.init();
        }
    }
486483
function() {
    var obj = {};
    var self = this;

    Object
      .keys(this)
      .forEach(function(key) {

        // 过滤掉私有属性。 _key
        // 但是不过滤 __key
        if (key !== 'cache' && key !== 'url' && !/^_[^_]/.test(key)) {
          obj[key] = self[key];
        }
      });

    return obj;
  }
684659
function(){
        if(!this._element){
            var elem;
            try{
                elem = this._element = new Audio();
                elem.addEventListener('canplaythrough', this._onAudioEvent, false);
                elem.addEventListener('ended', this._onAudioEvent, false);
                elem.addEventListener('error', this._onAudioEvent, false);
                elem.src = this.src;
                elem.volume = this.volume;
                elem.load();
            }
            catch(err){
                //ie9 某些版本有Audio对象，但是执行play,pause会报错！
                elem = this._element = {};
                elem.play = elem.pause = function(){

                };
            }
        }
        return this;
    }
702810
function kick(job) {

  let result = {};

  async.eachSeries(job.step, (step, next) => {

    // 指定了类
    if (step.type === 'action') {
      const inject = helper.resolve(constant.PATH_CONTROLLER + step.class);
      if (inject) {
        const func = inject[step.action];
        if (func) {

          log.debug(`run step : ${step.class}#${step.action}`);
          return func.call(this, step, (err, data) => {
            result[job.id] = data;
            next(err);
          });
        }
      }
    }

    // 指定了脚本
    if (step.type === 'script') {
      log.debug(`run step : ${step.script}`);
      return exec(step.script,  (err, stdout) => {
        result[job.id] = stdout;
        next(err);
      });
    }

    result[job.id] = {};
    next();
  }, err => emitter.emit(job.id, err, result));
}
574121
function () {
        const editor = this.editor
        const $textElem = editor.$textElem

        $textElem.on('keydown', e => {
            if (e.keyCode !== 8) {
                return
            }
            const txtHtml = $textElem.html().toLowerCase().trim()
            if (txtHtml === '<p><br></p>') {
                // 最后剩下一个空行，就不再删除了
                e.preventDefault()
                return
            }
        })

        $textElem.on('keyup', e => {
            if (e.keyCode !== 8) {
                return
            }
            let $p
            const txtHtml = $textElem.html().toLowerCase().trim()

            // firefox 时用 txtHtml === '<br>' 判断，其他用 !txtHtml 判断
            if (!txtHtml || txtHtml === '<br>') {
                // 内容空了
                $p = $('<p><br/></p>')
                $textElem.html('') // 一定要先清空，否则在 firefox 下有问题
                $textElem.append($p)
                editor.selection.createRangeByElem($p, false, true)
                editor.selection.restoreSelection()
            }
        })

    }
256464
function(watcher){
    var dirty = false;
    if(!watcher) return;

    var now, last, tlast, tnow,  
      eq, diff, keyOf, trackDiff
     

    if(!watcher.test){

      now = watcher.get(this);
      last = watcher.last;
      keyOf = watcher.keyOf

      if(now !== last || watcher.force){
        tlast = _.typeOf(last);
        tnow = _.typeOf(now);
        eq = true; 

        // !Object
        if( !(tnow === 'object' && tlast==='object' && watcher.deep) ){
          // Array
          if( tnow === 'array' && ( tlast=='undefined' || tlast === 'array') ){
            if(typeof keyOf === 'function'){
              trackDiff = diffTrack(now, watcher.last || [], keyOf )
              diff = trackDiff.steps;
              if(trackDiff.dirty) dirty = true;
            }else{
              diff = diffArray(now, watcher.last || [], watcher.diff)
            }
            
            if(!dirty && (tlast !== 'array' || diff === true || diff.length) ) dirty = true;
          }else{
            eq = _.equals( now, last );
            if( !eq || watcher.force ){
              watcher.force = null;
              dirty = true; 
            }
          }
        }else{
          diff =  diffObject( now, last, watcher.diff, keyOf  );
          if(diff.isTrack){
            trackDiff = diff;
            diff = trackDiff.steps;
          }
          if( diff === true || diff.length ) dirty = true;
        }
      }

    } else{
      // @TODO 是否把多重改掉
      var result = watcher.test(this);
      if(result){
        dirty = true;
        watcher.fn.apply(this, result)
      }
    }
    if(dirty && !watcher.test){
      if(tnow === 'object' && watcher.deep || tnow === 'array'){
        watcher.last = _.clone(now);
      }else{
        watcher.last = now;
      }
      watcher.fn.call(this, now, last, diff, trackDiff && trackDiff.oldKeyMap, trackDiff && trackDiff.dirty)
      if(watcher.once) this.$unwatch(watcher)
    }

    return dirty;
  }