Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bandicoot86/0d2638e340bd2c285c2e679299708bd5 to your computer and use it in GitHub Desktop.
Save bandicoot86/0d2638e340bd2c285c2e679299708bd5 to your computer and use it in GitHub Desktop.
TestDrivePage
<apex:page controller="TestDriveCtrl">
<script>
window.onload = function() {
console.log('{!$Profile.Name}');
var t = '{!$User.UIThemeDisplayed}';
if ('Theme4t' == t){
alert('Salesforce1');
}
console.log('Theme ' + t);
console.log('Typeof ' + typeof sforce);
};
</script>
<apex:form id="form">
<apex:pageMessages id="showmsg"></apex:pageMessages>
<apex:pageBlock title="Планирование тест-драйва">
<!--<p>{!$Profile.Name}</p> -->
<apex:panelGrid id="grid" columns="2" style="margin-top:1em;" cellspacing="10">
<apex:outputLabel value="Дилер" for="car"></apex:outputLabel>
<apex:selectList multiselect="false" id="car" value="{!selectedMake}" size="1">
<apex:actionSupport action="{!loadModels}" event="onchange"
rerender="m"/>
<apex:selectOptions value="{!makes}"></apex:selectOptions>
</apex:selectList>
<apex:outputLabel value="Машины" ></apex:outputLabel>
<apex:selectList id="m" value="{!selectedModel}" size="1">
<apex:selectOptions value="{!models}"></apex:selectOptions>
</apex:selectList>
<apex:outputLabel value="Начало" for="sd"></apex:outputLabel>
<apex:inputField required="false" id="sd" value="{!drive.StartDate__c}" label="ds"/>
<apex:outputLabel value="Конец" for="ed"></apex:outputLabel>
<apex:inputField id="ed" required="false" value="{!drive.EndDate__c}" label="ds" />
<apex:commandButton id="plan" action="{!save}" value="Запланировать"/>
</apex:panelGrid>
</apex:pageBlock>
</apex:form>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment