亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ext.ux.uploaddialog.js

?? 重點不是信息管理系統
?? JS
?? 第 1 頁 / 共 3 頁
字號:
/**
 * This namespace should be in another file but I dicided to put it here for consistancy.
 */
Ext.namespace('Ext.ux.Utils');

/**
 * This class implements event queue behaviour.
 *
 * @class Ext.ux.Utils.EventQueue
 * @param function  handler  Event handler.
 * @param object    scope    Handler scope.
 */
Ext.ux.Utils.EventQueue = function(handler, scope)
{
  if (!handler) {
    throw 'Handler is required.';
  }
  this.handler = handler;
  this.scope = scope || window;
  this.queue = [];
  this.is_processing = false;
  
  /**
   * Posts event into the queue.
   *    * @access public
   * @param mixed event Event identificator.
   * @param mixed data  Event data.
   */
  this.postEvent = function(event, data)
  {
    data = data || null;
    this.queue.push({event: event, data: data});
    if (!this.is_processing) {
      this.process();
    }
  }
  
  this.flushEventQueue = function()
  {
    this.queue = [];
  },
  
  /**
   * @access private
   */
  this.process = function()
  {
    while (this.queue.length > 0) {
      this.is_processing = true;
      var event_data = this.queue.shift();
      this.handler.call(this.scope, event_data.event, event_data.data);
    }
    this.is_processing = false;
  }
}

/**
 * This class implements Mili's finite state automata behaviour.
 *  
 *  Transition / output table format:
 *  {
 *    'state_1' : {
 *      'event_1' : [
 *        {
 *          p|predicate: function,    // Transition predicate, optional, default to true.
 *                                    // If array then conjunction will be applyed to the operands.
 *                                    // Predicate signature is (data, event, this).
 *          a|action: function|array, // Transition action, optional, default to Ext.emptyFn.
 *                                    // If array then methods will be called sequentially.
 *                                    // Action signature is (data, event, this).
 *          s|state: 'state_x',       // New state - transition destination, optional, default to 
 *                                    // current state.
 *          scope: object             // Predicate and action scope, optional, default to 
 *                                    // trans_table_scope or window.
 *        }
 *      ]
 *    },
 *
 *    'state_2' : {
 *      ...
 *    }
 *    ...
 *  }
 *
 *  @param  mixed initial_state Initial state.
 *  @param  object trans_table Transition / output table.
 *  @param  trans_table_scope Transition / output table's methods scope.
 */
Ext.ux.Utils.FSA = function(initial_state, trans_table, trans_table_scope)
{
  this.current_state = initial_state;
  this.trans_table = trans_table || {};
  this.trans_table_scope = trans_table_scope || window;
  Ext.ux.Utils.FSA.superclass.constructor.call(this, this.processEvent, this);
}

