Commit 48443d20 authored by Florian Unglaub's avatar Florian Unglaub

Merge branch 'master' of git://github.com/gitlabhq/gitlabhq

parents c5ae1549 6d4ae75f
#this code temporarily disables notes for all controllers
# Footnotes::Filter.notes = []
v 2.8.1
- ability to disable gravatars
- improved MR diff logic
- ssh key help page
v 2.8.0 v 2.8.0
- Gitlab Flavored Markdown - Gitlab Flavored Markdown
- Bulk issues update - Bulk issues update
- Issues API - Issues API
- Cucumber coverage increased - Cucumber coverage increased
- Post-receive files fixed
- UI improved
- Application cleanup
- more cucumber
- capybara-webkit + headless
v 2.7.0 v 2.7.0
- Issue Labels - Issue Labels
......
...@@ -58,7 +58,7 @@ gem "unicorn" ...@@ -58,7 +58,7 @@ gem "unicorn"
gem "acts-as-taggable-on", "2.3.1" gem "acts-as-taggable-on", "2.3.1"
# Decorators # Decorators
gem "drapper" gem "draper"
# Background jobs # Background jobs
gem "resque", "~> 1.20.0" gem "resque", "~> 1.20.0"
...@@ -80,10 +80,6 @@ gem 'settingslogic' ...@@ -80,10 +80,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"
...@@ -95,12 +91,11 @@ group :assets do ...@@ -95,12 +91,11 @@ 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
gem "letter_opener" gem "letter_opener"
gem "rails-footnotes"
gem "annotate", :git => "https://github.com/ctran/annotate_models.git" gem "annotate", :git => "https://github.com/ctran/annotate_models.git"
gem 'rack-mini-profiler' gem 'rack-mini-profiler'
end end
...@@ -109,6 +104,7 @@ group :development, :test do ...@@ -109,6 +104,7 @@ group :development, :test do
gem "rspec-rails" gem "rspec-rails"
gem "capybara" gem "capybara"
gem "capybara-webkit" gem "capybara-webkit"
gem "headless"
gem "autotest" gem "autotest"
gem "autotest-rails" gem "autotest-rails"
gem "pry" gem "pry"
...@@ -119,11 +115,13 @@ end ...@@ -119,11 +115,13 @@ end
group :test do group :test do
gem 'cucumber-rails', :require => false gem 'cucumber-rails', :require => false
gem 'minitest', ">= 2.10"
gem "turn", :require => false
gem "simplecov", :require => false gem "simplecov", :require => false
gem "shoulda-matchers" gem "shoulda-matchers"
gem 'email_spec' gem 'email_spec'
gem 'resque_spec' gem 'resque_spec'
gem "webmock" gem "webmock"
end end
group :production do
gem "gitlab_meta", '2.8'
end
...@@ -98,9 +98,7 @@ GEM ...@@ -98,9 +98,7 @@ 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)
arel (3.0.2) arel (3.0.2)
autotest (4.4.6) autotest (4.4.6)
ZenTest (>= 4.4.1) ZenTest (>= 4.4.1)
...@@ -109,7 +107,7 @@ GEM ...@@ -109,7 +107,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)
...@@ -157,7 +155,9 @@ GEM ...@@ -157,7 +155,9 @@ GEM
railties (~> 3.1) railties (~> 3.1)
warden (~> 1.2.1) warden (~> 1.2.1)
diff-lcs (1.1.3) diff-lcs (1.1.3)
drapper (0.8.4) draper (0.17.0)
actionpack (~> 3.2)
activesupport (~> 3.2)
email_spec (1.2.1) email_spec (1.2.1)
mail (~> 2.2) mail (~> 2.2)
rspec (~> 2.0) rspec (~> 2.0)
...@@ -175,6 +175,7 @@ GEM ...@@ -175,6 +175,7 @@ GEM
gherkin (2.11.0) gherkin (2.11.0)
json (>= 1.4.6) json (>= 1.4.6)
git (1.2.5) git (1.2.5)
gitlab_meta (2.8)
grape (0.2.1) grape (0.2.1)
hashie (~> 1.2) hashie (~> 1.2)
multi_json multi_json
...@@ -189,6 +190,7 @@ GEM ...@@ -189,6 +190,7 @@ GEM
railties (~> 3.0) railties (~> 3.0)
hashery (1.4.0) hashery (1.4.0)
hashie (1.2.0) hashie (1.2.0)
headless (0.3.1)
hike (1.2.1) hike (1.2.1)
httparty (0.8.3) httparty (0.8.3)
multi_json (~> 1.0) multi_json (~> 1.0)
...@@ -223,7 +225,6 @@ GEM ...@@ -223,7 +225,6 @@ GEM
treetop (~> 1.4.8) treetop (~> 1.4.8)
method_source (0.7.1) method_source (0.7.1)
mime-types (1.19) mime-types (1.19)
minitest (3.1.0)
modernizr (2.5.3) modernizr (2.5.3)
sprockets (~> 2.0) sprockets (~> 2.0)
multi_json (1.3.6) multi_json (1.3.6)
...@@ -286,8 +287,6 @@ GEM ...@@ -286,8 +287,6 @@ GEM
activesupport (= 3.2.8) activesupport (= 3.2.8)
bundler (~> 1.0) bundler (~> 1.0)
railties (= 3.2.8) railties (= 3.2.8)
rails-footnotes (3.7.8)
rails (>= 3.0.0)
railties (3.2.8) railties (3.2.8)
actionpack (= 3.2.8) actionpack (= 3.2.8)
activesupport (= 3.2.8) activesupport (= 3.2.8)
...@@ -366,7 +365,6 @@ GEM ...@@ -366,7 +365,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)
...@@ -378,8 +376,6 @@ GEM ...@@ -378,8 +376,6 @@ GEM
treetop (1.4.10) treetop (1.4.10)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
turn (0.9.5)
ansi
tzinfo (0.3.33) tzinfo (0.3.33)
uglifier (1.0.3) uglifier (1.0.3)
execjs (>= 0.3.0) execjs (>= 0.3.0)
...@@ -403,12 +399,11 @@ PLATFORMS ...@@ -403,12 +399,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
...@@ -419,16 +414,18 @@ DEPENDENCIES ...@@ -419,16 +414,18 @@ DEPENDENCIES
cucumber-rails cucumber-rails
database_cleaner database_cleaner
devise (~> 2.1.0) devise (~> 2.1.0)
drapper draper
email_spec email_spec
ffaker ffaker
foreman foreman
git git
gitlab_meta (= 2.8)
gitolite! gitolite!
grack! grack!
grape (~> 0.2.1) grape (~> 0.2.1)
grit! grit!
haml-rails haml-rails
headless
httparty httparty
jquery-rails (= 2.0.2) jquery-rails (= 2.0.2)
jquery-ui-rails (= 0.5.0) jquery-ui-rails (= 0.5.0)
...@@ -436,7 +433,6 @@ DEPENDENCIES ...@@ -436,7 +433,6 @@ DEPENDENCIES
launchy launchy
letter_opener letter_opener
linguist (~> 1.0.0)! linguist (~> 1.0.0)!
minitest (>= 2.10)
modernizr (= 2.5.3) modernizr (= 2.5.3)
mysql2 mysql2
omniauth omniauth
...@@ -448,7 +444,6 @@ DEPENDENCIES ...@@ -448,7 +444,6 @@ DEPENDENCIES
pygments.rb! pygments.rb!
rack-mini-profiler rack-mini-profiler
rails (= 3.2.8) rails (= 3.2.8)
rails-footnotes
raphael-rails (= 1.5.2) raphael-rails (= 1.5.2)
redcarpet (~> 2.1.1) redcarpet (~> 2.1.1)
resque (~> 1.20.0) resque (~> 1.20.0)
...@@ -463,10 +458,8 @@ DEPENDENCIES ...@@ -463,10 +458,8 @@ DEPENDENCIES
six six
sqlite3 sqlite3
stamp stamp
tabs_on_rails
therubyracer therubyracer
thin thin
turn
uglifier (= 1.0.3) uglifier (= 1.0.3)
unicorn unicorn
webmock webmock
......
...@@ -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
...@@ -74,7 +72,7 @@ $(document).ready(function(){ ...@@ -74,7 +72,7 @@ $(document).ready(function(){
* Note markdown preview * Note markdown preview
* *
*/ */
$('#preview-link').on('click', function(e) { $(document).on('click', '#preview-link', function(e) {
$('#preview-note').text('Loading...'); $('#preview-note').text('Loading...');
var previewLinkText = ($(this).text() == 'Preview' ? 'Edit' : 'Preview'); var previewLinkText = ($(this).text() == 'Preview' ? 'Edit' : 'Preview');
......
...@@ -112,6 +112,7 @@ var MergeRequest = { ...@@ -112,6 +112,7 @@ var MergeRequest = {
already_cannot_be_merged: already_cannot_be_merged:
function(){ function(){
$(".automerge_widget").hide(); $(".automerge_widget").hide();
$(".merge_in_progress").hide();
$(".automerge_widget.already_cannot_be_merged").show(); $(".automerge_widget.already_cannot_be_merged").show();
} }
} }
...@@ -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
......
...@@ -735,3 +735,11 @@ li.note { ...@@ -735,3 +735,11 @@ li.note {
font-size: 12px; font-size: 12px;
} }
} }
.error_message {
@extend .cred;
border-bottom: 1px solid #D21;
padding-bottom:20px;
text-align:center;
margin-bottom:10px;
}
body { body {
margin-bottom:20px; margin-bottom:20px;
} }
pre {
font-family:'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono','lucida console',monospace;
&.dark {
background: #333;
color:#f5f5f5;
}
}
a { a {
outline: none; outline: none;
color: $link_color; color: $link_color;
...@@ -325,16 +335,20 @@ img.avatar { ...@@ -325,16 +335,20 @@ img.avatar {
float:left; float:left;
margin-right:15px; margin-right:15px;
width:40px; width:40px;
border:2px solid #ddd; border:1px solid #ddd;
padding:1px;
&.s16 { &.s16 {
width:16px; width:16px;
height:16px;
} }
&.s24 { &.s24 {
width:24px; width:24px;
height:24px;
} }
&.s32 { &.s32 {
width:32px; width:32px;
height:32px;
} }
} }
......
/**
* 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;
}
}
...@@ -23,6 +23,8 @@ $blue_link: #2fa0bb; ...@@ -23,6 +23,8 @@ $blue_link: #2fa0bb;
$style_color: #474D57; $style_color: #474D57;
$hover: #FDF5D9; $hover: #FDF5D9;
/** GITLAB Fonts **/
@font-face { font-family: Korolev; src: url('korolev-medium-compressed.otf'); }
/** MIXINS **/ /** MIXINS **/
@mixin shade { @mixin shade {
...@@ -165,9 +167,3 @@ $hover: #FDF5D9; ...@@ -165,9 +167,3 @@ $hover: #FDF5D9;
* *
*/ */
@import "highlight/dark.scss"; @import "highlight/dark.scss";
/**
* JQUERY UI ext
*
*/
@import "jquery_ui.scss";
...@@ -26,23 +26,25 @@ header { ...@@ -26,23 +26,25 @@ header {
float:left; float:left;
position:relative; position:relative;
top:-5px; top:-5px;
a { a {
float:left; float:left;
h1 { h1 {
text-indent:-9999px; padding-top: 5px;
width:102px; width:102px;
background: url('logo_text.png') no-repeat 0px -3px; background: url('logo_dark.png') no-repeat 0px -3px;
float:left; float:left;
margin-left:5px; margin-left:5px;
font-size:20px; font-size:36px;
line-height:36px; line-height:36px;
font-weight:bold; font-weight:normal;
color:#aaa; color:$style_color;
text-shadow: 0 1px 1px #FFF; text-shadow: 0 1px 1px #FFF;
padding-left:50px; padding-left:50px;
height:40px;
font-family: 'Korolev', sans-serif;
} }
} }
.separator { .separator {
margin-left:20px; margin-left:20px;
...@@ -68,14 +70,16 @@ header { ...@@ -68,14 +70,16 @@ header {
* *
*/ */
.project_name { .project_name {
position:relative;
float:left; float:left;
margin:0; margin:0;
margin-right:30px; margin-right:30px;
font-size:24px; font-size:36px;
line-height:36px; line-height:36px;
font-weight:500; font-weight:normal;
color:$style_color; color:$style_color;
text-shadow: 0 1px 1px #FFF; text-shadow: 0 1px 1px #FFF;
font-family: 'Korolev', sans-serif;
} }
.fbtn { .fbtn {
......
...@@ -27,6 +27,7 @@ body.login-page{ ...@@ -27,6 +27,7 @@ body.login-page{
-moz-border-radius-topright: 5px; -moz-border-radius-topright: 5px;
border-top-left-radius: 5px; border-top-left-radius: 5px;
border-top-right-radius: 5px; border-top-right-radius: 5px;
margin-bottom:0px;
} }
.login-box input.text.bottom{ .login-box input.text.bottom{
......
...@@ -94,3 +94,8 @@ li.merge_request { ...@@ -94,3 +94,8 @@ li.merge_request {
padding-bottom: 2px; padding-bottom: 2px;
} }
} }
.merge_in_progress {
@extend .padded;
@extend .append-bottom-10;
}
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
p { color:$style_color; } p { color:$style_color; }
.note-author { color: $style_color;} .note-author { color: $style_color;}
.note-title { margin-left:50px; padding-top: 5px;} .note-title { margin-left:45px; padding-top: 5px;}
.avatar { .avatar {
margin-top:3px; margin-top:3px;
} }
......
.projects { .projects {
@extend .row; @extend .row;
.activities { .activities {
} }
.side { .side {
@extend .span4; @extend .span4;
@extend .right; @extend .right;
.projects_box { .projects_box {
h5 { h5 {
color:$style_color; color:$style_color;
font-size:16px; font-size:16px;
text-shadow: 0 1px 1px #fff; text-shadow: 0 1px 1px #fff;
padding: 2px 10px;
} }
@extend .leftbar; @extend .leftbar;
@extend .ui-box; @extend .ui-box;
...@@ -19,21 +20,22 @@ ...@@ -19,21 +20,22 @@
} }
} }
.new_project, .new_project,
.edit_project { .edit_project {
.project_name_holder { .project_name_holder {
input, input,
label { label {
font-size:16px; font-size:16px;
line-height:20px; line-height:20px;
padding:8px; padding:8px;
} }
label { label {
color:#888; color:#888;
} }
.btn { .btn {
padding:6px; padding:6px;
margin-left:10px; margin-left:10px;
margin-bottom:8px;
} }
} }
} }
...@@ -15,4 +15,36 @@ ...@@ -15,4 +15,36 @@
color: $blue_link; color: $blue_link;
} }
} }
header {
.fbtn {
.btn {
background-color: #F8F8F8;
background-image: -webkit-gradient(linear,left top,left bottom,from(#F8F8F8),to(#ECECEC));
background-image: -webkit-linear-gradient(top,#F8F8F8,#ECECEC);
background-image: -moz-linear-gradient(top,#F8F8F8,#ECECEC);
background-image: -ms-linear-gradient(top,#F8F8F8,#ECECEC);
background-image: -o-linear-gradient(top,#F8F8F8,#ECECEC);
background-image: linear-gradient(top,#F8F8F8,#ECECEC);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f8f8f8',EndColorStr='#ececec');
border-color: #C6C6C6;
margin-left:7px;
@include border-radius(3px);
box-shadow:none;
color:#666;
}
}
.search {
.search-input {
@include border-radius(3px);
border-color: #C6C6C6;
box-shadow:none;
}
}
.pic {
img {
@include border-radius(3px);
}
}
}
} }
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
.fbtn { .fbtn {
.btn { .btn {
i {
position: relative;
top: 1px;
}
margin-left:8px; margin-left:8px;
background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595D63), to(#31363E)); background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #595D63), to(#31363E));
background-image: -webkit-linear-gradient(#595D63 6.6%, #31363E); background-image: -webkit-linear-gradient(#595D63 6.6%, #31363E);
...@@ -32,6 +36,10 @@ ...@@ -32,6 +36,10 @@
background-image: -moz-linear-gradient(#595D63 6.6%, #202227); background-image: -moz-linear-gradient(#595D63 6.6%, #202227);
background-image: -o-linear-gradient(#595D63 6.6%, #202227); background-image: -o-linear-gradient(#595D63 6.6%, #202227);
background-position:0 0; background-position:0 0;
color:#fff;
i {
@extend .icon-white;
}
} }
border: 1px solid #31363E; border: 1px solid #31363E;
...@@ -59,14 +67,9 @@ ...@@ -59,14 +67,9 @@
.app_logo { .app_logo {
a { a {
h1 { h1 {
background: url('images.png') no-repeat -3px -6px; background: url('logo_white.png') no-repeat 0px -3px;
width: 65px; color:#fff;
height: 26px; text-shadow: 0 1px 1px #111;
margin: 6px 0;
padding: 0;
float: left;
text-indent: -1000em;
float:left;
} }
} }
.separator { .separator {
...@@ -75,7 +78,6 @@ ...@@ -75,7 +78,6 @@
} }
.project_name { .project_name {
line-height:38px;
color:#fff; color:#fff;
text-shadow: 0 1px 1px #111; text-shadow: 0 1px 1px #111;
} }
......
...@@ -37,26 +37,20 @@ ...@@ -37,26 +37,20 @@
* *
*/ */
.app_logo { .app_logo {
width:160px;
a { a {
h1 { h1 {
opacity: 0.7; background: none;
background: url('images.png') no-repeat -3px -6px; color:#DDD;
width: 65px; font-size:30px;
height: 26px; text-shadow: 0 1px 1px #111;
margin: 6px 0; padding-left: 0;
padding: 0;
float: left;
text-indent: -1000em;
float:left;
&:hover {
opacity: 1.0;
}
} }
} }
.separator { .separator {
width: 1px; width: 1px;
height: 40px; height: 40px;
margin: 0 9px; margin: 0 10px;
overflow: hidden; overflow: hidden;
background: #222; background: #222;
border-left: 1px solid #333; border-left: 1px solid #333;
...@@ -66,7 +60,6 @@ ...@@ -66,7 +60,6 @@
.fbtn { .fbtn {
.btn { .btn {
i { i {
@extend .icon-white;
position: relative; position: relative;
top: 2px; top: 2px;
} }
...@@ -77,10 +70,14 @@ ...@@ -77,10 +70,14 @@
color:#ccc; color:#ccc;
&:hover { &:hover {
color:#fff; color:#fff;
i {
@extend .icon-white;
}
} }
border: none; border: none;
box-shadow:none; box-shadow:none;
text-shadow: 0 -1px 0 #000000; text-shadow: 0 -1px 0 #000000;
border-left: 1px solid #333;
} }
} }
...@@ -113,9 +110,9 @@ ...@@ -113,9 +110,9 @@
* *
*/ */
.project_name { .project_name {
line-height:34px; line-height:36px;
font-size:22px; font-size:30px;
color:#fff; color:#DDD;
text-shadow: 0 1px 1px #111; text-shadow: 0 1px 1px #111;
} }
......
class LabelsController < ApplicationController
before_filter :authenticate_user!
before_filter :project
before_filter :module_enabled
layout "project"
# Authorize
before_filter :add_project_abilities
# Allow read any issue
before_filter :authorize_read_issue!
respond_to :js, :html
def index
@labels = Issue.tag_counts_on(:labels)
end
protected
def module_enabled
return render_404 unless @project.issues_enabled
end
end
...@@ -12,8 +12,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -12,8 +12,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
def ldap def ldap
# We only find ourselves here if the authentication to LDAP was successful. # We only find ourselves here if the authentication to LDAP was successful.
info = request.env["omniauth.auth"]["info"] @user = User.find_for_ldap_auth(request.env["omniauth.auth"], current_user)
@user = User.find_for_ldap_auth(info)
if @user.persisted? if @user.persisted?
@user.remember_me = true @user.remember_me = true
end end
...@@ -39,7 +38,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -39,7 +38,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
current_user.save current_user.save
redirect_to profile_path redirect_to profile_path
else else
@user = User.find_by_provider_and_uid(provider, uid) @user = User.find_by_provider_and_extern_uid(provider, uid)
if @user if @user
sign_in_and_redirect @user sign_in_and_redirect @user
......
require File.join(Rails.root, 'lib', 'graph_commit') require Rails.root.join('lib', 'gitlab', 'graph_commit')
class ProjectsController < ApplicationController class ProjectsController < ApplicationController
before_filter :project, except: [:index, :new, :create] before_filter :project, except: [:index, :new, :create]
...@@ -78,7 +78,7 @@ class ProjectsController < ApplicationController ...@@ -78,7 +78,7 @@ class ProjectsController < ApplicationController
end end
def graph def graph
@days_json, @commits_json = GraphCommit.to_graph(project) @days_json, @commits_json = Gitlab::GraphCommit.to_graph(project)
end end
def destroy def destroy
......
...@@ -9,6 +9,7 @@ class TeamMembersController < ApplicationController ...@@ -9,6 +9,7 @@ class TeamMembersController < ApplicationController
def show def show
@team_member = project.users_projects.find(params[:id]) @team_member = project.users_projects.find(params[:id])
@events = @team_member.user.recent_events.where(:project_id => @project.id).limit(7)
end end
def new def new
......
class ApplicationDecorator < Drapper::Base class ApplicationDecorator < Draper::Base
# Lazy Helpers # Lazy Helpers
# PRO: Call Rails helpers without the h. proxy # PRO: Call Rails helpers without the h. proxy
# ex: number_to_currency(model.price) # ex: number_to_currency(model.price)
......
...@@ -2,10 +2,13 @@ require 'digest/md5' ...@@ -2,10 +2,13 @@ require 'digest/md5'
module ApplicationHelper module ApplicationHelper
def gravatar_icon(user_email = '', size = 40) def gravatar_icon(user_email = '', size = 40)
return unless user_email if Gitlab.config.disable_gravatar? || user_email.blank?
gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com" 'no_avatar.png'
user_email.strip! else
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon" gravatar_prefix = request.ssl? ? "https://secure" : "http://www"
user_email.strip!
"#{gravatar_prefix}.gravatar.com/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon"
end
end end
def request_protocol def request_protocol
......
module GitlabMarkdownHelper module GitlabMarkdownHelper
# Replaces references (i.e. @abc, #123, !456, ...) in the text with links to
# the appropriate items in Gitlab.
#
# text - the source text
# html_options - extra options for the reference links as given to link_to
#
# note: reference links will only be generated if @project is set
#
# see Gitlab::Markdown for details on the supported syntax
def gfm(text, html_options = {}) def gfm(text, html_options = {})
return text if text.nil? return text if text.nil?
return text if @project.nil? return text if @project.nil?
# Extract pre blocks # Extract pre blocks so they are not altered
# from http://github.github.com/github-flavored-markdown/ # from http://github.github.com/github-flavored-markdown/
extractions = {} extractions = {}
text.gsub!(%r{<pre>.*?</pre>|<code>.*?</code>}m) do |match| text.gsub!(%r{<pre>.*?</pre>|<code>.*?</code>}m) do |match|
...@@ -25,7 +34,15 @@ module GitlabMarkdownHelper ...@@ -25,7 +34,15 @@ module GitlabMarkdownHelper
text.html_safe text.html_safe
end end
# circumvents nesting links, which will behave bad in browsers # Use this in places where you would normally use link_to(gfm(...), ...).
#
# It solves a problem occurring with nested links (i.e.
# "<a>outer text <a>gfm ref</a> more outer text</a>"). This will not be
# interpreted as intended. Browsers will parse something like
# "<a>outer text </a><a>gfm ref</a> more outer text" (notice the last part is
# not linked any more). link_to_gfm corrects that. It wraps all parts to
# explicitly produce the correct linking behavior (i.e.
# "<a>outer text </a><a>gfm ref</a><a> more outer text</a>").
def link_to_gfm(body, url, html_options = {}) def link_to_gfm(body, url, html_options = {})
gfm_body = gfm(body, html_options) gfm_body = gfm(body, html_options)
......
...@@ -12,74 +12,102 @@ class Notify < ActionMailer::Base ...@@ -12,74 +12,102 @@ class Notify < ActionMailer::Base
def new_user_email(user_id, password) def new_user_email(user_id, password)
@user = User.find(user_id) @user = User.find(user_id)
@password = password @password = password
mail(to: @user.email, subject: "gitlab | Account was created for you") mail(to: @user.email, subject: subject("Account was created for you"))
end end
def new_issue_email(issue_id) def new_issue_email(issue_id)
@issue = Issue.find(issue_id) @issue = Issue.find(issue_id)
@project = @issue.project @project = @issue.project
mail(to: @issue.assignee_email, subject: "gitlab | new issue ##{@issue.id} | #{@issue.title} | #{@project.name}") mail(to: @issue.assignee_email, subject: subject("new issue ##{@issue.id}", @issue.title))
end end
def note_wall_email(recipient_id, note_id) def note_wall_email(recipient_id, note_id)
recipient = User.find(recipient_id)
@note = Note.find(note_id) @note = Note.find(note_id)
@project = @note.project @project = @note.project
mail(to: recipient.email, subject: "gitlab | #{@project.name}") mail(to: recipient(recipient_id), subject: subject)
end end
def note_commit_email(recipient_id, note_id) def note_commit_email(recipient_id, note_id)
recipient = User.find(recipient_id)
@note = Note.find(note_id) @note = Note.find(note_id)
@commit = @note.target @commit = @note.target
@commit = CommitDecorator.decorate(@commit) @commit = CommitDecorator.decorate(@commit)
@project = @note.project @project = @note.project
mail(to: recipient.email, subject: "gitlab | note for commit #{@commit.short_id} | #{@commit.title} | #{@project.name}") mail(to: recipient(recipient_id), subject: subject("note for commit #{@commit.short_id}", @commit.title))
end end
def note_merge_request_email(recipient_id, note_id) def note_merge_request_email(recipient_id, note_id)
recipient = User.find(recipient_id)
@note = Note.find(note_id) @note = Note.find(note_id)
@merge_request = @note.noteable @merge_request = @note.noteable
@project = @note.project @project = @note.project
mail(to: recipient.email, subject: "gitlab | note for merge request !#{@merge_request.id} | #{@project.name}") mail(to: recipient(recipient_id), subject: subject("note for merge request !#{@merge_request.id}"))
end end
def note_issue_email(recipient_id, note_id) def note_issue_email(recipient_id, note_id)
recipient = User.find(recipient_id)
@note = Note.find(note_id) @note = Note.find(note_id)
@issue = @note.noteable @issue = @note.noteable
@project = @note.project @project = @note.project
mail(to: recipient.email, subject: "gitlab | note for issue ##{@issue.id} | #{@project.name}") mail(to: recipient(recipient_id), subject: subject("note for issue ##{@issue.id}"))
end end
def note_wiki_email(recipient_id, note_id) def note_wiki_email(recipient_id, note_id)
recipient = User.find(recipient_id)
@note = Note.find(note_id) @note = Note.find(note_id)
@wiki = @note.noteable @wiki = @note.noteable
@project = @note.project @project = @note.project
mail(to: recipient.email, subject: "gitlab | note for wiki | #{@project.name}") mail(to: recipient(recipient_id), subject: subject("note for wiki"))
end end
def new_merge_request_email(merge_request_id) def new_merge_request_email(merge_request_id)
@merge_request = MergeRequest.find(merge_request_id) @merge_request = MergeRequest.find(merge_request_id)
@project = @merge_request.project @project = @merge_request.project
mail(to: @merge_request.assignee_email, subject: "gitlab | new merge request !#{@merge_request.id} | #{@merge_request.title} | #{@project.name}") mail(to: @merge_request.assignee_email, subject: subject("new merge request !#{@merge_request.id}", @merge_request.title))
end end
def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id) def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id)
recipient = User.find(recipient_id)
@merge_request = MergeRequest.find(merge_request_id) @merge_request = MergeRequest.find(merge_request_id)
@previous_assignee ||= User.find(previous_assignee_id) @previous_assignee ||= User.find(previous_assignee_id)
@project = @merge_request.project @project = @merge_request.project
mail(to: recipient.email, subject: "gitlab | changed merge request !#{@merge_request.id} | #{@merge_request.title} | #{@project.name}") mail(to: recipient(recipient_id), subject: subject("changed merge request !#{@merge_request.id}", @merge_request.title))
end end
def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id) def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id)
recipient = User.find(recipient_id)
@issue = Issue.find(issue_id) @issue = Issue.find(issue_id)
@previous_assignee ||= User.find(previous_assignee_id) @previous_assignee ||= User.find(previous_assignee_id)
@project = @issue.project @project = @issue.project
mail(to: recipient.email, subject: "gitlab | changed issue ##{@issue.id} | #{@issue.title} | #{@project.name}") mail(to: recipient(recipient_id), subject: subject("changed issue ##{@issue.id}", @issue.title))
end
private
# Look up a User by their ID and return their email address
#
# recipient_id - User ID
#
# Returns a String containing the User's email address.
def recipient(recipient_id)
if recipient = User.find(recipient_id)
recipient.email
end
end
# Formats arguments into a String suitable for use as an email subject
#
# extra - Extra Strings to be inserted into the subject
#
# Examples
#
# >> subject('Lorem ipsum')
# => "gitlab | Lorem ipsum"
#
# # Automatically inserts Project name when @project is set
# >> @project = Project.last
# => #<Project id: 1, name: "Ruby on Rails", path: "ruby_on_rails", ...>
# >> subject('Lorem ipsum')
# => "gitlab | Lorem ipsum | Ruby on Rails"
#
# # Accepts multiple arguments
# >> subject('Lorem ipsum', 'Dolor sit amet')
# => "gitlab | Lorem ipsum | Dolor sit amet"
def subject(*extra)
"gitlab | " << extra.join(' | ') << (@project ? " | #{@project.name}" : "")
end end
end end
...@@ -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
......
...@@ -88,8 +88,11 @@ class MergeRequest < ActiveRecord::Base ...@@ -88,8 +88,11 @@ class MergeRequest < ActiveRecord::Base
end end
def unmerged_diffs def unmerged_diffs
commits = project.repo.commits_between(target_branch, source_branch).map {|c| Commit.new(c)} # Only show what is new in the source branch compared to the target branch, not the other way around.
diffs = project.repo.diff(commits.first.prev_commit.id, commits.last.id) rescue [] # The linex below with merge_base is equivalent to diff with three dots (git diff branch1...branch2)
# From the git documentation: "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B"
common_commit = project.repo.git.native(:merge_base, {}, [target_branch, source_branch]).strip
diffs = project.repo.diff(common_commit, source_branch)
end end
def last_commit def last_commit
......
...@@ -2,7 +2,7 @@ require "grit" ...@@ -2,7 +2,7 @@ require "grit"
class Project < ActiveRecord::Base class Project < ActiveRecord::Base
include Repository include Repository
include ProjectPush include PushObserver
include Authority include Authority
include Team include Team
......
...@@ -7,7 +7,7 @@ class User < ActiveRecord::Base ...@@ -7,7 +7,7 @@ class User < ActiveRecord::Base
attr_accessible :email, :password, :password_confirmation, :remember_me, :bio, attr_accessible :email, :password, :password_confirmation, :remember_me, :bio,
:name, :projects_limit, :skype, :linkedin, :twitter, :dark_scheme, :name, :projects_limit, :skype, :linkedin, :twitter, :dark_scheme,
:theme_id, :force_random_password :theme_id, :force_random_password, :extern_uid, :provider
attr_accessor :force_random_password attr_accessor :force_random_password
...@@ -54,6 +54,8 @@ class User < ActiveRecord::Base ...@@ -54,6 +54,8 @@ class User < ActiveRecord::Base
validates :bio, length: { within: 0..255 } validates :bio, length: { within: 0..255 }
validates :extern_uid, :allow_blank => true, :uniqueness => {:scope => :provider}
before_save :ensure_authentication_token before_save :ensure_authentication_token
alias_attribute :private_token, :authentication_token alias_attribute :private_token, :authentication_token
...@@ -84,21 +86,31 @@ class User < ActiveRecord::Base ...@@ -84,21 +86,31 @@ class User < ActiveRecord::Base
where('id NOT IN (SELECT DISTINCT(user_id) FROM users_projects)') where('id NOT IN (SELECT DISTINCT(user_id) FROM users_projects)')
end end
def self.find_for_ldap_auth(omniauth_info) def self.find_for_ldap_auth(auth, signed_in_resource=nil)
name = omniauth_info.name.force_encoding("utf-8") uid = auth.info.uid
email = omniauth_info.email.downcase unless omniauth_info.email.nil? provider = auth.provider
raise OmniAuth::Error, "LDAP accounts must provide an email address" if email.nil? name = auth.info.name.force_encoding("utf-8")
email = auth.info.email.downcase unless auth.info.email.nil?
raise OmniAuth::Error, "LDAP accounts must provide an uid and email address" if uid.nil? or email.nil?
if @user = User.find_by_email(email) if @user = User.find_by_extern_uid_and_provider(uid, provider)
@user
# workaround for backward compatibility
elsif @user = User.find_by_email(email)
logger.info "Updating legacy LDAP user #{email} with extern_uid => #{uid}"
@user.update_attributes(:extern_uid => uid, :provider => provider)
@user @user
else else
logger.info "Creating user from LDAP login {uid => #{uid}, name => #{name}, email => #{email}}"
password = Devise.friendly_token[0, 8].downcase password = Devise.friendly_token[0, 8].downcase
@user = User.create( @user = User.create(
name: name, :extern_uid => uid,
email: email, :provider => provider,
password: password, :name => name,
password_confirmation: password, :email => email,
projects_limit: Gitlab.config.default_projects_limit :password => password,
:password_confirmation => password,
:projects_limit => Gitlab.config.default_projects_limit
) )
end end
end end
......
module ProjectPush module PushObserver
def observe_push(oldrev, newrev, ref, user) def observe_push(oldrev, newrev, ref, user)
data = post_receive_data(oldrev, newrev, ref, user) data = post_receive_data(oldrev, newrev, ref, user)
......
...@@ -30,26 +30,10 @@ module Repository ...@@ -30,26 +30,10 @@ module Repository
Commit.commits_between(repo, from, to) Commit.commits_between(repo, from, to)
end end
def write_hooks
%w(post-receive).each do |hook|
write_hook(hook, File.read(File.join(Rails.root, 'lib', "#{hook}-hook")))
end
end
def satellite def satellite
@satellite ||= Gitlab::Satellite.new(self) @satellite ||= Gitlab::Satellite.new(self)
end end
def write_hook(name, content)
hook_file = File.join(path_to_repo, 'hooks', name)
File.open(hook_file, 'w') do |f|
f.write(content)
end
File.chmod(0775, hook_file)
end
def has_post_receive_file? def has_post_receive_file?
hook_file = File.join(path_to_repo, 'hooks', 'post-receive') hook_file = File.join(path_to_repo, 'hooks', 'post-receive')
File.exists?(hook_file) File.exists?(hook_file)
...@@ -73,8 +57,6 @@ module Repository ...@@ -73,8 +57,6 @@ module Repository
def update_repository def update_repository
Gitlab::GitHost.system.update_project(path, self) Gitlab::GitHost.system.update_project(path, self)
write_hooks if File.exists?(path_to_repo)
end end
def destroy_repository def destroy_repository
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
Read more about system hooks Read more about system hooks
%strong #{link_to "here", help_system_hooks_path, class: "vlink"} %strong #{link_to "here", help_system_hooks_path, class: "vlink"}
= form_for @hook, as: :hook, url: admin_hooks_path do |f| = form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-inline' } do |f|
-if @hook.errors.any? -if @hook.errors.any?
.alert-message.block-message.error .alert-message.block-message.error
- @hook.errors.full_messages.each do |msg| - @hook.errors.full_messages.each do |msg|
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Projects Projects
= link_to 'New Project', new_admin_project_path, class: "btn small right" = link_to 'New Project', new_admin_project_path, class: "btn small right"
%br %br
= form_tag admin_projects_path, method: :get do = form_tag admin_projects_path, method: :get, class: 'form-inline' do
= text_field_tag :name, params[:name], class: "xlarge" = text_field_tag :name, params[:name], class: "xlarge"
= submit_tag "Search", class: "btn submit primary" = submit_tag "Search", class: "btn submit primary"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= link_to 'New User', new_admin_user_path, class: "btn small right" = link_to 'New User', new_admin_user_path, class: "btn small right"
%br %br
= form_tag admin_users_path, method: :get do = form_tag admin_users_path, method: :get, class: 'form-inline' do
= text_field_tag :name, params[:name], class: "xlarge" = text_field_tag :name, params[:name], class: "xlarge"
= submit_tag "Search", class: "btn submit primary" = submit_tag "Search", class: "btn submit primary"
%ul.nav.nav-pills %ul.nav.nav-pills
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
%span.btn.disabled.grouped %span.btn.disabled.grouped
%i.icon-comment %i.icon-comment
= @notes_count = @notes_count
= link_to patch_project_commit_path(@project, @commit.id), class: "btn small grouped" do = link_to patch_project_commit_path(@project, @commit.id), class: "btn small grouped" do
%i.icon-download-alt %i.icon-download-alt
Get Patch Get Patch
= link_to tree_project_ref_path(@project, @commit.id), class: "browse-button primary grouped" do = link_to tree_project_ref_path(@project, @commit.id), class: "browse-button primary grouped" do
%strong Browse Code » %strong Browse Code »
%h3.commit-title.page_title %h3.commit-title.page_title
= gfm @commit.title = gfm @commit.title
......
- if @projects.any? - if @projects.any?
.projects .projects
.activities.span8 .activities.span8
- if current_user.require_ssh_key? = render 'shared/no_ssh'
.alert.alert-error.padded
%span
You wont be able to pull/push project code unless you
%strong
= link_to new_key_path, class: "vlink" do
add new key
to your profile
- if @events.any? - if @events.any?
.content_list= render @events .content_list= render @events
- else - else
...@@ -57,5 +50,5 @@ ...@@ -57,5 +50,5 @@
If you will be added to project - it will be displayed here If you will be added to project - it will be displayed here
:javascript :javascript
$(function(){ Pager.init(20); }); $(function(){ Pager.init(20); });
...@@ -23,5 +23,3 @@ ...@@ -23,5 +23,3 @@
= preserve do = preserve do
sudo chmod -R 770 /home/git/repositories/ sudo chmod -R 770 /home/git/repositories/
sudo chown -R git:git /home/git/repositories/ sudo chown -R git:git /home/git/repositories/
sudo chown gitlab:gitlab /home/git/repositories/**/hooks/post-receive
...@@ -31,3 +31,6 @@ ...@@ -31,3 +31,6 @@
%li %li
%h5= link_to "Gitlab Markdown", help_markdown_path %h5= link_to "Gitlab Markdown", help_markdown_path
%li
%h5= link_to "SSH keys", help_ssh_path
%h3 Permissions %h3.page_title Permissions
.back_link .back_link
= link_to help_path do = link_to help_path do
&larr; to index &larr; to index
%hr %hr
......
%h3.page_title SSH Keys
.back_link
= link_to help_path do
&larr; to index
%hr
%p.slead
SSH key allows you to establish a secure connection between your computer and Gitlab
%p.slead
To generate a new SSH key just open your terminal and use code below.
%pre.dark
ssh-keygen -t rsa -C "#{current_user.email}"
\# Creates a new ssh key using the provided email
\# Generating public/private rsa key pair...
%p.slead
Next just use code below to dump your public key and add to GITLAB SSH Keys
%pre.dark
cat ~/.ssh/id_rsa.pub
\# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....
%h3 System hooks %h3 System hooks
.back_link .back_link
= link_to :back do = link_to :back do
&larr; back &larr; back
%hr %hr
%p.slead %p.slead
Your Gitlab instance can perform HTTP POST request on next event: create_project, delete_project, create_user, delete_user, change_team_member. Your Gitlab instance can perform HTTP POST request on next event: create_project, delete_project, create_user, delete_user, change_team_member.
%br %br
System Hooks can be used for logging or change information in LDAP server. System Hooks can be used for logging or change information in LDAP server.
......
%h3 Web hooks %h3.page_title Web hooks
.back_link .back_link
= link_to help_path do = link_to help_path do
&larr; to index &larr; to index
%hr %hr
%p.slead %p.slead
Every Gitlab project can trigger a web server whenever the repo is pushed to. Every Gitlab project can trigger a web server whenever the repo is pushed to.
%br %br
Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server. Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
%br %br
......
- bash_lexer = Pygments::Lexer[:bash] %h3.page_title Workflow
%h3 Workflow
.back_link .back_link
= link_to help_path do = link_to help_path do
&larr; to index &larr; to index
%hr %hr
...@@ -9,25 +8,25 @@ ...@@ -9,25 +8,25 @@
%li %li
%p Clone project %p Clone project
.bash .bash
%pre %pre.dark
git clone git@example.com:project-name.git git clone git@example.com:project-name.git
%li %li
%p Create branch with your feature %p Create branch with your feature
.bash .bash
%pre %pre.dark
git checkout -b $feature_name git checkout -b $feature_name
%li %li
%p Write code. Commit changes %p Write code. Commit changes
.bash .bash
%pre %pre.dark
git commit -am "My feature is ready" git commit -am "My feature is ready"
%li %li
%p Push your branch to gitlabhq %p Push your branch to gitlabhq
.bash .bash
%pre %pre.dark
git push origin $feature_name git push origin $feature_name
%li %li
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
Read more about web hooks Read more about web hooks
%strong #{link_to "here", help_web_hooks_path, class: "vlink"} %strong #{link_to "here", help_web_hooks_path, class: "vlink"}
= form_for [@project, @hook], as: :hook, url: project_hooks_path(@project) do |f| = form_for [@project, @hook], as: :hook, url: project_hooks_path(@project), html: { class: 'form-inline' } do |f|
-if @hook.errors.any? -if @hook.errors.any?
.alert-message.block-message.error .alert-message.block-message.error
- @hook.errors.full_messages.each do |msg| - @hook.errors.full_messages.each do |msg|
......
%div.issue-form-holder %div.issue-form-holder
%h3= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}" %h3.page_title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
= form_for [@project, @issue], remote: request.xhr? do |f| = form_for [@project, @issue], remote: request.xhr? do |f|
-if @issue.errors.any? -if @issue.errors.any?
.alert-message.block-message.error .alert-message.block-message.error
...@@ -9,26 +9,26 @@ ...@@ -9,26 +9,26 @@
.issue_form_box .issue_form_box
.issue_title .issue_title
.clearfix .clearfix
= f.label :title do = f.label :title do
%strong= "Subject *" %strong= "Subject *"
.input .input
= f.text_field :title, maxlength: 255, class: "xxlarge" = f.text_field :title, maxlength: 255, class: "xxlarge"
.issue_middle_block .issue_middle_block
.issue_assignee .issue_assignee
= f.label :assignee_id do = f.label :assignee_id do
%i.icon-user %i.icon-user
Assign to Assign to
.input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select a user" }) .input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select a user" })
.issue_milestone .issue_milestone
= f.label :milestone_id do = f.label :milestone_id do
%i.icon-time %i.icon-time
Milestone Milestone
.input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }) .input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" })
.issue_description .issue_description
.clearfix .clearfix
= f.label :label_list do = f.label :label_list do
%i.icon-tag %i.icon-tag
Labels Labels
.input .input
= f.text_field :label_list, maxlength: 2000, class: "xxlarge" = f.text_field :label_list, maxlength: 2000, class: "xxlarge"
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
%li{class: "#{'active' if current_page?(project_milestones_path(@project))}"} %li{class: "#{'active' if current_page?(project_milestones_path(@project))}"}
= link_to project_milestones_path(@project), class: "tab" do = link_to project_milestones_path(@project), class: "tab" do
Milestones Milestones
%li{class: "#{'active' if current_page?(project_labels_path(@project))}"}
= link_to project_labels_path(@project), class: "tab" do
Labels
%li.right %li.right
%span.rss-icon %span.rss-icon
= link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do = link_to project_issues_path(@project, :atom, { private_token: current_user.private_token }) do
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
.span5 .span5
- if can? current_user, :write_issue, @project - if can? current_user, :write_issue, @project
= link_to new_project_issue_path(@project), class: "right btn small", title: "New Issue", remote: true do = link_to new_project_issue_path(@project), class: "right btn small", title: "New Issue", remote: true do
%i.icon-plus
New Issue New Issue
= form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: :right do = form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: :right do
= hidden_field_tag :project_id, @project.id, { id: 'project_id' } = hidden_field_tag :project_id, @project.id, { id: 'project_id' }
...@@ -21,7 +22,7 @@ ...@@ -21,7 +22,7 @@
.issues_bulk_update.hide .issues_bulk_update.hide
= form_tag bulk_update_project_issues_path(@project), method: :post do = form_tag bulk_update_project_issues_path(@project), method: :post do
%span.update_issues_text Update selected issues with &nbsp; %span.update_issues_text Update selected issues with &nbsp;
.left .left
= select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status") = select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status")
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
= select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + @project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone") = select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + @project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), prompt: "Milestone")
= hidden_field_tag :f, params[:f] = hidden_field_tag :f, params[:f]
.clearfix .clearfix
%ul#issues-table.unstyled.issues_table %ul#issues-table.unstyled.issues_table
= render "issues" = render "issues"
......
...@@ -11,7 +11,13 @@ ...@@ -11,7 +11,13 @@
.input= f.text_field :title .input= f.text_field :title
.clearfix .clearfix
= f.label :key = f.label :key
.input= f.text_area :key, class: [:xxlarge, :thin_area] .input
= f.text_area :key, class: [:xxlarge, :thin_area]
%p.hint
Paste your public key here. Read more about how generate it
= link_to "here", help_ssh_path
.actions .actions
= f.submit 'Save', class: "primary btn" = f.submit 'Save', class: "primary btn"
= link_to "Cancel", keys_path, class: "btn" = link_to "Cancel", keys_path, class: "btn"
......
%h3.page_title New key %h3.page_title Add an SSH Key
%hr %hr
= render 'form' = render 'form'
......
%li.wll
%strong= label.name
.right
%span= pluralize label.count, 'issue'
= render "issues/head"
%h3.page_title
Labels
%br
%div.ui-box
%ul.unstyled.labels-table
- @labels.each do |label|
= render 'label', label: label
- unless @labels.present?
%li
%h3.nothing_here_message Nothing to show here
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
= favicon_link_tag 'favicon.ico' = favicon_link_tag 'favicon.ico'
= stylesheet_link_tag "application" = stylesheet_link_tag "application"
= javascript_include_tag "application" = javascript_include_tag "application"
-# Atom feed -# Atom feed
- if controller_name == 'projects' && action_name == 'index' - if controller_name == 'projects' && action_name == 'index'
= auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed" = auto_discovery_link_tag :atom, projects_url(:atom, private_token: current_user.private_token), title: "Dashboard feed"
......
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
}); });
$(".edit_merge_request").live("ajax:beforeSend", function() { $(".edit_merge_request").live("ajax:beforeSend", function() {
$(this).replaceWith('#{image_tag "ajax_loader.gif"}'); $('.can_be_merged').hide();
$('.merge_in_progress').show();
}) })
}) })
...@@ -3,13 +3,12 @@ ...@@ -3,13 +3,12 @@
%a.close{href: "#"} × %a.close{href: "#"} ×
%h3 How To Merge %h3 How To Merge
.modal-body .modal-body
%pre %pre.dark
= preserve do = preserve do
:erb git checkout #{@merge_request.target_branch}
git checkout <%= @merge_request.target_branch %> git fetch origin
git fetch origin git merge origin/#{@merge_request.source_branch}
git merge origin/<%= @merge_request.source_branch %> git push origin #{@merge_request.target_branch}
git push origin <%= @merge_request.target_branch %>
:javascript :javascript
......
...@@ -40,3 +40,6 @@ ...@@ -40,3 +40,6 @@
.alert.alert-info .alert.alert-info
%strong This merge request already can not be merged. Try to reload page. %strong This merge request already can not be merged. Try to reload page.
.merge_in_progress.hide
%span.cgray Merge is in progress. Please wait. Page will be automatically reloaded. &nbsp;
= image_tag "ajax_loader.gif"
%h3= @milestone.new_record? ? "New Milestone" : "Edit Milestone ##{@milestone.id}" %h3.page_title= @milestone.new_record? ? "New Milestone" : "Edit Milestone ##{@milestone.id}"
.back_link .back_link
= link_to project_milestones_path(@project) do = link_to project_milestones_path(@project) do
&larr; To milestones &larr; To milestones
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
= f.label :title, "Title", class: "control-label" = f.label :title, "Title", class: "control-label"
.controls .controls
= f.text_field :title, maxlength: 255, class: "input-xlarge" = f.text_field :title, maxlength: 255, class: "input-xlarge"
%p.help-block Required %p.hint Required
.control-group .control-group
= f.label :description, "Description", class: "control-label" = f.label :description, "Description", class: "control-label"
.controls .controls
= f.text_area :description, maxlength: 2000, class: "input-xlarge", rows: 10 = f.text_area :description, maxlength: 2000, class: "input-xlarge", rows: 10
%p.help-block Markdown is enabled. %p.hint Markdown is enabled.
.span6 .span6
.control-group .control-group
= f.label :due_date, "Due Date", class: "control-label" = f.label :due_date, "Due Date", class: "control-label"
......
- if note.valid? - if note.valid?
:plain :plain
$("#new_note .errors").remove(); $("#new_note .error").remove();
$('#new_note textarea').val(""); $('#new_note textarea').val("");
$('#preview-link').text('Preview');
$('#preview-note').hide(); $('#note_note').show();
NoteList.prepend(#{note.id}, "#{escape_javascript(render partial: "notes/show", locals: {note: note})}"); NoteList.prepend(#{note.id}, "#{escape_javascript(render partial: "notes/show", locals: {note: note})}");
- else - else
:plain :plain
......
%li{id: dom_id(note), class: "note"} %li{id: dom_id(note), class: "note"}
= image_tag gravatar_icon(note.author.email), class: "avatar" = image_tag gravatar_icon(note.author.email), class: "avatar s32"
%div.note-author %div.note-author
%strong= note.author_name %strong= note.author_name
= link_to "##{dom_id(note)}", name: dom_id(note) do = link_to "##{dom_id(note)}", name: dom_id(note) do
......
- if current_user.require_ssh_key? = render 'shared/no_ssh'
.alert-message.block-message.error
%ul
%li You have no ssh keys added to your profile.
%li You wont be able to pull/push repository.
%li Visit profile &rarr; keys and add public key of every machine you want to use for work with gitlabhq.
.alert-message.block-message.error
%ul.unstyled.alert_holder
%li You should push repository to proceed.
%li After push you will be able to browse code, commits etc.
- bash_lexer = Pygments::Lexer[:bash]
%div.git-empty %div.git-empty
%h3 Git global setup: %h4 Git global setup:
- setup_str = ["git config --global user.name \"#{current_user.name}\"", %pre.dark
"git config --global user.email \"#{current_user.email}\""].join("\n") = preserve do
= preserve do git config --global user.name "#{current_user.name}"
= raw bash_lexer.highlight(setup_str, lexer: 'bash', options: {encoding: 'utf-8'}) git config --global user.email "#{current_user.email}"
%br
%br
%h3 Create Repository
- repo_setup_str = ["mkdir #{@project.path}",
"cd #{@project.path}",
"git init",
"touch README",
"git add README",
"git commit -m 'first commit'",
"git remote add origin #{@project.url_to_repo}",
"git push -u origin master"].join("\n")
= preserve do %h4.prepend-top-20 Create Repository
= raw bash_lexer.highlight(repo_setup_str) %pre.dark
= preserve do
mkdir #{@project.path}
cd #{@project.path}
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin #{@project.url_to_repo}
git push -u origin master
%br %h4.prepend-top-20 Existing Git Repo?
%br %pre.dark
%h3 Existing Git Repo? = preserve do
- exist_repo_setup_str = ["cd existing_git_repo", cd existing_git_repo
"git remote add origin #{@project.url_to_repo}", git remote add origin #{@project.url_to_repo}
"git push -u origin master"].join("\n") git push -u origin master
= preserve do
= raw bash_lexer.highlight(exist_repo_setup_str)
- if can? current_user, :admin_project, @project - if can? current_user, :admin_project, @project
.alert-message.block-message.error.prepend-top-20 .prepend-top-20
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger" = link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger right"
...@@ -51,8 +51,6 @@ ...@@ -51,8 +51,6 @@
:javascript :javascript
$(function(){ $(function(){
$('select#branch').selectmenu({style:'popup', width:200});
$('select#tag').selectmenu({style:'popup', width:200});
$('.project-refs-select').chosen(); $('.project-refs-select').chosen();
history.pushState({ path: this.path }, '', "#{@history_path}"); history.pushState({ path: this.path }, '', "#{@history_path}");
......
- if tm - if tm
%strong= link_to "[#{tm.user_name}]", project_team_member_path(@project, tm) = link_to "[#{tm.user_name}]", project_team_member_path(@project, tm)
= link_to_gfm truncate(content_commit.title, length: tm ? 30 : 50), project_commit_path(@project, content_commit.id), class: "tree-commit-link" = link_to_gfm truncate(content_commit.title, length: tm ? 30 : 50), project_commit_path(@project, content_commit.id), class: "tree-commit-link"
= form_tag search_path, method: :get do |f| = form_tag search_path, method: :get, class: 'form-inline' do |f|
.padded .padded
= label_tag :search do = label_tag :search do
%strong Looking for %strong Looking for
......
- if current_user.require_ssh_key?
%h6.error_message
%span
You wont be able to pull/push project code unless you
%strong
= link_to new_key_path, class: "vlink" do
add SSH key
to your profile
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
%span.label Blocked %span.label Blocked
= link_to project_team_member_path(@project, member), title: user.name, class: "dark" do = link_to project_team_member_path(@project, member), title: user.name, class: "dark" do
= image_tag gravatar_icon(user.email, 40), class: "avatar" = image_tag gravatar_icon(user.email, 40), class: "avatar s32"
= link_to project_team_member_path(@project, member), title: user.name, class: "dark" do = link_to project_team_member_path(@project, member), title: user.name, class: "dark" do
%strong= truncate(user.name, lenght: 40) %strong= truncate(user.name, lenght: 40)
%br %br
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
= form_for(@team_member, as: :team_member, url: project_team_member_path(@project, @team_member)) do |f| = form_for(@team_member, as: :team_member, url: project_team_member_path(@project, @team_member)) do |f|
= f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, class: "project-access-select", disabled: !allow_admin = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, class: "project-access-select", disabled: !allow_admin
%hr %hr
= render user.recent_events.limit(5) = render @events
:javascript :javascript
$(function(){ $(function(){
$('.repo-access-select, .project-access-select').live("change", function() { $('.repo-access-select, .project-access-select').live("change", function() {
......
...@@ -44,5 +44,8 @@ module Gitlab ...@@ -44,5 +44,8 @@ module Gitlab
# Version of your assets, change this if you want to expire all your assets # Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0' config.assets.version = '1.0'
# Add fonts
config.assets.paths << "#{Rails.root}/app/assets/fonts"
end end
end end
...@@ -23,7 +23,7 @@ app: ...@@ -23,7 +23,7 @@ app:
default_projects_limit: 10 default_projects_limit: 10
# backup_path: "/vol/backups" # default: Rails.root + backups/ # backup_path: "/vol/backups" # default: Rails.root + backups/
# backup_keep_time: 604800 # default: 0 (forever) (in seconds) # backup_keep_time: 604800 # default: 0 (forever) (in seconds)
# disable_gravatar: true # default: false - Disable user avatars from Gravatar.com
# #
# 2. Advanced settings: # 2. Advanced settings:
...@@ -39,7 +39,6 @@ git_host: ...@@ -39,7 +39,6 @@ git_host:
receive_pack: true receive_pack: true
# port: 22 # port: 22
# Git settings # Git settings
# Use default values unless you understand it # Use default values unless you understand it
git: git:
......
...@@ -120,5 +120,8 @@ class Settings < Settingslogic ...@@ -120,5 +120,8 @@ class Settings < Settingslogic
omniauth['providers'] || [] omniauth['providers'] || []
end end
def disable_gravatar?
app['disable_gravatar'] || false
end
end end
end end
#if defined?(Footnotes) && Rails.env.development?
#Footnotes.run! # first of all
#end
...@@ -30,6 +30,7 @@ Gitlab::Application.routes.draw do ...@@ -30,6 +30,7 @@ Gitlab::Application.routes.draw do
get 'help/web_hooks' => 'help#web_hooks' get 'help/web_hooks' => 'help#web_hooks'
get 'help/system_hooks' => 'help#system_hooks' get 'help/system_hooks' => 'help#system_hooks'
get 'help/markdown' => 'help#markdown' get 'help/markdown' => 'help#markdown'
get 'help/ssh' => 'help#ssh'
# #
# Admin Area # Admin Area
...@@ -196,7 +197,9 @@ Gitlab::Application.routes.draw do ...@@ -196,7 +197,9 @@ Gitlab::Application.routes.draw do
end end
resources :team_members resources :team_members
resources :milestones resources :milestones
resources :labels, :only => [:index]
resources :issues do resources :issues do
collection do collection do
post :sort post :sort
post :bulk_update post :bulk_update
......
class AddExternAuthProviderToUsers < ActiveRecord::Migration
def change
add_column :users, :extern_uid, :string
add_column :users, :provider, :string
add_index :users, [:extern_uid, :provider], :unique => true
end
end
class AddProviderAndUidToUsers < ActiveRecord::Migration
def change
add_column :users, :provider, :string
add_column :users, :uid, :string
end
end
...@@ -171,11 +171,12 @@ ActiveRecord::Schema.define(:version => 20120803152018) do ...@@ -171,11 +171,12 @@ ActiveRecord::Schema.define(:version => 20120803152018) do
t.boolean "blocked", :default => false, :null => false t.boolean "blocked", :default => false, :null => false
t.integer "failed_attempts", :default => 0 t.integer "failed_attempts", :default => 0
t.datetime "locked_at" t.datetime "locked_at"
t.string "extern_uid"
t.string "provider" t.string "provider"
t.string "uid"
end end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true add_index "users", ["email"], :name => "index_users_on_email", :unique => true
add_index "users", ["extern_uid", "provider"], :name => "index_users_on_extern_uid_and_provider", :unique => true
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
create_table "users_projects", :force => true do |t| create_table "users_projects", :force => true do |t|
......
...@@ -119,7 +119,6 @@ Permissions: ...@@ -119,7 +119,6 @@ Permissions:
sudo chmod -R g+rwX /home/git/repositories/ sudo chmod -R g+rwX /home/git/repositories/
sudo chown -R git:git /home/git/repositories/ sudo chown -R git:git /home/git/repositories/
sudo chown gitlab:gitlab /home/git/repositories/**/hooks/post-receive
#### CHECK: Logout & login again to apply git group to your user #### CHECK: Logout & login again to apply git group to your user
...@@ -134,7 +133,7 @@ Permissions: ...@@ -134,7 +133,7 @@ Permissions:
# 4. Install gitlab and configuration. Check status configuration. # 4. Install gitlab and configuration. Check status configuration.
sudo gem install charlock_holmes sudo gem install charlock_holmes --version '0.6.8'
sudo pip install pygments sudo pip install pygments
sudo gem install bundler sudo gem install bundler
cd /home/gitlab cd /home/gitlab
...@@ -177,6 +176,11 @@ Permissions: ...@@ -177,6 +176,11 @@ Permissions:
#### Setup DB #### Setup DB
sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production
#### Setup gitlab hooks
sudo cp ./lib/hooks/post-receive /home/git/share/gitolite/hooks/common/post-receive
sudo chown git:git /home/git/share/gitolite/hooks/common/post-receive
Checking status: Checking status:
...@@ -196,6 +200,7 @@ Checking status: ...@@ -196,6 +200,7 @@ Checking status:
Resolving deltas: 100% (174/174), done. Resolving deltas: 100% (174/174), done.
Can clone gitolite-admin?............YES Can clone gitolite-admin?............YES
UMASK for .gitolite.rc is 0007? ............YES UMASK for .gitolite.rc is 0007? ............YES
/home/git/share/gitolite/hooks/common/post-receive exists? ............YES
If you got all YES - congrats! You can go to next step. If you got all YES - congrats! You can go to next step.
......
Feature: Labels
Background:
Given I signin as a user
And I own project "Shop"
And project "Shop" have issues tags:
| name |
| bug |
| feature |
Given I visit project "Shop" labels page
Scenario: I should see active milestones
Then I should see label "bug"
And I should see label "feature"
...@@ -4,9 +4,7 @@ Feature: Project Network Graph ...@@ -4,9 +4,7 @@ Feature: Project Network Graph
Background: Background:
Given I signin as a user Given I signin as a user
And I own project "Shop" And I own project "Shop"
And I visit project "Shop" network page And I visit project "Shop" network page
Scenario: I should see project network Scenario: I should see project network
Then page should have network graph Then page should have network graph
...@@ -91,36 +91,28 @@ Then /^I should see my merge requests$/ do ...@@ -91,36 +91,28 @@ Then /^I should see my merge requests$/ do
end end
Given /^I have assigned issues$/ do Given /^I have assigned issues$/ do
project1 = Factory :project, project = Factory :project
:path => "project1", project.add_access(@user, :read, :write)
:code => "TEST1"
project2 = Factory :project,
:path => "project2",
:code => "TEST2"
project1.add_access(@user, :read, :write)
project2.add_access(@user, :read, :write)
issue1 = Factory :issue, issue1 = Factory :issue,
:author => @user, :author => @user,
:assignee => @user, :assignee => @user,
:project => project1 :project => project
issue2 = Factory :issue, issue2 = Factory :issue,
:author => @user, :author => @user,
:assignee => @user, :assignee => @user,
:project => project2 :project => project
end end
Given /^I have authored merge requests$/ do Given /^I have authored merge requests$/ do
project1 = Factory :project, project1 = Factory :project,
:path => "project1", :path => "gitlabhq_1",
:code => "TEST1" :code => "gitlabhq_1"
project2 = Factory :project, project2 = Factory :project,
:path => "project2", :path => "gitlabhq_2",
:code => "TEST2" :code => "gitlabhq_2"
project1.add_access(@user, :read, :write) project1.add_access(@user, :read, :write)
project2.add_access(@user, :read, :write) project2.add_access(@user, :read, :write)
......
...@@ -33,6 +33,25 @@ Given /^I visit issue page "(.*?)"$/ do |arg1| ...@@ -33,6 +33,25 @@ Given /^I visit issue page "(.*?)"$/ do |arg1|
end end
Given /^I submit new issue "(.*?)"$/ do |arg1| Given /^I submit new issue "(.*?)"$/ do |arg1|
fill_in "issue_title", :with => arg1 fill_in "issue_title", with: arg1
click_button "Submit new issue" click_button "Submit new issue"
end end
Given /^project "(.*?)" have issues tags:$/ do |arg1, table|
project = Project.find_by_name(arg1)
table.hashes.each do |hash|
Factory :issue,
project: project,
label_list: [hash[:name]]
end
end
Given /^I visit project "(.*?)" labels page$/ do |arg1|
visit project_labels_path(Project.find_by_name(arg1))
end
Then /^I should see label "(.*?)"$/ do |arg1|
within ".labels-table" do
page.should have_content arg1
end
end
...@@ -57,6 +57,11 @@ end ...@@ -57,6 +57,11 @@ end
Given /^I visit project "(.*?)" network page$/ do |arg1| Given /^I visit project "(.*?)" network page$/ do |arg1|
project = Project.find_by_name(arg1) project = Project.find_by_name(arg1)
# Stub out find_all to speed this up (10 commits vs. 650)
commits = Grit::Commit.find_all(project.repo, nil, {max_count: 10})
Grit::Commit.stub(:find_all).and_return(commits)
visit graph_project_path(project) visit graph_project_path(project)
end end
...@@ -67,8 +72,8 @@ end ...@@ -67,8 +72,8 @@ end
Given /^page should have network graph$/ do Given /^page should have network graph$/ do
page.should have_content "Project Network Graph" page.should have_content "Project Network Graph"
within ".graph" do within ".graph" do
page.should have_content "stable" page.should have_content "master"
page.should have_content "notes_refacto..." page.should have_content "scss_refactor..."
end end
end end
......
require 'simplecov' unless ENV['CI']
SimpleCov.start 'rails' require 'simplecov'
SimpleCov.start 'rails'
end
require 'cucumber/rails' require 'cucumber/rails'
require 'webmock/cucumber' require 'webmock/cucumber'
...@@ -39,3 +41,10 @@ rescue NameError ...@@ -39,3 +41,10 @@ rescue NameError
end end
Cucumber::Rails::Database.javascript_strategy = :truncation Cucumber::Rails::Database.javascript_strategy = :truncation
require 'headless'
headless = Headless.new
headless.start
require 'cucumber/rspec/doubles'
module Color
extend self
def colorize(text, color_code)
"\033[#{color_code}#{text}\033[0m"
end
def red(text)
colorize(text, "31m")
end
def green(text)
colorize(text, "32m")
end
def yellow(text)
colorize(text, "93m")
end
def command(string)
`#{string}`
if $?.to_i > 0
puts red " == #{string} - FAIL"
puts red " == Error during configure"
exit
else
puts green " == #{string} - OK"
end
end
end
require "grit"
module Gitlab
class GraphCommit
attr_accessor :time, :space
attr_accessor :refs
def self.to_graph(project)
@repo = project.repo
commits = Grit::Commit.find_all(@repo, nil, {max_count: 650})
ref_cache = {}
commits.map! {|c| GraphCommit.new(Commit.new(c))}
commits.each { |commit| commit.add_refs(ref_cache, @repo) }
days = GraphCommit.index_commits(commits)
@days_json = days.compact.collect{|d| [d.day, d.strftime("%b")] }.to_json
@commits_json = commits.map(&:to_graph_hash).to_json
return @days_json, @commits_json
end
# Method is adding time and space on the
# list of commits. As well as returns date list
# corelated with time set on commits.
#
# @param [Array<GraphCommit>] comits to index
#
# @return [Array<TimeDate>] list of commit dates corelated with time on commits
def self.index_commits(commits)
days, heads = [], []
map = {}
commits.reverse.each_with_index do |c,i|
c.time = i
days[i] = c.committed_date
map[c.id] = c
heads += c.refs unless c.refs.nil?
end
heads.select!{|h| h.is_a? Grit::Head or h.is_a? Grit::Remote}
# sort heads so the master is top and current branches are closer
heads.sort! do |a,b|
if a.name == "master"
-1
elsif b.name == "master"
1
else
b.commit.committed_date <=> a.commit.committed_date
end
end
@_reserved = {}
days.each_index do |i|
@_reserved[i] = []
end
heads.each do |h|
if map.include? h.commit.id then
place_chain(map[h.commit.id], map)
end
end
days
end
# Add space mark on commit and its parents
#
# @param [GraphCommit] the commit object.
# @param [Hash<String,GraphCommit>] map of commits
def self.place_chain(commit, map, parent_time = nil)
leaves = take_left_leaves(commit, map)
if leaves.empty? then
return
end
space = find_free_space(leaves.last.time..leaves.first.time)
leaves.each{|l| l.space = space}
# and mark it as reserved
min_time = leaves.last.time
parents = leaves.last.parents.collect
parents.each do |p|
if map.include? p.id then
parent = map[p.id]
if parent.time < min_time then
min_time = parent.time
end
end
end
if parent_time.nil? then
max_time = leaves.first.time
else
max_time = parent_time - 1
end
mark_reserved(min_time..max_time, space)
# Visit branching chains
leaves.each do |l|
parents = l.parents.collect
.select{|p| map.include? p.id and map[p.id].space == 0}
for p in parents
place_chain(map[p.id], map, l.time)
end
end
end
def self.mark_reserved(time_range, space)
for day in time_range
@_reserved[day].push(space)
end
end
def self.find_free_space(time_range)
reserved = []
for day in time_range
reserved += @_reserved[day]
end
space = 1
while reserved.include? space do
space += 1
end
space
end
# Takes most left subtree branch of commits
# which don't have space mark yet.
#
# @param [GraphCommit] the commit object.
# @param [Hash<String,GraphCommit>] map of commits
#
# @return [Array<GraphCommit>] list of branch commits
def self.take_left_leaves(commit, map)
leaves = []
leaves.push(commit) if commit.space == 0
while true
parent = commit.parents.collect
.select{|p| map.include? p.id and map[p.id].space == 0}
if parent.count == 0 then
return leaves
else
commit = map[parent.first.id]
leaves.push(commit)
end
end
end
def initialize(commit)
@_commit = commit
@time = -1
@space = 0
end
def method_missing(m, *args, &block)
@_commit.send(m, *args, &block)
end
def to_graph_hash
h = {}
h[:parents] = self.parents.collect do |p|
[p.id,0,0]
end
h[:author] = Gitlab::Encode.utf8(author.name)
h[:time] = time
h[:space] = space
h[:refs] = refs.collect{|r|r.name}.join(" ") unless refs.nil?
h[:id] = sha
h[:date] = date
h[:message] = Gitlab::Encode.utf8(message)
h[:login] = author.email
h
end
def add_refs(ref_cache, repo)
if ref_cache.empty?
repo.refs.each do |ref|
ref_cache[ref.commit.id] ||= []
ref_cache[ref.commit.id] << ref
end
end
@refs = ref_cache[@_commit.id] if ref_cache.include?(@_commit.id)
@refs ||= []
end
end
end
module Gitlab module Gitlab
# Custom parsing for Gitlab-flavored Markdown # Custom parser for Gitlab-flavored Markdown
#
# It replaces references in the text with links to the appropriate items in Gitlab.
#
# Supported reference formats are:
# * @foo for team members
# * #123 for issues
# * !123 for merge requests
# * $123 for snippets
# * 123456 for commits
# #
# Examples # Examples
# #
...@@ -67,25 +76,25 @@ module Gitlab ...@@ -67,25 +76,25 @@ module Gitlab
def reference_user(identifier) def reference_user(identifier)
if user = @project.users.where(name: identifier).first if user = @project.users.where(name: identifier).first
member = @project.users_projects.where(user_id: user).first member = @project.users_projects.where(user_id: user).first
link_to("@#{user.name}", project_team_member_path(@project, member), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if member link_to("@#{identifier}", project_team_member_path(@project, member), html_options.merge(class: "gfm gfm-team_member #{html_options[:class]}")) if member
end end
end end
def reference_issue(identifier) def reference_issue(identifier)
if issue = @project.issues.where(id: identifier).first if issue = @project.issues.where(id: identifier).first
link_to("##{issue.id}", project_issue_path(@project, issue), html_options.merge(title: "Issue: #{issue.title}", class: "gfm gfm-issue #{html_options[:class]}")) link_to("##{identifier}", project_issue_path(@project, issue), html_options.merge(title: "Issue: #{issue.title}", class: "gfm gfm-issue #{html_options[:class]}"))
end end
end end
def reference_merge_request(identifier) def reference_merge_request(identifier)
if merge_request = @project.merge_requests.where(id: identifier).first if merge_request = @project.merge_requests.where(id: identifier).first
link_to("!#{merge_request.id}", project_merge_request_path(@project, merge_request), html_options.merge(title: "Merge Request: #{merge_request.title}", class: "gfm gfm-merge_request #{html_options[:class]}")) link_to("!#{identifier}", project_merge_request_path(@project, merge_request), html_options.merge(title: "Merge Request: #{merge_request.title}", class: "gfm gfm-merge_request #{html_options[:class]}"))
end end
end end
def reference_snippet(identifier) def reference_snippet(identifier)
if snippet = @project.snippets.where(id: identifier).first if snippet = @project.snippets.where(id: identifier).first
link_to("$#{snippet.id}", project_snippet_path(@project, snippet), html_options.merge(title: "Snippet: #{snippet.title}", class: "gfm gfm-snippet #{html_options[:class]}")) link_to("$#{identifier}", project_snippet_path(@project, snippet), html_options.merge(title: "Snippet: #{snippet.title}", class: "gfm gfm-snippet #{html_options[:class]}"))
end end
end end
......
require "grit"
class GraphCommit
attr_accessor :time, :space
attr_accessor :refs
def self.to_graph(project)
@repo = project.repo
commits = Grit::Commit.find_all(@repo, nil, {max_count: 650})
ref_cache = {}
commits.map! {|c| GraphCommit.new(Commit.new(c))}
commits.each { |commit| commit.add_refs(ref_cache, @repo) }
days = GraphCommit.index_commits(commits)
@days_json = days.compact.collect{|d| [d.day, d.strftime("%b")] }.to_json
@commits_json = commits.map(&:to_graph_hash).to_json
return @days_json, @commits_json
end
# Method is adding time and space on the
# list of commits. As well as returns date list
# corelated with time set on commits.
#
# @param [Array<GraphCommit>] comits to index
#
# @return [Array<TimeDate>] list of commit dates corelated with time on commits
def self.index_commits(commits)
days, heads = [], []
map = {}
commits.reverse.each_with_index do |c,i|
c.time = i
days[i] = c.committed_date
map[c.id] = c
heads += c.refs unless c.refs.nil?
end
heads.select!{|h| h.is_a? Grit::Head or h.is_a? Grit::Remote}
# sort heads so the master is top and current branches are closer
heads.sort! do |a,b|
if a.name == "master"
-1
elsif b.name == "master"
1
else
b.commit.committed_date <=> a.commit.committed_date
end
end
@_reserved = {}
days.each_index do |i|
@_reserved[i] = []
end
heads.each do |h|
if map.include? h.commit.id then
place_chain(map[h.commit.id], map)
end
end
days
end
# Add space mark on commit and its parents
#
# @param [GraphCommit] the commit object.
# @param [Hash<String,GraphCommit>] map of commits
def self.place_chain(commit, map, parent_time = nil)
leaves = take_left_leaves(commit, map)
if leaves.empty? then
return
end
space = find_free_space(leaves.last.time..leaves.first.time)
leaves.each{|l| l.space = space}
# and mark it as reserved
min_time = leaves.last.time
parents = leaves.last.parents.collect
parents.each do |p|
if map.include? p.id then
parent = map[p.id]
if parent.time < min_time then
min_time = parent.time
end
end
end
if parent_time.nil? then
max_time = leaves.first.time
else
max_time = parent_time - 1
end
mark_reserved(min_time..max_time, space)
# Visit branching chains
leaves.each do |l|
parents = l.parents.collect
.select{|p| map.include? p.id and map[p.id].space == 0}
for p in parents
place_chain(map[p.id], map, l.time)
end
end
end
def self.mark_reserved(time_range, space)
for day in time_range
@_reserved[day].push(space)
end
end
def self.find_free_space(time_range)
reserved = []
for day in time_range
reserved += @_reserved[day]
end
space = 1
while reserved.include? space do
space += 1
end
space
end
# Takes most left subtree branch of commits
# which don't have space mark yet.
#
# @param [GraphCommit] the commit object.
# @param [Hash<String,GraphCommit>] map of commits
#
# @return [Array<GraphCommit>] list of branch commits
def self.take_left_leaves(commit, map)
leaves = []
leaves.push(commit) if commit.space == 0
while true
parent = commit.parents.collect
.select{|p| map.include? p.id and map[p.id].space == 0}
if parent.count == 0 then
return leaves
else
commit = map[parent.first.id]
leaves.push(commit)
end
end
end
def initialize(commit)
@_commit = commit
@time = -1
@space = 0
end
def method_missing(m, *args, &block)
@_commit.send(m, *args, &block)
end
def to_graph_hash
h = {}
h[:parents] = self.parents.collect do |p|
[p.id,0,0]
end
h[:author] = Gitlab::Encode.utf8(author.name)
h[:time] = time
h[:space] = space
h[:refs] = refs.collect{|r|r.name}.join(" ") unless refs.nil?
h[:id] = sha
h[:date] = date
h[:message] = Gitlab::Encode.utf8(message)
h[:login] = author.email
h
end
def add_refs(ref_cache, repo)
if ref_cache.empty?
repo.refs.each do |ref|
ref_cache[ref.commit.id] ||= []
ref_cache[ref.commit.id] << ref
end
end
@refs = ref_cache[@_commit.id] if ref_cache.include?(@_commit.id)
@refs ||= []
end
end
namespace :dev do
desc "Prepare for development (run dev_user.sh first)"
task :repos => :environment do
key = `sudo -u gitlabdev -H cat /home/gitlabdev/.ssh/id_rsa.pub`
raise "\n *** Run ./lib/tasks/dev/user.sh first *** \n" if key.empty?
Key.create(:user_id => User.first, :key => key, :title => "gitlabdev")
puts "\n *** Clone diaspora from github"
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev; git clone git://github.com/diaspora/diaspora.git /home/gitlabdev/diaspora"`
puts "\n *** Push diaspora source to gitlab"
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev/diaspora; git remote add local git@localhost:diaspora.git; git push local master; git push local --tags; git checkout -b api origin/api; git push local api; git checkout -b heroku origin/heroku; git push local heroku"`
puts "\n *** Clone rails from github"
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev; git clone git://github.com/rails/rails.git /home/gitlabdev/rails"`
puts "\n *** Push rails source to gitlab"
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev/rails; git remote add local git@localhost:ruby_on_rails.git; git push local master; git push local --tags"`
puts "\n *** Clone rubinius from github"
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev; git clone git://github.com/rubinius/rubinius.git /home/gitlabdev/rubinius"`
puts "\n *** Push rubinius source to gitlab"
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev/rubinius; git remote add local git@localhost:rubinius.git; git push local master; git push local --tags"`
end
end
namespace :dev do
desc "DEV | Run cucumber and rspec"
task :tests do
["cucumber", "rspec spec"].each do |cmd|
puts "Starting to run #{cmd}..."
system("bundle exec #{cmd}")
raise "#{cmd} failed!" unless $?.exitstatus == 0
end
end
end
sudo adduser \
--gecos 'gitlab dev user' \
--disabled-password \
--home /home/gitlabdev \
gitlabdev
sudo -i -u gitlabdev -H sh -c "ssh-keygen -t rsa"
namespace :gitlab do namespace :gitlab do
namespace :app do namespace :app do
desc "GITLAB | Setup production application" desc "GITLAB | Setup production application"
task :setup => ['db:setup', 'db:seed_fu', 'gitlab:app:enable_automerge'] task :setup => [
'db:setup',
'db:seed_fu',
'gitlab:app:enable_automerge'
]
end end
end end
...@@ -56,6 +56,20 @@ namespace :gitlab do ...@@ -56,6 +56,20 @@ namespace :gitlab do
return return
end end
gitolite_hooks_path = File.join("/home", Gitlab.config.ssh_user, "share", "gitolite", "hooks", "common")
gitlab_hook_files = ['post-receive']
gitlab_hook_files.each do |file_name|
dest = File.join(gitolite_hooks_path, file_name)
print "#{dest} exists? ............"
if File.exists?(dest)
puts "YES".green
else
puts "NO".red
return
end
end
if Project.count > 0 if Project.count > 0
puts "Validating projects repositories:".yellow puts "Validating projects repositories:".yellow
Project.find_each(:batch_size => 100) do |project| Project.find_each(:batch_size => 100) do |project|
...@@ -67,12 +81,6 @@ namespace :gitlab do ...@@ -67,12 +81,6 @@ namespace :gitlab do
next next
end end
unless File.owned?(hook_file)
puts "post-receive file is not owner by gitlab".red
next
end
puts "post-reveice file ok".green puts "post-reveice file ok".green
end end
end end
......
namespace :gitlab do
namespace :gitolite do
desc "GITLAB | Rewrite hooks for repos"
task :update_hooks => :environment do
puts "Starting Projects"
Project.find_each(:batch_size => 100) do |project|
begin
if project.commit
project.write_hooks
print ".".green
end
rescue Exception => e
print e.message.red
end
end
puts "\nDone with projects"
end
end
end
namespace :gitlab do
namespace :gitolite do
desc "GITLAB | Write GITLAB hook for gitolite"
task :write_hooks => :environment do
gitolite_hooks_path = File.join("/home", Gitlab.config.ssh_user, "share", "gitolite", "hooks", "common")
gitlab_hooks_path = Rails.root.join("lib", "hooks")
gitlab_hook_files = ['post-receive']
gitlab_hook_files.each do |file_name|
source = File.join(gitlab_hooks_path, file_name)
dest = File.join(gitolite_hooks_path, file_name)
puts "sudo -u root cp #{source} #{dest}".yellow
`sudo -u root cp #{source} #{dest}`
puts "sudo -u root chown git:git #{dest}".yellow
`sudo -u root chown git:git #{dest}`
end
end
end
end
require 'spec_helper'
describe ApplicationHelper do
describe "gravatar_icon" do
let(:user_email) { 'user@email.com' }
it "should return a generic avatar path when Gravatar is disabled" do
Gitlab.config.stub(:disable_gravatar?).and_return(true)
gravatar_icon(user_email).should == 'no_avatar.png'
end
it "should return a generic avatar path when email is blank" do
gravatar_icon('').should == 'no_avatar.png'
end
it "should use SSL when appropriate" do
stub!(:request).and_return(double(:ssl? => true))
gravatar_icon(user_email).should match('https://secure.gravatar.com')
end
it "should accept a custom size" do
stub!(:request).and_return(double(:ssl? => false))
gravatar_icon(user_email, 64).should match(/\?s=64/)
end
end
end
...@@ -24,7 +24,7 @@ describe Notify do ...@@ -24,7 +24,7 @@ describe Notify do
end end
it 'has the correct subject' do it 'has the correct subject' do
should have_subject /Account was created for you/ should have_subject /^gitlab \| Account was created for you$/
end end
it 'contains the new user\'s login name' do it 'contains the new user\'s login name' do
...@@ -60,7 +60,7 @@ describe Notify do ...@@ -60,7 +60,7 @@ describe Notify do
it_behaves_like 'an assignee email' it_behaves_like 'an assignee email'
it 'has the correct subject' do it 'has the correct subject' do
should have_subject /new issue ##{issue.id}/ should have_subject /new issue ##{issue.id} \| #{issue.title} \| #{project.name}/
end end
it 'contains a link to the new issue' do it 'contains a link to the new issue' do
...@@ -76,7 +76,7 @@ describe Notify do ...@@ -76,7 +76,7 @@ describe Notify do
it_behaves_like 'a multiple recipients email' it_behaves_like 'a multiple recipients email'
it 'has the correct subject' do it 'has the correct subject' do
should have_subject /changed issue/ should have_subject /changed issue ##{issue.id} \| #{issue.title}/
end end
it 'contains the name of the previous assignee' do it 'contains the name of the previous assignee' do
......
...@@ -40,7 +40,6 @@ describe Project do ...@@ -40,7 +40,6 @@ describe Project do
it { should respond_to(:commits_with_refs) } it { should respond_to(:commits_with_refs) }
it { should respond_to(:commits_since) } it { should respond_to(:commits_since) }
it { should respond_to(:commits_between) } it { should respond_to(:commits_between) }
it { should respond_to(:write_hooks) }
it { should respond_to(:satellite) } it { should respond_to(:satellite) }
it { should respond_to(:update_repository) } it { should respond_to(:update_repository) }
it { should respond_to(:destroy_repository) } it { should respond_to(:destroy_repository) }
......
...@@ -7,11 +7,11 @@ describe "User Issues Dashboard" do ...@@ -7,11 +7,11 @@ describe "User Issues Dashboard" do
login_as :user login_as :user
@project1 = Factory :project, @project1 = Factory :project,
path: "project1", path: "gitlabhq_0",
code: "TEST1" code: "TEST1"
@project2 = Factory :project, @project2 = Factory :project,
path: "project2", path: "gitlabhq_1",
code: "TEST2" code: "TEST2"
@project1.add_access(@user, :read, :write) @project1.add_access(@user, :read, :write)
......
require 'simplecov' unless ENV['CI']
SimpleCov.start 'rails' require 'simplecov'
SimpleCov.start 'rails'
end
# This file is copied to spec/ when you run 'rails generate rspec:install' # This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test' ENV["RAILS_ENV"] ||= 'test'
...@@ -12,6 +14,7 @@ require 'webmock/rspec' ...@@ -12,6 +14,7 @@ require 'webmock/rspec'
require 'factories' require 'factories'
require 'monkeypatch' require 'monkeypatch'
require 'email_spec' require 'email_spec'
require 'headless'
# Requires supporting ruby files with custom matchers and macros, etc, # Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories. # in spec/support/ and its subdirectories.
...@@ -30,6 +33,11 @@ RSpec.configure do |config| ...@@ -30,6 +33,11 @@ RSpec.configure do |config|
# instead of true. # instead of true.
config.use_transactional_fixtures = false config.use_transactional_fixtures = false
config.before :all do
headless = Headless.new
headless.start
end
config.before :each, type: :integration do config.before :each, type: :integration do
DeviseSessionMock.disable DeviseSessionMock.disable
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
/*
* jQuery UI selectmenu dev version
*
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
* https://github.com/fnagel/jquery-ui/wiki/Selectmenu
*/
(function($) {
$.widget("ui.selectmenu", {
getter: "value",
version: "1.8",
eventPrefix: "selectmenu",
options: {
transferClasses: true,
typeAhead: "sequential",
style: 'dropdown',
positionOptions: {
my: "left top",
at: "left bottom",
offset: null
},
width: null,
menuWidth: null,
handleWidth: 26,
maxHeight: null,
icons: null,
format: null,
bgImage: function() {},
wrapperElement: "<div />"
},
_create: function() {
var self = this, o = this.options;
// set a default id value, generate a new random one if not set by developer
var selectmenuId = this.element.attr( 'id' ) || 'ui-selectmenu-' + Math.random().toString( 16 ).slice( 2, 10 );
// quick array of button and menu id's
this.ids = [ selectmenuId + '-button', selectmenuId + '-menu' ];
// define safe mouseup for future toggling
this._safemouseup = true;
// create menu button wrapper
this.newelement = $( '<a />', {
'class': this.widgetBaseClass + ' ui-widget ui-state-default ui-corner-all',
'id' : this.ids[ 0 ],
'role': 'button',
'href': '#nogo',
'tabindex': this.element.attr( 'disabled' ) ? 1 : 0,
'aria-haspopup': true,
'aria-owns': this.ids[ 1 ]
});
this.newelementWrap = $( o.wrapperElement )
.append( this.newelement )
.insertAfter( this.element );
// transfer tabindex
var tabindex = this.element.attr( 'tabindex' );
if ( tabindex ) {
this.newelement.attr( 'tabindex', tabindex );
}
// save reference to select in data for ease in calling methods
this.newelement.data( 'selectelement', this.element );
// menu icon
this.selectmenuIcon = $( '<span class="' + this.widgetBaseClass + '-icon ui-icon"></span>' )
.prependTo( this.newelement );
// append status span to button
this.newelement.prepend( '<span class="' + self.widgetBaseClass + '-status" />' );
// make associated form label trigger focus
$( 'label[for="' + selectmenuId + '"]' )
.attr( 'for', this.ids[0] )
.bind( 'click.selectmenu', function() {
self.newelement[0].focus();
return false;
});
// click toggle for menu visibility
this.newelement
.bind('mousedown.selectmenu', function(event) {
self._toggle(event, true);
// make sure a click won't open/close instantly
if (o.style == "popup") {
self._safemouseup = false;
setTimeout(function() { self._safemouseup = true; }, 300);
}
return false;
})
.bind('click.selectmenu', function() {
return false;
})
.bind("keydown.selectmenu", function(event) {
var ret = false;
switch (event.keyCode) {
case $.ui.keyCode.ENTER:
ret = true;
break;
case $.ui.keyCode.SPACE:
self._toggle(event);
break;
case $.ui.keyCode.UP:
if (event.altKey) {
self.open(event);
} else {
self._moveSelection(-1);
}
break;
case $.ui.keyCode.DOWN:
if (event.altKey) {
self.open(event);
} else {
self._moveSelection(1);
}
break;
case $.ui.keyCode.LEFT:
self._moveSelection(-1);
break;
case $.ui.keyCode.RIGHT:
self._moveSelection(1);
break;
case $.ui.keyCode.TAB:
ret = true;
break;
default:
ret = true;
}
return ret;
})
.bind('keypress.selectmenu', function(event) {
self._typeAhead(event.which, 'mouseup');
return true;
})
.bind('mouseover.selectmenu focus.selectmenu', function() {
if (!o.disabled) {
$(this).addClass(self.widgetBaseClass + '-focus ui-state-hover');
}
})
.bind('mouseout.selectmenu blur.selectmenu', function() {
if (!o.disabled) {
$(this).removeClass(self.widgetBaseClass + '-focus ui-state-hover');
}
});
// document click closes menu
$(document).bind("mousedown.selectmenu", function(event) {
self.close(event);
});
// change event on original selectmenu
this.element
.bind("click.selectmenu", function() {
self._refreshValue();
})
// FIXME: newelement can be null under unclear circumstances in IE8
// TODO not sure if this is still a problem (fnagel 20.03.11)
.bind("focus.selectmenu", function() {
if (self.newelement) {
self.newelement[0].focus();
}
});
// set width when not set via options
if (!o.width) {
o.width = this.element.outerWidth();
}
// set menu button width
this.newelement.width(o.width);
// hide original selectmenu element
this.element.hide();
// create menu portion, append to body
this.list = $( '<ul />', {
'class': 'ui-widget ui-widget-content',
'aria-hidden': true,
'role': 'listbox',
'aria-labelledby': this.ids[0],
'id': this.ids[1]
});
this.listWrap = $( o.wrapperElement )
.addClass( self.widgetBaseClass + '-menu' )
.append( this.list )
.appendTo( 'body' );
// transfer menu click to menu button
this.list
.bind("keydown.selectmenu", function(event) {
var ret = false;
switch (event.keyCode) {
case $.ui.keyCode.UP:
if (event.altKey) {
self.close(event, true);
} else {
self._moveFocus(-1);
}
break;
case $.ui.keyCode.DOWN:
if (event.altKey) {
self.close(event, true);
} else {
self._moveFocus(1);
}
break;
case $.ui.keyCode.LEFT:
self._moveFocus(-1);
break;
case $.ui.keyCode.RIGHT:
self._moveFocus(1);
break;
case $.ui.keyCode.HOME:
self._moveFocus(':first');
break;
case $.ui.keyCode.PAGE_UP:
self._scrollPage('up');
break;
case $.ui.keyCode.PAGE_DOWN:
self._scrollPage('down');
break;
case $.ui.keyCode.END:
self._moveFocus(':last');
break;
case $.ui.keyCode.ENTER:
case $.ui.keyCode.SPACE:
self.close(event, true);
$(event.target).parents('li:eq(0)').trigger('mouseup');
break;
case $.ui.keyCode.TAB:
ret = true;
self.close(event, true);
$(event.target).parents('li:eq(0)').trigger('mouseup');
break;
case $.ui.keyCode.ESCAPE:
self.close(event, true);
break;
default:
ret = true;
}
return ret;
})
.bind('keypress.selectmenu', function(event) {
self._typeAhead(event.which, 'focus');
return true;
})
// this allows for using the scrollbar in an overflowed list
.bind( 'mousedown.selectmenu mouseup.selectmenu', function() { return false; });
// needed when window is resized
// TODO seems to be useless, but causes errors (fnagel 01.08.11)
// see: https://github.com/fnagel/jquery-ui/issues/147
// $(window).bind( "resize.selectmenu", $.proxy( self._refreshPosition, this ) );
},
_init: function() {
var self = this, o = this.options;
// serialize selectmenu element options
var selectOptionData = [];
this.element
.find('option')
.each(function() {
var opt = $(this);
selectOptionData.push({
value: opt.attr('value'),
text: self._formatText(opt.text()),
selected: opt.attr('selected'),
disabled: opt.attr('disabled'),
classes: opt.attr('class'),
typeahead: opt.attr('typeahead'),
parentOptGroup: opt.parent('optgroup'),
bgImage: o.bgImage.call(opt)
});
});
// active state class is only used in popup style
var activeClass = (self.options.style == "popup") ? " ui-state-active" : "";
// empty list so we can refresh the selectmenu via selectmenu()
this.list.html("");
// write li's
if (selectOptionData.length) {
for (var i = 0; i < selectOptionData.length; i++) {
var thisLiAttr = { role : 'presentation' };
if ( selectOptionData[ i ].disabled ) {
thisLiAttr[ 'class' ] = this.namespace + '-state-disabled';
}
var thisAAttr = {
html: selectOptionData[i].text,
href : '#nogo',
tabindex : -1,
role : 'option',
'aria-selected' : false
};
if ( selectOptionData[ i ].disabled ) {
thisAAttr[ 'aria-disabled' ] = selectOptionData[ i ].disabled;
}
if ( selectOptionData[ i ].typeahead ) {
thisAAttr[ 'typeahead' ] = selectOptionData[ i ].typeahead;
}
var thisA = $('<a/>', thisAAttr);
var thisLi = $('<li/>', thisLiAttr)
.append(thisA)
.data('index', i)
.addClass(selectOptionData[i].classes)
.data('optionClasses', selectOptionData[i].classes || '')
.bind("mouseup.selectmenu", function(event) {
if (self._safemouseup && !self._disabled(event.currentTarget) && !self._disabled($( event.currentTarget ).parents( "ul>li." + self.widgetBaseClass + "-group " )) ) {
var changed = $(this).data('index') != self._selectedIndex();
self.index($(this).data('index'));
self.select(event);
if (changed) {
self.change(event);
}
self.close(event, true);
}
return false;
})
.bind("click.selectmenu", function() {
return false;
})
.bind('mouseover.selectmenu focus.selectmenu', function(e) {
// no hover if diabled
if (!$(e.currentTarget).hasClass(self.namespace + '-state-disabled') && !$(e.currentTarget).parent("ul").parent("li").hasClass(self.namespace + '-state-disabled')) {
self._selectedOptionLi().addClass(activeClass);
self._focusedOptionLi().removeClass(self.widgetBaseClass + '-item-focus ui-state-hover');
$(this).removeClass('ui-state-active').addClass(self.widgetBaseClass + '-item-focus ui-state-hover');
}
})
.bind('mouseout.selectmenu blur.selectmenu', function() {
if ($(this).is(self._selectedOptionLi().selector)) {
$(this).addClass(activeClass);
}
$(this).removeClass(self.widgetBaseClass + '-item-focus ui-state-hover');
});
// optgroup or not...
if ( selectOptionData[i].parentOptGroup.length ) {
var optGroupName = self.widgetBaseClass + '-group-' + this.element.find( 'optgroup' ).index( selectOptionData[i].parentOptGroup );
if (this.list.find( 'li.' + optGroupName ).length ) {
this.list.find( 'li.' + optGroupName + ':last ul' ).append( thisLi );
} else {
$(' <li role="presentation" class="' + self.widgetBaseClass + '-group ' + optGroupName + (selectOptionData[i].parentOptGroup.attr("disabled") ? ' ' + this.namespace + '-state-disabled" aria-disabled="true"' : '"' ) + '><span class="' + self.widgetBaseClass + '-group-label">' + selectOptionData[i].parentOptGroup.attr('label') + '</span><ul></ul></li> ')
.appendTo( this.list )
.find( 'ul' )
.append( thisLi );
}
} else {
thisLi.appendTo(this.list);
}
// append icon if option is specified
if (o.icons) {
for (var j in o.icons) {
if (thisLi.is(o.icons[j].find)) {
thisLi
.data('optionClasses', selectOptionData[i].classes + ' ' + self.widgetBaseClass + '-hasIcon')
.addClass(self.widgetBaseClass + '-hasIcon');
var iconClass = o.icons[j].icon || "";
thisLi
.find('a:eq(0)')
.prepend('<span class="' + self.widgetBaseClass + '-item-icon ui-icon ' + iconClass + '"></span>');
if (selectOptionData[i].bgImage) {
thisLi.find('span').css('background-image', selectOptionData[i].bgImage);
}
}
}
}
}
} else {
$('<li role="presentation"><a href="#nogo" tabindex="-1" role="option"></a></li>').appendTo(this.list);
}
// we need to set and unset the CSS classes for dropdown and popup style
var isDropDown = ( o.style == 'dropdown' );
this.newelement
.toggleClass( self.widgetBaseClass + '-dropdown', isDropDown )
.toggleClass( self.widgetBaseClass + '-popup', !isDropDown );
this.list
.toggleClass( self.widgetBaseClass + '-menu-dropdown ui-corner-bottom', isDropDown )
.toggleClass( self.widgetBaseClass + '-menu-popup ui-corner-all', !isDropDown )
// add corners to top and bottom menu items
.find( 'li:first' )
.toggleClass( 'ui-corner-top', !isDropDown )
.end().find( 'li:last' )
.addClass( 'ui-corner-bottom' );
this.selectmenuIcon
.toggleClass( 'ui-icon-triangle-1-s', isDropDown )
.toggleClass( 'ui-icon-triangle-2-n-s', !isDropDown );
// transfer classes to selectmenu and list
if ( o.transferClasses ) {
var transferClasses = this.element.attr( 'class' ) || '';
this.newelement.add( this.list ).addClass( transferClasses );
}
// set menu width to either menuWidth option value, width option value, or select width
if ( o.style == 'dropdown' ) {
this.list.width( o.menuWidth ? o.menuWidth : o.width );
} else {
this.list.width( o.menuWidth ? o.menuWidth : o.width - o.handleWidth );
}
// reset height to auto
this.list.css( 'height', 'auto' );
var listH = this.listWrap.height();
// calculate default max height
if ( o.maxHeight && o.maxHeight < listH ) {
this.list.height( o.maxHeight );
} else {
var winH = $( window ).height() / 3;
if ( winH < listH ) this.list.height( winH );
}
// save reference to actionable li's (not group label li's)
this._optionLis = this.list.find( 'li:not(.' + self.widgetBaseClass + '-group)' );
// transfer disabled state
if ( this.element.attr( 'disabled' ) ) {
this.disable();
} else {
this.enable()
}
// update value
this.index( this._selectedIndex() );
// needed when selectmenu is placed at the very bottom / top of the page
window.setTimeout( function() {
self._refreshPosition();
}, 200 );
},
destroy: function() {
this.element.removeData( this.widgetName )
.removeClass( this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled' )
.removeAttr( 'aria-disabled' )
.unbind( ".selectmenu" );
// TODO unneded as event binding has been disabled
// $( window ).unbind( ".selectmenu" );
$( document ).unbind( ".selectmenu" );
// unbind click on label, reset its for attr
$( 'label[for=' + this.newelement.attr('id') + ']' )
.attr( 'for', this.element.attr( 'id' ) )
.unbind( '.selectmenu' );
this.newelementWrap.remove();
this.listWrap.remove();
this.element.show();
// call widget destroy function
$.Widget.prototype.destroy.apply(this, arguments);
},
_typeAhead: function( code, eventType ){
var self = this, focusFound = false, C = String.fromCharCode(code).toUpperCase();
c = C.toLowerCase();
if ( self.options.typeAhead == 'sequential' ) {
// clear the timeout so we can use _prevChar
window.clearTimeout('ui.selectmenu-' + self.selectmenuId);
// define our find var
var find = typeof( self._prevChar ) == 'undefined' ? '' : self._prevChar.join( '' );
function focusOptSeq( elem, ind, c ){
focusFound = true;
$( elem ).trigger( eventType );
typeof( self._prevChar ) == 'undefined' ? self._prevChar = [ c ] : self._prevChar[ self._prevChar.length ] = c;
}
this.list.find( 'li a' ).each( function( i ) {
if ( !focusFound ) {
// allow the typeahead attribute on the option tag for a more specific lookup
var thisText = $( this ).attr( 'typeahead' ) || $(this).text();
if ( thisText.indexOf( find + C ) === 0 ) {
focusOptSeq( this, i, C );
} else if (thisText.indexOf(find+c) === 0 ) {
focusOptSeq( this, i, c );
}
}
});
// set a 1 second timeout for sequenctial typeahead
// keep this set even if we have no matches so it doesnt typeahead somewhere else
window.setTimeout( function( el ) {
self._prevChar = undefined;
}, 1000, self );
} else {
// define self._prevChar if needed
if ( !self._prevChar ) { self._prevChar = [ '' , 0 ]; }
focusFound = false;
function focusOpt( elem, ind ){
focusFound = true;
$( elem ).trigger( eventType );
self._prevChar[ 1 ] = ind;
}
this.list.find( 'li a' ).each(function( i ){
if (!focusFound){
var thisText = $(this).text();
if ( thisText.indexOf( C ) === 0 || thisText.indexOf( c ) === 0 ) {
if (self._prevChar[0] == C){
if ( self._prevChar[ 1 ] < i ){ focusOpt( this, i ); }
} else{
focusOpt( this, i );
}
}
}
});
this._prevChar[ 0 ] = C;
}
},
// returns some usefull information, called by callbacks only
_uiHash: function() {
var index = this.index();
return {
index: index,
option: $("option", this.element).get(index),
value: this.element[0].value
};
},
open: function(event) {
var self = this, o = this.options;
if ( self.newelement.attr("aria-disabled") != 'true' ) {
self._closeOthers(event);
self.newelement.addClass('ui-state-active');
self.listWrap.appendTo( o.appendTo );
self.list.attr('aria-hidden', false);
if ( o.style == "dropdown" ) {
self.newelement.removeClass('ui-corner-all').addClass('ui-corner-top');
}
self.listWrap.addClass( self.widgetBaseClass + '-open' );
// positioning needed for IE7 (tested 01.08.11 on MS VPC Image)
// see https://github.com/fnagel/jquery-ui/issues/147
if ( $.browser.msie && $.browser.version.substr( 0,1 ) == 7 ) {
self._refreshPosition();
}
var selected = self.list.attr('aria-hidden', false).find('li:not(.' + self.widgetBaseClass + '-group):eq(' + self._selectedIndex() + '):visible a');
if (selected.length) selected[0].focus();
// positioning needed for FF, Chrome, IE8, IE7, IE6 (tested 01.08.11 on MS VPC Image)
self._refreshPosition();
self._trigger("open", event, self._uiHash());
}
},
close: function(event, retainFocus) {
if ( this.newelement.is('.ui-state-active') ) {
this.newelement
.removeClass('ui-state-active');
this.listWrap.removeClass(this.widgetBaseClass + '-open');
this.list.attr('aria-hidden', true);
if ( this.options.style == "dropdown" ) {
this.newelement.removeClass('ui-corner-top').addClass('ui-corner-all');
}
if ( retainFocus ) {
this.newelement.focus();
}
this._trigger("close", event, this._uiHash());
}
},
change: function(event) {
this.element.trigger("change");
this._trigger("change", event, this._uiHash());
},
select: function(event) {
if (this._disabled(event.currentTarget)) { return false; }
this._trigger("select", event, this._uiHash());
},
_closeOthers: function(event) {
$('.' + this.widgetBaseClass + '.ui-state-active').not(this.newelement).each(function() {
$(this).data('selectelement').selectmenu('close', event);
});
$('.' + this.widgetBaseClass + '.ui-state-hover').trigger('mouseout');
},
_toggle: function(event, retainFocus) {
if ( this.list.parent().is('.' + this.widgetBaseClass + '-open') ) {
this.close(event, retainFocus);
} else {
this.open(event);
}
},
_formatText: function(text) {
return (this.options.format ? this.options.format(text) : text);
},
_selectedIndex: function() {
return this.element[0].selectedIndex;
},
_selectedOptionLi: function() {
return this._optionLis.eq(this._selectedIndex());
},
_focusedOptionLi: function() {
return this.list.find('.' + this.widgetBaseClass + '-item-focus');
},
_moveSelection: function(amt, recIndex) {
// do nothing if disabled
if (!this.options.disabled) {
var currIndex = parseInt(this._selectedOptionLi().data('index') || 0, 10);
var newIndex = currIndex + amt;
// do not loop when using up key
if (newIndex < 0) {
newIndex = 0;
}
if (newIndex > this._optionLis.size() - 1) {
newIndex = this._optionLis.size() - 1;
}
// Occurs when a full loop has been made
if (newIndex === recIndex) { return false; }
if (this._optionLis.eq(newIndex).hasClass( this.namespace + '-state-disabled' )) {
// if option at newIndex is disabled, call _moveFocus, incrementing amt by one
(amt > 0) ? ++amt : --amt;
this._moveSelection(amt, newIndex);
} else {
return this._optionLis.eq(newIndex).trigger('mouseup');
}
}
},
_moveFocus: function(amt, recIndex) {
if (!isNaN(amt)) {
var currIndex = parseInt(this._focusedOptionLi().data('index') || 0, 10);
var newIndex = currIndex + amt;
} else {
var newIndex = parseInt(this._optionLis.filter(amt).data('index'), 10);
}
if (newIndex < 0) {
newIndex = 0;
}
if (newIndex > this._optionLis.size() - 1) {
newIndex = this._optionLis.size() - 1;
}
//Occurs when a full loop has been made
if (newIndex === recIndex) { return false; }
var activeID = this.widgetBaseClass + '-item-' + Math.round(Math.random() * 1000);
this._focusedOptionLi().find('a:eq(0)').attr('id', '');
if (this._optionLis.eq(newIndex).hasClass( this.namespace + '-state-disabled' )) {
// if option at newIndex is disabled, call _moveFocus, incrementing amt by one
(amt > 0) ? ++amt : --amt;
this._moveFocus(amt, newIndex);
} else {
this._optionLis.eq(newIndex).find('a:eq(0)').attr('id',activeID).focus();
}
this.list.attr('aria-activedescendant', activeID);
},
_scrollPage: function(direction) {
var numPerPage = Math.floor(this.list.outerHeight() / this.list.find('li:first').outerHeight());
numPerPage = (direction == 'up' ? -numPerPage : numPerPage);
this._moveFocus(numPerPage);
},
_setOption: function(key, value) {
this.options[key] = value;
// set
if (key == 'disabled') {
this.close();
this.element
.add(this.newelement)
.add(this.list)[value ? 'addClass' : 'removeClass'](
this.widgetBaseClass + '-disabled' + ' ' +
this.namespace + '-state-disabled')
.attr("aria-disabled", value);
}
},
disable: function(index, type){
// if options is not provided, call the parents disable function
if ( typeof( index ) == 'undefined' ) {
this._setOption( 'disabled', true );
} else {
if ( type == "optgroup" ) {
this._disableOptgroup(index);
} else {
this._disableOption(index);
}
}
},
enable: function(index, type) {
// if options is not provided, call the parents enable function
if ( typeof( index ) == 'undefined' ) {
this._setOption('disabled', false);
} else {
if ( type == "optgroup" ) {
this._enableOptgroup(index);
} else {
this._enableOption(index);
}
}
},
_disabled: function(elem) {
return $(elem).hasClass( this.namespace + '-state-disabled' );
},
_disableOption: function(index) {
var optionElem = this._optionLis.eq(index);
if (optionElem) {
optionElem.addClass(this.namespace + '-state-disabled')
.find("a").attr("aria-disabled", true);
this.element.find("option").eq(index).attr("disabled", "disabled");
}
},
_enableOption: function(index) {
var optionElem = this._optionLis.eq(index);
if (optionElem) {
optionElem.removeClass( this.namespace + '-state-disabled' )
.find("a").attr("aria-disabled", false);
this.element.find("option").eq(index).removeAttr("disabled");
}
},
_disableOptgroup: function(index) {
var optGroupElem = this.list.find( 'li.' + this.widgetBaseClass + '-group-' + index );
if (optGroupElem) {
optGroupElem.addClass(this.namespace + '-state-disabled')
.attr("aria-disabled", true);
this.element.find("optgroup").eq(index).attr("disabled", "disabled");
}
},
_enableOptgroup: function(index) {
var optGroupElem = this.list.find( 'li.' + this.widgetBaseClass + '-group-' + index );
if (optGroupElem) {
optGroupElem.removeClass(this.namespace + '-state-disabled')
.attr("aria-disabled", false);
this.element.find("optgroup").eq(index).removeAttr("disabled");
}
},
index: function(newValue) {
if (arguments.length) {
if (!this._disabled($(this._optionLis[newValue]))) {
this.element[0].selectedIndex = newValue;
this._refreshValue();
} else {
return false;
}
} else {
return this._selectedIndex();
}
},
value: function(newValue) {
if (arguments.length) {
this.element[0].value = newValue;
this._refreshValue();
} else {
return this.element[0].value;
}
},
_refreshValue: function() {
var activeClass = (this.options.style == "popup") ? " ui-state-active" : "";
var activeID = this.widgetBaseClass + '-item-' + Math.round(Math.random() * 1000);
// deselect previous
this.list
.find('.' + this.widgetBaseClass + '-item-selected')
.removeClass(this.widgetBaseClass + "-item-selected" + activeClass)
.find('a')
.attr('aria-selected', 'false')
.attr('id', '');
// select new
this._selectedOptionLi()
.addClass(this.widgetBaseClass + "-item-selected" + activeClass)
.find('a')
.attr('aria-selected', 'true')
.attr('id', activeID);
// toggle any class brought in from option
var currentOptionClasses = (this.newelement.data('optionClasses') ? this.newelement.data('optionClasses') : "");
var newOptionClasses = (this._selectedOptionLi().data('optionClasses') ? this._selectedOptionLi().data('optionClasses') : "");
this.newelement
.removeClass(currentOptionClasses)
.data('optionClasses', newOptionClasses)
.addClass( newOptionClasses )
.find('.' + this.widgetBaseClass + '-status')
.html(
this._selectedOptionLi()
.find('a:eq(0)')
.html()
);
this.list.attr('aria-activedescendant', activeID);
},
_refreshPosition: function() {
var o = this.options;
// if its a native pop-up we need to calculate the position of the selected li
if ( o.style == "popup" && !o.positionOptions.offset ) {
var selected = this._selectedOptionLi();
var _offset = "0 -" + ( selected.outerHeight() + selected.offset().top - this.list.offset().top );
}
// update zIndex if jQuery UI is able to process
var zIndexElement = this.element.zIndex();
if ( zIndexElement ) {
this.listWrap.css( 'zIndex', zIndexElement );
}
this.listWrap.position({
// set options for position plugin
of: o.positionOptions.of || this.newelement,
my: o.positionOptions.my,
at: o.positionOptions.at,
offset: o.positionOptions.offset || _offset,
collision: o.positionOptions.collision || 'flip'
});
}
});
})(jQuery);
/* 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; }
/*
* jQuery UI CSS Framework 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/*
* jQuery UI CSS Framework 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
.ui-widget-content a { color: #4F4F4F; }
.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
.ui-widget-header {
background: #ededed url(bg_fallback.png) 0 0 repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
}
.ui-widget-header a { color: #4F4F4F; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
background: #ededed url(bg_fallback.png) 0 0 repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
outline: none;
color: #1c4257; border: 1px solid #7096ab;
background: #ededed url(bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
.ui-widget :active { outline: none; }
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(ui-icons_222222_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(ui-icons_222222_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(ui-icons_222222_256x240.png); }
.ui-state-default .ui-icon { background-image: url(ui-icons_454545_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(ui-icons_454545_256x240.png); }
.ui-state-active .ui-icon {background-image: url(ui-icons_454545_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(ui-icons_454545_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(icon_sprite.png) -16px 0 no-repeat !important; }
.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background: url(icon_sprite.png) 0 0 no-repeat !important; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
.ui-corner-right { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
/* Overlays */
.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
* jQuery UI Resizable 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute; font-size: 0.1px; z-index: 999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
* jQuery UI Selectable 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Selectable#theming
*/
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
/*
* jQuery UI Accordion 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Accordion#theming
*/
/* IE/Win - Fix animation bug - #4615 */
.ui-accordion { width: 100%; }
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-header, .ui-accordion .ui-accordion-content { -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 12px; font-weight: bold; padding: .5em .5em .5em .7em; }
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }/*
* jQuery UI Autocomplete 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete#theming
*/
.ui-autocomplete {
position: absolute; cursor: default; z-index: 3;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
box-shadow: 0 1px 5px rgba(0,0,0,0.3);
}
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/*
* jQuery UI Menu 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Menu#theming
*/
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
float: left;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
background: #5f83b9;
color: #FFFFFF;
text-shadow: 0px 1px 1px #234386;
border-color: #466086;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
}
/*
* jQuery UI Button 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Button#theming
*/
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; -webkit-user-select: none; -moz-user-select: none; user-select: none; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
button.ui-button-icons-only { width: 3.7em; }
/* button animation properties */
.ui-button {
-webkit-transition: all 250ms ease-in-out;
-moz-transition: all 250ms ease-in-out;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
/*states*/
.ui-button.ui-state-hover {
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
}
.ui-button.ui-state-focus {
outline: none;
color: #1c4257;
border-color: #7096ab;
background: #ededed url(bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255,255,255,0.8) inset;
}
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; font-size: 14px; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button, .ui-widget-content input.ui-button { font-size: 14px; font-weight: bold; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); padding: 0 1em !important; height: 33px; }
/*remove submit button internal padding in Firefox*/
input.ui-button::-moz-focus-inner {
border: 0;
padding: 0;
}
/* fix webkits handling of the box model */
@media screen and (-webkit-min-device-pixel-ratio:0) {
input.ui-button {
height: 31px !important;
}
}
/*button icon element(s) */
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
/*button sets*/
.ui-buttonset { margin-right: 7px; }
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
.ui-buttonset .ui-button.ui-state-active { color: #1c4257; border-color: #7096ab; }
.ui-buttonset .ui-button.ui-state-active {
background: #ededed url(bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
/*
* jQuery UI Dialog 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; }
.ui-dialog {
-webkit-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
-moz-box-shadow: 0 2px 12px rgba(0,0,0,0.6);
box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.ui-dialog .ui-dialog-titlebar { padding: 0.7em 1em 0.6em 1em; position: relative; border: none; border-bottom: 1px solid #979797; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; font-size: 14px; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .8em; top: 55%; width: 16px; margin: -10px 0 0 0; padding: 0; height: 16px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; background: url(icon_sprite.png) 0 -16px no-repeat; }
.ui-dialog .ui-dialog-titlebar-close:hover span { background-position: -16px -16px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; border: 0; }
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/*
* jQuery UI Slider 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Slider#theming
*/
.ui-slider { position: relative; text-align: left; background: #d7d7d7; z-index: 1; }
.ui-slider { -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; box-shadow: 0 1px 2px rgba(0,0,0,0.5) inset; }
.ui-slider .ui-slider-handle { background: url(slider_handles.png) 0px -23px no-repeat; position: absolute; z-index: 2; width: 23px; height: 23px; cursor: default; border: none; outline: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; }
.ui-slider .ui-state-hover, .ui-slider .ui-state-active { background-position: 0 0; }
.ui-slider .ui-slider-range { background: #a3cae0; position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider .ui-slider-range { -moz-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; -webkit-box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; box-shadow: 0 1px 2px rgba(17,35,45,0.6) inset; }
.ui-slider-horizontal { height: 5px; }
.ui-slider-horizontal .ui-slider-handle { top: -8px; margin-left: -13px; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: 5px; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -8px; margin-left: 0; margin-bottom: -13px; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
* jQuery UI Tabs 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Tabs#theming
*/
.ui-tabs { position: relative; zoom: 1; border: 0; background: transparent; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: 0; background: transparent; border-width: 0 0 1px 0; }
.ui-tabs .ui-tabs-nav {
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
}
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; font-size: 12px; font-weight: bold; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; background: #fff; border-color: #B6B6B6; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; outline: none; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0 1px 1px 1px; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-panel { background: #FFF;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
}
.ui-tabs .ui-tabs-hide { display: none !important; }
/*
* jQuery UI Datepicker 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Datepicker#theming
*/
.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
.ui-datepicker {
-moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}
.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(icon_sprite.png) no-repeat; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:both; width:100%; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}/*
* jQuery UI Progressbar 1.8.7
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Progressbar#theming
*/
.ui-progressbar { height: 12px; text-align: left; background: #FFF url(progress_bar.gif) 0 -14px repeat-x; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; background: url(progress_bar.gif) 0 0 repeat-x; }
/* Extra Input Field Styling */
.ui-form textarea, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) {
padding: 3px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
border: 1px solid #cecece;
outline: none;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
box-shadow: 0 1px 3px rgba(0,0,0,0.1) inset, 0 1px 0 rgba(255,255,255,0.2);
-webkit-transition: all 250ms ease-in-out;
-moz-transition: all 250ms ease-in-out;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
.ui-form textarea:hover, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):hover {
border: 1px solid #bdbdbd;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.2);
}
.ui-form textarea:focus, .ui-form input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):focus {
border: 1px solid #95bdd4;
-webkit-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
-moz-box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
box-shadow: 0 2px 3px rgba(161,202,226,0.5) inset, 0 1px 0 rgba(255,255,255,0.2);
}
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