[Search] Renaming search and searchbar

Changed what was previously just 'search' and
renamed to 'search view'. Then, took what was
previously 'searchbar' and renamed to
'search'.
This commit is contained in:
shale 2015-07-22 15:43:28 -07:00
parent 1dbe039be8
commit b16af5fe3e
10 changed files with 71 additions and 71 deletions

View File

@ -28,8 +28,8 @@
> >
<mct-representation key="'create-button'" mct-object="navigatedObject"> <mct-representation key="'create-button'" mct-object="navigatedObject">
</mct-representation> </mct-representation>
<div> <div class='search-holder'>
<mct-include key="'searchbar'" <mct-include key="'search'"
mct-object="domainObject"> mct-object="domainObject">
</mct-include> </mct-include>
</div> </div>

View File

@ -272,25 +272,25 @@ ul.tree {
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/* line 27, ../sass/search/_search.scss */ /* line 27, ../sass/search/_search.scss */
.search-holder .searchbar { .search .searchbar {
width: 100%; width: 100%;
margin-top: 20px; } margin-top: 20px; }
/* line 32, ../sass/search/_search.scss */ /* line 32, ../sass/search/_search.scss */
.search-holder .results { .search .results {
margin-top: 10px; } margin-top: 10px; }
/* line 35, ../sass/search/_search.scss */ /* line 35, ../sass/search/_search.scss */
.search-holder .results .search-result-item { .search .results .search-result-item {
margin-bottom: 5px; margin-bottom: 5px;
background: #005177; background: #005177;
border-radius: 2px; border-radius: 2px;
padding-top: 2px; padding-top: 2px;
padding-bottom: 1px; } padding-bottom: 1px; }
/* line 42, ../sass/search/_search.scss */ /* line 42, ../sass/search/_search.scss */
.search-holder .results .search-result-item .label { .search .results .search-result-item .label {
left: 15px; left: 15px;
margin-left: 6px; } margin-left: 6px; }
/* line 51, ../sass/search/_search.scss */ /* line 51, ../sass/search/_search.scss */
.search-holder .results .search-result-item .label .title-label { .search .results .search-result-item .label .title-label {
display: inline-block; display: inline-block;
position: absolute; position: absolute;
width: auto; width: auto;
@ -302,7 +302,7 @@ ul.tree {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; } white-space: nowrap; }
/* line 70, ../sass/search/_search.scss */ /* line 70, ../sass/search/_search.scss */
.search-holder .load-more-button { .search .load-more-button {
margin-top: 5px; margin-top: 5px;
position: relative; position: relative;
left: 25%; left: 25%;

View File

@ -20,7 +20,7 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
.search-holder { .search {
$iconWidth: 20px; $iconWidth: 20px;
$leftMargin: 6px; $leftMargin: 6px;

View File

@ -4,13 +4,13 @@
"extensions": { "extensions": {
"controllers": [ "controllers": [
{ {
"key": "SearchbarController", "key": "SearchController",
"implementation": "controllers/SearchbarController.js", "implementation": "controllers/SearchController.js",
"depends": [ "$scope", "$timeout", "searchService" ] "depends": [ "$scope", "$timeout", "searchService" ]
}, },
{ {
"key": "SearchbarItemController", "key": "SearchItemController",
"implementation": "controllers/SearchbarItemController.js", "implementation": "controllers/SearchItemController.js",
"depends": [ "$scope" ] "depends": [ "$scope" ]
}, },
{ {
@ -21,15 +21,15 @@
], ],
"templates": [ "templates": [
{ {
"key": "searchbar", "key": "search",
"templateUrl": "templates/searchbar.html", "templateUrl": "templates/search.html",
"uses": [ "composition" ] "uses": [ "composition" ]
} }
], ],
"representations": [ "representations": [
{ {
"key": "searchbar-item", "key": "search-item",
"templateUrl": "templates/searchbar-item.html", "templateUrl": "templates/search-item.html",
"uses": [ "composition" ] "uses": [ "composition" ]
} }
], ],

View File

@ -22,7 +22,7 @@
<span ng-controller="ToggleController as toggle"> <span ng-controller="ToggleController as toggle">
<div class="search-result-item" <div class="search-result-item"
ng-controller="SearchbarItemController as controller"> ng-controller="SearchItemController as controller">
<mct-representation <mct-representation
key="'label'" key="'label'"
mct-object="domainObject" mct-object="domainObject"

View File

@ -19,30 +19,39 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<span class="search-holder"
ng-controller="SearchbarController as controller"> <div class="items-holder grid abs"
<!-- Search bar input --> ng-controller="SearchViewController as controller">
<!-- Search bar -->
<div> <div>
<input class="searchbar" <div style="height: 30px">Search:</div>
id="searchbarinput" <input type="text"
type="text" id="searchinput"
value="" value=""
ng-keyup="controller.search('searchbarinput')" /> ng-keyup="controller.search('searchinput')"
style="width: 66%"/>
</div> </div>
<!-- some spacing -->
<div style="height: 30px"></div>
<!-- Results list --> <!-- Results list -->
<div class="results"> <div ng-if="controller.areResults()"
<mct-representation key="'searchbar-item'" style="height: 60px">
ng-repeat="result in results" <p>
mct-object="result.object"> Results:
</p>
<div ng-if="controller.areMore()">
<button ng-click="controller.loadMore()">
Load more
</button>
</div>
</div>
<div>
<mct-representation key="'grid-item'"
ng-repeat="result in results"
mct-object="result.object">
</mct-representation> </mct-representation>
</div> </div>
</div>
<!-- Load more? -->
<div ng-if="controller.areMore()">
<button class="load-more-button btn very-subtle"
ng-click="controller.loadMore()">
Load more
</button>
</div>
</span>

View File

@ -19,39 +19,30 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<span class="search"
<div class="items-holder grid abs" ng-controller="SearchController as controller">
ng-controller="SearchController as controller"> <!-- Search bar input -->
<!-- Search bar -->
<div> <div>
<div style="height: 30px">Search:</div> <input class="searchbar"
<input type="text" id="searchbarinput"
id="searchinput" type="text"
value="" value=""
ng-keyup="controller.search('searchinput')" ng-keyup="controller.search('searchbarinput')" />
style="width: 66%"/>
</div> </div>
<!-- some spacing -->
<div style="height: 30px"></div>
<!-- Results list --> <!-- Results list -->
<div ng-if="controller.areResults()" <div class="results">
style="height: 60px"> <mct-representation key="'search-item'"
<p> ng-repeat="result in results"
Results: mct-object="result.object">
</p>
<div ng-if="controller.areMore()">
<button ng-click="controller.loadMore()">
Load more
</button>
</div>
</div>
<div>
<mct-representation key="'grid-item'"
ng-repeat="result in results"
mct-object="result.object">
</mct-representation> </mct-representation>
</div> </div>
</div>
<!-- Load more? -->
<div ng-if="controller.areMore()">
<button class="load-more-button btn very-subtle"
ng-click="controller.loadMore()">
Load more
</button>
</div>
</span>

View File

@ -22,7 +22,7 @@
/*global define*/ /*global define*/
/** /**
* Module defining SearchController. Created by shale on 07/08/2015. * Module defining SearchController. Created by shale on 07/15/2015.
*/ */
define(function () { define(function () {
"use strict"; "use strict";

View File

@ -22,7 +22,7 @@
/*global define*/ /*global define*/
/** /**
* Module defining SearchbarController. Created by shale on 07/15/2015. * Module defining SearchViewController. Created by shale on 07/08/2015.
*/ */
define(function () { define(function () {
"use strict"; "use strict";
@ -30,7 +30,7 @@ define(function () {
var INITIAL_LOAD_NUMBER = 20, var INITIAL_LOAD_NUMBER = 20,
LOAD_INCREMENT = 5; LOAD_INCREMENT = 5;
function SearchbarController($scope, $timeout, searchService) { function SearchViewController($scope, $timeout, searchService) {
// Starting amount of results to load. Will get increased. // Starting amount of results to load. Will get increased.
var numResults = INITIAL_LOAD_NUMBER; var numResults = INITIAL_LOAD_NUMBER;
@ -105,5 +105,5 @@ define(function () {
} }
}; };
} }
return SearchbarController; return SearchViewController;
}); });