Skip to content

Commit

Permalink
removed unnecessary quotes around html attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ngn committed Apr 23, 2015
1 parent 8b04103 commit e730f33
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 77 deletions.
16 changes: 7 additions & 9 deletions client/about.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,23 @@ module.exports = ->
"""
buttons = []
if D.clipboardCopy then buttons.push text: 'Copy', click: -> D.clipboardCopy $('textarea', @).val(), 'text'; return
buttons.push text: 'Close', click: -> $(@).dialog 'close'
buttons.push text: 'Close', click: -> $(@).dialog 'close'; return
$("""
<div class="about">
<div class="logo">
<div class="contact-info">
<div class=about>
<div class=logo>
<div class=contact-info>
<span title="Dyalog's UK phone number">+44 (0)1256 830030</span><br>
<a href="mailto:[email protected]?subject=RIDE&body=#{escape '\n--\n' + info}"
title="Populate an email draft with the information below">[email protected]</a><br>
<a href="http://www.dyalog.com/" target="_blank"
<a href="http://www.dyalog.com/" target=_blank
title="Open Dyalog's website in a new window">www.dyalog.com</a>
</div>
</div>
<div class="textarea-wrapper">
<textarea readonly wrap="off"></textarea>
</div>
<div class=textarea-wrapper><textarea readonly wrap=off></textarea></div>
</div>
""")
.dialog
modal: 1, title: 'About', width: 520, height: 410, buttons: buttons
open: -> $(@).find('textarea').focus()
open: -> $(@).find('textarea').focus(); return
.find('textarea').val(info).select()
return
44 changes: 22 additions & 22 deletions client/connect.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,45 +24,45 @@ ipAddresses = [] # of the proxy. Used in the "Waiting for connections" dialogue

module.exports = (opts) ->
$('body').html """
<fieldset id="connect-fieldset">
<fieldset id=connect-fieldset>
<legend>Connect to an interpreter</legend>
<div id="fav-buttons">
<a id="about" href="#">About</a>
<a href="#" id="fav-new" accessKey="n"><u>N</u>ew</a>
<a href="#" id="fav-delete">Delete</a>
<div id=fav-buttons>
<a id=about href=#>About</a>
<a href=# id=fav-new accessKey=n><u>N</u>ew</a>
<a href=# id=fav-delete>Delete</a>
</div>
<select multiple id="fav-list"></select>
<table id="fav-details">
<select multiple id=fav-list></select>
<table id=fav-details>
<tr>
<td><u>A</u>ddress:</td>
<td>
<input accessKey="a" id="fav-host" class="text-field" value=""> :
<input id="fav-port" class="text-field" size="5" value="#{DEFAULT_PORT}">
<input accessKey=a id=fav-host class=text-field value=""> :
<input id=fav-port class=text-field size=5 value=#{DEFAULT_PORT}>
</td>
</tr>
<tr><td>Na<u>m</u>e:</td><td><input accessKey="m" id="fav-name" class="text-field"></td></tr>
<tr><td>Na<u>m</u>e:</td><td><input accessKey=m id=fav-name class=text-field></td></tr>
<tr>
<td></td>
<td>
<a href="#" id="fav-connect" accessKey="o">C<u>o</u>nnect</a>
<a href="#" id="fav-save" accessKey="s"><u>S</u>ave</a>
<a href="#" id="fav-cancel" accessKey="c"><u>C</u>ancel</a>
<a href=# id=fav-connect accessKey=o>C<u>o</u>nnect</a>
<a href=# id=fav-save accessKey=s><u>S</u>ave</a>
<a href=# id=fav-cancel accessKey=c><u>C</u>ancel</a>
</td>
</tr>
</table>
</fieldset>
<fieldset id="spawnSection" style="display:none">
<fieldset id=spawnSection style=display:none>
<legend>Spawn an interpreter</legend>
<p>
<a href="#" id="spawn" accessKey="w">Spa<u>w</u>n</a><br>
<span id="spawn-status"></span>
<a href=# id=spawn accessKey=w>Spa<u>w</u>n</a><br>
<span id=spawn-status></span>
</p>
</fieldset>
<fieldset>
<legend>Listen for connections from interpreter </legend>
<p>
<label>Port <input id="listen-port" class="text-field" value="#{DEFAULT_PORT}" size="5"></label>
<a href="#" id="listen" accessKey="l"><u>L</u>isten</a>
<label>Port <input id=listen-port class=text-field value=#{DEFAULT_PORT} size=5></label>
<a href=# id=listen accessKey=l><u>L</u>isten</a>
</p>
</fieldset>
"""
Expand Down Expand Up @@ -91,7 +91,7 @@ module.exports = (opts) ->
if !/^[a-z0-9\.\-:]+$/i.test host then $.alert 'Invalid host', 'Error', -> $host.focus(); return
else if !(0 < port < 0xffff) then $.alert 'Invalid port', 'Error', -> $port.focus(); return
else
$connectDialog = $ '<div class="connect-dialog"><div class="visual-distraction"></div></div>'
$connectDialog = $ '<div class=connect-dialog><div class=visual-distraction></div></div>'
.dialog modal: 1, width: 350, title: 'Connecting...', buttons: Cancel: -> $(@).dialog 'close'; false
D.socket.emit '*connect', {host, port}
false
Expand Down Expand Up @@ -129,13 +129,13 @@ module.exports = (opts) ->
else
D.socket.emit '*listen', {port}
$listenDialog = $ """
<div class='listen'>
<div class="visual-distraction"></div>
<div class=listen>
<div class=visual-distraction></div>
Please start the remote interpreter with<br>
#{
(
for host in (if proxyInfo.ipAddresses?.length then proxyInfo.ipAddresses else ['host'])
"<div class='tt'>RIDE_INIT='CONNECT:#{host}:#{port}'</div>"
"<div class=tt>RIDE_INIT='CONNECT:#{host}:#{port}'</div>"
).join 'or'
}
in its environment, so it connects here.
Expand Down
22 changes: 11 additions & 11 deletions client/ide.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ class @IDE
constructor: ->
ide = @
$('body').html @$ide = $ """
<div class="ide">
<div class="lbar ui-layout-north" style="display:none">
<a class="lbar-prefs" title="Preferences" href="#"></a>
<div class=ide>
<div class="lbar ui-layout-north" style=display:none>
<a class=lbar-prefs title=Preferences href=#></a>
#{D.lbarHTML}
</div>
<div class="lbar-tip" style="display:none"><div class="lbar-tip-desc"></div><pre class="lbar-tip-text"></pre></div>
<div class="lbar-tip-triangle" style="display:none"></div>
<div class="ui-layout-center"></div>
<div class="ui-layout-east" ><ul></ul></div>
<div class="ui-layout-south"><ul></ul></div>
<div class=lbar-tip style=display:none><div class=lbar-tip-desc></div><pre class=lbar-tip-text></pre></div>
<div class=lbar-tip-triangle style=display:none></div>
<div class=ui-layout-center></div>
<div class=ui-layout-east ><ul></ul></div>
<div class=ui-layout-south><ul></ul></div>
</div>
"""

