├── LICENSE.txt ├── README.md ├── SECURITY.md ├── THIRD_PARTY_LICENSES.txt └── samples ├── 2015-2-denali └── Artist@dev │ ├── JavaScript │ ├── Artist.Collection.js │ ├── Artist.Details.View.js │ ├── Artist.Edit.View.js │ ├── Artist.List.View.js │ ├── Artist.Model.js │ ├── Artist.Router.js │ └── Artist.js │ ├── Sass │ ├── _artist-details.scss │ ├── _artist-edit.scss │ └── _artist-list.scss │ ├── SuiteScript │ ├── Artist.Model.js │ └── Artist.Service.ss │ ├── Templates │ ├── artist_details.tpl │ ├── artist_edit.tpl │ └── artist_list.tpl │ └── ns.package.json ├── 2016-1-mont-blanc ├── ErrorService@1.0.0 │ ├── Images │ │ └── somethingmissing.jpg │ ├── JavaScript │ │ ├── ErrorService.Router.js │ │ └── ErrorService.js │ ├── Sass │ │ └── _errorservice-404.scss │ ├── SuiteScript │ │ └── ErrorService.Service.ss │ ├── Templates │ │ └── errorservice_404.tpl │ └── ns.package.json ├── Testimonials@1.0.0 │ ├── JavaScript │ │ ├── Testimonials.Form.View.js │ │ ├── Testimonials.Router.js │ │ └── Testimonials.js │ ├── Templates │ │ └── testimonials_form.tpl │ └── ns.package.json ├── Testimonials@1.0.1 │ ├── JavaScript │ │ ├── Testimonials.Form.View.js │ │ ├── Testimonials.Model.js │ │ ├── Testimonials.Router.js │ │ └── Testimonials.js │ ├── Sass │ │ └── _testimonials-form.scss │ ├── SuiteScript │ │ ├── Testimonials.Model.js │ │ └── Testimonials.Service.ss │ ├── Templates │ │ └── testimonials_form.tpl │ └── ns.package.json └── Testimonials@1.0.2 │ ├── JavaScript │ ├── Testimonials.Carousel.View.js │ ├── Testimonials.Collection.js │ ├── Testimonials.Form.View.js │ ├── Testimonials.Model.js │ ├── Testimonials.Router.js │ ├── Testimonials.Testimonial.View.js │ └── Testimonials.js │ ├── Sass │ └── _testimonials-form.scss │ ├── SuiteScript │ ├── Testimonials.Model.js │ └── Testimonials.Service.ss │ ├── Templates │ ├── testimonials_carousel.tpl │ ├── testimonials_form.tpl │ └── testimonials_testimonial.tpl │ └── ns.package.json ├── 2016-2-vinson ├── ContactUs@1.0.0 │ ├── Configuration │ │ └── ContactUs.json │ ├── JavaScript │ │ ├── ContactUs.Model.js │ │ ├── ContactUs.Router.js │ │ ├── ContactUs.View.js │ │ └── ContactUs.js │ ├── SuiteScript │ │ ├── ContactUs.Model.js │ │ └── ContactUs.ServiceController.js │ ├── Templates │ │ └── contact_us.tpl │ └── ns.package.json ├── ContactUs@1.0.1 │ ├── Configuration │ │ └── ContactUs.json │ ├── JavaScript │ │ ├── ContactUs.Model.js │ │ ├── ContactUs.Router.js │ │ ├── ContactUs.View.js │ │ └── ContactUs.js │ ├── Sass │ │ └── _contactus-form.scss │ ├── SuiteScript │ │ ├── ContactUs.Model.js │ │ └── ContactUs.ServiceController.js │ ├── Templates │ │ └── contact_us.tpl │ └── ns.package.json ├── FreeShippingBar@1.0.0 │ ├── Configuration │ │ └── FreeShippingBar.json │ ├── JavaScript │ │ ├── FreeShippingBar.View.js │ │ └── FreeShippingBar.js │ ├── Sass │ │ └── _free-shipping-bar.scss │ ├── Templates │ │ └── free_shipping_bar.tpl │ └── ns.package.json ├── MyReviews@1.0.0 │ ├── JavaScript │ │ ├── MyReviews.Collection.js │ │ ├── MyReviews.Details.View.js │ │ ├── MyReviews.List.View.js │ │ ├── MyReviews.Model.js │ │ ├── MyReviews.Router.js │ │ └── MyReviews.js │ ├── SuiteScript │ │ ├── MyReviews.Model.js │ │ └── MyReviews.ServiceController.js │ ├── Templates │ │ ├── myreviews_details.tpl │ │ └── myreviews_list.tpl │ └── ns.package.json ├── MyReviews@1.0.1 │ ├── JavaScript │ │ ├── MyReviews.Collection.js │ │ ├── MyReviews.Details.View.js │ │ ├── MyReviews.List.View.js │ │ ├── MyReviews.Model.js │ │ ├── MyReviews.Router.js │ │ └── MyReviews.js │ ├── SuiteScript │ │ ├── MyReviews.Model.js │ │ └── MyReviews.ServiceController.js │ ├── Templates │ │ ├── myreviews_details.tpl │ │ └── myreviews_list.tpl │ └── ns.package.json └── MyReviews@1.0.2 │ ├── Configuration │ └── MyReviews.json │ ├── JavaScript │ ├── MyReviews.Collection.js │ ├── MyReviews.Details.View.js │ ├── MyReviews.List.View.js │ ├── MyReviews.Model.js │ ├── MyReviews.Router.js │ └── MyReviews.js │ ├── Sass │ └── _myreviews-details.scss │ ├── SuiteScript │ ├── MyReviews.Model.js │ └── MyReviews.ServiceController.js │ ├── Templates │ ├── myreviews_details.tpl │ └── myreviews_list.tpl │ └── ns.package.json ├── 2017-1-elbrus ├── 360Images@1.0.0 │ ├── Configuration │ │ └── 360Images.json │ ├── JavaScript │ │ └── 360Images.js │ ├── Templates │ │ └── product_details_image_gallery.tpl │ └── ns.package.json ├── CustomFacetViews@1.0.0 │ ├── Configuration │ │ └── CustomFacetViews.json │ ├── JavaScript │ │ └── CustomFacetViews.js │ ├── Sass │ │ └── _facets-item-cell-portrait.scss │ ├── Templates │ │ └── facets_item_cell_portrait.tpl │ └── ns.package.json ├── PromoDrawer@1.0.0 │ ├── JavaScript │ │ ├── PromoDrawer.Drawer.View.js │ │ ├── PromoDrawer.Notification.View.js │ │ └── PromoDrawer.js │ ├── Sass │ │ └── _promodrawer.scss │ ├── Templates │ │ ├── promodrawer_drawer.tpl │ │ └── promodrawer_notification.tpl │ └── ns.package.json └── RefinementStorer@1.0.0 │ ├── Configuration │ └── RefinementStorer.json │ ├── JavaScript │ └── RefinementStorer.js │ └── ns.package.json ├── 2017-2-kilimanjaro ├── CCTOnSaleBanner@1.0.0 │ ├── Images │ │ ├── orangethings.png │ │ └── tag.svg │ ├── JavaScript │ │ ├── CCTOnSaleBanner.View.js │ │ └── CCTOnSaleBanner.js │ ├── Sass │ │ └── _cctonsalebanner.scss │ ├── Templates │ │ └── cct_onsale_banner.tpl │ └── ns.package.json ├── CustomHeader@1.0.0 │ ├── Sass │ │ └── _custom-header.scss │ ├── Templates │ │ ├── custom_header.tpl │ │ └── custom_profile.tpl │ └── ns.package.json ├── ExampleCorrelated@1.0.0 │ ├── JavaScript │ │ ├── ExampleCorrelated.Model.js │ │ ├── ExampleCorrelated.Router.js │ │ ├── ExampleCorrelated.View.js │ │ └── ExampleCorrelated.js │ ├── SuiteScript │ │ ├── ExampleCorrelated.Model.js │ │ └── ExampleCorrelated.ServiceController.js │ ├── Templates │ │ └── example_correlated.tpl │ └── ns.package.json ├── ExampleLocation@1.0.0 │ ├── JavaScript │ │ ├── ExampleLocation.Model.js │ │ ├── ExampleLocation.Router.js │ │ ├── ExampleLocation.View.js │ │ └── ExampleLocation.js │ ├── SuiteScript │ │ ├── ExampleLocation.Model.js │ │ └── ExampleLocation.ServiceController.js │ ├── Templates │ │ └── example_location.tpl │ └── ns.package.json ├── ExamplePublishPush@1.0.0 │ ├── SuiteScript │ │ ├── ExamplePublishPush.Model.js │ │ └── ExamplePublishPushThing.js │ └── ns.package.json ├── ExampleSuiteScript@1.0.0 │ ├── Configuration │ │ └── ExampleSuiteScript.json │ ├── JavaScript │ │ ├── ExampleSuiteScript.Model.js │ │ ├── ExampleSuiteScript.Router.js │ │ ├── ExampleSuiteScript.View.js │ │ └── ExampleSuiteScript.js │ ├── Sass │ │ └── _examplesuitescript.scss │ ├── SuiteScript │ │ ├── ExampleSuiteScript.Model.js │ │ └── ExampleSuiteScript.ServiceController.js │ ├── Templates │ │ └── example_suitescript.tpl │ └── ns.package.json ├── ExampleSuiteScript@1.0.1 │ ├── Configuration │ │ └── ExampleSuiteScript.json │ ├── JavaScript │ │ ├── ExampleSuiteScript.Collection.js │ │ ├── ExampleSuiteScript.Details.View.js │ │ ├── ExampleSuiteScript.List.View.js │ │ ├── ExampleSuiteScript.Model.js │ │ ├── ExampleSuiteScript.Router.js │ │ └── ExampleSuiteScript.js │ ├── Sass │ │ └── _examplesuitescript.scss │ ├── SuiteScript │ │ ├── ExampleSuiteScript.Model.js │ │ └── ExampleSuiteScript.ServiceController.js │ ├── Templates │ │ ├── example_suitescript_details.tpl │ │ └── example_suitescript_list.tpl │ └── ns.package.json ├── ExampleSuiteScript@1.0.2 │ ├── Configuration │ │ └── ExampleSuiteScript.json │ ├── JavaScript │ │ ├── ExampleSuiteScript.Collection.js │ │ ├── ExampleSuiteScript.Details.View.js │ │ ├── ExampleSuiteScript.Edit.View.js │ │ ├── ExampleSuiteScript.List.View.js │ │ ├── ExampleSuiteScript.Model.js │ │ ├── ExampleSuiteScript.Router.js │ │ └── ExampleSuiteScript.js │ ├── Sass │ │ └── _examplesuitescript.scss │ ├── SuiteScript │ │ ├── ExampleSuiteScript.Model.js │ │ └── ExampleSuiteScript.ServiceController.js │ ├── Templates │ │ ├── example_suitescript_details.tpl │ │ ├── example_suitescript_edit.tpl │ │ └── example_suitescript_list.tpl │ └── ns.package.json ├── ExampleSuiteScript@1.0.3 │ ├── Configuration │ │ └── ExampleSuiteScript.json │ ├── JavaScript │ │ ├── ExampleSuiteScript.Collection.js │ │ ├── ExampleSuiteScript.Details.View.js │ │ ├── ExampleSuiteScript.Edit.View.js │ │ ├── ExampleSuiteScript.List.View.js │ │ ├── ExampleSuiteScript.Model.js │ │ ├── ExampleSuiteScript.Router.js │ │ └── ExampleSuiteScript.js │ ├── Sass │ │ └── _examplesuitescript.scss │ ├── SuiteScript │ │ ├── ExampleSuiteScript.Model.js │ │ └── ExampleSuiteScript.ServiceController.js │ ├── Templates │ │ ├── example_suitescript_details.tpl │ │ ├── example_suitescript_edit.tpl │ │ └── example_suitescript_list.tpl │ └── ns.package.json ├── ExampleSuiteScript@1.0.4 │ ├── Configuration │ │ └── ExampleSuiteScript.json │ ├── JavaScript │ │ ├── ExampleSuiteScript.Collection.js │ │ ├── ExampleSuiteScript.Details.View.js │ │ ├── ExampleSuiteScript.Edit.View.js │ │ ├── ExampleSuiteScript.List.View.js │ │ ├── ExampleSuiteScript.Model.js │ │ ├── ExampleSuiteScript.Router.js │ │ └── ExampleSuiteScript.js │ ├── Sass │ │ └── _examplesuitescript.scss │ ├── SuiteScript │ │ ├── ExampleSuiteScript.Model.js │ │ └── ExampleSuiteScript.ServiceController.js │ ├── Templates │ │ ├── example_suitescript_details.tpl │ │ ├── example_suitescript_edit.tpl │ │ └── example_suitescript_list.tpl │ └── ns.package.json ├── ExampleSuiteScript@1.0.5 │ ├── Configuration │ │ └── ExampleSuiteScript.json │ ├── JavaScript │ │ ├── ExampleSuiteScript.Collection.js │ │ ├── ExampleSuiteScript.Details.View.js │ │ ├── ExampleSuiteScript.Edit.View.js │ │ ├── ExampleSuiteScript.List.View.js │ │ ├── ExampleSuiteScript.Model.js │ │ ├── ExampleSuiteScript.Router.js │ │ └── ExampleSuiteScript.js │ ├── Sass │ │ └── _examplesuitescript.scss │ ├── SuiteScript │ │ ├── ExampleSuiteScript.Model.js │ │ └── ExampleSuiteScript.ServiceController.js │ ├── Templates │ │ ├── example_suitescript_details.tpl │ │ ├── example_suitescript_edit.tpl │ │ └── example_suitescript_list.tpl │ └── ns.package.json ├── ExampleSuiteScript@1.0.6 │ ├── Configuration │ │ └── ExampleSuiteScript.json │ ├── JavaScript │ │ ├── ExampleSuiteScript.Collection.js │ │ ├── ExampleSuiteScript.Details.View.js │ │ ├── ExampleSuiteScript.Edit.View.js │ │ ├── ExampleSuiteScript.List.View.js │ │ ├── ExampleSuiteScript.Model.js │ │ ├── ExampleSuiteScript.Router.js │ │ └── ExampleSuiteScript.js │ ├── Sass │ │ └── _examplesuitescript.scss │ ├── SuiteScript │ │ ├── ExampleSuiteScript.Model.js │ │ └── ExampleSuiteScript.Service.ss │ ├── Templates │ │ ├── example_suitescript_details.tpl │ │ ├── example_suitescript_edit.tpl │ │ └── example_suitescript_list.tpl │ └── ns.package.json ├── ExampleSuitelet@1.0.0 │ ├── ADD ME TO THE BACKEND │ │ └── ExampleSuitelet.js │ ├── JavaScript │ │ ├── ExampleSuitelet.Model.js │ │ ├── ExampleSuitelet.Router.js │ │ ├── ExampleSuitelet.View.js │ │ └── ExampleSuitelet.js │ ├── SuiteScript │ │ ├── ExampleSuitelet.Model.js │ │ └── ExampleSuitelet.ServiceController.js │ ├── Templates │ │ └── example_suitelet.tpl │ └── ns.package.json ├── SC.CCT.ImageViewer@0.0.1 │ ├── JavaScript │ │ ├── SC.CCT.ImageViewer.View.js │ │ └── SC.CCT.ImageViewer.js │ ├── Sass │ │ └── _sc-cct-imageviewer.scss │ ├── Templates │ │ └── sc_cct_imageviewer.tpl │ └── ns.package.json ├── UserPreferences@1.0.0 │ ├── JavaScript │ │ ├── UserPreferences.List.View.js │ │ ├── UserPreferences.Router.js │ │ └── UserPreferences.js │ ├── Templates │ │ └── user_preferences_list.tpl │ └── ns.package.json ├── UserPreferences@1.0.1 │ ├── JavaScript │ │ ├── UserPreferences.Collection.js │ │ ├── UserPreferences.Details.View.js │ │ ├── UserPreferences.List.View.js │ │ ├── UserPreferences.Model.js │ │ ├── UserPreferences.Router.js │ │ └── UserPreferences.js │ ├── SuiteScript │ │ ├── UserPreferences.Model.js │ │ └── UserPreferences.ServiceController.js │ ├── Templates │ │ ├── user_preferences_details.tpl │ │ └── user_preferences_list.tpl │ └── ns.package.json ├── UserPreferences@1.0.2 │ ├── JavaScript │ │ ├── UserPreferences.Collection.js │ │ ├── UserPreferences.Details.View.js │ │ ├── UserPreferences.Edit.View.js │ │ ├── UserPreferences.List.View.js │ │ ├── UserPreferences.Model.js │ │ ├── UserPreferences.Router.js │ │ └── UserPreferences.js │ ├── SuiteScript │ │ ├── UserPreferences.Model.js │ │ └── UserPreferences.ServiceController.js │ ├── Templates │ │ ├── user_preferences_details.tpl │ │ ├── user_preferences_edit.tpl │ │ └── user_preferences_list.tpl │ └── ns.package.json ├── UserPreferences@1.0.3-commented │ ├── JavaScript │ │ ├── UserPreferences.Collection.js │ │ ├── UserPreferences.Details.View.js │ │ ├── UserPreferences.Edit.View.js │ │ ├── UserPreferences.List.View.js │ │ ├── UserPreferences.Model.js │ │ ├── UserPreferences.Router.js │ │ └── UserPreferences.js │ ├── Sass │ │ ├── _user_preferences_details.scss │ │ ├── _user_preferences_edit.scss │ │ └── _user_preferences_list.scss │ ├── SuiteScript │ │ ├── UserPreferences.Model.js │ │ └── UserPreferences.ServiceController.js │ ├── Templates │ │ ├── user_preferences_details.tpl │ │ ├── user_preferences_edit.tpl │ │ └── user_preferences_list.tpl │ └── ns.package.json ├── UserPreferences@1.0.3 │ ├── JavaScript │ │ ├── UserPreferences.Collection.js │ │ ├── UserPreferences.Details.View.js │ │ ├── UserPreferences.Edit.View.js │ │ ├── UserPreferences.List.View.js │ │ ├── UserPreferences.Model.js │ │ ├── UserPreferences.Router.js │ │ └── UserPreferences.js │ ├── Sass │ │ ├── _user_preferences_details.scss │ │ ├── _user_preferences_edit.scss │ │ └── _user_preferences_list.scss │ ├── SuiteScript │ │ ├── UserPreferences.Model.js │ │ └── UserPreferences.ServiceController.js │ ├── Templates │ │ ├── user_preferences_details.tpl │ │ ├── user_preferences_edit.tpl │ │ └── user_preferences_list.tpl │ └── ns.package.json └── scriptablecart │ ├── examplefieldchange.js │ ├── examplepostsourcing.js │ ├── examplescriptablecart.js │ ├── limitedquantity-comments.js │ ├── limitedquantity.js │ └── preventrecursion.js ├── 2018-1-aconcagua ├── MissingImagesByColor │ └── missingimagesbycolor.js ├── PLPColorImages │ ├── Configuration │ │ └── PLPColorImages.json │ └── JavaScript │ │ └── PLPColorImages.js ├── PLPItemColors │ ├── Configuration │ │ └── PLPItemColors.json │ ├── JavaScript │ │ ├── PLPItemColors.Hover.View.js │ │ └── PLPItemColors.js │ ├── Sass │ │ └── _plp-itemcolors-hover.scss │ └── Templates │ │ └── plp_itemcolors_hover.tpl ├── PLPStuff │ ├── Modules │ │ └── Module │ │ │ ├── JavaScript │ │ │ ├── PLPStuff.View.js │ │ │ └── PLPStuff.js │ │ │ └── Templates │ │ │ └── plpstuff_banner.tpl │ ├── assets │ │ └── img │ │ │ └── lookingfororangethings.png │ └── manifest.json ├── PreferredDelivery │ ├── Modules │ │ └── PreferredDelivery │ │ │ ├── JavaScript │ │ │ ├── Example.PreferredDelivery.PreferredDelivery.View.js │ │ │ └── Example.PreferredDelivery.PreferredDelivery.js │ │ │ ├── Sass │ │ │ └── _preferreddelivery.scss │ │ │ └── Templates │ │ │ └── example_preferreddelivery_preferreddelivery.tpl │ └── manifest.json ├── ProdData │ ├── JavaScript │ │ ├── Example.ProdData.ProdData.Details.View.js │ │ ├── Example.ProdData.ProdData.List.View.js │ │ ├── Example.ProdData.ProdData.Router.js │ │ └── Example.ProdData.ProdData.js │ └── Templates │ │ ├── example_proddata_proddata_details.tpl │ │ └── example_proddata_proddata_list.tpl ├── Product.Model.Examples │ ├── Example.ProdData.ProdData.v1.js │ ├── Example.ProdData.ProdData.v2.js │ └── Example.ProdData.ProdData.v3.js └── SCCCTEncourage │ ├── Modules │ └── Example.SCCCTEncourage.Encourage │ │ ├── JavaScript │ │ ├── Example.SCCCTEncourage.Encourage.View.js │ │ └── Example.SCCCTEncourage.Encourage.js │ │ ├── Sass │ │ └── _sccctencourage-encourage.scss │ │ └── Templates │ │ └── example_sccctencourage_encourage.tpl │ ├── assets │ └── img │ │ ├── buyorange.png │ │ └── cct_example_sccctencourage_icon.svg │ └── manifest.json ├── 2018-2 ├── MultiModule │ ├── Modules │ │ ├── ModuleOne │ │ │ ├── JavaScript │ │ │ │ ├── ModuleOne.View.js │ │ │ │ └── ModuleOne.js │ │ │ └── Templates │ │ │ │ └── module_one.tpl │ │ └── ModuleTwo │ │ │ └── JavaScript │ │ │ └── ModuleTwo.js │ ├── assets │ │ └── img │ │ │ ├── ModuleOne │ │ │ └── img1.jpg │ │ │ └── ModuleTwo │ │ │ └── img1.jpg │ └── manifest.json └── RemoveAll │ ├── LICENSE.md │ ├── Modules │ └── RemoveAll │ │ ├── JavaScript │ │ ├── Example.RemoveAll.RemoveAll.js │ │ └── RemoveAll.View.js │ │ ├── Sass │ │ └── _removeall-removeall.scss │ │ ├── SuiteScript │ │ └── Example.RemoveAll.RemoveAll.js │ │ └── Templates │ │ └── example_removeall_removeall.tpl │ ├── THIRD_PARTY_LICENSES.md │ └── manifest.json ├── 2019-1 ├── DownloadOrderCSV │ ├── Modules │ │ └── DownloadOrderCSV │ │ │ ├── JavaScript │ │ │ ├── Example.DownloadOrderCSV.DownloadOrderCSV.Helper.js │ │ │ ├── Example.DownloadOrderCSV.DownloadOrderCSV.View.js │ │ │ ├── Example.DownloadOrderCSV.DownloadOrderCSV.js │ │ │ └── Example.DownloadOrderCSV.DownloadOrderCSV.noop.js │ │ │ ├── Sass │ │ │ └── _example-downloadordercsv.scss │ │ │ ├── SuiteScript │ │ │ ├── DownloadOrderCSV.ServiceController.js │ │ │ └── Example.DownloadOrderCSV.DownloadOrderCSV.js │ │ │ └── Templates │ │ │ └── example_downloadordercsv_downloadordercsv.tpl │ ├── assets │ │ └── services │ │ │ └── DownloadOrderCSV.Service.ss │ └── manifest.json ├── ExamplePageTypes │ ├── Modules │ │ ├── AboutUs │ │ │ ├── JavaScript │ │ │ │ ├── Example.ExamplePageTypes.AboutUs.Collection.js │ │ │ │ ├── Example.ExamplePageTypes.AboutUs.Details.View.js │ │ │ │ ├── Example.ExamplePageTypes.AboutUs.Icons.View.js │ │ │ │ ├── Example.ExamplePageTypes.AboutUs.List.View.js │ │ │ │ ├── Example.ExamplePageTypes.AboutUs.Model.js │ │ │ │ └── Example.ExamplePageTypes.AboutUs.js │ │ │ ├── Sass │ │ │ │ └── _example_examplepagetypes_aboutus.scss │ │ │ ├── SuiteScript │ │ │ │ ├── AboutUs.ServiceController.js │ │ │ │ └── Example.ExamplePageTypes.AboutUs.Model.js │ │ │ └── Templates │ │ │ │ ├── example_page_types_about_us_details.tpl │ │ │ │ ├── example_page_types_about_us_details_crown.tpl │ │ │ │ ├── example_page_types_about_us_icons.tpl │ │ │ │ ├── example_page_types_about_us_list.tpl │ │ │ │ └── example_pagetypes_product_details_full_right_image.tpl │ │ └── ExampleLandingPage │ │ │ ├── JavaScript │ │ │ ├── Example.ExamplePageTypes.ExampleLandingPage.View.js │ │ │ └── Example.ExamplePageTypes.ExampleLandingPage.js │ │ │ └── Templates │ │ │ └── example_page_types_example_landing_page.tpl │ ├── assets │ │ └── img │ │ │ └── rightarrow.jpg │ └── manifest.json ├── SavingsPrice │ ├── Modules │ │ └── SavingsPrice │ │ │ ├── JavaScript │ │ │ ├── CodeSample.SavingsPrice.SavingsPrice.View.js │ │ │ └── CodeSample.SavingsPrice.SavingsPrice.js │ │ │ └── Templates │ │ │ └── codesample_savingsprice.tpl │ └── manifest.json ├── TermsAndConditions-v1 │ ├── Modules │ │ └── TermsAndConditions │ │ │ ├── JavaScript │ │ │ ├── Example.TermsAndConditions.TermsAndConditions.Checkout.js │ │ │ ├── Example.TermsAndConditions.TermsAndConditions.LoginRegister.View.js │ │ │ └── Example.TermsAndConditions.TermsAndConditions.js │ │ │ └── Templates │ │ │ └── example_termsandconditions_termsandconditions_loginregister.tpl │ └── manifest.json └── TermsAndConditions-v2 │ ├── Modules │ └── TermsAndConditions │ │ ├── JavaScript │ │ ├── Example.TermsAndConditions.TermsAndConditions.Checkout.js │ │ ├── Example.TermsAndConditions.TermsAndConditions.LoginRegister.View.js │ │ ├── Example.TermsAndConditions.TermsAndConditions.MyAccount.Router.js │ │ ├── Example.TermsAndConditions.TermsAndConditions.MyAccount.View.js │ │ ├── Example.TermsAndConditions.TermsAndConditions.MyAccount.js │ │ └── Example.TermsAndConditions.TermsAndConditions.js │ │ └── Templates │ │ ├── example_termsandconditions_termsandconditions_loginregister.tpl │ │ └── example_termsandconditions_termsandconditions_myaccount.tpl │ └── manifest.json ├── 2020-1 ├── Extension │ ├── Modules │ │ └── Module │ │ │ ├── JavaScript │ │ │ ├── Vendor.Extension.Module.Model.js │ │ │ ├── Vendor.Extension.Module.TestView.js │ │ │ └── Vendor.Extension.Module.js │ │ │ ├── SuiteScript │ │ │ ├── Module.ServiceController.js │ │ │ └── Vendor.Extension.Module.Model.js │ │ │ └── Templates │ │ │ └── vendor_extension_module_test_template.tpl │ ├── assets │ │ └── services │ │ │ └── Module.Service.ss │ └── manifest.json └── MyFirstSDFExtension │ ├── cli-config.js │ └── src │ ├── FileCabinet │ └── SuiteScripts │ │ └── Deploy_Extensions │ │ ├── .attributes │ │ └── .folder.attr.xml │ │ └── Tutorial │ │ ├── .attributes │ │ └── .folder.attr.xml │ │ └── ExampleExtensionForSDF │ │ ├── BackendScripts │ │ └── SC_EXT_BI_ExampleExtension.js │ │ ├── Modules │ │ └── Example │ │ │ └── JavaScript │ │ │ └── Example.js │ │ └── manifest.json │ ├── Objects │ └── custentity_tsandcs.xml │ ├── deploy.xml │ └── manifest.xml └── 2020-2 ├── CDRExample ├── Modules │ └── CDRExample │ │ ├── JavaScript │ │ ├── CDRExample.View.js │ │ └── CDRExample.js │ │ └── Templates │ │ └── cdr_example.tpl └── manifest.json ├── Example-part1 ├── Modules │ └── UserPreferences │ │ └── JavaScript │ │ └── Example.UserPreferences.js └── manifest.json ├── Example-part10-final ├── Modules │ └── UserPreferences │ │ ├── JavaScript │ │ ├── Example.UserPreferences.Collection.View.js │ │ ├── Example.UserPreferences.Collection.js │ │ ├── Example.UserPreferences.Details.View.js │ │ ├── Example.UserPreferences.Edit.View.js │ │ ├── Example.UserPreferences.Form.View.js │ │ ├── Example.UserPreferences.Helper.js │ │ ├── Example.UserPreferences.List.View.js │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.js │ │ ├── Sass │ │ ├── _example_user_preferences_details.scss │ │ ├── _example_user_preferences_form.scss │ │ ├── _example_user_preferences_list.scss │ │ └── example_user_preferences.scss │ │ ├── SuiteScript2 │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.Service.ss │ │ └── Templates │ │ ├── example_userpreferences_collection.tpl │ │ ├── example_userpreferences_details.tpl │ │ ├── example_userpreferences_edit.tpl │ │ ├── example_userpreferences_form.tpl │ │ └── example_userpreferences_list.tpl └── manifest.json ├── Example-part2 ├── Modules │ └── UserPreferences │ │ ├── JavaScript │ │ ├── Example.UserPreferences.List.View.js │ │ └── Example.UserPreferences.js │ │ └── Templates │ │ └── example_userpreferences_list.tpl └── manifest.json ├── Example-part3 ├── Modules │ └── UserPreferences │ │ ├── JavaScript │ │ ├── Example.UserPreferences.List.View.js │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.js │ │ ├── SuiteScript2 │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.Service.ss │ │ └── Templates │ │ └── example_userpreferences_list.tpl └── manifest.json ├── Example-part4 ├── Modules │ └── UserPreferences │ │ ├── JavaScript │ │ ├── Example.UserPreferences.Edit.View.js │ │ ├── Example.UserPreferences.Form.View.js │ │ ├── Example.UserPreferences.Helper.js │ │ ├── Example.UserPreferences.List.View.js │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.js │ │ ├── SuiteScript2 │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.Service.ss │ │ └── Templates │ │ ├── example_userpreferences_edit.tpl │ │ ├── example_userpreferences_form.tpl │ │ └── example_userpreferences_list.tpl └── manifest.json ├── Example-part5 ├── Modules │ └── UserPreferences │ │ ├── JavaScript │ │ ├── Example.UserPreferences.Collection.View.js │ │ ├── Example.UserPreferences.Collection.js │ │ ├── Example.UserPreferences.Details.View.js │ │ ├── Example.UserPreferences.Edit.View.js │ │ ├── Example.UserPreferences.Form.View.js │ │ ├── Example.UserPreferences.Helper.js │ │ ├── Example.UserPreferences.List.View.js │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.js │ │ ├── SuiteScript2 │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.Service.ss │ │ └── Templates │ │ ├── example_userpreferences_collection.tpl │ │ ├── example_userpreferences_details.tpl │ │ ├── example_userpreferences_edit.tpl │ │ ├── example_userpreferences_form.tpl │ │ └── example_userpreferences_list.tpl └── manifest.json ├── Example-part6 ├── Modules │ └── UserPreferences │ │ ├── JavaScript │ │ ├── Example.UserPreferences.Collection.View.js │ │ ├── Example.UserPreferences.Collection.js │ │ ├── Example.UserPreferences.Details.View.js │ │ ├── Example.UserPreferences.Edit.View.js │ │ ├── Example.UserPreferences.Form.View.js │ │ ├── Example.UserPreferences.Helper.js │ │ ├── Example.UserPreferences.List.View.js │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.js │ │ ├── SuiteScript2 │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.Service.ss │ │ └── Templates │ │ ├── example_userpreferences_collection.tpl │ │ ├── example_userpreferences_details.tpl │ │ ├── example_userpreferences_edit.tpl │ │ ├── example_userpreferences_form.tpl │ │ └── example_userpreferences_list.tpl └── manifest.json ├── Example-part7 ├── Modules │ └── UserPreferences │ │ ├── JavaScript │ │ ├── Example.UserPreferences.Collection.View.js │ │ ├── Example.UserPreferences.Collection.js │ │ ├── Example.UserPreferences.Details.View.js │ │ ├── Example.UserPreferences.Edit.View.js │ │ ├── Example.UserPreferences.Form.View.js │ │ ├── Example.UserPreferences.Helper.js │ │ ├── Example.UserPreferences.List.View.js │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.js │ │ ├── SuiteScript2 │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.Service.ss │ │ └── Templates │ │ ├── example_userpreferences_collection.tpl │ │ ├── example_userpreferences_details.tpl │ │ ├── example_userpreferences_edit.tpl │ │ ├── example_userpreferences_form.tpl │ │ └── example_userpreferences_list.tpl └── manifest.json ├── Example-part8 ├── Modules │ └── UserPreferences │ │ ├── JavaScript │ │ ├── Example.UserPreferences.Collection.View.js │ │ ├── Example.UserPreferences.Collection.js │ │ ├── Example.UserPreferences.Details.View.js │ │ ├── Example.UserPreferences.Edit.View.js │ │ ├── Example.UserPreferences.Form.View.js │ │ ├── Example.UserPreferences.Helper.js │ │ ├── Example.UserPreferences.List.View.js │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.js │ │ ├── SuiteScript2 │ │ ├── Example.UserPreferences.Model.js │ │ └── Example.UserPreferences.Service.ss │ │ └── Templates │ │ ├── example_userpreferences_collection.tpl │ │ ├── example_userpreferences_details.tpl │ │ ├── example_userpreferences_edit.tpl │ │ ├── example_userpreferences_form.tpl │ │ └── example_userpreferences_list.tpl └── manifest.json └── Example-part9 ├── Modules └── UserPreferences │ ├── JavaScript │ ├── Example.UserPreferences.Collection.View.js │ ├── Example.UserPreferences.Collection.js │ ├── Example.UserPreferences.Details.View.js │ ├── Example.UserPreferences.Edit.View.js │ ├── Example.UserPreferences.Form.View.js │ ├── Example.UserPreferences.Helper.js │ ├── Example.UserPreferences.List.View.js │ ├── Example.UserPreferences.Model.js │ └── Example.UserPreferences.js │ ├── SuiteScript2 │ ├── Example.UserPreferences.Model.js │ └── Example.UserPreferences.Service.ss │ └── Templates │ ├── example_userpreferences_collection.tpl │ ├── example_userpreferences_details.tpl │ ├── example_userpreferences_edit.tpl │ ├── example_userpreferences_form.tpl │ └── example_userpreferences_list.tpl └── manifest.json /samples/2015-2-denali/Artist@dev/JavaScript/Artist.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Artist.Collection', 5 | [ 6 | 'Backbone', 7 | 'Artist.Model' 8 | ], 9 | function (Backbone, Model) { 10 | return Backbone.Collection.extend({ 11 | model: Model, 12 | url: _.getAbsoluteUrl('services/Artist.Service.ss') 13 | }); 14 | } 15 | ); -------------------------------------------------------------------------------- /samples/2015-2-denali/Artist@dev/JavaScript/Artist.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Artist.Details.View', 5 | [ 6 | 'Backbone', 7 | 'artist_details.tpl' 8 | ], 9 | function (Backbone, artist_details_template) { 10 | return Backbone.View.extend({ 11 | getContext: function () { 12 | return { 13 | 'name': this.model.get('name'), 14 | 'genre': this.model.get('genre'), 15 | 'internalid': this.model.get('internalid') 16 | } 17 | }, 18 | 19 | template: artist_details_template 20 | 21 | }); 22 | } 23 | ); -------------------------------------------------------------------------------- /samples/2015-2-denali/Artist@dev/JavaScript/Artist.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Artist.Model', 5 | [ 6 | 'Backbone', 7 | 'underscore' 8 | ], 9 | function (Backbone, _) { 10 | return Backbone.Model.extend({ 11 | urlRoot: _.getAbsoluteUrl('services/Artist.Service.ss'), 12 | validation: { 13 | 'name': { 14 | required: true, 15 | msg: 'Please enter an artist name' 16 | }, 17 | 'genre': { 18 | required: true, 19 | msg: 'Please enter a genre' 20 | } 21 | } 22 | }); 23 | } 24 | ); -------------------------------------------------------------------------------- /samples/2015-2-denali/Artist@dev/JavaScript/Artist.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Artist', 5 | [ 6 | 'Artist.Router' 7 | ], 8 | function (Router) { 9 | 'use strict'; 10 | return { 11 | MenuItems: { 12 | parent: 'settings', 13 | id: 'artistslist', 14 | name: 'Artists List', 15 | url: 'artists', 16 | index: 0 17 | }, 18 | 19 | mountToApp: function(application) { 20 | return new Router(application); 21 | } 22 | } 23 | } 24 | ); -------------------------------------------------------------------------------- /samples/2015-2-denali/Artist@dev/Sass/_artist-edit.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | .artist-edit { 5 | @extend .box-column-bordered; 6 | } 7 | .artist-edit-header { 8 | margin-bottom: $sc-medium-margin; 9 | } 10 | .artist-edit-form-name, .artist-edit-form-genre, .artist-edit-form-submit { 11 | @extend .control-group; 12 | } 13 | .artist-edit-form-label { 14 | @extend .input-label; 15 | } 16 | .artist-edit-form-input { 17 | @extend .input-large; 18 | } 19 | .artist-edit-form-label-required { 20 | @extend .input-required; 21 | } 22 | .artist-edit-form-submit-button { 23 | @extend .button-primary; 24 | @extend .button-medium; 25 | } -------------------------------------------------------------------------------- /samples/2015-2-denali/Artist@dev/Templates/artist_list.tpl: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Artists

