review changes

This commit is contained in:
Connor Turland 2017-09-12 17:01:08 -04:00
parent 61eac509de
commit 29bf2a23e8
8 changed files with 21 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

View file

@ -1914,14 +1914,10 @@ input.collaboratorSearchField {
background-position: -32px 0;
}
.yourMap .mapPermission:hover {
background-image: url(<%= asset_data_uri('arrowperms_sprite.png') %>);
cursor: pointer;
background-position: -32px 0;
}
.yourMap .mapPermission.minimize {
background-image: url(<%= asset_data_uri('arrowperms_sprite.png') %>) !important;
cursor: pointer;
background-position: 0 0;
}
.mapInfoBox .mapPermission .permissionSelect {
list-style: none;

View file

@ -15,7 +15,7 @@
</script>
<%= render :partial => 'layouts/lightboxes' %>
<%= render :partial => 'layouts/templates' %>
<%= render :partial => 'shared/metacodeBgColors' %>
<%= render :partial => 'shared/metacodeCssColors' %>
<%= render :partial => 'layouts/googleanalytics' if ENV["GA_TRACKING_CODE"].present? %>
</body>
</html>

View file

@ -1,7 +1,8 @@
<style>
<% # give text the color of the metacode by adding the class .metacodeColor{metacode-id} %>
<% Metacode.all.each do |m| %>
<% if m.color %>
<%= ".mbg" + m.id.to_s + "{" %>
<%= ".metacodeColor" + m.id.to_s + "{" %>
<%= "color:" + m.color + " !important;" %>
<%= "}" %>
<% end %>

View file

@ -4,8 +4,18 @@ import PropTypes from 'prop-types'
class Follow extends Component {
render = () => {
const { ActiveMapper, isFollowing, onTopicFollow } = this.props
return <div className='topicFollow' onClick={() => ActiveMapper && onTopicFollow()}>
{ActiveMapper ? isFollowing ? 'Unfollow' : 'Follow' : ''}
function onClick () {
if (ActiveMapper) {
onTopicFollow()
}
}
let innerValue
// only display either option if there is a user signed in
if (ActiveMapper) {
innerValue = isFollowing ? 'Unfollow' : 'Follow'
}
return <div className='topicFollow' onClick={onClick}>
{innerValue}
</div>
}
}

View file

@ -1,6 +1,7 @@
/* global $ */
import React, { PropTypes, Component } from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router'
class Info extends Component {

View file

@ -40,7 +40,7 @@ class Links extends Component {
return (
<div className="links">
<div className="linkItem icon metacodeItem">
<div className={`metacodeTitle mbg${metacode.get('id')}`}
<div className={`metacodeTitle metacodeColor${metacode.get('id')}`}
onClick={() => authorizedToEdit && this.handleMetacodeBarClick()}
>
{metacode.get('name')}

View file

@ -29,8 +29,8 @@ class ReactTopicCard extends Component {
if (topic.authorizePermissionChange(currentUser)) classname += ' yourTopic'
return (
<Draggable handle=".metacodeImage" defaultPosition={{x: 100, y: 100}}>
<div className="showcard mapElement mapElementHidden">
<Draggable handle='.metacodeImage' defaultPosition={{x: 100, y: 100}}>
<div className='showcard mapElement mapElementHidden'>
<div className={classname}>
<div className={`CardOnGraph ${hasAttachment ? 'hasAttachment' : ''}`} id={`topic_${topic.id}`}>
<Links topic={topic}
@ -53,7 +53,7 @@ class ReactTopicCard extends Component {
updateTopic={wrappedUpdateTopic}
/>
<Info topic={topic} />
<div className="clearfloat"></div>
<div className='clearfloat' />
</div>
</div>
</div>