Created
October 20, 2017 00:34
-
-
Save alexed1/2b80d98bd179b43f8dccde6828b5d012 to your computer and use it in GitHub Desktop.
Main.cmp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component controller="NBAComponentController" implements="flexipage:availableForAllPageTypes,force:appHostable" access="global" > | |
<ltng:require scripts="{!$Resource.cometd}" afterScriptsLoaded="{!c.onCometdLoaded}"/> | |
<aura:attribute name="sessionId" type="String"/> | |
<aura:attribute name="cometd" type="Object"/> | |
<aura:attribute name="cometdSubscriptions" type="Object[]"/> | |
<aura:registerEvent name="toastEvent" type="force:showToast"/> | |
<aura:attribute name="label" type="String" default=""/> | |
<aura:attribute name="description" type="String" default="Ready to generate recommendation!"/> | |
<aura:attribute name="id" type="String"/> | |
<aura:attribute name="followupFlowId" type="String"/> | |
<aura:attribute name="acceptLabel" type="String" default="Accept Recommendation"/> | |
<aura:attribute name="showMainPane" type="Boolean" default="true"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<!-- 1 Up NBA --> | |
<!--<div class="slds-card slds-p-vertical_medium slds-p-horizontal_x-small slds-m-around_medium"> --> | |
<!-- NBA Component--> | |
<!-- <span class="slds-card__header-link slds-text-heading_small slds-m-horizontal_x-small">Einstein Recommendations</span>--> | |
<!-- <div class="slds-grid slds-p-horizontal_x-small slds-p-top_x-small slds-grid_pull-padded-x-small"> --> | |
<!-- NBA --> | |
<div class="slds-col slds-p-horizontal_x-small slds-grid"> | |
<div class="slds-nba slds-box slds-col slds-grid slds-wrap slds-color__background_gray-1"> | |
<div class="slds-col slds-text-align_left slds-m-horizontal_x-small slds-grow-max"> | |
<div class="slds-grid slds-grid--align-spread"> | |
<aura:if isTrue="{!v.showMainPane}"> | |
<div class="slds-col slds-text-align_left slds-m-horizontal_x-small slds-grow-max"> | |
<div class="slds-text-heading_small "> | |
<ui:outputText value="{!v.label}"/> | |
</div> | |
<button class="slds-button slds-line-height--reset undo slds-hide">Restore</button> | |
<div class="slds-text-body slds-text-color_weak slds-p-bottom_small description"> | |
<ui:outputText value="{! v.description}"/> | |
</div> | |
<div> | |
<button id="insights_button" | |
class="slds-button slds-button_neutral" | |
onclick="{! c.handleRecordInsightsClick }"> | |
Record Insights | |
</button> | |
</div> | |
</div> | |
<aura:set attribute="else"> | |
<div style="float:left"> | |
<lightning:select name="favorite_TV_Network" label="Favorite TV Network" > | |
<option value="">choose one...</option> | |
<option value="Canal+">Canal+</option> | |
<option value="France 2">France 2</option> | |
<option value="Fashion TV">Fashion TV</option> | |
<option value="Netflix">Netflix</option> | |
</lightning:select> | |
<lightning:select name="general_Satisfaction" label="General Satisfaction" > | |
<option value="">choose one...</option> | |
<option value="Very Happy">8</option> | |
<option value="Happy">6</option> | |
<option value="Neutral">5</option> | |
<option value="Discontented">3</option> | |
<option value="Angry or Upset">1</option> | |
</lightning:select> | |
<lightning:select name="travel_plans" label="Travel Plans" > | |
<option value="">choose one...</option> | |
<option value="Travel Within France">inCountry</option> | |
<option value="European Travel">europe</option> | |
<option value="Travel to Americas">americas</option> | |
<option value="Travel to Asia/Africa/MiddleEast">asia_emea</option> | |
</lightning:select> | |
<div> | |
<button id="saveInsights_button" | |
class="slds-button slds-button_neutral" | |
onclick="{! c.handleSaveInsightsClick }"> | |
Save Insights | |
</button> | |
</div> | |
</div> | |
</aura:set> | |
</aura:if> | |
</div> | |
</div> | |
<!-- Add .slds-grow-none Works to keep the actions snapped right but doesn't allow them to responsively center.--> | |
<div class="slds-col slds-m-horizontal_x-small -slds-grow-none actions"> | |
<div class="slds-grid slds-grid_vertical"> | |
<div class="slds-align-middle"> | |
<lightning:button class="slds-button slds-button_neutral" | |
label="{!v.acceptLabel}" | |
onclick="{! c.handleAcceptClick }" /> | |
</div> | |
<div class="slds-align-middle slds-m-top_xx-small"> | |
<lightning:button class="slds-button slds-button_neutral" | |
label="No Thanks" | |
onclick="{! c.handleNoThanksClick }" /> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</aura:component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment