mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
109 lines
4.4 KiB
HTML
109 lines
4.4 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<title>calendar-button.coffee</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
|
|
<link rel="stylesheet" media="all" href="docco.css" />
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div id="background"></div>
|
|
|
|
<ul id="jump_to">
|
|
<li>
|
|
<a class="large" href="javascript:void(0);">Jump To …</a>
|
|
<a class="small" href="javascript:void(0);">+</a>
|
|
<div id="jump_wrapper">
|
|
<div id="jump_page_wrapper">
|
|
<div id="jump_page">
|
|
|
|
|
|
<a class="source" href="availability-draft-extension.html">
|
|
availability-draft-extension.coffee
|
|
</a>
|
|
|
|
|
|
<a class="source" href="calendar-button.html">
|
|
calendar-button.coffee
|
|
</a>
|
|
|
|
|
|
<a class="source" href="main.html">
|
|
main.coffee
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="sections">
|
|
|
|
<li id="title">
|
|
<div class="annotation">
|
|
<h1>calendar-button.coffee</h1>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
|
|
<li id="section-1">
|
|
<div class="annotation">
|
|
|
|
<div class="pilwrap ">
|
|
<a class="pilcrow" href="#section-1">¶</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="content"><div class='highlight'><pre>{Utils, DraftStore, React} = <span class="hljs-built_in">require</span> <span class="hljs-string">'nylas-exports'</span>
|
|
{RetinaImg} = <span class="hljs-built_in">require</span> <span class="hljs-string">'nylas-component-kit'</span>
|
|
|
|
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">CalendarButton</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span></span>
|
|
<span class="hljs-property">@displayName</span>: <span class="hljs-string">'CalendarButton'</span>
|
|
|
|
<span class="hljs-attribute">render</span>: <span class="hljs-function">=></span>
|
|
React.createElement(<span class="hljs-string">"div"</span>, {<span class="hljs-string">"className"</span>: <span class="hljs-string">"btn btn-toolbar"</span>, <span class="hljs-string">"onClick"</span>: (<span class="hljs-property">@_onClick</span>)}, <span class="hljs-string">"""
|
|
QuickSchedule
|
|
"""</span>)
|
|
|
|
<span class="hljs-attribute">_onClick</span>: <span class="hljs-function">=></span>
|
|
BrowserWindow = <span class="hljs-built_in">require</span>(<span class="hljs-string">'remote'</span>).<span class="hljs-built_in">require</span>(<span class="hljs-string">'browser-window'</span>)
|
|
w = <span class="hljs-keyword">new</span> BrowserWindow
|
|
<span class="hljs-string">'node-integration'</span>: <span class="hljs-literal">false</span>,
|
|
<span class="hljs-string">'web-preferences'</span>: {<span class="hljs-string">'web-security'</span>:<span class="hljs-literal">false</span>},
|
|
<span class="hljs-string">'width'</span>: <span class="hljs-number">700</span>,
|
|
<span class="hljs-string">'height'</span>: <span class="hljs-number">600</span></pre></div></div>
|
|
|
|
</li>
|
|
|
|
|
|
<li id="section-2">
|
|
<div class="annotation">
|
|
|
|
<div class="pilwrap ">
|
|
<a class="pilcrow" href="#section-2">¶</a>
|
|
</div>
|
|
<p>Here, we load an arbitrary html file into the Composer!</p>
|
|
|
|
</div>
|
|
|
|
<div class="content"><div class='highlight'><pre> path = <span class="hljs-built_in">require</span> <span class="hljs-string">'path'</span>
|
|
url = path.join __dirname, <span class="hljs-string">'..'</span>, <span class="hljs-string">'calendar.html'</span>
|
|
w.loadURL <span class="hljs-string">"file://<span class="hljs-subst">#{url}</span>?draftClientId=<span class="hljs-subst">#{<span class="hljs-property">@props</span>.draftClientId}</span>"</span>
|
|
|
|
|
|
<span class="hljs-attribute">_getDialog</span>: <span class="hljs-function">=></span>
|
|
<span class="hljs-built_in">require</span>(<span class="hljs-string">'remote'</span>).<span class="hljs-built_in">require</span>(<span class="hljs-string">'dialog'</span>)
|
|
|
|
|
|
<span class="hljs-built_in">module</span>.exports = CalendarButton</pre></div></div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|