Loading public/javascript/redmic/modules/browser/Browser.js +0 −22 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ define([ , "redmic/modules/base/_Module" , "redmic/modules/base/_Show" , "redmic/modules/base/_Store" , "RWidgets/Utilities" , "put-selector/put" , "./_BrowserItfc" , "./_NoDataTemplate" Loading @@ -17,7 +16,6 @@ define([ , _Module , _Show , _Store , Utilities , put , _BrowserItfc , _NoDataTemplate Loading Loading @@ -85,8 +83,6 @@ define([ aspect.after(this, "_removeItem", lang.hitch(this, this._emitEvt, 'DATA_REMOVED')); aspect.after(this, "_clearData", lang.hitch(this, this._emitEvt, 'CLEARED')); aspect.after(this, "_updateTemplate", lang.hitch(this, this._emitEvt, 'TEMPLATE_UPDATED')); aspect.before(this, "_addItem", lang.hitch(this, this._addReplaceHighlightInItem)); }, _defineSubscriptions: function () { Loading Loading @@ -449,24 +445,6 @@ define([ } return true; }, _addReplaceHighlightInItem: function(item) { if (item && item._meta) { var highlight = item._meta.highlight; for (var content in highlight) { var value = '', attr = highlight[content]; for (var i = 0; i < attr.length; i++) { value += attr[i]; } Utilities.setDeepProp(item, content, value); } } } }); }); public/javascript/redmic/modules/browser/row/Row.js +30 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ define([ , "dojo/_base/lang" , "redmic/modules/base/_Module" , "redmic/modules/base/_Show" , "RWidgets/Utilities" , "put-selector/put" , "./_RowItfc" ], function( Loading @@ -10,6 +11,7 @@ define([ , lang , _Module , _Show , Utilities , put , _RowItfc ){ Loading Loading @@ -91,6 +93,8 @@ define([ put(this.templateNode, "[data-redmic-id=$]", this._getId(item)); this._replaceHighlightInItem(item); this.templateNode.innerHTML = this._insertTemplate(item); }, Loading Loading @@ -143,6 +147,32 @@ define([ _getNodeToShow: function() { return this.domNode; }, _replaceHighlightInItem: function(item) { if (item && item._meta) { var highlight = item._meta.highlight; for (var content in highlight) { var value = Utilities.getDeepProp(item, content), attr = highlight[content]; for (var i = 0; i < attr.length; i++) { var valueReplace = attr[i], cleanValueReplace = this._cleanValueHighlight(valueReplace); value = value.replace(cleanValueReplace, valueReplace); } Utilities.setDeepProp(item, content, value); } } }, _cleanValueHighlight: function(value) { return value.replace(/<b>/g, '').replace(/<\/b>/g, ''); } }); }); public/javascript/redmic/modules/search/FacetsImpl.js +2 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,8 @@ define([ obj = { size: terms.size || null, field: field, term: item term: item, minCount: 1 // TODO }; if (nested) { Loading templates @ f058d161 Compare 230079f1 to f058d161 Original line number Diff line number Diff line Subproject commit 230079f17f19e589a9f8642a93118a79fe078c0c Subproject commit f058d161b8c073f64f04dbbd568938ff351c4f15 stylesheets @ 0cdfa2a7 Compare 92531945 to 0cdfa2a7 Original line number Diff line number Diff line Subproject commit 925319457a5b34771dd68a5905b0490e2752bee4 Subproject commit 0cdfa2a76f2aeb51824952376b64d0137dfd8223 Loading
public/javascript/redmic/modules/browser/Browser.js +0 −22 Original line number Diff line number Diff line Loading @@ -5,7 +5,6 @@ define([ , "redmic/modules/base/_Module" , "redmic/modules/base/_Show" , "redmic/modules/base/_Store" , "RWidgets/Utilities" , "put-selector/put" , "./_BrowserItfc" , "./_NoDataTemplate" Loading @@ -17,7 +16,6 @@ define([ , _Module , _Show , _Store , Utilities , put , _BrowserItfc , _NoDataTemplate Loading Loading @@ -85,8 +83,6 @@ define([ aspect.after(this, "_removeItem", lang.hitch(this, this._emitEvt, 'DATA_REMOVED')); aspect.after(this, "_clearData", lang.hitch(this, this._emitEvt, 'CLEARED')); aspect.after(this, "_updateTemplate", lang.hitch(this, this._emitEvt, 'TEMPLATE_UPDATED')); aspect.before(this, "_addItem", lang.hitch(this, this._addReplaceHighlightInItem)); }, _defineSubscriptions: function () { Loading Loading @@ -449,24 +445,6 @@ define([ } return true; }, _addReplaceHighlightInItem: function(item) { if (item && item._meta) { var highlight = item._meta.highlight; for (var content in highlight) { var value = '', attr = highlight[content]; for (var i = 0; i < attr.length; i++) { value += attr[i]; } Utilities.setDeepProp(item, content, value); } } } }); });
public/javascript/redmic/modules/browser/row/Row.js +30 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ define([ , "dojo/_base/lang" , "redmic/modules/base/_Module" , "redmic/modules/base/_Show" , "RWidgets/Utilities" , "put-selector/put" , "./_RowItfc" ], function( Loading @@ -10,6 +11,7 @@ define([ , lang , _Module , _Show , Utilities , put , _RowItfc ){ Loading Loading @@ -91,6 +93,8 @@ define([ put(this.templateNode, "[data-redmic-id=$]", this._getId(item)); this._replaceHighlightInItem(item); this.templateNode.innerHTML = this._insertTemplate(item); }, Loading Loading @@ -143,6 +147,32 @@ define([ _getNodeToShow: function() { return this.domNode; }, _replaceHighlightInItem: function(item) { if (item && item._meta) { var highlight = item._meta.highlight; for (var content in highlight) { var value = Utilities.getDeepProp(item, content), attr = highlight[content]; for (var i = 0; i < attr.length; i++) { var valueReplace = attr[i], cleanValueReplace = this._cleanValueHighlight(valueReplace); value = value.replace(cleanValueReplace, valueReplace); } Utilities.setDeepProp(item, content, value); } } }, _cleanValueHighlight: function(value) { return value.replace(/<b>/g, '').replace(/<\/b>/g, ''); } }); });
public/javascript/redmic/modules/search/FacetsImpl.js +2 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,8 @@ define([ obj = { size: terms.size || null, field: field, term: item term: item, minCount: 1 // TODO }; if (nested) { Loading
templates @ f058d161 Compare 230079f1 to f058d161 Original line number Diff line number Diff line Subproject commit 230079f17f19e589a9f8642a93118a79fe078c0c Subproject commit f058d161b8c073f64f04dbbd568938ff351c4f15
stylesheets @ 0cdfa2a7 Compare 92531945 to 0cdfa2a7 Original line number Diff line number Diff line Subproject commit 925319457a5b34771dd68a5905b0490e2752bee4 Subproject commit 0cdfa2a76f2aeb51824952376b64d0137dfd8223