/* 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/button.js']) {
  _$jscoverage['ui/button.js'] = [];
  _$jscoverage['ui/button.js'][4] = 0;
  _$jscoverage['ui/button.js'][5] = 0;
  _$jscoverage['ui/button.js'][9] = 0;
  _$jscoverage['ui/button.js'][10] = 0;
  _$jscoverage['ui/button.js'][12] = 0;
  _$jscoverage['ui/button.js'][19] = 0;
  _$jscoverage['ui/button.js'][20] = 0;
  _$jscoverage['ui/button.js'][23] = 0;
  _$jscoverage['ui/button.js'][34] = 0;
  _$jscoverage['ui/button.js'][35] = 0;
  _$jscoverage['ui/button.js'][38] = 0;
  _$jscoverage['ui/button.js'][39] = 0;
  _$jscoverage['ui/button.js'][43] = 0;
  _$jscoverage['ui/button.js'][44] = 0;
}
_$jscoverage['ui/button.js'].source = ["<span class=\"c\">///import core</span>","<span class=\"c\">///import uicore</span>","<span class=\"c\">///import ui/stateful.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>","        UIBase <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>UIBase<span class=\"k\">,</span>","        Stateful <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>Stateful<span class=\"k\">,</span>","        Button <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>Button <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>initButton<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">;</span>","    Button<span class=\"k\">.</span>prototype <span class=\"k\">=</span> <span class=\"k\">{</span>","        uiName<span class=\"k\">:</span> <span class=\"s\">'button'</span><span class=\"k\">,</span>","        label<span class=\"k\">:</span> <span class=\"s\">''</span><span class=\"k\">,</span>","        title<span class=\"k\">:</span> <span class=\"s\">''</span><span class=\"k\">,</span>","        showIcon<span class=\"k\">:</span> <span class=\"k\">true</span><span class=\"k\">,</span>","        showText<span class=\"k\">:</span> <span class=\"k\">true</span><span class=\"k\">,</span>","        initButton<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initUIBase<span class=\"k\">();</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>Stateful_init<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        getHtmlTpl<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"s\">'&lt;div id=\"##\" class=\"edui-box %%\"&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;div id=\"##_state\" stateful&gt;'</span> <span class=\"k\">+</span>","                 <span class=\"s\">'&lt;div class=\"%%-wrap\"&gt;&lt;div id=\"##_body\" unselectable=\"on\" '</span> <span class=\"k\">+</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>title <span class=\"k\">?</span> <span class=\"s\">'title=\"'</span> <span class=\"k\">+</span> <span class=\"k\">this</span><span class=\"k\">.</span>title <span class=\"k\">+</span> <span class=\"s\">'\"'</span> <span class=\"k\">:</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span>","                 <span class=\"s\">' class=\"%%-body\" onmousedown=\"return false;\" onclick=\"return $$._onClick();\"&gt;'</span> <span class=\"k\">+</span>","                  <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>showIcon <span class=\"k\">?</span> <span class=\"s\">'&lt;div class=\"edui-box edui-icon\"&gt;&lt;/div&gt;'</span> <span class=\"k\">:</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span>","                  <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>showText <span class=\"k\">?</span> <span class=\"s\">'&lt;div class=\"edui-box edui-label\"&gt;'</span> <span class=\"k\">+</span> <span class=\"k\">this</span><span class=\"k\">.</span>label <span class=\"k\">+</span> <span class=\"s\">'&lt;/div&gt;'</span> <span class=\"k\">:</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span>","                 <span class=\"s\">'&lt;/div&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;/div&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;/div&gt;&lt;/div&gt;'</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        postRender<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>Stateful_postRender<span class=\"k\">();</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>disabled<span class=\"k\">)</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _onClick<span class=\"k\">:</span> <span class=\"k\">function</span> <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>isDisabled<span class=\"k\">())</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">'click'</span><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>Button<span class=\"k\">,</span> UIBase<span class=\"k\">);</span>","    utils<span class=\"k\">.</span>extend<span class=\"k\">(</span>Button<span class=\"k\">.</span>prototype<span class=\"k\">,</span> Stateful<span class=\"k\">);</span>","","<span class=\"k\">}</span><span class=\"k\">)();</span>"];
_$jscoverage['ui/button.js'][4]++;
(function () {
  _$jscoverage['ui/button.js'][5]++;
  var utils = baidu.editor.utils, UIBase = baidu.editor.ui.UIBase, Stateful = baidu.editor.ui.Stateful, Button = (baidu.editor.ui.Button = (function (options) {
  _$jscoverage['ui/button.js'][9]++;
  this.initOptions(options);
  _$jscoverage['ui/button.js'][10]++;
  this.initButton();
}));
  _$jscoverage['ui/button.js'][12]++;
  Button.prototype = {uiName: "button", label: "", title: "", showIcon: true, showText: true, initButton: (function () {
  _$jscoverage['ui/button.js'][19]++;
  this.initUIBase();
  _$jscoverage['ui/button.js'][20]++;
  this.Stateful_init();
}), getHtmlTpl: (function () {
  _$jscoverage['ui/button.js'][23]++;
  return ("<div id=\"##\" class=\"edui-box %%\">" + "<div id=\"##_state\" stateful>" + "<div class=\"%%-wrap\"><div id=\"##_body\" unselectable=\"on\" " + (this.title? ("title=\"" + this.title + "\""): "") + " class=\"%%-body\" onmousedown=\"return false;\" onclick=\"return $$._onClick();\">" + (this.showIcon? "<div class=\"edui-box edui-icon\"></div>": "") + (this.showText? ("<div class=\"edui-box edui-label\">" + this.label + "</div>"): "") + "</div>" + "</div>" + "</div></div>");
}), postRender: (function () {
  _$jscoverage['ui/button.js'][34]++;
  this.Stateful_postRender();
  _$jscoverage['ui/button.js'][35]++;
  this.setDisabled(this.disabled);
}), _onClick: (function () {
  _$jscoverage['ui/button.js'][38]++;
  if ((! this.isDisabled())) {
    _$jscoverage['ui/button.js'][39]++;
    this.fireEvent("click");
  }
})};
  _$jscoverage['ui/button.js'][43]++;
  utils.inherits(Button, UIBase);
  _$jscoverage['ui/button.js'][44]++;
  utils.extend(Button.prototype, Stateful);
})();
