File tree 2 files changed +20
-5
lines changed
2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 6
6
7
7
google . load ( 'visualization' , '1' , { 'packages' :[ 'corechart' ] } ) ;
8
8
var type = "search" ;
9
- var typeStrings = {
10
- "search" : "twitter search query" ,
11
- "user" : "user's tweets"
12
- }
9
+ var types = {
10
+ "search" : {
11
+ "title" : "twitter search query" ,
12
+ "icon" : "url(images/search.png) no-repeat 5px 5px"
13
+ } ,
14
+ "user" : {
15
+ "title" : "user's tweets" ,
16
+ "icon" : "url(images/@.png) no-repeat 5px 5px"
17
+ }
18
+ } ;
19
+
20
+
13
21
14
22
//extract source
15
23
var resMap = function ( item ) {
@@ -52,7 +60,8 @@ var swapType = function() {
52
60
type = "search" ;
53
61
}
54
62
55
- $ ( '#type' ) . text ( typeStrings [ type ] ) ;
63
+ $ ( '#type' ) . text ( types [ type ] . title ) ;
64
+ $ ( '#term' ) . css ( "background" , types [ type ] . icon ) ;
56
65
} ;
57
66
58
67
var doSearch = function ( searchTerm ) {
Original file line number Diff line number Diff line change 48
48
# controls div {
49
49
margin-top : 1em ;
50
50
width : auto;
51
+ line-height : 28px ;
51
52
}
52
53
53
54
67
68
68
69
# controls # term {
69
70
width : 400px ;
71
+ border : 1px solid black;
72
+ height : 28px ;
73
+ background : url(../ images/search.png) no-repeat 5px 5px ;
74
+ padding-left : 25px ;
75
+
70
76
}
71
77
72
78
You can’t perform that action at this time.
0 commit comments