--- a/web/res/metadataplayer/Controller.js Fri Feb 13 13:14:15 2015 +0100
+++ b/web/res/metadataplayer/Controller.js Sun Feb 15 00:43:16 2015 +0100
@@ -10,7 +10,8 @@
IriSP.Widgets.Controller.prototype.defaults = {
disable_annotate_btn: false,
disable_search_btn: false,
- disable_ctrl_f: false
+ disable_ctrl_f: false,
+ always_show_search: false
};
IriSP.Widgets.Controller.prototype.template =
@@ -27,7 +28,7 @@
+ '<div class="Ldt-Ctrl-spacer"></div>'
+ '{{/disable_search_btn}}'
+ '<div class="Ldt-Ctrl-Search">'
- + '<input class="Ldt-Ctrl-SearchInput Ldt-TraceMe"></input>'
+ + '<input placeholder="{{ l10n.search }}" type="search" class="Ldt-Ctrl-SearchInput Ldt-TraceMe"></input>'
+ '</div>'
+ '</div>'
+ '<div class="Ldt-Ctrl-Right">'
@@ -102,6 +103,7 @@
this.$.find(".Ldt-Ctrl-SearchBtn").click(this.functionWrapper("searchButtonHandler"));
this.$searchInput.keyup(this.functionWrapper("searchHandler"));
+ this.$searchInput.on("search", this.functionWrapper("searchHandler"));
var _volctrl = this.$.find(".Ldt-Ctrl-Volume-Control");
this.$.find('.Ldt-Ctrl-Sound')
@@ -168,7 +170,9 @@
annotations.on("search-cleared", function() {
_this.hideSearchBlock();
});
-
+ if (_this.always_show_search) {
+ _this.showSearchBlock();
+ }
};
/* Update the elasped time div */
@@ -237,7 +241,9 @@
};
IriSP.Widgets.Controller.prototype.hideSearchBlock = function() {
- this.$searchBlock.animate( { width: 0 }, 200);
+ if (! this.always_show_search) {
+ this.$searchBlock.animate( { width: 0 }, 200);
+ }
};
/** react to clicks on the search button */