| author | hamidouk |
| Tue, 08 Nov 2011 10:38:29 +0100 | |
| branch | popcorn-port |
| changeset 207 | 2bc276f0c1ae |
| parent 202 | 2e0205ee7ca9 |
| child 226 | d1f0e604bd06 |
| permissions | -rw-r--r-- |
| 109 | 1 |
IriSP.PlayerWidget = function(Popcorn, config, Serializer) { |
2 |
IriSP.Widget.call(this, Popcorn, config, Serializer); |
|
|
145
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
3 |
|
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
4 |
this._searchBlockOpen = false; |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
5 |
this._searchLastValue = ""; |
| 109 | 6 |
}; |
| 115 | 7 |
|
8 |
IriSP.PlayerWidget.prototype = new IriSP.Widget(); |
|
9 |
||
| 98 | 10 |
IriSP.PlayerWidget.prototype.draw = function() { |
| 153 | 11 |
var self = this; |
| 131 | 12 |
var width = this.width; |
13 |
var height = this.height; |
|
14 |
var heightS = this.height-20; |
|
|
145
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
15 |
|
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
16 |
var searchBox = Mustache.to_html(IriSP.search_template); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
17 |
this.selector.append(searchBox); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
18 |
|
| 131 | 19 |
if (this._config.mode=="radio") { |
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
20 |
var radioPlayer = Mustache.to_html(IriSP.radio_template, {"share_template" : IriSP.share_template}); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
21 |
this.selector.append(radioPlayer); |
| 98 | 22 |
|
23 |
// special tricks for IE 7 |
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
24 |
if (IriSP.jQuery.browser.msie == true && IriSP.jQuery.browser.version == "7.0"){ |
| 98 | 25 |
//__IriSP.jQuery("#LdtPlayer").attr("margin-top","50px"); |
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
26 |
this.selector.children("#Ldt-Root").css("padding-top","25px"); |
| 98 | 27 |
} |
| 131 | 28 |
} else if (this._config.mode == "video") { |
| 98 | 29 |
|
30 |
var videoPlayer = Mustache.to_html(IriSP.video_template, {"share_template" : IriSP.share_template, "heightS" : heightS}); |
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
31 |
this.selector.append(videoPlayer); |
| 98 | 32 |
} |
33 |
|
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
34 |
this.selector.children("#Ldt-Annotations").width(width - (75 * 2)); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
35 |
this.selector.children("#Ldt-Show-Arrow-container").width(width - (75 * 2)); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
36 |
this.selector.children("#Ldt-ShowAnnotation-audio").width(width - 10); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
37 |
this.selector.children("#Ldt-ShowAnnotation-video").width(width - 10); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
38 |
this.selector.children("#Ldt-SaKeyword").width(width - 10); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
39 |
this.selector.children("#Ldt-controler").width(width - 10); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
40 |
this.selector.children("#Ldt-Control").attr("z-index", "100"); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
41 |
this.selector.children("#Ldt-controler").hide(); |
| 98 | 42 |
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
43 |
this.selector.children("#Ldt-ShowAnnotation-audio").append(IriSP.annotation_loading_template); |
| 98 | 44 |
|
| 131 | 45 |
if(this._config.mode=='radio'){ |
46 |
this.selector.children("#Ldt-load-container").attr("width",this.width); |
|
| 98 | 47 |
} |
48 |
|
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
49 |
this.selector.children("#Ldt-controler").show(); |
| 98 | 50 |
//__IriSP.jQuery("#Ldt-Root").css('display','visible'); |
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
51 |
this.selector.children("#Ldt-ShowAnnotation").click( function () { |
| 98 | 52 |
//__IriSP.jQuery(this).slideUp(); |
53 |
} ); |
|
54 |
||
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
55 |
var LdtpPlayerY = this.selector.children("#Ldt-PlaceHolder").attr("top"); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
56 |
var LdtpPlayerX = this.selector.children("#Ldt-PlaceHolder").attr("left"); |
| 98 | 57 |
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
58 |
this.selector.find("#slider-range-min").slider( { //range: "min", |
| 98 | 59 |
value: 0, |
60 |
min: 1, |
|
61 |
max: this._serializer.currentMedia().meta["dc:duration"]/1000,//1:54:52.66 = 3600+3240+ |
|
62 |
step: 0.1, |
|
63 |
slide: function(event, ui) { |
|
| 153 | 64 |
self._Popcorn.currentTime(ui.value); |
| 98 | 65 |
}, |
66 |
/* change event is similar to slide, but it happens when the slider position is |
|
| 153 | 67 |
modified programatically. We use it for unit tests */ |
68 |
change: function(event, ui) { |
|
69 |
self._Popcorn.trigger("test.fixture", ui.value); |
|
| 98 | 70 |
} |
| 153 | 71 |
|
| 98 | 72 |
} ); |
73 |
|
|
|
202
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
74 |
// handle clicks by the user on the video. |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
75 |
this._Popcorn.listen("play", IriSP.wrap(this, this.playButtonUpdater)); |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
76 |
this._Popcorn.listen("pause", IriSP.wrap(this, this.playButtonUpdater)); |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
77 |
|
| 153 | 78 |
this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.sliderUpdater)); |
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
79 |
this.selector.children("#amount").val(this.selector.children("#slider-range-min").slider("value")+" s"); |
|
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
80 |
this.selector.children(".Ldt-Control1 button:first").button({ |
| 98 | 81 |
icons: { |
82 |
primary: 'ui-icon-play' |
|
83 |
}, |
|
84 |
text: false |
|
| 153 | 85 |
}).click(function() { self.playHandler.call(self); }) |
| 98 | 86 |
.next().button({ |
87 |
icons: { |
|
88 |
primary: 'ui-icon-seek-next' |
|
89 |
}, |
|
90 |
text: false |
|
91 |
}); |
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
92 |
this.selector.children(".Ldt-Control2 button:first").button({ |
| 98 | 93 |
icons: { |
94 |
primary: 'ui-icon-search'//, |
|
95 |
//secondary: 'ui-icon-volume-off' |
|
96 |
}, |
|
97 |
text: false |
|
| 153 | 98 |
}).click(function() { self.searchButtonHandler.call(self); }) |
|
145
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
99 |
.next().button({ |
| 98 | 100 |
icons: { |
101 |
primary: 'ui-icon-volume-on' |
|
102 |
}, |
|
103 |
text: false |
|
| 153 | 104 |
}).click(function() { self.muteHandler.call(self); } ); |
| 98 | 105 |
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
106 |
this.selector.children("#ldt-CtrlPlay").attr( "style", "background-color:#CD21C24;" ); |
| 98 | 107 |
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
108 |
this.selector.children("#Ldt-load-container").hide(); |
| 98 | 109 |
|
| 131 | 110 |
if( this._config.mode=="radio" & IriSP.jQuery.browser.msie != true ) { |
| 98 | 111 |
IriSP.jQuery( "#Ldtplayer1" ).attr( "height", "0" ); |
112 |
} |
|
113 |
||
| 153 | 114 |
|
| 98 | 115 |
}; |
116 |
||
|
202
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
117 |
/* update the icon of the button - separate function from playHandler |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
118 |
because in some cases (for instance, when the user directly clicks on |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
119 |
the jwplayer window) we have to change the icon without playing/pausing |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
120 |
*/ |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
121 |
IriSP.PlayerWidget.prototype.playButtonUpdater = function() { |
| 98 | 122 |
var status = this._Popcorn.media.paused; |
123 |
|
|
124 |
if ( status == true ){ |
|
|
163
3ecb643627de
some conversions to use this.selector.find instead of .children().
hamidouk
parents:
154
diff
changeset
|
125 |
this.selector.find(".ui-icon-play").css( "background-position", "-16px -160px" ); |
|
3ecb643627de
some conversions to use this.selector.find instead of .children().
hamidouk
parents:
154
diff
changeset
|
126 |
this.selector.find("#ldt-CtrlPlay").attr("title", "Play"); |
| 98 | 127 |
} else { |
|
163
3ecb643627de
some conversions to use this.selector.find instead of .children().
hamidouk
parents:
154
diff
changeset
|
128 |
this.selector.find(".ui-icon-play").css( "background-position","0px -160px" ); |
|
3ecb643627de
some conversions to use this.selector.find instead of .children().
hamidouk
parents:
154
diff
changeset
|
129 |
this.selector.find("#ldt-CtrlPlay").attr("title", "Pause"); |
| 98 | 130 |
} |
131 |
}; |
|
132 |
||
|
202
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
133 |
|
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
134 |
IriSP.PlayerWidget.prototype.playHandler = function() { |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
135 |
var status = this._Popcorn.media.paused; |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
136 |
|
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
137 |
this.playButtonUpdater(); |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
138 |
|
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
139 |
if ( status == true ){ |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
140 |
this._Popcorn.play(); |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
141 |
} else { |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
142 |
this._Popcorn.pause(); |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
143 |
} |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
144 |
}; |
|
2e0205ee7ca9
patch to respond to update the player widget when the user clicks directly on
hamidouk
parents:
163
diff
changeset
|
145 |
|
| 98 | 146 |
IriSP.PlayerWidget.prototype.muteHandler = function() { |
147 |
if (!this._Popcorn.muted()) { |
|
148 |
this._Popcorn.mute(true); |
|
|
163
3ecb643627de
some conversions to use this.selector.find instead of .children().
hamidouk
parents:
154
diff
changeset
|
149 |
this.selector.find(" .ui-icon-volume-on ").css("background-position", "-130px -160px"); |
| 98 | 150 |
} else { |
151 |
this._Popcorn.mute(false); |
|
|
163
3ecb643627de
some conversions to use this.selector.find instead of .children().
hamidouk
parents:
154
diff
changeset
|
152 |
this.selector.find( ".ui-icon-volume-on" ).css("background-position", "-144px -160px" ); |
| 98 | 153 |
} |
154 |
}; |
|
155 |
||
|
145
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
156 |
/* updates the slider as time passes */ |
| 98 | 157 |
IriSP.PlayerWidget.prototype.sliderUpdater = function() { |
158 |
var currentPosition = this._Popcorn.currentTime(); |
|
|
121
607f481ef4c3
some refactoring to use this.selector instead of directly using jquery.
hamidouk
parents:
115
diff
changeset
|
159 |
this.selector.find( "#slider-range-min" ).slider( "value", currentPosition); |
| 98 | 160 |
}; |
161 |
||
|
145
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
162 |
IriSP.PlayerWidget.prototype.searchButtonHandler = function() { |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
163 |
var self = this; |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
164 |
|
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
165 |
/* show the search field if it is not shown */ |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
166 |
if ( this._searchBlockOpen == false ) { |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
167 |
this.selector.find( ".ui-icon-search" ).css( "background-position", "-144px -112px" ); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
168 |
|
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
169 |
this.selector.find("#LdtSearch").show(100); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
170 |
|
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
171 |
this.selector.find("#LdtSearchInput").css('background-color','#fff'); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
172 |
this.selector.find("#LdtSearchInput").focus(); |
|
151
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
173 |
this.selector.find("#LdtSearchInput").attr('value', this._searchLastValue); |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
174 |
this._Popcorn.trigger("IriSP.search", this._searchLastValue); // trigger the search to make it more natural. |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
175 |
|
|
145
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
176 |
this._searchBlockOpen = true; |
|
151
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
177 |
this.selector.find("#LdtSearchInput").bind('keyup', null, function() { self.searchHandler.call(self); } ); |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
178 |
|
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
179 |
// tell the world the field is open |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
180 |
this._Popcorn.trigger("IriSP.search.open"); |
|
145
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
181 |
|
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
182 |
} else { |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
183 |
this._searchLastValue = this.selector.find("#LdtSearchInput").attr('value'); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
184 |
this.selector.find("#LdtSearchInput").attr('value',''); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
185 |
this.selector.find(".ui-icon-search").css("background-position","-160px -112px"); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
186 |
this.selector.find("#LdtSearch").hide(100); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
187 |
|
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
188 |
// unbind the watcher event. |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
189 |
this.selector.find("#LdtSearchInput").unbind('keypress set'); |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
190 |
this._searchBlockOpen = false; |
|
151
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
191 |
|
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
192 |
this._Popcorn.trigger("IriSP.search.closed"); |
|
145
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
193 |
} |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
194 |
}; |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
195 |
|
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
196 |
/* this handler is called whenever the content of the search |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
197 |
field changes */ |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
198 |
IriSP.PlayerWidget.prototype.searchHandler = function() { |
|
b477c9430d36
tests and implementation of the search button for the player.
hamidouk
parents:
131
diff
changeset
|
199 |
this._searchLastValue = this.selector.find("#LdtSearchInput").attr('value'); |
|
154
6e115a094858
another tweak to the searchBox : the visualization is cleared when the searchbox
hamidouk
parents:
153
diff
changeset
|
200 |
|
|
6e115a094858
another tweak to the searchBox : the visualization is cleared when the searchbox
hamidouk
parents:
153
diff
changeset
|
201 |
// do nothing if the search field is empty, instead of highlighting everything. |
|
6e115a094858
another tweak to the searchBox : the visualization is cleared when the searchbox
hamidouk
parents:
153
diff
changeset
|
202 |
if (this._searchLastValue == "") { |
|
6e115a094858
another tweak to the searchBox : the visualization is cleared when the searchbox
hamidouk
parents:
153
diff
changeset
|
203 |
this._Popcorn.trigger("IriSP.search.cleared"); |
|
6e115a094858
another tweak to the searchBox : the visualization is cleared when the searchbox
hamidouk
parents:
153
diff
changeset
|
204 |
} else { |
|
6e115a094858
another tweak to the searchBox : the visualization is cleared when the searchbox
hamidouk
parents:
153
diff
changeset
|
205 |
this._Popcorn.trigger("IriSP.search", this._searchLastValue); |
|
6e115a094858
another tweak to the searchBox : the visualization is cleared when the searchbox
hamidouk
parents:
153
diff
changeset
|
206 |
} |
|
151
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
207 |
}; |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
208 |
|
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
209 |
/* |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
210 |
handler for the IriSP.search.found message, which is sent by some views when they |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
211 |
highlight a match. |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
212 |
*/ |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
213 |
IriSP.PlayerWidget.prototype.searchMatch = function() { |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
214 |
this.selector.find("#LdtSearchInput").css('background-color','#e1ffe1'); |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
215 |
} |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
216 |
|
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
217 |
/* the same, except that no value could be found */ |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
218 |
IriSP.PlayerWidget.prototype.searchNoMatch = function() { |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
219 |
this.selector.find("#LdtSearchInput").css('background-color','#e1ffe1'); |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
220 |
} |
|
dc2ff4c87490
some tweaking to make the search function more user-friendly.
hamidouk
parents:
145
diff
changeset
|
221 |