From b18c6c451b9f7491435fa1d3fa9231248bff662e Mon Sep 17 00:00:00 2001 From: Eric Barbour Date: Aug 10 2016 19:35:20 +0000 Subject: Fix failing test, add on dropdown for feed nodes --- diff --git a/hubs/static/client/app/components/Markup.jsx b/hubs/static/client/app/components/Markup.jsx index 7342f58..e9b585e 100644 --- a/hubs/static/client/app/components/Markup.jsx +++ b/hubs/static/client/app/components/Markup.jsx @@ -1,6 +1,5 @@ import React from 'react'; -import SaveNotificationButton from './SaveNotificationButton.jsx'; - +import Dropdown from './Dropdown.jsx'; import TimeAgo from 'react-timeago'; @@ -11,15 +10,6 @@ export default class Markup extends React.Component { render() { const timestamp = this.props.date_time ? () : null; - - let saveBtn; - if (!this.props.match.saved && this.props.saveUrl) { - saveBtn = ( - ); - } return (

{timestamp} - {saveBtn} +
); } diff --git a/hubs/static/client/app/components/SaveNotificationButton.jsx b/hubs/static/client/app/components/SaveNotificationButton.jsx deleted file mode 100644 index 2b82d78..0000000 --- a/hubs/static/client/app/components/SaveNotificationButton.jsx +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; - -const SaveNotificationButton = function (props) { - const payload = { - link: props.match.link, - markup: props.match.markup, - secondary_icon: props.match.secondary_icon, - dom_id: props.match.dom_id, - }; - - function onClick(data) { - $.ajax({ - type: 'POST', - url: props.saveUrl, - data: JSON.stringify(data), - contentType: 'application/json', - }).done(() => { - const id = '#save' + props.match.dom_id; - const $saveBtn = $(id); - $saveBtn.removeClass('btn-default').addClass('btn-success').text('SAVED'); - }); - } - return ( - - ); -}; - -export default SaveNotificationButton;