Ext.extend(Ext.ux.Utils.FSA, Ext.ux.Utils.EventQueue, {

  current_state : null,
  trans_table : null,  
  trans_table_scope : null,
  
  /**
   * Returns current state
   * 
   * @access public
   * @return mixed Current state.
   */
  state : function()
  {
    return this.current_state;
  },
  
  /**
   * @access public
   */
  processEvent : function(event, data)
  {
    var transitions = this.currentStateEventTransitions(event);
    if (!transitions) {
      throw "State '" + this.current_state + "' has no transition for event '" + event + "'.";
    }
    for (var i = 0, len = transitions.length; i < len; i++) {
      var transition = transitions[i];

      var predicate = transition.predicate || transition.p || true;
      var action = transition.action || transition.a || Ext.emptyFn;
      var new_state = transition.state || transition.s || this.current_state;
      var scope = transition.scope || this.trans_table_scope;
      
      if (this.computePredicate(predicate, scope, data, event)) {
        this.callAction(action, scope, data, event);
        this.current_state = new_state; 
        return;
      }
    }
    
    throw "State '" + this.current_state + "' has no transition for event '" + event + "' in current context";
  },
  
  /**
   * @access private
   */
  currentStateEventTransitions : function(event)
  {
    return this.trans_table[this.current_state] ? 
      this.trans_table[this.current_state][event] || false
      :
      false;
  },
  
  /**
   * @access private
   */
  computePredicate : function(predicate, scope, data, event)
  {
    var result = false; 
    
    switch (Ext.type(predicate)) {
     case 'function':
       result = predicate.call(scope, data, event, this);
       break;
     case 'array':
       result = true;
       for (var i = 0, len = predicate.length; result && (i < len); i++) {
         if (Ext.type(predicate[i]) == 'function') {
           result = predicate[i].call(scope, data, event, this);
         }
         else {
           throw [
             'Predicate: ',
             predicate[i],
             ' is not callable in "',
             this.current_state,
             '" state for event "',
             event
           ].join('');
         }
       }
       break;
     case 'boolean':
       result = predicate;
       break;
     default:
       throw [
         'Predicate: ',
         predicate,
         ' is not callable in "',
         this.current_state,
         '" state for event "',
         event
       ].join('');
    }
    return result;
  },
  
  /**
   * @access private
   */
  callAction : function(action, scope, data, event)
  {
    switch (Ext.type(action)) {
       case 'array':
       for (var i = 0, len = action.length; i < len; i++) {
         if (Ext.type(action[i]) == 'function') {
           action[i].call(scope, data, event, this);
         }
         else {
           throw [
             'Action: ',
             action[i],
             ' is not callable in "',
             this.current_state,
             '" state for event "',
             event
           ].join('');
         }
       }
         break;
     case 'function':
       action.call(scope, data, event, this);
       break;
     default:
       throw [
         'Action: ',
         action,
         ' is not callable in "',
         this.current_state,
         '" state for event "',
         event
       ].join('');
    }
  }
});

// ---------------------------------------------------------------------------------------------- //

/**
 * Ext.ux.UploadDialog namespace.
 */
Ext.namespace('Ext.ux.UploadDialog');

/**
 * File upload browse button.
 *
 * @class Ext.ux.UploadDialog.BrowseButton
 */ 
