Hot or cold?
This is a post with links and code!!!
_getData: ->
previewedContentData = @model.previewedContentCleanedUp()
# NOTE: Don't have to delete old main area assets because it will
# lose it's asset_attachable and be cleaned up by janitor
if (@isEdit or @model.isDraft()) and not @removedContent and not previewedContentData
contentData = @model.get 'content'
if @model.previewedContent?.get('kind') is 'link'
contentData = {}
contentData.link_description = @model.previewedContent.get('link_description')
contentData.is_video = @model.previewedContent.get('is_video')
title = @_getTitleInputValue()
contentData = _.extend {}, contentData, @_getContentData(),
title: title
description: @_getDescriptionInputValue()
# Append chat transcript text, make sure not to add null or undefined
contentData.description += @chatTranscriptRegion.currentView?.getValue() or @ui.chatTranscript.html() or ''
# Remove description asset ids from asset_ids since they are re-added below
wysiwygAssetIds = _.map contentData.wysiwygAttachments, (wA) -> wA.id
contentData.asset_ids = _.without contentData.asset_ids, wysiwygAssetIds...
# If the user removed the content then there would be no other asset_ids beside wysiwyg assets.
# Need to delete contentData.asset_ids so it can be overriden by previewedContentData
delete contentData.asset_ids if @removedContent or previewedContentDataA really ugly link
โค๏ธ
๐
๐ก
๐
๐


Comments
Start the Conversation