Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14217 anikendra 1
/*
2
 * typeahead.js
3
 * https://github.com/twitter/typeahead.js
4
 * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
5
 */
6
 
7
var css = (function() {
8
  'use strict';
9
 
10
  var css =  {
11
    wrapper: {
12
      position: 'relative',
13
      display: 'inline-block'
14
    },
15
    hint: {
16
      position: 'absolute',
17
      top: '0',
18
      left: '0',
19
      borderColor: 'transparent',
20
      boxShadow: 'none',
21
      // #741: fix hint opacity issue on iOS
22
      opacity: '1'
23
    },
24
    input: {
25
      position: 'relative',
26
      verticalAlign: 'top',
27
      backgroundColor: 'transparent'
28
    },
29
    inputWithNoHint: {
30
      position: 'relative',
31
      verticalAlign: 'top'
32
    },
33
    dropdown: {
34
      position: 'absolute',
35
      top: '100%',
36
      left: '0',
37
      zIndex: '100',
38
      display: 'none'
39
    },
40
    suggestions: {
41
      display: 'block'
42
    },
43
    suggestion: {
44
      whiteSpace: 'nowrap',
45
      cursor: 'pointer'
46
    },
47
    suggestionChild: {
48
      whiteSpace: 'normal'
49
    },
50
    ltr: {
51
      left: '0',
52
      right: 'auto'
53
    },
54
    rtl: {
55
      left: 'auto',
56
      right:' 0'
57
    }
58
  };
59
 
60
  // ie specific styling
61
  if (_.isMsie()) {
62
     // ie6-8 (and 9?) doesn't fire hover and click events for elements with
63
     // transparent backgrounds, for a workaround, use 1x1 transparent gif
64
    _.mixin(css.input, {
65
      backgroundImage: 'url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)'
66
    });
67
  }
68
 
69
  // ie7 and under specific styling
70
  if (_.isMsie() && _.isMsie() <= 7) {
71
    // if someone can tell me why this is necessary to align
72
    // the hint with the query in ie7, i'll send you $5 - @JakeHarding
73
    _.mixin(css.input, { marginTop: '-1px' });
74
  }
75
 
76
  return css;
77
})();