This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
439cb48
commit 58a4712
Showing
4 changed files
with
80 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" | ||
xmlns:h="http://xmlns.jcp.org/jsf/html" | ||
xmlns:f="http://xmlns.jcp.org/jsf/core" | ||
xmlns:blut="http://github.com/blutorange" | ||
xmlns:xi="http://www.xima.de/taglib/xfc" | ||
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui" | ||
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" | ||
xmlns:pe="http://primefaces.org/ui/extensions" | ||
template="./template.xhtml"> | ||
|
||
<f:metadata> | ||
<f:viewAction actionListener="#{testBean.setCodeLanguage('scss')}"/> | ||
<f:viewAction actionListener="#{testBean.setCode('body { color: red; }')}"/> | ||
</f:metadata> | ||
|
||
<ui:define name="headLast"> | ||
<h:outputScript name="extender.js" /> | ||
</ui:define> | ||
|
||
<ui:define name="bodyFirst"> | ||
<h:form> | ||
<p:dialog id="monacoDialog" widgetVar="monacoDialog" dynamic="true" modal="true" | ||
width="800" header="Monaco Dialog"> | ||
<blut:monacoEditor widgetVar="monacoDialog" id="monaco" | ||
value="#{testBean.code}" width="100%" autoResize="true" | ||
editorOptions="#{testBean.editorOptions}" | ||
style="flex-grow: 1;flex-basis: 0" height="600px" | ||
uiLanguage="#{testBean.uiLanguage}" extender="createExtenderBasic()"> | ||
</blut:monacoEditor> | ||
</p:dialog> | ||
</h:form> | ||
</ui:define> | ||
|
||
<ui:define name="monaco"> | ||
<p:tabView id="monacoTabs"> | ||
<p:tab id="tabSimple" title="Tab one without monaco"> | ||
Monaco editor is in the second tab. But you can | ||
<p:commandButton value="open monaco in a dialog" onclick="PF('monacoDialog').show();return false;"/> | ||
</p:tab> | ||
<p:tab id="tabMonaco" title="Tab with monaco" dynamic="true"> | ||
<blut:monacoEditor widgetVar="monaco" id="monaco" | ||
value="#{testBean.code}" width="100%" autoResize="true" | ||
editorOptions="#{testBean.editorOptions}" | ||
style="flex-grow: 1;flex-basis: 0" height="600px" | ||
uiLanguage="#{testBean.uiLanguage}" extender="createExtenderBasic()"> | ||
</blut:monacoEditor> | ||
</p:tab> | ||
</p:tabView> | ||
</ui:define> | ||
|
||
<ui:define name="script"> | ||
<script> | ||
window.testCase = function() { | ||
log("No monaco editor should be visible initially on page load"); | ||
log("Click on 'open monaco in a dialog'"); | ||
log("A modal dialog should open, a monaco editor with some code should be clearly visible in the dialog"); | ||
log("======"); | ||
log("Reload the page"); | ||
log("======"); | ||
log("Click on 'tab with monaco'"); | ||
log("A monaco editor should be clear visible inside the second tab"); | ||
log("Click on 'tab one without monaco'"); | ||
log("Click on 'open monaco in a dialog'"); | ||
log("A modal dialog should open, a monaco editor with some code should be clearly visible in the dialog"); | ||
}; | ||
</script> | ||
</ui:define> | ||
</ui:composition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters