[issue #428] Changes in advisories.
* Added Many2Many relation between advisories and projects. * Added autocompletion to build list's advisory * Bootstrap's JS moved to vendor/
This commit is contained in:
parent
863213767b
commit
ecd4498484
|
@ -4,9 +4,9 @@
|
|||
//= require autocomplete-rails
|
||||
//= require vendor
|
||||
//= require jquery.dataTables_ext
|
||||
//= require lib/lib
|
||||
//= require_tree ./design
|
||||
//= require_tree ./extra
|
||||
//= require_tree ./lib
|
||||
|
||||
//= require underscore
|
||||
//= require backbone
|
||||
|
|
|
@ -2,28 +2,32 @@ Rosa.Views.BuildListAdvisoriesView = Backbone.View.extend({
|
|||
initialize: function() {
|
||||
_.bindAll(this, 'popoverTitle', 'popoverDesc', 'showAdvisory',
|
||||
'changeAdvisoryList', 'showPreview', 'showForm', 'hideAll');
|
||||
$('.chzn-select').chosen();
|
||||
this.$el = $('#advisory_block');
|
||||
this._$form = this.$('#new_advisory_form');
|
||||
this._$preview = this.$('#advisory_preview');
|
||||
this._$type_select = $('#build_list_update_type');
|
||||
this._$selector = this.$('#attach_advisory');
|
||||
this._header_text = this._$preview.children('h3').html();
|
||||
|
||||
this._$selector.on('change', this.showAdvisory);
|
||||
this._$type_select.on('change', this.changeAdvisoryList);
|
||||
},
|
||||
|
||||
changeAdvisoryList: function() {
|
||||
this._$selector.children('.popoverable').hide();
|
||||
this._$selector.children('.popoverable.' + this._$type_select.val()).show();
|
||||
this._$selector.val('no').trigger('change');
|
||||
this.$('.popoverable').hide();
|
||||
this.$('.popoverable.' + this._$type_select.val()).show();
|
||||
this._$selector.val('no').trigger("liszd:updated").trigger('change');
|
||||
},
|
||||
|
||||
popoverTitle: function(el) {
|
||||
return el.val();
|
||||
console.log(el);
|
||||
console.log(el.html());
|
||||
return el.html();
|
||||
},
|
||||
|
||||
popoverDesc: function(el) {
|
||||
return this.collection.get(el.val()).get('popover_desc');
|
||||
return this.collection.get(el.html()).get('popover_desc');
|
||||
},
|
||||
|
||||
showAdvisory: function(el) {
|
||||
|
@ -46,7 +50,7 @@ Rosa.Views.BuildListAdvisoriesView = Backbone.View.extend({
|
|||
}
|
||||
var adv = this.collection.get(id);
|
||||
var prev = this._$preview;
|
||||
prev.children('h3').html(prev.children('h3').html() + ' ' + adv.get('advisory_id'));
|
||||
prev.children('h3').html(this._header_text + ' ' + adv.get('advisory_id'));
|
||||
prev.children('.descr').html(adv.get('description'));
|
||||
prev.children('.refs').html(adv.get('references'));
|
||||
if (!this._$preview.is(':visible')) {
|
||||
|
@ -76,7 +80,7 @@ Rosa.Views.BuildListAdvisoriesView = Backbone.View.extend({
|
|||
var title = this.popoverTitle;
|
||||
var description = this.popoverDesc;
|
||||
this.changeAdvisoryList();
|
||||
this.$('#attach_advisory > .popoverable').popover({
|
||||
this.$('.popoverable').popover({
|
||||
title: function() { return title($(this)); },
|
||||
content: function() { return description($(this)); }
|
||||
});
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
//= require ./jquery.placeholder
|
||||
//= require ./bootstrap-tooltip
|
||||
//= require ./bootstrap-popover
|
|
@ -1080,3 +1080,17 @@ form.mass_build section.left {
|
|||
form.mass_build section.right {
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
.chzn-select {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
.packages_info_container ul {
|
||||
list-style-type: none;
|
||||
padding-left: 25px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.packages_info_container ul.platforms {
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
# -*- encoding : utf-8 -*-
|
||||
require 'pp'
|
||||
class AdvisoriesController < ApplicationController
|
||||
before_filter :authenticate_user!
|
||||
before_filter :find_advisory, :only => [:show]
|
||||
skip_before_filter :authenticate_user! if APP_CONFIG['anonymous_access']
|
||||
load_and_authorize_resource
|
||||
load_resource :find_by => :advisory_id
|
||||
authorize_resource
|
||||
|
||||
def index
|
||||
@advisories = @advisories.paginate(:page => params[:page])
|
||||
@advisories = @advisories.scoped(:include => :projects).paginate(:page => params[:page])
|
||||
end
|
||||
|
||||
def show
|
||||
@packages_info = Hash.new { |h, k| h[k] = {} }
|
||||
@advisory.build_lists.find_in_batches(:include => [:save_to_platform, :packages, :project]) do |batch|
|
||||
batch.each do |build_list|
|
||||
h = { build_list.project => build_list.packages }
|
||||
@packages_info[build_list.save_to_platform].merge!(h) { |pr, old, new| (old + new).compact!.uniq! }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def find_advisory
|
||||
@advisory = Advisory.where(:advisory_id => params[:id]).limit(1).first if params[:id].present?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -70,7 +70,7 @@ class Projects::BuildListsController < Projects::BaseController
|
|||
|
||||
def show
|
||||
@item_groups = @build_list.items.group_by_level
|
||||
@advisories = @build_list.project.advisories
|
||||
@advisories = Advisories.all
|
||||
end
|
||||
|
||||
def update
|
||||
|
@ -177,7 +177,7 @@ class Projects::BuildListsController < Projects::BaseController
|
|||
if params[:attach_advisory].present? and params[:attach_advisory] != 'no' and !@build_list.advisory
|
||||
if params[:attach_advisory] == 'new'
|
||||
# create new advisory
|
||||
if !@build_list.build_advisory(params[:build_list][:advisory]) do |a|
|
||||
unless @build_list.build_advisory(params[:build_list][:advisory]) do |a|
|
||||
a.update_type = @build_list.update_type
|
||||
a.project = @build_list.project
|
||||
a.platforms << @build_list.save_to_platform unless a.platforms.include? @build_list.save_to_platform
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class Advisory < ActiveRecord::Base
|
||||
has_and_belongs_to_many :platforms
|
||||
has_and_belongs_to_many :projects
|
||||
has_many :build_lists
|
||||
belongs_to :project
|
||||
|
||||
validates :description, :update_type, :presence => true
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ class Project < ActiveRecord::Base
|
|||
has_many :collaborators, :through => :relations, :source => :actor, :source_type => 'User'
|
||||
has_many :groups, :through => :relations, :source => :actor, :source_type => 'Group'
|
||||
|
||||
has_many :advisories # should be without :dependent => :destroy
|
||||
has_many :packages, :class_name => "BuildList::Package", :dependent => :destroy
|
||||
has_and_belongs_to_many :advisories # should be without :dependent => :destroy
|
||||
|
||||
validates :name, :uniqueness => {:scope => [:owner_id, :owner_type], :case_sensitive => false}, :presence => true, :format => {:with => /^#{NAME_REGEXP}$/, :message => I18n.t("activerecord.errors.project.uname")}
|
||||
validates :owner, :presence => true
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
.packages_info_container
|
||||
%h3= t('layout.advisories.affected_versions')
|
||||
%ul.platforms
|
||||
- @packages_info.each_pair do |platform, projects|
|
||||
%li
|
||||
%p= raw "#{t('activerecord.models.platform')} #{ link_to platform.name, platform_path(platform) }"
|
||||
%ul
|
||||
- projects.each_pair do |project, packages|
|
||||
%li
|
||||
%p= raw "#{ t('activerecord.models.project') } #{ link_to project.name, project_path(project) }"
|
||||
%ul
|
||||
%li
|
||||
%p= "SRPM:"
|
||||
%ul
|
||||
%li= project.srpm_file_name
|
||||
%li
|
||||
%p= "RPM:"
|
||||
%ul
|
||||
- packages.each do |package|
|
||||
%li= package.fullname
|
|
@ -4,7 +4,10 @@
|
|||
%h3= "#{t("activerecord.models.advisory")} #{@advisory.advisory_id}".html_safe
|
||||
|
||||
.leftlist= "#{t("layout.advisories.project_name")}:".html_safe
|
||||
.rightlist= link_to @advisory.project.name, project_path(@advisory.project)
|
||||
.rightlist
|
||||
- @advisory.projects.each do |project|
|
||||
= link_to project.name, project_path(project)
|
||||
%br
|
||||
.both
|
||||
|
||||
.leftlist= "#{t("activerecord.attributes.advisory.created_at")}:".html_safe
|
||||
|
@ -33,5 +36,7 @@
|
|||
%br
|
||||
.both
|
||||
|
||||
= render :partial => 'packages_info'
|
||||
|
||||
:javascript
|
||||
$('article .all').addClass('bigpadding');
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
.leftlist= t("activerecord.attributes.build_list.update_type")
|
||||
.rightlist
|
||||
- if @build_list.can_publish? and can?(:publish, @build_list)
|
||||
= f.select :update_type, options_for_select(BuildList::RELEASE_UPDATE_TYPES, @build_list.update_type)
|
||||
= f.select :update_type, options_for_select(BuildList::RELEASE_UPDATE_TYPES, @build_list.update_type), {}, :class => 'chzn-select'
|
||||
- else
|
||||
= @build_list.update_type
|
||||
.both
|
||||
|
@ -74,7 +74,8 @@
|
|||
- if @build_list.can_publish? and @build_list.save_to_platform.released and @build_list.advisory.nil?
|
||||
#advisory_block
|
||||
.leftlist= label_tag :attach_advisory, t("layout.build_lists.attached_advisory")
|
||||
.rightlist= select_tag :attach_advisory, advisories_select_options(@advisories)
|
||||
.rightlist
|
||||
= select_tag :attach_advisory, advisories_select_options(@advisories), :class => 'chzn-select'
|
||||
.both
|
||||
|
||||
#new_advisory_form
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
class AddManyProjectsToAdvisories < ActiveRecord::Migration
|
||||
def up
|
||||
create_table :advisories_projects, :id => false do |t|
|
||||
t.integer :advisory_id
|
||||
t.integer :project_id
|
||||
end
|
||||
add_index :advisories_projects, :advisory_id
|
||||
add_index :advisories_projects, :project_id
|
||||
add_index :advisories_projects, [:advisory_id, :project_id], :name => :advisory_project_index, :unique => true
|
||||
|
||||
Advisory.find_in_batches do |b|
|
||||
b.each do |advisory|
|
||||
advisory.projects << Project.find(advisory.project_id)
|
||||
advisory.save
|
||||
end
|
||||
end
|
||||
|
||||
change_table :advisories do |t|
|
||||
t.remove :project_id
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
change_table :advisories do |t|
|
||||
t.integer :project_id
|
||||
end
|
||||
|
||||
Advisory.find_in_batches do |b|
|
||||
b.each do |advisory|
|
||||
advisory.project_id = advisory.projects.first.id
|
||||
advisory.save
|
||||
end
|
||||
end
|
||||
|
||||
remove_index :advisories_projects, :column => :advisory_id
|
||||
remove_index :advisories_projects, :column => :project_id
|
||||
remove_index :advisories_projects, :name => :advisory_project_index
|
||||
drop_table :advisories_projects
|
||||
end
|
||||
end
|
76
db/schema.rb
76
db/schema.rb
|
@ -11,19 +11,18 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20120529130537) do
|
||||
ActiveRecord::Schema.define(:version => 20120607153342) do
|
||||
|
||||
create_table "activity_feeds", :force => true do |t|
|
||||
t.integer "user_id", :null => false
|
||||
t.string "kind"
|
||||
t.text "data"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "advisories", :force => true do |t|
|
||||
t.string "advisory_id"
|
||||
t.integer "project_id"
|
||||
t.text "description", :default => ""
|
||||
t.text "references", :default => ""
|
||||
t.text "update_type", :default => ""
|
||||
|
@ -32,7 +31,6 @@ ActiveRecord::Schema.define(:version => 20120529130537) do
|
|||
end
|
||||
|
||||
add_index "advisories", ["advisory_id"], :name => "index_advisories_on_advisory_id", :unique => true
|
||||
add_index "advisories", ["project_id"], :name => "index_advisories_on_project_id"
|
||||
add_index "advisories", ["update_type"], :name => "index_advisories_on_update_type"
|
||||
|
||||
create_table "advisories_platforms", :id => false, :force => true do |t|
|
||||
|
@ -44,6 +42,15 @@ ActiveRecord::Schema.define(:version => 20120529130537) do
|
|||
add_index "advisories_platforms", ["advisory_id", "platform_id"], :name => "advisory_platform_index", :unique => true
|
||||
add_index "advisories_platforms", ["platform_id"], :name => "index_advisories_platforms_on_platform_id"
|
||||
|
||||
create_table "advisories_projects", :id => false, :force => true do |t|
|
||||
t.integer "advisory_id"
|
||||
t.integer "project_id"
|
||||
end
|
||||
|
||||
add_index "advisories_projects", ["advisory_id"], :name => "index_advisories_projects_on_advisory_id"
|
||||
add_index "advisories_projects", ["advisory_id", "project_id"], :name => "advisory_project_index", :unique => true
|
||||
add_index "advisories_projects", ["project_id"], :name => "index_advisories_projects_on_project_id"
|
||||
|
||||
create_table "arches", :force => true do |t|
|
||||
t.string "name", :null => false
|
||||
t.datetime "created_at"
|
||||
|
@ -102,29 +109,53 @@ ActiveRecord::Schema.define(:version => 20120529130537) do
|
|||
t.datetime "notified_at"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "is_circle", :default => false
|
||||
t.boolean "is_circle"
|
||||
t.text "additional_repos"
|
||||
t.string "name"
|
||||
t.boolean "build_requires", :default => false
|
||||
t.boolean "build_requires"
|
||||
t.string "update_type"
|
||||
t.integer "build_for_platform_id"
|
||||
t.integer "save_to_platform_id"
|
||||
t.text "include_repos"
|
||||
t.integer "user_id"
|
||||
t.boolean "auto_publish", :default => true
|
||||
t.boolean "auto_publish"
|
||||
t.string "package_version"
|
||||
t.string "commit_hash"
|
||||
t.integer "priority", :default => 0, :null => false
|
||||
t.integer "priority", :null => false
|
||||
t.datetime "started_at"
|
||||
t.integer "duration"
|
||||
t.integer "advisory_id"
|
||||
t.integer "mass_build_id"
|
||||
end
|
||||
|
||||
add_index "build_lists", ["advisory_id"], :name => "index_build_lists_on_advisory_id"
|
||||
add_index "build_lists", ["arch_id"], :name => "index_build_lists_on_arch_id"
|
||||
add_index "build_lists", ["bs_id"], :name => "index_build_lists_on_bs_id", :unique => true
|
||||
add_index "build_lists", ["project_id"], :name => "index_build_lists_on_project_id"
|
||||
create_table "build_lists_copy", :id => false, :force => true do |t|
|
||||
t.integer "id", :null => false
|
||||
t.integer "bs_id"
|
||||
t.string "container_path"
|
||||
t.integer "status"
|
||||
t.string "project_version"
|
||||
t.integer "project_id"
|
||||
t.integer "arch_id"
|
||||
t.datetime "notified_at"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "is_circle"
|
||||
t.text "additional_repos"
|
||||
t.string "name"
|
||||
t.boolean "build_requires"
|
||||
t.string "update_type"
|
||||
t.integer "build_for_platform_id"
|
||||
t.integer "save_to_platform_id"
|
||||
t.text "include_repos"
|
||||
t.integer "user_id"
|
||||
t.boolean "auto_publish"
|
||||
t.string "package_version"
|
||||
t.string "commit_hash"
|
||||
t.integer "priority", :null => false
|
||||
t.datetime "started_at"
|
||||
t.integer "duration"
|
||||
t.integer "advisory_id"
|
||||
end
|
||||
|
||||
create_table "comments", :force => true do |t|
|
||||
t.string "commentable_type"
|
||||
|
@ -233,7 +264,7 @@ ActiveRecord::Schema.define(:version => 20120529130537) do
|
|||
t.string "owner_type"
|
||||
t.string "visibility", :default => "open", :null => false
|
||||
t.string "platform_type", :default => "main", :null => false
|
||||
t.string "distrib_type", :null => false
|
||||
t.string "distrib_type"
|
||||
end
|
||||
|
||||
add_index "platforms", ["name"], :name => "index_platforms_on_name", :unique => true, :case_sensitive => false
|
||||
|
@ -315,20 +346,21 @@ ActiveRecord::Schema.define(:version => 20120529130537) do
|
|||
t.integer "build_count", :default => 0, :null => false
|
||||
end
|
||||
|
||||
add_index "projects", ["owner_id"], :name => "index_projects_on_name_and_owner_id_and_owner_type", :unique => true, :case_sensitive => false
|
||||
|
||||
create_table "register_requests", :force => true do |t|
|
||||
t.string "name"
|
||||
t.string "email"
|
||||
t.string "token"
|
||||
t.boolean "approved", :default => false
|
||||
t.boolean "rejected", :default => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "interest"
|
||||
t.text "more"
|
||||
end
|
||||
|
||||
add_index "register_requests", ["email"], :name => "index_register_requests_on_email", :unique => true, :case_sensitive => false
|
||||
add_index "register_requests", ["token"], :name => "index_register_requests_on_token", :unique => true, :case_sensitive => false
|
||||
|
||||
create_table "relations", :force => true do |t|
|
||||
t.integer "actor_id"
|
||||
|
@ -376,19 +408,16 @@ ActiveRecord::Schema.define(:version => 20120529130537) do
|
|||
t.string "name"
|
||||
t.string "email", :default => "", :null => false
|
||||
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
||||
t.string "password_salt", :default => "", :null => false
|
||||
t.string "reset_password_token"
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.datetime "remember_created_at"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.text "ssh_key"
|
||||
t.string "uname"
|
||||
t.string "role"
|
||||
t.string "language", :default => "en"
|
||||
t.string "confirmation_token"
|
||||
t.datetime "confirmed_at"
|
||||
t.datetime "confirmation_sent_at"
|
||||
t.integer "own_projects_count", :default => 0, :null => false
|
||||
t.datetime "reset_password_sent_at"
|
||||
t.text "professional_experience"
|
||||
t.string "site"
|
||||
t.string "company"
|
||||
|
@ -400,6 +429,9 @@ ActiveRecord::Schema.define(:version => 20120529130537) do
|
|||
t.integer "failed_attempts", :default => 0
|
||||
t.string "unlock_token"
|
||||
t.datetime "locked_at"
|
||||
t.string "confirmation_token"
|
||||
t.datetime "confirmed_at"
|
||||
t.datetime "confirmation_sent_at"
|
||||
t.string "authentication_token"
|
||||
t.integer "build_priority", :default => 50
|
||||
end
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 559 B |
File diff suppressed because it is too large
Load Diff
|
@ -10,5 +10,8 @@
|
|||
//= require bootstrap-modal
|
||||
//= require bootstrap-button
|
||||
//= require bootstrap-dropdown
|
||||
//= require bootstrap-tooltip
|
||||
//= require bootstrap-popover
|
||||
//= require chosen.jquery
|
||||
// require html5shiv
|
||||
// require_tree .
|
||||
|
|
|
@ -0,0 +1,396 @@
|
|||
/* @group Base */
|
||||
.chzn-container {
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
zoom: 1;
|
||||
*display: inline;
|
||||
}
|
||||
.chzn-container .chzn-drop {
|
||||
background: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-top: 0;
|
||||
position: absolute;
|
||||
top: 29px;
|
||||
left: 0;
|
||||
-webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
|
||||
-moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
||||
-o-box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
||||
box-shadow : 0 4px 5px rgba(0,0,0,.15);
|
||||
z-index: 1010;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Single Chosen */
|
||||
.chzn-container-single .chzn-single {
|
||||
background-color: #ffffff;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-image: -ms-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
background-image: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius : 5px;
|
||||
border-radius : 5px;
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
border: 1px solid #aaaaaa;
|
||||
-webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
||||
-moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
||||
box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
height: 23px;
|
||||
line-height: 24px;
|
||||
padding: 0 0 0 8px;
|
||||
color: #444444;
|
||||
text-decoration: none;
|
||||
}
|
||||
.chzn-container-single .chzn-default {
|
||||
color: #999;
|
||||
}
|
||||
.chzn-container-single .chzn-single span {
|
||||
margin-right: 26px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
-ms-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.chzn-container-single .chzn-single abbr {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 26px;
|
||||
top: 6px;
|
||||
width: 12px;
|
||||
height: 13px;
|
||||
font-size: 1px;
|
||||
background: image-url('chosen/chosen-sprite.png') right top no-repeat;
|
||||
}
|
||||
.chzn-container-single .chzn-single abbr:hover {
|
||||
background-position: right -11px;
|
||||
}
|
||||
.chzn-container-single.chzn-disabled .chzn-single abbr:hover {
|
||||
background-position: right top;
|
||||
}
|
||||
.chzn-container-single .chzn-single div {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 18px;
|
||||
}
|
||||
.chzn-container-single .chzn-single div b {
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat 0 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.chzn-container-single .chzn-search {
|
||||
padding: 3px 4px;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
z-index: 1010;
|
||||
}
|
||||
.chzn-container-single .chzn-search input {
|
||||
background: #fff image-url('chosen/chosen-sprite.png') no-repeat 100% -22px;
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
margin: 1px 0;
|
||||
padding: 4px 20px 4px 5px;
|
||||
outline: 0;
|
||||
border: 1px solid #aaa;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
.chzn-container-single .chzn-drop {
|
||||
-webkit-border-radius: 0 0 4px 4px;
|
||||
-moz-border-radius : 0 0 4px 4px;
|
||||
border-radius : 0 0 4px 4px;
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
.chzn-container-single-nosearch .chzn-search input {
|
||||
position: absolute;
|
||||
left: -9000px;
|
||||
}
|
||||
|
||||
/* @group Multi Chosen */
|
||||
.chzn-container-multi .chzn-choices {
|
||||
background-color: #fff;
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
border: 1px solid #aaa;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
cursor: text;
|
||||
overflow: hidden;
|
||||
height: auto !important;
|
||||
height: 1%;
|
||||
position: relative;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices li {
|
||||
float: left;
|
||||
list-style: none;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field {
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field input {
|
||||
color: #666;
|
||||
background: transparent !important;
|
||||
border: 0 !important;
|
||||
font-family: sans-serif;
|
||||
font-size: 100%;
|
||||
height: 15px;
|
||||
padding: 5px;
|
||||
margin: 1px 0;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow : none;
|
||||
-o-box-shadow : none;
|
||||
box-shadow : none;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-field .default {
|
||||
color: #999;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice {
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius : 3px;
|
||||
border-radius : 3px;
|
||||
-moz-background-clip : padding;
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip : padding-box;
|
||||
background-color: #e4e4e4;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
||||
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
||||
-webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
-moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
||||
color: #333;
|
||||
border: 1px solid #aaaaaa;
|
||||
line-height: 13px;
|
||||
padding: 3px 20px 3px 5px;
|
||||
margin: 3px 0 3px 5px;
|
||||
position: relative;
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice-focus {
|
||||
background: #d4d4d4;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice .search-choice-close {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: 4px;
|
||||
width: 12px;
|
||||
height: 13px;
|
||||
font-size: 1px;
|
||||
background: image-url('chosen/chosen-sprite.png') right top no-repeat;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
|
||||
background-position: right -11px;
|
||||
}
|
||||
.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
|
||||
background-position: right -11px;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Results */
|
||||
.chzn-container .chzn-results {
|
||||
margin: 0 4px 4px 0;
|
||||
max-height: 240px;
|
||||
padding: 0 0 0 4px;
|
||||
position: relative;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.chzn-container-multi .chzn-results {
|
||||
margin: -1px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
.chzn-container .chzn-results li {
|
||||
display: none;
|
||||
line-height: 15px;
|
||||
padding: 5px 6px;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.chzn-container .chzn-results .active-result {
|
||||
cursor: pointer;
|
||||
display: list-item;
|
||||
}
|
||||
.chzn-container .chzn-results .highlighted {
|
||||
background-color: #3875d7;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
|
||||
background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
background-image: -ms-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
background-image: linear-gradient(top, #3875d7 20%, #2a62bc 90%);
|
||||
color: #fff;
|
||||
}
|
||||
.chzn-container .chzn-results li em {
|
||||
background: #feffde;
|
||||
font-style: normal;
|
||||
}
|
||||
.chzn-container .chzn-results .highlighted em {
|
||||
background: transparent;
|
||||
}
|
||||
.chzn-container .chzn-results .no-results {
|
||||
background: #f4f4f4;
|
||||
display: list-item;
|
||||
}
|
||||
.chzn-container .chzn-results .group-result {
|
||||
cursor: default;
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
}
|
||||
.chzn-container .chzn-results .group-option {
|
||||
padding-left: 15px;
|
||||
}
|
||||
.chzn-container-multi .chzn-drop .result-selected {
|
||||
display: none;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll {
|
||||
background: white;
|
||||
margin: 0 4px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 321px; /* This should by dynamic with js */
|
||||
z-index: 1;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll span {
|
||||
display: inline-block;
|
||||
height: 17px;
|
||||
text-indent: -5000px;
|
||||
width: 9px;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll-down {
|
||||
bottom: 0;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll-down span {
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat -4px -3px;
|
||||
}
|
||||
.chzn-container .chzn-results-scroll-up span {
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat -22px -3px;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Active */
|
||||
.chzn-container-active .chzn-single {
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
border: 1px solid #5897fb;
|
||||
}
|
||||
.chzn-container-active .chzn-single-with-drop {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-box-shadow: 0 1px 0 #fff inset;
|
||||
-moz-box-shadow : 0 1px 0 #fff inset;
|
||||
-o-box-shadow : 0 1px 0 #fff inset;
|
||||
box-shadow : 0 1px 0 #fff inset;
|
||||
background-color: #eee;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );
|
||||
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
background-image: linear-gradient(top, #eeeeee 20%, #ffffff 80%);
|
||||
-webkit-border-bottom-left-radius : 0;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomleft : 0;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
border-bottom-left-radius : 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.chzn-container-active .chzn-single-with-drop div {
|
||||
background: transparent;
|
||||
border-left: none;
|
||||
}
|
||||
.chzn-container-active .chzn-single-with-drop div b {
|
||||
background-position: -18px 1px;
|
||||
}
|
||||
.chzn-container-active .chzn-choices {
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
||||
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
||||
border: 1px solid #5897fb;
|
||||
}
|
||||
.chzn-container-active .chzn-choices .search-field input {
|
||||
color: #111 !important;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
/* @group Disabled Support */
|
||||
.chzn-disabled {
|
||||
cursor: default;
|
||||
opacity:0.5 !important;
|
||||
}
|
||||
.chzn-disabled .chzn-single {
|
||||
cursor: default;
|
||||
}
|
||||
.chzn-disabled .chzn-choices .search-choice .search-choice-close {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* @group Right to Left */
|
||||
.chzn-rtl { text-align: right; }
|
||||
.chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
|
||||
.chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
|
||||
|
||||
.chzn-rtl .chzn-single div { left: 3px; right: auto; }
|
||||
.chzn-rtl .chzn-single abbr {
|
||||
left: 26px;
|
||||
right: auto;
|
||||
}
|
||||
.chzn-rtl .chzn-choices .search-field input { direction: rtl; }
|
||||
.chzn-rtl .chzn-choices li { float: right; }
|
||||
.chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
|
||||
.chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; background-position: right top;}
|
||||
.chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
|
||||
.chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
|
||||
.chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
|
||||
.chzn-rtl .chzn-search input {
|
||||
background: #fff image-url('chosen/chosen-sprite.png') no-repeat -38px -22px;
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
background: image-url('chosen/chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
||||
padding: 4px 5px 4px 20px;
|
||||
direction: rtl;
|
||||
}
|
||||
/* @end */
|
|
@ -13,4 +13,5 @@
|
|||
@import "codemirror/modes/rpm-spec";
|
||||
@import "codemirror/modes/tiddlywiki";
|
||||
|
||||
@import "bootstrap"
|
||||
@import "bootstrap";
|
||||
@import "chosen.scss";
|
||||
|
|
Loading…
Reference in New Issue