comindware.ui
Version:
Comindware Core UI provides the basic components like editors, lists, dropdowns, popups that we so desperately need while creating Marionette-based single-page applications.
41 lines (32 loc) • 819 B
JavaScript
/**
* Developer: Stepan Burguchev
* Date: 7/23/2014
* Copyright: 2009-2016 Comindware®
* All Rights Reserved
* Published under the MIT license
*/
;
import 'lib';
const HighlightableBehavior = function() {
};
_.extend(HighlightableBehavior.prototype, {
highlight(text) {
if (this.highlighted) {
return;
}
this.highlighted = true;
this.highlightedFragment = text;
this.trigger('highlighted', this, {
text
});
},
unhighlight() {
if (!this.highlighted) {
return;
}
this.highlighted = false;
this.highlightedFragment = undefined;
this.trigger('unhighlighted', this);
}
});
export default HighlightableBehavior;