{"size": 1836, "ext": "js", "max_stars_repo_path": "node_modules/sbis3-ws/WS.Deprecated/Controls/DateRangeChoose/design/DateRangeChoose.js", "max_stars_repo_name": "nikitabelotelov/coffee", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/sbis3-ws/WS.Deprecated/Controls/DateRangeChoose/design/DateRangeChoose.js", "max_issues_repo_name": "nikitabelotelov/coffee", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "node_modules/sbis3-ws/WS.Deprecated/Controls/DateRangeChoose/design/DateRangeChoose.js", "max_forks_repo_name": "nikitabelotelov/coffee", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 36.0, "max_line_length": 87, "alphanum_fraction": 0.6274509804}
define('Deprecated/Controls/DateRangeChoose/design/DateRangeChoose',
   [
   "Deprecated/Controls/DateRange/DateRange",
   "Deprecated/Controls/DateRangeChoose/DateRangeChoose",
   "Deprecated/Controls/FieldDate/design/DesignPlugin",
   "Deprecated/Controls/FieldFormatAbstract/design/DesignPlugin"
],
   function(CDateRange, DateRange){

      //endregion

   /**
    * @class CDateRange.DesignPlugin
    * @extends CDateRange
    * нужен, чтобы менять режим отображения через textView
    * @plugin
    */
   CDateRange.DesignPlugin = DateRange.extendPlugin({
      setTextView: function(textView) {
         if(this._options.textView !== textView) {
            this._container.toggleClass('ws-date-range-text-view', textView);
            if(this._textField) {
               this._textField.toggleClass('ws-hidden', !textView);
            // если текстовое отображение не было создано и нужно создать
            } else if(textView) {
               this._createTextField();
            }
            if(this._movingControlsBlock) {
               this._movingControlsBlock.toggleClass('ws-hidden', textView);
            // если отображение через поля даты не было создано и нужно создать
            } else if(!textView) {
               this._createControlsBlock();
            }
            this._options.textView = textView;
         }
      },
      setMask: function(mask) {
         this._dateControls[0].setMask(mask);
         this._dateControls[1].setMask(mask);
         this._changeWidthMovingControlsBlock();
      },
      _hideMenu: function() {
         if(this._options.textView) {
            this._movingControlsBlock.addClass('ws-hidden').prependTo(this._container);
         }
      },
      _showMenu: function(controlNumber) {
         this._movingControlsBlock.removeClass('ws-hidden');
      }
   });
});