Skip to content

Commit d57c33e

Browse files
committed
Version 2.0
1 parent b11d050 commit d57c33e

File tree

9 files changed

+1048
-492
lines changed

9 files changed

+1048
-492
lines changed

README.md

Lines changed: 197 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,25 @@
44
A demo application is available on apex.oracle.com<br/>
55
https://apex.oracle.com/pls/apex/f?p=111583
66

7-
## Changelog
7+
## Preview
8+
![](https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/Preview.gif)
9+
![](https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/Preview2.gif)
10+
11+
## Change log
12+
V 2.0.
13+
<ul>
14+
<li>Added "Shortcuts" URL based search</li>
15+
<li>Added help for "Shortcuts" (press F1 while focused on item).</li>
16+
<li>Added functions "" to manipulate with shortcuts.</li>
17+
<li>Added Style section in options so you can move style inside theme (optional).</li>
18+
<li>Options moved to JSON structure.</li>
19+
<li>Added Style section in options so you can move style inside theme (optional).</li>
20+
<li>Added documentation and help inside every option.</li>
21+
</ul>
822
V 1.4.
923
<ul>
10-
<li>Recrate Plugin for APEX 5.0</li>
11-
<li>Changed CSS for Font Awesome <br/>
24+
<li>Re-crated Plugin for APEX 5.0</li>
25+
<li>Changed CSS for Font Awesome <br/>
1226
If you use font apex define icon CCS "fa-search" for font awesome "fa-search font_awesome"</li>
1327
</ul>
1428
V 1.3.
@@ -18,63 +32,226 @@ V 1.3.
1832
V 1.2.
1933
<ul>
2034
<li>CSS added body action and not JS changing "display"</li>
21-
<li>On resize if tree is clapsed then close all opened sub lists</li>
35+
<li>On resize if tree is collapsed then close all opened sub lists</li>
2236
</ul>
23-
V 1.1.
37+
V 1.1.
2438
<ul>
2539
<li>Resolved Bug 25592396 Item Type plug-in uses render function name for Ajax call Apex 5.1.0</li>
26-
<li>Resolved problem on smartphones when windowresize navigation menu is closed.</li>
40+
<li>Resolved problem on smartphones when window resize navigation menu is closed.</li>
2741
<li>Added new attribute "Navigation menu open". </li>
2842
</ul>
2943

30-
## Preview
31-
![](https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/Preview.gif)
32-
3344
## Install
45+
46+
### New install
3447
<ol>
3548
<li>Import plug-in "item_type_plugin_si_abakus_searchnavigationmenu.sql" into your application.</li>
3649
<li>Add region on global page.
3750
(Region must be on page but you can hide it with style="display:none;" in "Custom Attributes")</li>
38-
<li>Add SearchNavigationMenu [Plug-in] item to the region.</li>
39-
<li>Decide behavior and style of the item (or leave default values).
51+
<li>Add SearchNavigationMenu [Plug-in] item to the region.
4052

41-
![ ](https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/Settings.png)
53+
![](https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/hide_region.png)
54+
</li>
55+
<li>Decide options and style of the item (or leave default values).
56+
57+
![](https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/Settings.menu.png)
4258
</li>
4359
<li>Save changes. Search Navigation Menu is now ready to use.</li>
4460
<li>Please leave same feedback. Thanks</li>
4561
</ol>
4662

63+
### Replace existing plug-in
64+
Because replacing, default options are inherited from privies version of plug-in.<br>
65+
Please, set new Options and Styles for item. You can use examples in help section.
66+
67+
4768

4869
## Functionality
4970

