UI5 Snippets for Atom
MIT License
A package of snippets for SAPUI5 and OpenUI5
(early days yet, I will be adding more, sourcing from my SublimeUI5 package)
jsdec
- jQuery.sap.declare
jsreq
- jQuery.sap.require
jslog
- jQuery.sap.log
IconTabBar
- sap.m.IconTabBar
IconTabFilter
- sap.m.IconTabFilter
List
- sap.m.List
ObjectAttribute
- sap.m.ObjectAttribute
ObjectAttributeF
- sap.m.ObjectAttribute (with formatter)ObjectHeader
- sap.m.ObjectHeader
ObjectIdentifier
- sap.m.ObjectIdentifier
ObjectListItem
- sap.m.ObjectListItem
ObjectNumber
- sap.m.ObjectNumber
ObjectStatus
- sap.m.ObjectStatus
ObjectStatusF
- sap.m.ObjectStatusF (with formatter)Page
- sap.m.Page
SearchField
- sap.m.SearchField
StandardListItem
- sap.m.StandardListItem
Table
- sap.m.Table
ui5indexm
- Index file for sap.m-based app.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8">
<title>${1:App Title}</title>
<script id="sap-ui-bootstrap"
type="text/javascript"
src="/sapui5/latest/resources/sap-ui-core.js"
data-sap-ui-theme="${2:sap_bluecrystal}"
data-sap-ui-libs="${3:sap.m}"
data-sap-ui-xx-bindingSyntax="${5:complex}"
>
</script>
<script>
$0
</script>
</head>
<body class="sapUiBody" id="content" />
</html>
ui5indexmspmvc
- Index file for single-page MVC sap.m-based app.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8">
<title>${1:App Title}</title>
<script id="sap-ui-bootstrap"
type="text/javascript"
src="/sapui5/latest/resources/sap-ui-core.js"
data-sap-ui-theme="${2:sap_bluecrystal}"
data-sap-ui-libs="${3:sap.m}"
data-sap-ui-xx-bindingSyntax="${5:complex}"
>
</script>
<!-- XML-based view definition -->
<script id="view1" type="sapui5/xmlview">
<mvc:View
controllerName="local.controller"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m">
${6:<!-- Add your XML-based controls here -->}
</mvc:View>
</script>
<script>
// Controller definition
sap.ui.controller("local.controller", {
$0
});
// Instantiate the View, assign a model
// and display
var oView = sap.ui.xmlview({
viewContent: jQuery('#view1').html()
});
oView.setModel(new sap.ui.model.json.JSONModel({
${7:name: "value"}
}));
oView.placeAt('content');
</script>
</head>
<body class="sapUiBody" id="content" />
</html>
git checkout -b my-new-feature
git commit -m 'Add some feature'
git push origin my-new-feature
MIT DJ Adams