mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#486 display value widget support
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
<div *ngSwitchCase="'radio-buttons'">
|
||||
<radio-buttons-widget [field]="field"></radio-buttons-widget>
|
||||
</div>
|
||||
<div *ngSwitchCase="'readonly'">
|
||||
<display-value-widget [field]="field"></display-value-widget>
|
||||
</div>
|
||||
<div *ngSwitchDefault>
|
||||
<span>UNKNOWN WIDGET TYPE: {{field.type}}</span>
|
||||
</div>
|
||||
|
@@ -26,6 +26,7 @@ import { MultilineTextWidget } from './../multiline-text/multiline-text.widget';
|
||||
import { DropdownWidget } from './../dropdown/dropdown.widget';
|
||||
import { HyperlinkWidget } from './../hyperlink/hyperlink.widget';
|
||||
import { RadioButtonsWidget } from './../radio-buttons/radio-buttons.widget';
|
||||
import { DisplayValueWidget } from './../display-value/display-value.widget';
|
||||
|
||||
declare let __moduleName: string;
|
||||
declare var componentHandler;
|
||||
@@ -43,7 +44,8 @@ declare var componentHandler;
|
||||
MultilineTextWidget,
|
||||
DropdownWidget,
|
||||
HyperlinkWidget,
|
||||
RadioButtonsWidget
|
||||
RadioButtonsWidget,
|
||||
DisplayValueWidget
|
||||
]
|
||||
})
|
||||
export class ContainerWidget implements AfterViewInit {
|
||||
|
@@ -0,0 +1,3 @@
|
||||
.display-value-widget {
|
||||
width: 100%;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label display-value-widget">
|
||||
<input class="mdl-textfield__input"
|
||||
type="text"
|
||||
[attr.id]="field.id"
|
||||
[(ngModel)]="field.value"
|
||||
disabled>
|
||||
<label class="mdl-textfield__label" [attr.for]="field.id">{{field.name}}</label>
|
||||
</div>
|
||||
|
@@ -0,0 +1,32 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { WidgetComponent } from './../widget.component';
|
||||
|
||||
declare let __moduleName: string;
|
||||
declare var componentHandler;
|
||||
|
||||
@Component({
|
||||
moduleId: __moduleName,
|
||||
selector: 'display-value-widget',
|
||||
templateUrl: './display-value.widget.html',
|
||||
styleUrls: ['./display-value.widget.css']
|
||||
})
|
||||
export class DisplayValueWidget extends WidgetComponent {
|
||||
|
||||
}
|
@@ -28,6 +28,7 @@ export class FormFieldTypes {
|
||||
static DROPDOWN: string = 'dropdown';
|
||||
static HYPERLINK: string = 'hyperlink';
|
||||
static RADIO_BUTTONS: string = 'radio-buttons';
|
||||
static DISPLAY_VALUE: string = 'readonly';
|
||||
}
|
||||
|
||||
export class FormWidgetModel {
|
||||
|
Reference in New Issue
Block a user