Skip to content

Commit

Permalink
Fix link options UI bug
Browse files Browse the repository at this point in the history
  • Loading branch information
amitt001 committed Nov 26, 2017
1 parent 18482cc commit f047ddb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/pyui/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function copyToClipboard(className){

function readOnlyToggle(elementId) {
var element = document.getElementById(elementId);
element.value = '';
element.readOnly = !element.readOnly;
}

Expand Down
16 changes: 8 additions & 8 deletions src/pyui/templates/pygmy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ <h1>Pygmy</h1>
</div>

<!--Secret and expire options-->
<div class="row vcenter">
<div class="col-xs-1">
<input type="checkbox" tabindex="3" name="secret_check" id="remember" onclick="readOnlyToggle('secretKey')">
<label for="remember"> Secret </label>
<div class="row horizontal-center">
<div class="col-xs-0">
<input type="checkbox" tabindex="3" name="secret_check" id="secret" onclick="readOnlyToggle('secretKey')">
</div>
<div class="col-xs-1"><label for="secret"> Secret </label></div>
<div class="col-xs-2">
<input class="form-control input-sm" name="secret_key" id="secretKey" placeholder="Secret key..." readonly>
</div>
</div><br>

<div class="row vcenter">
<div class="col-xs-1">
<input type="checkbox" tabindex="3" name="remember_check" id="secret" onclick="readOnlyToggle('expireTime')">
<label for="remember"> Expire </label>
<div class="row horizontal-center">
<div class="col-xs-0">
<input type="checkbox" tabindex="3" name="remember_check" id="expire" onclick="readOnlyToggle('expireTime')">
</div>
<div class="col-xs-1"><label for="expire"> Expire </label></div>
<div class="col-xs-2">
<input class="form-control input-sm" name="remember_time" id="expireTime" placeholder="Expire time in minutes." readonly>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pyui/templates/pygmy/short_url.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1 class="vcenter">Pygmy</h1>
<div class="has-success">
<div class="input-group">
<input type="text" class="form-control input-lg" placeholder="XXX"
value="{{short_url}}" readonly autofocus id="short_url_blocked">
value="{{short_url}}" readonly autofocus id="short_url_blocked" onclick="input.focus();input.select();">
<span class="input-group-btn">
<button class="btn btn-info btn-lg copyButton" id="copyButtonId" onclick="copyToClipboard('copyButton')"
data-clipboard-action="copy" data-clipboard-target="input#short_url_blocked">
Expand Down

0 comments on commit f047ddb

Please sign in to comment.