(element, options)
| 31 | return null; |
| 32 | }; |
| 33 | var Input = function(element, options) { |
| 34 | this.element = element; |
| 35 | this.options = options || { |
| 36 | actions: 'clear' |
| 37 | }; |
| 38 | if (~this.options.actions.indexOf('slider')) { //slider |
| 39 | this.sliderActionClass = CLASS_TOOLTIP + ' ' + CLASS_HIDDEN; |
| 40 | this.sliderActionSelector = SELECTOR_TOOLTIP; |
| 41 | } else { //clear,speech,search |
| 42 | if (~this.options.actions.indexOf('clear')) { |
| 43 | this.clearActionClass = CLASS_ICON + ' ' + CLASS_ICON_CLEAR + ' ' + CLASS_HIDDEN; |
| 44 | this.clearActionSelector = SELECTOR_ICON_CLOSE; |
| 45 | } |
| 46 | if (~this.options.actions.indexOf('speech')) { //only for 5+ |
| 47 | this.speechActionClass = CLASS_ICON + ' ' + CLASS_ICON_SPEECH; |
| 48 | this.speechActionSelector = SELECTOR_ICON_SPEECH; |
| 49 | } |
| 50 | if (~this.options.actions.indexOf('search')) { |
| 51 | this.searchActionClass = CLASS_PLACEHOLDER; |
| 52 | this.searchActionSelector = SELECTOR_PLACEHOLDER; |
| 53 | } |
| 54 | if (~this.options.actions.indexOf('password')) { |
| 55 | this.passwordActionClass = CLASS_ICON + ' ' + CLASS_ICON_PASSWORD; |
| 56 | this.passwordActionSelector = SELECTOR_ICON_PASSWORD; |
| 57 | } |
| 58 | } |
| 59 | this.init(); |
| 60 | }; |
| 61 | Input.prototype.init = function() { |
| 62 | this.initAction(); |
| 63 | this.initElementEvent(); |
nothing calls this directly
no outgoing calls
no test coverage detected