5071
### Implemented
5172
<ul>
5273
<li>Search is not case sensitive</li>
5374
<li>Search works on sub lists also</li>
54-
<li>Search adds color,background and weight(user choice) on first match in String</li>
55-
<li>Added functionality to navigation menu witout target</li>
75+
<li>Search adds style option color,background and weight(user choice) on first match in String</li>
76+
<li>Added functionality to navigation menu without target</li>
5677
<li>"Control+s" focus on search navigation</li>
5778
<li>"Enter" in search navigation redirect on selected link</li>
5879
<li>Keys up and down in search navigation move searched text link</li>
80+
<strong>New 2.0 version: </strong>
81+
<li>Added shortcuts</li>
82+
<li>While focused on search box (F1 key) opens search navigation help</li>
5983
</ul>
6084

85+
### Recomemded functions
86+
```javascript
87+
setSNMShortcuts(p_shortcuts_array); //Add new set of shortcuts
88+
appendSNMShortcut(p_shortcut_object); // Add one shortcut on shortcuts array
89+
openModalSNMHelp(); //open help same as pressing F1 key
90+
```
91+
6192
### Tested on (so far):
6293

6394
#### Browsers
6495
<ul>
65-
<li>FireFox 54.0.1</li>
96+
<li>FireFox 54.0.1, 56.0.2</li>
6697
<li>Crome 59.0.3071.115, 60.0.3112.90</li>
6798
<li>Microsoft Edge 38.14393.1066.0, 40.15063.0.0</li>
6899
</ul>
69100

70101
#### Apex Versions
71102
<ul>
72-
<li>Application Express 5.0.0</li>
73-
<li>Application Express 5.1.0</li>
74-
<li>Application Express 5.1.1</li>
75-
<li>Application Express 5.1.2</li>
103+
<li>Application Express 5.0</li>
104+
<li>Application Express 5.1</li>
76105
</ul>
77106

