mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-21 15:15:21 +00:00
make notes widget fixed height because it still doesn't play well with stickykit and I've wasted too much time trying to bludgeon it into submission.
This commit is contained in:
parent
11398d0da7
commit
0ced43b90d
2 changed files with 15 additions and 10 deletions
|
@ -13,25 +13,30 @@ class Poster extends Controller {
|
|||
$nick = argv(1);
|
||||
$hash = argv(2);
|
||||
|
||||
if(! ($nick && $hash)) {
|
||||
if (! ($nick && $hash)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$u = channelx_by_nick($nick);
|
||||
|
||||
if (! $u) {
|
||||
return;
|
||||
}
|
||||
|
||||
$sql_extra = permissions_sql(intval($u['channel_id']));
|
||||
|
||||
$r = q("select content from attach where hash = '%s' and uid = %d and os_storage = 1 $sql_extra limit 1",
|
||||
dbesc($hash),
|
||||
intval($u['channel_id'])
|
||||
);
|
||||
if($r) {
|
||||
if ($r) {
|
||||
$path = dbunescbin($r[0]['content']);
|
||||
if($path && @file_exists($path . '.thumb')) {
|
||||
if ($path && @file_exists($path . '.thumb')) {
|
||||
header('Content-Type: image/jpeg');
|
||||
echo file_get_contents($path . '.thumb');
|
||||
killme();
|
||||
}
|
||||
}
|
||||
killme();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<div class="widget">
|
||||
<h3>{{$banner}}</h3>
|
||||
<textarea name="note_text" id="note-text">{{$text}}</textarea>
|
||||
<textarea name="note_text" style="height: 250px;" id="note-text">{{$text}}</textarea>
|
||||
<script>
|
||||
var noteSaveTimer = null;
|
||||
var noteText = $('#note-text');
|
||||
|
||||
$(document).ready(function(e){
|
||||
noteText.on('change keyup keydown paste cut', function () {
|
||||
noteText.height(0).height(noteText[0].scrollHeight);
|
||||
$(document.body).trigger("sticky_kit:recalc");
|
||||
}).change();
|
||||
});
|
||||
// $(document).ready(function(e){
|
||||
// noteText.on('change keyup keydown paste cut', function () {
|
||||
// noteText.height(0).height(noteText[0].scrollHeight);
|
||||
// // $(document.body).trigger("sticky_kit:recalc");
|
||||
// }).change();
|
||||
// });
|
||||
|
||||
$(document).on('focusout',"#note-text",function(e){
|
||||
if(noteSaveTimer)
|
||||
|
|
Loading…
Reference in a new issue