Ext.ux.UploadDialog.BrowseButton = Ext.extend(Ext.Button, 
{
  input_name : 'file',
  
  input_file : null,
  
  original_handler : null,
  
  original_scope : null,
  
  /**
   * @access private
   */
  initComponent : function()
  {
    Ext.ux.UploadDialog.BrowseButton.superclass.initComponent.call(this);
    this.original_handler = this.handler || null;
    this.original_scope = this.scope || window;
    this.handler = null;
    this.scope = null;
  },
  
  /**
   * @access private
   */
  onRender : function(ct, position)
  {
    Ext.ux.UploadDialog.BrowseButton.superclass.onRender.call(this, ct, position);
    this.createInputFile();
  },
  
  /**
   * @access private
   */
  createInputFile : function()
  {
    var button_container = this.el.child('.x-btn-center');
    button_container.position('relative');
    this.input_file = Ext.DomHelper.append(
      button_container, 
      {
        tag: 'input',
        type: 'file',
        size: 1,
        name: this.input_name || Ext.id(this.el),
        style: 'position: absolute; display: block; border: none; cursor: pointer'
      },
      true
    );
    
    this.input_file.setOpacity(0.0);
    this.adjustInputFileBox();
        
    if (this.handleMouseEvents) {
      this.input_file.on('mouseover', this.onMouseOver, this);
        this.input_file.on('mousedown', this.onMouseDown, this);
    }
    
    if(this.tooltip){
      if(typeof this.tooltip == 'object'){
        Ext.QuickTips.register(Ext.apply({target: this.input_file}, this.tooltip));
      } 
      else {
        this.input_file.dom[this.tooltipType] = this.tooltip;
        }
      }
    
    this.input_file.on('change', this.onInputFileChange, this);
    this.input_file.on('click', function(e) { e.stopPropagation(); }); 
  },

	/**
   * @access private
   */
  autoWidth : function()
  {
    Ext.ux.UploadDialog.BrowseButton.superclass.autoWidth.call(this);
		this.adjustInputFileBox();
  },

	/**
   * @access private
   */
  adjustInputFileBox : function()
  {
		var btn_cont, btn_box, inp_box, adj;

		if (this.el && this.input_file) {
      btn_cont = this.el.child('.x-btn-center');
      btn_box = btn_cont.getBox();
      this.input_file.setStyle('font-size', (btn_box.width * 0.5) + 'px');
      inp_box = this.input_file.getBox();
      adj = {x: 3, y: 3}
      if (Ext.isIE) {
        adj = {x: -3, y: 3}
      }    
      this.input_file.setLeft(btn_box.width - inp_box.width + adj.x + 'px');
      this.input_file.setTop(btn_box.height - inp_box.height + adj.y + 'px');		
		}
  },
  
  /**
   * @access public
   */
  detachInputFile : function(no_create)
  {
    var result = this.input_file;
    
    no_create = no_create || false;
    
    if (typeof this.tooltip == 'object') {
      Ext.QuickTips.unregister(this.input_file);
    }
    else {
      this.input_file.dom[this.tooltipType] = null;
    }
    this.input_file.removeAllListeners();
    this.input_file = null;
    
    if (!no_create) {
      this.createInputFile();
    }
    return result;
  },
  
  /**
   * @access public
   */
  getInputFile : function()
  {
    return this.input_file;
  },
  
  /**
   * @access public
   */
  disable : function()
  {
    Ext.ux.UploadDialog.BrowseButton.superclass.disable.call(this);  
    this.input_file.dom.disabled = true;
  },
  
  /**
   * @access public
   */
  enable : function()
  {
    Ext.ux.UploadDialog.BrowseButton.superclass.enable.call(this);
    this.input_file.dom.disabled = false;
  },
  
  /**
   * @access public
   */
  destroy : function()
  {
    var input_file = this.detachInputFile(true);
    input_file.remove();
    input_file = null;
    Ext.ux.UploadDialog.BrowseButton.superclass.destroy.call(this);      
  },
  
  /**
   * @access private
   */
  onInputFileChange : function()
  {
    if (this.original_handler) {
      this.original_handler.call(this.original_scope, this);
    }
  }  
});

/**
 * Toolbar file upload browse button.
 *
 * @class Ext.ux.UploadDialog.TBBrowseButton
 */
Ext.ux.UploadDialog.TBBrowseButton = Ext.extend(Ext.ux.UploadDialog.BrowseButton, 
{
  hideParent : true,

  onDestroy : function()
  {
    Ext.ux.UploadDialog.TBBrowseButton.superclass.onDestroy.call(this);
    if(this.container) {
      this.container.remove();
      }
  }
});

/**
 * Record type for dialogs grid.
 *
 * @class Ext.ux.UploadDialog.FileRecord 
 */
Ext.ux.UploadDialog.FileRecord = Ext.data.Record.create([
  {name: 'filename'},
  {name: 'state', type: 'int'},
  {name: 'note'},
  {name: 'input_element'}
]);

Ext.ux.UploadDialog.FileRecord.STATE_QUEUE = 0;
Ext.ux.UploadDialog.FileRecord.STATE_FINISHED = 1;
Ext.ux.UploadDialog.FileRecord.STATE_FAILED = 2;
Ext.ux.UploadDialog.FileRecord.STATE_PROCESSING = 3;

/**
 * Dialog class.
 *
 * @class Ext.ux.UploadDialog.Dialog
 */
Ext.ux.UploadDialog.Dialog = function(config)
{
  var default_config = {
    border: false,
    width: 450,
    height: 300,
    minWidth: 450,
    minHeight: 300,
    plain: true,
    constrainHeader: true,
    draggable: true,
    closable: true,
    maximizable: false,
    minimizable: false,
    resizable: true,
    autoDestroy: true,
    closeAction: 'hide',
    title: this.i18n.title,
    cls: 'ext-ux-uploaddialog-dialog',
    // --------
    url: '',
    base_params: {},
    permitted_extensions: [],
    reset_on_hide: true,
    allow_close_on_upload: false,
    upload_autostart: false,
    post_var_name: 'file'
  }
  config = Ext.applyIf(config || {}, default_config);
  config.layout = 'absolute';
  
  Ext.ux.UploadDialog.Dialog.superclass.constructor.call(this, config);
}

