Skip to content

Commit 017d9e2

Browse files
authored
Merge pull request #6 from ScottishRoss/master
Added Parent/Child Function + Cleaned Up Docs
2 parents d57c33e + 28a2a09 commit 017d9e2

File tree

2 files changed

+182
-163
lines changed

2 files changed

+182
-163
lines changed

README.md

Lines changed: 114 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SearchNavigationMenu
1+
# SearchNavigationMenu (SNM)
22

33
## Demo
44
A demo application is available on apex.oracle.com<br/>
@@ -11,23 +11,22 @@ https://apex.oracle.com/pls/apex/f?p=111583
1111
## Change log
1212
V 2.0.
1313
<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>
14+
<li>Added "Shortcuts": URL based search</li>
15+
<li>Added help for "Shortcuts" (F1 whilst Search Box is active).</li>
16+
<li>Added functions to manipulate shortcuts.</li>
1817
<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>
18+
<li>Added Style section in Options (optional).</li>
19+
<li>Added further documentation</li>
2120
</ul>
2221
V 1.4.
2322
<ul>
24-
<li>Re-crated Plugin for APEX 5.0</li>
25-
<li>Changed CSS for Font Awesome <br/>
26-
If you use font apex define icon CCS "fa-search" for font awesome "fa-search font_awesome"</li>
23+
<li>Re-created Plugin for APEX 5.0</li>
24+
<li>Changed CSS to Font Awesome<br/>
25+
If you use Font APEX define icon CSS "fa-search" for Font Awesome "fa-search font_awesome"</li>
2726
</ul>
2827
V 1.3.
2928
<ul>
30-
<li>Added new function JS regarding to 'isExpanded("nav")' error for apex 5.1.1</li>
29+
<li>Added new function JS regarding 'isExpanded("nav")' error for apex 5.1.1</li>
3130
</ul>
3231
V 1.2.
3332
<ul>
@@ -47,137 +46,139 @@ V 1.1.
4746
<ol>
4847
<li>Import plug-in "item_type_plugin_si_abakus_searchnavigationmenu.sql" into your application.</li>
4948
<li>Add region on global page.
50-
(Region must be on page but you can hide it with style="display:none;" in "Custom Attributes")</li>
49+
(Region must be on page but you can hide it with style="display:none;" in "Custom Attributes")
50+
(Recommend to also set the condition of this region to not display on your Login Page</li>
5151
<li>Add SearchNavigationMenu [Plug-in] item to the region.
52-
5352
![](https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/hide_region.png)
5453
</li>
5554
<li>Decide options and style of the item (or leave default values).
56-
5755
![](https://raw.githubusercontent.com/grlicaa/SearchNavigationMenu/master/docs/Settings.menu.png)
5856
</li>
5957
<li>Save changes. Search Navigation Menu is now ready to use.</li>
60-
<li>Please leave same feedback. Thanks</li>
58+
<li>Please leave some feedback. Thanks!</li>
6159
</ol>
6260

6361
### 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.
62+
Because you are replacing the plug-in, the default options are inherited from the previous installation of the plug-in.<br>
63+
Please set new Options and Styles for the item. You can use examples in help section.
6664

6765

6866

6967
## Functionality
7068

7169
### Implemented
7270
<ul>
73-
<li>Search is not case sensitive</li>
74-
<li>Search works on sub lists also</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>
77-
<li>"Control+s" focus on search navigation</li>
78-
<li>"Enter" in search navigation redirect on selected link</li>
79-
<li>Keys up and down in search navigation move searched text link</li>
80-
<strong>New 2.0 version: </strong>
71+
<li>Search is not case sensitive.</li>
72+
<li>Search works on sub lists also.</li>
73+
<li>Search adds style option for color, background and weight(user choice) on first match in String.</li>
74+
<li>Added functionality to SNM without target.</li>
75+
<li>"CTRL+S" is the default keybind to focus on SNM.</li>
76+
<li>"Enter" in SNM redirects to selected navigation item.</li>
77+
<li>Keys UP and DOWN can be used during searching to select different nav items.</li>
78+
<strong>New in V2.0: </strong>
8179
<li>Added shortcuts</li>
82-
<li>While focused on search box (F1 key) opens search navigation help</li>
80+
<li>When focused on the Search Box, pressing F1 will open the help page.</li>
8381
</ul>
8482

85-
### Recomemded functions
83+
### Recommended Functions:
8684
```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
85+
setSNMShortcuts(p_shortcuts_array); // Add multiple new shortcuts to the array.
86+
appendSNMShortcut(p_shortcut_object); // Add one shortcut to the array.
87+
openModalSNMHelp(); // Open help menu, same as F1.
9088
```
9189

92-
### Tested on (so far):
90+
### Tested On (so far):
9391

9492
#### Browsers
9593
<ul>
9694
<li>FireFox 54.0.1, 56.0.2</li>
97-
<li>Crome 59.0.3071.115, 60.0.3112.90</li>
95+
<li>Chrome 59.0.3071.115, 60.0.3112.90</li>
9896
<li>Microsoft Edge 38.14393.1066.0, 40.15063.0.0</li>
9997
</ul>
10098

101-
#### Apex Versions
99+
#### Oracle APEX Versions
102100
<ul>
103101
<li>Application Express 5.0</li>
104102
<li>Application Express 5.1</li>
105103
</ul>
106104

107105
## Documentation
108106

109-
### Option settings
110-
#### Main settings
107+
### Option Settings
108+
#### Default Settings
111109
<pre>
112-
{"MenuOpen":false,
113-
"MenuClickOpenClose":true,
114-
"SaveSS":true,
115-
"ShortcutSaveSS":false,
116-
"ShrtCaseSensitive":true,
117-
"Shortcuts" : []
110+
{
111+
"menuOpen": false,
112+
"MmenuClickOpenClose": true,
113+
"saveSS": true,
114+
"shortcutSaveSS": false,
115+
"shortcutCaseSensitive": true,
116+
"shortcuts": []
118117
}
119118
</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.
119+
##### MenuOpen:
120+
MMenu fully expanded on-load (Not Recommended)<br>
121+
##### MenuClickOpenClose:
122+
Default APEX behavior on navigation menu click is to open target page. This is a problem when the item doesn't have a target.<br>
123+
In that case, if you want to open a sub-menu you need to click on the "arrow down". <br>
124+
With this option set to true, when a user clicks on a "no target" nav item (title, icon or arrow) it instead opens the sub-menu.
126125
##### SaveSS :
127-
SaveSS stands for Save Session State of item.<br>
126+
SaveSS stands for "Save Session State of item".<br>
128127
##### 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.
128+
ShortcutSaveSS stands for "Save Session State of item when using a Shortcut".<br>
129+
##### ShortcutCaseSensitive :
130+
Shortcut can be made case-sensitive. Caution: This will only affect the shortcut, not the search string.
133131

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
132+
#### Shortcuts:
133+
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 Modeller</a>.
134+
##### Default Settings
137135
<pre>
138-
{ "name": "emp",
136+
{
137+
"name": "emp",
139138
"action": "page",
140139
"page_id": 300,
141140
"newWindow": false,
142141
"clearCache": true,
143142
"clearCacheList": "300,301,RIR",
144143
"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.
144+
}
145+
</pre>
146+
###### Name:
147+
Name of shortcut. This is used for SNM to find the object.<br>
148+
This is useful if you want users to be able to search in specific items. See the example below:
149149
<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.
150+
This means: Find shortcut "person", if object is IR or ITEM add search parameter value "Andrej".
151+
URL of Page Objects don't take parameters, only shortcuts.
152+
###### Action :
153+
Depending on this setting engine decide what to do with shortcut. We have four basic actions types PAGE, IR, URL and ITEM.<br>
154+
Every type have his own properties and all of them have "Common settings".
152155
###### page_id :
153-
Page id is setting on what page we need search or redirect. If this option is null, engine takes current page.
156+
Page ID is the value for the page you want the shortcut to focus on. If this option is null, SNM will search the active page.
154157
###### 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".
158+
This will open the search results in a New Window if set to true. The default is set to "false".<br>
157159
###### 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 :
160+
This setting will include "ClearCache" into the search URL if set to true.<br>
161+
If clearCache option in set to "true" the link is added to the clearCacheList. If the clearCacheList doesn't exist then page_id is placed in the clearCache zone.
162+
###### Example :
163+
Here we can create an example for the Help Menu.<br>
164+
User can see this example by pressing F1 whilst Search Box is active.
165+
###### PAGE:
167166
<pre>
168-
{ "name": "emp",
167+
{
168+
"name": "emp",
169169
"action": "page",
170170
"page_id": 300,
171171
"newWindow": true,
172172
"clearCache": true,
173173
"clearCacheList": "RIR,300",
174174
"example":"emp"
175175
}</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 :
176+
Setting for Page Objects are like default settings. We can define which page to redirect to.<br>
177+
Options are: Clear cache, open in new window and example (Help Menu).
178+
###### IR:
179179
<pre>
180-
{ "name": "person",
180+
{
181+
"name": "person",
181182
"action": "IR",
182183
"IR_static_id": "EMP",
183184
"IR_type": "column",
@@ -188,16 +189,17 @@ Options are clear cache, open in new window and example for user.
188189
"page_id": 300,
189190
"example": "person:andrej"
190191
}</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
192+
<b>IR_static_id:</b> Static ID for IR, required if there are multiple IRs on the page.<br>
193+
<b>IR_type:</b> Row or Column (default is Row).<br>
194+
<b>IR_column:</b> Define the column name (or null)<br>
195+
<b>IR_value:</b> If this parameter isn't defined then this is the default value, or it can be used for the shortcut.<br>
196+
<b>IR_operator:</b> Operators: C, EQ, etc. See link below for more operators.<br>
197+
<b>IR_clearCache:</b> CIR or RIR.<br>
198+
For more information on IR Linking: https://docs.oracle.com/database/apex-5.1/HTMDB/linking-to-interactive-reports.htm#HTMDB30108
198199
###### URL :
199200
<pre>
200-
{ "name": "google",
201+
{
202+
"name": "google",
201203
"action": "url",
202204
"url": "http://google.com",
203205
"newWindow": true
@@ -214,51 +216,51 @@ More about IR Linking on : https://docs.oracle.com/database/apex-5.1/HTMDB/linki
214216
}</pre>
215217

216218
### 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>.
219+
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 Modeller</a>.
218220
<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 */
221+
/* ** Style Settings for SNM (including icons) */
222+
223+
/* FIX: If you use Font Awesome, enable to this fix Search Icon */
223224
/*
224225
.srch_nav span {
225-
top:2px;
226+
top: 2px;
226227
}
227228
*/
228-
/* FIX If you use FONT awesome disable this .t-TreeNav */
229+
/* FIX: If you use Font Awesome disable this .t-TreeNav */
230+
229231
.t-TreeNav .a-TreeView-node--topLevel ul .a-TreeView-content .fa {
230232
vertical-align: top;
231-
width: 32px; /* This can be decrease to have smaller spacing */
233+
width: 32px;
232234
height: 32px;
233235
line-height: 32px;
234236
text-align: center;
235237
transition: width .2s ease;
236238
}
237-
/* Search resault setting */
239+
240+
/* Search Result Style */
238241
.a-TreeView-label strong {
239-
font-weight:bold;
240-
color:black;
241-
background-color:#ffef9a;
242+
font-weight: bold;
243+
color: black;
244+
background-color: #ffef9a;
242245
}
243-
/* Input field style setting */
246+
/* Search Box Field Style */
244247
.srch_nav input {
245-
color:black;
246-
background-color:#f1f6fa;
247-
border-color:#ededed;
248+
color: black;
249+
background-color: #f1f6fa;
250+
border-color: #ededed;
248251
}
249-
/* Input field on hover setting */
252+
/* Search Box Margin when clicked */
250253
.srch_nav input:focus {
251-
border-color:#ff7052;
254+
border-color: #ff7052;
252255
}
253256
</pre>
254257

255258
## About me
256259
Andrej Grlica<br/>
257260
Company [Abakus Plus d.o.o.](http://abakus.si/en/home)<br/>
258-
I’m a oracle apex developer since 2008.<br/>
259-
When I’m not into code problem, you can find me on:<br/>
260-
Work email : [andrej.grlica@abakus.si](mailto:andrej.grlica@abakus.si)<br/>
261-
Private email : [andrej.grlica@gmail.com](mailto:andrej.grlica@gmail.com)<br/>
262-
Twitter : [@AndrejGrlica](https://twitter.com/AndrejGrlica)<br/>
263-
Linked-in : [Link](https://www.linkedin.com/in/andrej-grlica-303998a4/)<br/>
264-
Slack (#orclapex) PM:[@grlicaa](https://orclapex.slack.com/messages/@grlicaa/)
261+
I have been an Oracle APEX Developer since 2008<br/>
262+
When I'm not focusing on a code problem, you can find me on:<br/>
263+
Work Email : [andrej.grlica@abakus.si](mailto:andrej.grlica@abakus.si)<br/>
264+
Private Email : [andrej.grlica@gmail.com](mailto:andrej.grlica@gmail.com)<br/>
265+
LinkedIn: [Link](https://www.linkedin.com/in/andrej-grlica-303998a4/)<br/>
266+
Slack (#orclapex) PM:[@grlicaa](https://orclapex.slack.com/messages/@grlicaa/)

0 commit comments

Comments
 (0)