4 | Create New Artist 5 |
6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
Internal IDArtistGenreActions
19 |
20 |
-------------------------------------------------------------------------------- /samples/2015-2-denali/Artist@dev/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*.js" 5 | ], 6 | "ssp-libraries": [ 7 | "SuiteScript/*.js" 8 | ], 9 | "services": [ 10 | "SuiteScript/*.Service.ss" 11 | ], 12 | "sass": [ 13 | "Sass/*.scss" 14 | ], 15 | "templates": [ 16 | "Templates/*.tpl" 17 | ] 18 | } 19 | } -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/ErrorService@1.0.0/Images/somethingmissing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-samples/netsuite-commerce/96d590b54908a0943eaaa325ab22f44c02db9691/samples/2016-1-mont-blanc/ErrorService@1.0.0/Images/somethingmissing.jpg -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/ErrorService@1.0.0/JavaScript/ErrorService.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ErrorService' 5 | , [ 6 | 'ErrorService.Router' 7 | ] 8 | , function ( 9 | Router 10 | ) 11 | { 12 | 'use strict'; 13 | 14 | return { 15 | 16 | mountToApp: function(application) { 17 | return new Router(application); 18 | } 19 | 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/ErrorService@1.0.0/Sass/_errorservice-404.scss: -------------------------------------------------------------------------------- 1 | .error-management-page-not-found-content { 2 | @extend .container; 3 | padding: $sc-base-padding; 4 | 5 | li { 6 | list-style: disc; 7 | margin: $sc-base-padding 0 0 $sc-base-padding * 4; 8 | } 9 | 10 | p, ul, h1 { 11 | padding-top: $sc-base-padding; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/ErrorService@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*.js" 5 | ], 6 | "images": [ 7 | "Images/*" 8 | ], 9 | "sass": [ 10 | "Sass/*.scss" 11 | ], 12 | "templates": [ 13 | "Templates/*" 14 | ], 15 | "ssp-libraries": [ 16 | "SuiteScript/*.js" 17 | ], 18 | "services": [ 19 | "SuiteScript/*.Service.ss" 20 | ] 21 | }, 22 | "overrides": { 23 | "suitecommerce/ErrorManagement@2.1.0/Templates/error_management_page_not_found.tpl": "Templates/errorservice_404.tpl" 24 | } 25 | } -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.0/JavaScript/Testimonials.Form.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Testimonials.Form.View' 5 | , [ 6 | 'testimonials_form.tpl' 7 | , 'Backbone' 8 | ] 9 | , function TestimonialsFormView( 10 | testimonialsFormTpl 11 | , Backbone 12 | ) 13 | { 14 | 'use strict'; 15 | 16 | return Backbone.View.extend({ 17 | 18 | template: testimonialsFormTpl 19 | 20 | , getContext: function getContext() { 21 | return { 22 | example: 'Example text' 23 | } 24 | } 25 | }); 26 | }); -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.0/JavaScript/Testimonials.Router.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Testimonials.Router' 5 | , [ 6 | 'Testimonials.Form.View' 7 | , 'Backbone' 8 | ] 9 | , function TestimonialsFormRouter( 10 | FormView 11 | , Backbone 12 | ) 13 | { 14 | 'use strict'; 15 | 16 | return Backbone.Router.extend({ 17 | 18 | routes: { 19 | 'testimonials/new': 'newTestimonial', 20 | 'testimonials/new?*options': 'newTestimonial' 21 | } 22 | 23 | , initialize: function initialize(application) { 24 | this.application = application; 25 | } 26 | 27 | , newTestimonial: function newTestimonial() { 28 | var view = new FormView({ 29 | application: this.application 30 | }); 31 | 32 | console.log('newTestimonial function called'); 33 | 34 | view.showContent(); 35 | } 36 | }); 37 | }); -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.0/JavaScript/Testimonials.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Testimonials' 5 | , [ 6 | 'Testimonials.Router' 7 | ] 8 | , function ( 9 | Router 10 | ) 11 | { 12 | 'use strict'; 13 | 14 | return { 15 | 16 | mountToApp: function(application) { 17 | return new Router(application); 18 | } 19 | 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.0/Templates/testimonials_form.tpl: -------------------------------------------------------------------------------- 1 |
2 |

Testimonials Template: {{example}}

3 |
-------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*.js" 5 | ], 6 | "templates": [ 7 | "Templates/*" 8 | ] 9 | } 10 | } -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.1/JavaScript/Testimonials.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Testimonials.Model' 5 | , [ 6 | 'Backbone' 7 | , 'underscore' 8 | , 'Utils' 9 | ] 10 | , function TestimonialsModel( 11 | Backbone 12 | , _ 13 | , Utils 14 | ) 15 | { 16 | 'use strict'; 17 | 18 | return Backbone.Model.extend({ 19 | 20 | urlRoot: Utils.getAbsoluteUrl('services/Testimonials.Service.ss') 21 | 22 | , validation: { 23 | writerName: { 24 | required: true 25 | , rangeLength: [2, 50] 26 | } 27 | , title: { 28 | required: true 29 | , rangeLength: [2, 200] 30 | } 31 | , text: { 32 | required: true 33 | , rangeLength: [2, 999] 34 | } 35 | , rating: { 36 | required: true 37 | , rangeLength: [1, 5] 38 | } 39 | } 40 | 41 | }); 42 | }); -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.1/JavaScript/Testimonials.Router.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Testimonials.Router' 5 | , [ 6 | 'Testimonials.Form.View' 7 | , 'Testimonials.Model' 8 | , 'Backbone' 9 | ] 10 | , function TestimonialsFormRouter( 11 | FormView 12 | , Model 13 | , Backbone 14 | ) 15 | { 16 | 'use strict'; 17 | 18 | return Backbone.Router.extend({ 19 | 20 | routes: { 21 | 'testimonials/new': 'newTestimonial', 22 | 'testimonials/new?*options': 'newTestimonial' 23 | } 24 | 25 | , initialize: function initialize(application) { 26 | this.application = application; 27 | } 28 | 29 | , newTestimonial: function newTestimonial() { 30 | var model = new Model(); 31 | var view = new FormView({ 32 | application: this.application 33 | , model: model 34 | }); 35 | 36 | view.showContent(); 37 | } 38 | }); 39 | }); -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.1/JavaScript/Testimonials.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Testimonials' 5 | , [ 6 | 'Testimonials.Router' 7 | ] 8 | , function ( 9 | Router 10 | ) 11 | { 12 | 'use strict'; 13 | 14 | return { 15 | 16 | mountToApp: function(application) { 17 | return new Router(application); 18 | } 19 | 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.1/SuiteScript/Testimonials.Service.ss: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | function service (request) { 5 | 'use strict'; 6 | 7 | var Application = require('Application'); 8 | var method = request.getMethod(); 9 | var Testimonials = require('Testimonials.Model'); 10 | var requestBody; 11 | 12 | try { 13 | requestBody = JSON.parse(request.getBody() || '{}'); 14 | 15 | switch (method) { 16 | case 'POST': 17 | Testimonials.create(requestBody); 18 | Application.sendContent({message: 'Success'}, {status: '201'}); 19 | break; 20 | 21 | default: 22 | Application.sendError(methodNotAllowedError); 23 | } 24 | } catch (e) { 25 | Application.sendError(e); 26 | } 27 | } -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.1/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*.js" 5 | ], 6 | "templates": [ 7 | "Templates/*.tpl" 8 | ], 9 | "sass": [ 10 | "Sass/*.scss" 11 | ], 12 | "ssp-libraries": [ 13 | "SuiteScript/*.js" 14 | ], 15 | "services": [ 16 | "SuiteScript/*.Service.ss" 17 | ] 18 | } 19 | } -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.2/JavaScript/Testimonials.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Testimonials.Collection' 5 | , [ 6 | 'Testimonials.Model' 7 | , 'Backbone.CachedCollection' 8 | , 'underscore' 9 | , 'Utils' 10 | ] 11 | , function TestimonialsCollection( 12 | Model 13 | , BackboneCachedCollection 14 | , _ 15 | , Util 16 | ) 17 | { 18 | 'use strict' 19 | 20 | return BackboneCachedCollection.extend({ 21 | url: Util.getAbsoluteUrl('services/Testimonials.Service.ss') 22 | , model: Model 23 | , parse: function parse(response) { 24 | return response.records; 25 | } 26 | }); 27 | }); -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.2/JavaScript/Testimonials.Router.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Testimonials.Router' 5 | , [ 6 | 'Testimonials.Form.View' 7 | , 'Testimonials.Model' 8 | , 'Backbone' 9 | ] 10 | , function TestimonialsFormRouter( 11 | FormView 12 | , Model 13 | , Backbone 14 | ) 15 | { 16 | 'use strict'; 17 | 18 | return Backbone.Router.extend({ 19 | 20 | routes: { 21 | 'testimonials/new': 'newTestimonial', 22 | 'testimonials/new?*options': 'newTestimonial' 23 | } 24 | 25 | , initialize: function initialize(application) { 26 | this.application = application; 27 | } 28 | 29 | , newTestimonial: function newTestimonial() { 30 | var model = new Model(); 31 | var view = new FormView({ 32 | application: this.application 33 | , model: model 34 | }); 35 | 36 | view.showContent(); 37 | } 38 | }); 39 | }); -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.2/SuiteScript/Testimonials.Service.ss: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | function service (request) { 5 | 'use strict'; 6 | 7 | var Application = require('Application'); 8 | var method = request.getMethod(); 9 | var Testimonials = require('Testimonials.Model'); 10 | var requestBody; 11 | 12 | try { 13 | requestBody = JSON.parse(request.getBody() || '{}'); 14 | 15 | switch (method) { 16 | 17 | case 'GET': 18 | Application.sendContent(Testimonials.list()); 19 | break; 20 | 21 | case 'POST': 22 | Testimonials.create(requestBody); 23 | Application.sendContent({message: 'Success'}, {status: '201'}); 24 | break; 25 | 26 | default: 27 | Application.sendError(methodNotAllowedError); 28 | } 29 | } catch (e) { 30 | Application.sendError(e); 31 | } 32 | } -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.2/Templates/testimonials_carousel.tpl: -------------------------------------------------------------------------------- 1 | {{#if isReadyToRender}} 2 | 6 | {{/if}} -------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.2/Templates/testimonials_testimonial.tpl: -------------------------------------------------------------------------------- 1 |
2 |
{{translate '$(0): $(1) ($(2))' writerName title createdDate}}
3 |

{{text}}

4 |
-------------------------------------------------------------------------------- /samples/2016-1-mont-blanc/Testimonials@1.0.2/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*.js" 5 | ], 6 | "templates": [ 7 | "Templates/*.tpl" 8 | ], 9 | "sass": [ 10 | "Sass/*.scss" 11 | ], 12 | "ssp-libraries": [ 13 | "SuiteScript/*.js" 14 | ], 15 | "services": [ 16 | "SuiteScript/*.Service.ss" 17 | ] 18 | } 19 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.0/Configuration/ContactUs.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": 5 | { 6 | "id": "contactUs" 7 | , "title": "Contact Us" 8 | , "group": "shoppingApplication" 9 | } 10 | 11 | , "properties": 12 | { 13 | "contactUs.enabled": 14 | { 15 | "group": "shoppingApplication" 16 | , "subtab": "contactUs" 17 | , "type": "boolean" 18 | , "title": "Enabled" 19 | , "default": false 20 | } 21 | 22 | , "contactUs.formId": 23 | { 24 | "group": "shoppingApplication" 25 | , "subtab": "contactUs" 26 | , "type": "string" 27 | , "title": "Form ID" 28 | } 29 | 30 | , "contactUs.hash": 31 | { 32 | "group": "shoppingApplication" 33 | , "subtab": "contactUs" 34 | , "type": "string" 35 | , "title": "Generated Hash" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.0/JavaScript/ContactUs.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ContactUs.Model' 5 | , [ 6 | 'Backbone' 7 | , 'underscore' 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , _ 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ContactUs.Service.ss') 21 | }); 22 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.0/JavaScript/ContactUs.Router.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ContactUs.Router' 5 | , [ 6 | 'Backbone' 7 | , 'ContactUs.Model' 8 | , 'ContactUs.View' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , Model 14 | , View 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Router.extend({ 20 | routes: 21 | { 22 | 'contact-us': 'contactUs' 23 | } 24 | 25 | , initialize: function(application) 26 | { 27 | this.application = application; 28 | } 29 | 30 | , contactUs: function(options) 31 | { 32 | var view = new View({ 33 | application: this.application 34 | , model: new Model() 35 | }); 36 | 37 | view.showContent(); 38 | } 39 | }); 40 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.0/JavaScript/ContactUs.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ContactUs.View' 5 | , [ 6 | 'Backbone' 7 | , 'Backbone.FormView' 8 | , 'contact_us.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , BackboneFormView 14 | , contactUsTpl 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.View.extend({ 20 | events: 21 | { 22 | 'submit form': 'saveForm' 23 | } 24 | 25 | , initialize: function(options) 26 | { 27 | this.options = options; 28 | this.application = options.application; 29 | 30 | BackboneFormView.add(this); 31 | } 32 | 33 | , template: contactUsTpl 34 | }); 35 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.0/JavaScript/ContactUs.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ContactUs' 5 | , [ 6 | 'ContactUs.Router' 7 | , 'SC.Configuration' 8 | ] 9 | , function 10 | ( 11 | Router 12 | , Configuration 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return { 18 | mountToApp: function(application) 19 | { 20 | var enabled = Configuration.get('contactUs.enabled'); 21 | 22 | if (enabled) 23 | { 24 | return new Router(application); 25 | } 26 | } 27 | } 28 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.0/SuiteScript/ContactUs.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ContactUs.ServiceController' 5 | , [ 6 | 'ServiceController' 7 | , 'Application' 8 | , 'ContactUs.Model' 9 | ] 10 | , function 11 | ( 12 | ServiceController 13 | , Application 14 | , ContactUsModel 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return ServiceController.extend({ 20 | name: 'ContactUs.ServiceController' 21 | 22 | , post: function() 23 | { 24 | this.sendContent(ContactUsModel.create(this.data)); 25 | } 26 | }); 27 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.0/Templates/contact_us.tpl: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 |
22 |
-------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "autogenerated-services": 5 | { 6 | "ContactUs.Service.ss": "ContactUs.ServiceController" 7 | } 8 | , "configuration": 9 | [ 10 | "Configuration/*.json" 11 | ] 12 | , "javascript": 13 | [ 14 | "JavaScript/*.js" 15 | ] 16 | , "sass": 17 | [ 18 | "Sass/*.scss" 19 | ] 20 | , "ssp-libraries": 21 | [ 22 | "SuiteScript/*.js" 23 | ] 24 | , "templates": 25 | [ 26 | "Templates/*.tpl" 27 | ] 28 | } 29 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.1/Configuration/ContactUs.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": 5 | { 6 | "id": "contactUs" 7 | , "title": "Contact Us" 8 | , "group": "shoppingApplication" 9 | } 10 | 11 | , "properties": 12 | { 13 | "contactUs.enabled": 14 | { 15 | "group": "shoppingApplication" 16 | , "subtab": "contactUs" 17 | , "type": "boolean" 18 | , "title": "Enabled" 19 | , "default": false 20 | } 21 | 22 | , "contactUs.formId": 23 | { 24 | "group": "shoppingApplication" 25 | , "subtab": "contactUs" 26 | , "type": "string" 27 | , "title": "Form ID" 28 | } 29 | 30 | , "contactUs.hash": 31 | { 32 | "group": "shoppingApplication" 33 | , "subtab": "contactUs" 34 | , "type": "string" 35 | , "title": "Generated Hash" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.1/JavaScript/ContactUs.Router.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ContactUs.Router' 5 | , [ 6 | 'Backbone' 7 | , 'ContactUs.Model' 8 | , 'ContactUs.View' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , Model 14 | , View 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Router.extend({ 20 | routes: 21 | { 22 | 'contact-us': 'contactUs' 23 | } 24 | 25 | , initialize: function(application) 26 | { 27 | this.application = application; 28 | } 29 | 30 | , contactUs: function(options) 31 | { 32 | var view = new View({ 33 | application: this.application 34 | , model: new Model() 35 | }); 36 | 37 | view.showContent(); 38 | } 39 | }); 40 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.1/JavaScript/ContactUs.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ContactUs' 5 | , [ 6 | 'ContactUs.Router' 7 | , 'SC.Configuration' 8 | ] 9 | , function 10 | ( 11 | Router 12 | , Configuration 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return { 18 | mountToApp: function(application) 19 | { 20 | // This is a basic way of only enabling functionality if it has been enabled: get the config option from the backend and if it's set to true, then create a router. 21 | var enabled = Configuration.get('contactUs.enabled'); 22 | 23 | if (enabled) 24 | { 25 | return new Router(application); 26 | } 27 | } 28 | } 29 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.1/Sass/_contactus-form.scss: -------------------------------------------------------------------------------- 1 | .contactus-container { 2 | @extend .container; 3 | } 4 | 5 | .contactus-form { 6 | margin: $sc-base-margin * 3; 7 | } 8 | 9 | .contactus-firstname, 10 | .contactus-lastname, 11 | .contactus-email, 12 | .contactus-subject, 13 | .contactus-message { 14 | @extend .row; 15 | 16 | label { 17 | @extend .input-label; 18 | } 19 | 20 | input { 21 | @extend .input-large; 22 | } 23 | } 24 | 25 | .contactus-message textarea { 26 | @extend .input-textarea; 27 | display: block; 28 | width: 100%; 29 | } 30 | 31 | .contactus-required { 32 | @extend .input-required; 33 | } 34 | 35 | .contactus-button-container { 36 | @extend .row; 37 | margin-top: $sc-base-margin * 4; 38 | } 39 | 40 | .contactus-button-submit { 41 | @extend .button-primary; 42 | @extend .button-medium; 43 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.1/SuiteScript/ContactUs.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ContactUs.ServiceController' 5 | , [ 6 | 'ServiceController' 7 | , 'Application' 8 | , 'ContactUs.Model' 9 | ] 10 | , function 11 | ( 12 | ServiceController 13 | , Application 14 | , ContactUsModel 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return ServiceController.extend({ 20 | name: 'ContactUs.ServiceController' 21 | 22 | , post: function() 23 | { 24 | this.sendContent(ContactUsModel.create(this.data)); 25 | } 26 | }); 27 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/ContactUs@1.0.1/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "autogenerated-services": 5 | { 6 | "ContactUs.Service.ss": "ContactUs.ServiceController" 7 | } 8 | , "configuration": 9 | [ 10 | "Configuration/*.json" 11 | ] 12 | , "javascript": 13 | [ 14 | "JavaScript/*.js" 15 | ] 16 | , "sass": 17 | [ 18 | "Sass/*.scss" 19 | ] 20 | , "ssp-libraries": 21 | [ 22 | "SuiteScript/*.js" 23 | ] 24 | , "templates": 25 | [ 26 | "Templates/*.tpl" 27 | ] 28 | } 29 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/FreeShippingBar@1.0.0/Configuration/FreeShippingBar.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": { 5 | "id": "freeshippingbar" 6 | , "group": "shoppingApplication" 7 | , "title": "Free Shipping Bar" 8 | } 9 | 10 | , "properties" : { 11 | "freeshippingbar.isEnabled": { 12 | "group": "shoppingApplication" 13 | , "subtab": "freeshippingbar" 14 | , "type": "boolean" 15 | , "default": false 16 | , "title": "Enable Free Shipping Bar" 17 | } 18 | , "freeshippingbar.threshold.usd": { 19 | "group": "shoppingApplication" 20 | , "subtab": "freeshippingbar" 21 | , "type": "integer" 22 | , "default": 50 23 | , "title": "Free Shipping Threshold (USD)" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/FreeShippingBar@1.0.0/JavaScript/FreeShippingBar.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('FreeShippingBar' 5 | , [ 6 | 'Cart.Summary.View' 7 | , 'FreeShippingBar.View' 8 | , 'SC.Configuration' 9 | ] 10 | , function ( 11 | CartSummaryView 12 | , FreeShippingBarView 13 | , Configuration 14 | ) 15 | { 16 | 'use strict'; 17 | 18 | return { 19 | 20 | isEnabled: function isEnabled() { 21 | return Configuration.get('freeshippingbar.isEnabled'); 22 | } 23 | 24 | , mountToApp: function(application) 25 | { 26 | if (this.isEnabled()) 27 | { 28 | CartSummaryView.prototype.childViews.FreeShippingBar = function() 29 | { 30 | return new FreeShippingBarView({ 31 | model: this.model 32 | }) 33 | } 34 | } 35 | } 36 | } 37 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/FreeShippingBar@1.0.0/Sass/_free-shipping-bar.scss: -------------------------------------------------------------------------------- 1 | .free-shipping-bar-container { 2 | padding-bottom: $sc-base-padding * 3; 3 | } 4 | 5 | .free-shipping-bar-message { 6 | padding: $sc-base-padding * 2; 7 | text-align: center; 8 | } 9 | 10 | .free-shipping-bar-progress { 11 | max-width: 100%; 12 | background: red; 13 | height: 25px; 14 | } 15 | 16 | .free-shipping-bar-message-tooltip { 17 | @extend .sc-tooltip; 18 | @extend .icon-question-sign; 19 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/FreeShippingBar@1.0.0/Templates/free_shipping_bar.tpl: -------------------------------------------------------------------------------- 1 |
2 |

3 | {{message}} 4 | 5 |

6 |
7 |
-------------------------------------------------------------------------------- /samples/2016-2-vinson/FreeShippingBar@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*.js" 5 | ], 6 | "templates": [ 7 | "Templates/*.tpl" 8 | ], 9 | "sass": [ 10 | "Sass/*.scss" 11 | ], 12 | "configuration": [ 13 | "Configuration/*.json" 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.0/JavaScript/MyReviews.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.Collection' 5 | , [ 6 | 'Backbone' 7 | , 'MyReviews.Model' 8 | , 'underscore' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , Model 14 | , _ 15 | ) 16 | { 17 | return Backbone.Collection.extend({ 18 | model: Model 19 | , url: _.getAbsoluteUrl('services/MyReviews.Service.ss') 20 | }) 21 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.0/JavaScript/MyReviews.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.Details.View' 5 | , [ 6 | 'Backbone' 7 | , 'myreviews_details.tpl' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , myreviews_details_tpl 13 | ) 14 | { 15 | return Backbone.View.extend ({ 16 | template: myreviews_details_tpl 17 | 18 | , getContext: function() 19 | { 20 | return { 21 | reviewid: this.model.get('reviewid') 22 | , rating: this.model.get('rating') 23 | , text: this.model.get('text') 24 | , itemid: this.model.get('itemid') 25 | , created: this.model.get('created') 26 | } 27 | } 28 | }) 29 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.0/JavaScript/MyReviews.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.Model' 5 | , [ 6 | 'Backbone' 7 | , 'underscore' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , _ 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.Model.extend ({ 18 | urlRoot: _.getAbsoluteUrl('services/MyReviews.Service.ss') 19 | }) 20 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.0/JavaScript/MyReviews.Router.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.Router' 5 | , [ 6 | 'Backbone' 7 | , 'MyReviews.List.View' 8 | , 'MyReviews.Collection' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , ListView 14 | , CollectionView 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Router.extend({ 20 | routes: 21 | { 22 | 'myreviews': 'listReviews' 23 | } 24 | 25 | , initialize: function (application) 26 | { 27 | this.application = application; 28 | } 29 | 30 | , listReviews: function () 31 | { 32 | var collection = new CollectionView(); 33 | var view = new ListView 34 | ({ 35 | collection: collection 36 | , application: this.application 37 | }); 38 | 39 | collection.fetch().done(function() 40 | { 41 | view.showContent(); 42 | }); 43 | } 44 | }) 45 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.0/JavaScript/MyReviews.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews' 5 | , [ 6 | 'MyReviews.Router' 7 | ] 8 | , function 9 | ( 10 | Router 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function(application) 17 | { 18 | return new Router(application); 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.0/SuiteScript/MyReviews.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.ServiceController' 5 | , [ 6 | 'ServiceController' 7 | , 'MyReviews.Model' 8 | ] 9 | , function 10 | ( 11 | ServiceController 12 | , MyReviewsModel 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return ServiceController.extend({ 18 | 19 | name: 'ProductReviews.ServiceController' 20 | 21 | , options: 22 | { 23 | common: { 24 | requireLogin: true 25 | } 26 | } 27 | 28 | , get: function () 29 | { 30 | return MyReviewsModel.list() 31 | } 32 | }) 33 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.0/Templates/myreviews_details.tpl: -------------------------------------------------------------------------------- 1 |

ID: {{reviewid}}

2 |

Rating: {{rating}}

3 |

Text: {{text}}

4 |

Item: {{itemid}}

5 |

Created: {{created}}

-------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.0/Templates/myreviews_list.tpl: -------------------------------------------------------------------------------- 1 |

My Reviewed Products

2 |
-------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*" 5 | ], 6 | "ssp-libraries": [ 7 | "SuiteScript/*.js" 8 | ], 9 | "templates": [ 10 | "Templates/*" 11 | ], 12 | "autogenerated-services": { 13 | "MyReviews.Service.ss": "MyReviews.ServiceController" 14 | }, 15 | "sass": [ 16 | "Sass/**/*.scss" 17 | ], 18 | "configuration": [ 19 | "Configuration/*.json" 20 | ] 21 | } 22 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.1/JavaScript/MyReviews.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.Collection' 5 | , [ 6 | 'Backbone' 7 | , 'MyReviews.Model' 8 | , 'underscore' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , Model 14 | , _ 15 | ) 16 | { 17 | return Backbone.Collection.extend({ 18 | model: Model 19 | , url: _.getAbsoluteUrl('services/MyReviews.Service.ss') 20 | }) 21 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.1/JavaScript/MyReviews.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.Model' 5 | , [ 6 | 'Backbone' 7 | , 'underscore' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , _ 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.Model.extend ({ 18 | urlRoot: _.getAbsoluteUrl('services/MyReviews.Service.ss') 19 | }) 20 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.1/JavaScript/MyReviews.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews' 5 | , [ 6 | 'MyReviews.Router' 7 | ] 8 | , function 9 | ( 10 | Router 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function(application) 17 | { 18 | return new Router(application); 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.1/SuiteScript/MyReviews.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.ServiceController' 5 | , [ 6 | 'ServiceController' 7 | , 'MyReviews.Model' 8 | ] 9 | , function 10 | ( 11 | ServiceController 12 | , MyReviewsModel 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return ServiceController.extend({ 18 | 19 | name: 'ProductReviews.ServiceController' 20 | 21 | , options: 22 | { 23 | common: { 24 | requireLogin: true 25 | } 26 | } 27 | 28 | , get: function () 29 | { 30 | return MyReviewsModel.list() 31 | } 32 | }) 33 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.1/Templates/myreviews_details.tpl: -------------------------------------------------------------------------------- 1 |

ID: {{reviewid}}

2 |

Rating: {{rating}}

3 |

Text: {{text}}

4 |

Item: {{itemid}}

5 |

Created: {{created}}

6 |

Display Name: {{displayname}}

7 |

URL Component: {{urlcomponent}}

8 |

Img:

-------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.1/Templates/myreviews_list.tpl: -------------------------------------------------------------------------------- 1 |

My Reviewed Products

2 |
-------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.1/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*" 5 | ], 6 | "ssp-libraries": [ 7 | "SuiteScript/*.js" 8 | ], 9 | "templates": [ 10 | "Templates/*" 11 | ], 12 | "autogenerated-services": { 13 | "MyReviews.Service.ss": "MyReviews.ServiceController" 14 | }, 15 | "sass": [ 16 | "Sass/**/*.scss" 17 | ], 18 | "configuration": [ 19 | "Configuration/*.json" 20 | ] 21 | } 22 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.2/Configuration/MyReviews.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": { 5 | "id": "myreviews" 6 | , "group": "myAccountApp" 7 | , "title": "My Reviews" 8 | } 9 | 10 | , "properties" : { 11 | "myreviews.isEnabled": { 12 | "group": "myAccountApp" 13 | , "subtab": "myreviews" 14 | , "type": "boolean" 15 | , "default": false 16 | , "title": "Enable My Reviews" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.2/JavaScript/MyReviews.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.Collection' 5 | , [ 6 | 'Backbone' 7 | , 'MyReviews.Model' 8 | , 'underscore' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , Model 14 | , _ 15 | ) 16 | { 17 | return Backbone.Collection.extend({ 18 | model: Model 19 | , url: _.getAbsoluteUrl('services/MyReviews.Service.ss') 20 | }) 21 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.2/JavaScript/MyReviews.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.Model' 5 | , [ 6 | 'Backbone' 7 | , 'underscore' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , _ 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.Model.extend ({ 18 | urlRoot: _.getAbsoluteUrl('services/MyReviews.Service.ss') 19 | }) 20 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.2/JavaScript/MyReviews.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews' 5 | , [ 6 | 'MyReviews.Router' 7 | , 'SC.Configuration' 8 | ] 9 | , function 10 | ( 11 | Router 12 | , Configuration 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return { 18 | MenuItems: function() 19 | { 20 | if (Configuration.get('myreviews.isEnabled')) 21 | { 22 | return { 23 | id: 'myreviews' 24 | , parent: 'orders' 25 | , name: _('My Reviewed Products').translate() 26 | , url: 'myreviews' 27 | , index: 5 28 | } 29 | } 30 | } 31 | 32 | , mountToApp: function(application) 33 | { 34 | // remember to enable this functionality in the backend! 35 | if (Configuration.get('myreviews.isEnabled')) 36 | { 37 | return new Router(application); 38 | } 39 | } 40 | } 41 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.2/Sass/_myreviews-details.scss: -------------------------------------------------------------------------------- 1 | .myreviews-detail-container { 2 | @extend .row; 3 | margin: $sc-medium-margin 0; 4 | } 5 | .myreviews-detail-side { 6 | @extend .col-xs-3; 7 | padding-top: $sc-base-padding; 8 | } 9 | .myreviews-detail-body { 10 | @extend .col-xs-9; 11 | padding-top: $sc-base-padding; 12 | } 13 | .myreviews-detail-body-rating { 14 | display: inline-block; 15 | } 16 | .myreviews-detail-body-date { 17 | font-weight: $sc-font-weight-bold; 18 | font-size: $sc-button-small-font-size; 19 | color: $sc-color-theme; 20 | } -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.2/SuiteScript/MyReviews.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('MyReviews.ServiceController' 5 | , [ 6 | 'ServiceController' 7 | , 'MyReviews.Model' 8 | ] 9 | , function 10 | ( 11 | ServiceController 12 | , MyReviewsModel 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return ServiceController.extend({ 18 | 19 | name: 'ProductReviews.ServiceController' 20 | 21 | , options: 22 | { 23 | common: { 24 | requireLogin: true 25 | } 26 | } 27 | 28 | , get: function () 29 | { 30 | return MyReviewsModel.list() 31 | } 32 | }) 33 | }); -------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.2/Templates/myreviews_details.tpl: -------------------------------------------------------------------------------- 1 |
2 |

{{displayname}}

3 |
4 | 5 |
6 |
7 |

{{text}}

8 |

9 |

{{created}}

10 |
11 |
-------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.2/Templates/myreviews_list.tpl: -------------------------------------------------------------------------------- 1 |

My Reviewed Products

2 |
-------------------------------------------------------------------------------- /samples/2016-2-vinson/MyReviews@1.0.2/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*" 5 | ], 6 | "ssp-libraries": [ 7 | "SuiteScript/*.js" 8 | ], 9 | "templates": [ 10 | "Templates/*" 11 | ], 12 | "autogenerated-services": { 13 | "MyReviews.Service.ss": "MyReviews.ServiceController" 14 | }, 15 | "sass": [ 16 | "Sass/**/*.scss" 17 | ], 18 | "configuration": [ 19 | "Configuration/*.json" 20 | ] 21 | } 22 | } -------------------------------------------------------------------------------- /samples/2017-1-elbrus/360Images@1.0.0/Configuration/360Images.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | 4 | "properties": { 5 | 6 | "imagesThreeSixty": { 7 | "group": "catalog", 8 | "type": "array", 9 | "title": "Product 360 Image", 10 | "description": "Configure the 360 images for the PDP", 11 | "items": { 12 | "type": "object", 13 | "properties": { 14 | "name": { 15 | "type": "string", 16 | "title": "Image file name", 17 | "description": "", 18 | "mandatory": true 19 | }, 20 | "frames": { 21 | "type": "integer", 22 | "title": "Total frames", 23 | "description": "", 24 | "mandatory": true 25 | }, 26 | "footage": { 27 | "type": "integer", 28 | "title": "Number of columns", 29 | "description": "", 30 | "mandatory": true 31 | } 32 | } 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /samples/2017-1-elbrus/360Images@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "configuration": [ 4 | "Configuration/*" 5 | ] 6 | , "javascript": [ 7 | "JavaScript/*" 8 | ] 9 | , "templates": [ 10 | "Templates/*" 11 | ] 12 | } 13 | , "overrides": { 14 | "suitecommerce/ProductDetails@1.0.0/Templates/product_details_image_gallery.tpl": "Templates/product_details_image_gallery.tpl" 15 | } 16 | } -------------------------------------------------------------------------------- /samples/2017-1-elbrus/CustomFacetViews@1.0.0/Configuration/CustomFacetViews.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | , "modifications": 4 | [{ 5 | "target": "$.resource.template.facets-item-cell" 6 | , "action": "add" 7 | , "value": "facets_item_cell_portrait.tpl" 8 | }] 9 | } -------------------------------------------------------------------------------- /samples/2017-1-elbrus/CustomFacetViews@1.0.0/JavaScript/CustomFacetViews.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define( 5 | 'CustomFacetViews' 6 | , [ 7 | 'Facets.Browse.View' 8 | , 'jQuery' 9 | , 'facets_item_cell_portrait.tpl' 10 | ] 11 | , function ( 12 | BrowseView 13 | , jQuery 14 | ) 15 | { 16 | 'use strict'; 17 | 18 | _.extend(BrowseView.prototype, 19 | { 20 | showContent: _.wrap(BrowseView.prototype.showContent, function(fn) 21 | { 22 | fn.apply(this, _.toArray(arguments).slice(1)); 23 | var displayOption = this.translator.options.display; 24 | 25 | if (displayOption === 'portrait') 26 | { 27 | self.jQuery('.facets-facet-browse-items').addClass('facets-facet-browse-portrait'); 28 | } 29 | }) 30 | }); 31 | }); -------------------------------------------------------------------------------- /samples/2017-1-elbrus/CustomFacetViews@1.0.0/Sass/_facets-item-cell-portrait.scss: -------------------------------------------------------------------------------- 1 | .facets-facet-browse-portrait { 2 | display: flex; 3 | overflow: auto; 4 | } 5 | 6 | .facets-item-cell-portrait { 7 | width: 65vw; 8 | } 9 | 10 | .facets-item-cell-portrait-name, 11 | .facets-item-cell-portrait-quickaddtocart { 12 | text-align: center; 13 | margin: $sc-small-margin 0; 14 | } 15 | 16 | .icon-display-portrait { 17 | @extend .fa; 18 | @extend %fa-picture-o; 19 | } -------------------------------------------------------------------------------- /samples/2017-1-elbrus/CustomFacetViews@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "configuration": [ 4 | "Configuration/*" 5 | ] 6 | , "javascript": [ 7 | "JavaScript/*" 8 | ] 9 | , "sass": [ 10 | "Sass/*" 11 | ] 12 | , "templates": [ 13 | "Templates/*" 14 | ] 15 | } 16 | } -------------------------------------------------------------------------------- /samples/2017-1-elbrus/PromoDrawer@1.0.0/JavaScript/PromoDrawer.Drawer.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('PromoDrawer.Drawer.View' 5 | , [ 6 | 'Backbone' 7 | , 'jQuery' 8 | , 'promodrawer_drawer.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , jQuery 14 | , promodrawerDrawerTpl 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.View.extend({ 20 | template: promodrawerDrawerTpl 21 | 22 | , events: 23 | { 24 | 'click .promodrawer-drawer-handle' : 'toggleDrawer' 25 | } 26 | 27 | , toggleDrawer: function() 28 | { 29 | jQuery('.promodrawer-drawer').toggleClass('open'); 30 | jQuery.cookie('readPromoNotifications1', true, { expires: 30, path: '/' }); 31 | jQuery('.promodrawer-notification-icon').removeClass('unread'); 32 | } 33 | }); 34 | }); -------------------------------------------------------------------------------- /samples/2017-1-elbrus/PromoDrawer@1.0.0/Templates/promodrawer_drawer.tpl: -------------------------------------------------------------------------------- 1 |
2 |

Check out these great offers!

3 |
4 |
5 |
6 |

1

7 |
8 |
9 |

2

10 |
11 |
12 |

3

13 |
14 |
-------------------------------------------------------------------------------- /samples/2017-1-elbrus/PromoDrawer@1.0.0/Templates/promodrawer_notification.tpl: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
-------------------------------------------------------------------------------- /samples/2017-1-elbrus/PromoDrawer@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "configuration": ["Configuration/*.json"] 5 | , "javascript": ["JavaScript/*.js"] 6 | , "templates": ["Templates/*.tpl"] 7 | , "sass": ["Sass/*.scss"] 8 | } 9 | } -------------------------------------------------------------------------------- /samples/2017-1-elbrus/RefinementStorer@1.0.0/Configuration/RefinementStorer.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": { 5 | "id": "refinementStorer" 6 | , "group": "catalog" 7 | , "title": "Refinement Storer" 8 | } 9 | 10 | , "properties": { 11 | "refinementStorer.enabled": { 12 | "group": "catalog" 13 | , "type": "boolean" 14 | , "subtab": "refinementStorer" 15 | , "title": "Enabled" 16 | , "default": true 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /samples/2017-1-elbrus/RefinementStorer@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": { 3 | "javascript": [ 4 | "JavaScript/*" 5 | ] 6 | , "configuration": [ 7 | "Configuration/*" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/CCTOnSaleBanner@1.0.0/Images/orangethings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-samples/netsuite-commerce/96d590b54908a0943eaaa325ab22f44c02db9691/samples/2017-2-kilimanjaro/CCTOnSaleBanner@1.0.0/Images/orangethings.png -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/CCTOnSaleBanner@1.0.0/JavaScript/CCTOnSaleBanner.View.js: -------------------------------------------------------------------------------- 1 | define('CCTOnSaleBanner.View' 2 | , [ 3 | 'CustomContentType.Base.View' 4 | 5 | , 'SC.Configuration' 6 | 7 | , 'cct_onsale_banner.tpl' 8 | ] 9 | , function 10 | ( 11 | BaseView 12 | 13 | , Configuration 14 | 15 | , Template 16 | ) 17 | { 18 | 'use strict'; 19 | 20 | return BaseView.extend({ 21 | template: Template 22 | 23 | , contextDataRequest: ['item'] 24 | 25 | , getContext: function () 26 | { 27 | var item = this.contextData.item() 28 | , field = this.settings.custrecord_cct_onsale_field 29 | 30 | return { 31 | onsale: item.get(field) 32 | , banner: this.settings.custrecord_cct_onsale_img 33 | , searchURL: Configuration.get('defaultSearchUrl') + '?' + field + '=true' 34 | } 35 | } 36 | }); 37 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/CCTOnSaleBanner@1.0.0/JavaScript/CCTOnSaleBanner.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('CCTOnSaleBanner' 5 | , [ 6 | 'CCTOnSaleBanner.View' 7 | ] 8 | , function 9 | ( 10 | View 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function (application) 17 | { 18 | application.getComponent('CMS').registerCustomContentType({ 19 | id: 'sc_cct_onsale_banner' 20 | , view: View 21 | }); 22 | } 23 | } 24 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/CCTOnSaleBanner@1.0.0/Sass/_cctonsalebanner.scss: -------------------------------------------------------------------------------- 1 | .product-details-full-divider-desktop { 2 | display: none; 3 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/CCTOnSaleBanner@1.0.0/Templates/cct_onsale_banner.tpl: -------------------------------------------------------------------------------- 1 | {{#if onsale}} 2 |

3 | {{/if}} -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/CCTOnSaleBanner@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "images": ["Images/*"] 5 | , "javascript": ["JavaScript/*"] 6 | , "sass": ["Sass/**/*.scss"] 7 | , "templates": ["Templates/*"] 8 | } 9 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/CustomHeader@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "sass": ["Sass/**/*.scss"] 5 | , "templates": ["Templates/*"] 6 | } 7 | , "overrides": { 8 | "suitecommerce/Header@1.3.1/Templates/header.tpl": "Templates/custom_header.tpl" 9 | , "suitecommerce/Header@1.3.1/Templates/header_profile.tpl": "Templates/custom_profile.tpl" 10 | } 11 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleCorrelated@1.0.0/JavaScript/ExampleCorrelated.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleCorrelated.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleCorrelated.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleCorrelated@1.0.0/JavaScript/ExampleCorrelated.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleCorrelated' 5 | , [ 6 | 'ExampleCorrelated.Router' 7 | ] 8 | , function 9 | ( 10 | Router 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function (application) 17 | { 18 | return new Router(application) 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleCorrelated@1.0.0/SuiteScript/ExampleCorrelated.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleCorrelated.ServiceController' 5 | , [ 6 | 'ExampleCorrelated.Model' 7 | , 'ServiceController' 8 | , 'Application' 9 | ] 10 | , function 11 | ( 12 | Model 13 | , ServiceController 14 | , Application 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return ServiceController.extend({ 20 | 21 | name: 'ExampleCorrelated.ServiceController' 22 | 23 | , options: 24 | { 25 | common: 26 | { 27 | requireLogin: true 28 | } 29 | } 30 | 31 | , get: function () 32 | { 33 | return Model.getAbandonedIds(); 34 | } 35 | 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleCorrelated@1.0.0/Templates/example_correlated.tpl: -------------------------------------------------------------------------------- 1 |

It looks like you left some items in your cart recently, why not take a look at these suggested items?

2 |

(Returned IDs for debugging: {{ids}})

3 |
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleCorrelated@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"ExampleCorrelated.Service.ss": "ExampleCorrelated.ServiceController"} 8 | } 9 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleLocation@1.0.0/JavaScript/ExampleLocation.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleLocation.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleLocation.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleLocation@1.0.0/JavaScript/ExampleLocation.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleLocation.View' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'example_location.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Template 15 | ) 16 | { 17 | 'use strict' 18 | 19 | return Backbone.View.extend ({ 20 | 21 | getContext: function () 22 | { 23 | return { 24 | name: this.model.get('name') 25 | , latitude: this.model.get('latitude') 26 | , longitude: this.model.get('longitude') 27 | } 28 | } 29 | 30 | , initialize: function (options) 31 | { 32 | this.options = options; 33 | this.application = options.application; 34 | } 35 | 36 | , template: Template 37 | }); 38 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleLocation@1.0.0/JavaScript/ExampleLocation.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleLocation' 5 | , [ 6 | 'ExampleLocation.Router' 7 | ] 8 | , function 9 | ( 10 | Router 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function (application) 17 | { 18 | return new Router(application) 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleLocation@1.0.0/SuiteScript/ExampleLocation.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleLocation.ServiceController' 5 | , [ 6 | 'Application' 7 | , 'ServiceController' 8 | , 'ExampleLocation.Model' 9 | ] 10 | , function 11 | ( 12 | Application 13 | , ServiceController 14 | , Model 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return ServiceController.extend({ 20 | name: 'ExampleLocation.ServiceController' 21 | 22 | , get: function () 23 | { 24 | var id = this.request.getParameter('internalid'); 25 | return Model.get(id) 26 | } 27 | }) 28 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleLocation@1.0.0/Templates/example_location.tpl: -------------------------------------------------------------------------------- 1 |

Location

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
NameLatitudeLongitude
{{name}}{{latitude}}{{longitude}}
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleLocation@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"ExampleLocation.Service.ss": "ExampleLocation.ServiceController"} 8 | } 9 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExamplePublishPush@1.0.0/SuiteScript/ExamplePublishPush.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExamplePublishPush.Model' 5 | , [ 6 | 'SC.Model' 7 | ] 8 | , function 9 | ( 10 | SCModel 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return SCModel.extend({ 16 | name: 'ExamplePublishPush' 17 | 18 | , setSomeValueOrSomething: function () 19 | { 20 | // Call my thing, do some work, etc 21 | return 'Looks like everything loaded just fine' 22 | } 23 | }) 24 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExamplePublishPush@1.0.0/SuiteScript/ExamplePublishPushThing.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExamplePublishPushThing' 5 | , [ 6 | 'Configuration' 7 | ] 8 | , function ExamplePublishPushThing 9 | ( 10 | Configuration 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | Configuration.publish = Configuration.publish || []; 16 | 17 | Configuration.publish.push({ 18 | key: 'ExamplePublishPush' 19 | , model: 'ExamplePublishPush.Model' 20 | , call: 'setSomeValueOrSomething' 21 | }); 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExamplePublishPush@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "ssp-libraries": ["SuiteScript/*.js"] 5 | } 6 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.0/Configuration/ExampleSuiteScript.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": 5 | { 6 | "id": "exampleSuiteScript" 7 | , "title": "Example SuiteScript Module" 8 | , "group": "shoppingApplication" 9 | } 10 | 11 | , "properties": 12 | { 13 | "exampleSuiteScript.enabled": 14 | { 15 | "group": "shoppingApplication" 16 | , "subtab": "exampleSuiteScript" 17 | , "type": "boolean" 18 | , "title": "Enabled" 19 | , "default": false 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.0/JavaScript/ExampleSuiteScript.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.0/JavaScript/ExampleSuiteScript.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript' 5 | , [ 6 | 'ExampleSuiteScript.Router' 7 | 8 | , 'SC.Configuration' 9 | ] 10 | , function 11 | ( 12 | Router 13 | 14 | , Configuration 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | if (Configuration.exampleSuiteScript.enabled) 20 | { 21 | return { 22 | mountToApp: function (application) 23 | { 24 | return new Router(application) 25 | } 26 | } 27 | } 28 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.0/Sass/_examplesuitescript.scss: -------------------------------------------------------------------------------- 1 | .examplesuitescript-container { 2 | @extend .container; 3 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.0/SuiteScript/ExampleSuiteScript.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Model' 5 | , [ 6 | 'Models.Init' 7 | , 'SC.Model' 8 | ] 9 | , function 10 | ( 11 | CommerceAPI 12 | , SCModel 13 | ) 14 | { 15 | 16 | 'use strict'; 17 | 18 | return SCModel.extend({ 19 | name: 'ExampleSuiteScript' 20 | 21 | , get: function (id) 22 | { 23 | return { 24 | internalid: '0' 25 | , faveColor: 'red' 26 | , faveNumber: '7' 27 | , faveFruit: 'apple' 28 | } 29 | } 30 | 31 | , update: function (id, data) 32 | { 33 | return null 34 | } 35 | 36 | , create: function (data) 37 | { 38 | return null 39 | } 40 | 41 | , remove: function (id) 42 | { 43 | return null 44 | } 45 | }) 46 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.0/Templates/example_suitescript.tpl: -------------------------------------------------------------------------------- 1 |

My Favorite Things

2 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"ExampleSuiteScript.Service.ss": "ExampleSuiteScript.ServiceController"} 8 | , "configuration": ["Configuration/*.json"] 9 | , "sass": ["Sass/*.scss"] 10 | } 11 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.1/Configuration/ExampleSuiteScript.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": 5 | { 6 | "id": "exampleSuiteScript" 7 | , "title": "Example SuiteScript Module" 8 | , "group": "shoppingApplication" 9 | } 10 | 11 | , "properties": 12 | { 13 | "exampleSuiteScript.enabled": 14 | { 15 | "group": "shoppingApplication" 16 | , "subtab": "exampleSuiteScript" 17 | , "type": "boolean" 18 | , "title": "Enabled" 19 | , "default": false 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.1/JavaScript/ExampleSuiteScript.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Collection' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'ExampleSuiteScript.Model' 9 | 10 | , 'Utils' 11 | ] 12 | , function 13 | ( 14 | Backbone 15 | 16 | , Model 17 | 18 | , Utils 19 | ) 20 | { 21 | 'use strict'; 22 | 23 | return Backbone.Collection.extend({ 24 | url: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 25 | , model: Model 26 | }) 27 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.1/JavaScript/ExampleSuiteScript.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Details.View' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'example_suitescript_details.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Template 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.View.extend ({ 20 | template: Template 21 | 22 | , getContext: function () 23 | { 24 | return { 25 | faveThing: this.model.get('faveThing') 26 | , faveReason: this.model.get('faveReason') 27 | } 28 | } 29 | }) 30 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.1/JavaScript/ExampleSuiteScript.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.1/JavaScript/ExampleSuiteScript.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript' 5 | , [ 6 | 'ExampleSuiteScript.Router' 7 | 8 | , 'SC.Configuration' 9 | ] 10 | , function 11 | ( 12 | Router 13 | 14 | , Configuration 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | if (Configuration.exampleSuiteScript.enabled) 20 | { 21 | return { 22 | mountToApp: function (application) 23 | { 24 | return new Router(application) 25 | } 26 | } 27 | } 28 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.1/Sass/_examplesuitescript.scss: -------------------------------------------------------------------------------- 1 | .examplesuitescript-container { 2 | @extend .container; 3 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.1/Templates/example_suitescript_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{faveThing}} 3 | {{faveReason}} 4 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.1/Templates/example_suitescript_list.tpl: -------------------------------------------------------------------------------- 1 |

My Favorite Things

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
Thing I LikeReason I Like It
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.1/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"ExampleSuiteScript.Service.ss": "ExampleSuiteScript.ServiceController"} 8 | , "configuration": ["Configuration/*.json"] 9 | , "sass": ["Sass/*.scss"] 10 | } 11 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/Configuration/ExampleSuiteScript.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": 5 | { 6 | "id": "exampleSuiteScript" 7 | , "title": "Example SuiteScript Module" 8 | , "group": "shoppingApplication" 9 | } 10 | 11 | , "properties": 12 | { 13 | "exampleSuiteScript.enabled": 14 | { 15 | "group": "shoppingApplication" 16 | , "subtab": "exampleSuiteScript" 17 | , "type": "boolean" 18 | , "title": "Enabled" 19 | , "default": false 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/JavaScript/ExampleSuiteScript.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Collection' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'ExampleSuiteScript.Model' 9 | 10 | , 'Utils' 11 | ] 12 | , function 13 | ( 14 | Backbone 15 | 16 | , Model 17 | 18 | , Utils 19 | ) 20 | { 21 | 'use strict'; 22 | 23 | return Backbone.Collection.extend({ 24 | url: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 25 | , model: Model 26 | }) 27 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/JavaScript/ExampleSuiteScript.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Details.View' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'example_suitescript_details.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Template 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.View.extend ({ 20 | template: Template 21 | 22 | , getContext: function () 23 | { 24 | return { 25 | faveThing: this.model.get('faveThing') 26 | , faveReason: this.model.get('faveReason') 27 | } 28 | } 29 | }) 30 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/JavaScript/ExampleSuiteScript.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/JavaScript/ExampleSuiteScript.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript' 5 | , [ 6 | 'ExampleSuiteScript.Router' 7 | 8 | , 'SC.Configuration' 9 | ] 10 | , function 11 | ( 12 | Router 13 | 14 | , Configuration 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | if (Configuration.exampleSuiteScript.enabled) 20 | { 21 | return { 22 | mountToApp: function (application) 23 | { 24 | return new Router(application) 25 | } 26 | } 27 | } 28 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/Sass/_examplesuitescript.scss: -------------------------------------------------------------------------------- 1 | .examplesuitescript-container { 2 | @extend .container; 3 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/Templates/example_suitescript_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{faveThing}} 3 | {{faveReason}} 4 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/Templates/example_suitescript_edit.tpl: -------------------------------------------------------------------------------- 1 |

{{translate 'New Favorite Thing'}}

2 |
3 |
4 |
5 | 6 | 7 |
8 |
9 | 10 | 11 |
12 |
13 | 14 |
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/Templates/example_suitescript_list.tpl: -------------------------------------------------------------------------------- 1 |

My Favorite Things

2 | New 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
Thing I LikeReason I Like It
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.2/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"ExampleSuiteScript.Service.ss": "ExampleSuiteScript.ServiceController"} 8 | , "configuration": ["Configuration/*.json"] 9 | , "sass": ["Sass/*.scss"] 10 | } 11 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/Configuration/ExampleSuiteScript.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": 5 | { 6 | "id": "exampleSuiteScript" 7 | , "title": "Example SuiteScript Module" 8 | , "group": "shoppingApplication" 9 | } 10 | 11 | , "properties": 12 | { 13 | "exampleSuiteScript.enabled": 14 | { 15 | "group": "shoppingApplication" 16 | , "subtab": "exampleSuiteScript" 17 | , "type": "boolean" 18 | , "title": "Enabled" 19 | , "default": false 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/JavaScript/ExampleSuiteScript.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Collection' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'ExampleSuiteScript.Model' 9 | 10 | , 'Utils' 11 | ] 12 | , function 13 | ( 14 | Backbone 15 | 16 | , Model 17 | 18 | , Utils 19 | ) 20 | { 21 | 'use strict'; 22 | 23 | return Backbone.Collection.extend({ 24 | url: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 25 | , model: Model 26 | }) 27 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/JavaScript/ExampleSuiteScript.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Details.View' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'example_suitescript_details.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Template 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.View.extend ({ 20 | template: Template 21 | 22 | , getContext: function () 23 | { 24 | return { 25 | faveThing: this.model.get('faveThing') 26 | , faveReason: this.model.get('faveReason') 27 | , internalid: this.model.get('internalid') 28 | } 29 | } 30 | }) 31 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/JavaScript/ExampleSuiteScript.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/JavaScript/ExampleSuiteScript.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript' 5 | , [ 6 | 'ExampleSuiteScript.Router' 7 | 8 | , 'SC.Configuration' 9 | ] 10 | , function 11 | ( 12 | Router 13 | 14 | , Configuration 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | if (Configuration.exampleSuiteScript.enabled) 20 | { 21 | return { 22 | mountToApp: function (application) 23 | { 24 | return new Router(application) 25 | } 26 | } 27 | } 28 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/Sass/_examplesuitescript.scss: -------------------------------------------------------------------------------- 1 | .examplesuitescript-container { 2 | @extend .container; 3 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/Templates/example_suitescript_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{faveThing}} 3 | {{faveReason}} 4 | {{translate 'Edit'}} 5 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/Templates/example_suitescript_edit.tpl: -------------------------------------------------------------------------------- 1 |

{{#if isNew}}{{translate 'New'}}{{else}}{{translate 'Edit'}}{{/if}} {{translate 'Favorite Thing'}}

2 |
3 |
4 |
5 | 6 | 7 |
8 |
9 | 10 | 11 |
12 |
13 | 14 |
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/Templates/example_suitescript_list.tpl: -------------------------------------------------------------------------------- 1 |

My Favorite Things

2 |
New 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Thing I LikeReason I Like ItActions
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.3/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"ExampleSuiteScript.Service.ss": "ExampleSuiteScript.ServiceController"} 8 | , "configuration": ["Configuration/*.json"] 9 | , "sass": ["Sass/*.scss"] 10 | } 11 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/Configuration/ExampleSuiteScript.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": 5 | { 6 | "id": "exampleSuiteScript" 7 | , "title": "Example SuiteScript Module" 8 | , "group": "shoppingApplication" 9 | } 10 | 11 | , "properties": 12 | { 13 | "exampleSuiteScript.enabled": 14 | { 15 | "group": "shoppingApplication" 16 | , "subtab": "exampleSuiteScript" 17 | , "type": "boolean" 18 | , "title": "Enabled" 19 | , "default": false 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/JavaScript/ExampleSuiteScript.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Collection' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'ExampleSuiteScript.Model' 9 | 10 | , 'Utils' 11 | ] 12 | , function 13 | ( 14 | Backbone 15 | 16 | , Model 17 | 18 | , Utils 19 | ) 20 | { 21 | 'use strict'; 22 | 23 | return Backbone.Collection.extend({ 24 | url: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 25 | , model: Model 26 | }) 27 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/JavaScript/ExampleSuiteScript.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Details.View' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'example_suitescript_details.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Template 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.View.extend ({ 20 | template: Template 21 | 22 | , getContext: function () 23 | { 24 | return { 25 | faveThing: this.model.get('faveThing') 26 | , faveReason: this.model.get('faveReason') 27 | , internalid: this.model.get('internalid') 28 | } 29 | } 30 | }) 31 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/JavaScript/ExampleSuiteScript.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/JavaScript/ExampleSuiteScript.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript' 5 | , [ 6 | 'ExampleSuiteScript.Router' 7 | 8 | , 'SC.Configuration' 9 | ] 10 | , function 11 | ( 12 | Router 13 | 14 | , Configuration 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | if (Configuration.exampleSuiteScript.enabled) 20 | { 21 | return { 22 | mountToApp: function (application) 23 | { 24 | return new Router(application) 25 | } 26 | } 27 | } 28 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/Sass/_examplesuitescript.scss: -------------------------------------------------------------------------------- 1 | .examplesuitescript-container { 2 | @extend .container; 3 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/Templates/example_suitescript_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{faveThing}} 3 | {{faveReason}} 4 | {{translate 'Edit'}} 5 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/Templates/example_suitescript_edit.tpl: -------------------------------------------------------------------------------- 1 |

{{#if isNew}}{{translate 'New'}}{{else}}{{translate 'Edit'}}{{/if}} {{translate 'Favorite Thing'}}

2 |
3 |
4 |
5 | 6 | 7 |
8 |
9 | 10 | 11 |
12 |
13 | 14 |
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/Templates/example_suitescript_list.tpl: -------------------------------------------------------------------------------- 1 |

My Favorite Things

2 |
New 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Thing I LikeReason I Like ItActions
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.4/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"ExampleSuiteScript.Service.ss": "ExampleSuiteScript.ServiceController"} 8 | , "configuration": ["Configuration/*.json"] 9 | , "sass": ["Sass/*.scss"] 10 | } 11 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/Configuration/ExampleSuiteScript.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": 5 | { 6 | "id": "exampleSuiteScript" 7 | , "title": "Example SuiteScript Module" 8 | , "group": "shoppingApplication" 9 | } 10 | 11 | , "properties": 12 | { 13 | "exampleSuiteScript.enabled": 14 | { 15 | "group": "shoppingApplication" 16 | , "subtab": "exampleSuiteScript" 17 | , "type": "boolean" 18 | , "title": "Enabled" 19 | , "default": false 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/JavaScript/ExampleSuiteScript.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Collection' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'ExampleSuiteScript.Model' 9 | 10 | , 'Utils' 11 | ] 12 | , function 13 | ( 14 | Backbone 15 | 16 | , Model 17 | 18 | , Utils 19 | ) 20 | { 21 | 'use strict'; 22 | 23 | return Backbone.Collection.extend({ 24 | url: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 25 | , model: Model 26 | }) 27 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/JavaScript/ExampleSuiteScript.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Details.View' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'example_suitescript_details.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Template 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.View.extend ({ 20 | template: Template 21 | 22 | , getContext: function () 23 | { 24 | return { 25 | faveThing: this.model.get('faveThing') 26 | , faveReason: this.model.get('faveReason') 27 | , internalid: this.model.get('internalid') 28 | } 29 | } 30 | }) 31 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/JavaScript/ExampleSuiteScript.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/JavaScript/ExampleSuiteScript.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript' 5 | , [ 6 | 'ExampleSuiteScript.Router' 7 | 8 | , 'SC.Configuration' 9 | ] 10 | , function 11 | ( 12 | Router 13 | 14 | , Configuration 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | if (Configuration.exampleSuiteScript.enabled) 20 | { 21 | return { 22 | mountToApp: function (application) 23 | { 24 | return new Router(application) 25 | } 26 | } 27 | } 28 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/Sass/_examplesuitescript.scss: -------------------------------------------------------------------------------- 1 | .examplesuitescript-container { 2 | @extend .container; 3 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/Templates/example_suitescript_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{faveThing}} 3 | {{faveReason}} 4 | {{translate 'Edit'}} 5 | 6 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/Templates/example_suitescript_edit.tpl: -------------------------------------------------------------------------------- 1 |

{{#if isNew}}{{translate 'New'}}{{else}}{{translate 'Edit'}}{{/if}} {{translate 'Favorite Thing'}}

2 |
3 |
4 |
5 | 6 | 7 |
8 |
9 | 10 | 11 |
12 |
13 | 14 |
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/Templates/example_suitescript_list.tpl: -------------------------------------------------------------------------------- 1 |

My Favorite Things

2 |
New 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Thing I LikeReason I Like ItActions
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.5/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"ExampleSuiteScript.Service.ss": "ExampleSuiteScript.ServiceController"} 8 | , "configuration": ["Configuration/*.json"] 9 | , "sass": ["Sass/*.scss"] 10 | } 11 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/Configuration/ExampleSuiteScript.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | 4 | , "subtab": 5 | { 6 | "id": "exampleSuiteScript" 7 | , "title": "Example SuiteScript Module" 8 | , "group": "shoppingApplication" 9 | } 10 | 11 | , "properties": 12 | { 13 | "exampleSuiteScript.enabled": 14 | { 15 | "group": "shoppingApplication" 16 | , "subtab": "exampleSuiteScript" 17 | , "type": "boolean" 18 | , "title": "Enabled" 19 | , "default": false 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/JavaScript/ExampleSuiteScript.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Collection' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'ExampleSuiteScript.Model' 9 | 10 | , 'Utils' 11 | ] 12 | , function 13 | ( 14 | Backbone 15 | 16 | , Model 17 | 18 | , Utils 19 | ) 20 | { 21 | 'use strict'; 22 | 23 | return Backbone.Collection.extend({ 24 | url: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 25 | , model: Model 26 | }) 27 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/JavaScript/ExampleSuiteScript.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Details.View' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'example_suitescript_details.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Template 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.View.extend ({ 20 | template: Template 21 | 22 | , getContext: function () 23 | { 24 | return { 25 | faveThing: this.model.get('faveThing') 26 | , faveReason: this.model.get('faveReason') 27 | , internalid: this.model.get('internalid') 28 | } 29 | } 30 | }) 31 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/JavaScript/ExampleSuiteScript.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleSuiteScript.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/JavaScript/ExampleSuiteScript.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuiteScript' 5 | , [ 6 | 'ExampleSuiteScript.Router' 7 | 8 | , 'SC.Configuration' 9 | ] 10 | , function 11 | ( 12 | Router 13 | 14 | , Configuration 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | if (Configuration.exampleSuiteScript.enabled) 20 | { 21 | return { 22 | mountToApp: function (application) 23 | { 24 | return new Router(application) 25 | } 26 | } 27 | } 28 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/Sass/_examplesuitescript.scss: -------------------------------------------------------------------------------- 1 | .examplesuitescript-container { 2 | @extend .container; 3 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/Templates/example_suitescript_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{faveThing}} 3 | {{faveReason}} 4 | {{translate 'Edit'}} 5 | 6 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/Templates/example_suitescript_edit.tpl: -------------------------------------------------------------------------------- 1 |

{{#if isNew}}{{translate 'New'}}{{else}}{{translate 'Edit'}}{{/if}} {{translate 'Favorite Thing'}}

2 |
3 |
4 |
5 | 6 | 7 |
8 |
9 | 10 | 11 |
12 |
13 | 14 |
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/Templates/example_suitescript_list.tpl: -------------------------------------------------------------------------------- 1 |

My Favorite Things

2 |
New 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Thing I LikeReason I Like ItActions
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuiteScript@1.0.6/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "services": ["SuiteScript/*.Service.ss"] 8 | , "configuration": ["Configuration/*.json"] 9 | , "sass": ["Sass/*.scss"] 10 | } 11 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuitelet@1.0.0/ADD ME TO THE BACKEND/ExampleSuitelet.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | /** 5 | * @NApiVersion 2.x 6 | * @NScriptType Suitelet 7 | */ 8 | 9 | define( 10 | [ 11 | 'N/search' 12 | ] 13 | , function ExampleSuitelet 14 | ( 15 | search 16 | ) 17 | { 18 | function loadSomething(context) 19 | { 20 | var customerId = context.request.parameters.customer; 21 | 22 | var data = search.lookupFields({ 23 | type: search.Type.CUSTOMER 24 | , id: customerId 25 | , columns: ['subsidiary', 'country', 'city', 'phone', 'mobilephone'] 26 | }); 27 | 28 | context.response.setHeader({ 29 | name: 'Content-Type' 30 | , value: 'application/json' 31 | }); 32 | 33 | context.response.write({ 34 | output: JSON.stringify(data) || {} 35 | }); 36 | } 37 | 38 | return { 39 | onRequest: loadSomething 40 | }; 41 | }); 42 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuitelet@1.0.0/JavaScript/ExampleSuitelet.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuitelet.Model' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'Utils' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , Utils 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Model.extend({ 20 | urlRoot: Utils.getAbsoluteUrl('services/ExampleSuitelet.Service.ss') 21 | }) 22 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuitelet@1.0.0/JavaScript/ExampleSuitelet.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuitelet' 5 | , [ 6 | 'ExampleSuitelet.Router' 7 | ] 8 | , function 9 | ( 10 | Router 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function (application) 17 | { 18 | return new Router(application) 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuitelet@1.0.0/SuiteScript/ExampleSuitelet.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuitelet.Model' 5 | , [ 6 | 'SC.Model' 7 | ] 8 | , function 9 | ( 10 | SCModel 11 | ) 12 | { 13 | 14 | 'use strict'; 15 | 16 | return SCModel.extend({ 17 | name: 'ExampleSuitelet' 18 | 19 | , get: function () { 20 | var stSuiteletUrl = nlapiResolveURL('SUITELET', 'customscript_example_suitelet','customdeploy_example_suitelet', true); 21 | stSuiteletUrl = stSuiteletUrl + '&customer=' + nlapiGetUser(); 22 | 23 | var headers = new Array(); 24 | headers['Content-Type'] = 'application/json'; 25 | headers['User-Agent-x'] = 'SuiteScript-Call'; 26 | 27 | var response = nlapiRequestURL(stSuiteletUrl, null, headers, 'GET'); 28 | 29 | return response.getBody(); 30 | } 31 | }) 32 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuitelet@1.0.0/SuiteScript/ExampleSuitelet.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ExampleSuitelet.ServiceController' 5 | , [ 6 | 'Application' 7 | , 'ServiceController' 8 | , 'ExampleSuitelet.Model' 9 | ] 10 | , function 11 | ( 12 | Application 13 | , ServiceController 14 | , Model 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return ServiceController.extend({ 20 | name: 'ExampleSuitelet.ServiceController' 21 | 22 | , get: function () 23 | { 24 | return Model.get() 25 | } 26 | }) 27 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuitelet@1.0.0/Templates/example_suitelet.tpl: -------------------------------------------------------------------------------- 1 |

Test Suitelet to Display User Data

2 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/ExampleSuitelet@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"ExampleSuitelet.Service.ss": "ExampleSuitelet.ServiceController"} 8 | } 9 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/SC.CCT.ImageViewer@0.0.1/JavaScript/SC.CCT.ImageViewer.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | // @module SC.CCT.ImageViewer 5 | define( 6 | 'SC.CCT.ImageViewer' 7 | , [ 8 | 'SC.CCT.ImageViewer.View' 9 | ] 10 | , function ( 11 | SCCCTImageViewerView 12 | ) 13 | { 14 | 'use strict'; 15 | 16 | //@class SC.CCT.ImageViewer 17 | return { 18 | mountToApp: function mountToApp (application) 19 | { 20 | application.getComponent('CMS').registerCustomContentType({ 21 | // @property {String} id This property value MUST be lowercase 22 | id: 'sc_cct_imgageviewer' 23 | // @property {Backbone.View} view The view to render the CCT 24 | , view: SCCCTImageViewerView 25 | }); 26 | } 27 | }; 28 | }); 29 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/SC.CCT.ImageViewer@0.0.1/Templates/sc_cct_imageviewer.tpl: -------------------------------------------------------------------------------- 1 |
2 |
3 |
    4 |
  • 5 |
    6 | {{#if hasImage}} 7 | {{imageAlt}} 8 | {{/if}} 9 | {{#if hasText}} 10 |
    11 | {{#each texts}} 12 |

    {{this}}

    13 | {{/each}} 14 |
    15 | {{/if}} 16 |
    17 |
  • 18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/SC.CCT.ImageViewer@0.0.1/ns.package.json: -------------------------------------------------------------------------------- 1 | { "gulp": { 2 | "javascript": [ 3 | "JavaScript/*" 4 | ] 5 | , "templates": [ 6 | "Templates/*" 7 | ] 8 | , "sass": [ 9 | "Sass/**/*.scss" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.0/JavaScript/UserPreferences.List.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.List.View' 5 | , [ 6 | 'Backbone' 7 | , 'user_preferences_list.tpl' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , user_preferences_list_tpl 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.View.extend({ 18 | template: user_preferences_list_tpl 19 | 20 | , getContext: function () 21 | { 22 | return { 23 | message: 'Hello world! 🌍👋' 24 | } 25 | } 26 | }) 27 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.0/JavaScript/UserPreferences.Router.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Router' 5 | , [ 6 | 'Backbone' 7 | , 'UserPreferences.List.View' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , UserPreferencesListView 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.Router.extend({ 18 | routes: 19 | { 20 | 'preferences': 'preferencesList' 21 | , 'preferences/add': 'preferencesAdd' 22 | , 'preferences/:id': 'preferencesEdit' 23 | } 24 | 25 | , initialize: function (application) 26 | { 27 | this.application = application 28 | } 29 | 30 | , preferencesList: function () 31 | { 32 | var view = new UserPreferencesListView 33 | ({ 34 | application: this.application 35 | }) 36 | view.showContent(); 37 | } 38 | }) 39 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.0/JavaScript/UserPreferences.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences' 5 | , [ 6 | 'UserPreferences.Router' 7 | ] 8 | , function 9 | ( 10 | UserPreferencesRouter 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function (application) 17 | { 18 | return new UserPreferencesRouter(application); 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.0/Templates/user_preferences_list.tpl: -------------------------------------------------------------------------------- 1 |

{{message}}

-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.0/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*.tpl"] 6 | } 7 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.1/JavaScript/UserPreferences.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Collection' 5 | , [ 6 | 'Backbone' 7 | , 'UserPreferences.Model' 8 | , 'underscore' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , UserPreferencesModel 14 | , _ 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Collection.extend({ 20 | model: UserPreferencesModel 21 | , url: _.getAbsoluteUrl('services/UserPreferences.Service.ss') 22 | }); 23 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.1/JavaScript/UserPreferences.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Details.View' 5 | , [ 6 | 'Backbone' 7 | , 'user_preferences_details.tpl' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , user_preferences_details_tpl 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.View.extend({ 18 | template: user_preferences_details_tpl 19 | 20 | , getContext: function () 21 | { 22 | return { 23 | 'internalid': this.model.get('internalid') 24 | , 'type': this.model.get('type') 25 | , 'value': this.model.get('value') 26 | } 27 | } 28 | }) 29 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.1/JavaScript/UserPreferences.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Model' 5 | , [ 6 | 'Backbone' 7 | , 'underscore' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , _ 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.Model.extend({ 18 | urlRoot: _.getAbsoluteUrl('services/UserPreferences.Services.ss') 19 | }); 20 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.1/JavaScript/UserPreferences.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences' 5 | , [ 6 | 'UserPreferences.Router' 7 | ] 8 | , function 9 | ( 10 | UserPreferencesRouter 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function (application) 17 | { 18 | return new UserPreferencesRouter(application); 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.1/SuiteScript/UserPreferences.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Model' 5 | , [ 6 | 'SC.Model' 7 | ] 8 | , function 9 | ( 10 | SCModel 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return SCModel.extend({ 16 | name: 'UserPreferences' 17 | 18 | , list: function () 19 | { 20 | return [ 21 | {internalid: 1, type: 'Color', value: '7'} 22 | , {internalid: 2, type: 'Size', value: '5'} 23 | ] 24 | } 25 | }) 26 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.1/SuiteScript/UserPreferences.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.ServiceController' 5 | , [ 6 | 'ServiceController' 7 | , 'UserPreferences.Model' 8 | ] 9 | , function 10 | ( 11 | ServiceController 12 | , UserPreferencesModel 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return ServiceController.extend({ 18 | name: 'UserPreferences.ServiceController' 19 | 20 | , get: function () 21 | { 22 | var id = this.request.getParameter('internalid'); 23 | return id ? UserPreferencesModel.get(id) : UserPreferencesModel.list() 24 | } 25 | }) 26 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.1/Templates/user_preferences_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{internalid}} 3 | {{type}} 4 | {{value}} 5 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.1/Templates/user_preferences_list.tpl: -------------------------------------------------------------------------------- 1 |

{{translate 'User Preferences'}}

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
{{translate 'Internal ID'}}{{translate 'Type'}}{{translate 'Value'}}
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.1/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*.tpl"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"UserPreferences.Service.ss": "UserPreferences.ServiceController"} 8 | } 9 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.2/JavaScript/UserPreferences.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Collection' 5 | , [ 6 | 'Backbone' 7 | , 'UserPreferences.Model' 8 | , 'underscore' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , UserPreferencesModel 14 | , _ 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Collection.extend({ 20 | model: UserPreferencesModel 21 | , url: _.getAbsoluteUrl('services/UserPreferences.Service.ss') 22 | }); 23 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.2/JavaScript/UserPreferences.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Details.View' 5 | , [ 6 | 'Backbone' 7 | , 'user_preferences_details.tpl' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , user_preferences_details_tpl 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.View.extend({ 18 | template: user_preferences_details_tpl 19 | 20 | , getContext: function () 21 | { 22 | return { 23 | 'internalid': this.model.get('internalid') 24 | , 'type': this.model.get('type') 25 | , 'value': this.model.get('value') 26 | } 27 | } 28 | }) 29 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.2/JavaScript/UserPreferences.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Model' 5 | , [ 6 | 'Backbone' 7 | , 'underscore' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , _ 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.Model.extend({ 18 | urlRoot: _.getAbsoluteUrl('services/UserPreferences.Service.ss') 19 | }); 20 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.2/JavaScript/UserPreferences.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences' 5 | , [ 6 | 'UserPreferences.Router' 7 | ] 8 | , function 9 | ( 10 | UserPreferencesRouter 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function (application) 17 | { 18 | return new UserPreferencesRouter(application); 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.2/Templates/user_preferences_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{internalid}} 3 | {{type}} 4 | {{value}} 5 | 6 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.2/Templates/user_preferences_edit.tpl: -------------------------------------------------------------------------------- 1 |

{{translate 'Add/Update User Preference'}}

2 |
3 |
4 | 5 | 10 | 11 | 12 | 13 |
14 | 15 |
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.2/Templates/user_preferences_list.tpl: -------------------------------------------------------------------------------- 1 |

{{translate 'User Preferences'}}

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
{{translate 'Internal ID'}}{{translate 'Type'}}{{translate 'Value'}}{{translate 'Actions'}}
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.2/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*.tpl"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"UserPreferences.Service.ss": "UserPreferences.ServiceController"} 8 | } 9 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3-commented/JavaScript/UserPreferences.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Collection' 5 | , [ 6 | 'Backbone' 7 | , 'UserPreferences.Model' 8 | , 'underscore' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , UserPreferencesModel 14 | , _ 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | // Collections are used to handle data for multiple records. They are ideal for lists and tables because you want to display each record the same way - with the same view, template and styling. 20 | return Backbone.Collection.extend({ 21 | model: UserPreferencesModel 22 | // Note that we use 'url' here rather than 'urlroot' like we do in frontend models 23 | , url: _.getAbsoluteUrl('services/UserPreferences.Service.ss') 24 | }); 25 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3-commented/Sass/_user_preferences_edit.scss: -------------------------------------------------------------------------------- 1 | .user-preferences-edit { 2 | @extend .box-column-bordered; 3 | } 4 | 5 | .user-preferences-edit-header { 6 | margin-bottom: $sc-margin-lv3; 7 | } 8 | 9 | .user-preferences-edit-control-group { 10 | @extend .control-group; 11 | margin: $sc-margin-lv4 0 0 0; 12 | } 13 | 14 | .user-preferences-edit-input { 15 | @extend .input-large; 16 | } 17 | 18 | .user-preferences-edit-label-required { 19 | @extend .required; 20 | } 21 | 22 | .user-preferences-edit-submit { 23 | @extend .button-primary; 24 | @extend .button-medium; 25 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3-commented/Sass/_user_preferences_list.scss: -------------------------------------------------------------------------------- 1 | .user-preferences-list-header { 2 | @extend .list-header; 3 | position: relative; 4 | margin-bottom: $sc-padding-lv3; 5 | display: inline-block; 6 | width: 100%; 7 | } 8 | 9 | .user-preferences-list-title { 10 | @extend .list-header-title; 11 | float: none; 12 | } 13 | 14 | .user-preferences-list-table-header-actions { 15 | width: 25%; 16 | } 17 | 18 | .user-preferences-list-button-new { 19 | @extend .list-header-button; 20 | margin-top: $sc-padding-lv4; 21 | position: absolute; 22 | top: 25; 23 | z-index: 1; 24 | right: 0; 25 | 26 | @media (min-width: $screen-sm-min) { 27 | margin-top: 0; 28 | z-index: 0; 29 | top: 0; 30 | margin-bottom: $sc-padding-lv3; 31 | } 32 | } 33 | 34 | .user-preferences-list-table { 35 | @extend .recordviews-table; 36 | } 37 | 38 | .user-preferences-list-table-header { 39 | @extend .recordviews-row-header; 40 | border-top: 1px solid $sc-neutral-shade-300; 41 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3-commented/Templates/user_preferences_list.tpl: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{translate 'User Preferences'}}

4 | {{translate 'Add New'}} 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
{{translate 'Internal ID'}}{{translate 'Type'}}{{translate 'Value'}}{{translate 'Actions'}}
17 |
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3-commented/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*.tpl"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"UserPreferences.Service.ss": "UserPreferences.ServiceController"} 8 | , "sass": ["Sass/*.scss"] 9 | } 10 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3/JavaScript/UserPreferences.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Collection' 5 | , [ 6 | 'Backbone' 7 | , 'UserPreferences.Model' 8 | , 'underscore' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , UserPreferencesModel 14 | , _ 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Collection.extend({ 20 | model: UserPreferencesModel 21 | , url: _.getAbsoluteUrl('services/UserPreferences.Service.ss') 22 | }); 23 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3/JavaScript/UserPreferences.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Details.View' 5 | , [ 6 | 'Backbone' 7 | , 'user_preferences_details.tpl' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , user_preferences_details_tpl 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.View.extend({ 18 | template: user_preferences_details_tpl 19 | 20 | , getContext: function () 21 | { 22 | return { 23 | 'internalid': this.model.get('internalid') 24 | , 'type': this.model.get('type') 25 | , 'value': this.model.get('value') 26 | } 27 | } 28 | }) 29 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3/JavaScript/UserPreferences.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences.Model' 5 | , [ 6 | 'Backbone' 7 | , 'underscore' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , _ 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.Model.extend({ 18 | urlRoot: _.getAbsoluteUrl('services/UserPreferences.Service.ss') 19 | 20 | , validation: 21 | { 22 | 'type': 23 | { 24 | required: true 25 | , msg: 'Please select a type' 26 | } 27 | , 'value': 28 | { 29 | required: true 30 | , msg: 'Please enter a value' 31 | } 32 | } 33 | }); 34 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3/JavaScript/UserPreferences.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('UserPreferences' 5 | , [ 6 | 'UserPreferences.Router' 7 | ] 8 | , function 9 | ( 10 | UserPreferencesRouter 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function (application) 17 | { 18 | return new UserPreferencesRouter(application); 19 | } 20 | 21 | , MenuItems: 22 | { 23 | parent: 'settings' 24 | , id: 'userpreferenceslist' 25 | , name: 'User Preferences' 26 | , url: 'preferences' 27 | , index: 1 28 | } 29 | } 30 | }); -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3/Sass/_user_preferences_edit.scss: -------------------------------------------------------------------------------- 1 | .user-preferences-edit { 2 | @extend .box-column-bordered; 3 | } 4 | 5 | .user-preferences-edit-header { 6 | margin-bottom: $sc-margin-lv3; 7 | } 8 | 9 | .user-preferences-edit-control-group { 10 | @extend .control-group; 11 | margin: $sc-margin-lv4 0 0 0; 12 | } 13 | 14 | .user-preferences-edit-input { 15 | @extend .input-large; 16 | } 17 | 18 | .user-preferences-edit-label-required { 19 | @extend .required; 20 | } 21 | 22 | .user-preferences-edit-submit { 23 | @extend .button-primary; 24 | @extend .button-medium; 25 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3/Sass/_user_preferences_list.scss: -------------------------------------------------------------------------------- 1 | .user-preferences-list-header { 2 | @extend .list-header; 3 | position: relative; 4 | margin-bottom: $sc-padding-lv3; 5 | display: inline-block; 6 | width: 100%; 7 | } 8 | 9 | .user-preferences-list-title { 10 | @extend .list-header-title; 11 | float: none; 12 | } 13 | 14 | .user-preferences-list-table-header-actions { 15 | width: 25%; 16 | } 17 | 18 | .user-preferences-list-button-new { 19 | @extend .list-header-button; 20 | margin-top: $sc-padding-lv4; 21 | position: absolute; 22 | top: 25; 23 | z-index: 1; 24 | right: 0; 25 | 26 | @media (min-width: $screen-sm-min) { 27 | margin-top: 0; 28 | z-index: 0; 29 | top: 0; 30 | margin-bottom: $sc-padding-lv3; 31 | } 32 | } 33 | 34 | .user-preferences-list-table { 35 | @extend .recordviews-table; 36 | } 37 | 38 | .user-preferences-list-table-header { 39 | @extend .recordviews-row-header; 40 | border-top: 1px solid $sc-neutral-shade-300; 41 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3/Templates/user_preferences_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{translate 'Internal ID'}}: {{internalid}} 4 | 5 | 6 | {{translate 'Type'}}: {{type}} 7 | 8 | 9 | {{translate 'Value'}}: {{value}} 10 | 11 | {{translate 'Edit'}} 12 | 13 | -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3/Templates/user_preferences_list.tpl: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{translate 'User Preferences'}}

4 | {{translate 'Add New'}} 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
{{translate 'Internal ID'}}{{translate 'Type'}}{{translate 'Value'}}{{translate 'Actions'}}
17 |
-------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/UserPreferences@1.0.3/ns.package.json: -------------------------------------------------------------------------------- 1 | { 2 | "gulp": 3 | { 4 | "javascript": ["JavaScript/*.js"] 5 | , "templates": ["Templates/*.tpl"] 6 | , "ssp-libraries": ["SuiteScript/*.js"] 7 | , "autogenerated-services": {"UserPreferences.Service.ss": "UserPreferences.ServiceController"} 8 | , "sass": ["Sass/*.scss"] 9 | } 10 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/scriptablecart/examplefieldchange.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | // In this example, we're listening to changes to the shipping cost of the order. In our scenario we reduce all shipping fees to zero (free shipping). 5 | function customFieldChange (type, name) 6 | { 7 | if (nlapiGetContext().getExecutionContext() !== 'webstore') {return true} 8 | 9 | if (name == 'shippingcost') 10 | { 11 | if (IS_PROCESSING) {return true} 12 | 13 | IS_PROCESSING = true; 14 | 15 | // ie theFunctionWeWantToRun(); 16 | nlapiSetFieldValue('shippingcost', 0); 17 | 18 | IS_PROCESSING = false; 19 | } 20 | } -------------------------------------------------------------------------------- /samples/2017-2-kilimanjaro/scriptablecart/examplepostsourcing.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | // In this example, shipping tax does not needed to be calculated in the web store as it's already included in the pricing on the shipping cost, so we use the postSourcing function and listen to the shippingtaxcode field 5 | function customPostSourcing(type, name) { 6 | if(nlapiGetContext().getExecutionContext() !== 'webstore') {return true} 7 | 8 | if (name == 'shippingtaxcode') { 9 | if (IS_PROCESSING) {return true} 10 | 11 | IS_PROCESSING = true; 12 | 13 | // ie theFunctionWeWantToRun(); 14 | nlapiSetFieldValue('shippingtax1rate', 0); 15 | 16 | IS_PROCESSING = false; 17 | } 18 | } -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/PLPColorImages/Configuration/PLPColorImages.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | , "subtab": 4 | { 5 | "id": "plpColorImages" 6 | , "title": "PLP Color Images" 7 | , "group": "catalog" 8 | } 9 | , "properties": 10 | { 11 | "plpColorImages.customColorId": 12 | { 13 | "group": "catalog" 14 | , "subtab": "plpColorImages" 15 | , "type": "string" 16 | , "title": "Custom Field ID for Color" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/PLPItemColors/Configuration/PLPItemColors.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object" 3 | , "subtab": 4 | { 5 | "id": "plpItemColors" 6 | , "title": "PLP Item Colors" 7 | , "group": "catalog" 8 | } 9 | , "properties": 10 | { 11 | "plpItemColors.customColorId": 12 | { 13 | "group": "catalog" 14 | , "subtab": "plpItemColors" 15 | , "type": "string" 16 | , "title": "Custom Field ID for Color" 17 | } 18 | , "plpItemColors.rejectDefault": 19 | { 20 | "group": "catalog" 21 | , "subtab": "plpItemColors" 22 | , "type": "boolean" 23 | , "title": "Hide Default Color" 24 | , "default": false 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/PLPItemColors/Sass/_plp-itemcolors-hover.scss: -------------------------------------------------------------------------------- 1 | .plpitemcolors-hover-container { 2 | position: absolute; 3 | right: -1500px; 4 | top: 0; 5 | transition: 1s; 6 | } 7 | 8 | .facets-item-cell-list:hover .plpitemcolors-hover-container { 9 | right: 0; 10 | } 11 | 12 | .plpitemcolors-hover-block { 13 | display: inline-block; 14 | } 15 | 16 | .plpitemcolors-hover-block span { 17 | display: block; 18 | text-align: center; 19 | } 20 | -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/PLPItemColors/Templates/plp_itemcolors_hover.tpl: -------------------------------------------------------------------------------- 1 |
2 | {{#each itemColors}} 3 | 4 | 5 | {{this.color}} 6 | 7 | {{/each}} 8 |
-------------------------------------------------------------------------------- /samples/2018-1-aconcagua/PLPStuff/Modules/Module/Templates/plpstuff_banner.tpl: -------------------------------------------------------------------------------- 1 | {{#if showBanner}} 2 | 3 | {{/if}} -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/PLPStuff/assets/img/lookingfororangethings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-samples/netsuite-commerce/96d590b54908a0943eaaa325ab22f44c02db9691/samples/2018-1-aconcagua/PLPStuff/assets/img/lookingfororangethings.png -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/PreferredDelivery/Modules/PreferredDelivery/Sass/_preferreddelivery.scss: -------------------------------------------------------------------------------- 1 | .preferreddelivery-title { 2 | @extend .order-wizard-title; 3 | } 4 | 5 | .preferreddelivery-container { 6 | @extend .box-column; 7 | } 8 | 9 | .preferreddelivery-input { 10 | @extend .input-large; 11 | } -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/PreferredDelivery/Modules/PreferredDelivery/Templates/example_preferreddelivery_preferreddelivery.tpl: -------------------------------------------------------------------------------- 1 |

{{translate 'Preferred Delivery Date'}}

2 |
3 | {{#if isReview}} 4 | {{#if model.options.custbody_preferred_date}} 5 |

{{model.options.custbody_preferred_date}}

6 | {{else}} 7 |

{{translate 'No date selected'}}

8 | {{/if}} 9 | {{else}} 10 | 11 | {{/if}} 12 |
-------------------------------------------------------------------------------- /samples/2018-1-aconcagua/ProdData/JavaScript/Example.ProdData.ProdData.Details.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.ProdData.ProdData.Details.View' 5 | , [ 6 | 'Backbone' 7 | 8 | , 'example_proddata_proddata_details.tpl' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | 14 | , example_proddata_proddata_details_tpl 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.View.extend( 20 | { 21 | template: example_proddata_proddata_details_tpl 22 | 23 | , getContext: function () 24 | { 25 | return { 26 | 'displayname': this.model.get('displayname') 27 | } 28 | } 29 | }) 30 | }); -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/ProdData/JavaScript/Example.ProdData.ProdData.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.ProdData.ProdData' 5 | , [ 6 | 'Example.ProdData.ProdData.Router' 7 | ] 8 | , function 9 | ( 10 | ProdDataRouter 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function mountToApp (container) 17 | { 18 | return new ProdDataRouter(container) 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/ProdData/Templates/example_proddata_proddata_details.tpl: -------------------------------------------------------------------------------- 1 |

{{displayname}}

-------------------------------------------------------------------------------- /samples/2018-1-aconcagua/ProdData/Templates/example_proddata_proddata_list.tpl: -------------------------------------------------------------------------------- 1 |
2 |

Product Data

3 |
4 |
-------------------------------------------------------------------------------- /samples/2018-1-aconcagua/Product.Model.Examples/Example.ProdData.ProdData.v1.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.ProdData.ProdData' 5 | , [ 6 | 'Product.Model' 7 | ] 8 | , function 9 | ( 10 | ProductModel 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | // The following will perform a query of every item in your inventory (up to default limit, which is 50) 16 | return { 17 | mountToApp: function mountToApp (container) 18 | { 19 | var product = new ProductModel() 20 | , items = product.get('item').fetch().then( 21 | function(data, result, jqXhr) 22 | { 23 | console.log(data); 24 | console.log(result); 25 | console.log(jqXhr); 26 | }); 27 | } 28 | } 29 | }); -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/SCCCTEncourage/Modules/Example.SCCCTEncourage.Encourage/Sass/_sccctencourage-encourage.scss: -------------------------------------------------------------------------------- 1 | .sccctencourage-banner:hover { 2 | cursor: pointer; 3 | } -------------------------------------------------------------------------------- /samples/2018-1-aconcagua/SCCCTEncourage/Modules/Example.SCCCTEncourage.Encourage/Templates/example_sccctencourage_encourage.tpl: -------------------------------------------------------------------------------- 1 |
2 | {{alt_text}}
-------------------------------------------------------------------------------- /samples/2018-1-aconcagua/SCCCTEncourage/assets/img/buyorange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-samples/netsuite-commerce/96d590b54908a0943eaaa325ab22f44c02db9691/samples/2018-1-aconcagua/SCCCTEncourage/assets/img/buyorange.png -------------------------------------------------------------------------------- /samples/2018-2/MultiModule/Modules/ModuleOne/JavaScript/ModuleOne.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ModuleOne.View' 5 | , [ 6 | 'Backbone' 7 | , 'module_one.tpl' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , module_one_tpl 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.View.extend({ 18 | template: module_one_tpl 19 | 20 | , getContext: function () 21 | { 22 | return { 23 | message: 'This is ' + this.options.moduleName 24 | , image: 'img/' + this.options.moduleName + '/img1.jpg' 25 | } 26 | } 27 | }) 28 | }) -------------------------------------------------------------------------------- /samples/2018-2/MultiModule/Modules/ModuleOne/JavaScript/ModuleOne.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ModuleOne' 5 | , [ 6 | 'ModuleOne.View' 7 | ] 8 | , function 9 | ( 10 | ModuleOneView 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | name: 'ModuleOne' 17 | 18 | , mountToApp: function (container) 19 | { 20 | console.log(this.name + ' loaded!'); 21 | var Layout = container.getComponent('Layout'); 22 | 23 | var self = this; 24 | Layout.addChildView('cms:header_banner_top', function () 25 | { 26 | return new ModuleOneView({moduleName: self.name}); 27 | }); 28 | } 29 | } 30 | }) -------------------------------------------------------------------------------- /samples/2018-2/MultiModule/Modules/ModuleOne/Templates/module_one.tpl: -------------------------------------------------------------------------------- 1 |

{{message}}

2 |

-------------------------------------------------------------------------------- /samples/2018-2/MultiModule/Modules/ModuleTwo/JavaScript/ModuleTwo.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('ModuleTwo' 5 | , [ 6 | 'ModuleOne.View' 7 | ] 8 | , function 9 | ( 10 | ModuleOneView 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | name: 'ModuleTwo' 17 | 18 | , mountToApp: function (container) 19 | { 20 | console.log(this.name + ' loaded!'); 21 | var Layout = container.getComponent('Layout'); 22 | 23 | var self = this; 24 | Layout.addChildView('cms:header_banner_top', function () 25 | { 26 | return new ModuleOneView({moduleName: self.name}); 27 | }); 28 | } 29 | } 30 | }) -------------------------------------------------------------------------------- /samples/2018-2/MultiModule/assets/img/ModuleOne/img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-samples/netsuite-commerce/96d590b54908a0943eaaa325ab22f44c02db9691/samples/2018-2/MultiModule/assets/img/ModuleOne/img1.jpg -------------------------------------------------------------------------------- /samples/2018-2/MultiModule/assets/img/ModuleTwo/img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-samples/netsuite-commerce/96d590b54908a0943eaaa325ab22f44c02db9691/samples/2018-2/MultiModule/assets/img/ModuleTwo/img1.jpg -------------------------------------------------------------------------------- /samples/2018-2/RemoveAll/Modules/RemoveAll/Sass/_removeall-removeall.scss: -------------------------------------------------------------------------------- 1 | .removeall-container { 2 | margin-bottom: $sc-margin-lv6; 3 | } 4 | 5 | .removeall-container-link { 6 | @extend .button-tertiary; 7 | @extend .button-medium; 8 | width: 100%; 9 | margin-top: $sc-margin-lv3; 10 | } 11 | 12 | /* If you don't have these in your theme */ 13 | .global-views-confirmation-footer { 14 | margin-top: $sc-margin-lv3; 15 | } 16 | 17 | .global-views-confirmation-confirm-button { 18 | @extend .button-secondary; 19 | @extend .button-medium; 20 | } 21 | 22 | .global-views-confirmation-cancel-button { 23 | @extend .button-tertiary; 24 | @extend .button-medium; 25 | } -------------------------------------------------------------------------------- /samples/2018-2/RemoveAll/Modules/RemoveAll/SuiteScript/Example.RemoveAll.RemoveAll.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.RemoveAll.RemoveAll' 5 | , [ 6 | 'LiveOrder.Model' 7 | , 'LiveOrder.ServiceController' 8 | , 'SC.Models.Init' 9 | ] 10 | , function 11 | ( 12 | LiveOrderModel 13 | , LiveOrderServiceController 14 | , ModelsInit 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | LiveOrderModel.removeAllLines = function () 20 | { 21 | ModelsInit.order.removeAllItems(); 22 | } 23 | 24 | LiveOrderServiceController.delete = function () 25 | { 26 | LiveOrderModel.removeAllLines(); 27 | return LiveOrderModel.get() || {} 28 | } 29 | }); -------------------------------------------------------------------------------- /samples/2018-2/RemoveAll/Modules/RemoveAll/Templates/example_removeall_removeall.tpl: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{translate 'Remove All'}} 4 | 5 |
-------------------------------------------------------------------------------- /samples/2019-1/DownloadOrderCSV/Modules/DownloadOrderCSV/JavaScript/Example.DownloadOrderCSV.DownloadOrderCSV.js: -------------------------------------------------------------------------------- 1 | define('Example.DownloadOrderCSV.DownloadOrderCSV' 2 | , [ 3 | 'Example.DownloadOrderCSV.DownloadOrderCSV.View' 4 | ] 5 | , function 6 | ( 7 | DownloadOrderCSVView 8 | ) 9 | { 10 | 'use strict'; 11 | 12 | return { 13 | mountToApp: function mountToApp (container) 14 | { 15 | var Layout = container.getComponent('Layout'); 16 | 17 | if (Layout) 18 | { 19 | Layout.addChildView('ListHeader', function () // Sadly, this will add this functionality to every List Header view, so we will need to do some work to minimize this 20 | { 21 | return new DownloadOrderCSVView({container: container}) 22 | }); 23 | } 24 | } 25 | } 26 | }); -------------------------------------------------------------------------------- /samples/2019-1/DownloadOrderCSV/Modules/DownloadOrderCSV/JavaScript/Example.DownloadOrderCSV.DownloadOrderCSV.noop.js: -------------------------------------------------------------------------------- 1 | // Entry point file to run in the shopping and checkout applications 2 | // We don't anything to happen when it's called in those scenarios, so we update the manifest file to point to this file, and then return ... nothing. 3 | define('Example.DownloadOrderCSV.DownloadOrderCSV.noop' 4 | , [ 5 | ] 6 | , function 7 | ( 8 | ) 9 | { 10 | 'use strict'; 11 | 12 | return { 13 | mountToApp: function mountToApp (container) 14 | { 15 | return undefined 16 | } 17 | } 18 | }); -------------------------------------------------------------------------------- /samples/2019-1/DownloadOrderCSV/Modules/DownloadOrderCSV/Sass/_example-downloadordercsv.scss: -------------------------------------------------------------------------------- 1 | .download-order-csv-container { 2 | margin: $sc-margin-lv2 0; 3 | } 4 | 5 | .download-order-csv-button { 6 | @extend .button-secondary; 7 | @extend .button-medium; 8 | } -------------------------------------------------------------------------------- /samples/2019-1/DownloadOrderCSV/Modules/DownloadOrderCSV/SuiteScript/DownloadOrderCSV.ServiceController.js: -------------------------------------------------------------------------------- 1 | define('Example.DownloadOrderCSV.DownloadOrderCSV.ServiceController' 2 | , [ 3 | 'ServiceController' 4 | , 'Example.DownloadOrderCSV.DownloadOrderCSV' 5 | ] 6 | , function 7 | ( 8 | ServiceController 9 | , DownloadOrderCSV 10 | ) 11 | { 12 | 'use strict'; 13 | 14 | return ServiceController.extend({ 15 | name: 'Example.DownloadOrderCSV.DownloadOrderCSV.ServiceController' 16 | 17 | , get: function get () 18 | { 19 | var orderHistoryCSVFile = DownloadOrderCSV.get(this.request.getParameter('orderHistory')); 20 | 21 | this.response.setContentType('CSV', 'orderhistory.csv', 'attachment'); 22 | this.response.write(orderHistoryCSVFile.getValue()); 23 | } 24 | }) 25 | }) -------------------------------------------------------------------------------- /samples/2019-1/DownloadOrderCSV/Modules/DownloadOrderCSV/Templates/example_downloadordercsv_downloadordercsv.tpl: -------------------------------------------------------------------------------- 1 |
2 | Download CSV 3 |
-------------------------------------------------------------------------------- /samples/2019-1/DownloadOrderCSV/assets/services/DownloadOrderCSV.Service.ss: -------------------------------------------------------------------------------- 1 | 2 | function service(request, response) 3 | { 4 | 'use strict'; 5 | try 6 | { 7 | require('Example.DownloadOrderCSV.DownloadOrderCSV.ServiceController').handle(request, response); 8 | } 9 | catch(ex) 10 | { 11 | console.log('Example.DownloadOrderCSV.DownloadOrderCSV.ServiceController ', ex); 12 | var controller = require('ServiceController'); 13 | controller.response = response; 14 | controller.request = request; 15 | controller.sendError(ex); 16 | } 17 | } -------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/Modules/AboutUs/JavaScript/Example.ExamplePageTypes.AboutUs.Collection.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.ExamplePageTypes.AboutUs.Collection' 5 | , [ 6 | 'Backbone' 7 | , 'Example.ExamplePageTypes.AboutUs.Model' 8 | , 'underscore' 9 | ] 10 | , function 11 | ( 12 | Backbone 13 | , AboutUsModel 14 | , _ 15 | ) 16 | { 17 | 'use strict'; 18 | 19 | return Backbone.Collection.extend({ 20 | url: _.getAbsoluteUrl(getExtensionAssetsPath('services/AboutUs.Service.ss')) 21 | , model: AboutUsModel 22 | }) 23 | }) -------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/Modules/AboutUs/JavaScript/Example.ExamplePageTypes.AboutUs.Model.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.ExamplePageTypes.AboutUs.Model' 5 | , [ 6 | 'Backbone' 7 | , 'underscore' 8 | ] 9 | , function 10 | ( 11 | Backbone 12 | , _ 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return Backbone.Model.extend({ 18 | urlRoot: _.getAbsoluteUrl(getExtensionAssetsPath('services/AboutUs.Service.ss')) 19 | }) 20 | }) -------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/Modules/AboutUs/SuiteScript/AboutUs.ServiceController.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.ExamplePageTypes.AboutUs.ServiceController' 5 | , [ 6 | 'ServiceController' 7 | , 'Example.ExamplePageTypes.AboutUs.Model' 8 | ] 9 | , function 10 | ( 11 | ServiceController 12 | , AboutUsModel 13 | ) 14 | { 15 | 'use strict'; 16 | 17 | return ServiceController.extend({ 18 | name: 'AboutUs.ServiceController' 19 | 20 | , get: function () 21 | { 22 | var id = this.request.getParameter('internalid'); 23 | return id ? AboutUsModel.get(id) : AboutUsModel.list(); 24 | } 25 | }) 26 | }) -------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/Modules/AboutUs/Templates/example_page_types_about_us_details.tpl: -------------------------------------------------------------------------------- 1 |
2 |

{{name}}

3 | 4 |

{{blurb}}

5 |
-------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/Modules/AboutUs/Templates/example_page_types_about_us_details_crown.tpl: -------------------------------------------------------------------------------- 1 |
2 |

{{name}} – EMPLOYEE OF THE MONTH

3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 11 |

{{blurb}}

12 |
-------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/Modules/AboutUs/Templates/example_page_types_about_us_icons.tpl: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 |
-------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/Modules/AboutUs/Templates/example_page_types_about_us_list.tpl: -------------------------------------------------------------------------------- 1 |

About Us

2 |

This website was created in 2015 when an intrepid group of explorers sought to conquer some mountains. They made it all the way to Denali and, once they did, they never looked back.

3 |

Here's a list of all our great staff members!

4 |
-------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/Modules/ExampleLandingPage/JavaScript/Example.ExamplePageTypes.ExampleLandingPage.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.ExamplePageTypes.ExampleLandingPage' 5 | , [ 6 | 'Example.ExamplePageTypes.ExampleLandingPage.View' 7 | ] 8 | , function 9 | ( 10 | ExampleLandingPageView 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function mountToApp (container) 17 | { 18 | var PageType = container.getComponent('PageType'); 19 | 20 | PageType.registerPageType 21 | ({ 22 | name: 'pagetype_example_landing_page' 23 | , view: ExampleLandingPageView 24 | , defaultTemplate: 25 | { 26 | name: 'example_page_types_example_landing_page.tpl' 27 | , displayName: 'Example Landing Page (Default)' 28 | } 29 | }) 30 | } 31 | } 32 | }); -------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/Modules/ExampleLandingPage/Templates/example_page_types_example_landing_page.tpl: -------------------------------------------------------------------------------- 1 |
2 |

Header: {{header}}

3 |

Test string I added to the context object: {{myTestString}}

4 |

Name: {{name}}

5 |

Title: {{title}}

6 |

URL: {{url}}

7 |

Field 1: {{fields.custrecord_example_landing_page_field1}}

8 |

Field 2: {{fields.custrecord_example_landing_page_field2}}

9 |
-------------------------------------------------------------------------------- /samples/2019-1/ExamplePageTypes/assets/img/rightarrow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle-samples/netsuite-commerce/96d590b54908a0943eaaa325ab22f44c02db9691/samples/2019-1/ExamplePageTypes/assets/img/rightarrow.jpg -------------------------------------------------------------------------------- /samples/2019-1/SavingsPrice/Modules/SavingsPrice/Templates/codesample_savingsprice.tpl: -------------------------------------------------------------------------------- 1 | {{#if savingsPrice}}

{{translate 'You\'ll save $(0) per item ($(1))' savingsPrice savingsPricePercentage}}

{{/if}} -------------------------------------------------------------------------------- /samples/2019-1/TermsAndConditions-v1/Modules/TermsAndConditions/JavaScript/Example.TermsAndConditions.TermsAndConditions.Checkout.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.TermsAndConditions.TermsAndConditions.Checkout' 5 | , [ 6 | 'Example.TermsAndConditions.TermsAndConditions.LoginRegister.View' 7 | ] 8 | , function 9 | ( 10 | TermsAndConditionsLoginRegisterView 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function mountToApp (container) 17 | { 18 | var LoginRegisterPage = container.getComponent('LoginRegisterPage'); 19 | 20 | if (LoginRegisterPage) 21 | { 22 | LoginRegisterPage.addChildView('Register.CustomFields', function () 23 | { 24 | return new TermsAndConditionsLoginRegisterView 25 | ({ 26 | LoginRegisterPage: LoginRegisterPage 27 | }) 28 | }); 29 | } 30 | } 31 | }; 32 | }); 33 | -------------------------------------------------------------------------------- /samples/2019-1/TermsAndConditions-v1/Modules/TermsAndConditions/JavaScript/Example.TermsAndConditions.TermsAndConditions.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.TermsAndConditions.TermsAndConditions' 5 | , [ 6 | ] 7 | , function 8 | ( 9 | ) 10 | { 11 | 'use strict'; 12 | 13 | return {} 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /samples/2019-1/TermsAndConditions-v1/Modules/TermsAndConditions/Templates/example_termsandconditions_termsandconditions_loginregister.tpl: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 |
-------------------------------------------------------------------------------- /samples/2019-1/TermsAndConditions-v2/Modules/TermsAndConditions/JavaScript/Example.TermsAndConditions.TermsAndConditions.Checkout.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.TermsAndConditions.TermsAndConditions.Checkout' 5 | , [ 6 | 'Example.TermsAndConditions.TermsAndConditions.LoginRegister.View' 7 | ] 8 | , function 9 | ( 10 | TermsAndConditionsLoginRegisterView 11 | ) 12 | { 13 | 'use strict'; 14 | 15 | return { 16 | mountToApp: function mountToApp (container) 17 | { 18 | var LoginRegisterPage = container.getComponent('LoginRegisterPage'); 19 | 20 | if (LoginRegisterPage) 21 | { 22 | LoginRegisterPage.addChildView('Register.CustomFields', function () 23 | { 24 | return new TermsAndConditionsLoginRegisterView 25 | ({ 26 | LoginRegisterPage: LoginRegisterPage 27 | }) 28 | }); 29 | } 30 | } 31 | }; 32 | }); 33 | -------------------------------------------------------------------------------- /samples/2019-1/TermsAndConditions-v2/Modules/TermsAndConditions/JavaScript/Example.TermsAndConditions.TermsAndConditions.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | 4 | define('Example.TermsAndConditions.TermsAndConditions' 5 | , [ 6 | ] 7 | , function 8 | ( 9 | ) 10 | { 11 | 'use strict'; 12 | 13 | return {} 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /samples/2019-1/TermsAndConditions-v2/Modules/TermsAndConditions/Templates/example_termsandconditions_termsandconditions_loginregister.tpl: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 |
-------------------------------------------------------------------------------- /samples/2019-1/TermsAndConditions-v2/Modules/TermsAndConditions/Templates/example_termsandconditions_termsandconditions_myaccount.tpl: -------------------------------------------------------------------------------- 1 |

Terms and Conditions

2 | {{#if termsAndConditions}} 3 |

{{translate 'Thank you for agreeing to our site\'s Terms and Conditions'}}.

4 | {{else}} 5 |

{{translate 'You have not agreed to our site\'s Terms and Conditions. Please contact support.'}}

6 | {{/if}} -------------------------------------------------------------------------------- /samples/2020-1/Extension/Modules/Module/JavaScript/Vendor.Extension.Module.js: -------------------------------------------------------------------------------- 1 | define('Vendor.Extension.Module', 2 | [ 3 | 'Vendor.Extension.Module.TestView' 4 | ], 5 | function 6 | ( 7 | VendorExtensionModuleTestView 8 | ) { 9 | 'use strict'; 10 | 11 | return { 12 | mountToApp: function mountToApp (application) { 13 | console.log('Vendor.Extension.Module loaded'); 14 | 15 | var pageType = application.getComponent('PageType'); 16 | 17 | pageType.registerPageType({ 18 | 'name': 'Vendor.Extension.Module.TestView', 19 | 'routes': ['testview'], 20 | 'view': VendorExtensionModuleTestView, 21 | 'defaultTemplate': { 22 | 'name': 'vendor_extension_module_test_template.tpl', 23 | 'displayName': 'Vendor Extension Module Test Page' 24 | } 25 | }); 26 | } 27 | } 28 | }) -------------------------------------------------------------------------------- /samples/2020-1/Extension/Modules/Module/SuiteScript/Module.ServiceController.js: -------------------------------------------------------------------------------- 1 | define('Vendor.Extension.Module.ServiceController', [ 2 | 'ServiceController', 3 | 'Vendor.Extension.Module.Model' 4 | ], function ( 5 | ServiceController, 6 | ModuleModel 7 | ) { 8 | 'use strict'; 9 | 10 | return ServiceController.extend({ 11 | name: 'Vendor.Extension.Module.ServiceController', 12 | 13 | get: function get () { 14 | return ModuleModel.get() 15 | } 16 | }) 17 | }) -------------------------------------------------------------------------------- /samples/2020-1/Extension/Modules/Module/SuiteScript/Vendor.Extension.Module.Model.js: -------------------------------------------------------------------------------- 1 | define('Vendor.Extension.Module.Model', [ 2 | 'SC.Model' 3 | ], function ( 4 | SCModel 5 | ) { 6 | 'use strict'; 7 | 8 | return SCModel.extend({ 9 | get: function () { 10 | // Perform some data look-up or something, but this is just going to use some dummy data for now 11 | return { 12 | internalid: '1', value: 'test' 13 | } 14 | } 15 | }) 16 | }) -------------------------------------------------------------------------------- /samples/2020-1/Extension/Modules/Module/Templates/vendor_extension_module_test_template.tpl: -------------------------------------------------------------------------------- 1 |
2 |

Hello!

3 |

Internal ID: {{internalid}}

4 |

Value: {{value}}

5 |
-------------------------------------------------------------------------------- /samples/2020-1/Extension/assets/services/Module.Service.ss: -------------------------------------------------------------------------------- 1 | 2 | function service(request, response) 3 | { 4 | 'use strict'; 5 | try 6 | { 7 | require('Vendor.Extension.Module.ServiceController').handle(request, response); 8 | } 9 | catch(ex) 10 | { 11 | console.log('Vendor.Extension.Module.ServiceController ', ex); 12 | var controller = require('ServiceController'); 13 | controller.response = response; 14 | controller.request = request; 15 | controller.sendError(ex); 16 | } 17 | } -------------------------------------------------------------------------------- /samples/2020-1/MyFirstSDFExtension/cli-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | defaultProjectFolder: "src", 3 | commands: {} 4 | }; 5 | -------------------------------------------------------------------------------- /samples/2020-1/MyFirstSDFExtension/src/FileCabinet/SuiteScripts/Deploy_Extensions/.attributes/.folder.attr.xml: -------------------------------------------------------------------------------- 1 | 2 | F 3 | 4 | F 5 | F 6 | -------------------------------------------------------------------------------- /samples/2020-1/MyFirstSDFExtension/src/FileCabinet/SuiteScripts/Deploy_Extensions/Tutorial/.attributes/.folder.attr.xml: -------------------------------------------------------------------------------- 1 | 2 | F 3 | 4 | F 5 | F 6 | -------------------------------------------------------------------------------- /samples/2020-1/MyFirstSDFExtension/src/deploy.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ~/AccountConfiguration/* 4 | 5 | 6 | ~/FileCabinet/* 7 | 8 | 9 | ~/Objects/* 10 | 11 | 12 | ~/Translations/* 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/2020-1/MyFirstSDFExtension/src/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | MyFirstSDFExtension 3 | 1.0 4 | 5 | 6 | SUITESIGNON 7 | CRM 8 | ACCOUNTING 9 | WEBSITE 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/2020-2/CDRExample/Modules/CDRExample/Templates/cdr_example.tpl: -------------------------------------------------------------------------------- 1 | {{{storedetaileddescription}}} -------------------------------------------------------------------------------- /samples/2020-2/Example-part1/Modules/UserPreferences/JavaScript/Example.UserPreferences.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | define('Example.UserPreferences', [ 4 | 5 | ], function ( 6 | 7 | ) { 8 | 'use strict'; 9 | 10 | return { 11 | mountToApp: function (container) { 12 | console.log('Hello World! UserPreferences calling!'); 13 | } 14 | } 15 | }); -------------------------------------------------------------------------------- /samples/2020-2/Example-part10-final/Modules/UserPreferences/Sass/_example_user_preferences_details.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | .user-preferences-list-table-row { 4 | @extend .recordviews-row; 5 | } 6 | 7 | .user-preferences-list-table-cell-label { 8 | @extend .recordviews-label; 9 | } 10 | 11 | .user-preferences-table-edit-link { 12 | @extend .button-small; 13 | @extend .button-secondary; 14 | } 15 | 16 | .user-preferences-table-delete-button { 17 | @extend .button-small; 18 | @extend .button-tertiary; 19 | } 20 | 21 | .user-preferences-table-edit-link, 22 | .user-preferences-table-delete-button { 23 | margin-right: $sc-margin-lv2; 24 | 25 | @media (max-width: $screen-sm-max) { 26 | margin-bottom: $sc-margin-lv2; 27 | } 28 | } -------------------------------------------------------------------------------- /samples/2020-2/Example-part10-final/Modules/UserPreferences/Sass/_example_user_preferences_form.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | .user-preferences-form { 4 | @extend .box-column; 5 | } 6 | 7 | .user-preferences-form-control-group { 8 | @extend .control-group; 9 | margin: $sc-margin-lv3 0 0 0; 10 | } 11 | 12 | .user-preferences-form-select, 13 | .user-preferences-form-input { 14 | @extend .input-large; 15 | } 16 | 17 | .user-preferences-form-label-required { 18 | @extend .required; 19 | } 20 | 21 | .user-preferences-form-submit { 22 | @extend .button-primary; 23 | @extend .button-medium; 24 | } -------------------------------------------------------------------------------- /samples/2020-2/Example-part10-final/Modules/UserPreferences/Sass/example_user_preferences.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | @import '_example_user_preferences_list'; 4 | @import '_example_user_preferences_details'; 5 | @import '_example_user_preferences_form'; -------------------------------------------------------------------------------- /samples/2020-2/Example-part10-final/Modules/UserPreferences/Templates/example_userpreferences_collection.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part10-final/Modules/UserPreferences/Templates/example_userpreferences_edit.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |

{{#if isNew}}Add{{else}}Edit{{/if}} User Preference

4 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part2/Modules/UserPreferences/JavaScript/Example.UserPreferences.List.View.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | define('Example.UserPreferences.List.View', [ 4 | 'PageType.Base.View', 5 | 'example_userpreferences_list.tpl' 6 | ], function ( 7 | PageTypeBaseView, 8 | example_userpreferences_list_tpl 9 | ) { 10 | 'use strict'; 11 | 12 | return PageTypeBaseView.PageTypeBaseView.extend({ 13 | template: example_userpreferences_list_tpl, 14 | 15 | getContext: function getContext () { 16 | return { 17 | message: 'Hello World!' 18 | } 19 | } 20 | }) 21 | }); -------------------------------------------------------------------------------- /samples/2020-2/Example-part2/Modules/UserPreferences/JavaScript/Example.UserPreferences.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | define('Example.UserPreferences', [ 4 | 'Example.UserPreferences.List.View' 5 | ], function ( 6 | ExampleUserPreferencesListView 7 | ) { 8 | 'use strict'; 9 | 10 | return { 11 | mountToApp: function (container) { 12 | var PageType = container.getComponent('PageType'); 13 | 14 | PageType.registerPageType({ 15 | name: 'example_userpreferences_list', 16 | routes: ['preferences'], 17 | view: ExampleUserPreferencesListView, 18 | defaultTemplate: { 19 | name: 'example_userpreferences_list.tpl', 20 | displayName: 'User Preferences List' 21 | } 22 | }); 23 | } 24 | } 25 | }); -------------------------------------------------------------------------------- /samples/2020-2/Example-part2/Modules/UserPreferences/Templates/example_userpreferences_list.tpl: -------------------------------------------------------------------------------- 1 |

Message: {{message}}

-------------------------------------------------------------------------------- /samples/2020-2/Example-part3/Modules/UserPreferences/JavaScript/Example.UserPreferences.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | define('Example.UserPreferences', [ 4 | 'Example.UserPreferences.List.View' 5 | ], function ( 6 | ExampleUserPreferencesListView 7 | ) { 8 | 'use strict'; 9 | 10 | return { 11 | mountToApp: function (container) { 12 | var PageType = container.getComponent('PageType'); 13 | 14 | PageType.registerPageType({ 15 | name: 'example_userpreferences_list', 16 | routes: ['preferences'], 17 | view: ExampleUserPreferencesListView, 18 | defaultTemplate: { 19 | name: 'example_userpreferences_list.tpl', 20 | displayName: 'User Preferences List' 21 | } 22 | }); 23 | } 24 | } 25 | }); -------------------------------------------------------------------------------- /samples/2020-2/Example-part3/Modules/UserPreferences/SuiteScript2/Example.UserPreferences.Model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @NApiVersion 2.x 3 | * @NModuleScope TargetAccount 4 | * // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 5 | * // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 6 | */ 7 | define([], function () { 8 | 'use strict'; 9 | 10 | var ExampleUserPreferencesModel = { 11 | get: function (request) { 12 | var data = { 13 | message: 'This is a message sent from the server!' 14 | } 15 | 16 | return data 17 | } 18 | } 19 | 20 | return ExampleUserPreferencesModel 21 | }) -------------------------------------------------------------------------------- /samples/2020-2/Example-part3/Modules/UserPreferences/SuiteScript2/Example.UserPreferences.Service.ss: -------------------------------------------------------------------------------- 1 | /** 2 | * @NApiVersion 2.x 3 | * @NModuleScope Public 4 | * // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 5 | * // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 6 | */ 7 | define([ 8 | './Example.UserPreferences.Model' 9 | ], function ( 10 | ExampleUserPreferencesModel 11 | ) { 12 | 'use strict'; 13 | 14 | function service (context) { 15 | var response = {}; 16 | 17 | switch (context.request.method) { 18 | case 'GET': 19 | response = ExampleUserPreferencesModel.get(context.request) 20 | break; 21 | } 22 | 23 | context.response.write(JSON.stringify(response)); 24 | } 25 | 26 | return { 27 | service: service 28 | } 29 | }) -------------------------------------------------------------------------------- /samples/2020-2/Example-part3/Modules/UserPreferences/Templates/example_userpreferences_list.tpl: -------------------------------------------------------------------------------- 1 |

Message: {{message}}

-------------------------------------------------------------------------------- /samples/2020-2/Example-part4/Modules/UserPreferences/JavaScript/Example.UserPreferences.Helper.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | define('Example.UserPreferences.Helper', [ 4 | 'Utils' 5 | ], function ( 6 | Utils 7 | ) { 8 | 'use strict'; 9 | 10 | return { 11 | getTypeOptions: function getTypeOptions () { 12 | return [ 13 | {internalid: '1', name: Utils.translate('Color')}, 14 | {internalid: '2', name: Utils.translate('Size')} 15 | ]; 16 | } 17 | } 18 | }) -------------------------------------------------------------------------------- /samples/2020-2/Example-part4/Modules/UserPreferences/SuiteScript2/Example.UserPreferences.Service.ss: -------------------------------------------------------------------------------- 1 | /** 2 | * @NApiVersion 2.x 3 | * @NModuleScope Public 4 | * // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 5 | * // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 6 | */ 7 | define([ 8 | './Example.UserPreferences.Model' 9 | ], function ( 10 | ExampleUserPreferencesModel 11 | ) { 12 | 'use strict'; 13 | 14 | function service (context) { 15 | var response = {}; 16 | 17 | switch (context.request.method) { 18 | case 'GET': 19 | response = ExampleUserPreferencesModel.get(context.request) 20 | break; 21 | case 'POST': 22 | response = ExampleUserPreferencesModel.post(context.request) 23 | break; 24 | } 25 | 26 | context.response.write(JSON.stringify(response)); 27 | } 28 | 29 | return { 30 | service: service 31 | } 32 | }) -------------------------------------------------------------------------------- /samples/2020-2/Example-part4/Modules/UserPreferences/Templates/example_userpreferences_edit.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Add/Edit User Preference

4 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part4/Modules/UserPreferences/Templates/example_userpreferences_list.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Message: {{message}}

-------------------------------------------------------------------------------- /samples/2020-2/Example-part5/Modules/UserPreferences/JavaScript/Example.UserPreferences.Helper.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | define('Example.UserPreferences.Helper', [ 4 | 'Utils' 5 | ], function ( 6 | Utils 7 | ) { 8 | // A helper file is a module that contains utility functions that can be shared between multiple modules 9 | 10 | 'use strict'; 11 | 12 | return { 13 | // For the sake of the tutorial, we are hardcoding in the options for the available types of user preference, but it would be better to fetch them with SuiteScript 14 | getTypeOptions: function getTypeOptions () { 15 | return [ 16 | {internalid: '1', name: Utils.translate('Color')}, 17 | {internalid: '2', name: Utils.translate('Size')} 18 | ]; 19 | } 20 | } 21 | }) -------------------------------------------------------------------------------- /samples/2020-2/Example-part5/Modules/UserPreferences/SuiteScript2/Example.UserPreferences.Service.ss: -------------------------------------------------------------------------------- 1 | /** 2 | * @NApiVersion 2.x 3 | * @NModuleScope Public 4 | * // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 5 | * // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 6 | */ 7 | define([ 8 | './Example.UserPreferences.Model' 9 | ], function ( 10 | ExampleUserPreferencesModel 11 | ) { 12 | 'use strict'; 13 | 14 | function service (context) { 15 | var response = {}; 16 | 17 | switch (context.request.method) { 18 | case 'GET': 19 | response = ExampleUserPreferencesModel.get(context.request) 20 | break; 21 | case 'POST': 22 | response = ExampleUserPreferencesModel.post(context.request) 23 | break; 24 | } 25 | 26 | context.response.write(JSON.stringify(response)); 27 | } 28 | 29 | return { 30 | service: service 31 | } 32 | }) -------------------------------------------------------------------------------- /samples/2020-2/Example-part5/Modules/UserPreferences/Templates/example_userpreferences_collection.tpl: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part5/Modules/UserPreferences/Templates/example_userpreferences_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | {{model.internalid}} 3 | 4 | {{#each typeOptions}} 5 | {{#ifEquals internalid ../model.type}}{{name}}{{/ifEquals}} 6 | {{/each}} 7 | 8 | {{model.value}} 9 | 10 | {{translate 'Edit'}} 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/2020-2/Example-part5/Modules/UserPreferences/Templates/example_userpreferences_edit.tpl: -------------------------------------------------------------------------------- 1 |

Add/Edit User Preferences

2 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part5/Modules/UserPreferences/Templates/example_userpreferences_form.tpl: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 | 12 |
13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 |
21 |
22 | 23 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part5/Modules/UserPreferences/Templates/example_userpreferences_list.tpl: -------------------------------------------------------------------------------- 1 |
2 |

{{translate 'User Preferences'}}

3 | {{translate 'Add New'}} 4 |
5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
{{translate 'Internal ID'}}{{translate 'Type'}}{{translate 'Value'}}{{translate 'Actions'}}
17 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part6/Modules/UserPreferences/JavaScript/Example.UserPreferences.Helper.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | define('Example.UserPreferences.Helper', [ 4 | 'Utils' 5 | ], function ( 6 | Utils 7 | ) { 8 | // A helper file is a module that contains utility functions that can be shared between multiple modules 9 | 10 | 'use strict'; 11 | 12 | return { 13 | // For the sake of the tutorial, we are hardcoding in the options for the available types of user preference, but it would be better to fetch them with SuiteScript 14 | getTypeOptions: function getTypeOptions () { 15 | return [ 16 | {internalid: '1', name: Utils.translate('Color')}, 17 | {internalid: '2', name: Utils.translate('Size')} 18 | ]; 19 | } 20 | } 21 | }) -------------------------------------------------------------------------------- /samples/2020-2/Example-part6/Modules/UserPreferences/Templates/example_userpreferences_collection.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part6/Modules/UserPreferences/Templates/example_userpreferences_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{model.internalid}} 5 | 6 | {{#each typeOptions}} 7 | {{#ifEquals internalid ../model.type}}{{name}}{{/ifEquals}} 8 | {{/each}} 9 | 10 | {{model.value}} 11 | 12 | {{translate 'Edit'}} 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/2020-2/Example-part6/Modules/UserPreferences/Templates/example_userpreferences_edit.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Add/Edit User Preferences

4 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part6/Modules/UserPreferences/Templates/example_userpreferences_list.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

{{translate 'User Preferences'}}

5 | {{translate 'Add New'}} 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
{{translate 'Internal ID'}}{{translate 'Type'}}{{translate 'Value'}}{{translate 'Actions'}}
19 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part7/Modules/UserPreferences/JavaScript/Example.UserPreferences.Helper.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 2 | // Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 3 | define('Example.UserPreferences.Helper', [ 4 | 'Utils' 5 | ], function ( 6 | Utils 7 | ) { 8 | // A helper file is a module that contains utility functions that can be shared between multiple modules 9 | 10 | 'use strict'; 11 | 12 | return { 13 | // For the sake of the tutorial, we are hardcoding in the options for the available types of user preference, but it would be better to fetch them with SuiteScript 14 | getTypeOptions: function getTypeOptions () { 15 | return [ 16 | {internalid: '1', name: Utils.translate('Color')}, 17 | {internalid: '2', name: Utils.translate('Size')} 18 | ]; 19 | } 20 | } 21 | }) -------------------------------------------------------------------------------- /samples/2020-2/Example-part7/Modules/UserPreferences/Templates/example_userpreferences_collection.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part7/Modules/UserPreferences/Templates/example_userpreferences_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{model.internalid}} 5 | 6 | {{#each typeOptions}} 7 | {{#ifEquals internalid ../model.type}}{{name}}{{/ifEquals}} 8 | {{/each}} 9 | 10 | {{model.value}} 11 | 12 | {{translate 'Edit'}} 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/2020-2/Example-part7/Modules/UserPreferences/Templates/example_userpreferences_edit.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Add/Edit User Preferences

4 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part7/Modules/UserPreferences/Templates/example_userpreferences_list.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

{{translate 'User Preferences'}}

5 | {{translate 'Add New'}} 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
{{translate 'Internal ID'}}{{translate 'Type'}}{{translate 'Value'}}{{translate 'Actions'}}
19 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part8/Modules/UserPreferences/Templates/example_userpreferences_collection.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part8/Modules/UserPreferences/Templates/example_userpreferences_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{model.internalid}} 5 | 6 | {{#each typeOptions}} 7 | {{#ifEquals internalid ../model.type}}{{name}}{{/ifEquals}} 8 | {{/each}} 9 | 10 | {{model.value}} 11 | 12 | {{translate 'Edit'}} 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/2020-2/Example-part8/Modules/UserPreferences/Templates/example_userpreferences_edit.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Add/Edit User Preferences

4 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part8/Modules/UserPreferences/Templates/example_userpreferences_list.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

{{translate 'User Preferences'}}

5 | {{translate 'Add New'}} 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
{{translate 'Internal ID'}}{{translate 'Type'}}{{translate 'Value'}}{{translate 'Actions'}}
19 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part9/Modules/UserPreferences/Templates/example_userpreferences_collection.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part9/Modules/UserPreferences/Templates/example_userpreferences_details.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{model.internalid}} 5 | 6 | {{#each typeOptions}} 7 | {{#ifEquals internalid ../model.type}}{{name}}{{/ifEquals}} 8 | {{/each}} 9 | 10 | {{model.value}} 11 | 12 | {{translate 'Edit'}} 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/2020-2/Example-part9/Modules/UserPreferences/Templates/example_userpreferences_edit.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |

{{#if isNew}}Add{{else}}Edit{{/if}} User Preferences

4 |
-------------------------------------------------------------------------------- /samples/2020-2/Example-part9/Modules/UserPreferences/Templates/example_userpreferences_list.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

{{translate 'User Preferences'}}

5 | {{translate 'Add New'}} 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
{{translate 'Internal ID'}}{{translate 'Type'}}{{translate 'Value'}}{{translate 'Actions'}}
19 |
--------------------------------------------------------------------------------