Commit fe28811d authored by Matija Obreza's avatar Matija Obreza
Browse files

Quick fix to crop.html

parent 3050fa87
......@@ -5,18 +5,11 @@
<title>Demo</title>
</head>
<body>
<script src="../html/js/main.js"></script>
<script type="text/javascript" src="/html/js/tinymce/tinymce.min.js"></script>
<script src="../html/js/client.js"></script>
<h1>Crop API</h1>
<div class="page-header">
<a href="index.html">Index</a> <a href="crop.html">Crop</a>
<div class="form-horizontal">
<div class="form-group">
<div class="col-lg-3 control-label">Access Token:</div>
<input class="form-control col-lg-9" type="text" id="accessToken" placeholder="Your access token" />
</div>
</div>
<textarea class="form-control" style="height: 200px;" id="responseBody" placeholder="Response Body..."></textarea>
<button id="clearResponse">Clear</button>
......@@ -61,6 +54,12 @@
</div>
</div>
</form>
<content tag="javascript">
<script src="../html/js/main.js"></script>
<script type="text/javascript" src="/html/js/tinymce/tinymce.min.js"></script>
<script src="../html/js/client.js"></script>
</content>
</body>
</html>
......@@ -41,11 +41,13 @@ function x0(apiUrl, path, method, object) {
}
$(document).ready(function() {
accessToken=$("#accessToken")[0].value;
if ($("#accessToken")[0]) {
accessToken=$("#accessToken")[0].value;
$("#accessToken").on("change", function(e) {
accessToken = this.value;
});
}
$("#responseBody")[0].value=null;
$("#accessToken").on("change", function(e) {
accessToken = this.value;
});
$("button.rest-api").on("click", function(e) {
x1(apiUrl, $(this).attr('x-url'), 'GET');
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment