• Packages
  • Themes
  • Documentation
  • Blog
  • Discussions
Sign in

ui5-snippets

Snippets for SAPUI5 and OpenUI5
qmacro
0.5.0 1,247
6
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

UI5 Snippets for Atom

A package of snippets for SAPUI5 and OpenUI5

(early days yet, I will be adding more, sourcing from my SublimeUI5 package)

OpenUI5 Logo

General

  • jsdec - jQuery.sap.declare
  • jsreq - jQuery.sap.require
  • jslog - jQuery.sap.log

sap.m

XML

  • 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

HTML

index.m

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>

index.m.spmvc

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>

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request!

License

MIT © DJ Adams

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by