cleanup unused

This commit is contained in:
Connor Turland 2018-03-08 18:35:47 -05:00
parent 7cfb830870
commit c37b7ae59f
9 changed files with 14 additions and 234 deletions

View file

@ -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

View file

@ -41,4 +41,14 @@ class NewTopic extends Component {
}
}
export default NewTopic
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 }
*/

View file

@ -1 +0,0 @@
$('.main-text').text($('.requesterName').text() + ' has been shared on the map and notified.')

View file

@ -1 +0,0 @@
$('.main-text').text('Fair enough.')

View file

@ -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)

View file

@ -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)

View file

@ -1,181 +0,0 @@
<div className="templates">
<script type="text/template" id="mapInfoBoxTemplate">
<div className="requestTitle">Click here to name this map</div>
<div className="mapInfoName" id="mapInfoName">{{{name}}}</div>
<div className="mapInfoStat">
<div className="infoStatIcon mapContributors hoverForTip">
<img id="mapContribs" className="{{contributors_className}}"
width="25" height="25" src="{{contributor_image}}" />
<span className="count">{{contributor_count}}</span>
<div className="tip">{{{contributor_list}}}</div>
</div>
<div className="infoStatIcon mapTopics">
{{topic_count}}
</div>
<div className="infoStatIcon mapSynapses">
{{synapse_count}}
</div>
<div className="infoStatIcon mapPermission {{permission}} hoverForTip">
{{{map_creator_tip}}}
</div>
<div className="clearfloat"></div>
</div>
<div className="mapInfoDesc" id="mapInfoDesc">
{{{desc}}}
</div>
<div className="mapInfoMeta">
<p className="mapCreatedAt"><span>Created by:</span> {{user_name}} on {{created_at}}</p>
<p className="mapEditedAt"><span>Last edited:</span> {{updated_at}}</p>
<div className="mapInfoButtonsWrapper">
<div className="mapInfoThumbnail">
<div className="thumbnail"></div>
<div className="tooltip">Update Thumbnail</div>
<span>Thumb</span>
</div>
<div className="mapInfoDelete">
<div className="deleteMap"></div>
<span>Delete</span>
</div>
<div className="mapInfoShare">
<div className="mapInfoShareIcon"></div>
<span>Share</span>
</div>
</div>
</div>
</script>
<script type="text/template" id="topicSearchTemplate">
<div className="result{{rtype}}">
<div className="topicMetacode searchResIconWrapper">
<img src="{{typeImageURL}}" className="topicIcon" />
<div className="metacodeTip">{{type}}</div>
</div>
<div className="resultText">
<p className="resultTitle">{{label}}</p>
<p className="resultDesc">{{description}}</p>
</div>
<div className="autoOptions">
<button className="addToMap hoverForTip" onclick="return Metamaps.Topic.getTopicFromSearch(event, {{id}})">
<span className="tip">add to map</span>
</button>
<div className="mapCount">
{{mapCount}}
</div>
<div className="synapseCount">
{{synapseCount}}
</div>
<div className="topicOriginatorIcon hoverForTip">
<img width="18" height="18" src="{{originatorImage}}">
<span className="tip topicOriginator">{{originator}}</span>
</div>
<div className="topicPermission {{permission}}">
</div>
</div>
<div className="clearfloat"></div>
</div>
</script>
<script type="text/template" id="mapSearchTemplate">
<div className="result{{rtype}}">
<div className="searchResIconWrapper">
<img className="icon" src="/images/metamap36c.png">
</div>
<div className="resultText">
<p className="resultTitle">{{label}}</p>
<p className="resultDesc">{{description}}</p>
</div>
<div className="autoOptions">
<div className="topicCount">
{{topicCount}}
</div>
<div className="synapseCount">
{{synapseCount}}
</div>
<div className="mapContributorsIcon hoverForTip">
<img id="mapContribs" width="25" height="25" src="{{mapContributorImage}}" />
<div className="tip">
<ul>
{{{contributorTip}}}
</ul>
</div>
<span>{{contributorCount}}</span>
</div>
<div className="mapPermission {{permission}}">
</div>
</div>
<div className="clearfloat"></div>
</div>
</script>
<script type="text/template" id="mapperSearchTemplate">
<div className="result{{rtype}}">
<div className="searchResIconWrapper">
<img className="icon" width="32" height="32" src="{{profile}}">
</div>
<div className="resultText">
<p className="resultTitle">{{label}}</p>
</div>
<div className="autoOptions">
<div className="mapperCreated">
<p>Mapping since: {{created_at}}</p>
</div>
<div className="mapperGeneration">
<p>Generation: {{generation}}</p>
</div>
<div className="mapCount">
{{mapCount}}
</div>
</div>
<div className="clearfloat"></div>
</div>
</script>
<script type="text/template" id="collaboratorSearchTemplate">
<div className="collabResult">
<div className="collabIconWrapper">
<img className="icon" width="25" height="25" src="{{profile}}">
</div>
<div className="collabNameWrapper">
<p className="collabName">{{label}}</p>
</div>
<div className="clearfloat"></div>
</div>
</script>
<script type="text/template" id="synapseAutocompleteTemplate">
<div className="result{{rtype}}">
<p className="autocompleteSection synapseDesc">{{label}}</p>
<div className="synapseMetadata">
<div className="synapseOriginatorIcon hoverForTip">
<img width="24" height="24" src="{{originatorImage}}" />
<span className="tooltips synapseOriginator">{{originator}}</span>
</div>
<div className="synapsePermission {{permission}}"></div>
</div>
<div className="clearfloat"></div>
</div>
</script>
<script type="text/template" id="topicAutocompleteTemplate">
<div>
<img className="autocompleteSection topicType" width="24" height="24"
src="{{typeImageURL}}" alt="{{type}}" title="{{type}}" />
<p className="autocompleteSection topicTitle">{{label}}</p>
<div className="expandTopicMetadata"></div>
<div className="topicMetadata">
<div className="topicNumMaps">{{mapCount}}</div>
<div className="topicNumSynapses">{{synapseCount}}</div>
<div className="topicOriginatorIcon hoverForTip">
<img width="24" height="24" src="{{originatorImage}}" />
<span className="tooltips topicOriginator">{{originator}}</span>
</div>
<div className="topicPermission {{permission}}"></div>
</div>
<div className="clearfloat"></div>
</div>
</script>
</div>

View file

@ -1,3 +0,0 @@
{ form_for Synapse.new, url: synapses_url, remote: true do |form| }
{ form.text_field :desc, :placeholder => "describe the connection..." }
{ end }

View file

@ -1,32 +0,0 @@
{ @metacodes = user_metacodes() }
{ form_for Topic.new, url: topics_url, remote: true do |form| }
<div className="openMetacodeSwitcher openLightbox" data-open="switchMetacodes">
<div className="tooltipsAbove">Switch Metacodes</div>
</div>
<div className="pinCarousel">
<div className="tooltipsAbove helpPin">Pin Open</div>
<div className="tooltipsAbove helpUnpin">Unpin</div>
</div>
<div id="metacodeImg">
{ @metacodes.each do |metacode| }
<img className="cloudcarousel" width="40" height="40" src="{ asset_path metacode.icon }" alt="{ metacode.name }" title="{ metacode.name }" data-id="{ metacode.id }" />
{ end }
</div>
{ form.text_field :name, :maxlength => 140, :placeholder => "title..." }
<div id="metacodeImgTitle"></div>
<div className="clearfloat"></div>
<script>
{ @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 }
</script>
{ end }