From a97b09210e977d52a5bda1dee2b1eddc19afc013 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 1 Aug 2017 18:05:04 -0700 Subject: auto preview when inserting a media item or embed into a post. Since this unanticipated action could be alarming (some might think the post was actually submitted), also provide a visible preview indicator within the previewed content. Remove the css for the old striped background image which hasn't been available for previewed content for a year or two. --- view/tpl/conv_item.tpl | 1 + view/tpl/jot-header.tpl | 2 ++ view/tpl/search_item.tpl | 1 + 3 files changed, 4 insertions(+) (limited to 'view/tpl') diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 36cb4cc83..663b02890 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -39,6 +39,7 @@ {{/if}}
+ {{if $item.previewing}} {{/if}} {{$item.name}}{{if $item.owner_url}} {{$item.via}} {{$item.owner_name}}{{/if}}
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index d8f296aa4..8adef6427 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -126,6 +126,7 @@ function enableOnUser(){ $('#jot-media').val($('#jot-media').val() + data.result.message); }, stop: function(e,data) { + preview_post(); $('#profile-rotator').spin(false); }, }); @@ -175,6 +176,7 @@ function enableOnUser(){ $('#profile-rotator').spin('tiny'); $.get('{{$baseurl}}/linkinfo?f=&binurl=' + reply, function(data) { addeditortext(data); + preview_post(); $('#profile-rotator').spin(false); }); } diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index 4ca6378b8..28667eb58 100755 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -32,6 +32,7 @@
{{/if}}
+ {{if $item.previewing}} {{/if}} {{$item.name}}{{if $item.owner_url}} {{$item.via}} {{$item.owner_name}}{{/if}}
-- cgit v1.2.3