From c37b7ae59fa825735aad999512d6463187cc10f8 Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Thu, 8 Mar 2018 18:35:47 -0500 Subject: [PATCH] cleanup unused --- README.md | 4 +- src/components/NewTopic.js | 12 ++- views/js/approve_access_post.js | 1 - views/js/deny_access_post.js | 1 - views/js/mark_read.js | 7 -- views/js/mark_unread.js | 7 -- views/layouts/_templates.js | 181 -------------------------------- views/maps/_newsynapse.js | 3 - views/maps/_newtopic.js | 32 ------ 9 files changed, 14 insertions(+), 234 deletions(-) delete mode 100644 views/js/approve_access_post.js delete mode 100644 views/js/deny_access_post.js delete mode 100644 views/js/mark_read.js delete mode 100644 views/js/mark_unread.js delete mode 100644 views/layouts/_templates.js delete mode 100644 views/maps/_newsynapse.js delete mode 100644 views/maps/_newtopic.js diff --git a/README.md b/README.md index 2d3eaed9..e2b2e18f 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ Checklist - [x] create topic form - [x] Fork map lightbox / component +- [ ] fix other places where metacode sets are used +- [ ] make newtopic form load metacodes from users selected ones - [ ] create synapse form - [ ] replace old loader with react loader - [ ] ensure exports of maps work @@ -63,4 +65,4 @@ Checklist - [ ] user passwords - [ ] Modify the RubyOnRails app to only serve JSON responses, no HTML pages anymore - [ ] Modify the frontend to request that data from the API which is necessary at first to load the page - - [ ] Load the metacode sets + - [x] Load the metacode sets diff --git a/src/components/NewTopic.js b/src/components/NewTopic.js index 3e33af27..d837ea6b 100644 --- a/src/components/NewTopic.js +++ b/src/components/NewTopic.js @@ -41,4 +41,14 @@ class NewTopic extends Component { } } -export default NewTopic \ No newline at end of file +export default NewTopic + +/* +TODO: +{ @metacodes.each do |metacode| } + Metamaps.Create.selectedMetacodes.push("{ metacode.id }"); + Metamaps.Create.newSelectedMetacodes.push("{ metacode.id }"); + Metamaps.Create.selectedMetacodeNames.push("{ metacode.name }"); + Metamaps.Create.newSelectedMetacodeNames.push("{ metacode.name }"); + { end } +*/ \ No newline at end of file diff --git a/views/js/approve_access_post.js b/views/js/approve_access_post.js deleted file mode 100644 index 24db9b80..00000000 --- a/views/js/approve_access_post.js +++ /dev/null @@ -1 +0,0 @@ -$('.main-text').text($('.requesterName').text() + ' has been shared on the map and notified.') \ No newline at end of file diff --git a/views/js/deny_access_post.js b/views/js/deny_access_post.js deleted file mode 100644 index 64b89256..00000000 --- a/views/js/deny_access_post.js +++ /dev/null @@ -1 +0,0 @@ -$('.main-text').text('Fair enough.') \ No newline at end of file diff --git a/views/js/mark_read.js b/views/js/mark_read.js deleted file mode 100644 index fdd11b8a..00000000 --- a/views/js/mark_read.js +++ /dev/null @@ -1,7 +0,0 @@ -$('#notification-{ @notification.id } .notification-read-unread > a') - .text('mark as unread') - .attr('href', '{ mark_unread_notification_path(@notification.id) }') -$('#notification-{ @notification.id }') - .removeClass('unread') - .addClass('read') -Metamaps.GlobalUI.Notifications.decrementUnread(Metamaps.GlobalUI.ReactApp.render) diff --git a/views/js/mark_unread.js b/views/js/mark_unread.js deleted file mode 100644 index ba128688..00000000 --- a/views/js/mark_unread.js +++ /dev/null @@ -1,7 +0,0 @@ -$('#notification-{ @notification.id } .notification-read-unread > a') - .text('mark as read') - .attr('href', '{ mark_read_notification_path(@notification.id) }') -$('#notification-{ @notification.id }') - .removeClass('read') - .addClass('unread') -Metamaps.GlobalUI.Notifications.incrementUnread(Metamaps.GlobalUI.ReactApp.render) diff --git a/views/layouts/_templates.js b/views/layouts/_templates.js deleted file mode 100644 index 54a6646c..00000000 --- a/views/layouts/_templates.js +++ /dev/null @@ -1,181 +0,0 @@ - - -
- - - - - - - - - - - - - -
diff --git a/views/maps/_newsynapse.js b/views/maps/_newsynapse.js deleted file mode 100644 index efdde4af..00000000 --- a/views/maps/_newsynapse.js +++ /dev/null @@ -1,3 +0,0 @@ -{ form_for Synapse.new, url: synapses_url, remote: true do |form| } -{ form.text_field :desc, :placeholder => "describe the connection..." } -{ end } diff --git a/views/maps/_newtopic.js b/views/maps/_newtopic.js deleted file mode 100644 index 73e472d5..00000000 --- a/views/maps/_newtopic.js +++ /dev/null @@ -1,32 +0,0 @@ -{ @metacodes = user_metacodes() } - -{ form_for Topic.new, url: topics_url, remote: true do |form| } -
-
Switch Metacodes
-
- -
-
Pin Open
-
Unpin
-
- -
- { @metacodes.each do |metacode| } - { metacode.name } - { end } -
- - { form.text_field :name, :maxlength => 140, :placeholder => "title..." } - -
-
- - -{ end }