/* automatically generated by JSCoverage - do not edit */
try {
  if (typeof top === 'object' && top !== null && typeof top.opener === 'object' && top.opener !== null) {
    // this is a browser window that was opened from another window

    if (! top.opener._$jscoverage) {
      top.opener._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null) {
    // this is a browser window

    try {
      if (typeof top.opener === 'object' && top.opener !== null && top.opener._$jscoverage) {
        top._$jscoverage = top.opener._$jscoverage;
      }
    }
    catch (e) {}

    if (! top._$jscoverage) {
      top._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null && top._$jscoverage) {
    _$jscoverage = top._$jscoverage;
  }
}
catch (e) {}
if (typeof _$jscoverage !== 'object') {
  _$jscoverage = {};
}
if (! _$jscoverage['ui/tablebutton.js']) {
  _$jscoverage['ui/tablebutton.js'] = [];
  _$jscoverage['ui/tablebutton.js'][6] = 0;
  _$jscoverage['ui/tablebutton.js'][7] = 0;
  _$jscoverage['ui/tablebutton.js'][12] = 0;
  _$jscoverage['ui/tablebutton.js'][13] = 0;
  _$jscoverage['ui/tablebutton.js'][15] = 0;
  _$jscoverage['ui/tablebutton.js'][17] = 0;
  _$jscoverage['ui/tablebutton.js'][18] = 0;
  _$jscoverage['ui/tablebutton.js'][22] = 0;
  _$jscoverage['ui/tablebutton.js'][27] = 0;
  _$jscoverage['ui/tablebutton.js'][30] = 0;
  _$jscoverage['ui/tablebutton.js'][31] = 0;
  _$jscoverage['ui/tablebutton.js'][35] = 0;
}
_$jscoverage['ui/tablebutton.js'].source = ["<span class=\"c\">///import core</span>","<span class=\"c\">///import uicore</span>","<span class=\"c\">///import ui/popup.js</span>","<span class=\"c\">///import ui/tablepicker.js</span>","<span class=\"c\">///import ui/splitbutton.js</span>","<span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","    <span class=\"k\">var</span> utils <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>utils<span class=\"k\">,</span>","        Popup <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>Popup<span class=\"k\">,</span>","        TablePicker <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>TablePicker<span class=\"k\">,</span>","        SplitButton <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>SplitButton<span class=\"k\">,</span>","        TableButton <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>TableButton <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>options<span class=\"k\">)</span><span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initOptions<span class=\"k\">(</span>options<span class=\"k\">);</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initTableButton<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">;</span>","    TableButton<span class=\"k\">.</span>prototype <span class=\"k\">=</span> <span class=\"k\">{</span>","        initTableButton<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">var</span> me <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">;</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>popup <span class=\"k\">=</span> <span class=\"k\">new</span> Popup<span class=\"k\">(</span><span class=\"k\">{</span>","                content<span class=\"k\">:</span> <span class=\"k\">new</span> TablePicker<span class=\"k\">(</span><span class=\"k\">{</span>","                    editor<span class=\"k\">:</span>me<span class=\"k\">.</span>editor<span class=\"k\">,</span>","                    onpicktable<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> numCols<span class=\"k\">,</span> numRows<span class=\"k\">)</span><span class=\"k\">{</span>","                        me<span class=\"k\">.</span>_onPickTable<span class=\"k\">(</span>numCols<span class=\"k\">,</span> numRows<span class=\"k\">);</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">),</span>","                <span class=\"s\">'editor'</span><span class=\"k\">:</span>me<span class=\"k\">.</span>editor","            <span class=\"k\">}</span><span class=\"k\">);</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initSplitButton<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _onPickTable<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>numCols<span class=\"k\">,</span> numRows<span class=\"k\">)</span><span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">'picktable'</span><span class=\"k\">,</span> numCols<span class=\"k\">,</span> numRows<span class=\"k\">)</span> <span class=\"k\">!==</span> <span class=\"k\">false</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>popup<span class=\"k\">.</span>hide<span class=\"k\">();</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    utils<span class=\"k\">.</span>inherits<span class=\"k\">(</span>TableButton<span class=\"k\">,</span> SplitButton<span class=\"k\">);</span>","","<span class=\"k\">}</span><span class=\"k\">)();</span>"];
_$jscoverage['ui/tablebutton.js'][6]++;
(function () {
  _$jscoverage['ui/tablebutton.js'][7]++;
  var utils = baidu.editor.utils, Popup = baidu.editor.ui.Popup, TablePicker = baidu.editor.ui.TablePicker, SplitButton = baidu.editor.ui.SplitButton, TableButton = (baidu.editor.ui.TableButton = (function (options) {
  _$jscoverage['ui/tablebutton.js'][12]++;
  this.initOptions(options);
  _$jscoverage['ui/tablebutton.js'][13]++;
  this.initTableButton();
}));
  _$jscoverage['ui/tablebutton.js'][15]++;
  TableButton.prototype = {initTableButton: (function () {
  _$jscoverage['ui/tablebutton.js'][17]++;
  var me = this;
  _$jscoverage['ui/tablebutton.js'][18]++;
  this.popup = new Popup({content: new TablePicker({editor: me.editor, onpicktable: (function (t, numCols, numRows) {
  _$jscoverage['ui/tablebutton.js'][22]++;
  me._onPickTable(numCols, numRows);
})}), "editor": me.editor});
  _$jscoverage['ui/tablebutton.js'][27]++;
  this.initSplitButton();
}), _onPickTable: (function (numCols, numRows) {
  _$jscoverage['ui/tablebutton.js'][30]++;
  if ((this.fireEvent("picktable", numCols, numRows) !== false)) {
    _$jscoverage['ui/tablebutton.js'][31]++;
    this.popup.hide();
  }
})};
  _$jscoverage['ui/tablebutton.js'][35]++;
  utils.inherits(TableButton, SplitButton);
})();