Ext.extend(Ext.ux.UploadDialog.Dialog, Ext.Window, {

  fsa : null,
  
  state_tpl : null,
  
  form : null,
  
  grid_panel : null,
  
  progress_bar : null,
  
  is_uploading : false,
  
  initial_queued_count : 0,
  
  upload_frame : null,
  
  /**
   * @access private
   */
  //--------------------------------------------------------------------------------------------- //
  initComponent : function()
  {
    Ext.ux.UploadDialog.Dialog.superclass.initComponent.call(this);
    
    // Setting automata protocol
    var tt = {
      // --------------
      'created' : {
      // --------------
        'window-render' : [
          {
            action: [this.createForm, this.createProgressBar, this.createGrid],
            state: 'rendering'
          }
        ],
        'destroy' : [
          {
            action: this.flushEventQueue,
            state: 'destroyed'
          }
        ]

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产综合一区二区三区| 国产精品传媒在线| 亚洲欧洲成人自拍| 蜜桃精品视频在线| 欧美色综合久久| 久久久久九九视频| 免费观看在线综合| 欧美美女一区二区在线观看| 国产女同性恋一区二区| 老司机精品视频在线| 欧美性受xxxx| 亚洲欧美国产毛片在线| 国产成人精品午夜视频免费| 欧美一区二区三区成人| 午夜欧美2019年伦理| av动漫一区二区| 欧美国产激情一区二区三区蜜月| 国产在线视频精品一区| 欧美一级欧美三级| 日产国产高清一区二区三区| 在线视频一区二区三区| 亚洲天天做日日做天天谢日日欢| 国产91丝袜在线18| 精品国产髙清在线看国产毛片| 视频一区二区三区中文字幕| 欧美在线|欧美| 一级中文字幕一区二区| 色婷婷精品大在线视频| 一区二区激情小说| 91福利在线导航| 一区二区视频在线| 色婷婷国产精品| 亚洲第一主播视频| 欧美日韩国产a| 日韩电影在线一区二区三区| 这里只有精品电影| 久久国产综合精品| 国产日韩av一区| 色猫猫国产区一区二在线视频| 中文字幕日韩精品一区| 色乱码一区二区三区88| 午夜精品久久久久| 欧美tickling网站挠脚心| 国内精品免费在线观看| 国产欧美日韩精品一区| 99久久精品免费| 亚洲第一二三四区| 日韩欧美成人激情| 成人av资源在线观看| 亚洲激情图片一区| 7777精品久久久大香线蕉| 久久国产精品99久久久久久老狼| 国产午夜精品美女毛片视频| 99视频一区二区| 午夜不卡在线视频| 久久久久亚洲蜜桃| 在线看日本不卡| 狠狠色综合日日| 亚洲色图欧美在线| 欧美高清视频www夜色资源网| 精品亚洲免费视频| 亚洲人成在线播放网站岛国 | 欧美一区二区国产| 狠狠色丁香婷婷综合| 亚洲色图欧美激情| 精品盗摄一区二区三区| 97久久精品人人做人人爽50路| 天天亚洲美女在线视频| 中文字幕第一页久久| 欧美日韩国产经典色站一区二区三区| 极品少妇xxxx偷拍精品少妇| 亚洲精品免费在线播放| 精品福利视频一区二区三区| proumb性欧美在线观看| 奇米影视一区二区三区小说| 国产精品超碰97尤物18| 日韩视频在线你懂得| 一本到一区二区三区| 国产乱色国产精品免费视频| 亚洲成人自拍偷拍| 国产精品毛片久久久久久| 日韩午夜三级在线| 精品视频123区在线观看| 成人精品在线视频观看| 麻豆中文一区二区| 一区二区欧美国产| 17c精品麻豆一区二区免费| 精品久久久久av影院| 欧美欧美欧美欧美| 91性感美女视频| 懂色av一区二区三区免费看| 日本欧美韩国一区三区| 亚洲精品日韩专区silk| 久久久99精品久久| 精品免费国产二区三区| 欧美女孩性生活视频| 91蝌蚪porny九色| 成人一二三区视频| 国产成人精品免费一区二区| 免费成人在线观看视频| 日韩**一区毛片| 婷婷丁香激情综合| 午夜精品福利在线| 亚洲成人av中文| 香蕉久久夜色精品国产使用方法| 亚洲视频你懂的| 亚洲欧洲另类国产综合| 亚洲国产精华液网站w| 欧美国产精品中文字幕| 国产欧美一区二区精品久导航| 久久一二三国产| 亚洲三级视频在线观看| 中文字幕一区二区日韩精品绯色| 中文成人av在线| 综合亚洲深深色噜噜狠狠网站| 亚洲欧洲日产国产综合网| 亚洲乱码国产乱码精品精小说| 中文字幕在线一区免费| 综合久久久久久| 亚洲午夜国产一区99re久久| 亚洲国产精品人人做人人爽| 午夜婷婷国产麻豆精品| 青青草原综合久久大伊人精品| 麻豆一区二区99久久久久| 国产乱子伦视频一区二区三区 | 蜜桃视频第一区免费观看| 久草热8精品视频在线观看| 另类的小说在线视频另类成人小视频在线 | 久久久久久久综合色一本| 中文字幕欧美日韩一区| 亚洲欧美影音先锋| 亚洲一区二区在线免费看| 亚洲丶国产丶欧美一区二区三区| 五月天欧美精品| 九九**精品视频免费播放| 丰满岳乱妇一区二区三区| 一本大道av伊人久久综合| 欧美日韩国产成人在线91| 精品久久久久久久久久久久包黑料| 国产日产欧美一区二区视频| 亚洲免费观看高清| 免费成人在线观看视频| 国产69精品久久久久777| 色伊人久久综合中文字幕| 3d成人动漫网站| 国产精品久线观看视频| 亚洲gay无套男同| 久草中文综合在线| 色999日韩国产欧美一区二区| 欧美日韩三级视频| 国产欧美一区二区精品秋霞影院 | 日韩在线一区二区三区| 国产精品自拍三区| 欧美亚洲国产一区在线观看网站| 日韩免费在线观看| 亚洲人吸女人奶水| 麻豆传媒一区二区三区| 91在线视频播放| 欧美xxxx老人做受| 一区二区三区在线视频免费| 国产一区二区中文字幕| 欧美日韩一级二级三级| 亚洲国产经典视频| 精品在线播放午夜| 欧美性受xxxx| 国产精品激情偷乱一区二区∴| 香蕉成人伊视频在线观看| 成人国产精品免费网站| 精品国产三级电影在线观看| 亚洲最大色网站| av不卡免费在线观看| 久久一二三国产| 日本视频免费一区| 欧美在线制服丝袜| 国产精品卡一卡二| 国产高清在线观看免费不卡| 91精品国产手机| 午夜精品影院在线观看| 91亚洲国产成人精品一区二三| 国产亚洲成aⅴ人片在线观看| 石原莉奈在线亚洲二区| 欧美视频一区二区三区四区| 免费的成人av| 欧美日韩成人一区| 一区二区三区不卡视频在线观看| 成人免费不卡视频| 国产欧美中文在线| 国内成+人亚洲+欧美+综合在线| 欧美一级二级三级乱码| 日日摸夜夜添夜夜添国产精品| 欧美中文字幕一区二区三区| 亚洲同性gay激情无套| av一二三不卡影片| 亚洲欧洲制服丝袜| 91亚洲大成网污www| 樱花影视一区二区| 一本色道久久综合亚洲精品按摩| 亚洲色图制服丝袜| 色琪琪一区二区三区亚洲区| 一区二区三区久久久|