Expand Down Expand Up @@ -138,7 +138,7 @@ class @IDE
# demo mode
demoLines = []; demoIndex = -1
demoLoad = ->
$('<input type="file" style="display:none">').appendTo('body').trigger('click').change ->
$('<input type=file style=display:none>').appendTo('body').trigger('click').change ->
if @value then D.readFile @value, 'utf8', (err, s) ->
if err then console?.error? err; $.alert 'Cannot load demo file'
else demoLines = s.replace(/^[\ufeff\ufffe]/, '').split /\r?\n/; demoIndex = -1
Expand Down Expand Up @@ -271,9 +271,9 @@ class @IDE
openWindow: (ee) -> # "ee" for EditableEntity
@layout.open dir = if ee.debugger then 'south' else 'east'
w = ee.token
$("<li id='wintab#{w}'><a href='#win#{w}'></a></li>").appendTo(".ui-layout-#{dir} ul")
$("<li id=wintab#{w}><a href=#win#{w}></a></li>").appendTo(".ui-layout-#{dir} ul")
.find('a').text(ee.name).click (e) => e.which == 2 && @wins[w].EP(); return # middle click
$tabContent = $("<div class='win' id='win#{w}'></div>").appendTo ".ui-layout-#{dir}"
$tabContent = $("<div class=win id=win#{w}></div>").appendTo ".ui-layout-#{dir}"
@wins[w] = new Editor $tabContent,
id: w, name: ee.name, debugger: ee.debugger, emit: @emit.bind(@)
weakInterrupt: @WI.bind(@), openInExternalEditor: D.openInExternalEditor
Expand Down
2 changes: 1 addition & 1 deletion client/init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $ ->
[_, k, v] = /^([^=]*)=?(.*)$/.exec kv; urlParams[unescape(k or '')] = unescape(v or '')
if D.floating && (win = urlParams.win)?
wins = D.wins = opener.D.wins
$('body').addClass('floating-window').html('<div class="ui-layout-center"></div>').layout
$('body').addClass('floating-window').html('<div class=ui-layout-center></div>').layout
defaults: enableCursorHotkey: 0
center: onresize: -> ed?.updateSize(); return
fxName: ''
Expand Down
20 changes: 10 additions & 10 deletions client/prefs-ui-keyboard.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,26 @@ layouts = # indexed by scancode; see http://www.abreojosensamblador.net/Producto
@init = ($e) ->
specialKeys = 15: '', 16: '', 30: 'Caps', 43: '', 44: '', 57: ''
$e.html """
<table id='keyboard-legend' class='key'
<table id=keyboard-legend class=key
title='Prefix followed by shift+key produces the character in red.
Prefix followed by an unshifted key produces the character in blue.'>
<tr><td class='g2'>⇧x</td><td class='g3'><span class='pk-double'>`</span>&nbsp;⇧x</td></tr>
<tr><td class='g0'>x</td><td class='g1'><span class='pk-double'>`</span>&nbsp;x</td></tr>
<tr><td class=g2>⇧x</td><td class=g3><span class=pk-double>`</span>&nbsp;⇧x</td></tr>
<tr><td class=g0>x</td><td class=g1><span class=pk-double>`</span>&nbsp;x</td></tr>
</table>
<label id='keyboard-pk-label'>Prefix: <input class="text-field pk" size="1"></label>
<div id="keyboard-layout">#{join(
<label id=keyboard-pk-label>Prefix: <input class="text-field pk" size=1></label>
<div id=keyboard-layout>#{join(
for i in [1...NK]
if s = specialKeys[i]
"<span id='k#{i}' class='key'>#{esc s}</span>"
"<span id=k#{i} class=key>#{esc s}</span>"
else
"""
<span id='k#{i}' class='key'>
<span class='g2'></span><input class='g3'><br>
<span class='g0'></span><input class='g1'>
<span id=k#{i} class=key>
<span class=g2></span><input class=g3><br>
<span class=g0></span><input class=g1>
</span>
"""
)}</div>
<select id="keyboard-locale">#{join((for x, _ of layouts then "<option>#{x}").sort())}</select>
<select id=keyboard-locale>#{join((for x, _ of layouts then "<option>#{x}").sort())}</select>
"""
.on 'focus', '.key input', -> setTimeout (=> $(@).select(); return), 1; return
.on 'blur', '.key input', -> $(@).val(v = $(@).val()[-1..] || ' ').prop 'title', "U+#{hex ord(v), 4}"; return
Expand Down
29 changes: 14 additions & 15 deletions client/prefs-ui-title.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ $wt = null
@name = 'Title'
@init = ($e) ->
$e.html """
Window title:
<input class="text-field">
Window title: <input class=text-field>
<pre>
<a href='#'>{WSID}</a> workspace name
<a href='#'>{HOST}</a>:<a href='#'>{PORT}</a> interpreter's TCP endpoint
<a href='#'>{PID}</a> PID of the interpreter process
<a href='#'>{CHARS}</a> Unicode or Classic
<a href='#'>{BITS}</a> 64 or 32
<a href='#'>{VER}</a> interpreter version
<a href='#'>{VER_A}</a> major
<a href='#'>{VER_B}</a> minor
<a href='#'>{VER_C}</a> svn revision
<a href='#'>{RIDE_VER}</a> RIDE version
<a href='#'>{RIDE_VER_A}</a> major
<a href='#'>{RIDE_VER_B}</a> minor
<a href='#'>{RIDE_VER_C}</a> git commit number
<a href=#>{WSID}</a> workspace name
<a href=#>{HOST}</a>:<a href='#'>{PORT}</a> interpreter's TCP endpoint
<a href=#>{PID}</a> PID of the interpreter process
<a href=#>{CHARS}</a> Unicode or Classic
<a href=#>{BITS}</a> 64 or 32
<a href=#>{VER}</a> interpreter version
<a href=#>{VER_A}</a> major
<a href=#>{VER_B}</a> minor
<a href=#>{VER_C}</a> svn revision
<a href=#>{RIDE_VER}</a> RIDE version
<a href=#>{RIDE_VER_A}</a> major
<a href=#>{RIDE_VER_B}</a> minor
<a href=#'>{RIDE_VER_C}</a> git commit number
</pre>
"""
$e.on 'click', 'pre a', (e) -> $wt.insert $(e.target).text(); return
Expand Down
8 changes: 4 additions & 4 deletions client/prefs-ui.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ ok = ->
module.exports = (tabName) ->
if !$d # the dialogue, lazily initialized
$d = $ """
<div id="prefs">
<ul id="prefs-tabs-nav">
#{join tabs.map (t) -> "<li><a href='#prefs-tab-#{safe t.name}'>#{t.name}</a></li>"}
<div id=prefs>
<ul id=prefs-tabs-nav>
#{join tabs.map (t) -> "<li><a href=#prefs-tab-#{safe t.name}>#{t.name}</a></li>"}
</ul>
#{join tabs.map (t) -> "<div id='prefs-tab-#{safe t.name}'></div>"}
#{join tabs.map (t) -> "<div id=prefs-tab-#{safe t.name}></div>"}
</div>
"""
.tabs()
Expand Down
2 changes: 1 addition & 1 deletion empty.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!doctype html>
<html><head><meta charset="utf-8"><title></title></head><body></body></html>
<html><head><meta charset=utf-8><title></title></head><body></body></html>
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta charset=utf-8>
<title>Dyalog IDE</title>
<link rel="stylesheet" href="codemirror.css">
<link rel="stylesheet" href="style.css">
<script src="D.js"></script>
<link rel=stylesheet href=codemirror.css>
<link rel=stylesheet href=style.css>
<script src=D.js></script>
</head>
<body><noscript>JavaScript is not enabled.</noscript></body>
</html>

0 comments on commit e730f33

Please sign in to comment.