107+
## Documentation
108+
109+
### Option settings
110+
#### Main settings
111+
<pre>
112+
{"MenuOpen":false,
113+
"MenuClickOpenClose":true,
114+
"SaveSS":true,
115+
"ShortcutSaveSS":false,
116+
"ShrtCaseSensitive":true,
117+
"Shortcuts" : []
118+
}
119+
</pre>
120+
##### MenuOpen :
121+
Menu fully opened on load (not recommended)<br>
122+
##### MenuClickOpenClose :
123+
Default APEX behavior on navigation menu click is to open target page. Problem becomes when link don't have target. <br>
124+
In that case if you want to open sub-menu you need to click on "arrow down". <br>
125+
With this option enabled (set to "Yes") when user click on "no target" in navigation menu (title, icon or arrow) it opens sub-menu.
126+
##### SaveSS :
127+
SaveSS stands for Save Session State of item.<br>
128+
##### ShortcutSaveSS :
129+
ShortcutSaveSS stands for Save Session State of item when shortcut has occurred.<br>
130+
User usually need only to open quick setting with shortcut and than empty search field.
131+
##### ShrtCaseSensitive :
132+
Shortcut can be case sensitive. Be aware this is setting only for shortcut name and not searching value.
133+
134+
#### Shortcuts :
135+
For more information on shortcut settings you can use <a href="https://apex.oracle.com/pls/apex/f?p=111583:400" target="_blank">SNM Shortcut modeler</a>.
136+
##### Common settings
137+
<pre>
138+
{ "name": "emp",
139+
"action": "page",
140+
"page_id": 300,
141+
"newWindow": false,
142+
"clearCache": true,
143+
"clearCacheList": "300,301,RIR",
144+
"example": "emp"
145+
}</pre>
146+
###### name :
147+
Name of shortcut. This is used for search engine to find action.<br>
148+
If user need to add parameter for IR or ITEM type shortcut search it can be done like below example.
149+
<pre>person:Andrej</pre>
150+
This means find shortcut "person" if action is IR or ITEM add search parameter value "Andrej".
151+
URL od PAGE action type don't take parameters only shortcuts.
152+
###### page_id :
153+
Page id is setting on what page we need search or redirect. If this option is null, engine takes current page.
154+
###### newWindow :
155+
This option means if we need to open search result in new window than we set this option to "true".<br>
156+
By default this option in "false".
157+
###### clearCache and clearCacheList :
158+
Depending of clearCache setting we add clear cache in search URL.<br>
159+
If clearCache option in set to "true" we put in link clearCacheList. If clearCacheList don't exists than we put page_id into clearCache zone.
160+
###### example :
161+
Here we can put example for user to demonstrate purpose of shortcut.<br>
162+
User can see this example by pressing F1 key on search box.
163+
###### action :
164+
Depending on this setting engine decide what to do with shortcut. We have four basic actions types PAGE, IR, URL and ITEM.<br>
165+
Every type have his own properties and all of them have "Common settings".
166+
###### PAGE :
167+
<pre>
168+
{ "name": "emp",
169+
"action": "page",
170+
"page_id": 300,
171+
"newWindow": true,
172+
"clearCache": true,
173+
"clearCacheList": "RIR,300",
174+
"example":"emp"
175+
}</pre>
176+
Setting for PAGE actions are like common settings. We can define which page to redirect.<br>
177+
Options are clear cache, open in new window and example for user.
178+
###### IR :
179+
<pre>
180+
{ "name": "person",
181+
"action": "IR",
182+
"IR_static_id": "EMP",
183+
"IR_type": "column",
184+
"IR_column": "ENAME",
185+
"IR_value": "KING",
186+
"IR_operator": "C",
187+
"IR_clearCache": "RIR",
188+
"page_id": 300,
189+
"example": "person:andrej"
190+
}</pre>
191+
<b>IR_static_id</b> if you have more than one IR on page.<br>
192+
<b>IR_type</b> row or column (if empty default is row).<br>
193+
<b>IR_column</b> if column define column.<br>
194+
<b>IR_value</b> if we don't add parameter than this is default value or it can be used for shortcut.<br>
195+
<b>IR_operator</b> C, EQ..<br>
196+
<b>IR_clearCache</b> CIR or RIR.<br>
197+
More about IR Linking on : https://docs.oracle.com/database/apex-5.1/HTMDB/linking-to-interactive-reports.htm#HTMDB30108
198+
###### URL :
199+
<pre>
200+
{ "name": "google",
201+
"action": "url",
202+
"url": "http://google.com",
203+
"newWindow": true
204+
}</pre>
205+
###### ITEM :
206+
<pre>
207+
{
208+
"name": "EMPNO",
209+
"action": "item",
210+
"item_name": "P300_ACTIVE",
211+
"item_value": "Y",
212+
"page_id": 300,
213+
"clearCache": true
214+
}</pre>
215+
216+
### Style settings
217+
For more information on style settings you can use <a href="https://apex.oracle.com/pls/apex/f?p=111583:500" target="_blank">SNM Style modeler</a>.
218+
<pre>
219+
/*
220+
** STYLE Settings for search navigation menu and menu icons
221+
*/
222+
/* FIX If you use FONT awesome enable this .srch_nav span */
223+
/*
224+
.srch_nav span {
225+
top:2px;
226+
}
227+
*/
228+
/* FIX If you use FONT awesome disable this .t-TreeNav */
229+
.t-TreeNav .a-TreeView-node--topLevel ul .a-TreeView-content .fa {
230+
vertical-align: top;
231+
width: 32px; /* This can be decrease to have smaller spacing */
232+
height: 32px;
233+
line-height: 32px;
234+
text-align: center;
235+
transition: width .2s ease;
236+
}
237+
/* Search resault setting */
238+
.a-TreeView-label strong {
239+
font-weight:bold;
240+
color:black;
241+
background-color:#ffef9a;
242+
}
243+
/* Input field style setting */
244+
.srch_nav input {
245+
color:black;
246+
background-color:#f1f6fa;
247+
border-color:#ededed;
248+
}
249+
/* Input field on hover setting */
250+
.srch_nav input:focus {
251+
border-color:#ff7052;
252+
}
253+
</pre>
254+
78255
## About me
79256
Andrej Grlica<br/>
80257
Company [Abakus Plus d.o.o.](http://abakus.si/en/home)<br/>
@@ -84,4 +261,4 @@ Work email : [[email protected]](mailto:[email protected])<br/>
84261
Private email : [[email protected]](mailto:[email protected])<br/>
85262
Twitter : [@AndrejGrlica](https://twitter.com/AndrejGrlica)<br/>
86263
Linked-in : [Link](https://www.linkedin.com/in/andrej-grlica-303998a4/)<br/>
87-
Slack (#orclapex) PM:[@grlicaa](https://orclapex.slack.com/messages/@grlicaa/)
264+
Slack (#orclapex) PM:[@grlicaa](https://orclapex.slack.com/messages/@grlicaa/)

apexplugin.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name" : "Search Navigation Menu",
3-
"version" : "1.4",
3+
"version" : "2.0",
44
"description" : "Oracle Application Express item Plug-in for search on Navigation Menu.",
5-
"keywords" : ["search", "navigation", "menu", "list"],
5+
"keywords" : ["search", "navigation", "menu", "list", "shortcut", "shortcuts"],
66
"homepage" : "https://github.com/grlicaa/SearchNavigationMenu",
77
"license" : "MIT",
88
"author" : {
@@ -17,12 +17,12 @@
1717
"oracle" : {
1818
"versions" : ["12.2.0.1", "12.1.0.1", "11.2.0.1"],
1919
"apex" : {
20-
"versions" : ["5.0.0", "5.0.1", "5.0.2", "5.0.3", "5.0.4", "5.1.0", "5.1.1", "5.1.2"],
20+
"versions" : ["5.0.0", "5.0.1", "5.0.2", "5.0.3", "5.0.4", "5.1.0", "5.1.1", "5.1.2", "5.1.3"],
2121
"plugin" : {
2222
"internalName" : "si.abakus.searchnavigationmenu",
2323
"type" : "item",
2424
"demo" : "https://apex.oracle.com/pls/apex/f?p=111583",
25-
"previewImage" : "https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/Preview.gif"
25+
"previewImage" : "https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/Preview2.gif"
2626
}
2727
}
2828
}

docs/Preview2.gif

1.49 MB
Loading

docs/Settings.png

-20.8 KB
Binary file not shown.

docs/hide_region.png

3.23 KB
Loading

docs/menu.png

17.4 KB
Loading

docs/searchNavMenu.css

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
/*! searchNavMenu.css v1.4 | ABAKUS PLUS d.o.o. | Andrej Grlica | [email protected] */
1+
/*! searchNavMenu.css v2.0 | ABAKUS PLUS d.o.o. | Andrej Grlica | [email protected] */
22
/* ==========================================================================
3-
Date : 29.08.2017
43
-------------------------------------------------------------------------------
54
Description
65
Used for Searching Navigation Menu Style Sheet in Oracle Application Express
76
-------------------------------------------------------------------------------
87
*/
98

10-
119
.srch_nav {
1210
position:relative;
1311
width:95%;
1412
margin: 4px;
1513
}
16-
1714
.srch_icon {
1815
font-size: 20px;
1916
}
20-
2117
.srch_nav span {
2218
position: absolute;
2319
display: block;
@@ -37,13 +33,28 @@
3733
.srch_nav input:focus {
3834
outline: 0;
3935
}
40-
4136
body.js-navCollapsed div.srch_nav {
4237
display:none;
4338
}
44-
4539
body.js-navExpanded div.srch_nav {
4640
display:block;
4741
}
4842

49-
43+
/* HELP modal dialog */
44+
.srch_modal {
45+
position:fixed !important;
46+
}
47+
.srch_modal span.ui-dialog-title {
48+
font-size:20px !important;
49+
font-weight:bold !important;
50+
}
51+
.srch_modal table td.td_right {
52+
text-align:right;
53+
}
54+
.srch_modal table tr.tr_bg td {
55+
font-weight:bold;
56+
background-color:#e6e6e6;
57+
}
58+
.srch_modal table tr td {
59+
padding:2px;
60+
}

0 commit comments

Comments
 (0)