Skip to content

Commit

Permalink
Merge pull request #387 from TheOriginalJosh/removing-rl-generic-cona…
Browse files Browse the repository at this point in the history
…iner

Removing rl generic container
  • Loading branch information
jbeck8176 authored Feb 2, 2017
2 parents 80f3016 + f0baa06 commit 33a8c86
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 25 deletions.
12 changes: 6 additions & 6 deletions source/components/cardContainer/card/card.ng1.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<rl-generic-container selector="__card.selectable">
<template when-selector="false" default>
<div ng-switch="__card.selectable">
<div ng-switch-when="false">
<div class="card" ng-class="{ 'selected': __card.item.viewData.selected }">
<div class="header" ng-click="__card.toggleContent()" ng-class="{ 'active': __card.hasBody || !__card.permanentFooter }">
<div class="row">
Expand All @@ -24,8 +24,8 @@
</div>
</div>
</div>
</template>
<template when-selector="true">
</div>
<div ng-switch-when="true">
<div class="select-group">
<div class="select-column">
<input type="checkbox" class="stand-alone-checkbox" ng-model="__card.item.viewData.selected" ng-change="__card.selectionChanged()"
Expand Down Expand Up @@ -59,5 +59,5 @@
</div>
</div>
</div>
</template>
</rl-generic-container>
</div>
</div>
4 changes: 3 additions & 1 deletion source/components/cardContainer/card/card.ng1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export class CardController {
if (this.cardAs) {
$scope[this.cardAs] = this.item;
}

if (!this.selectable) {
this.selectable = false;
}
$scope.collapse = this.autosave;
$scope.setSelected = this.setSelected.bind(this);
this.refresh = new Rx.Subject<void>();
Expand Down
12 changes: 6 additions & 6 deletions source/components/cardContainer/cardContainer.ng1.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
</div>
</div>

<rl-generic-container selector="cardContainer.selectableCards">
<template when-selector="false" default>
<div ng-switch="cardContainer.selectableCards">
<div ng-switch-when="false">
<div class="card-columns-header">
<div ng-repeat="column in cardContainer.columns">
<rl-column-header sort="cardContainer.sort(column)" sorting="column.sortDirection" column="column"></rl-column-header>
</div>
<div class="clearfix"></div>
</div>
</template>
<template when-selector="true">
</div>
<div ng-switch-when="true">
<div class="card-columns-header">
<div class="select-group">
<div class="select-column">
Expand All @@ -36,8 +36,8 @@
</div>
<div class="clearfix"></div>
</div>
</template>
</rl-generic-container>
</div>
</div>

<div class="alert alert-info" ng-show="cardContainer.dataSource.needsRefinedSearch">
Please refine your search results
Expand Down
3 changes: 3 additions & 0 deletions source/components/cardContainer/cardContainer.ng1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ export class CardContainerController {
if (this.builder != null) {
this.builder.setCardContainerProperties(<any>this);
}
if (!this.selectableCards) {
this.selectableCards = false;
}

this.makeCard = $transclude;
this.permanentFooters = _.isUndefined(this.permanentFooters) ? false : this.permanentFooters;
Expand Down
12 changes: 6 additions & 6 deletions source/components/inputs/spinner/spinner.ng1.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<rl-generic-container selector="spinner.ngDisabled" class="spinner-container">
<template default>
<div ng-switch="spinner.ngDisabled" class="spinner-container">
<div ng-switch-when="false">
<div class="field" ng-class="{ 'error': spinner.ngModel.$invalid, 'warning': spinner.warning }">
<label class="label-slide angular-animate" ng-show="spinner.ngModel.$viewValue | isEmpty:false && spinner.label">{{spinner.label}}</label>
<input name="{{::spinner.name}}" class="spinner" id="{{::spinner.spinnerId}}" type="text" placeholder="{{spinner.label}}"/>
<span class="error-string" ng-if="spinner.inputValidator.error | isEmpty:false">{{spinner.inputValidator.error}}</span>
</div>
</template>
<template when-selector="true">
</div>
<div ng-switch-when="true">
<div class="input-group field">
<label class="label-slide angular-animate" ng-show="spinner.ngModel.$viewValue | isEmpty:false && spinner.label">{{spinner.label}}</label>
<span class="input-group-addon" ng-if="::spinner.prefix != null">{{::spinner.prefix}}</span>
<input class="form-control" disabled="true" type="text" ng-model="spinner.ngModel.$viewValue" placeholder="{{spinner.label}}" />
<span class="input-group-addon" ng-if="::spinner.postfix != null">{{::spinner.postfix}}</span>
</div>
</template>
</rl-generic-container>
</div>
<div>
12 changes: 6 additions & 6 deletions source/components/inputs/typeaheadList/typeaheadList.ng1.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<rl-generic-container selector="list.disableSearching">
<template when-selector="true">
<div ng-switch="list.disableSearching">
<div ng-switch-when="true">
<rl-select ng-if="list.cachedItems | isEmpty:false" ng-model="list.model" select="list.addItem(item)" transform="list.transform"
options="list.cachedItems" label="{{list.label}}" ng-disabled="list.ngDisabled"></rl-select>
</template>
<template default>
</div>
<div ng-switch-default>
<rl-typeahead ng-model="list.model" select="list.addItem(value)" allow-collapse="false"
transform="list.transform" get-items="list.searchItems(search)" label="{{list.label}}"
prefix="{{list.prefix}}" ng-disabled="list.ngDisabled"></rl-typeahead>
</template>
</rl-generic-container>
</div>
</div>
<div class="table-container">
<div class="row table-header" ng-show="list.ngModel.$viewValue | isEmpty:false">
<div ng-transclude="headerSlot">
Expand Down

0 comments on commit 33a8c86

Please sign in to comment.