added account creation again. fixed realtime bug, border radius on the menu, fixed menu on console

This commit is contained in:
Connor Turland 2013-07-11 11:13:27 -04:00
parent cca4830fd5
commit b218d898ea
19 changed files with 127 additions and 99 deletions

View file

@ -445,14 +445,13 @@ function drawSelectBox(eventInfo, e) {
currY = eventInfo.getPos().y;
Mconsole.plot();
ctx.moveTo(startX,startY);
ctx.lineTo(startX,currY);
ctx.stroke();
ctx.lineTo(currX,currY);
ctx.stroke();
ctx.lineTo(currX,startY);
ctx.stroke();
ctx.lineTo(startX,startY);
ctx.beginPath();
ctx.moveTo(startX, startY);
ctx.lineTo(startX, currY);
ctx.lineTo(currX, currY);
ctx.lineTo(currX, startY);
ctx.lineTo(startX, startY);
ctx.strokeStyle = "black";
ctx.stroke();
}

View file

@ -1,6 +1,6 @@
window.app.realtime =
connect : () ->
window.app.socket = io.connect('http://localhost:5001');
window.app.socket = io.connect('http://metamaps.cc:5001');
window.app.socket.on 'connect', () ->
subscribeToRooms()
console.log('socket connected')

View file

@ -109,6 +109,19 @@ a {
* Layout stuffs
*/
#error_explanation {
background: #612127;
padding: 30px;
color: #FFF;
}
#error_explanation h2 {
display:none;
}
#error_explanation ul {
list-style:none;
}
.profile {
overflow-y:scroll;
height:100%;
@ -633,8 +646,8 @@ box-shadow: 6px 6px 8px rgba(0,0,0,0.4);
bottom: 9px;
height: 38px;
background: url('black_bg.png');
border-bottom-right-radius: 15px;
border-top-right-radius: 15px;
border-bottom-right-radius: 5px;
border-top-right-radius: 5px;
z-index: 15000;
border:1px solid #000;
}

View file

@ -1,23 +1,11 @@
class UsersController < ApplicationController
before_filter :require_no_user, only: [:new, :create]
before_filter :require_user, only: [:edit, :update]
respond_to :html, :json
autocomplete :user, :name, :full => true
# GET /user/new
def new
flash[:notice] = "Account creation is temporarily disabled."
redirect_to root_url
return
@user = User.new
respond_with(@user)
end
# GET /user/edit
def edit
@ -39,33 +27,6 @@ class UsersController < ApplicationController
respond_with(@user, @topics, @synapses, @maps)
end
# POST /user
def create
# update this code
@session = Session.create(params[:user])
redirect_to(root_url) and return if @session.valid?
@user = User.create(params[:user])
#generate a random 8 letter/digit code that they can use to invite people
@user.code = rand(36**8).to_s(36)
@user.save
# direct them straight to the metamaps manual topic 'Click Me'
@topic = Topic.exists?(260)
if @topic
respond_with(@user, location: topic_url(260)) do |format|
end
else
respond_with(@user, location: root_url) do |format|
end
end
end
# PUT /user
def update
@user = current_user

View file

@ -7,20 +7,21 @@ has_many :synapses
has_many :maps
has_many :mappings
devise :database_authenticatable, :recoverable, :rememberable, :trackable # :registerable
before_create :generate_code
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable
#acts_as_authentic do |configuration|
# configuration.session_class = Session
#configuration.require_password_confirmation = false
# configuration.merge_validates_format_of_email_field_options unless: Proc.new { |user| user.email.blank? and user.authed? }
# configuration.merge_validates_length_of_email_field_options unless: Proc.new { |user| user.email.blank? and user.authed? }
#end
serialize :settings, UserPreference
validates_uniqueness_of :name # done by devise
validates_uniqueness_of :email # done by devise
validates :joinedwithcode, :presence => true, :inclusion => { :in => User.all.map(&:code), :message => "%{value} is not a valid code" }, :on => :create
def generate_code
#generate a random 8 letter/digit code that they can use to invite people
self.code = rand(36**8).to_s(36)
end
def settings
# make sure we always return a UserPreference instance
if read_attribute(:settings).nil?

View file

