Commit 813814f0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Application cleanup

parent 4ce034ca
...@@ -76,10 +76,6 @@ gem 'settingslogic' ...@@ -76,10 +76,6 @@ gem 'settingslogic'
gem "foreman" gem "foreman"
gem "git" gem "git"
# Unused
gem 'tabs_on_rails'
gem "acts_as_list"
group :assets do group :assets do
gem "sass-rails", "3.2.5" gem "sass-rails", "3.2.5"
gem "coffee-rails", "3.2.2" gem "coffee-rails", "3.2.2"
...@@ -91,7 +87,7 @@ group :assets do ...@@ -91,7 +87,7 @@ group :assets do
gem "jquery-ui-rails", "0.5.0" gem "jquery-ui-rails", "0.5.0"
gem "modernizr", "2.5.3" gem "modernizr", "2.5.3"
gem "raphael-rails", "1.5.2" gem "raphael-rails", "1.5.2"
gem 'bootstrap-sass', "2.0.3.1" gem 'bootstrap-sass', "2.0.4"
end end
group :development do group :development do
......
...@@ -98,7 +98,6 @@ GEM ...@@ -98,7 +98,6 @@ GEM
multi_json (~> 1.0) multi_json (~> 1.0)
acts-as-taggable-on (2.3.1) acts-as-taggable-on (2.3.1)
rails (~> 3.0) rails (~> 3.0)
acts_as_list (0.1.6)
addressable (2.2.8) addressable (2.2.8)
ansi (1.4.2) ansi (1.4.2)
arel (3.0.2) arel (3.0.2)
...@@ -109,7 +108,7 @@ GEM ...@@ -109,7 +108,7 @@ GEM
awesome_print (1.0.2) awesome_print (1.0.2)
bcrypt-ruby (3.0.1) bcrypt-ruby (3.0.1)
blankslate (2.1.2.4) blankslate (2.1.2.4)
bootstrap-sass (2.0.3.1) bootstrap-sass (2.0.4.0)
builder (3.0.0) builder (3.0.0)
capybara (1.1.2) capybara (1.1.2)
mime-types (>= 1.16) mime-types (>= 1.16)
...@@ -338,7 +337,6 @@ GEM ...@@ -338,7 +337,6 @@ GEM
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6) sqlite3 (1.3.6)
stamp (0.1.6) stamp (0.1.6)
tabs_on_rails (2.1.1)
therubyracer (0.10.1) therubyracer (0.10.1)
libv8 (~> 3.3.10) libv8 (~> 3.3.10)
thin (1.3.1) thin (1.3.1)
...@@ -375,12 +373,11 @@ PLATFORMS ...@@ -375,12 +373,11 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
acts-as-taggable-on (= 2.3.1) acts-as-taggable-on (= 2.3.1)
acts_as_list
annotate! annotate!
autotest autotest
autotest-rails autotest-rails
awesome_print awesome_print
bootstrap-sass (= 2.0.3.1) bootstrap-sass (= 2.0.4)
capybara capybara
capybara-webkit capybara-webkit
carrierwave carrierwave
...@@ -431,7 +428,6 @@ DEPENDENCIES ...@@ -431,7 +428,6 @@ DEPENDENCIES
six six
sqlite3 sqlite3
stamp stamp
tabs_on_rails
therubyracer therubyracer
thin thin
turn turn
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
//= require jquery //= require jquery
//= require jquery.ui.all //= require jquery.ui.all
//= require jquery_ujs //= require jquery_ujs
//= require jquery.ui.selectmenu
//= require jquery.tagify
//= require jquery.cookie //= require jquery.cookie
//= require jquery.endless-scroll //= require jquery.endless-scroll
//= require jquery.highlight //= require jquery.highlight
......
...@@ -3,8 +3,7 @@ ...@@ -3,8 +3,7 @@
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope. * the top of the compiled file, but it's generally better to create a new file per style scope.
*= require jquery.ui.all *= require jquery.ui.all
*= require jquery-ui/jquery.ui.selectmenu *= require jquery.ui.aristo
*= require jquery-ui/jquery.tagify
*= require chosen *= require chosen
*= require_self *= require_self
*= require main *= require main
......
/**
* JQUERY UI datepicker
*
*/
.ui-datepicker {
border-color:#eee;
padding:20px;
.ui-state-default {
background:#f1f1f1;
padding:5px;
}
.ui-state-active {
background:#fff;
}
}
/**
* JQUERY UI progressbar
*
*/
.ui-progressbar {
border:1px solid #ddd;
height:6px;
margin:0;
padding:0;
.ui-progressbar-value {
background-color: #62C462;//$blue_link;
margin:0;
}
}
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
/** GITLAB colors **/ /** GITLAB colors **/
$text_color:#222; $text_color:#222;
$lite_text_color: #666; $lite_text_color: #666;
$link_color:#2A79A3; $link_color:#2A79A3;
$active_link_color:#2FA0BB; $active_link_color:#2FA0BB;
$active_bg_color:#79C3E0; $active_bg_color:#79C3E0;
$active_bd_color: #2FA0BB; $active_bd_color: #2FA0BB;
...@@ -31,7 +31,7 @@ $hover: #FDF5D9; ...@@ -31,7 +31,7 @@ $hover: #FDF5D9;
box-shadow: 0 0 3px #ddd; box-shadow: 0 0 3px #ddd;
} }
@mixin solid_shade { @mixin solid_shade {
-moz-box-shadow: 0 0 0 3px #eee; -moz-box-shadow: 0 0 0 3px #eee;
-webkit-box-shadow: 0 0 0 3px #eee; -webkit-box-shadow: 0 0 0 3px #eee;
box-shadow: 0 0 0 3px #eee; box-shadow: 0 0 0 3px #eee;
...@@ -73,21 +73,21 @@ $hover: #FDF5D9; ...@@ -73,21 +73,21 @@ $hover: #FDF5D9;
/** /**
* Header of application. * Header of application.
* Contain application logo, search panel, profile icon * Contain application logo, search panel, profile icon
*/ */
@import "sections/header.scss"; @import "sections/header.scss";
/** /**
* Navigation menu of application. * Navigation menu of application.
* Panel with links to pages depends on project, profile or admin area * Panel with links to pages depends on project, profile or admin area
*/ */
@import "sections/nav.scss"; @import "sections/nav.scss";
/** /**
* This file represent some UI that can be changed * This file represent some UI that can be changed
* during web app restyle or theme select. * during web app restyle or theme select.
* *
* Next items should be placed there * Next items should be placed there
* - link, button colors * - link, button colors
* - header restyles * - header restyles
...@@ -118,7 +118,7 @@ $hover: #FDF5D9; ...@@ -118,7 +118,7 @@ $hover: #FDF5D9;
* Most of application styles placed here. * Most of application styles placed here.
* This file represent common UI that should not be changed between themes * This file represent common UI that should not be changed between themes
* or project restyling like form width or user avatar class or commit title * or project restyling like form width or user avatar class or commit title
* *
* TODO: clean it * TODO: clean it
*/ */
@import "common.scss"; @import "common.scss";
...@@ -140,17 +140,17 @@ $hover: #FDF5D9; ...@@ -140,17 +140,17 @@ $hover: #FDF5D9;
@import "ref_select.scss"; @import "ref_select.scss";
/** /**
* Code (files list) styles. Browsing project files there * Code (files list) styles. Browsing project files there
*/ */
@import "sections/tree.scss"; @import "sections/tree.scss";
/** /**
* This file represent notes(comments) styles * This file represent notes(comments) styles
*/ */
@import "sections/notes.scss"; @import "sections/notes.scss";
/** /**
* Devise styles * Devise styles
*/ */
@import "sections/login.scss"; @import "sections/login.scss";
...@@ -165,9 +165,3 @@ $hover: #FDF5D9; ...@@ -165,9 +165,3 @@ $hover: #FDF5D9;
* *
*/ */
@import "highlight/dark.scss"; @import "highlight/dark.scss";
/**
* JQUERY UI ext
*
*/
@import "jquery_ui.scss";
...@@ -9,8 +9,6 @@ class Issue < ActiveRecord::Base ...@@ -9,8 +9,6 @@ class Issue < ActiveRecord::Base
validates :description, validates :description,
length: { within: 0..2000 } length: { within: 0..2000 }
acts_as_list
def self.open_for(user) def self.open_for(user)
opened.assigned(user) opened.assigned(user)
end end
......
...@@ -3,7 +3,7 @@ namespace :dev do ...@@ -3,7 +3,7 @@ namespace :dev do
task :tests do task :tests do
["cucumber", "rspec spec"].each do |cmd| ["cucumber", "rspec spec"].each do |cmd|
puts "Starting to run #{cmd}..." puts "Starting to run #{cmd}..."
system("bundle exec #{cmd}") system("export DISPLAY=:99.0 && bundle exec #{cmd}")
raise "#{cmd} failed!" unless $?.exitstatus == 0 raise "#{cmd} failed!" unless $?.exitstatus == 0
end end
end end
......
/* Author: Alicia Liu */
(function ($) {
$.widget("ui.tagify", {
options: {
delimiters: [13, 188], // what user can type to complete a tag in char codes: [enter], [comma]
outputDelimiter: ',', // delimiter for tags in original input field
cssClass: 'tagify-container', // CSS class to style the tagify div and tags, see stylesheet
addTagPrompt: 'add tags' // placeholder text
},
_create: function() {
var self = this,
el = self.element,
opts = self.options;
this.tags = [];
// hide text field and replace with a div that contains it's own input field for entering tags
this.tagInput = $("<input type='text'>")
.attr( 'placeholder', opts.addTagPrompt )
.keypress( function(e) {
var $this = $(this),
pressed = e.which;
for ( i in opts.delimiters ) {
if (pressed == opts.delimiters[i]) {
self.add( $this.val() );
e.preventDefault();
return false;
}
}
})
// for some reason, in Safari, backspace is only recognized on keyup
.keyup( function(e) {
var $this = $(this),
pressed = e.which;
// if backspace is hit with no input, remove the last tag
if (pressed == 8) { // backspace
if ( $this.val() == "" ) {
self.remove();
return false;
}
return;
}
});
this.tagDiv = $("<div></div>")
.addClass( opts.cssClass )
.click( function() {
$(this).children('input').focus();
})
.append( this.tagInput )
.insertAfter( el.hide() );
// if the field isn't empty, parse the field for tags, and prepopulate existing tags
var initVal = $.trim( el.val() );
if ( initVal ) {
var initTags = initVal.split( opts.outputDelimiter );
$.each( initTags, function(i, tag) {
self.add( tag );
});
}
},
_setOption: function( key, value ) {
options.key = value;
},
// add a tag, public function
add: function(text) {
var self = this;
text = text || self.tagInput.val();
if (text) {
var tagIndex = self.tags.length;
var removeButton = $("<a href='#'>x</a>")
.click( function() {
self.remove( tagIndex );
return false;
});
var newTag = $("<span></span>")
.text( text )
.append( removeButton );
self.tagInput.before( newTag );
self.tags.push( text );
self.tagInput.val('');
}
},
// remove a tag by index, public function
// if index is blank, remove the last tag
remove: function( tagIndex ) {
var self = this;
if ( tagIndex == null || tagIndex === (self.tags.length - 1) ) {
this.tagDiv.children("span").last().remove();
self.tags.pop();
}
if ( typeof(tagIndex) == 'number' ) {
// otherwise just hide this tag, and we don't mess up the index
this.tagDiv.children( "span:eq(" + tagIndex + ")" ).hide();
// we rely on the serialize function to remove null values
delete( self.tags[tagIndex] );
}
},
// serialize the tags with the given delimiter, and write it back into the tagified field
serialize: function() {
var self = this;
var delim = self.options.outputDelimiter;
var tagsStr = self.tags.join( delim );
// our tags might have deleted entries, remove them here
var dupes = new RegExp(delim + delim + '+', 'g'); // regex: /,,+/g
var ends = new RegExp('^' + delim + '|' + delim + '$', 'g'); // regex: /^,|,$/g
var outputStr = tagsStr.replace( dupes, delim ).replace(ends, '');
self.element.val(outputStr);
return outputStr;
},
inputField: function() {
return this.tagInput;
},
containerDiv: function() {
return this.tagDiv;
},
// remove the div, and show original input
destroy: function() {
$.Widget.prototype.destroy.apply(this);
this.tagDiv.remove();
this.element.show();
}
});
})(jQuery);
\ No newline at end of file
This diff is collapsed.
/* Tagify styles
Author: Alicia Liu test
*/
.tagify-container {
}
.tagify-container > span {
display: inline-block;
padding: 8px 11px 8px 11px;
margin: 1px 5px 0px 0px;
border-radius: 4px;
border: 1px solid #d0e1ff;
background-color: #d0e1ff;
color: #0f326d;
font-weight: bold;
font-size: 14px;
}
.tagify-container > span > a {
padding-left: 5px !important;
color: #83a5e1;
text-decoration: none;
font-weight: bold;
}
.tagify-container > input {
border: 0 none;
width: 100px !important;
}
.tagify-container > input:focus {
outline: none;
}
\ No newline at end of file
/* Selectmenu
----------------------------------*/
.ui-selectmenu { background:none; font-size:12px;display: block; display: inline-block; position: relative; height: 2.2em; vertical-align: middle; text-decoration: none; overflow: hidden; zoom: 1; }
.ui-selectmenu-icon { position:absolute; right:6px; margin-top:-8px; top: 50%; }
.ui-selectmenu-menu { padding:0; margin:0; position:absolute; top: 0; display: none; z-index: 1005;} /* z-index: 1005 to make selectmenu work with dialog */
.ui-selectmenu-menu ul { padding:0; margin:0; list-style:none; position: relative; overflow: auto; overflow-y: auto ; overflow-x: hidden; }
.ui-selectmenu-open { display: block; }
.ui-selectmenu.ui-widget { background:none; }
.ui-selectmenu-menu-popup { margin-top: -1px; }
.ui-selectmenu-menu-dropdown { }
.ui-selectmenu-menu li.ui-state-active { background:#F7FBFC; border:none; padding:1px 0;}
.ui-selectmenu-menu li { padding:0; margin:0; display: block; border-top: 1px dotted transparent; border-bottom: 1px dotted transparent; border-right-width: 0 !important; border-left-width: 0 !important; font-weight: normal !important; }
.ui-selectmenu-menu li a,.ui-selectmenu-status { line-height: 1.4em; display: block; padding: .405em 2.1em .405em 1em; outline:none; text-decoration:none; }
.ui-selectmenu-menu li.ui-state-disabled a, .ui-state-disabled { cursor: default; }
.ui-selectmenu-menu li.ui-selectmenu-hasIcon a,
.ui-selectmenu-hasIcon .ui-selectmenu-status { padding-left: 20px; position: relative; margin-left: 5px; }
.ui-selectmenu-menu li .ui-icon, .ui-selectmenu-status .ui-icon { position: absolute; top: 1em; margin-top: -8px; left: 0; }
.ui-selectmenu-status { line-height: 1.4em; }
.ui-selectmenu-open li.ui-selectmenu-item-focus { background: none repeat scroll 0 0 #FFF6BF; border:1px solid #eaeaea;}
.ui-selectmenu-open li.ui-selectmenu-item-selected { }
.ui-selectmenu-menu li span,.ui-selectmenu-status span { display:block; margin-bottom: .2em; }
.ui-selectmenu-menu li .ui-selectmenu-item-header { font-weight: bold; }
.ui-selectmenu-menu li .ui-selectmenu-item-content { }
.ui-selectmenu-menu li .ui-selectmenu-item-footer { opacity: .8; }
/* for optgroups */
.ui-selectmenu-menu .ui-selectmenu-group { font-size: 1em; }
.ui-selectmenu-menu .ui-selectmenu-group .ui-selectmenu-group-label { line-height: 1.4em; display:block; padding: .6em .5em 0; font-weight: bold; }
.ui-selectmenu-menu .ui-selectmenu-group ul { margin: 0; padding: 0; }
/* IE6 workaround (dotted transparent borders) */
* html .ui-selectmenu-menu li { border-color: pink; filter:chroma(color=pink); width:100%; }
* html .ui-selectmenu-menu li a { position: relative }
/* IE7 workaround (opacity disabled) */
*+html .ui-state-disabled, *+html .ui-state-disabled a { color: silver; }
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment