Skip to content

Commit

Permalink
Text Box size increases on focus. Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
reddragon committed Aug 24, 2010
1 parent 24f3b8a commit 44de5dd
Show file tree
Hide file tree
Showing 27 changed files with 102 additions and 261 deletions.
8 changes: 8 additions & 0 deletions README
@@ -1,6 +1,14 @@
Four Seasons of Code - Student Project Management System
========================================================

Authors:

Shreyank Gupta (sgupta@redhat.com)
Gaurav Menghani (gaurav.menghani@gmail.com)

To know more about FSoC, refer doc/ABOUT.
For Setup instructions, refer to doc/SETUP.

Written using Ruby On Rails.

Published under the GNU AFFERO GENERAL PUBLIC LICENSE version 3.
192 changes: 0 additions & 192 deletions SETUP

This file was deleted.

10 changes: 5 additions & 5 deletions app/controllers/proposals_controller.rb
Expand Up @@ -168,8 +168,8 @@ def allocated
@student.proposals.each do |proposal|
if proposal == @proposal
status = 'accepted'
@subject = APP_CONFIG['program']['name_full']
@message = "Congratulations! You have been accepted for the project '# {@proposal.project.name}'!"
@subject = APP_CONFIG['program']['name']
@message = "Congratulations! You have been accepted for the project #{@proposal.project.name}!"

#Sends a mail to the student on acceptance.
#Remove if not required
Expand All @@ -178,7 +178,7 @@ def allocated
update = Update.new
update.user_id = @student.id
update.message = @message
update.link_string = "See the project #{@proposal.project.name}!"
update.link_string = "See the project #{@proposal.project.name}"
update.link = project_url(@proposal.project)
update.save

Expand All @@ -199,8 +199,8 @@ def reject
@proposal.update_attributes(:status => 'rejected')

@student = @proposal.student
@subject = APP_CONFIG['program']['name_full']
@message = "We are sorry, your proposal for the project '#{@proposal.project.name}' was not accepted."
@subject = APP_CONFIG['program']['name']
@message = "We are sorry, your proposal for the project #{@proposal.project.name} was not accepted."

#Sends a mail to the student on acceptance.
#Remove if not required
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Expand Up @@ -73,7 +73,7 @@ def enquote(str)
res
end

