# all files / keystone/fields/types/color/ ColorType.js

100% Statements 11/11
100% Branches 0/0
100% Functions 1/1
100% Lines 11/11

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    261×
    1×
    1×

    1×
    2×
    2×

    1×

    1×
    1×

    1×

    1×
     var FieldType = require('../Type');
    var TextType = require('../text/TextType');
    var util = require('util');

    /**
     * Color FieldType Constructor
     * @extends Field
     * @api public
     */
    function color (list, path, options) {
    	this._nativeType = String;
    	color.super_.call(this, list, path, options);
    }
    util.inherits(color, FieldType);

    color.prototype.validateInput = TextType.prototype.validateInput;
    color.prototype.validateRequiredInput = TextType.prototype.validateRequiredInput;

    /* Inherit from TextType prototype */
    color.prototype.addFilterToQuery = TextType.prototype.addFilterToQuery;

    /* Export Field Type */
    module.exports = color;