working paste uploader
This commit is contained in:
parent
36145c0a2f
commit
2f05753c8e
@ -122,6 +122,13 @@ var contented = (function ($, currentScriptPath) {
|
||||
handleUploadFrom($(".contented-file-selector")[0].files);
|
||||
});
|
||||
|
||||
$f.find('.contented-paste-upload').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
var blob = new Blob([$(".contented-if-paste textarea").val()], {type : 'text/plain'});
|
||||
handleUploadFrom([blob]);
|
||||
});
|
||||
|
||||
$("body").append($f);
|
||||
|
||||
var setProgressCaption = function(message) {
|
||||
|
@ -75,8 +75,7 @@
|
||||
.contented textarea {
|
||||
resize: none;
|
||||
width:100%;
|
||||
height:100%;
|
||||
padding: 0;
|
||||
height:calc(100% - 1em - 15px);
|
||||
box-sizing:border-box;
|
||||
}
|
||||
.contented-progress-bar {
|
||||
@ -137,7 +136,8 @@
|
||||
</div>
|
||||
|
||||
<div class="contented-upload-if contented-if-paste">
|
||||
<textarea name="paste-content"></textarea>
|
||||
<textarea placeholder="Paste content here"></textarea>
|
||||
<button class="contented-paste-upload">Upload »</button>
|
||||
</div>
|
||||
|
||||
<div class="contented-upload-if contented-if-progress">
|
||||
|
Loading…
Reference in New Issue
Block a user