@ -9,11 +9,12 @@
<% content_for :title, "Console | Metamaps" %>
<div class="headertop">
<div class="hidelabels checked" onclick="hideLabels()">Show Labels</div>
<div class="tab"></div>
<button class="hidelabels" onclick="hideLabels();">Hide Labels</button>
<button onclick="hideSelectedEdges();hideSelectedNodes();">Hide Selected</button>
<button onclick="enterKeyHandler();">Keep Selected</button>
<% if authenticated? %>
<button onclick="var r=confirm('Are you sure you want to permanently delete selected objects?!'); if (r == true) {deleteSelectedEdges();deleteSelectedNodes();}">Permanently Delete Selected</button>
<button onclick="var r=confirm('Are you sure you want to permanently delete selected objects?!'); if (r == true) {deleteSelectedEdges();deleteSelectedNodes();}">Delete Selected</button>
<button onclick="saveToMap();">Save to Map</button>
<% end %>
<button onclick='clearCanvas();'>Clear Canvas</button>

View file

@ -16,9 +16,12 @@
<span class="blue">Metamaps</span> is a platform for visioning, magic making, productive conversation, understanding something, innovation, free style weaving and all night brainstorming. Metamaps is a game for making the world a better place.
</div>
<div class="clearfloat"></div>
<% if not authenticated? %>
<div class="passwordnotice">
Due to upgrading our authentication process, all users will have to reset their password before signing in. Follow the standard <%= link_to 'forgot password', new_user_password_path %> process to see this through. Thanks!
</div>
<% end %>
<h2>Recently Created Maps <%= link_to "see all", maps_url%></h2>
<div class="centeredProfile">
<% @maps.each do |map| %>

View file

@ -10,7 +10,6 @@
<div><%= f.submit "Send me reset password instructions" %></div>
<%= link_to "Sign up", new_user_path %><br />
<%= render "devise/shared/links" %>
<% end %>

View file

@ -1,18 +1,26 @@
<h2>Sign up</h2>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<h3>Sign up</h3>
<div><%= f.label :email %><br />
<%= f.email_field :email, :autofocus => true %></div>
<div><%= f.label :name %>
<%= f.text_field :name, :autofocus => true %></div>
<div><%= f.label :email %>
<%= f.email_field :email %></div>
<div><%= f.label :password %><br />
<div><%= f.label :password %>
<%= f.password_field :password %></div>
<div><%= f.label :password_confirmation %><br />
<div><%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation %></div>
<div><%= f.label "Access Code" %>
<%= f.text_field :joinedwithcode %></div>
<div><%= f.submit "Sign up" %></div>
<%= render "devise/shared/links" %>
<% end %>
<%= render "devise/shared/links" %>

View file

@ -15,7 +15,6 @@
<div><%= f.submit "Sign in" %></div>
<%= link_to "Sign up", new_user_path %><br />
<%= render "devise/shared/links" %>
<% end %>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -155,8 +155,8 @@ WebSocketMain.swf: WebSocketMain-0de980edb45e36785bf9d862baa032bb.swf
WebSocketMain/index.swf: WebSocketMain-0de980edb45e36785bf9d862baa032bb.swf
WebSocketMainInsecure.swf: WebSocketMainInsecure-c4377647e57e58cacc692c8a51afc9f8.swf
WebSocketMainInsecure/index.swf: WebSocketMainInsecure-c4377647e57e58cacc692c8a51afc9f8.swf
application.js: application-83e56723140ae3cab7c9e5ea5d32f555.js
application/index.js: application-83e56723140ae3cab7c9e5ea5d32f555.js
application.js: application-ccd5b4903a6d3d29a6cf4d65d54e5d66.js
application/index.js: application-ccd5b4903a6d3d29a6cf4d65d54e5d66.js
scroll/mCSB_buttons.png: scroll/mCSB_buttons-0642ce29bb568932e832d150141614e6.png
scroll/mCSB_buttons/index.png: scroll/mCSB_buttons-0642ce29bb568932e832d150141614e6.png
Fonts/Lato-Lig-webfont.eot: Fonts/Lato-Lig-webfont-1435188a694a7d5e29cf4a3288ff3e36.eot
@ -167,5 +167,5 @@ Fonts/Lato-Lig-webfont.ttf: Fonts/Lato-Lig-webfont-4b8f0d5ac83e783eb84848ff32546
Fonts/Lato-Lig-webfont/index.ttf: Fonts/Lato-Lig-webfont-4b8f0d5ac83e783eb84848ff3254685c.ttf
Fonts/Lato-Lig-webfont.woff: Fonts/Lato-Lig-webfont-47c2912f319ae759c3b1cd558b080c33.woff
Fonts/Lato-Lig-webfont/index.woff: Fonts/Lato-Lig-webfont-47c2912f319ae759c3b1cd558b080c33.woff
application.css: application-bcd20016a5f6d1318a19b7b7a93e6ebb.css
application/index.css: application-bcd20016a5f6d1318a19b7b7a93e6ebb.css
application.css: application-35fd75c72fc58c75cc102042a2e708c9.css
application/index.css: application-35fd75c72fc58c75cc102042a2e708c9.css