def wrap(txt, col = 80)
def wrap(txt, col = 75)
txt.gsub(/(.{1,#{col}})( +|$\n?)|(.{1,#{col}})/,
"\\1\\3\n")
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/comments/_edit.html.haml
Expand Up @@ -24,7 +24,7 @@
= f.error_messages
= f.hidden_field :user_id, :value => current_user.id
= f.hidden_field :project_id, :value => @comment.project.id
= f.text_area(:content, :rows => 25)
= f.text_area(:content, :onBlur => "this.rows='#{APP_CONST['text']['rows']['inactive']}'", :onFocus => "this.rows='#{APP_CONST['text']['rows']['active']}'", :rows => APP_CONST['text']['rows']['inactive'], :cols => APP_CONST['text']['cols'])
%br
= f.submit 'Update'

Expand Down
2 changes: 1 addition & 1 deletion app/views/comments/_new.html.haml
Expand Up @@ -23,7 +23,7 @@
= f.error_messages
= f.hidden_field :user_id, :value => current_user.id
= f.hidden_field :project_id, :value => comment.project.id
= f.text_area(:content, :rows => 25, :cols => 80)
= f.text_area(:content, :onBlur => "this.rows='#{APP_CONST['text']['rows']['inactive']}'", :onFocus => "this.rows=#{APP_CONST['text']['rows']['active']}", :rows => APP_CONST['text']['rows']['inactive'], :cols => APP_CONST['text']['cols'])
%br
= f.submit 'Create'

4 changes: 4 additions & 0 deletions app/views/comments/_show.html.haml
Expand Up @@ -27,6 +27,10 @@

%li{ :id => 'active' }
= link_to_remote 'Discuss', :update => "project_page_content", :url => {:action => "load_project_page_content", :partial => "comments/show", :id => params[:id] }

- if can_add_proposal?(@project)
%li
= link_to_remote 'Write a Proposal', :update => "project_page_content", :url => {:action => "load_project_page_content", :partial => "proposals/new", :id => params[:id] }

%br

Expand Down
13 changes: 7 additions & 6 deletions app/views/dashboard/_certificates.html.haml
Expand Up @@ -39,12 +39,13 @@
%span.date  
%div{:style => 'clear: both'}  
.entry
%h3
Proposals awaiting Admin Sign off
%br
= render :partial => "proposals/list", :locals => {:proposals => pending_proposals}
%br
%br
- if !pending_proposals.empty?
%h3
Proposals awaiting Admin Sign off
%br
= render :partial => "proposals/list", :locals => {:proposals => pending_proposals}
%br
%br
%h3
Upload Certificate Images
%small
Expand Down
2 changes: 1 addition & 1 deletion app/views/journals/_edit.html.haml
Expand Up @@ -20,7 +20,7 @@
%b
= f.label :content
%br
= f.text_area :content
= f.text_area(:content, :onBlur => "this.rows='#{APP_CONST['text']['rows']['inactive']}'", :onFocus => "this.rows='#{APP_CONST['text']['rows']['active']}'", :rows => APP_CONST['text']['rows']['inactive'], :cols => APP_CONST['text']['cols'])
%br
= f.submit 'Update'

2 changes: 1 addition & 1 deletion app/views/journals/_new.html.haml
Expand Up @@ -20,7 +20,7 @@
New Journal Entry
- form_for journal, :url => {:action => :create, :project_id => journal.task.project.id, :task_id => journal.task.id }do |f|
= f.error_messages
= f.text_area(:content, :rows => 25, :cols => 80)
= f.text_area(:content, :onBlur => "this.rows='#{APP_CONST['text']['rows']['inactive']}'", :onFocus => "this.rows='#{APP_CONST['text']['rows']['active']}'", :rows => APP_CONST['text']['rows']['inactive'], :cols => APP_CONST['text']['cols'])
%br
= f.submit 'Create'

15 changes: 7 additions & 8 deletions app/views/journals/index.html.haml
Expand Up @@ -39,6 +39,11 @@
= distance_of_time_in_words(journal.updated_at, Time.now, true)
back
.rightfloat
- if can_edit_journal?(journal)
= link_to_remote image_tag('edit_icon.jpg'), :update => "journal_space#{journal.id}", :url => {:action => 'inpage_edit', :id => journal.id}
- if can_delete_journal?(journal)
= link_to image_tag('delete_icon.gif'), project_task_journal_path(@task.project, @task, journal), :confirm => 'Are you sure?', :method => :delete

%small
%b
Journal
Expand All @@ -47,14 +52,8 @@
%td
= display_message_content(journal.content)
%small
- if can_edit_journal?(journal)
= link_to_remote 'Edit', :update => "journal_space#{journal.id}", :url => {:action => 'inpage_edit', :id => journal.id}
 | 
- if can_delete_journal?(journal)
= link_to 'Delete', project_task_journal_path(@task.project, @task, journal), :confirm => 'Are you sure?', :method => :delete
 | 
= link_to_remote 'Reply', {:update => "journal_space", :url => {:action => 'inpage_new', :project_id => @task.project.id, :task_id => @task.id, :reply_to_id => journal.id}, :with => "'journal_content=' + encodeURIComponent($('journal_content').value)"}
%div{:id => "journal_space#{journal.id}"}
= link_to_remote 'Reply', {:update => "journal_space", :url => {:action => 'inpage_new', :project_id => @task.project.id, :task_id => @task.id, :reply_to_id => journal.id}, :with => "'journal_content=' + encodeURIComponent($('journal_content').value)"}
%div{:id => "journal_space#{journal.id}"}

%div{:id => 'journal_space'}
- if can_add_journal_entry?(@task)
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Expand Up @@ -111,7 +111,7 @@ Released : 20090910
<!-- end #page -->
</div>
<div id="footer">
<p>Copyright (c) 2010 Shreyank Gupta. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
<p>Copyright (c) 2010 Shreyank Gupta & Gaurav Menghani. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>
<!-- end #footer -->
</body></html>
6 changes: 5 additions & 1 deletion app/views/projects/_edit.html.haml
Expand Up @@ -42,18 +42,22 @@

%p
= f.label :name
%br
= f.text_field :name

%p
= f.label :definition
= f.text_area(:definition, :cols => 80)
%br
= f.text_area(:definition, :onBlur => "this.rows='#{APP_CONST['text']['rows']['inactive']}'", :onFocus => "this.rows='#{APP_CONST['text']['rows']['active']}'", :rows => APP_CONST['text']['rows']['inactive'], :cols => 75)

%p
= f.label :urls, "URL's (separated by commas)"
%br
= f.text_field :urls

%p
= f.label :eta, "Estimated Time (in days)"
%br
= f.text_field :eta

%p
Expand Down

0 comments on commit 44de5dd

Please sign in to comment.