Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

It appears in the drawer. Either as a single item or with other items, such as [resources](https://github.com/adaptlearning/adapt-contrib-resources).

##Installation
## Installation

``adapt install search``

Expand All @@ -25,6 +25,8 @@ The attributes listed below are used in *course.json* to configure **Search**, a

**description** (string): Extension description, defaults to "Type in search words".

**_drawerOrder** (number): Determines the order in which this extension appears as a drawer item. Acceptable values are numbers.

**noResultsMessage**: Text displayed when no results are found, defaults to "Sorry, no results were found".

**awaitingResultsMessage**: Message between having enough characters to search and having search results (More than 2 characters per word). Defaults to "Formulating results...".
Expand Down Expand Up @@ -55,7 +57,7 @@ No known limitations.


----------------------------
**Version number:** 2.0 <a href="https://community.adaptlearning.org/" target="_blank"><img src="https://github.com/adaptlearning/documentation/blob/master/04_wiki_assets/plug-ins/images/adapt-logo-mrgn-lft.jpg" alt="adapt learning logo" align="right"></a>
**Version number:** 2.2.3 <a href="https://community.adaptlearning.org/" target="_blank"><img src="https://github.com/adaptlearning/documentation/blob/master/04_wiki_assets/plug-ins/images/adapt-logo-mrgn-lft.jpg" alt="adapt learning logo" align="right"></a>
**Framework versions:** 2.0
**Author / maintainer:** Kineo and community with [contributors](https://github.com/cgkineo/adapt-search/graphs/contributors)
**Accessibility support:** WAI AA
Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "adapt-search",
"repository": "git://github.com/cgkineo/adapt-search",
"framework": "^2.0.0",
"version": "2.1.0",
"framework": ">=2.2",
"version": "2.3.1",
"homepage": "https://github.com/cgkineo/adapt-search",
"issues": "https://github.com/cgkineo/adapt-search/issues/",
"displayName": "Search",
Expand All @@ -15,4 +15,4 @@
],
"license": "GPLv3",
"targetAttribute": "_search"
}
}
8 changes: 8 additions & 0 deletions example.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// in course.json
"_search": {
"_isEnabled": true,
"_drawerOrder": 0,
"title": "",
"description": "Type in search words and enter",
"noResultsMessage": "Sorry, no results were found",
Expand Down Expand Up @@ -98,6 +99,13 @@
"that","the","to","was","were","will","wish","",
],

"_matchOn": {
"_contentWordBeginsPhraseWord": false,
"_contentWordContainsPhraseWord": false,
"_contentWordEqualsPhraseWord": true ,
"_phraseWordBeginsContentWord": true
},

"_scoreQualificationThreshold": 20,
"_minimumWordLength": 2,
"_frequencyImportance": 5
Expand Down
3 changes: 2 additions & 1 deletion js/adapt-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ define([
var drawerObject = {
title: searchConfig.title,
description: searchConfig.description,
className: 'search-drawer'
className: 'search-drawer',
drawerOrder: searchConfig._drawerOrder || 0
};

Adapt.drawer.addItem(drawerObject, 'resources:showSearch');
Expand Down
Loading