node-red-contrib-mobius-flow-base 2.5.86-beta.61 → 2.5.86-beta.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,24 +5,27 @@ initMobsearch = {
|
|
|
5
5
|
toIns: (mobiusSrvc, opts) => {
|
|
6
6
|
getMobsearch(mobiusSrvc, false, false, opts);
|
|
7
7
|
},
|
|
8
|
-
|
|
8
|
+
toRid_listed: (mobiusSrvc, opts) => {
|
|
9
9
|
getMobsearch(mobiusSrvc, true, true, opts);
|
|
10
10
|
},
|
|
11
|
-
|
|
11
|
+
toIns_listed: (mobiusSrvc, opts) => {
|
|
12
12
|
getMobsearch(mobiusSrvc, false, true, opts);
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
// RID ONLY
|
|
17
|
+
// opts.htmlElementId
|
|
17
18
|
// opts.uriFieldName
|
|
18
19
|
// opts.selectionIndex
|
|
19
20
|
// opts.containerRowName
|
|
20
21
|
// opts.containerName
|
|
21
22
|
// opts.containerSecondFieldName
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
if (selectionIndex === undefined) {
|
|
25
|
+
let selectionIndex = 0;
|
|
26
|
+
}
|
|
24
27
|
|
|
25
|
-
function
|
|
28
|
+
function addMobsearchListButton(field, i) {
|
|
26
29
|
field.click(function () {
|
|
27
30
|
selectionIndex = i;
|
|
28
31
|
$('#node-input-resources-container-row').hide();
|
|
@@ -62,7 +65,7 @@ function getMobsearch(mobiusSrvc, useRid, listed, opts) {
|
|
|
62
65
|
let alertMsg = useRid === true ? `and/or RID ` : ``;
|
|
63
66
|
|
|
64
67
|
//Add new html
|
|
65
|
-
document.getElementById(
|
|
68
|
+
document.getElementById(opts.htmlElementId).innerHTML += `
|
|
66
69
|
<div id="instance-search-row">
|
|
67
70
|
<div class="form-row">
|
|
68
71
|
<label for="instance-search-sid"><i class="fa fa-tasks"></i> URI</label>
|
|
@@ -123,7 +123,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
123
123
|
if (!node.resources[i]) {
|
|
124
124
|
node.resources[i] = {uri: '', comment: ''}
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
addMobsearchListButton(searchField, i)
|
|
127
127
|
// *** END MOBSEARCH *** //
|
|
128
128
|
},
|
|
129
129
|
resizeItem: resizeResource
|
|
@@ -137,12 +137,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
137
137
|
// *** MOBSEARCH *** //
|
|
138
138
|
|
|
139
139
|
opts = {
|
|
140
|
+
htmlElementId: 'mobsearch',
|
|
140
141
|
list: node.resources,
|
|
141
142
|
containerRowName: 'node-input-resources-container-row',
|
|
142
143
|
containerName: 'node-input-resources-container',
|
|
143
144
|
containerSecondFieldName: 'node-input-resources-comment',
|
|
144
145
|
};
|
|
145
|
-
initMobsearch.
|
|
146
|
+
initMobsearch.toRid_listed(mobiusSrvc, opts);
|
|
146
147
|
|
|
147
148
|
// *** END MOBSEARCH *** //
|
|
148
149
|
|