PageSourceSearch

https://www.harrywinston.com/-/media/base-themes/hw-search-theme/s…=-1&hash=2074B8854C7B3085FB45D33F6DA1E503

js harrywinston.com collected 2026-10-02 06:21:47 UTC 1,939 bytes, 73 lines download raw bytes

1/**
2 * Provides methods for translate and update signature
3 * @module searchBaseView
4 * @param  {jQuery} $ Instance of jQuery
5 * @param  {Document} document dom document object
6 * @return {baseView} list of Api methods for work with signature
7*/
8XA.component.search.baseView = (function ($, document) {
9	/**
10	* @name module:searchBaseView.baseViewModel
11	* @constructor
12	* @augments Backbone.Model
13	*/
14	return Backbone.View.extend(
15		/** @lends module:searchBaseView.baseViewModel.prototype **/
16		{
17
18			initialize: function () {
19			},
20			/**
21			 * 
22			 * @param {*} rawSignature 
23			 * @param {*} f 
24			 */
25			translateSignatures: function (rawSignature, f) {
26				var signatures, i;
27
28				f = f.toLowerCase();
29
30				if (typeof rawSignature === "undefined" || rawSignature === null) {
31					return [f];
32				}
33
34				signatures = rawSignature.split(',');
35
36				if (rawSignature === "") {
37					return [f];
38				} else {
39					for (i = 0; i < signatures.length; i++) {
40						signatures[i] = signatures[i] + "_" + f;
41					}
42					return signatures;
43				}
44			},
45			/**
46			 * 
47			 * @param {*} sig 
48			 * @param {*} value 
49			 * @param {*} hash 
50			 */
51			updateSignaturesHash: function (sig, value, hash) {
52				for (var i = 0; i < sig.length; i++) {
53					hash[sig[i]] = value;
54				}
55				return hash;
56			},
57			/**
58			 * Manages whether the component should be visible, depending on data.
59			 * @param {DomElement} component Dom element that we want ho show\hide
60			 * @param {Object} data Object with facet data. Depending on data, component will be hidden or shown.
61			 */
62			manageVisibilityByData:function(component, data){
63				if (_.size(data)===0 || (typeof data.Values!== "undefined" && data.Values.length==0)){
64					$(component).hide();
65				}else{
66					$(component).show();
67				}
68			}
69		});
70
71}(jQuery, document));
72
73XA.register('searchBaseView', XA.component.search.baseView);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.