Skip to content
Snippets Groups Projects
Commit 368deb59 authored by Nihad Abbasov's avatar Nihad Abbasov
Browse files

clean up whitespace from project

parent 415eddaf
No related branches found
No related tags found
No related merge requests found
Showing
with 298 additions and 340 deletions
Loading
Loading
@@ -22,9 +22,9 @@ $(function(){
$('select#branch').selectmenu({style:'popup', width:200});
$('select#tag').selectmenu({style:'popup', width:200});
 
$(".account-box").mouseenter(showMenu);
$(".account-box").mouseleave(resetMenu);
$(".account-box").mouseenter(showMenu);
$(".account-box").mouseleave(resetMenu);
});
 
function updatePage(data){
Loading
Loading
@@ -32,9 +32,9 @@ function updatePage(data){
}
 
function showMenu() {
$(this).toggleClass('hover');
$(this).toggleClass('hover');
}
 
function resetMenu() {
$(this).removeClass("hover");
$(this).removeClass("hover");
}
Loading
Loading
@@ -8,25 +8,23 @@ $(document).ready(function(){
});
});
 
var CommitsList = {
var CommitsList = {
 
ref:null,
limit:0,
offset:0,
 
init:
function(ref, limit) {
this.ref=ref;
this.limit=limit;
this.offset=limit;
init:
function(ref, limit) {
this.ref=ref;
this.limit=limit;
this.offset=limit;
this.initLoadMore();
$('.loading').show();
},
 
getOld:
function() {
function() {
$('.loading').show();
$.ajax({
type: "GET",
Loading
Loading
@@ -39,14 +37,14 @@ getOld:
append:
function(count, html) {
$("#commits_list").append(html);
if(count > 0) {
if(count > 0) {
this.offset += count;
this.initLoadMore();
}
}
},
 
initLoadMore:
function() {
function() {
$(window).bind('scroll', function(){
if($(window).scrollTop() == $(document).height() - $(window).height()){
$(window).unbind('scroll');
Loading
Loading
var NoteList = {
var NoteList = {
 
first_id: 0,
last_id: 0,
resource_name: null,
 
init:
function(resource_name, first_id, last_id) {
this.resource_name = resource_name;
this.first_id = first_id;
this.last_id = last_id;
init:
function(resource_name, first_id, last_id) {
this.resource_name = resource_name;
this.first_id = first_id;
this.last_id = last_id;
this.initRefresh();
this.initLoadMore();
},
 
getOld:
function() {
function() {
$('.loading').show();
$.ajax({
type: "GET",
Loading
Loading
@@ -31,7 +31,7 @@ append:
this.initLoadMore();
},
 
replace:
replace:
function(fid, lid, html) {
this.first_id = fid;
this.last_id = lid;
Loading
Loading
@@ -39,17 +39,16 @@ replace:
this.initLoadMore();
},
 
prepend:
function(id, html) {
if(id != this.last_id) {
if(id != this.last_id) {
this.last_id = id;
$("#notes-list").prepend(html);
}
},
 
getNew:
function() {
function() {
// refersh notes list
$.ajax({
type: "GET",
Loading
Loading
@@ -59,7 +58,7 @@ getNew:
},
 
refresh:
function() {
function() {
// refersh notes list
$.ajax({
type: "GET",
Loading
Loading
@@ -68,8 +67,6 @@ refresh:
dataType: "script"});
},
 
initRefresh:
function() {
// init timer
Loading
Loading
@@ -78,7 +75,7 @@ initRefresh:
},
 
initLoadMore:
function() {
function() {
$(window).bind('scroll', function(){
if($(window).scrollTop() == $(document).height() - $(window).height()){
$(window).unbind('scroll');
Loading
Loading
Loading
Loading
@@ -48,7 +48,6 @@ function taggifyForm(){
source: '/tags.json'
});
 
$('form').submit( function() {
var tag_field = $('#tag_field')
tag_field.val( tag_field.tagify('serialize') );
Loading
Loading
Loading
Loading
@@ -15,10 +15,10 @@
.cgreen { color:#44aa22; }
 
/** COMMON STYLES **/
.left {
.left {
float:left;
}
.right {
.right {
float:right;
}
.width-50p{
Loading
Loading
@@ -33,7 +33,7 @@
.width-65p{
width:65%;
}
.append-bottom-10 {
.append-bottom-10 {
margin-bottom:10px;
}
.prepend-top-10 {
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@
 
.issues_filter {
margin-top:10px;
.left {
.left {
margin-right:15px;
}
}
Loading
Loading
@@ -38,11 +38,10 @@
 
/** ISSUES LIST **/
.issue .action-links {
display:none;
a {
display:none;
a {
margin-left:10px;
}
}
.issue:hover .action-links { display:block; }
 
Loading
Loading
@@ -14,7 +14,6 @@
}
}
 
/* Note textare */
#note_note {
height:100px;
Loading
Loading
Loading
Loading
@@ -99,15 +99,15 @@ a {
}
}
 
td.code {
td.code {
width: 100%;
.highlight {
.highlight {
margin-left: 55px;
overflow:auto;
overflow-y:hidden;
}
}
.highlight pre {
.highlight pre {
white-space: pre;
word-wrap:normal;
}
Loading
Loading
@@ -115,12 +115,11 @@ td.code {
.highlighttable tr:hover {
background:white;
}
table.highlighttable pre{
table.highlighttable pre{
line-height:16px !important;
font-size:12px !important;
}
 
table.highlighttable .linenodiv pre {
text-align: right;
padding-right: 4px;
Loading
Loading
@@ -235,7 +234,6 @@ input.ssh_project_url {
}
}
 
#user_projects_limit{
width: 60px;
}
Loading
Loading
@@ -244,7 +242,7 @@ input.ssh_project_url {
cursor: move;
}
 
.project-refs-form {
.project-refs-form {
span {
background: none !important;
position:static !important;
Loading
Loading
@@ -258,18 +256,18 @@ input.ssh_project_url {
}
 
.filter .left { margin-right:15px; }
body.project-page table .commit {
a.tree-commit-link {
body.project-page table .commit {
a.tree-commit-link {
color:gray;
&:hover {
&:hover {
text-decoration:underline;
}
}
}
 
/** NEW PROJECT **/
.new-project-hodler {
.new-project-hodler {
.icon span { background-position: -31px -70px; }
td { border-bottom: 1px solid #DEE2E3; }
}
Loading
Loading
@@ -277,8 +275,8 @@ body.project-page table .commit {
/** Feed entry **/
.commit,
.snippet,
.message {
.title {
.message {
.title {
color:#666;
a { color:#666 !important; }
p { margin-top:0px; }
Loading
Loading
@@ -295,21 +293,21 @@ body.project-page table .commit {
font-size:1.5em;
height:auto;
font-weight:bold;
.ui-selectmenu-status {
.ui-selectmenu-status {
padding:3px 10px;
}
}
/** Snippets **/
.new_snippet textarea,
.edit_snippet textarea {
.new_snippet textarea,
.edit_snippet textarea {
height:300px;
padding: 8px;
width: 95%;
}
.snippet .action-links {
display:none;
a {
display:none;
a {
margin-left:10px;
}
}
Loading
Loading
@@ -348,11 +346,11 @@ body.project-page table .commit {
background: #2c5c66;
color:white;
}
&.issue {
&.issue {
background: #D12F19;
color:white;
}
&.commit {
&.commit {
background: #44aacc;
color:white;
}
Loading
Loading
This diff is collapsed.
.tags-list {
padding : 0px 10px 10px 10px;
padding : 0px 10px 10px 10px;
}
 
.tags-list a {
Loading
Loading
@@ -15,7 +15,6 @@
font-size: 14px;
}
 
.small-tags a{
font-size: 9px;
 
Loading
Loading
@@ -26,10 +25,9 @@
background-color: #72bbdf;
color: #FFF;
text-shadow: none;
font-weight: bold;
font-weight: bold;
}
 
.medium-tags a{
font-size: 12px;
 
Loading
Loading
@@ -40,5 +38,5 @@
background-color: #72bbdf;
color: #FFF;
text-shadow: none;
font-weight: bold;
}
\ No newline at end of file
font-weight: bold;
}
Loading
Loading
@@ -79,8 +79,8 @@ class ApplicationController < ActionController::Base
elsif params[:last_id]
@notes = @notes.where("id > ?", params[:last_id])
elsif params[:first_id]
@notes = @notes.where("id < ?", params[:first_id])
else
@notes = @notes.where("id < ?", params[:first_id])
else
nil
end
end
Loading
Loading
Loading
Loading
@@ -10,7 +10,6 @@ class CommitsController < ApplicationController
before_filter :require_non_empty_project
before_filter :load_refs, :only => :index # load @branch, @tag & @ref
 
def index
@repo = project.repo
limit, offset = (params[:limit] || 20), (params[:offset] || 0)
Loading
Loading
Loading
Loading
@@ -79,7 +79,7 @@ class ProjectsController < ApplicationController
@notes = @project.common_notes.order("created_at DESC")
@notes = @notes.fresh.limit(20)
 
respond_to do |format|
respond_to do |format|
format.html
format.js { respond_with_notes }
end
Loading
Loading
@@ -168,7 +168,7 @@ class ProjectsController < ApplicationController
 
def add_refs(commit, ref_cache)
if ref_cache.empty?
@repo.refs.each do |ref|
@repo.refs.each do |ref|
ref_cache[ref.commit.id] ||= []
ref_cache[ref.commit.id] << ref
end
Loading
Loading
class TagsController < ApplicationController
def index
@tags = Project.tag_counts.order('count DESC')
@tags = @tags.where('name like ?', "%#{params[:term]}%") unless params[:term].blank?
def index
@tags = Project.tag_counts.order('count DESC')
@tags = @tags.where('name like ?', "%#{params[:term]}%") unless params[:term].blank?
 
respond_to do |format|
format.html
format.json { render json: @tags.limit(8).map {|t| t.name}}
end
end
respond_to do |format|
format.html
format.json { render json: @tags.limit(8).map {|t| t.name}}
end
end
end
Loading
Loading
@@ -11,7 +11,7 @@ module ApplicationHelper
end
 
def body_class(default_class = nil)
main = content_for(:body_class).blank? ?
main = content_for(:body_class).blank? ?
default_class :
content_for(:body_class)
 
Loading
Loading
@@ -42,7 +42,7 @@ module ApplicationHelper
else
"Never"
end
rescue
rescue
"Never"
end
 
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ module DashboardHelper
when "Issue" then project_issue_path(project, project.issues.find(object.id))
when "Grit::Commit" then project_commit_path(project, project.repo.commits(object.id).first)
when "Note"
then
then
note = object
case note.noteable_type
when "Issue" then project_issue_path(project, note.noteable_id)
Loading
Loading
@@ -12,9 +12,9 @@ module DashboardHelper
when "Commit" then project_commit_path(project, :id => note.noteable_id)
else wall_project_path(project)
end
else wall_project_path(project)
else wall_project_path(project)
end
rescue
rescue
"#"
end
 
Loading
Loading
Loading
Loading
@@ -11,8 +11,8 @@ class Issue < ActiveRecord::Base
validates_presence_of :author_id
 
delegate :name,
:email,
:to => :author,
:email,
:to => :author,
:prefix => true
 
validates :title,
Loading
Loading
Loading
Loading
@@ -8,8 +8,8 @@ class Note < ActiveRecord::Base
:class_name => "User"
 
delegate :name,
:email,
:to => :author,
:email,
:to => :author,
:prefix => true
 
attr_protected :author, :author_id
Loading
Loading
Loading
Loading
@@ -121,9 +121,9 @@ class Project < ActiveRecord::Base
private_flag
end
 
def last_activity
def last_activity
updates(1).first
rescue
rescue
nil
end
 
Loading
Loading
@@ -132,7 +132,7 @@ class Project < ActiveRecord::Base
end
 
def updates(n = 3)
[
[
fresh_commits(n),
issues.last(n),
notes.fresh.limit(n)
Loading
Loading
Loading
Loading
@@ -9,7 +9,7 @@ class Repository
@project = project
end
 
def path
def path
@path ||= project.path
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment