PageSourceSearch

https://dom-eda.com/engine/lib/internal/template/js/usernote.js

js dom-eda.com collected 2026-10-02 17:47:53 UTC 1,666 bytes, 70 lines download raw bytes

1var ls = ls || {};
2
3ls.usernote =( function ($) {
4
5	this.sText='';
6
7	this.showForm = function(sText) {
8		$('#usernote-button-add').hide();
9		$('#usernote-note').hide();
10		$('#usernote-form').show();
11		if (this.sText) {
12			$('#usernote-form-text').html(this.sText);
13		} else {
14			$('#usernote-form-text').val('');
15		}
16		$('#usernote-form-text').focus();
17		return false;
18	};
19
20	this.hideForm = function() {
21		$('#usernote-form').hide();
22		if (this.sText) {
23			this.showNote();
24		} else {
25			$('#usernote-button-add').show();
26		}
27		return false;
28	};
29
30	this.save = function(iUserId) {
31		var url = aRouter['profile']+'ajax-note-save/';
32		var params = {iUserId: iUserId, text: $('#usernote-form-text').val()};
33		ls.hook.marker('saveBefore');
34		ls.ajax(url, params, function(result) {
35			if (result.bStateError) {
36				ls.msg.error(null, result.sMsg);
37			} else {
38				this.sText=result.sText;
39				this.showNote();
40				ls.hook.run('ls_usernote_save_after',[params, result]);
41			}
42		}.bind(this));
43		return false;
44	};
45
46	this.showNote = function() {
47		$('#usernote-form').hide();
48		$('#usernote-note').show();
49		$('#usernote-note-text').html(this.sText);
50	};
51
52	this.remove = function(iUserId) {
53		var url = aRouter['profile']+'ajax-note-remove/';
54		var params = {iUserId: iUserId};
55		ls.hook.marker('removeBefore');
56		ls.ajax(url, params, function(result) {
57			if (result.bStateError) {
58				ls.msg.error(null, result.sMsg);
59			} else {
60				$('#usernote-note').hide();
61				$('#usernote-button-add').show();
62				this.sText='';
63				ls.hook.run('ls_usernote_remove_after',[params, result]);
64			}
65		}.bind(this));
66		return false;
67	};
68
69	return this;
70}).call(ls.usernote || {},jQuery);

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.