P
CUI v1.20.1177
Documentation and examples in using Standard Views with PCUI
<link rel="stylesheet" href="~/PCUIAssets/PCUI/Plugins/AnimateCSS/StyleSheet.css" />
<link rel="stylesheet" href="~/PCUIAssets/PCUI/Elements/Buttons/css/Buttons.min.css" />
<link rel="stylesheet" href="~/PCUIAssets/PCUI/Components/StandardView/css/StandardView.min.css" />
<script src="~/PCUIAssets/PCUI/Components/StandardView/js/StandardView.js"></script>
<div id="main-container">
<div class="text-container">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<div class="standard-view-container">
<pcui_standard_view_loading ref="loading-spinner"></pcui_standard_view_loading>
</div>
</div>
#main-container {
position: relative;
}
.standard-view-container {
display: none;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
top: 0;
left: 0;
}
var mainContainerDOM = new Vue({
el: '#main-container',
name: 'Main Container',
components: {
pcui_standard_view_loading: PCUIStandardViewLoadingComponent
}
});
// To show Standard View - Loading (default)
mainContainerDOM.$refs["loading-spinner"].show();
// To hide Standard View - Loading (default)
mainContainerDOM.$refs["loading-spinner"].hide();
// To show Standard View - Loading (no animation)
mainContainerDOM.$refs["loading-spinner"].show({
isAnimated: false
});
// To hide Standard View - Loading (no animation)
mainContainerDOM.$refs["loading-spinner"].hide({
isAnimated: false
});
<div id="main-container">
<div class="text-container">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<div class="standard-view-container">
<pcui_standard_view_no_data ref="no-data"
headline-text="Message saying there are no data available.">
</pcui_standard_view_no_data>
</div>
</div>
#main-container {
position: relative;
}
.standard-view-container {
display: none;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
top: 0;
left: 0;
}
var mainContainerDOM = new Vue({
el: '#main-container',
name: 'Main Container',
components: {
pcui_standard_view_no_data: PCUIStandardViewNoDataComponent
}
});
// To show Standard View - No data (default)
mainContainerDOM.$refs["no-data"].show();
// To hide Standard View - No data (default)
mainContainerDOM.$refs["no-data"].hide();
// To show Standard View - No data (no animation)
mainContainerDOM.$refs["no-data"].show({
isAnimated: false
});
// To hide Standard View - No data (no animation)
mainContainerDOM.$refs["no-data"].hide({
isAnimated: false
});
<div id="main-container">
<div class="text-container">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<div class="standard-view-container">
<pcui_standard_view_blank_slate ref="blank-slate"
headline-text="Message saying the page is blank."
supporting-text="An additional message saying what you can do about this blank page."
button-text="Click to display an alert"
v-bind:button-callback="displayAlert">
</pcui_standard_view_blank_slate>
</div>
</div>
#main-container {
position: relative;
height: 200px;
}
.standard-view-container {
display: none;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
top: 0;
left: 0;
}
var mainContainerDOM = new Vue({
el: '#main-container',
name: 'Main Container',
components: {
pcui_standard_view_blank_slate: PCUIStandardViewBlankSlateComponent
},
methods: {
displayAlert: function () {
alert('This is an alert.');
}
}
});
// To show Standard View - Blank slate (default)
mainContainerDOM.$refs["blank-slate"].show();
// To hide Standard View - Blank slate (default)
mainContainerDOM.$refs["blank-slate"].hide();
// To show Standard View - Blank slate (no animation)
mainContainerDOM.$refs["blank-slate"].show({
isAnimated: false
});
// To hide Standard View - Blank slate (no animation)
mainContainerDOM.$refs["blank-slate"].hide({
isAnimated: false
});
<div id="main-container">
<div class="text-container">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
<div class="standard-view-container">
<pcui_standard_view_error ref="error-view"
headline-text="Message saying the page encountered an error while loading."
supporting-text="An additional message saying what you can do about the error."
button-text="Click to display an alert"
v-bind:button-callback="displayAlert">
</pcui_standard_view_error>
</div>
</div>
#main-container {
position: relative;
height: 200px;
}
.standard-view-container {
display: none;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
top: 0;
left: 0;
}
var mainContainerDOM = new Vue({
el: '#main-container',
name: 'Main Container',
components: {
pcui_standard_view_error: PCUIStandardViewErrorComponent
},
methods: {
displayAlert: function () {
alert('This is an alert.');
}
}
});
// To show Standard View - Error while loading (default)
mainContainerDOM.$refs["error-view"].show();
// To hide Standard View - Error while loading (default)
mainContainerDOM.$refs["error-view"].hide();
// To show Standard View - Error while loading (no animation)
mainContainerDOM.$refs["error-view"].show({
isAnimated: false
});
// To hide Standard View - Error while loading (no animation)
mainContainerDOM.$refs["error-view"].hide({
isAnimated: false
});