Skip to content

Commit 649fdb0

Browse files
author
Daniel Hochleitner
committed
Fixed search history issue to recognize stored searches even after new APEX session
1 parent 3028d3d commit 649fdb0

9 files changed

+1152
-1159
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ https://apex.oracle.com/pls/apex/f?p=APEXPLUGIN
184184

185185
## Changelog
186186

187+
#### 1.6.1 - Fixed search history issue to recognize stored searches even after new APEX session
188+
187189
#### 1.6.0 - Added search history feature to show a popover (on mouse hover of main search icon) which contains the last 20 search terms a user entered
188190

189191
#### 1.5.2 - Improved handling of multiple usage of plugin on the same page

apexplugin.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "APEX Spotlight Search",
3-
"version": "1.6.0",
3+
"version": "1.6.1",
44
"description": "APEX Spotlight Search is a powerful search feature (like on MacOS) to search. It provides quick navigation and unified search experience across an APEX application.",
55
"keywords": [
66
"oracle",

dist/dynamic_action_plugin_de_danielh_apexspotlight.sql

+569-572
Large diffs are not rendered by default.

src/apex/de_danielh_apexspotlight.sql

+570-573
Large diffs are not rendered by default.

src/db/apexspotlight_plg_pkg.pkb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-------------------------------------
22
* APEX Spotlight Search
3-
* Version: 1.6.0
3+
* Version: 1.6.1
44
* Author: Daniel Hochleitner
55
*-------------------------------------
66
*/

src/db/apexspotlight_plg_pkg.pks

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*-------------------------------------
22
* APEX Spotlight Search
3-
* Version: 1.6.0
3+
* Version: 1.6.1
44
* Author: Daniel Hochleitner
55
*-------------------------------------
66
*/

src/files/css/apexspotlight.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* APEX Spotlight Search
33
* Author: Daniel Hochleitner
44
* Credits: APEX Dev Team: /i/apex_ui/css/core/Spotlight.css
5-
* Version: 1.6.0
5+
* Version: 1.6.1
66
*/
77
.apx-Spotlight {
88
display: flex;

src/files/js/apexspotlight.js

+6-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* APEX Spotlight Search
33
* Author: Daniel Hochleitner
44
* Credits: APEX Dev Team: /i/apex_ui/js/spotlight.js
5-
* Version: 1.6.0
5+
* Version: 1.6.1
66
*/
77

88
/**
@@ -227,7 +227,7 @@ apex.da.apexSpotlight = {
227227
return storageValue;
228228
},
229229
/**
230-
* Save search term in local storage of browser (apexSpotlight.<app_id>.<app_session>.<da-id>.history)
230+
* Save search term in local storage of browser (apexSpotlight.<app_id>.<da-id>.history)
231231
* @param {string} pSearchTerm
232232
*/
233233
setSpotlightHistoryLocalStorage: function(pSearchTerm) {
@@ -260,30 +260,28 @@ apex.da.apexSpotlight = {
260260
storageArray = removeOldValuesFromArray(storageArray);
261261

262262
if (hasLocalStorageSupport) {
263-
var apexSession = $v('pInstance');
264263
var localStorage = apex.storage.getScopedLocalStorage({
265264
prefix: 'apexSpotlight',
266265
useAppId: true
267266
});
268-
localStorage.setItem(apexSession + '.' + apexSpotlight.gDynamicActionId + '.history', JSON.stringify(storageArray));
267+
localStorage.setItem(apexSpotlight.gDynamicActionId + '.history', JSON.stringify(storageArray));
269268
}
270269
}
271270
},
272271
/**
273-
* Get saved search terms from local storage of browser (apexSpotlight.<app_id>.<app_session>.<da-id>.history)
272+
* Get saved search terms from local storage of browser (apexSpotlight.<app_id>.<da-id>.history)
274273
*/
275274
getSpotlightHistoryLocalStorage: function() {
276275
var hasLocalStorageSupport = apex.storage.hasLocalStorageSupport();
277276

278277
var storageValue;
279278
var storageArray = [];
280279
if (hasLocalStorageSupport) {
281-
var apexSession = $v('pInstance');
282280
var localStorage = apex.storage.getScopedLocalStorage({
283281
prefix: 'apexSpotlight',
284282
useAppId: true
285283
});
286-
storageValue = localStorage.getItem(apexSession + '.' + apexSpotlight.gDynamicActionId + '.history');
284+
storageValue = localStorage.getItem(apexSpotlight.gDynamicActionId + '.history');
287285
if (storageValue) {
288286
storageArray = JSON.parse(storageValue);
289287
}
@@ -297,12 +295,11 @@ apex.da.apexSpotlight = {
297295
var hasLocalStorageSupport = apex.storage.hasLocalStorageSupport();
298296

299297
if (hasLocalStorageSupport) {
300-
var apexSession = $v('pInstance');
301298
var localStorage = apex.storage.getScopedLocalStorage({
302299
prefix: 'apexSpotlight',
303300
useAppId: true
304301
});
305-
localStorage.removeItem(apexSession + '.' + apexSpotlight.gDynamicActionId + '.history');
302+
localStorage.removeItem(apexSpotlight.gDynamicActionId + '.history');
306303
}
307304
},
308305
/**

src/files/js/apexspotlight.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)