Skip to content

Instantly share code, notes, and snippets.

View tyoshikawa1106's full-sized avatar

Taiki Yoshikawa tyoshikawa1106

View GitHub Profile
@tyoshikawa1106
tyoshikawa1106 / 00_VisualStrapDemo.page
Created March 11, 2014 13:32
VisualStrap Demo ①
<apex:page docType="html-5.0" showHeader="true" sidebar="false">
<vs:importVisualStrap theme="default" />
<vs:visualStrapBlock >
<!--All the Visualstrap content and Visualforce content here -->
</vs:visualStrapBlock >
</apex:page>
@tyoshikawa1106
tyoshikawa1106 / 05_1_Badges
Created March 11, 2014 13:34
VisualStrap Demo ②
<apex:page docType="html-5.0" showHeader="true" sidebar="false">
<vs:importvisualstrap theme="default" />
<vs:visualstrapblock >
<strong><apex:outputText >Contacts</apex:outputText></strong><apex:outputPanel styleClass="badge">12</apex:outputPanel>
<strong><apex:outputText >Accounts</apex:outputText></strong><apex:outputPanel styleClass="badge">12</apex:outputPanel>
</vs:visualstrapblock>
</apex:page>
@tyoshikawa1106
tyoshikawa1106 / 09. Grid System
Created March 11, 2014 13:38
VisualStrap Demo ③
<apex:page docType="html-5.0" showHeader="true" sidebar="false">
<vs:importvisualstrap theme="default" />
<apex:form >
<vs:visualstrapblock >
<vs:row >
<vs:column type="col-md-1">.col-md-1</vs:column>
<vs:column type="col-md-1">.col-md-1</vs:column>
<vs:column type="col-md-1">.col-md-1</vs:column>
<vs:column type="col-md-1">.col-md-1</vs:column>
@tyoshikawa1106
tyoshikawa1106 / 12. Buttons
Created March 11, 2014 13:39
VisualStrap Demo ④
<apex:page standardController="Account" docType="html-5.0" showHeader="true" sidebar="false" recordSetVar="accounts">
<vs:importvisualstrap theme="default" />
<apex:form >
<vs:visualstrapblock >
<apex:commandButton value="Default" styleClass="btn-default"/>
<apex:commandButton value="Primary" styleClass="btn-primary"/>
<apex:commandButton value="Success" styleClass="btn-success"/>
<apex:commandButton value="Info" styleClass="btn-info"/>
<apex:commandButton value="Warning" styleClass="btn-warning"/>
<apex:page standardController="Account" docType="html-5.0" showHeader="true" sidebar="false" recordSetVar="accounts">
<vs:importvisualstrap theme="default" />
<apex:form >
<vs:visualstrapblock >
<apex:outputPanel styleClass="btn-group" layout="block">
<apex:commandButton value="Action" styleClass="btn-danger" action="{doAction}" />
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
<apex:outputPanel styleClass="caret"></apex:outputPanel>
&nbsp;
<apex:page showHeader="false" sidebar="false">
<apex:stylesheet value="{!URLFOR($Resource.OneStarter,'icons.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.OneStarter,'styles.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.OneStarter,'OneStarter.css')}"/>
<!-- JavaScript files -->
<apex:includeScript value="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"/>
<apex:includeScript value="{!URLFOR($Resource.TouchSwipe,'jquery.touchSwipe.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.OneStarter,'jquery.onestarter.js')}"/>
@tyoshikawa1106
tyoshikawa1106 / 1_進捗どうですか.txt
Last active August 29, 2015 14:00
進捗どうですか for Chatter ( 参考 - http://dokoaa.com/mumi.html )
javascript:var elt = document.getElementById("publishereditablearea");
var msg = ">>";
msg+= "\n" + "            ∧  ∧";
msg+= "\n" + "            |1/ |1/";
msg+= "\n" + "          / ̄ ̄ ̄`ヽ、";
msg+= "\n" + "         /       ヽ";
msg+= "\n" + "        /  ⌒  ⌒    |";
msg+= "\n" + "        | (●) (●)  |   進捗どうですか?";
msg+= "\n" + "        /          |";
msg+= "\n" + "       /           |";
@tyoshikawa1106
tyoshikawa1106 / RemoteObjects.page
Created May 5, 2014 13:43
apex:RemoteObjects Sample
<apex:page >
<!-- Remote Objects definition to set accessible sObjects and fields -->
<apex:remoteObjects >
<apex:remoteObjectModel name="Account" jsShorthand="Warehouse" fields="Name,Id">
<apex:remoteObjectField name="Phone" jsShorthand="Phone"/>
</apex:remoteObjectModel>
</apex:remoteObjects>
<!-- JavaScript to make Remote Objects calls -->
<script>
@tyoshikawa1106
tyoshikawa1106 / GoInstantRichTextEditor.page
Last active August 29, 2015 14:01
GoInstant - Rich Text Editor
<apex:page showHeader="true" sidebar="false">
<script type="text/javascript" src="https://cdn.goinstant.net/v1/platform.min.js"></script>
<script type="text/javascript" src="https://cdn.goinstant.net/widgets/rich-text-editor/latest/rich-text-editor.min.js"></script>
<!-- CSS is optional -->
<link rel="stylesheet" href="https://cdn.goinstant.net/widgets/rich-text-editor/latest/rich-text-editor.css" />
<script type="text/javascript">
// Connect URL
var url = 'https://goinstant.net/YOURACCOUNT/YOURAPP';
<apex:page controller="RelatedListDemoController">
<apex:repeat value="{!accounts}" var ="item">
<apex:relatedList list="Contacts" subject="{!item.Id}" />
</apex:repeat>
</apex:page>