aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/bluemoon/textfield.reel/textfield.js
blob: eb8e482f95b9906cd54d0f9a1e46ae5f137fdc0f (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* <copyright>
 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
 (c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
 </copyright> */
/**
	@module "montage/ui/bluemoon/input-text.reel"
    @requires montage/core/core
    @requires montage/ui/editable-text
*/
var Montage = require("montage").Montage,
    EditableText = require("ui/editable-text").EditableText;
/**
    @class module:"montage/ui/bluemoon/input-text.reel".Textfield
    @extends module:montage/ui/editable-text.EditableText
*/
var Textfield = exports.Textfield = Montage.create(EditableText,/** @lends module:"montage/ui/bluemoon/input-text.reel".Textfield# */ {
/**
        Description TODO
        @type {Property}
        @default null
    */
    delegate: {
        enumerable: true,
        value: null
    },

    _placeholder: {
        value: null
    },

    placeholder: {
        get: function() {
            return this._placeholder;
        },
        set: function(value) {
            if(this._placeholder !== value) {
                this._placeholder = value;
                this.needsDraw = true;
            }
        }
    },
/**
  Description TODO
  @private
*/
    _drawSpecific: {
        enumerable: false,
        value: function() {
            this.element.classList.add('montage-textfield');

            this.element.placeholder = this._placeholder;
        }
    }
});